blob: 84e1e6070f94cf53fd668fa04a4449fed2a542ff [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 Rossum3065c942001-09-17 04:03:14 +00003# From configure.in Revision: 1.260
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006# Generated automatically using autoconf version 2.13
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Jack Jansene578a632001-08-15 01:27:14 +000017 --enable-framework[=INSTALLDIR] Build (MacOSX|Darwin) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000018ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000019 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000021 --with-cxx=<compiler> enable C++ support"
Guido van Rossum95012191999-12-16 17:50:52 +000022ac_help="$ac_help
Neil Schemenauerdfb38e42001-01-27 06:57:08 +000023 --with-suffix=.exe set executable suffix"
24ac_help="$ac_help
Fred Drake109d9862001-07-11 06:27:56 +000025 --with-pydebug build with Py_DEBUG defined"
26ac_help="$ac_help
Jack Jansene578a632001-08-15 01:27:14 +000027 --enable-toolbox-glue disable/enable MacOSX glue code for extensions"
28ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000029 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000030ac_help="$ac_help
Neil Schemenauerd32c2492001-01-24 17:25:28 +000031 --with-signal-module disable/enable signal module"
32ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000033 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000034ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000035 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000036ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000037 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000038ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000039 --with-pth use GNU pth threading libraries"
40ac_help="$ac_help
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000041 --enable-ipv6 Enable ipv6 (with ipv4) support
42 --disable-ipv6 Disable ipv6 support"
43ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000044 --with(out)-cycle-gc disable/enable garbage collection"
45ac_help="$ac_help
Neil Schemenauera35c6882001-02-27 04:45:05 +000046 --with(out)-pymalloc disable/enable specialized mallocs"
47ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000048 --with-wctype-functions use wctype.h functions"
49ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000050 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000051ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000052 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000053ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000054 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000055ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000056 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000057ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000058 --with-libc=STRING C library"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000059ac_help="$ac_help
60 --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)"
Guido van Rossum627b2d71993-12-24 10:39:16 +000061
Guido van Rossum7f43da71994-08-01 12:15:30 +000062# Initialize some variables set by options.
63# The variables have the same names as the options, with
64# dashes changed to underlines.
65build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000066cache_file=./config.cache
67exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000068host=NONE
69no_create=
70nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000071no_recursion=
72prefix=NONE
73program_prefix=NONE
74program_suffix=NONE
75program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000076silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000077site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000078srcdir=
79target=NONE
80verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000081x_includes=NONE
82x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000083bindir='${exec_prefix}/bin'
84sbindir='${exec_prefix}/sbin'
85libexecdir='${exec_prefix}/libexec'
86datadir='${prefix}/share'
87sysconfdir='${prefix}/etc'
88sharedstatedir='${prefix}/com'
89localstatedir='${prefix}/var'
90libdir='${exec_prefix}/lib'
91includedir='${prefix}/include'
92oldincludedir='/usr/include'
93infodir='${prefix}/info'
94mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000095
96# Initialize some other variables.
97subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000098MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000099SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +0000100# Maximum number of lines to put in a shell here document.
101ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +0000102
103ac_prev=
104for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000105do
Guido van Rossum627b2d71993-12-24 10:39:16 +0000106
Guido van Rossum7f43da71994-08-01 12:15:30 +0000107 # If the previous option needs an argument, assign it.
108 if test -n "$ac_prev"; then
109 eval "$ac_prev=\$ac_option"
110 ac_prev=
111 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000112 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000113
Guido van Rossum7f43da71994-08-01 12:15:30 +0000114 case "$ac_option" in
115 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
116 *) ac_optarg= ;;
117 esac
118
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000119 # Accept the important Cygnus configure options, so we can diagnose typos.
120
Guido van Rossum7f43da71994-08-01 12:15:30 +0000121 case "$ac_option" in
122
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000123 -bindir | --bindir | --bindi | --bind | --bin | --bi)
124 ac_prev=bindir ;;
125 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
126 bindir="$ac_optarg" ;;
127
128 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000129 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000130 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000131 build="$ac_optarg" ;;
132
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000133 -cache-file | --cache-file | --cache-fil | --cache-fi \
134 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
135 ac_prev=cache_file ;;
136 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
137 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
138 cache_file="$ac_optarg" ;;
139
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000140 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
141 ac_prev=datadir ;;
142 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
143 | --da=*)
144 datadir="$ac_optarg" ;;
145
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 -disable-* | --disable-*)
147 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000148 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000149 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000150 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000151 fi
152 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
153 eval "enable_${ac_feature}=no" ;;
154
155 -enable-* | --enable-*)
156 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000157 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000158 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000159 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000160 fi
161 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
162 case "$ac_option" in
163 *=*) ;;
164 *) ac_optarg=yes ;;
165 esac
166 eval "enable_${ac_feature}='$ac_optarg'" ;;
167
Guido van Rossum7f43da71994-08-01 12:15:30 +0000168 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
169 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
170 | --exec | --exe | --ex)
171 ac_prev=exec_prefix ;;
172 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
173 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
174 | --exec=* | --exe=* | --ex=*)
175 exec_prefix="$ac_optarg" ;;
176
177 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000178 # Obsolete; use --with-gas.
179 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000180
181 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000182 # Omit some internal or obsolete options to make the list less imposing.
183 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000184 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000185Usage: configure [options] [host]
186Options: [defaults in brackets after descriptions]
187Configuration:
188 --cache-file=FILE cache test results in FILE
189 --help print this message
190 --no-create do not create output files
191 --quiet, --silent do not print \`checking...' messages
192 --version print the version of autoconf that created configure
193Directory and file names:
194 --prefix=PREFIX install architecture-independent files in PREFIX
195 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000196 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000197 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000198 --bindir=DIR user executables in DIR [EPREFIX/bin]
199 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
200 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
201 --datadir=DIR read-only architecture-independent data in DIR
202 [PREFIX/share]
203 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
204 --sharedstatedir=DIR modifiable architecture-independent data in DIR
205 [PREFIX/com]
206 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
207 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
208 --includedir=DIR C header files in DIR [PREFIX/include]
209 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
210 --infodir=DIR info documentation in DIR [PREFIX/info]
211 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000212 --srcdir=DIR find the sources in DIR [configure dir or ..]
213 --program-prefix=PREFIX prepend PREFIX to installed program names
214 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000215 --program-transform-name=PROGRAM
216 run sed PROGRAM on installed program names
217EOF
218 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000219Host type:
220 --build=BUILD configure for building on BUILD [BUILD=HOST]
221 --host=HOST configure for HOST [guessed]
222 --target=TARGET configure for TARGET [TARGET=HOST]
223Features and packages:
224 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
225 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
226 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
227 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
228 --x-includes=DIR X include files are in DIR
229 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000230EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000231 if test -n "$ac_help"; then
232 echo "--enable and --with options recognized:$ac_help"
233 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000234 exit 0 ;;
235
236 -host | --host | --hos | --ho)
237 ac_prev=host ;;
238 -host=* | --host=* | --hos=* | --ho=*)
239 host="$ac_optarg" ;;
240
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000241 -includedir | --includedir | --includedi | --included | --include \
242 | --includ | --inclu | --incl | --inc)
243 ac_prev=includedir ;;
244 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
245 | --includ=* | --inclu=* | --incl=* | --inc=*)
246 includedir="$ac_optarg" ;;
247
248 -infodir | --infodir | --infodi | --infod | --info | --inf)
249 ac_prev=infodir ;;
250 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
251 infodir="$ac_optarg" ;;
252
253 -libdir | --libdir | --libdi | --libd)
254 ac_prev=libdir ;;
255 -libdir=* | --libdir=* | --libdi=* | --libd=*)
256 libdir="$ac_optarg" ;;
257
258 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
259 | --libexe | --libex | --libe)
260 ac_prev=libexecdir ;;
261 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
262 | --libexe=* | --libex=* | --libe=*)
263 libexecdir="$ac_optarg" ;;
264
265 -localstatedir | --localstatedir | --localstatedi | --localstated \
266 | --localstate | --localstat | --localsta | --localst \
267 | --locals | --local | --loca | --loc | --lo)
268 ac_prev=localstatedir ;;
269 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
270 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
271 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
272 localstatedir="$ac_optarg" ;;
273
274 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
275 ac_prev=mandir ;;
276 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
277 mandir="$ac_optarg" ;;
278
Guido van Rossum7f43da71994-08-01 12:15:30 +0000279 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000280 # Obsolete; use --without-fp.
281 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000282
283 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
284 | --no-cr | --no-c)
285 no_create=yes ;;
286
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000287 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
288 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
289 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000290
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000291 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
292 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
293 | --oldin | --oldi | --old | --ol | --o)
294 ac_prev=oldincludedir ;;
295 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
296 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
297 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
298 oldincludedir="$ac_optarg" ;;
299
Guido van Rossum7f43da71994-08-01 12:15:30 +0000300 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
301 ac_prev=prefix ;;
302 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
303 prefix="$ac_optarg" ;;
304
305 -program-prefix | --program-prefix | --program-prefi | --program-pref \
306 | --program-pre | --program-pr | --program-p)
307 ac_prev=program_prefix ;;
308 -program-prefix=* | --program-prefix=* | --program-prefi=* \
309 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
310 program_prefix="$ac_optarg" ;;
311
312 -program-suffix | --program-suffix | --program-suffi | --program-suff \
313 | --program-suf | --program-su | --program-s)
314 ac_prev=program_suffix ;;
315 -program-suffix=* | --program-suffix=* | --program-suffi=* \
316 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
317 program_suffix="$ac_optarg" ;;
318
319 -program-transform-name | --program-transform-name \
320 | --program-transform-nam | --program-transform-na \
321 | --program-transform-n | --program-transform- \
322 | --program-transform | --program-transfor \
323 | --program-transfo | --program-transf \
324 | --program-trans | --program-tran \
325 | --progr-tra | --program-tr | --program-t)
326 ac_prev=program_transform_name ;;
327 -program-transform-name=* | --program-transform-name=* \
328 | --program-transform-nam=* | --program-transform-na=* \
329 | --program-transform-n=* | --program-transform-=* \
330 | --program-transform=* | --program-transfor=* \
331 | --program-transfo=* | --program-transf=* \
332 | --program-trans=* | --program-tran=* \
333 | --progr-tra=* | --program-tr=* | --program-t=*)
334 program_transform_name="$ac_optarg" ;;
335
336 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
337 | -silent | --silent | --silen | --sile | --sil)
338 silent=yes ;;
339
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000340 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
341 ac_prev=sbindir ;;
342 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
343 | --sbi=* | --sb=*)
344 sbindir="$ac_optarg" ;;
345
346 -sharedstatedir | --sharedstatedir | --sharedstatedi \
347 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
348 | --sharedst | --shareds | --shared | --share | --shar \
349 | --sha | --sh)
350 ac_prev=sharedstatedir ;;
351 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
352 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
353 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
354 | --sha=* | --sh=*)
355 sharedstatedir="$ac_optarg" ;;
356
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000357 -site | --site | --sit)
358 ac_prev=site ;;
359 -site=* | --site=* | --sit=*)
360 site="$ac_optarg" ;;
361
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
363 ac_prev=srcdir ;;
364 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
365 srcdir="$ac_optarg" ;;
366
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000367 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
368 | --syscon | --sysco | --sysc | --sys | --sy)
369 ac_prev=sysconfdir ;;
370 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
371 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
372 sysconfdir="$ac_optarg" ;;
373
Guido van Rossum7f43da71994-08-01 12:15:30 +0000374 -target | --target | --targe | --targ | --tar | --ta | --t)
375 ac_prev=target ;;
376 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
377 target="$ac_optarg" ;;
378
379 -v | -verbose | --verbose | --verbos | --verbo | --verb)
380 verbose=yes ;;
381
382 -version | --version | --versio | --versi | --vers)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000383 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000384 exit 0 ;;
385
386 -with-* | --with-*)
387 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000388 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000390 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000391 fi
392 ac_package=`echo $ac_package| sed 's/-/_/g'`
393 case "$ac_option" in
394 *=*) ;;
395 *) ac_optarg=yes ;;
396 esac
397 eval "with_${ac_package}='$ac_optarg'" ;;
398
399 -without-* | --without-*)
400 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000401 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000403 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000404 fi
405 ac_package=`echo $ac_package| sed 's/-/_/g'`
406 eval "with_${ac_package}=no" ;;
407
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000408 --x)
409 # Obsolete; use --with-x.
410 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
413 | --x-incl | --x-inc | --x-in | --x-i)
414 ac_prev=x_includes ;;
415 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
416 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
417 x_includes="$ac_optarg" ;;
418
419 -x-libraries | --x-libraries | --x-librarie | --x-librari \
420 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
421 ac_prev=x_libraries ;;
422 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
423 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
424 x_libraries="$ac_optarg" ;;
425
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000426 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427 ;;
428
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000429 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000430 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000431 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000432 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000433 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000434 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000435 fi
436 nonopt="$ac_option"
437 ;;
438
439 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000440done
441
Guido van Rossum7f43da71994-08-01 12:15:30 +0000442if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000443 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444fi
445
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000446trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000447
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000448# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000449# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000450# 1 file creation
451# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000452# 3 some systems may open it to /dev/tty
453# 4 used on the Kubota Titan
454# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000455# 5 compiler messages saved in config.log
456if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000457 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000458else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000459 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000460fi
461exec 5>./config.log
462
463echo "\
464This file contains any messages produced by compilers while
465running configure, to aid debugging if configure makes a mistake.
466" 1>&5
467
468# Strip out --no-create and --no-recursion so they do not pile up.
469# Also quote any args containing shell metacharacters.
470ac_configure_args=
471for ac_arg
472do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000473 case "$ac_arg" in
474 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
475 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000476 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
477 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
478 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
479 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
480 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000481 esac
482done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000483
484# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000485# Only set these to C if already set. These must not be set unconditionally
486# because not all systems understand e.g. LANG=C (notably SCO).
487# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
488# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000489if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000490if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
491if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
492if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000493
Guido van Rossum7f43da71994-08-01 12:15:30 +0000494# confdefs.h avoids OS command line length limits that DEFS can exceed.
495rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000496# AIX cpp loses on an empty file, so make sure it contains at least a newline.
497echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000498
499# A filename unique to this package, relative to the directory that
500# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000501ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000502
503# Find the source files, if location was not specified.
504if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000506 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000507 ac_prog=$0
508 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
509 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
510 srcdir=$ac_confdir
511 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000512 srcdir=..
513 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000514else
515 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000516fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000517if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000518 if test "$ac_srcdir_defaulted" = yes; then
519 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000520 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000521 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000522 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000523fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000524srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
525
526# Prefer explicitly selected file to automatically selected ones.
527if test -z "$CONFIG_SITE"; then
528 if test "x$prefix" != xNONE; then
529 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
530 else
531 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
532 fi
533fi
534for ac_site_file in $CONFIG_SITE; do
535 if test -r "$ac_site_file"; then
536 echo "loading site script $ac_site_file"
537 . "$ac_site_file"
538 fi
539done
540
541if test -r "$cache_file"; then
542 echo "loading cache $cache_file"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000543 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544else
545 echo "creating cache $cache_file"
546 > $cache_file
547fi
548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000550# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000552ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000553ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000554cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000555
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000556ac_exeext=
557ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000558if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
559 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
560 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
561 ac_n= ac_c='
562' ac_t=' '
563 else
564 ac_n=-n ac_c= ac_t=
565 fi
566else
567 ac_n= ac_c='\c' ac_t=
568fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000569
Guido van Rossum0a516c91994-09-12 10:58:40 +0000570
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571
Guido van Rossum627b2d71993-12-24 10:39:16 +0000572
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000573# Set VERSION so we only need to edit in one place (i.e., here)
574
Guido van Rossum6db412b2001-04-18 04:37:57 +0000575VERSION=2.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000576
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +0000577# Arguments passed to configure.
578
579CONFIG_ARGS="$ac_configure_args"
580
Guido van Rossum563e7081996-09-10 18:20:48 +0000581
Jack Jansene578a632001-08-15 01:27:14 +0000582# Check whether --enable-framework or --disable-framework was given.
583if test "${enable_framework+set}" = set; then
584 enableval="$enable_framework"
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000585
Jack Jansene578a632001-08-15 01:27:14 +0000586 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
743if test "$check_cxx" = "yes"
744then
745 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
746do
747# Extract the first word of "$ac_prog", so it can be a program name with args.
748set dummy $ac_prog; ac_word=$2
749echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000750echo "configure:751: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000751if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
752 echo $ac_n "(cached) $ac_c" 1>&6
753else
754 if test -n "$CXX"; then
755 ac_cv_prog_CXX="$CXX" # Let the user override the test.
756else
757 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
758 ac_dummy="$PATH"
759 for ac_dir in $ac_dummy; do
760 test -z "$ac_dir" && ac_dir=.
761 if test -f $ac_dir/$ac_word; then
762 ac_cv_prog_CXX="$ac_prog"
763 break
764 fi
765 done
766 IFS="$ac_save_ifs"
767fi
768fi
769CXX="$ac_cv_prog_CXX"
770if test -n "$CXX"; then
771 echo "$ac_t""$CXX" 1>&6
772else
773 echo "$ac_t""no" 1>&6
774fi
775
776test -n "$CXX" && break
777done
778test -n "$CXX" || CXX="notfound"
779
780 if test "$CXX" = "notfound"
781 then
782 CXX=
783 else
784 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000785echo "configure:786: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000786
787ac_ext=C
788# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
789ac_cpp='$CXXCPP $CPPFLAGS'
790ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
791ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
792cross_compiling=$ac_cv_prog_cxx_cross
793
794cat > conftest.$ac_ext << EOF
795
Jack Jansen127e56e2001-09-11 14:41:54 +0000796#line 797 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000797#include "confdefs.h"
798
799int main(){return(0);}
800EOF
Jack Jansen127e56e2001-09-11 14:41:54 +0000801if { (eval echo configure:802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000802 ac_cv_prog_cxx_works=yes
803 # If we can't run a trivial program, we are probably using a cross compiler.
804 if (./conftest; exit) 2>/dev/null; then
805 ac_cv_prog_cxx_cross=no
806 else
807 ac_cv_prog_cxx_cross=yes
808 fi
809else
810 echo "configure: failed program was:" >&5
811 cat conftest.$ac_ext >&5
812 ac_cv_prog_cxx_works=no
813fi
814rm -fr conftest*
815ac_ext=c
816# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
817ac_cpp='$CPP $CPPFLAGS'
818ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
819ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
820cross_compiling=$ac_cv_prog_cc_cross
821
822echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
823if test $ac_cv_prog_cxx_works = no; then
824 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
825fi
826echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000827echo "configure:828: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000828echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
829cross_compiling=$ac_cv_prog_cxx_cross
830
831 fi
832fi
833
Guido van Rossum8b131c51995-03-09 14:10:13 +0000834# If the user switches compilers, we can't believe the cache
835if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
836then
837 { echo "configure: error: cached CC is different -- throw away $cache_file
838(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
839fi
840
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841# Extract the first word of "gcc", so it can be a program name with args.
842set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000843echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000844echo "configure:845: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000845if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000846 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847else
848 if test -n "$CC"; then
849 ac_cv_prog_CC="$CC" # Let the user override the test.
850else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000851 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
852 ac_dummy="$PATH"
853 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854 test -z "$ac_dir" && ac_dir=.
855 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000857 break
858 fi
859 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862fi
863CC="$ac_cv_prog_CC"
864if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000865 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000867 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000869
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870if test -z "$CC"; then
871 # Extract the first word of "cc", so it can be a program name with args.
872set dummy cc; ac_word=$2
873echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000874echo "configure:875: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000875if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876 echo $ac_n "(cached) $ac_c" 1>&6
877else
878 if test -n "$CC"; then
879 ac_cv_prog_CC="$CC" # Let the user override the test.
880else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000881 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000883 ac_dummy="$PATH"
884 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885 test -z "$ac_dir" && ac_dir=.
886 if test -f $ac_dir/$ac_word; then
887 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
888 ac_prog_rejected=yes
889 continue
890 fi
891 ac_cv_prog_CC="cc"
892 break
893 fi
894 done
895 IFS="$ac_save_ifs"
896if test $ac_prog_rejected = yes; then
897 # We found a bogon in the path, so make sure we never use it.
898 set dummy $ac_cv_prog_CC
899 shift
900 if test $# -gt 0; then
901 # We chose a different compiler from the bogus one.
902 # However, it has the same basename, so the bogon will be chosen
903 # first if we set CC to just the basename; use the full file name.
904 shift
905 set dummy "$ac_dir/$ac_word" "$@"
906 shift
907 ac_cv_prog_CC="$@"
908 fi
909fi
910fi
911fi
912CC="$ac_cv_prog_CC"
913if test -n "$CC"; then
914 echo "$ac_t""$CC" 1>&6
915else
916 echo "$ac_t""no" 1>&6
917fi
918
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000919 if test -z "$CC"; then
920 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000921 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000922 # Extract the first word of "cl", so it can be a program name with args.
923set dummy cl; ac_word=$2
924echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000925echo "configure:926: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000926if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000927 echo $ac_n "(cached) $ac_c" 1>&6
928else
929 if test -n "$CC"; then
930 ac_cv_prog_CC="$CC" # Let the user override the test.
931else
932 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
933 ac_dummy="$PATH"
934 for ac_dir in $ac_dummy; do
935 test -z "$ac_dir" && ac_dir=.
936 if test -f $ac_dir/$ac_word; then
937 ac_cv_prog_CC="cl"
938 break
939 fi
940 done
941 IFS="$ac_save_ifs"
942fi
943fi
944CC="$ac_cv_prog_CC"
945if test -n "$CC"; then
946 echo "$ac_t""$CC" 1>&6
947else
948 echo "$ac_t""no" 1>&6
949fi
950 ;;
951 esac
952 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
954fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000956echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000957echo "configure:958: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000958
959ac_ext=c
960# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
961ac_cpp='$CPP $CPPFLAGS'
962ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000963ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000964cross_compiling=$ac_cv_prog_cc_cross
965
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000966cat > conftest.$ac_ext << EOF
967
Jack Jansen127e56e2001-09-11 14:41:54 +0000968#line 969 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000969#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000970
Guido van Rossumf78abae1997-01-21 22:02:36 +0000971main(){return(0);}
972EOF
Jack Jansen127e56e2001-09-11 14:41:54 +0000973if { (eval echo configure:974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000974 ac_cv_prog_cc_works=yes
975 # If we can't run a trivial program, we are probably using a cross compiler.
976 if (./conftest; exit) 2>/dev/null; then
977 ac_cv_prog_cc_cross=no
978 else
979 ac_cv_prog_cc_cross=yes
980 fi
981else
982 echo "configure: failed program was:" >&5
983 cat conftest.$ac_ext >&5
984 ac_cv_prog_cc_works=no
985fi
986rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000987ac_ext=c
988# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
989ac_cpp='$CPP $CPPFLAGS'
990ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
991ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
992cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000993
994echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
995if test $ac_cv_prog_cc_works = no; then
996 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
997fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000998echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000999echo "configure:1000: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001000echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1001cross_compiling=$ac_cv_prog_cc_cross
1002
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001003echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001004echo "configure:1005: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001005if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001006 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007else
1008 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001009#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001011#endif
1012EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001013if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001014 ac_cv_prog_gcc=yes
1015else
1016 ac_cv_prog_gcc=no
1017fi
1018fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001020echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001021
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001022if test $ac_cv_prog_gcc = yes; then
1023 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001024else
1025 GCC=
1026fi
1027
1028ac_test_CFLAGS="${CFLAGS+set}"
1029ac_save_CFLAGS="$CFLAGS"
1030CFLAGS=
1031echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001032echo "configure:1033: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001033if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001034 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035else
1036 echo 'void f(){}' > conftest.c
1037if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001038 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001040 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001041fi
1042rm -f conftest*
1043
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
Guido van Rossumf78abae1997-01-21 22:02:36 +00001046echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001047if test "$ac_test_CFLAGS" = set; then
1048 CFLAGS="$ac_save_CFLAGS"
1049elif test $ac_cv_prog_cc_g = yes; then
1050 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001051 CFLAGS="-g -O2"
1052 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001053 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054 fi
1055else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001056 if test "$GCC" = yes; then
1057 CFLAGS="-O2"
1058 else
1059 CFLAGS=
1060 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001061fi
1062
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001063
1064# checks for UNIX variants that set C preprocessor variables
1065echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001066echo "configure:1067: checking how to run the C preprocessor" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001067# On Suns, sometimes $CPP names a directory.
1068if test -n "$CPP" && test -d "$CPP"; then
1069 CPP=
1070fi
1071if test -z "$CPP"; then
1072if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1073 echo $ac_n "(cached) $ac_c" 1>&6
1074else
1075 # This must be in double quotes, not single quotes, because CPP may get
1076 # substituted into the Makefile and "${CC-cc}" will confuse make.
1077 CPP="${CC-cc} -E"
1078 # On the NeXT, cc -E runs the code through the compiler's parser,
1079 # not just through cpp.
1080 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001081#line 1082 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001082#include "confdefs.h"
1083#include <assert.h>
1084Syntax Error
1085EOF
1086ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen127e56e2001-09-11 14:41:54 +00001087{ (eval echo configure:1088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001088ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1089if test -z "$ac_err"; then
1090 :
1091else
1092 echo "$ac_err" >&5
1093 echo "configure: failed program was:" >&5
1094 cat conftest.$ac_ext >&5
1095 rm -rf conftest*
1096 CPP="${CC-cc} -E -traditional-cpp"
1097 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001098#line 1099 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001099#include "confdefs.h"
1100#include <assert.h>
1101Syntax Error
1102EOF
1103ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen127e56e2001-09-11 14:41:54 +00001104{ (eval echo configure:1105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001105ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1106if test -z "$ac_err"; then
1107 :
1108else
1109 echo "$ac_err" >&5
1110 echo "configure: failed program was:" >&5
1111 cat conftest.$ac_ext >&5
1112 rm -rf conftest*
1113 CPP="${CC-cc} -nologo -E"
1114 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001115#line 1116 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001116#include "confdefs.h"
1117#include <assert.h>
1118Syntax Error
1119EOF
1120ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen127e56e2001-09-11 14:41:54 +00001121{ (eval echo configure:1122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001122ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1123if test -z "$ac_err"; then
1124 :
1125else
1126 echo "$ac_err" >&5
1127 echo "configure: failed program was:" >&5
1128 cat conftest.$ac_ext >&5
1129 rm -rf conftest*
1130 CPP=/lib/cpp
1131fi
1132rm -f conftest*
1133fi
1134rm -f conftest*
1135fi
1136rm -f conftest*
1137 ac_cv_prog_CPP="$CPP"
1138fi
1139 CPP="$ac_cv_prog_CPP"
1140else
1141 ac_cv_prog_CPP="$CPP"
1142fi
1143echo "$ac_t""$CPP" 1>&6
1144
1145echo $ac_n "checking for AIX""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001146echo "configure:1147: checking for AIX" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001147cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001148#line 1149 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001149#include "confdefs.h"
1150#ifdef _AIX
1151 yes
1152#endif
1153
1154EOF
1155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1156 egrep "yes" >/dev/null 2>&1; then
1157 rm -rf conftest*
1158 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1159#define _ALL_SOURCE 1
1160EOF
1161
1162else
1163 rm -rf conftest*
1164 echo "$ac_t""no" 1>&6
1165fi
1166rm -f conftest*
1167
1168
1169ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1170echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001171echo "configure:1172: checking for minix/config.h" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001172if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1173 echo $ac_n "(cached) $ac_c" 1>&6
1174else
1175 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001176#line 1177 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001177#include "confdefs.h"
1178#include <minix/config.h>
1179EOF
1180ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen127e56e2001-09-11 14:41:54 +00001181{ (eval echo configure:1182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001182ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1183if test -z "$ac_err"; then
1184 rm -rf conftest*
1185 eval "ac_cv_header_$ac_safe=yes"
1186else
1187 echo "$ac_err" >&5
1188 echo "configure: failed program was:" >&5
1189 cat conftest.$ac_ext >&5
1190 rm -rf conftest*
1191 eval "ac_cv_header_$ac_safe=no"
1192fi
1193rm -f conftest*
1194fi
1195if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1196 echo "$ac_t""yes" 1>&6
1197 MINIX=yes
1198else
1199 echo "$ac_t""no" 1>&6
1200MINIX=
1201fi
1202
1203if test "$MINIX" = yes; then
1204 cat >> confdefs.h <<\EOF
1205#define _POSIX_SOURCE 1
1206EOF
1207
1208 cat >> confdefs.h <<\EOF
1209#define _POSIX_1_SOURCE 2
1210EOF
1211
1212 cat >> confdefs.h <<\EOF
1213#define _MINIX 1
1214EOF
1215
1216fi
1217
1218
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001219echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001220echo "configure:1221: checking for Cygwin environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001221if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1222 echo $ac_n "(cached) $ac_c" 1>&6
1223else
1224 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001225#line 1226 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001226#include "confdefs.h"
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001227
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001228int main() {
1229
1230#ifndef __CYGWIN__
1231#define __CYGWIN__ __CYGWIN32__
1232#endif
1233return __CYGWIN__;
1234; return 0; }
1235EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001236if { (eval echo configure:1237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001237 rm -rf conftest*
1238 ac_cv_cygwin=yes
1239else
1240 echo "configure: failed program was:" >&5
1241 cat conftest.$ac_ext >&5
1242 rm -rf conftest*
1243 ac_cv_cygwin=no
1244fi
1245rm -f conftest*
1246rm -f conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001247fi
1248
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001249echo "$ac_t""$ac_cv_cygwin" 1>&6
1250CYGWIN=
1251test "$ac_cv_cygwin" = yes && CYGWIN=yes
1252echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001253echo "configure:1254: checking for mingw32 environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001254if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1255 echo $ac_n "(cached) $ac_c" 1>&6
1256else
1257 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001258#line 1259 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001259#include "confdefs.h"
1260
1261int main() {
1262return __MINGW32__;
1263; return 0; }
1264EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001265if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001266 rm -rf conftest*
1267 ac_cv_mingw32=yes
1268else
1269 echo "configure: failed program was:" >&5
1270 cat conftest.$ac_ext >&5
1271 rm -rf conftest*
1272 ac_cv_mingw32=no
1273fi
1274rm -f conftest*
1275rm -f conftest*
1276fi
1277
1278echo "$ac_t""$ac_cv_mingw32" 1>&6
1279MINGW32=
1280test "$ac_cv_mingw32" = yes && MINGW32=yes
1281
1282
1283echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001284echo "configure:1285: checking for executable suffix" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001285if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1286 echo $ac_n "(cached) $ac_c" 1>&6
1287else
1288 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1289 ac_cv_exeext=.exe
1290else
1291 rm -f conftest*
1292 echo 'int main () { return 0; }' > conftest.$ac_ext
1293 ac_cv_exeext=
Jack Jansen127e56e2001-09-11 14:41:54 +00001294 if { (eval echo configure:1295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001295 for file in conftest.*; do
1296 case $file in
1297 *.c | *.o | *.obj) ;;
1298 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1299 esac
1300 done
1301 else
1302 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1303 fi
1304 rm -f conftest*
1305 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1306fi
1307fi
1308
1309EXEEXT=""
1310test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1311echo "$ac_t""${ac_cv_exeext}" 1>&6
1312ac_exeext=$EXEEXT
1313
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001314echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001315echo "configure:1316: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001316# Check whether --with-suffix or --without-suffix was given.
1317if test "${with_suffix+set}" = set; then
1318 withval="$with_suffix"
1319
1320 case $withval in
1321 no) EXEEXT=;;
1322 yes) EXEEXT=.exe;;
1323 *) EXEEXT=$withval;;
1324 esac
1325fi
1326
1327echo "$ac_t""$EXEEXT" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001328# Test whether we're running on a non-case-sensitive system, in which
1329# case we give a warning if no ext is given
1330if test -d "python" -a -z "$EXEEXT"
1331then
1332 echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2
1333fi
Guido van Rossumff555e32000-09-22 15:38:21 +00001334
Guido van Rossumdd997f71998-10-07 19:58:26 +00001335case $MACHDEP in
1336bsdos*)
1337 case $CC in
1338 gcc) CC="$CC -D_HAVE_BSDI";;
1339 esac;;
1340esac
1341
Guido van Rossum24b1e751997-08-21 02:29:16 +00001342case $ac_sys_system in
1343hp*|HP*)
1344 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001345 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001346 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001347Monterey*)
1348 case $CC in
1349 cc) CC="$CC -Wl,-Bexport";;
1350 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001351SunOS*)
1352 # Some functions have a prototype only with that define, e.g. confstr
1353 cat >> confdefs.h <<\EOF
1354#define __EXTENSIONS__ 1
1355EOF
1356
1357 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001358esac
1359
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001360
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001361
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001362echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001363echo "configure:1364: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001364if test -z "$LIBRARY"
1365then
1366 LIBRARY='libpython$(VERSION).a'
1367fi
1368echo "$ac_t""$LIBRARY" 1>&6
1369
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001370# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00001371# name of the library into which to insert object files). BLDLIBRARY is also
1372# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
1373# is blank as the main program is not linked directly against LDLIBRARY.
1374# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
1375# systems without shared libraries, LDLIBRARY is the same as LIBRARY
1376# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
1377# DLLLIBRARY is the shared (i.e., DLL) library.
1378#
1379
1380
Guido van Rossumaef734b2001-01-10 21:09:12 +00001381
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001382
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001383LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00001384BLDLIBRARY='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00001385DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00001386LDLIBRARYDIR=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001387
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001388# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001389# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001390# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001391
1392echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001393echo "configure:1394: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001394if test -z "$LINKCC"
1395then
1396 case $ac_sys_system in
1397 AIX*)
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001398 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001399 dgux*)
1400 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001401 Monterey64*)
1402 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001403 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001404 esac
1405fi
1406echo "$ac_t""$LINKCC" 1>&6
1407
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001408echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001409echo "configure:1410: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001410
1411# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001412case $MACHDEP in
1413dguxR4)
1414 LDLIBRARY='libpython$(VERSION).so'
1415 OPT="$OPT -pic"
1416 ;;
1417beos*)
1418 LDLIBRARY='libpython$(VERSION).so'
1419 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001420cygwin*)
1421 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001422 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001423 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001424esac
Jack Jansene578a632001-08-15 01:27:14 +00001425
Guido van Rossumb8552162001-09-05 14:58:11 +00001426# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
1427# library that we build, but we do not want to link against it (we
1428# will find it with a -framework option). For this reason there is an
1429# extra variable BLDLIBRARY against which Python and the extension
1430# modules are linked, BLDLIBRARY. This is normally the same as
1431# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00001432if test "$enable_framework"
1433then
1434 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
1435 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
1436 BLDLIBRARY=''
1437else
1438 BLDLIBRARY='$(LDLIBRARY)'
1439fi
1440
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001441echo "$ac_t""$LDLIBRARY" 1>&6
1442
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001443# Extract the first word of "ranlib", so it can be a program name with args.
1444set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001445echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001446echo "configure:1447: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001447if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001448 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001449else
1450 if test -n "$RANLIB"; then
1451 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1452else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001453 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1454 ac_dummy="$PATH"
1455 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001456 test -z "$ac_dir" && ac_dir=.
1457 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001458 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001459 break
1460 fi
1461 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001462 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001463 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001464fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001465fi
1466RANLIB="$ac_cv_prog_RANLIB"
1467if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001468 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001469else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001470 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001471fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001472
1473
Guido van Rossum7f43da71994-08-01 12:15:30 +00001474for ac_prog in ar aal
1475do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001476# Extract the first word of "$ac_prog", so it can be a program name with args.
1477set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001478echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001479echo "configure:1480: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001480if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001481 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001482else
1483 if test -n "$AR"; then
1484 ac_cv_prog_AR="$AR" # Let the user override the test.
1485else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001486 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1487 ac_dummy="$PATH"
1488 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001489 test -z "$ac_dir" && ac_dir=.
1490 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001491 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001492 break
1493 fi
1494 done
1495 IFS="$ac_save_ifs"
1496fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001497fi
1498AR="$ac_cv_prog_AR"
1499if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001500 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001501else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001502 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001503fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001504
1505test -n "$AR" && break
1506done
1507test -n "$AR" || AR="ar"
1508
Neil Schemenauera42c8272001-03-31 00:01:55 +00001509
1510case $MACHDEP in
1511bsdos*)
1512 # install -d does not work on BSDI
1513 if test -z "$INSTALL"
1514 then
1515 INSTALL="${srcdir}/install-sh -c"
1516 fi
1517esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001518ac_aux_dir=
1519for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1520 if test -f $ac_dir/install-sh; then
1521 ac_aux_dir=$ac_dir
1522 ac_install_sh="$ac_aux_dir/install-sh -c"
1523 break
1524 elif test -f $ac_dir/install.sh; then
1525 ac_aux_dir=$ac_dir
1526 ac_install_sh="$ac_aux_dir/install.sh -c"
1527 break
1528 fi
1529done
1530if test -z "$ac_aux_dir"; then
1531 { 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 +00001532fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001533ac_config_guess=$ac_aux_dir/config.guess
1534ac_config_sub=$ac_aux_dir/config.sub
1535ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1536
1537# Find a good install program. We prefer a C program (faster),
1538# so one script is as good as another. But avoid the broken or
1539# incompatible versions:
1540# SysV /etc/install, /usr/sbin/install
1541# SunOS /usr/etc/install
1542# IRIX /sbin/install
1543# AIX /bin/install
1544# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1545# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1546# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1547# ./install, which can be erroneously created by make from ./install.sh.
1548echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001549echo "configure:1550: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001550if test -z "$INSTALL"; then
1551if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1552 echo $ac_n "(cached) $ac_c" 1>&6
1553else
1554 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1555 for ac_dir in $PATH; do
1556 # Account for people who put trailing slashes in PATH elements.
1557 case "$ac_dir/" in
1558 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1559 *)
1560 # OSF1 and SCO ODT 3.0 have their own names for install.
1561 # Don't use installbsd from OSF since it installs stuff as root
1562 # by default.
1563 for ac_prog in ginstall scoinst install; do
1564 if test -f $ac_dir/$ac_prog; then
1565 if test $ac_prog = install &&
1566 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1567 # AIX install. It has an incompatible calling convention.
1568 :
1569 else
1570 ac_cv_path_install="$ac_dir/$ac_prog -c"
1571 break 2
1572 fi
1573 fi
1574 done
1575 ;;
1576 esac
1577 done
1578 IFS="$ac_save_IFS"
1579
1580fi
1581 if test "${ac_cv_path_install+set}" = set; then
1582 INSTALL="$ac_cv_path_install"
1583 else
1584 # As a last resort, use the slow shell script. We don't cache a
1585 # path for INSTALL within a source directory, because that will
1586 # break other packages using the cache if that directory is
1587 # removed, or if the path is relative.
1588 INSTALL="$ac_install_sh"
1589 fi
1590fi
1591echo "$ac_t""$INSTALL" 1>&6
1592
1593# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1594# It thinks the first close brace ends the variable substitution.
1595test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1596
1597test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1598
1599test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1600
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001601
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001602# Not every filesystem supports hard links
1603
1604if test -z "$LN" ; then
1605 case $ac_sys_system in
1606 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001607 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001608 *) LN=ln;;
1609 esac
1610fi
1611
Fred Drake109d9862001-07-11 06:27:56 +00001612# Check for --with-pydebug
1613echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001614echo "configure:1615: checking for --with-pydebug" >&5
Fred Drake109d9862001-07-11 06:27:56 +00001615# Check whether --with-pydebug or --without-pydebug was given.
1616if test "${with_pydebug+set}" = set; then
1617 withval="$with_pydebug"
1618
1619if test "$withval" != no
1620then cat >> confdefs.h <<\EOF
1621#define Py_DEBUG 1
1622EOF
1623 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1624else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
1625fi
1626else
1627 echo "$ac_t""no" 1>&6
1628fi
1629
1630
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001631# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001632
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001633if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001634then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001635 case $GCC in
1636 yes)
1637 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001638 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001639 if test "$Py_DEBUG" = 'true' ; then
1640 # Optimization messes up debuggers, so turn it off for
1641 # debug builds.
1642 OPT="-g -Wall -Wstrict-prototypes"
1643 else
1644 OPT="-g -O3 -Wall -Wstrict-prototypes"
1645 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001646 *)
Fred Drake109d9862001-07-11 06:27:56 +00001647 OPT="-O3 -Wall -Wstrict-prototypes";;
1648 esac
1649 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001650 *)
1651 case $ac_sys_system in
1652 UnixWare*)
1653 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1654 *)
1655 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001656 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001657 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00001658 case $ac_sys_system in
1659 Darwin*)
1660 OPT="$OPT -no-cpp-precomp";;
1661 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001662fi
1663
Trent Mick635f6fb2000-08-23 21:33:05 +00001664# The current (beta) Monterey compiler dies with optimizations
1665case $ac_sys_system in
1666Monterey*) OPT="";;
1667esac
1668
Guido van Rossum563e7081996-09-10 18:20:48 +00001669if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001670then
1671 OPT="$OPT $ac_arch_flags"
1672fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00001673
Guido van Rossum91922671997-10-09 20:24:13 +00001674echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001675echo "configure:1676: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001676if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001677 echo $ac_n "(cached) $ac_c" 1>&6
1678else
1679 ac_save_cc="$CC"
1680CC="$CC -OPT:Olimit=0"
1681if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001682 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00001683else
1684 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001685#line 1686 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001686#include "confdefs.h"
1687int main() { return 0; }
1688EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001689if { (eval echo configure:1690: \"$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 +00001690then
1691 ac_cv_opt_olimit_ok=yes
1692else
1693 echo "configure: failed program was:" >&5
1694 cat conftest.$ac_ext >&5
1695 rm -fr conftest*
1696 ac_cv_opt_olimit_ok=no
1697fi
1698rm -fr conftest*
1699fi
1700
1701CC="$ac_save_cc"
1702fi
1703
1704echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001705if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001706 case $ac_sys_system in
1707 Darwin*) OPT="$OPT" ;;
1708 *) OPT="$OPT -OPT:Olimit=0";;
1709 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001710else
1711 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001712echo "configure:1713: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001713 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001714 echo $ac_n "(cached) $ac_c" 1>&6
1715else
1716 ac_save_cc="$CC"
1717 CC="$CC -Olimit 1500"
1718 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001719 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001720else
1721 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001722#line 1723 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001723#include "confdefs.h"
1724int main() { return 0; }
1725EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001726if { (eval echo configure:1727: \"$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 +00001727then
1728 ac_cv_olimit_ok=yes
1729else
1730 echo "configure: failed program was:" >&5
1731 cat conftest.$ac_ext >&5
1732 rm -fr conftest*
1733 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001734fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001735rm -fr conftest*
1736fi
1737
1738 CC="$ac_save_cc"
1739fi
1740
1741 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1742 if test $ac_cv_olimit_ok = yes; then
1743 OPT="$OPT -Olimit 1500"
1744 fi
1745fi
1746
Martin v. Löwis130fb172001-07-19 11:00:41 +00001747# -Kpthread, if available, provides the right #defines
1748# and linker options to make pthread_create available
1749echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001750echo "configure:1751: checking whether $CC accepts -Kpthread" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00001751if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1752 echo $ac_n "(cached) $ac_c" 1>&6
1753else
1754 ac_save_cc="$CC"
1755CC="$CC -Kpthread"
1756cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001757#line 1758 "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00001758#include "confdefs.h"
1759#include <pthread.h>
1760int main() {
1761pthread_create(0,0,0,0)
1762; return 0; }
1763EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001764if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001765 rm -rf conftest*
1766 ac_cv_kpthread=yes
1767else
1768 echo "configure: failed program was:" >&5
1769 cat conftest.$ac_ext >&5
1770 rm -rf conftest*
1771 ac_cv_kpthread=no
1772fi
1773rm -f conftest*
1774CC="$ac_save_cc"
1775fi
1776
1777
1778# GCC does not reject -Kpthread as an illegal option, it merely complains that
1779# it is unrecognized
1780if test "$GCC" = "yes"
1781then ac_cv_kpthread="no, we have gcc"
1782fi
1783echo "$ac_t""$ac_cv_kpthread" 1>&6
1784
Guido van Rossum84e7b241996-08-19 21:59:00 +00001785
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001786# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001787echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001788echo "configure:1789: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001789if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001790 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001791else
1792 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001793#line 1794 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001794#include "confdefs.h"
1795#include <stdlib.h>
1796#include <stdarg.h>
1797#include <string.h>
1798#include <float.h>
1799EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001800ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen127e56e2001-09-11 14:41:54 +00001801{ (eval echo configure:1802: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001802ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001803if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001804 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805 ac_cv_header_stdc=yes
1806else
1807 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001808 echo "configure: failed program was:" >&5
1809 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001810 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001811 ac_cv_header_stdc=no
1812fi
1813rm -f conftest*
1814
1815if test $ac_cv_header_stdc = yes; then
1816 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1817cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001818#line 1819 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001819#include "confdefs.h"
1820#include <string.h>
1821EOF
1822if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1823 egrep "memchr" >/dev/null 2>&1; then
1824 :
1825else
1826 rm -rf conftest*
1827 ac_cv_header_stdc=no
1828fi
1829rm -f conftest*
1830
1831fi
1832
1833if test $ac_cv_header_stdc = yes; then
1834 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1835cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001836#line 1837 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001837#include "confdefs.h"
1838#include <stdlib.h>
1839EOF
1840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1841 egrep "free" >/dev/null 2>&1; then
1842 :
1843else
1844 rm -rf conftest*
1845 ac_cv_header_stdc=no
1846fi
1847rm -f conftest*
1848
1849fi
1850
1851if test $ac_cv_header_stdc = yes; then
1852 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1853if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001854 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001855else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001856 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001857#line 1858 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001858#include "confdefs.h"
1859#include <ctype.h>
1860#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1861#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001862#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001863int main () { int i; for (i = 0; i < 256; i++)
1864if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1865exit (0); }
1866
1867EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001868if { (eval echo configure:1869: \"$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 +00001869then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001870 :
1871else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001872 echo "configure: failed program was:" >&5
1873 cat conftest.$ac_ext >&5
1874 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001875 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001876fi
1877rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001878fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001879
1880fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001881fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001882
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001883echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001884if test $ac_cv_header_stdc = yes; then
1885 cat >> confdefs.h <<\EOF
1886#define STDC_HEADERS 1
1887EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001888
1889fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001890
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001891for ac_hdr in dlfcn.h fcntl.h limits.h langinfo.h locale.h \
1892ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00001893signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00001894sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00001895sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001896sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00001897ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001898do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001899ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001900echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001901echo "configure:1902: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001902if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001903 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001904else
1905 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001906#line 1907 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001907#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001908#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001909EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001910ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen127e56e2001-09-11 14:41:54 +00001911{ (eval echo configure:1912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001912ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001913if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001914 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001915 eval "ac_cv_header_$ac_safe=yes"
1916else
1917 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001918 echo "configure: failed program was:" >&5
1919 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001920 rm -rf conftest*
1921 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001922fi
1923rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001924fi
1925if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001926 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001927 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001928 cat >> confdefs.h <<EOF
1929#define $ac_tr_hdr 1
1930EOF
1931
1932else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001933 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001934fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001935done
1936
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001937ac_header_dirent=no
1938for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1939do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001940ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001941echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001942echo "configure:1943: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001943if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001944 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001945else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001946 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001947#line 1948 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001948#include "confdefs.h"
1949#include <sys/types.h>
1950#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001951int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001952DIR *dirp = 0;
1953; return 0; }
1954EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001955if { (eval echo configure:1956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001956 rm -rf conftest*
1957 eval "ac_cv_header_dirent_$ac_safe=yes"
1958else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001959 echo "configure: failed program was:" >&5
1960 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001961 rm -rf conftest*
1962 eval "ac_cv_header_dirent_$ac_safe=no"
1963fi
1964rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001965fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001966if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001967 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001968 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001969 cat >> confdefs.h <<EOF
1970#define $ac_tr_hdr 1
1971EOF
1972 ac_header_dirent=$ac_hdr; break
1973else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001974 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001975fi
1976done
1977# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1978if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001979echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001980echo "configure:1981: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001981ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001982if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+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 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001986LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001987cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001988#line 1989 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001989#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001990/* Override any gcc2 internal prototype to avoid an error. */
1991/* We use char because int might match the return type of a gcc2
1992 builtin and then its argument prototype would still apply. */
1993char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001994
Guido van Rossumf78abae1997-01-21 22:02:36 +00001995int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001996opendir()
1997; return 0; }
1998EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001999if { (eval echo configure:2000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002000 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002001 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002002else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002003 echo "configure: failed program was:" >&5
2004 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002005 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002006 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002007fi
2008rm -f conftest*
2009LIBS="$ac_save_LIBS"
2010
2011fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002012if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002013 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002014 LIBS="$LIBS -ldir"
2015else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002016 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002017fi
2018
2019else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002020echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002021echo "configure:2022: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002022ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002023if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002024 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002025else
2026 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002027LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002028cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002029#line 2030 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002030#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002031/* Override any gcc2 internal prototype to avoid an error. */
2032/* We use char because int might match the return type of a gcc2
2033 builtin and then its argument prototype would still apply. */
2034char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002035
Guido van Rossumf78abae1997-01-21 22:02:36 +00002036int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002037opendir()
2038; return 0; }
2039EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002040if { (eval echo configure:2041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002041 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002042 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002043else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002044 echo "configure: failed program was:" >&5
2045 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002046 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002047 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002048fi
2049rm -f conftest*
2050LIBS="$ac_save_LIBS"
2051
2052fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002053if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002054 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002055 LIBS="$LIBS -lx"
2056else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002057 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002058fi
2059
2060fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002061
2062
2063# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002064was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002065echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002066echo "configure:2067: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002067cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002068#line 2069 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002069#include "confdefs.h"
2070#include <time.h>
2071EOF
2072if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2073 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002074 rm -rf conftest*
2075 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002076else
2077 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002078 cat >> confdefs.h <<\EOF
2079#define clock_t long
2080EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002081
2082fi
2083rm -f conftest*
2084
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002085echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002086
Guido van Rossum810cc512001-09-09 23:51:39 +00002087# Two defines needed to enable largefile support on various platforms
2088# These may affect some typedefs
2089cat >> confdefs.h <<\EOF
2090#define _LARGEFILE_SOURCE 1
2091EOF
2092
2093cat >> confdefs.h <<\EOF
2094#define _FILE_OFFSET_BITS 64
2095EOF
2096
2097
Guido van Rossum84e7b241996-08-19 21:59:00 +00002098# Add some code to confdefs.h so that the test for off_t works on SCO
2099cat >> confdefs.h <<\EOF
2100#if defined(SCO_DS)
2101#undef _OFF_T
2102#endif
2103EOF
2104
Guido van Rossumef2255b2000-03-10 22:30:29 +00002105# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002106echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002107echo "configure:2108: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002108if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002109 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002110else
2111 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002112#line 2113 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002113#include "confdefs.h"
2114#include <sys/types.h>
2115#if STDC_HEADERS
2116#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002117#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002118#endif
2119EOF
2120if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002121 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 +00002122 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002123 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002124else
2125 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002126 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002127fi
2128rm -f conftest*
2129
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002130fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002131echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2132if test $ac_cv_type_mode_t = no; then
2133 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002134#define mode_t int
2135EOF
2136
2137fi
2138
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002139echo $ac_n "checking for off_t""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002140echo "configure:2141: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002141if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002142 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002143else
2144 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002145#line 2146 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002146#include "confdefs.h"
2147#include <sys/types.h>
2148#if STDC_HEADERS
2149#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002150#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002151#endif
2152EOF
2153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002154 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 +00002155 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002156 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002157else
2158 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002159 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002160fi
2161rm -f conftest*
2162
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002163fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002164echo "$ac_t""$ac_cv_type_off_t" 1>&6
2165if test $ac_cv_type_off_t = no; then
2166 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002167#define off_t long
2168EOF
2169
2170fi
2171
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002172echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002173echo "configure:2174: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002174if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002175 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002176else
2177 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002178#line 2179 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002179#include "confdefs.h"
2180#include <sys/types.h>
2181#if STDC_HEADERS
2182#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002183#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002184#endif
2185EOF
2186if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002187 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 +00002188 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002189 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002190else
2191 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002192 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002193fi
2194rm -f conftest*
2195
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002196fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002197echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2198if test $ac_cv_type_pid_t = no; then
2199 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002200#define pid_t int
2201EOF
2202
2203fi
2204
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002205echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002206echo "configure:2207: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002207if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002208 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002209else
2210 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002211#line 2212 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002212#include "confdefs.h"
2213#include <sys/types.h>
2214#include <signal.h>
2215#ifdef signal
2216#undef signal
2217#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002218#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002219extern "C" void (*signal (int, void (*)(int)))(int);
2220#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002221void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002222#endif
2223
Guido van Rossumf78abae1997-01-21 22:02:36 +00002224int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002225int i;
2226; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002227EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002228if { (eval echo configure:2229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002229 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002230 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002231else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002232 echo "configure: failed program was:" >&5
2233 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002234 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002235 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002236fi
2237rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002238fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002239
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002240echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002241cat >> confdefs.h <<EOF
2242#define RETSIGTYPE $ac_cv_type_signal
2243EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002244
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002245
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002246echo $ac_n "checking for size_t""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002247echo "configure:2248: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002248if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002249 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002250else
2251 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002252#line 2253 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002253#include "confdefs.h"
2254#include <sys/types.h>
2255#if STDC_HEADERS
2256#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002257#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002258#endif
2259EOF
2260if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002261 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 +00002262 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002263 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002264else
2265 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002266 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002267fi
2268rm -f conftest*
2269
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002270fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002271echo "$ac_t""$ac_cv_type_size_t" 1>&6
2272if test $ac_cv_type_size_t = no; then
2273 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002274#define size_t unsigned
2275EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002276
2277fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002278
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002279echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002280echo "configure:2281: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002281if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002282 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002283else
2284 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002285#line 2286 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002286#include "confdefs.h"
2287#include <sys/types.h>
2288EOF
2289if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2290 egrep "uid_t" >/dev/null 2>&1; then
2291 rm -rf conftest*
2292 ac_cv_type_uid_t=yes
2293else
2294 rm -rf conftest*
2295 ac_cv_type_uid_t=no
2296fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002297rm -f conftest*
2298
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002299fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002300
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002301echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002302if test $ac_cv_type_uid_t = no; then
2303 cat >> confdefs.h <<\EOF
2304#define uid_t int
2305EOF
2306
2307 cat >> confdefs.h <<\EOF
2308#define gid_t int
2309EOF
2310
2311fi
2312
Guido van Rossum627b2d71993-12-24 10:39:16 +00002313
Guido van Rossumef2255b2000-03-10 22:30:29 +00002314# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002315echo $ac_n "checking size of int""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002316echo "configure:2317: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002317if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002318 echo $ac_n "(cached) $ac_c" 1>&6
2319else
2320 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002321 ac_cv_sizeof_int=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002322else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002323 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002324#line 2325 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002325#include "confdefs.h"
2326#include <stdio.h>
2327main()
2328{
2329 FILE *f=fopen("conftestval", "w");
2330 if (!f) exit(1);
2331 fprintf(f, "%d\n", sizeof(int));
2332 exit(0);
2333}
2334EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002335if { (eval echo configure:2336: \"$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 +00002336then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002337 ac_cv_sizeof_int=`cat conftestval`
2338else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002339 echo "configure: failed program was:" >&5
2340 cat conftest.$ac_ext >&5
2341 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002342 ac_cv_sizeof_int=0
2343fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002344rm -fr conftest*
2345fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002346
2347fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002348echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2349cat >> confdefs.h <<EOF
2350#define SIZEOF_INT $ac_cv_sizeof_int
2351EOF
2352
2353
2354echo $ac_n "checking size of long""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002355echo "configure:2356: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002356if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002357 echo $ac_n "(cached) $ac_c" 1>&6
2358else
2359 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002360 ac_cv_sizeof_long=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002361else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002362 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002363#line 2364 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002364#include "confdefs.h"
2365#include <stdio.h>
2366main()
2367{
2368 FILE *f=fopen("conftestval", "w");
2369 if (!f) exit(1);
2370 fprintf(f, "%d\n", sizeof(long));
2371 exit(0);
2372}
2373EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002374if { (eval echo configure:2375: \"$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 +00002375then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002376 ac_cv_sizeof_long=`cat conftestval`
2377else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002378 echo "configure: failed program was:" >&5
2379 cat conftest.$ac_ext >&5
2380 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002381 ac_cv_sizeof_long=0
2382fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002383rm -fr conftest*
2384fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002385
2386fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002387echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2388cat >> confdefs.h <<EOF
2389#define SIZEOF_LONG $ac_cv_sizeof_long
2390EOF
2391
2392
Guido van Rossumad678af1998-10-02 14:42:15 +00002393echo $ac_n "checking size of void *""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002394echo "configure:2395: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002395if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002396 echo $ac_n "(cached) $ac_c" 1>&6
2397else
2398 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002399 ac_cv_sizeof_void_p=4
Guido van Rossumad678af1998-10-02 14:42:15 +00002400else
2401 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002402#line 2403 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002403#include "confdefs.h"
2404#include <stdio.h>
2405main()
2406{
2407 FILE *f=fopen("conftestval", "w");
2408 if (!f) exit(1);
2409 fprintf(f, "%d\n", sizeof(void *));
2410 exit(0);
2411}
2412EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002413if { (eval echo configure:2414: \"$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 +00002414then
2415 ac_cv_sizeof_void_p=`cat conftestval`
2416else
2417 echo "configure: failed program was:" >&5
2418 cat conftest.$ac_ext >&5
2419 rm -fr conftest*
2420 ac_cv_sizeof_void_p=0
2421fi
2422rm -fr conftest*
2423fi
2424
2425fi
2426echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2427cat >> confdefs.h <<EOF
2428#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2429EOF
2430
2431
Guido van Rossumef2255b2000-03-10 22:30:29 +00002432echo $ac_n "checking size of char""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002433echo "configure:2434: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002434if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002435 echo $ac_n "(cached) $ac_c" 1>&6
2436else
2437 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002438 ac_cv_sizeof_char=1
Guido van Rossumef2255b2000-03-10 22:30:29 +00002439else
2440 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002441#line 2442 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002442#include "confdefs.h"
2443#include <stdio.h>
2444main()
2445{
2446 FILE *f=fopen("conftestval", "w");
2447 if (!f) exit(1);
2448 fprintf(f, "%d\n", sizeof(char));
2449 exit(0);
2450}
2451EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002452if { (eval echo configure:2453: \"$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 +00002453then
2454 ac_cv_sizeof_char=`cat conftestval`
2455else
2456 echo "configure: failed program was:" >&5
2457 cat conftest.$ac_ext >&5
2458 rm -fr conftest*
2459 ac_cv_sizeof_char=0
2460fi
2461rm -fr conftest*
2462fi
2463
2464fi
2465echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2466cat >> confdefs.h <<EOF
2467#define SIZEOF_CHAR $ac_cv_sizeof_char
2468EOF
2469
2470
2471echo $ac_n "checking size of short""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002472echo "configure:2473: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002473if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002474 echo $ac_n "(cached) $ac_c" 1>&6
2475else
2476 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002477 ac_cv_sizeof_short=2
Guido van Rossumef2255b2000-03-10 22:30:29 +00002478else
2479 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002480#line 2481 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002481#include "confdefs.h"
2482#include <stdio.h>
2483main()
2484{
2485 FILE *f=fopen("conftestval", "w");
2486 if (!f) exit(1);
2487 fprintf(f, "%d\n", sizeof(short));
2488 exit(0);
2489}
2490EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002491if { (eval echo configure:2492: \"$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 +00002492then
2493 ac_cv_sizeof_short=`cat conftestval`
2494else
2495 echo "configure: failed program was:" >&5
2496 cat conftest.$ac_ext >&5
2497 rm -fr conftest*
2498 ac_cv_sizeof_short=0
2499fi
2500rm -fr conftest*
2501fi
2502
2503fi
2504echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2505cat >> confdefs.h <<EOF
2506#define SIZEOF_SHORT $ac_cv_sizeof_short
2507EOF
2508
2509
2510echo $ac_n "checking size of float""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002511echo "configure:2512: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002512if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002513 echo $ac_n "(cached) $ac_c" 1>&6
2514else
2515 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002516 ac_cv_sizeof_float=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00002517else
2518 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002519#line 2520 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002520#include "confdefs.h"
2521#include <stdio.h>
2522main()
2523{
2524 FILE *f=fopen("conftestval", "w");
2525 if (!f) exit(1);
2526 fprintf(f, "%d\n", sizeof(float));
2527 exit(0);
2528}
2529EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002530if { (eval echo configure:2531: \"$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 +00002531then
2532 ac_cv_sizeof_float=`cat conftestval`
2533else
2534 echo "configure: failed program was:" >&5
2535 cat conftest.$ac_ext >&5
2536 rm -fr conftest*
2537 ac_cv_sizeof_float=0
2538fi
2539rm -fr conftest*
2540fi
2541
2542fi
2543echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2544cat >> confdefs.h <<EOF
2545#define SIZEOF_FLOAT $ac_cv_sizeof_float
2546EOF
2547
2548
2549echo $ac_n "checking size of double""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002550echo "configure:2551: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002551if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002552 echo $ac_n "(cached) $ac_c" 1>&6
2553else
2554 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002555 ac_cv_sizeof_double=8
Guido van Rossumef2255b2000-03-10 22:30:29 +00002556else
2557 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002558#line 2559 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002559#include "confdefs.h"
2560#include <stdio.h>
2561main()
2562{
2563 FILE *f=fopen("conftestval", "w");
2564 if (!f) exit(1);
2565 fprintf(f, "%d\n", sizeof(double));
2566 exit(0);
2567}
2568EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002569if { (eval echo configure:2570: \"$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 +00002570then
2571 ac_cv_sizeof_double=`cat conftestval`
2572else
2573 echo "configure: failed program was:" >&5
2574 cat conftest.$ac_ext >&5
2575 rm -fr conftest*
2576 ac_cv_sizeof_double=0
2577fi
2578rm -fr conftest*
2579fi
2580
2581fi
2582echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2583cat >> confdefs.h <<EOF
2584#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2585EOF
2586
2587
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002588echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002589echo "configure:2590: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002590if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002591 echo $ac_n "(cached) $ac_c" 1>&6
2592else
2593 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002594 ac_cv_sizeof_fpos_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002595else
2596 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002597#line 2598 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002598#include "confdefs.h"
2599#include <stdio.h>
2600main()
2601{
2602 FILE *f=fopen("conftestval", "w");
2603 if (!f) exit(1);
2604 fprintf(f, "%d\n", sizeof(fpos_t));
2605 exit(0);
2606}
2607EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002608if { (eval echo configure:2609: \"$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 +00002609then
2610 ac_cv_sizeof_fpos_t=`cat conftestval`
2611else
2612 echo "configure: failed program was:" >&5
2613 cat conftest.$ac_ext >&5
2614 rm -fr conftest*
2615 ac_cv_sizeof_fpos_t=0
2616fi
2617rm -fr conftest*
2618fi
2619
2620fi
2621echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2622cat >> confdefs.h <<EOF
2623#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2624EOF
2625
2626
Guido van Rossum0a516c91994-09-12 10:58:40 +00002627
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002628echo $ac_n "checking for long long support""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002629echo "configure:2630: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002630have_long_long=no
2631cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002632#line 2633 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002633#include "confdefs.h"
2634
2635int main() {
2636long long x; x = (long long)0;
2637; return 0; }
2638EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002639if { (eval echo configure:2640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002640 rm -rf conftest*
2641 cat >> confdefs.h <<\EOF
2642#define HAVE_LONG_LONG 1
2643EOF
2644 have_long_long=yes
2645else
2646 echo "configure: failed program was:" >&5
2647 cat conftest.$ac_ext >&5
2648fi
2649rm -f conftest*
2650echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002651if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002652echo $ac_n "checking size of long long""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002653echo "configure:2654: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002654if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002655 echo $ac_n "(cached) $ac_c" 1>&6
2656else
2657 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002658 ac_cv_sizeof_long_long=8
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002659else
2660 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002661#line 2662 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002662#include "confdefs.h"
2663#include <stdio.h>
2664main()
2665{
2666 FILE *f=fopen("conftestval", "w");
2667 if (!f) exit(1);
2668 fprintf(f, "%d\n", sizeof(long long));
2669 exit(0);
2670}
2671EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002672if { (eval echo configure:2673: \"$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 +00002673then
2674 ac_cv_sizeof_long_long=`cat conftestval`
2675else
2676 echo "configure: failed program was:" >&5
2677 cat conftest.$ac_ext >&5
2678 rm -fr conftest*
2679 ac_cv_sizeof_long_long=0
2680fi
2681rm -fr conftest*
2682fi
2683
2684fi
2685echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2686cat >> confdefs.h <<EOF
2687#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2688EOF
2689
2690
2691fi
2692
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002693echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002694echo "configure:2695: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002695have_uintptr_t=no
2696cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002697#line 2698 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002698#include "confdefs.h"
2699
2700int main() {
2701uintptr_t x; x = (uintptr_t)0;
2702; return 0; }
2703EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002704if { (eval echo configure:2705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002705 rm -rf conftest*
2706 cat >> confdefs.h <<\EOF
2707#define HAVE_UINTPTR_T 1
2708EOF
2709 have_uintptr_t=yes
2710else
2711 echo "configure: failed program was:" >&5
2712 cat conftest.$ac_ext >&5
2713fi
2714rm -f conftest*
2715echo "$ac_t""$have_uintptr_t" 1>&6
2716if test "$have_uintptr_t" = yes ; then
2717echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002718echo "configure:2719: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002719if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002720 echo $ac_n "(cached) $ac_c" 1>&6
2721else
2722 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002723 ac_cv_sizeof_uintptr_t=4
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002724else
2725 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002726#line 2727 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002727#include "confdefs.h"
2728#include <stdio.h>
2729main()
2730{
2731 FILE *f=fopen("conftestval", "w");
2732 if (!f) exit(1);
2733 fprintf(f, "%d\n", sizeof(uintptr_t));
2734 exit(0);
2735}
2736EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002737if { (eval echo configure:2738: \"$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 +00002738then
2739 ac_cv_sizeof_uintptr_t=`cat conftestval`
2740else
2741 echo "configure: failed program was:" >&5
2742 cat conftest.$ac_ext >&5
2743 rm -fr conftest*
2744 ac_cv_sizeof_uintptr_t=0
2745fi
2746rm -fr conftest*
2747fi
2748
2749fi
2750echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2751cat >> confdefs.h <<EOF
2752#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2753EOF
2754
2755
2756fi
2757
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002758# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2759echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002760echo "configure:2761: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002761if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002762 echo $ac_n "(cached) $ac_c" 1>&6
2763else
2764 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002765 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002766else
2767 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002768#line 2769 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002769#include "confdefs.h"
2770#include <stdio.h>
2771#include <sys/types.h>
2772main()
2773{
2774 FILE *f=fopen("conftestval", "w");
2775 if (!f) exit(1);
2776 fprintf(f, "%d\n", sizeof(off_t));
2777 exit(0);
2778}
2779EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002780if { (eval echo configure:2781: \"$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 +00002781then
2782 ac_cv_sizeof_off_t=`cat conftestval`
2783else
2784 echo "configure: failed program was:" >&5
2785 cat conftest.$ac_ext >&5
2786 rm -fr conftest*
2787 ac_cv_sizeof_off_t=0
2788fi
2789rm -fr conftest*
2790fi
2791
2792
2793fi
2794
2795echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2796cat >> confdefs.h <<EOF
2797#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2798EOF
2799
2800
2801echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002802echo "configure:2803: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002803if test "$have_long_long" = yes -a \
2804 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2805 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002806 cat >> confdefs.h <<\EOF
2807#define HAVE_LARGEFILE_SUPPORT 1
2808EOF
2809
2810 echo "$ac_t""yes" 1>&6
2811else
2812 echo "$ac_t""no" 1>&6
2813fi
2814
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002815# AC_CHECK_SIZEOF() doesn't include <time.h>.
2816echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002817echo "configure:2818: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002818if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002819 echo $ac_n "(cached) $ac_c" 1>&6
2820else
2821 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002822 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002823else
2824 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002825#line 2826 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002826#include "confdefs.h"
2827#include <stdio.h>
2828#include <time.h>
2829main()
2830{
2831 FILE *f=fopen("conftestval", "w");
2832 if (!f) exit(1);
2833 fprintf(f, "%d\n", sizeof(time_t));
2834 exit(0);
2835}
2836EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002837if { (eval echo configure:2838: \"$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 +00002838then
2839 ac_cv_sizeof_time_t=`cat conftestval`
2840else
2841 echo "configure: failed program was:" >&5
2842 cat conftest.$ac_ext >&5
2843 rm -fr conftest*
2844 ac_cv_sizeof_time_t=0
2845fi
2846rm -fr conftest*
2847fi
2848
2849
2850fi
2851
2852echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2853cat >> confdefs.h <<EOF
2854#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2855EOF
2856
2857
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002858
Trent Mick635f6fb2000-08-23 21:33:05 +00002859# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002860ac_save_cc="$CC"
2861if test "$ac_cv_kpthread" = "yes"
2862then CC="$CC -Kpthread"
2863fi
Trent Mick635f6fb2000-08-23 21:33:05 +00002864echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002865echo "configure:2866: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002866have_pthread_t=no
2867cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002868#line 2869 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002869#include "confdefs.h"
2870#include <pthread.h>
2871int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002872pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002873; return 0; }
2874EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002875if { (eval echo configure:2876: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002876 rm -rf conftest*
2877 have_pthread_t=yes
2878else
2879 echo "configure: failed program was:" >&5
2880 cat conftest.$ac_ext >&5
2881fi
2882rm -f conftest*
2883echo "$ac_t""$have_pthread_t" 1>&6
2884if test "$have_pthread_t" = yes ; then
2885 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2886 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002887echo "configure:2888: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002888 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002889 echo $ac_n "(cached) $ac_c" 1>&6
2890else
2891 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002892 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00002893else
2894 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002895#line 2896 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002896#include "confdefs.h"
2897#include <stdio.h>
2898 #include <pthread.h>
2899 main()
2900 {
2901 FILE *f=fopen("conftestval", "w");
2902 if (!f) exit(1);
2903 fprintf(f, "%d\n", sizeof(pthread_t));
2904 exit(0);
2905 }
2906EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00002907if { (eval echo configure:2908: \"$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 +00002908then
2909 ac_cv_sizeof_pthread_t=`cat conftestval`
2910else
2911 echo "configure: failed program was:" >&5
2912 cat conftest.$ac_ext >&5
2913 rm -fr conftest*
2914 ac_cv_sizeof_pthread_t=0
2915fi
2916rm -fr conftest*
2917fi
2918
2919
2920fi
2921
2922 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2923 cat >> confdefs.h <<EOF
2924#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2925EOF
2926
2927fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002928CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00002929
Jack Jansene578a632001-08-15 01:27:14 +00002930echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002931echo "configure:2932: checking for --enable-toolbox-glue" >&5
Jack Jansene578a632001-08-15 01:27:14 +00002932# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
2933if test "${enable_toolbox_glue+set}" = set; then
2934 enableval="$enable_toolbox_glue"
2935 :
2936fi
2937
2938
2939if test -z "$enable_toolbox_glue"
2940then
2941 case $ac_sys_system/$ac_sys_release in
2942 Darwin/*)
2943 enable_toolbox_glue="yes";;
2944 *)
2945 enable_toolbox_glue="no";;
2946 esac
2947fi
2948case "$enable_toolbox_glue" in
2949yes)
2950 extra_frameworks="-framework Carbon -framework Foundation"
2951 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00002952 extra_undefs="-u __dummy -u _PyMac_Error"
Jack Jansene578a632001-08-15 01:27:14 +00002953 cat >> confdefs.h <<\EOF
2954#define USE_TOOLBOX_OBJECT_GLUE 1
2955EOF
2956
2957 ;;
2958*)
2959 extra_frameworks=""
2960 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00002961 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00002962 ;;
2963esac
2964echo "$ac_t""$enable_toolbox_glue" 1>&6
2965
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002966
2967case $ac_sys_system/$ac_sys_release in
Jack Jansena3891ea2001-09-07 14:25:12 +00002968 Darwin/1.4*)
2969 ns_undef_sym='_environ'
2970 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
2971 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
2972 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
2973 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00002974 Darwin/*)
2975 ns_undef_sym='_environ'
Jack Jansene578a632001-08-15 01:27:14 +00002976 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
2977 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
2978 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
2979 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002980esac
2981
Jack Jansene578a632001-08-15 01:27:14 +00002982echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00002983echo "configure:2984: checking for --enable-framework" >&5
Jack Jansene578a632001-08-15 01:27:14 +00002984if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002985then
Jack Jansenca06bc62001-08-03 15:32:23 +00002986 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002987 # -U __environ is needed since bundles don't have access
2988 # to crt0 when built but will always be linked against it
Jack Jansene578a632001-08-15 01:27:14 +00002989 # -F. is needed to allow linking to the framework while
2990 # in the build location.
2991
Jack Jansena3891ea2001-09-07 14:25:12 +00002992 case $ac_sys_system/$ac_sys_release in
2993 Darwin/1.4*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
2994 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
2995 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002996 cat >> confdefs.h <<\EOF
2997#define WITH_NEXT_FRAMEWORK 1
2998EOF
2999
3000 echo "$ac_t""yes" 1>&6
3001else
3002 echo "$ac_t""no" 1>&6
3003fi
3004
Jack Jansene578a632001-08-15 01:27:14 +00003005echo $ac_n "checking for dyld""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003006echo "configure:3007: checking for dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003007case $ac_sys_system/$ac_sys_release in
3008 Darwin/*)
3009 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003010#define WITH_DYLD 1
3011EOF
3012
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003013 echo "$ac_t""always on for Darwin" 1>&6
3014 ;;
3015 *)
Jack Jansene578a632001-08-15 01:27:14 +00003016 echo "$ac_t""no" 1>&6
3017 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003018esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003019
Guido van Rossum0a516c91994-09-12 10:58:40 +00003020# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003021
3022
3023
3024
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003025
Guido van Rossum0a516c91994-09-12 10:58:40 +00003026# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003027# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003028echo $ac_n "checking SO""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003029echo "configure:3030: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003030if test -z "$SO"
3031then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003032 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003033 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003034 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003035 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003036 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003037fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003038echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003039# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003040# -- "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 +00003041# (Shared libraries in this instance are shared modules to be loaded into
3042# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003043echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003044echo "configure:3045: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003045if test -z "$LDSHARED"
3046then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003047 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003048 AIX*)
3049 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
3050 LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp"
3051 ;;
3052 BeOS*)
3053 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
3054 LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
3055 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003056 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003057 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003058 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00003059 SunOS/5*)
3060 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003061 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003062 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00003063 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003064 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003065 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3066 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansena3891ea2001-09-07 14:25:12 +00003067 Darwin/1.4*)
3068 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3069 if test "$enable_framework" ; then
3070 # Link against the framework. All externals should be defined.
3071 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3072 else
3073 # No framework. Ignore undefined symbols, assuming they come from Python
3074 LDSHARED="$LDSHARED -flat_namespace -undefined suppress"
3075 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00003076 Darwin/*)
3077 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3078 if test "$enable_framework" ; then
3079 # Link against the framework. All externals should be defined.
3080 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3081 else
3082 # No framework. Ignore undefined symbols, assuming they come from Python
3083 LDSHARED="$LDSHARED -undefined suppress"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003084 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00003085 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003086 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003087 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003088 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003089 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003090 then
3091 LDSHARED="cc -shared ${LDFLAGS}"
3092 else
3093 LDSHARED="ld -Bshareable ${LDFLAGS}"
3094 fi;;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003095 UnixWare*)
3096 if test "$GCC" = "yes"
3097 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003098 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003099 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003100 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003101 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003102 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003103 *) LDSHARED="ld";;
3104 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003105fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003106echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003107BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003108# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003109# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003110echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003111echo "configure:3112: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003112if test -z "$CCSHARED"
3113then
Guido van Rossum07397971997-04-29 21:49:50 +00003114 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003115 SunOS*) if test "$GCC" = yes;
3116 then CCSHARED="-fPIC";
3117 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003118 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00003119 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00003120 else CCSHARED="+z";
3121 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003122 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003123 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003124 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwisbec19582001-03-21 15:57:54 +00003125 UnixWare*)
3126 if test "$GCC" = "yes"
3127 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003128 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003129 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003130 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003131 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003132 IRIX*/6*) case $CC in
3133 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003134 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003135 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003136 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003137 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003138fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003139echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003140# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003141# the python executable -- this is only needed for a few systems
3142echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003143echo "configure:3144: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003144if test -z "$LINKFORSHARED"
3145then
Guido van Rossum07397971997-04-29 21:49:50 +00003146 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003147 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003148 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003149 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003150 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00003151 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003152 # -u libsys_s pulls in all symbols in libsys
Jack Jansene578a632001-08-15 01:27:14 +00003153 Darwin/*)
3154 # -u __dummy makes the linker aware of the objc runtime
3155 # in System.framework; otherwise, __objcInit (referenced in
3156 # crt1.o) gets erroneously defined as common, which breaks dynamic
3157 # loading of any modules which reference it in System.framework.
3158 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3159 # not used by the core itself but which needs to be in the core so
3160 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00003161 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00003162 if test "$enable_framework"
3163 then
3164 LINKFORSHARED="$LINKFORSHARED -framework Python"
3165 fi
3166 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003167 UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003168 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003169 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003170 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003171 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3172 then
3173 LINKFORSHARED="-Wl,--export-dynamic"
3174 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003175 SunOS/5*) case $CC in
3176 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003177 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003178 then
3179 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003180 fi;;
3181 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003182 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003183fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003184echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003185
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003186
3187echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003188echo "configure:3189: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003189if test ! "$LIBRARY" = "$LDLIBRARY"
3190then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003191 case $ac_sys_system in
3192 CYGWIN*)
3193 # Cygwin needs CCSHARED when building extension DLLs
3194 # but not when building the interpreter DLL.
3195 CFLAGSFORSHARED='';;
3196 *)
3197 CFLAGSFORSHARED='$(CCSHARED)'
3198 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003199fi
3200echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3201
Guido van Rossum627b2d71993-12-24 10:39:16 +00003202# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003203echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003204echo "configure:3205: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003205ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003206if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003207 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003208else
3209 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003210LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003211cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003212#line 3213 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003213#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003214/* Override any gcc2 internal prototype to avoid an error. */
3215/* We use char because int might match the return type of a gcc2
3216 builtin and then its argument prototype would still apply. */
3217char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003218
Guido van Rossumf78abae1997-01-21 22:02:36 +00003219int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003220dlopen()
3221; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003222EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003223if { (eval echo configure:3224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003224 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003225 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003226else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003227 echo "configure: failed program was:" >&5
3228 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003229 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003230 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003231fi
3232rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003233LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003234
Guido van Rossum627b2d71993-12-24 10:39:16 +00003235fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003236if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003237 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003238 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3239 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003240 cat >> confdefs.h <<EOF
3241#define $ac_tr_lib 1
3242EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003243
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003244 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003245
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003246else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003247 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003248fi
3249 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003250echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003251echo "configure:3252: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003252ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003253if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003254 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003255else
3256 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003257LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003258cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003259#line 3260 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003260#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003261/* Override any gcc2 internal prototype to avoid an error. */
3262/* We use char because int might match the return type of a gcc2
3263 builtin and then its argument prototype would still apply. */
3264char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003265
Guido van Rossumf78abae1997-01-21 22:02:36 +00003266int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003267shl_load()
3268; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003269EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003270if { (eval echo configure:3271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003271 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003272 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003273else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003274 echo "configure: failed program was:" >&5
3275 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003276 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003277 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003278fi
3279rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003280LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003281
Guido van Rossum627b2d71993-12-24 10:39:16 +00003282fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003283if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003284 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003285 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3286 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003287 cat >> confdefs.h <<EOF
3288#define $ac_tr_lib 1
3289EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003290
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003291 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003292
3293else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003294 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003295fi
3296 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003297
3298# checks for system dependent C++ extensions support
3299case "$ac_sys_system" in
3300 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003301echo "configure:3302: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003302 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003303#line 3304 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003304#include "confdefs.h"
3305#include "/usr/lpp/xlC/include/load.h"
3306int main() {
3307loadAndInit("", 0, "")
3308; return 0; }
3309EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003310if { (eval echo configure:3311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003311 rm -rf conftest*
3312 cat >> confdefs.h <<\EOF
3313#define AIX_GENUINE_CPLUSPLUS 1
3314EOF
3315
3316 echo "$ac_t""yes" 1>&6
3317else
3318 echo "configure: failed program was:" >&5
3319 cat conftest.$ac_ext >&5
3320 rm -rf conftest*
3321 echo "$ac_t""no" 1>&6
3322fi
3323rm -f conftest*;;
3324 *) ;;
3325esac
3326
Guido van Rossum70c7f481998-03-26 18:44:10 +00003327# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3328# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003329# BeOS' sockets are stashed in libnet.
3330case "$ac_sys_system" in
3331IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003332*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003333echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003334echo "configure:3335: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003335ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003336if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003337 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003338else
3339 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003340LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003341cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003342#line 3343 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003343#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003344/* Override any gcc2 internal prototype to avoid an error. */
3345/* We use char because int might match the return type of a gcc2
3346 builtin and then its argument prototype would still apply. */
3347char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003348
Guido van Rossumf78abae1997-01-21 22:02:36 +00003349int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003350t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003351; return 0; }
3352EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003353if { (eval echo configure:3354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003354 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003355 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003356else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003357 echo "configure: failed program was:" >&5
3358 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003359 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003360 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003361fi
3362rm -f conftest*
3363LIBS="$ac_save_LIBS"
3364
3365fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003366if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003367 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003368 LIBS="-lnsl $LIBS"
3369else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003370 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003371fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003372 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003373echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003374echo "configure:3375: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003375ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003376if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003377 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003378else
3379 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003380LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003381cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003382#line 3383 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003383#include "confdefs.h"
3384/* Override any gcc2 internal prototype to avoid an error. */
3385/* We use char because int might match the return type of a gcc2
3386 builtin and then its argument prototype would still apply. */
3387char socket();
3388
3389int main() {
3390socket()
3391; return 0; }
3392EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003393if { (eval echo configure:3394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003394 rm -rf conftest*
3395 eval "ac_cv_lib_$ac_lib_var=yes"
3396else
3397 echo "configure: failed program was:" >&5
3398 cat conftest.$ac_ext >&5
3399 rm -rf conftest*
3400 eval "ac_cv_lib_$ac_lib_var=no"
3401fi
3402rm -f conftest*
3403LIBS="$ac_save_LIBS"
3404
3405fi
3406if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3407 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003408 LIBS="-lsocket $LIBS"
3409else
3410 echo "$ac_t""no" 1>&6
3411fi
3412 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003413;;
3414esac
3415case "$ac_sys_system" in
3416BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003417echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003418echo "configure:3419: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003419ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003420if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003421 echo $ac_n "(cached) $ac_c" 1>&6
3422else
3423 ac_save_LIBS="$LIBS"
3424LIBS="-lnet $LIBS $LIBS"
3425cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003426#line 3427 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003427#include "confdefs.h"
3428/* Override any gcc2 internal prototype to avoid an error. */
3429/* We use char because int might match the return type of a gcc2
3430 builtin and then its argument prototype would still apply. */
3431char socket();
3432
3433int main() {
3434socket()
3435; return 0; }
3436EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003437if { (eval echo configure:3438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003438 rm -rf conftest*
3439 eval "ac_cv_lib_$ac_lib_var=yes"
3440else
3441 echo "configure: failed program was:" >&5
3442 cat conftest.$ac_ext >&5
3443 rm -rf conftest*
3444 eval "ac_cv_lib_$ac_lib_var=no"
3445fi
3446rm -f conftest*
3447LIBS="$ac_save_LIBS"
3448
3449fi
3450if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3451 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003452 LIBS="-lnet $LIBS"
3453else
3454 echo "$ac_t""no" 1>&6
3455fi
3456 # BeOS
3457;;
3458esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003459
Guido van Rossuma68acba1996-07-31 17:36:39 +00003460echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003461echo "configure:3462: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003462# Check whether --with-libs or --without-libs was given.
3463if test "${with_libs+set}" = set; then
3464 withval="$with_libs"
3465
3466echo "$ac_t""$withval" 1>&6
3467LIBS="$withval $LIBS"
3468
3469else
3470 echo "$ac_t""no" 1>&6
3471fi
3472
Guido van Rossum7f43da71994-08-01 12:15:30 +00003473
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003474# Determine if signalmodule should be used.
3475
3476
3477echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003478echo "configure:3479: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003479# Check whether --with-signal-module or --without-signal-module was given.
3480if test "${with_signal_module+set}" = set; then
3481 withval="$with_signal_module"
3482 :
3483fi
3484
3485
3486if test -z "$with_signal_module"
3487then with_signal_module="yes"
3488fi
3489echo "$ac_t""$with_signal_module" 1>&6
3490
3491if test "${with_signal_module}" = "yes"; then
3492 USE_SIGNAL_MODULE=""
3493 SIGNAL_OBJS=""
3494else
3495 USE_SIGNAL_MODULE="#"
3496 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3497fi
3498
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003499# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003500
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003501USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003502
Guido van Rossumec2f0731997-01-22 20:54:01 +00003503echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003504echo "configure:3505: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003505
3506# Check whether --with-dec-threads or --without-dec-threads was given.
3507if test "${with_dec_threads+set}" = set; then
3508 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003509
3510echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003511LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003512if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003513 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003514fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003515else
3516 echo "$ac_t""no" 1>&6
3517fi
3518
3519
3520echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003521echo "configure:3522: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003522# Check whether --with-threads or --without-threads was given.
3523if test "${with_threads+set}" = set; then
3524 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003525 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003526fi
3527
3528
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003529# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003530# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003531if test "${with_thread+set}" = set; then
3532 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003533
3534with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003535fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003536
3537
3538if test -z "$with_threads"
3539then with_threads="yes"
3540fi
3541echo "$ac_t""$with_threads" 1>&6
3542
3543if test "$with_threads" = "no"
3544then
3545 USE_THREAD_MODULE="#"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003546elif test "$ac_cv_kpthread" = "yes"
3547then
3548 CC="$CC -Kpthread"
3549 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003550#define WITH_THREAD 1
3551EOF
3552
Martin v. Löwis130fb172001-07-19 11:00:41 +00003553 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003554#define _POSIX_THREADS 1
3555EOF
3556
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003557 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003558 LIBOBJS="$LIBOBJS thread.o"
3559else
3560 if test ! -z "$with_threads" -a -d "$with_threads"
3561 then LDFLAGS="$LDFLAGS -L$with_threads"
3562 fi
3563 if test ! -z "$withval" -a -d "$withval"
3564 then LDFLAGS="$LDFLAGS -L$withval"
3565 fi
3566 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003567#define _REENTRANT 1
3568EOF
3569
Martin v. Löwis130fb172001-07-19 11:00:41 +00003570 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003571echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003572echo "configure:3573: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003573if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003574 echo $ac_n "(cached) $ac_c" 1>&6
3575else
3576 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003577#line 3578 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003578#include "confdefs.h"
3579#include <mach/cthreads.h>
3580EOF
3581ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen127e56e2001-09-11 14:41:54 +00003582{ (eval echo configure:3583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003583ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003584if test -z "$ac_err"; then
3585 rm -rf conftest*
3586 eval "ac_cv_header_$ac_safe=yes"
3587else
3588 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003589 echo "configure: failed program was:" >&5
3590 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003591 rm -rf conftest*
3592 eval "ac_cv_header_$ac_safe=no"
3593fi
3594rm -f conftest*
3595fi
3596if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3597 echo "$ac_t""yes" 1>&6
3598 cat >> confdefs.h <<\EOF
3599#define WITH_THREAD 1
3600EOF
3601
Martin v. Löwis130fb172001-07-19 11:00:41 +00003602 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003603#define C_THREADS 1
3604EOF
3605
Martin v. Löwis130fb172001-07-19 11:00:41 +00003606 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003607else
3608 echo "$ac_t""no" 1>&6
3609
Martin v. Löwis130fb172001-07-19 11:00:41 +00003610 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003611echo "configure:3612: checking for --with-pth" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00003612 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003613if test "${with_pth+set}" = set; then
3614 withval="$with_pth"
3615
Martin v. Löwis130fb172001-07-19 11:00:41 +00003616 echo "$ac_t""$withval" 1>&6
3617 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003618#define WITH_THREAD 1
3619EOF
3620
Martin v. Löwis130fb172001-07-19 11:00:41 +00003621 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003622#define HAVE_PTH 1
3623EOF
3624
Martin v. Löwis130fb172001-07-19 11:00:41 +00003625 LIBS="-lpth $LIBS"
3626 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003627else
3628
Martin v. Löwis130fb172001-07-19 11:00:41 +00003629 echo "$ac_t""no" 1>&6
3630 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003631echo "configure:3632: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003632ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003633if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003634 echo $ac_n "(cached) $ac_c" 1>&6
3635else
3636 ac_save_LIBS="$LIBS"
3637LIBS="-lpthread $LIBS"
3638cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003639#line 3640 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003640#include "confdefs.h"
3641/* Override any gcc2 internal prototype to avoid an error. */
3642/* We use char because int might match the return type of a gcc2
3643 builtin and then its argument prototype would still apply. */
3644char pthread_create();
3645
3646int main() {
3647pthread_create()
3648; return 0; }
3649EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003650if { (eval echo configure:3651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003651 rm -rf conftest*
3652 eval "ac_cv_lib_$ac_lib_var=yes"
3653else
3654 echo "configure: failed program was:" >&5
3655 cat conftest.$ac_ext >&5
3656 rm -rf conftest*
3657 eval "ac_cv_lib_$ac_lib_var=no"
3658fi
3659rm -f conftest*
3660LIBS="$ac_save_LIBS"
3661
3662fi
3663if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3664 echo "$ac_t""yes" 1>&6
3665 cat >> confdefs.h <<\EOF
3666#define WITH_THREAD 1
3667EOF
3668
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003669 case $ac_sys_system in
3670 Darwin*) ;;
3671 *) cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003672#define _POSIX_THREADS 1
3673EOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003674
3675 posix_threads=yes
3676 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003677 esac
Martin v. Löwis130fb172001-07-19 11:00:41 +00003678 LIBS="-lpthread $LIBS"
3679 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003680else
3681 echo "$ac_t""no" 1>&6
3682
Martin v. Löwis130fb172001-07-19 11:00:41 +00003683 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003684echo "configure:3685: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003685if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003686 echo $ac_n "(cached) $ac_c" 1>&6
3687else
3688 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003689#line 3690 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003690#include "confdefs.h"
3691/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003692 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003693#include <assert.h>
3694/* Override any gcc2 internal prototype to avoid an error. */
3695/* We use char because int might match the return type of a gcc2
3696 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003697char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003698
3699int main() {
3700
3701/* The GNU C library defines this for functions which it implements
3702 to always fail with ENOSYS. Some functions are actually named
3703 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003704#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003705choke me
3706#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003707pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003708#endif
3709
3710; return 0; }
3711EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003712if { (eval echo configure:3713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003713 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003714 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003715else
3716 echo "configure: failed program was:" >&5
3717 cat conftest.$ac_ext >&5
3718 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003719 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003720fi
3721rm -f conftest*
3722fi
3723
Guido van Rossumea516321998-12-17 18:08:55 +00003724if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003725 echo "$ac_t""yes" 1>&6
3726 cat >> confdefs.h <<\EOF
3727#define WITH_THREAD 1
3728EOF
3729
Martin v. Löwis130fb172001-07-19 11:00:41 +00003730 case $ac_sys_system in
3731 Darwin*) ;;
3732 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003733#define _POSIX_THREADS 1
3734EOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003735
3736 posix_threads=yes
3737 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003738 esac
3739 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003740else
3741 echo "$ac_t""no" 1>&6
3742
Martin v. Löwis130fb172001-07-19 11:00:41 +00003743 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003744echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003745echo "configure:3746: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003746if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003747 echo $ac_n "(cached) $ac_c" 1>&6
3748else
3749 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003750#line 3751 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003751#include "confdefs.h"
3752#include <kernel/OS.h>
3753EOF
3754ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen127e56e2001-09-11 14:41:54 +00003755{ (eval echo configure:3756: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003756ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003757if test -z "$ac_err"; then
3758 rm -rf conftest*
3759 eval "ac_cv_header_$ac_safe=yes"
3760else
3761 echo "$ac_err" >&5
3762 echo "configure: failed program was:" >&5
3763 cat conftest.$ac_ext >&5
3764 rm -rf conftest*
3765 eval "ac_cv_header_$ac_safe=no"
3766fi
3767rm -f conftest*
3768fi
3769if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3770 echo "$ac_t""yes" 1>&6
3771 cat >> confdefs.h <<\EOF
3772#define WITH_THREAD 1
3773EOF
3774
Martin v. Löwis130fb172001-07-19 11:00:41 +00003775 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003776#define BEOS_THREADS 1
3777EOF
3778
Martin v. Löwis130fb172001-07-19 11:00:41 +00003779 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003780else
3781 echo "$ac_t""no" 1>&6
3782
Martin v. Löwis130fb172001-07-19 11:00:41 +00003783 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003784echo "configure:3785: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003785ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003786if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003787 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003788else
3789 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003790LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003791cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003792#line 3793 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003793#include "confdefs.h"
3794/* Override any gcc2 internal prototype to avoid an error. */
3795/* We use char because int might match the return type of a gcc2
3796 builtin and then its argument prototype would still apply. */
3797char pthread_create();
3798
3799int main() {
3800pthread_create()
3801; return 0; }
3802EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003803if { (eval echo configure:3804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003804 rm -rf conftest*
3805 eval "ac_cv_lib_$ac_lib_var=yes"
3806else
3807 echo "configure: failed program was:" >&5
3808 cat conftest.$ac_ext >&5
3809 rm -rf conftest*
3810 eval "ac_cv_lib_$ac_lib_var=no"
3811fi
3812rm -f conftest*
3813LIBS="$ac_save_LIBS"
3814
3815fi
3816if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3817 echo "$ac_t""yes" 1>&6
3818 cat >> confdefs.h <<\EOF
3819#define WITH_THREAD 1
3820EOF
3821
Martin v. Löwis130fb172001-07-19 11:00:41 +00003822 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003823#define _POSIX_THREADS 1
3824EOF
3825
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003826 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003827 LIBS="$LIBS -lpthreads"
3828 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003829else
3830 echo "$ac_t""no" 1>&6
3831
Martin v. Löwis130fb172001-07-19 11:00:41 +00003832 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003833echo "configure:3834: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003834ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003835if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003836 echo $ac_n "(cached) $ac_c" 1>&6
3837else
3838 ac_save_LIBS="$LIBS"
3839LIBS="-lc_r $LIBS"
3840cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003841#line 3842 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003842#include "confdefs.h"
3843/* Override any gcc2 internal prototype to avoid an error. */
3844/* We use char because int might match the return type of a gcc2
3845 builtin and then its argument prototype would still apply. */
3846char pthread_create();
3847
3848int main() {
3849pthread_create()
3850; return 0; }
3851EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003852if { (eval echo configure:3853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003853 rm -rf conftest*
3854 eval "ac_cv_lib_$ac_lib_var=yes"
3855else
3856 echo "configure: failed program was:" >&5
3857 cat conftest.$ac_ext >&5
3858 rm -rf conftest*
3859 eval "ac_cv_lib_$ac_lib_var=no"
3860fi
3861rm -f conftest*
3862LIBS="$ac_save_LIBS"
3863
3864fi
3865if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3866 echo "$ac_t""yes" 1>&6
3867 cat >> confdefs.h <<\EOF
3868#define WITH_THREAD 1
3869EOF
3870
Martin v. Löwis130fb172001-07-19 11:00:41 +00003871 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003872#define _POSIX_THREADS 1
3873EOF
3874
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003875 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003876 LIBS="$LIBS -lc_r"
3877 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003878else
3879 echo "$ac_t""no" 1>&6
3880
Martin v. Löwis130fb172001-07-19 11:00:41 +00003881 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003882echo "configure:3883: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003883ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003884if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003885 echo $ac_n "(cached) $ac_c" 1>&6
3886else
3887 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003888LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003889cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003890#line 3891 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003891#include "confdefs.h"
3892/* Override any gcc2 internal prototype to avoid an error. */
3893/* We use char because int might match the return type of a gcc2
3894 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003895char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003896
3897int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003898__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003899; return 0; }
3900EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003901if { (eval echo configure:3902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003902 rm -rf conftest*
3903 eval "ac_cv_lib_$ac_lib_var=yes"
3904else
3905 echo "configure: failed program was:" >&5
3906 cat conftest.$ac_ext >&5
3907 rm -rf conftest*
3908 eval "ac_cv_lib_$ac_lib_var=no"
3909fi
3910rm -f conftest*
3911LIBS="$ac_save_LIBS"
3912
3913fi
3914if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3915 echo "$ac_t""yes" 1>&6
3916 cat >> confdefs.h <<\EOF
3917#define WITH_THREAD 1
3918EOF
3919
Martin v. Löwis130fb172001-07-19 11:00:41 +00003920 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003921#define _POSIX_THREADS 1
3922EOF
3923
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003924 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003925 LIBS="$LIBS -lthread"
3926 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003927else
3928 echo "$ac_t""no" 1>&6
3929
Martin v. Löwis130fb172001-07-19 11:00:41 +00003930 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003931echo "configure:3932: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003932ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3933if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3934 echo $ac_n "(cached) $ac_c" 1>&6
3935else
3936 ac_save_LIBS="$LIBS"
3937LIBS="-lpthread $LIBS"
3938cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003939#line 3940 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003940#include "confdefs.h"
3941/* Override any gcc2 internal prototype to avoid an error. */
3942/* We use char because int might match the return type of a gcc2
3943 builtin and then its argument prototype would still apply. */
3944char __pthread_create_system();
3945
3946int main() {
3947__pthread_create_system()
3948; return 0; }
3949EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003950if { (eval echo configure:3951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003951 rm -rf conftest*
3952 eval "ac_cv_lib_$ac_lib_var=yes"
3953else
3954 echo "configure: failed program was:" >&5
3955 cat conftest.$ac_ext >&5
3956 rm -rf conftest*
3957 eval "ac_cv_lib_$ac_lib_var=no"
3958fi
3959rm -f conftest*
3960LIBS="$ac_save_LIBS"
3961
3962fi
3963if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3964 echo "$ac_t""yes" 1>&6
3965 cat >> confdefs.h <<\EOF
3966#define WITH_THREAD 1
3967EOF
3968
Martin v. Löwis130fb172001-07-19 11:00:41 +00003969 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003970#define _POSIX_THREADS 1
3971EOF
3972
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003973 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003974 LIBS="$LIBS -lpthread"
3975 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003976else
3977 echo "$ac_t""no" 1>&6
3978
Martin v. Löwis130fb172001-07-19 11:00:41 +00003979 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00003980echo "configure:3981: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003981ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003982if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003983 echo $ac_n "(cached) $ac_c" 1>&6
3984else
3985 ac_save_LIBS="$LIBS"
3986LIBS="-lcma $LIBS"
3987cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003988#line 3989 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003989#include "confdefs.h"
3990/* Override any gcc2 internal prototype to avoid an error. */
3991/* We use char because int might match the return type of a gcc2
3992 builtin and then its argument prototype would still apply. */
3993char pthread_create();
3994
3995int main() {
3996pthread_create()
3997; return 0; }
3998EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00003999if { (eval echo configure:4000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004000 rm -rf conftest*
4001 eval "ac_cv_lib_$ac_lib_var=yes"
4002else
4003 echo "configure: failed program was:" >&5
4004 cat conftest.$ac_ext >&5
4005 rm -rf conftest*
4006 eval "ac_cv_lib_$ac_lib_var=no"
4007fi
4008rm -f conftest*
4009LIBS="$ac_save_LIBS"
4010
4011fi
4012if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4013 echo "$ac_t""yes" 1>&6
4014 cat >> confdefs.h <<\EOF
4015#define WITH_THREAD 1
4016EOF
4017
Martin v. Löwis130fb172001-07-19 11:00:41 +00004018 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00004019#define _POSIX_THREADS 1
4020EOF
4021
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004022 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004023 LIBS="$LIBS -lcma"
4024 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004025else
4026 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004027
Martin v. Löwis130fb172001-07-19 11:00:41 +00004028 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004029fi
4030
Martin v. Löwis130fb172001-07-19 11:00:41 +00004031
Guido van Rossum627b2d71993-12-24 10:39:16 +00004032fi
4033
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004034fi
4035
Guido van Rossum0be3e491997-05-22 20:33:33 +00004036fi
4037
Guido van Rossum49545951997-12-02 19:28:29 +00004038fi
4039
Guido van Rossumb93a8621998-05-07 13:27:32 +00004040fi
4041
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004042fi
4043
Guido van Rossumad678af1998-10-02 14:42:15 +00004044fi
4045
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004046fi
4047
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004048fi
4049
Guido van Rossum0be3e491997-05-22 20:33:33 +00004050
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004051 if test "$posix_threads" = "yes"; then
4052 echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004053echo "configure:4054: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004054 if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then
4055 echo $ac_n "(cached) $ac_c" 1>&6
4056else
4057 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004058 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004059else
4060 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004061#line 4062 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004062#include "confdefs.h"
4063#include <pthread.h>
4064 void *foo(void *parm) {
4065 return NULL;
4066 }
4067 main() {
4068 pthread_attr_t attr;
4069 if (pthread_attr_init(&attr)) exit(-1);
4070 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
4071 if (pthread_create(NULL, &attr, foo, NULL)) exit(-1);
4072 exit(0);
4073 }
4074EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004075if { (eval echo configure:4076: \"$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 +00004076then
4077 ac_cv_pthread_system_supported=yes
4078else
4079 echo "configure: failed program was:" >&5
4080 cat conftest.$ac_ext >&5
4081 rm -fr conftest*
4082 ac_cv_pthread_system_supported=no
4083fi
4084rm -fr conftest*
4085fi
4086
4087
4088fi
4089
4090 echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6
4091 if test "$ac_cv_pthread_system_supported" = "yes"; then
4092 cat >> confdefs.h <<\EOF
4093#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
4094EOF
4095
4096 fi
4097 fi
4098
Martin v. Löwis130fb172001-07-19 11:00:41 +00004099 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004100echo "configure:4101: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004101ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004102if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004103 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004104else
4105 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004106LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004107cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004108#line 4109 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004109#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004110/* Override any gcc2 internal prototype to avoid an error. */
4111/* We use char because int might match the return type of a gcc2
4112 builtin and then its argument prototype would still apply. */
4113char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004114
Guido van Rossumf78abae1997-01-21 22:02:36 +00004115int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004116usconfig()
4117; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004118EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004119if { (eval echo configure:4120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004120 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004121 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004122else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004123 echo "configure: failed program was:" >&5
4124 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004125 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004126 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004127fi
4128rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004129LIBS="$ac_save_LIBS"
4130
4131fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004132if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004133 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004134 cat >> confdefs.h <<\EOF
4135#define WITH_THREAD 1
4136EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004137
Martin v. Löwis130fb172001-07-19 11:00:41 +00004138 LIBS="$LIBS -lmpc"
4139 LIBOBJS="$LIBOBJS thread.o"
4140 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004141else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004142 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004143fi
4144
Martin v. Löwis130fb172001-07-19 11:00:41 +00004145 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004146echo "configure:4147: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004147ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004148if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004149 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004150else
4151 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004152LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004153cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004154#line 4155 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004155#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004156/* Override any gcc2 internal prototype to avoid an error. */
4157/* We use char because int might match the return type of a gcc2
4158 builtin and then its argument prototype would still apply. */
4159char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004160
Guido van Rossumf78abae1997-01-21 22:02:36 +00004161int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004162thr_create()
4163; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004164EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004165if { (eval echo configure:4166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004166 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004167 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004168else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004169 echo "configure: failed program was:" >&5
4170 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004171 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004172 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004173fi
4174rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004175LIBS="$ac_save_LIBS"
4176
4177fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004178if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004179 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004180 cat >> confdefs.h <<\EOF
4181#define WITH_THREAD 1
4182EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004183
Martin v. Löwis130fb172001-07-19 11:00:41 +00004184 LIBS="$LIBS -lthread"
4185 LIBOBJS="$LIBOBJS thread.o"
4186 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004187else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004188 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004189fi
4190
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004191
Martin v. Löwis130fb172001-07-19 11:00:41 +00004192 if test "$USE_THREAD_MODULE" != "#"
4193 then
4194 # If the above checks didn't disable threads, (at least) OSF1
4195 # needs this '-threads' argument during linking.
4196 case $ac_sys_system in
4197 OSF1) LDLAST=-threads;;
4198 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004199 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004200fi
4201
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004202# Check for enable-ipv6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004203echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004204echo "configure:4205: checking if --enable-ipv6 is specified" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004205# Check whether --enable-ipv6 or --disable-ipv6 was given.
4206if test "${enable_ipv6+set}" = set; then
4207 enableval="$enable_ipv6"
4208 case "$enableval" in
4209 no)
4210 echo "$ac_t""no" 1>&6
4211 ipv6=no
4212 ;;
4213 *) echo "$ac_t""yes" 1>&6
4214 cat >> confdefs.h <<\EOF
4215#define ENABLE_IPV6 1
4216EOF
4217
4218 ipv6=yes
4219 ;;
4220 esac
4221else
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004222
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004223 if test "$cross_compiling" = yes; then
4224 echo "$ac_t""no" 1>&6
4225 ipv6=no
4226
4227else
4228 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004229#line 4230 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004230#include "confdefs.h"
4231 /* AF_INET6 available check */
4232#include <sys/types.h>
4233#include <sys/socket.h>
4234main()
4235{
4236 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4237 exit(1);
4238 else
4239 exit(0);
4240}
4241
4242EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004243if { (eval echo configure:4244: \"$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 +00004244then
4245 echo "$ac_t""yes" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004246 ipv6=yes
4247else
4248 echo "configure: failed program was:" >&5
4249 cat conftest.$ac_ext >&5
4250 rm -fr conftest*
4251 echo "$ac_t""no" 1>&6
4252 ipv6=no
4253fi
4254rm -fr conftest*
4255fi
4256
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004257
4258if test "$ipv6" = "yes"; then
4259 echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004260echo "configure:4261: checking if RFC2553 API is available" >&5
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004261 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004262#line 4263 "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004263#include "confdefs.h"
4264#include <sys/types.h>
4265#include <netinet/in.h>
4266int main() {
4267struct sockaddr_in6 x;
4268x.sin6_scope_id;
4269; return 0; }
4270EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004271if { (eval echo configure:4272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004272 rm -rf conftest*
4273 echo "$ac_t""yes" 1>&6
4274 ipv6=yes
4275else
4276 echo "configure: failed program was:" >&5
4277 cat conftest.$ac_ext >&5
4278 rm -rf conftest*
4279 echo "$ac_t""no" 1>&6
4280 ipv6=no
4281fi
4282rm -f conftest*
4283fi
4284
4285if test "$ipv6" = "yes"; then
4286 cat >> confdefs.h <<\EOF
4287#define ENABLE_IPV6 1
4288EOF
4289
4290fi
4291
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004292fi
4293
4294
4295ipv6type=unknown
4296ipv6lib=none
4297ipv6trylibc=no
4298
4299if test "$ipv6" = "yes"; then
4300 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004301echo "configure:4302: checking ipv6 stack type" >&5
Guido van Rossumb8552162001-09-05 14:58:11 +00004302 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
4303 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004304 case $i in
4305 inria)
4306 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004307#line 4308 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004308#include "confdefs.h"
4309dnl
4310#include <netinet/in.h>
4311#ifdef IPV6_INRIA_VERSION
4312yes
4313#endif
4314EOF
4315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4316 egrep "yes" >/dev/null 2>&1; then
4317 rm -rf conftest*
4318 ipv6type=$i;
4319 OPT="-DINET6 $OPT"
4320fi
4321rm -f conftest*
4322
4323 ;;
4324 kame)
4325 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004326#line 4327 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004327#include "confdefs.h"
4328dnl
4329#include <netinet/in.h>
4330#ifdef __KAME__
4331yes
4332#endif
4333EOF
4334if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4335 egrep "yes" >/dev/null 2>&1; then
4336 rm -rf conftest*
4337 ipv6type=$i;
4338 ipv6lib=inet6
4339 ipv6libdir=/usr/local/v6/lib
4340 ipv6trylibc=yes
4341 OPT="-DINET6 $OPT"
4342fi
4343rm -f conftest*
4344
4345 ;;
4346 linux-glibc)
4347 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004348#line 4349 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004349#include "confdefs.h"
4350dnl
4351#include <features.h>
4352#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4353yes
4354#endif
4355EOF
4356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4357 egrep "yes" >/dev/null 2>&1; then
4358 rm -rf conftest*
4359 ipv6type=$i;
4360 ipv6trylibc=yes
4361 OPT="-DINET6 $OPT"
4362fi
4363rm -f conftest*
4364
4365 ;;
4366 linux-inet6)
4367 if test -d /usr/inet6; then
4368 ipv6type=$i
4369 ipv6lib=inet6
4370 ipv6libdir=/usr/inet6/lib
4371 OPT="-DINET6 -I/usr/inet6/include $OPT"
4372 fi
4373 ;;
4374 solaris)
4375 if test -f /etc/netconfig; then
4376 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4377 ipv6type=$i
4378 ipv6trylibc=yes
4379 OPT="-DINET6 $OPT"
4380 fi
4381 fi
4382 ;;
4383 toshiba)
4384 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004385#line 4386 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004386#include "confdefs.h"
4387dnl
4388#include <sys/param.h>
4389#ifdef _TOSHIBA_INET6
4390yes
4391#endif
4392EOF
4393if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4394 egrep "yes" >/dev/null 2>&1; then
4395 rm -rf conftest*
4396 ipv6type=$i;
4397 ipv6lib=inet6;
4398 ipv6libdir=/usr/local/v6/lib;
4399 OPT="-DINET6 $OPT"
4400fi
4401rm -f conftest*
4402
4403 ;;
4404 v6d)
4405 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004406#line 4407 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004407#include "confdefs.h"
4408dnl
4409#include </usr/local/v6/include/sys/v6config.h>
4410#ifdef __V6D__
4411yes
4412#endif
4413EOF
4414if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4415 egrep "yes" >/dev/null 2>&1; then
4416 rm -rf conftest*
4417 ipv6type=$i;
4418 ipv6lib=v6;
4419 ipv6libdir=/usr/local/v6/lib;
4420 OPT="-I/usr/local/v6/include $OPT"
4421fi
4422rm -f conftest*
4423
4424 ;;
4425 zeta)
4426 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004427#line 4428 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004428#include "confdefs.h"
4429dnl
4430#include <sys/param.h>
4431#ifdef _ZETA_MINAMI_INET6
4432yes
4433#endif
4434EOF
4435if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4436 egrep "yes" >/dev/null 2>&1; then
4437 rm -rf conftest*
4438 ipv6type=$i;
4439 ipv6lib=inet6;
4440 ipv6libdir=/usr/local/v6/lib;
4441 OPT="-DINET6 $OPT"
4442fi
4443rm -f conftest*
4444
4445 ;;
4446 esac
4447 if test "$ipv6type" != "unknown"; then
4448 break
4449 fi
4450 done
4451 echo "$ac_t""$ipv6type" 1>&6
4452fi
4453
4454if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4455 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4456 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4457 echo "using lib$ipv6lib"
4458 else
4459 if test $ipv6trylibc = "yes"; then
4460 echo "using libc"
4461 else
4462 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4463 echo "You need to fetch lib$ipv6lib.a from appropriate"
4464 echo 'ipv6 kit and compile beforehand.'
4465 exit 1
4466 fi
4467 fi
4468fi
4469
Barry Warsawef82cd72000-06-30 16:21:01 +00004470# Check for GC support
Barry Warsawef82cd72000-06-30 16:21:01 +00004471echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004472echo "configure:4473: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004473# Check whether --with-cycle-gc or --without-cycle-gc was given.
4474if test "${with_cycle_gc+set}" = set; then
4475 withval="$with_cycle_gc"
4476 :
4477fi
4478
4479
4480if test -z "$with_cycle_gc"
4481then with_cycle_gc="yes"
4482fi
Neil Schemenauercf229462001-08-29 23:58:47 +00004483if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +00004484then
Barry Warsawef82cd72000-06-30 16:21:01 +00004485 cat >> confdefs.h <<\EOF
4486#define WITH_CYCLE_GC 1
4487EOF
4488
4489fi
4490echo "$ac_t""$with_cycle_gc" 1>&6
4491
Neil Schemenauera35c6882001-02-27 04:45:05 +00004492# Check for Python-specific malloc support
4493echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004494echo "configure:4495: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004495# Check whether --with-pymalloc or --without-pymalloc was given.
4496if test "${with_pymalloc+set}" = set; then
4497 withval="$with_pymalloc"
4498
4499if test "$withval" != no
4500then cat >> confdefs.h <<\EOF
4501#define WITH_PYMALLOC 1
4502EOF
4503 echo "$ac_t""yes" 1>&6
4504else echo "$ac_t""no" 1>&6
4505fi
4506else
4507 echo "$ac_t""no" 1>&6
4508fi
4509
4510
Barry Warsawef82cd72000-06-30 16:21:01 +00004511# Check for --with-wctype-functions
4512echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004513echo "configure:4514: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004514# Check whether --with-wctype-functions or --without-wctype-functions was given.
4515if test "${with_wctype_functions+set}" = set; then
4516 withval="$with_wctype_functions"
4517
4518if test "$withval" != no
4519then cat >> confdefs.h <<\EOF
4520#define WANT_WCTYPE_FUNCTIONS 1
4521EOF
4522 echo "$ac_t""yes" 1>&6
4523else echo "$ac_t""no" 1>&6
4524fi
4525else
4526 echo "$ac_t""no" 1>&6
4527fi
4528
4529
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004530# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004531
Guido van Rossum98935bf2001-09-05 19:13:16 +00004532DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004533
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004534echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004535echo "configure:4536: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004536# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004537if test "${with_sgi_dl+set}" = set; then
4538 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004539
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004540echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004541cat >> confdefs.h <<\EOF
4542#define WITH_SGI_DL 1
4543EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004544
Guido van Rossume97ee181999-12-20 21:27:22 +00004545DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004546dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004547if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004548then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004549else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004550fi
4551DLINCLDIR=${dldir}
4552LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004553else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004554 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004555fi
4556
4557
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004558echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004559echo "configure:4560: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004560# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004561if test "${with_dl_dld+set}" = set; then
4562 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004563
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004564echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004565cat >> confdefs.h <<\EOF
4566#define WITH_DL_DLD 1
4567EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004568
Guido van Rossume97ee181999-12-20 21:27:22 +00004569DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004570dldir=`echo "$withval" | sed 's/,.*//'`
4571dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004572if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004573then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004574else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004575fi
4576DLINCLDIR=${dldir}
4577LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004578else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004579 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004580fi
4581
4582
Guido van Rossume97ee181999-12-20 21:27:22 +00004583# the dlopen() function means we might want to use dynload_shlib.o. some
4584# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004585for ac_func in dlopen
4586do
4587echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004588echo "configure:4589: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004589if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004590 echo $ac_n "(cached) $ac_c" 1>&6
4591else
4592 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004593#line 4594 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004594#include "confdefs.h"
4595/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004596 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004597#include <assert.h>
4598/* Override any gcc2 internal prototype to avoid an error. */
4599/* We use char because int might match the return type of a gcc2
4600 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004601char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004602
4603int main() {
4604
4605/* The GNU C library defines this for functions which it implements
4606 to always fail with ENOSYS. Some functions are actually named
4607 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004608#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004609choke me
4610#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004611$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004612#endif
4613
4614; return 0; }
4615EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004616if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004617 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004618 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004619else
4620 echo "configure: failed program was:" >&5
4621 cat conftest.$ac_ext >&5
4622 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004623 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004624fi
4625rm -f conftest*
4626fi
4627
Thomas Wouters3a584202000-08-05 23:28:51 +00004628if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004629 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004630 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4631 cat >> confdefs.h <<EOF
4632#define $ac_tr_func 1
4633EOF
4634
Guido van Rossume97ee181999-12-20 21:27:22 +00004635else
4636 echo "$ac_t""no" 1>&6
4637fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004638done
Guido van Rossume97ee181999-12-20 21:27:22 +00004639
4640
4641# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4642# loading of modules.
4643
4644echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004645echo "configure:4646: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004646if test -z "$DYNLOADFILE"
4647then
4648 case $ac_sys_system/$ac_sys_release in
4649 AIX*) DYNLOADFILE="dynload_aix.o";;
4650 BeOS*) DYNLOADFILE="dynload_beos.o";;
4651 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004652 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004653 *)
4654 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4655 # out any dynamic loading
4656 if test "$ac_cv_func_dlopen" = yes
4657 then DYNLOADFILE="dynload_shlib.o"
4658 else DYNLOADFILE="dynload_stub.o"
4659 fi
4660 ;;
4661 esac
4662fi
4663echo "$ac_t""$DYNLOADFILE" 1>&6
4664if test "$DYNLOADFILE" != "dynload_stub.o"
4665then
4666 cat >> confdefs.h <<\EOF
4667#define HAVE_DYNAMIC_LOADING 1
4668EOF
4669
4670fi
4671
Neil Schemenauer4e425612001-06-19 15:44:15 +00004672# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4673
4674
4675echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004676echo "configure:4677: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004677if test -z "$MACHDEP_OBJS"
4678then
Jack Jansene578a632001-08-15 01:27:14 +00004679 MACHDEP_OBJS=$extra_machdep_objs
4680else
4681 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004682fi
Jack Jansene578a632001-08-15 01:27:14 +00004683echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004684
Guido van Rossum627b2d71993-12-24 10:39:16 +00004685# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004686for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004687 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00004688 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis864e9ff2001-08-04 22:32:03 +00004689 hstrerror inet_pton kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004690 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004691 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004692 select setegid seteuid setgid \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004693 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004694 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004695 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Woutersc2c12dc2001-07-11 14:45:34 +00004696 truncate uname waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004697do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004698echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004699echo "configure:4700: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004700if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004701 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004702else
4703 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004704#line 4705 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004705#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004706/* System header to define __stub macros and hopefully few prototypes,
4707 which can conflict with char $ac_func(); below. */
4708#include <assert.h>
4709/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004710/* We use char because int might match the return type of a gcc2
4711 builtin and then its argument prototype would still apply. */
4712char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004713
Guido van Rossumf78abae1997-01-21 22:02:36 +00004714int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004715
Guido van Rossum627b2d71993-12-24 10:39:16 +00004716/* The GNU C library defines this for functions which it implements
4717 to always fail with ENOSYS. Some functions are actually named
4718 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004719#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004720choke me
4721#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004722$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004723#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004724
Guido van Rossum7f43da71994-08-01 12:15:30 +00004725; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004726EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004727if { (eval echo configure:4728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004728 rm -rf conftest*
4729 eval "ac_cv_func_$ac_func=yes"
4730else
4731 echo "configure: failed program was:" >&5
4732 cat conftest.$ac_ext >&5
4733 rm -rf conftest*
4734 eval "ac_cv_func_$ac_func=no"
4735fi
4736rm -f conftest*
4737fi
4738
4739if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4740 echo "$ac_t""yes" 1>&6
4741 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4742 cat >> confdefs.h <<EOF
4743#define $ac_tr_func 1
4744EOF
4745
4746else
4747 echo "$ac_t""no" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004748fi
4749done
4750
4751
4752# check for openpty and forkpty
4753
4754for ac_func in openpty
4755do
4756echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004757echo "configure:4758: checking for $ac_func" >&5
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004758if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4759 echo $ac_n "(cached) $ac_c" 1>&6
4760else
4761 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004762#line 4763 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004763#include "confdefs.h"
4764/* System header to define __stub macros and hopefully few prototypes,
4765 which can conflict with char $ac_func(); below. */
4766#include <assert.h>
4767/* Override any gcc2 internal prototype to avoid an error. */
4768/* We use char because int might match the return type of a gcc2
4769 builtin and then its argument prototype would still apply. */
4770char $ac_func();
4771
4772int main() {
4773
4774/* The GNU C library defines this for functions which it implements
4775 to always fail with ENOSYS. Some functions are actually named
4776 something starting with __ and the normal name is an alias. */
4777#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4778choke me
4779#else
4780$ac_func();
4781#endif
4782
4783; return 0; }
4784EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004785if { (eval echo configure:4786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004786 rm -rf conftest*
4787 eval "ac_cv_func_$ac_func=yes"
4788else
4789 echo "configure: failed program was:" >&5
4790 cat conftest.$ac_ext >&5
4791 rm -rf conftest*
4792 eval "ac_cv_func_$ac_func=no"
4793fi
4794rm -f conftest*
4795fi
4796
4797if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4798 echo "$ac_t""yes" 1>&6
4799 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4800 cat >> confdefs.h <<EOF
4801#define $ac_tr_func 1
4802EOF
4803
4804else
4805 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004806echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004807echo "configure:4808: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004808ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004809if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004810 echo $ac_n "(cached) $ac_c" 1>&6
4811else
4812 ac_save_LIBS="$LIBS"
4813LIBS="-lutil $LIBS"
4814cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004815#line 4816 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004816#include "confdefs.h"
4817/* Override any gcc2 internal prototype to avoid an error. */
4818/* We use char because int might match the return type of a gcc2
4819 builtin and then its argument prototype would still apply. */
4820char openpty();
4821
4822int main() {
4823openpty()
4824; return 0; }
4825EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004826if { (eval echo configure:4827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004827 rm -rf conftest*
4828 eval "ac_cv_lib_$ac_lib_var=yes"
4829else
4830 echo "configure: failed program was:" >&5
4831 cat conftest.$ac_ext >&5
4832 rm -rf conftest*
4833 eval "ac_cv_lib_$ac_lib_var=no"
4834fi
4835rm -f conftest*
4836LIBS="$ac_save_LIBS"
4837
4838fi
4839if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4840 echo "$ac_t""yes" 1>&6
4841 cat >> confdefs.h <<\EOF
4842#define HAVE_OPENPTY 1
4843EOF
4844 LIBS="$LIBS -lutil"
4845else
4846 echo "$ac_t""no" 1>&6
4847fi
4848
4849fi
4850done
4851
4852for ac_func in forkpty
4853do
4854echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004855echo "configure:4856: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004856if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004857 echo $ac_n "(cached) $ac_c" 1>&6
4858else
4859 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004860#line 4861 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004861#include "confdefs.h"
4862/* System header to define __stub macros and hopefully few prototypes,
4863 which can conflict with char $ac_func(); below. */
4864#include <assert.h>
4865/* Override any gcc2 internal prototype to avoid an error. */
4866/* We use char because int might match the return type of a gcc2
4867 builtin and then its argument prototype would still apply. */
4868char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004869
4870int main() {
4871
4872/* The GNU C library defines this for functions which it implements
4873 to always fail with ENOSYS. Some functions are actually named
4874 something starting with __ and the normal name is an alias. */
4875#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4876choke me
4877#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004878$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004879#endif
4880
4881; return 0; }
4882EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004883if { (eval echo configure:4884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004884 rm -rf conftest*
4885 eval "ac_cv_func_$ac_func=yes"
4886else
4887 echo "configure: failed program was:" >&5
4888 cat conftest.$ac_ext >&5
4889 rm -rf conftest*
4890 eval "ac_cv_func_$ac_func=no"
4891fi
4892rm -f conftest*
4893fi
4894
4895if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4896 echo "$ac_t""yes" 1>&6
4897 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4898 cat >> confdefs.h <<EOF
4899#define $ac_tr_func 1
4900EOF
4901
4902else
4903 echo "$ac_t""no" 1>&6
4904echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004905echo "configure:4906: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004906ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004907if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004908 echo $ac_n "(cached) $ac_c" 1>&6
4909else
4910 ac_save_LIBS="$LIBS"
4911LIBS="-lutil $LIBS"
4912cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004913#line 4914 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004914#include "confdefs.h"
4915/* Override any gcc2 internal prototype to avoid an error. */
4916/* We use char because int might match the return type of a gcc2
4917 builtin and then its argument prototype would still apply. */
4918char forkpty();
4919
4920int main() {
4921forkpty()
4922; return 0; }
4923EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004924if { (eval echo configure:4925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004925 rm -rf conftest*
4926 eval "ac_cv_lib_$ac_lib_var=yes"
4927else
4928 echo "configure: failed program was:" >&5
4929 cat conftest.$ac_ext >&5
4930 rm -rf conftest*
4931 eval "ac_cv_lib_$ac_lib_var=no"
4932fi
4933rm -f conftest*
4934LIBS="$ac_save_LIBS"
4935
4936fi
4937if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4938 echo "$ac_t""yes" 1>&6
4939 cat >> confdefs.h <<\EOF
4940#define HAVE_FORKPTY 1
4941EOF
4942 LIBS="$LIBS -lutil"
4943else
4944 echo "$ac_t""no" 1>&6
4945fi
4946
4947fi
4948done
4949
4950
4951# check for long file support functions
4952for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4953do
4954echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00004955echo "configure:4956: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004956if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004957 echo $ac_n "(cached) $ac_c" 1>&6
4958else
4959 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004960#line 4961 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004961#include "confdefs.h"
4962/* System header to define __stub macros and hopefully few prototypes,
4963 which can conflict with char $ac_func(); below. */
4964#include <assert.h>
4965/* Override any gcc2 internal prototype to avoid an error. */
4966/* We use char because int might match the return type of a gcc2
4967 builtin and then its argument prototype would still apply. */
4968char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004969
4970int main() {
4971
4972/* The GNU C library defines this for functions which it implements
4973 to always fail with ENOSYS. Some functions are actually named
4974 something starting with __ and the normal name is an alias. */
4975#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4976choke me
4977#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004978$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004979#endif
4980
4981; return 0; }
4982EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00004983if { (eval echo configure:4984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004984 rm -rf conftest*
4985 eval "ac_cv_func_$ac_func=yes"
4986else
4987 echo "configure: failed program was:" >&5
4988 cat conftest.$ac_ext >&5
4989 rm -rf conftest*
4990 eval "ac_cv_func_$ac_func=no"
4991fi
4992rm -f conftest*
4993fi
4994
4995if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4996 echo "$ac_t""yes" 1>&6
4997 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4998 cat >> confdefs.h <<EOF
4999#define $ac_tr_func 1
5000EOF
5001
5002else
5003 echo "$ac_t""no" 1>&6
5004fi
5005done
5006
5007
5008for ac_func in dup2 getcwd strdup strerror memmove
5009do
5010echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005011echo "configure:5012: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005012if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005013 echo $ac_n "(cached) $ac_c" 1>&6
5014else
5015 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005016#line 5017 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005017#include "confdefs.h"
5018/* System header to define __stub macros and hopefully few prototypes,
5019 which can conflict with char $ac_func(); below. */
5020#include <assert.h>
5021/* Override any gcc2 internal prototype to avoid an error. */
5022/* We use char because int might match the return type of a gcc2
5023 builtin and then its argument prototype would still apply. */
5024char $ac_func();
5025
5026int main() {
5027
5028/* The GNU C library defines this for functions which it implements
5029 to always fail with ENOSYS. Some functions are actually named
5030 something starting with __ and the normal name is an alias. */
5031#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5032choke me
5033#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005034$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005035#endif
5036
5037; return 0; }
5038EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005039if { (eval echo configure:5040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005040 rm -rf conftest*
5041 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005042else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005043 echo "configure: failed program was:" >&5
5044 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005045 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005046 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005047fi
5048rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005049fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005050
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005051if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005052 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005053 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5054 cat >> confdefs.h <<EOF
5055#define $ac_tr_func 1
5056EOF
5057
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005058else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005059 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005060LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005061fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005062done
5063
Guido van Rossumf78abae1997-01-21 22:02:36 +00005064
Thomas Wouters3a584202000-08-05 23:28:51 +00005065for ac_func in getpgrp
5066do
5067echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005068echo "configure:5069: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005069if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005070 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005071else
5072 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005073#line 5074 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005074#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005075/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005076 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005077#include <assert.h>
5078/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005079/* We use char because int might match the return type of a gcc2
5080 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005081char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005082
Guido van Rossumf78abae1997-01-21 22:02:36 +00005083int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005084
Guido van Rossum627b2d71993-12-24 10:39:16 +00005085/* The GNU C library defines this for functions which it implements
5086 to always fail with ENOSYS. Some functions are actually named
5087 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005088#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005089choke me
5090#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005091$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005092#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005093
5094; return 0; }
5095EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005096if { (eval echo configure:5097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005097 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005098 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005099else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005100 echo "configure: failed program was:" >&5
5101 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005102 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005103 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005104fi
5105rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005106fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005107
Thomas Wouters3a584202000-08-05 23:28:51 +00005108if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005109 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005110 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5111 cat >> confdefs.h <<EOF
5112#define $ac_tr_func 1
5113EOF
5114 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005115#line 5116 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005116#include "confdefs.h"
5117#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005118int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005119getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005120; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005121EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005122if { (eval echo configure:5123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005123 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005124 cat >> confdefs.h <<\EOF
5125#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005126EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005127
Guido van Rossumf78abae1997-01-21 22:02:36 +00005128else
5129 echo "configure: failed program was:" >&5
5130 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005131fi
5132rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005133else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005134 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005135fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005136done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005137
Thomas Wouters3a584202000-08-05 23:28:51 +00005138for ac_func in setpgrp
5139do
5140echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005141echo "configure:5142: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005142if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005143 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005144else
5145 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005146#line 5147 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005147#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005148/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005149 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005150#include <assert.h>
5151/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005152/* We use char because int might match the return type of a gcc2
5153 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005154char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005155
Guido van Rossumf78abae1997-01-21 22:02:36 +00005156int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005157
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005158/* The GNU C library defines this for functions which it implements
5159 to always fail with ENOSYS. Some functions are actually named
5160 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005161#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005162choke me
5163#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005164$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005165#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005166
5167; return 0; }
5168EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005169if { (eval echo configure:5170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005170 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005171 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005172else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005173 echo "configure: failed program was:" >&5
5174 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005175 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005176 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005177fi
5178rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005179fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005180
Thomas Wouters3a584202000-08-05 23:28:51 +00005181if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005182 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005183 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5184 cat >> confdefs.h <<EOF
5185#define $ac_tr_func 1
5186EOF
5187 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005188#line 5189 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005189#include "confdefs.h"
5190#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005191int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005192setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005193; return 0; }
5194EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005195if { (eval echo configure:5196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005196 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005197 cat >> confdefs.h <<\EOF
5198#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005199EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005200
Guido van Rossumf78abae1997-01-21 22:02:36 +00005201else
5202 echo "configure: failed program was:" >&5
5203 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005204fi
5205rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005206else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005207 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005208fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005209done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005210
Thomas Wouters3a584202000-08-05 23:28:51 +00005211for ac_func in gettimeofday
5212do
5213echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005214echo "configure:5215: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005215if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005216 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005217else
5218 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005219#line 5220 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005220#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005221/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005222 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005223#include <assert.h>
5224/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005225/* We use char because int might match the return type of a gcc2
5226 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005227char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005228
Guido van Rossumf78abae1997-01-21 22:02:36 +00005229int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005230
5231/* The GNU C library defines this for functions which it implements
5232 to always fail with ENOSYS. Some functions are actually named
5233 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005234#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005235choke me
5236#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005237$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005238#endif
5239
5240; return 0; }
5241EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005242if { (eval echo configure:5243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005243 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005244 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005245else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005246 echo "configure: failed program was:" >&5
5247 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005248 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005249 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005250fi
5251rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005252fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005253
Thomas Wouters3a584202000-08-05 23:28:51 +00005254if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005255 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005256 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5257 cat >> confdefs.h <<EOF
5258#define $ac_tr_func 1
5259EOF
5260 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005261#line 5262 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005262#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005263#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005264int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005265gettimeofday((struct timeval*)0,(struct timezone*)0);
5266; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005267EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005268if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005269 :
5270else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005271 echo "configure: failed program was:" >&5
5272 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005273 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005274 cat >> confdefs.h <<\EOF
5275#define GETTIMEOFDAY_NO_TZ 1
5276EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005277
5278fi
5279rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005280else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005281 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005282fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005283done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005284
5285
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005286for ac_func in getaddrinfo
5287do
5288echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005289echo "configure:5290: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005290if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5291 echo $ac_n "(cached) $ac_c" 1>&6
5292else
5293 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005294#line 5295 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005295#include "confdefs.h"
5296/* System header to define __stub macros and hopefully few prototypes,
5297 which can conflict with char $ac_func(); below. */
5298#include <assert.h>
5299/* Override any gcc2 internal prototype to avoid an error. */
5300/* We use char because int might match the return type of a gcc2
5301 builtin and then its argument prototype would still apply. */
5302char $ac_func();
5303
5304int main() {
5305
5306/* The GNU C library defines this for functions which it implements
5307 to always fail with ENOSYS. Some functions are actually named
5308 something starting with __ and the normal name is an alias. */
5309#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5310choke me
5311#else
5312$ac_func();
5313#endif
5314
5315; return 0; }
5316EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005317if { (eval echo configure:5318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005318 rm -rf conftest*
5319 eval "ac_cv_func_$ac_func=yes"
5320else
5321 echo "configure: failed program was:" >&5
5322 cat conftest.$ac_ext >&5
5323 rm -rf conftest*
5324 eval "ac_cv_func_$ac_func=no"
5325fi
5326rm -f conftest*
5327fi
5328
5329if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5330 echo "$ac_t""yes" 1>&6
5331 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5332 cat >> confdefs.h <<EOF
5333#define $ac_tr_func 1
5334EOF
5335 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005336echo "configure:5337: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005337if test "$cross_compiling" = yes; then
5338 echo "$ac_t""buggy" 1>&6
5339buggygetaddrinfo=yes
5340else
5341 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005342#line 5343 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005343#include "confdefs.h"
5344
5345#include <sys/types.h>
5346#include <netdb.h>
5347#include <string.h>
5348#include <sys/socket.h>
5349#include <netinet/in.h>
5350
5351main()
5352{
5353 int passive, gaierr, inet4 = 0, inet6 = 0;
5354 struct addrinfo hints, *ai, *aitop;
5355 char straddr[INET6_ADDRSTRLEN], strport[16];
5356
5357 for (passive = 0; passive <= 1; passive++) {
5358 memset(&hints, 0, sizeof(hints));
5359 hints.ai_family = AF_UNSPEC;
5360 hints.ai_flags = passive ? AI_PASSIVE : 0;
5361 hints.ai_socktype = SOCK_STREAM;
5362 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5363 (void)gai_strerror(gaierr);
5364 goto bad;
5365 }
5366 for (ai = aitop; ai; ai = ai->ai_next) {
5367 if (ai->ai_addr == NULL ||
5368 ai->ai_addrlen == 0 ||
5369 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5370 straddr, sizeof(straddr), strport, sizeof(strport),
5371 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5372 goto bad;
5373 }
5374 switch (ai->ai_family) {
5375 case AF_INET:
5376 if (strcmp(strport, "54321") != 0) {
5377 goto bad;
5378 }
5379 if (passive) {
5380 if (strcmp(straddr, "0.0.0.0") != 0) {
5381 goto bad;
5382 }
5383 } else {
5384 if (strcmp(straddr, "127.0.0.1") != 0) {
5385 goto bad;
5386 }
5387 }
5388 inet4++;
5389 break;
5390 case AF_INET6:
5391 if (strcmp(strport, "54321") != 0) {
5392 goto bad;
5393 }
5394 if (passive) {
5395 if (strcmp(straddr, "::") != 0) {
5396 goto bad;
5397 }
5398 } else {
5399 if (strcmp(straddr, "::1") != 0) {
5400 goto bad;
5401 }
5402 }
5403 inet6++;
5404 break;
5405 case AF_UNSPEC:
5406 goto bad;
5407 break;
5408 default:
5409 /* another family support? */
5410 break;
5411 }
5412 }
5413 }
5414
5415 if (!(inet4 == 0 || inet4 == 2))
5416 goto bad;
5417 if (!(inet6 == 0 || inet6 == 2))
5418 goto bad;
5419
5420 if (aitop)
5421 freeaddrinfo(aitop);
5422 exit(0);
5423
5424 bad:
5425 if (aitop)
5426 freeaddrinfo(aitop);
5427 exit(1);
5428}
5429
5430EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005431if { (eval echo configure:5432: \"$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 +00005432then
5433 echo "$ac_t""good" 1>&6
5434buggygetaddrinfo=no
5435else
5436 echo "configure: failed program was:" >&5
5437 cat conftest.$ac_ext >&5
5438 rm -fr conftest*
5439 echo "$ac_t""buggy" 1>&6
5440buggygetaddrinfo=yes
5441fi
5442rm -fr conftest*
5443fi
5444
5445else
5446 echo "$ac_t""no" 1>&6
5447buggygetaddrinfo=yes
5448fi
5449done
5450
5451
5452if test "$buggygetaddrinfo" = "yes"; then
5453 if test "$ipv6" = "yes"; then
5454 echo 'Fatal: You must get working getaddrinfo() function.'
5455 echo ' or you can specify "--disable-ipv6"'.
5456 exit 1
5457 fi
5458fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005459for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005460do
5461echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005462echo "configure:5463: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005463if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5464 echo $ac_n "(cached) $ac_c" 1>&6
5465else
5466 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005467#line 5468 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005468#include "confdefs.h"
5469/* System header to define __stub macros and hopefully few prototypes,
5470 which can conflict with char $ac_func(); below. */
5471#include <assert.h>
5472/* Override any gcc2 internal prototype to avoid an error. */
5473/* We use char because int might match the return type of a gcc2
5474 builtin and then its argument prototype would still apply. */
5475char $ac_func();
5476
5477int main() {
5478
5479/* The GNU C library defines this for functions which it implements
5480 to always fail with ENOSYS. Some functions are actually named
5481 something starting with __ and the normal name is an alias. */
5482#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5483choke me
5484#else
5485$ac_func();
5486#endif
5487
5488; return 0; }
5489EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005490if { (eval echo configure:5491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005491 rm -rf conftest*
5492 eval "ac_cv_func_$ac_func=yes"
5493else
5494 echo "configure: failed program was:" >&5
5495 cat conftest.$ac_ext >&5
5496 rm -rf conftest*
5497 eval "ac_cv_func_$ac_func=no"
5498fi
5499rm -f conftest*
5500fi
5501
5502if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5503 echo "$ac_t""yes" 1>&6
5504 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5505 cat >> confdefs.h <<EOF
5506#define $ac_tr_func 1
5507EOF
5508
5509else
5510 echo "$ac_t""no" 1>&6
5511fi
5512done
5513
5514
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005515# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005516echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005517echo "configure:5518: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005518if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005519 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005520else
5521 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005522#line 5523 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005523#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005524#include <sys/types.h>
5525#include <sys/time.h>
5526#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005527int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005528struct tm *tp;
5529; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005530EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005531if { (eval echo configure:5532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005532 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005533 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005534else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005535 echo "configure: failed program was:" >&5
5536 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005537 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005538 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005539fi
5540rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005541fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005542
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005543echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005544if test $ac_cv_header_time = yes; then
5545 cat >> confdefs.h <<\EOF
5546#define TIME_WITH_SYS_TIME 1
5547EOF
5548
5549fi
5550
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005551echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005552echo "configure:5553: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005553if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005554 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005555else
5556 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005557#line 5558 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005558#include "confdefs.h"
5559#include <sys/types.h>
5560#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005561int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005562struct tm *tp; tp->tm_sec;
5563; return 0; }
5564EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005565if { (eval echo configure:5566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005566 rm -rf conftest*
5567 ac_cv_struct_tm=time.h
5568else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005569 echo "configure: failed program was:" >&5
5570 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005571 rm -rf conftest*
5572 ac_cv_struct_tm=sys/time.h
5573fi
5574rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005575fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005576
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005577echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005578if test $ac_cv_struct_tm = sys/time.h; then
5579 cat >> confdefs.h <<\EOF
5580#define TM_IN_SYS_TIME 1
5581EOF
5582
5583fi
5584
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005585echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005586echo "configure:5587: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005587if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005588 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005589else
5590 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005591#line 5592 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005592#include "confdefs.h"
5593#include <sys/types.h>
5594#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005595int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005596struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005597; return 0; }
5598EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005599if { (eval echo configure:5600: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005600 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005601 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005602else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005603 echo "configure: failed program was:" >&5
5604 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005605 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005606 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005607fi
5608rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005609fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005610
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005611echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5612if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005613 cat >> confdefs.h <<\EOF
5614#define HAVE_TM_ZONE 1
5615EOF
5616
5617else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005618 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005619echo "configure:5620: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005620if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005621 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005622else
5623 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005624#line 5625 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005625#include "confdefs.h"
5626#include <time.h>
5627#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005628extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005629#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00005630int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005631atoi(*tzname);
5632; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005633EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005634if { (eval echo configure:5635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005635 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005636 ac_cv_var_tzname=yes
5637else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005638 echo "configure: failed program was:" >&5
5639 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005640 rm -rf conftest*
5641 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005642fi
5643rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005644fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005645
5646echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005647 if test $ac_cv_var_tzname = yes; then
5648 cat >> confdefs.h <<\EOF
5649#define HAVE_TZNAME 1
5650EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005651
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005652 fi
5653fi
5654
5655
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005656echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005657echo "configure:5658: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005658if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005659 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005660else
5661 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005662#line 5663 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005663#include "confdefs.h"
5664#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005665int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005666return altzone;
5667; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005668EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005669if { (eval echo configure:5670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005670 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005671 ac_cv_header_time_altzone=yes
5672else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005673 echo "configure: failed program was:" >&5
5674 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005675 rm -rf conftest*
5676 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005677fi
5678rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005679fi
5680
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005681echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005682if test $ac_cv_header_time_altzone = yes; then
5683 cat >> confdefs.h <<\EOF
5684#define HAVE_ALTZONE 1
5685EOF
5686
5687fi
5688
Guido van Rossumda88dad1995-01-26 00:46:29 +00005689was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005690echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005691echo "configure:5692: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005692cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005693#line 5694 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005694#include "confdefs.h"
5695
5696#include <sys/types.h>
5697#include <sys/select.h>
5698#include <sys/time.h>
5699
Guido van Rossumf78abae1997-01-21 22:02:36 +00005700int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005701;
5702; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005703EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005704if { (eval echo configure:5705: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005705 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005706 cat >> confdefs.h <<\EOF
5707#define SYS_SELECT_WITH_SYS_TIME 1
5708EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005709 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005710else
5711 echo "configure: failed program was:" >&5
5712 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005713fi
5714rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005715echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005716
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005717echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005718echo "configure:5719: checking for addrinfo" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005719if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
5720 echo $ac_n "(cached) $ac_c" 1>&6
5721else
5722 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005723#line 5724 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005724#include "confdefs.h"
5725
5726# include <netdb.h>
5727int main() {
5728struct addrinfo a
5729; return 0; }
5730EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005731if { (eval echo configure:5732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005732 rm -rf conftest*
5733 ac_cv_struct_addrinfo=yes
5734else
5735 echo "configure: failed program was:" >&5
5736 cat conftest.$ac_ext >&5
5737 rm -rf conftest*
5738 ac_cv_struct_addrinfo=no
5739fi
5740rm -f conftest*
5741fi
5742
5743echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
5744if test $ac_cv_struct_addrinfo = yes; then
5745 cat >> confdefs.h <<\EOF
5746#define HAVE_ADDRINFO 1
5747EOF
5748
5749fi
5750
5751echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005752echo "configure:5753: checking for sockaddr_storage" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005753if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
5754 echo $ac_n "(cached) $ac_c" 1>&6
5755else
5756 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005757#line 5758 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005758#include "confdefs.h"
5759
5760# include <sys/types.h>
5761# include <sys/socket.h>
5762int main() {
5763struct sockaddr_storage s
5764; return 0; }
5765EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005766if { (eval echo configure:5767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005767 rm -rf conftest*
5768 ac_cv_struct_sockaddr_storage=yes
5769else
5770 echo "configure: failed program was:" >&5
5771 cat conftest.$ac_ext >&5
5772 rm -rf conftest*
5773 ac_cv_struct_sockaddr_storage=no
5774fi
5775rm -f conftest*
5776fi
5777
5778echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
5779if test $ac_cv_struct_sockaddr_storage = yes; then
5780 cat >> confdefs.h <<\EOF
5781#define HAVE_SOCKADDR_STORAGE 1
5782EOF
5783
5784fi
5785
Guido van Rossum627b2d71993-12-24 10:39:16 +00005786# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00005787
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005788echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005789echo "configure:5790: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005790if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005791 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005792else
5793 if test "$GCC" = yes; then
5794 # GCC predefines this symbol on systems where it applies.
5795cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005796#line 5797 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005797#include "confdefs.h"
5798#ifdef __CHAR_UNSIGNED__
5799 yes
5800#endif
5801
5802EOF
5803if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5804 egrep "yes" >/dev/null 2>&1; then
5805 rm -rf conftest*
5806 ac_cv_c_char_unsigned=yes
5807else
5808 rm -rf conftest*
5809 ac_cv_c_char_unsigned=no
5810fi
5811rm -f conftest*
5812
5813else
5814if test "$cross_compiling" = yes; then
5815 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5816else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005817 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005818#line 5819 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005819#include "confdefs.h"
5820/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005821#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005822#define volatile
5823#endif
5824main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005825 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005826}
5827EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005828if { (eval echo configure:5829: \"$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 +00005829then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005830 ac_cv_c_char_unsigned=yes
5831else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005832 echo "configure: failed program was:" >&5
5833 cat conftest.$ac_ext >&5
5834 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005835 ac_cv_c_char_unsigned=no
5836fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005837rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005838fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005839
5840fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005841fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005842
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005843echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005844if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5845 cat >> confdefs.h <<\EOF
5846#define __CHAR_UNSIGNED__ 1
5847EOF
5848
5849fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005850
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005851echo $ac_n "checking for working const""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005852echo "configure:5853: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005853if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005854 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005855else
5856 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005857#line 5858 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005858#include "confdefs.h"
5859
Guido van Rossumf78abae1997-01-21 22:02:36 +00005860int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005861
5862/* Ultrix mips cc rejects this. */
Martin v. Löwis9db2f572001-07-23 01:30:10 +00005863typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005864/* SunOS 4.1.1 cc rejects this. */
5865char const *const *ccp;
5866char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005867/* NEC SVR4.0.2 mips cc rejects this. */
5868struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005869static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005870/* AIX XL C 1.02.0.0 rejects this.
5871 It does not let you subtract one const X* pointer from another in an arm
5872 of an if-expression whose if-part is not a constant expression */
5873const char *g = "string";
5874ccp = &g + (g ? g-g : 0);
5875/* HPUX 7.0 cc rejects these. */
5876++ccp;
5877p = (char**) ccp;
5878ccp = (char const *const *) p;
5879{ /* SCO 3.2v4 cc rejects this. */
5880 char *t;
5881 char const *s = 0 ? (char *) 0 : (char const *) 0;
5882
5883 *t++ = 0;
5884}
5885{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005886 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005887 const int *foo = &x[0];
5888 ++foo;
5889}
5890{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5891 typedef const int *iptr;
5892 iptr p = 0;
5893 ++p;
5894}
5895{ /* AIX XL C 1.02.0.0 rejects this saying
5896 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5897 struct s { int j; const int *ap[3]; };
5898 struct s *b; b->j = 5;
5899}
5900{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5901 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005902}
5903
5904; return 0; }
5905EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005906if { (eval echo configure:5907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005907 rm -rf conftest*
5908 ac_cv_c_const=yes
5909else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005910 echo "configure: failed program was:" >&5
5911 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005912 rm -rf conftest*
5913 ac_cv_c_const=no
5914fi
5915rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005916fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005917
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005918echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005919if test $ac_cv_c_const = no; then
5920 cat >> confdefs.h <<\EOF
5921#define const
5922EOF
5923
5924fi
5925
5926
Guido van Rossumda88dad1995-01-26 00:46:29 +00005927works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005928echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005929echo "configure:5930: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005930cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005931#line 5932 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005932#include "confdefs.h"
5933
Guido van Rossumf78abae1997-01-21 22:02:36 +00005934int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005935volatile int x; x = 0;
5936; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005937EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005938if { (eval echo configure:5939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005939 rm -rf conftest*
5940 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005941else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005942 echo "configure: failed program was:" >&5
5943 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005944 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005945 cat >> confdefs.h <<\EOF
5946#define volatile
5947EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005948
5949fi
5950rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005951echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005952
Guido van Rossumda88dad1995-01-26 00:46:29 +00005953works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005954echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005955echo "configure:5956: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005956cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005957#line 5958 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005958#include "confdefs.h"
5959
Guido van Rossumf78abae1997-01-21 22:02:36 +00005960int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005961signed char c;
5962; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005963EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005964if { (eval echo configure:5965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005965 rm -rf conftest*
5966 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005967else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005968 echo "configure: failed program was:" >&5
5969 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005970 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005971 cat >> confdefs.h <<\EOF
5972#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005973EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005974
5975fi
5976rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005977echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005978
Guido van Rossumda88dad1995-01-26 00:46:29 +00005979have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005980echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00005981echo "configure:5982: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005982cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005983#line 5984 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005984#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005985int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005986int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005987return foo(10);
5988; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005989EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00005990if { (eval echo configure:5991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005991 rm -rf conftest*
5992 cat >> confdefs.h <<\EOF
5993#define HAVE_PROTOTYPES 1
5994EOF
5995 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005996else
5997 echo "configure: failed program was:" >&5
5998 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005999fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006000rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006001echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006002
Guido van Rossumda88dad1995-01-26 00:46:29 +00006003works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006004echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006005echo "configure:6006: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006006cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006007#line 6008 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006008#include "confdefs.h"
6009
6010#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00006011int foo(int x, ...) {
6012 va_list va;
6013 va_start(va, x);
6014 va_arg(va, int);
6015 va_arg(va, char *);
6016 va_arg(va, double);
6017 return 0;
6018}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006019
Guido van Rossumf78abae1997-01-21 22:02:36 +00006020int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00006021return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006022; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006023EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006024if { (eval echo configure:6025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006025 rm -rf conftest*
6026 cat >> confdefs.h <<\EOF
6027#define HAVE_STDARG_PROTOTYPES 1
6028EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006029 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006030else
6031 echo "configure: failed program was:" >&5
6032 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006033fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006034rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006035echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006036
Guido van Rossumda88dad1995-01-26 00:46:29 +00006037if test "$have_prototypes" = yes; then
6038bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006039echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006040echo "configure:6041: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006041cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006042#line 6043 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006043#include "confdefs.h"
6044#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00006045int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006046char **t;execve("@",t,t);
6047; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006048EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006049if { (eval echo configure:6050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006050 :
6051else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006052 echo "configure: failed program was:" >&5
6053 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006054 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006055 cat >> confdefs.h <<\EOF
6056#define BAD_EXEC_PROTOTYPES 1
6057EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006058 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006059fi
6060rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006061echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006062fi
6063
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006064# check if sockaddr has sa_len member
6065echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006066echo "configure:6067: checking if sockaddr has sa_len member" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006067cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006068#line 6069 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006069#include "confdefs.h"
6070#include <sys/types.h>
6071#include <sys/socket.h>
6072int main() {
6073struct sockaddr x;
6074x.sa_len = 0;
6075; return 0; }
6076EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006077if { (eval echo configure:6078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006078 rm -rf conftest*
6079 echo "$ac_t""yes" 1>&6
6080 cat >> confdefs.h <<\EOF
6081#define HAVE_SOCKADDR_SA_LEN 1
6082EOF
6083
6084else
6085 echo "configure: failed program was:" >&5
6086 cat conftest.$ac_ext >&5
6087 rm -rf conftest*
6088 echo "$ac_t""no" 1>&6
6089fi
6090rm -f conftest*
6091
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006092echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006093echo "configure:6094: checking for bad static forward" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006094if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
6095 echo $ac_n "(cached) $ac_c" 1>&6
6096else
6097 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006098 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006099else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006100 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006101#line 6102 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006102#include "confdefs.h"
6103
6104struct s { int a; int b; };
6105static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006106int foobar() {
6107 static int random;
6108 random = (int) &foo;
6109 return random;
6110}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006111static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006112main() {
6113 exit(!((int)&foo == foobar()));
6114}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006115EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006116if { (eval echo configure:6117: \"$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 +00006117then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006118 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006119else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006120 echo "configure: failed program was:" >&5
6121 cat conftest.$ac_ext >&5
6122 rm -fr conftest*
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006123 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006124fi
6125rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006126fi
6127
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006128fi
6129
6130echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
6131if test "$ac_cv_bad_static_forward" = yes
6132then
6133 cat >> confdefs.h <<\EOF
6134#define BAD_STATIC_FORWARD 1
6135EOF
6136
6137fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006138
Guido van Rossumda88dad1995-01-26 00:46:29 +00006139va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006140echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006141echo "configure:6142: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006142cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006143#line 6144 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006144#include "confdefs.h"
6145
6146#ifdef HAVE_STDARG_PROTOTYPES
6147#include <stdarg.h>
6148#else
6149#include <varargs.h>
6150#endif
6151
Guido van Rossumf78abae1997-01-21 22:02:36 +00006152int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006153va_list list1, list2; list1 = list2;
6154; return 0; }
6155EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006156if { (eval echo configure:6157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006157 :
6158else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006159 echo "configure: failed program was:" >&5
6160 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006161 rm -rf conftest*
6162 cat >> confdefs.h <<\EOF
6163#define VA_LIST_IS_ARRAY 1
6164EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006165 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006166fi
6167rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006168echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006169
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006170# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
6171echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006172echo "configure:6173: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006173if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006174 echo $ac_n "(cached) $ac_c" 1>&6
6175else
6176 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006177#line 6178 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006178#include "confdefs.h"
6179/* System header to define __stub macros and hopefully few prototypes,
6180 which can conflict with char gethostbyname_r(); below. */
6181#include <assert.h>
6182/* Override any gcc2 internal prototype to avoid an error. */
6183/* We use char because int might match the return type of a gcc2
6184 builtin and then its argument prototype would still apply. */
6185char gethostbyname_r();
6186
6187int main() {
6188
6189/* The GNU C library defines this for functions which it implements
6190 to always fail with ENOSYS. Some functions are actually named
6191 something starting with __ and the normal name is an alias. */
6192#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6193choke me
6194#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006195gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006196#endif
6197
6198; return 0; }
6199EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006200if { (eval echo configure:6201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006201 rm -rf conftest*
6202 eval "ac_cv_func_gethostbyname_r=yes"
6203else
6204 echo "configure: failed program was:" >&5
6205 cat conftest.$ac_ext >&5
6206 rm -rf conftest*
6207 eval "ac_cv_func_gethostbyname_r=no"
6208fi
6209rm -f conftest*
6210fi
6211
6212if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6213 echo "$ac_t""yes" 1>&6
6214
6215 cat >> confdefs.h <<\EOF
6216#define HAVE_GETHOSTBYNAME_R 1
6217EOF
6218
6219 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006220echo "configure:6221: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006221 OLD_CFLAGS=$CFLAGS
6222 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
6223 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006224#line 6225 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006225#include "confdefs.h"
6226
6227# include <netdb.h>
6228
6229int main() {
6230
6231 char *name;
6232 struct hostent *he, *res;
6233 char buffer[2048];
6234 int buflen = 2048;
6235 int h_errnop;
6236
6237 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
6238
6239; return 0; }
6240EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006241if { (eval echo configure:6242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006242 rm -rf conftest*
6243
6244 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006245#define HAVE_GETHOSTBYNAME_R 1
6246EOF
6247
6248 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006249#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6250EOF
6251
6252 echo "$ac_t""yes" 1>&6
6253
6254else
6255 echo "configure: failed program was:" >&5
6256 cat conftest.$ac_ext >&5
6257 rm -rf conftest*
6258
6259 echo "$ac_t""no" 1>&6
6260 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006261echo "configure:6262: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006262 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006263#line 6264 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006264#include "confdefs.h"
6265
6266# include <netdb.h>
6267
6268int main() {
6269
6270 char *name;
6271 struct hostent *he;
6272 char buffer[2048];
6273 int buflen = 2048;
6274 int h_errnop;
6275
6276 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
6277
6278; return 0; }
6279EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006280if { (eval echo configure:6281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006281 rm -rf conftest*
6282
6283 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006284#define HAVE_GETHOSTBYNAME_R 1
6285EOF
6286
6287 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006288#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6289EOF
6290
6291 echo "$ac_t""yes" 1>&6
6292
6293else
6294 echo "configure: failed program was:" >&5
6295 cat conftest.$ac_ext >&5
6296 rm -rf conftest*
6297
6298 echo "$ac_t""no" 1>&6
6299 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006300echo "configure:6301: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006301 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006302#line 6303 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006303#include "confdefs.h"
6304
6305# include <netdb.h>
6306
6307int main() {
6308
6309 char *name;
6310 struct hostent *he;
6311 struct hostent_data data;
6312
6313 (void) gethostbyname_r(name, he, &data);
6314
6315; return 0; }
6316EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006317if { (eval echo configure:6318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006318 rm -rf conftest*
6319
6320 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006321#define HAVE_GETHOSTBYNAME_R 1
6322EOF
6323
6324 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006325#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6326EOF
6327
6328 echo "$ac_t""yes" 1>&6
6329
6330else
6331 echo "configure: failed program was:" >&5
6332 cat conftest.$ac_ext >&5
6333 rm -rf conftest*
6334
6335 echo "$ac_t""no" 1>&6
6336
6337fi
6338rm -f conftest*
6339
6340fi
6341rm -f conftest*
6342
6343fi
6344rm -f conftest*
6345 CFLAGS=$OLD_CFLAGS
6346
6347else
6348 echo "$ac_t""no" 1>&6
6349
Thomas Wouters3a584202000-08-05 23:28:51 +00006350 for ac_func in gethostbyname
6351do
6352echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006353echo "configure:6354: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006354if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006355 echo $ac_n "(cached) $ac_c" 1>&6
6356else
6357 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006358#line 6359 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006359#include "confdefs.h"
6360/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00006361 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006362#include <assert.h>
6363/* Override any gcc2 internal prototype to avoid an error. */
6364/* We use char because int might match the return type of a gcc2
6365 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006366char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006367
6368int main() {
6369
6370/* The GNU C library defines this for functions which it implements
6371 to always fail with ENOSYS. Some functions are actually named
6372 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006373#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006374choke me
6375#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006376$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006377#endif
6378
6379; return 0; }
6380EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006381if { (eval echo configure:6382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006382 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006383 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006384else
6385 echo "configure: failed program was:" >&5
6386 cat conftest.$ac_ext >&5
6387 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006388 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006389fi
6390rm -f conftest*
6391fi
6392
Thomas Wouters3a584202000-08-05 23:28:51 +00006393if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006394 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00006395 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6396 cat >> confdefs.h <<EOF
6397#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006398EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00006399
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006400else
6401 echo "$ac_t""no" 1>&6
6402fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006403done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006404
6405
6406fi
6407
6408
6409
6410
6411
6412
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006413
Guido van Rossum627b2d71993-12-24 10:39:16 +00006414# checks for system services
6415# (none yet)
6416
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006417# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006418echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006419echo "configure:6420: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006420if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006421 echo $ac_n "(cached) $ac_c" 1>&6
6422else
6423 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006424#line 6425 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006425#include "confdefs.h"
6426/* System header to define __stub macros and hopefully few prototypes,
6427 which can conflict with char __fpu_control(); below. */
6428#include <assert.h>
6429/* Override any gcc2 internal prototype to avoid an error. */
6430/* We use char because int might match the return type of a gcc2
6431 builtin and then its argument prototype would still apply. */
6432char __fpu_control();
6433
6434int main() {
6435
6436/* The GNU C library defines this for functions which it implements
6437 to always fail with ENOSYS. Some functions are actually named
6438 something starting with __ and the normal name is an alias. */
6439#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6440choke me
6441#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006442__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006443#endif
6444
6445; return 0; }
6446EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006447if { (eval echo configure:6448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006448 rm -rf conftest*
6449 eval "ac_cv_func___fpu_control=yes"
6450else
6451 echo "configure: failed program was:" >&5
6452 cat conftest.$ac_ext >&5
6453 rm -rf conftest*
6454 eval "ac_cv_func___fpu_control=no"
6455fi
6456rm -f conftest*
6457fi
6458
6459if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6460 echo "$ac_t""yes" 1>&6
6461 :
6462else
6463 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006464echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006465echo "configure:6466: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00006466ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006467if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006468 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006469else
6470 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006471LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006472cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006473#line 6474 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006474#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006475/* Override any gcc2 internal prototype to avoid an error. */
6476/* We use char because int might match the return type of a gcc2
6477 builtin and then its argument prototype would still apply. */
6478char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00006479
Guido van Rossumf78abae1997-01-21 22:02:36 +00006480int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006481__fpu_control()
6482; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006483EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006484if { (eval echo configure:6485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006485 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006486 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006487else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006488 echo "configure: failed program was:" >&5
6489 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006490 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006491 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006492fi
6493rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006494LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006495
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006496fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006497if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006498 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006499 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6500 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006501 cat >> confdefs.h <<EOF
6502#define $ac_tr_lib 1
6503EOF
6504
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006505 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006506
6507else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006508 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006509fi
6510
6511
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006512fi
6513
6514
Guido van Rossum7f253911997-05-09 02:42:48 +00006515# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00006516echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006517echo "configure:6518: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006518# Check whether --with-fpectl or --without-fpectl was given.
6519if test "${with_fpectl+set}" = set; then
6520 withval="$with_fpectl"
6521
6522if test "$withval" != no
6523then cat >> confdefs.h <<\EOF
6524#define WANT_SIGFPE_HANDLER 1
6525EOF
6526 echo "$ac_t""yes" 1>&6
6527else echo "$ac_t""no" 1>&6
6528fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006529else
6530 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006531fi
6532
6533
Guido van Rossum7f43da71994-08-01 12:15:30 +00006534# check for --with-libm=...
6535
Guido van Rossum563e7081996-09-10 18:20:48 +00006536case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006537Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006538BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006539*) LIBM=-lm
6540esac
Guido van Rossum7f253911997-05-09 02:42:48 +00006541echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006542echo "configure:6543: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006543# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006544if test "${with_libm+set}" = set; then
6545 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006546
Guido van Rossum7f253911997-05-09 02:42:48 +00006547if test "$withval" = no
6548then LIBM=
6549 echo "$ac_t""force LIBM empty" 1>&6
6550elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006551then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006552 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006553else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006554fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006555else
6556 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006557fi
6558
6559
6560# check for --with-libc=...
6561
Guido van Rossum7f253911997-05-09 02:42:48 +00006562echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006563echo "configure:6564: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006564# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006565if test "${with_libc+set}" = set; then
6566 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006567
Guido van Rossum7f253911997-05-09 02:42:48 +00006568if test "$withval" = no
6569then LIBC=
6570 echo "$ac_t""force LIBC empty" 1>&6
6571elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006572then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006573 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006574else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006575fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006576else
6577 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006578fi
6579
6580
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006581# check for hypot() in math library
6582LIBS_SAVE=$LIBS
6583LIBS="$LIBS $LIBM"
6584for ac_func in hypot
6585do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006586echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006587echo "configure:6588: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006588if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006589 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006590else
6591 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006592#line 6593 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006593#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006594/* System header to define __stub macros and hopefully few prototypes,
6595 which can conflict with char $ac_func(); below. */
6596#include <assert.h>
6597/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006598/* We use char because int might match the return type of a gcc2
6599 builtin and then its argument prototype would still apply. */
6600char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006601
Guido van Rossumf78abae1997-01-21 22:02:36 +00006602int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006603
6604/* The GNU C library defines this for functions which it implements
6605 to always fail with ENOSYS. Some functions are actually named
6606 something starting with __ and the normal name is an alias. */
6607#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6608choke me
6609#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006610$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006611#endif
6612
6613; return 0; }
6614EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006615if { (eval echo configure:6616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006616 rm -rf conftest*
6617 eval "ac_cv_func_$ac_func=yes"
6618else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006619 echo "configure: failed program was:" >&5
6620 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006621 rm -rf conftest*
6622 eval "ac_cv_func_$ac_func=no"
6623fi
6624rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006625fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00006626
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006627if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6628 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006629 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6630 cat >> confdefs.h <<EOF
6631#define $ac_tr_func 1
6632EOF
6633
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006634else
6635 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006636LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006637fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006638done
6639
Guido van Rossumf78abae1997-01-21 22:02:36 +00006640
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006641LIBS=$LIBS_SAVE
6642
Guido van Rossumad713701997-07-10 22:42:38 +00006643# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00006644echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006645echo "configure:6646: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006646if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00006647 echo $ac_n "(cached) $ac_c" 1>&6
6648else
6649 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006650 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +00006651else
6652 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006653#line 6654 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006654#include "confdefs.h"
6655#include <stdio.h>
6656#ifdef HAVE_STDLIB
6657#include <stdlib.h>
6658#else
6659char *malloc(), *realloc();
6660int *free();
6661#endif
6662main() {
6663 char *p;
6664 p = malloc(0);
6665 if (p == NULL) exit(1);
6666 p = realloc(p, 0);
6667 if (p == NULL) exit(1);
6668 free(p);
6669 exit(0);
6670}
6671EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006672if { (eval echo configure:6673: \"$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 +00006673then
6674 ac_cv_malloc_zero=nonnull
6675else
6676 echo "configure: failed program was:" >&5
6677 cat conftest.$ac_ext >&5
6678 rm -fr conftest*
6679 ac_cv_malloc_zero=null
6680fi
6681rm -fr conftest*
6682fi
6683
6684fi
Guido van Rossum3065c942001-09-17 04:03:14 +00006685 # XXX arm cross-compile?
Guido van Rossumad713701997-07-10 22:42:38 +00006686echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6687if test "$ac_cv_malloc_zero" = null
6688then
6689 cat >> confdefs.h <<\EOF
6690#define MALLOC_ZERO_RETURNS_NULL 1
6691EOF
6692
6693fi
6694
Guido van Rossumef2255b2000-03-10 22:30:29 +00006695# check for wchar.h
6696ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6697echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006698echo "configure:6699: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006699if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006700 echo $ac_n "(cached) $ac_c" 1>&6
6701else
6702 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006703#line 6704 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006704#include "confdefs.h"
6705#include <wchar.h>
6706EOF
6707ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen127e56e2001-09-11 14:41:54 +00006708{ (eval echo configure:6709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006709ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6710if test -z "$ac_err"; then
6711 rm -rf conftest*
6712 eval "ac_cv_header_$ac_safe=yes"
6713else
6714 echo "$ac_err" >&5
6715 echo "configure: failed program was:" >&5
6716 cat conftest.$ac_ext >&5
6717 rm -rf conftest*
6718 eval "ac_cv_header_$ac_safe=no"
6719fi
6720rm -f conftest*
6721fi
6722if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6723 echo "$ac_t""yes" 1>&6
6724 cat >> confdefs.h <<\EOF
6725#define HAVE_WCHAR_H 1
6726EOF
6727 wchar_h="yes"
6728else
6729 echo "$ac_t""no" 1>&6
6730wchar_h="no"
6731
6732fi
6733
6734
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006735# determine wchar_t size
6736if test "$wchar_h" = yes
6737then
6738 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006739echo "configure:6740: checking size of wchar_t" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006740if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
6741 echo $ac_n "(cached) $ac_c" 1>&6
6742else
6743 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006744 ac_cv_sizeof_wchar_t=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00006745else
6746 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006747#line 6748 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006748#include "confdefs.h"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006749#include <stdio.h>
6750main()
6751{
6752 FILE *f=fopen("conftestval", "w");
6753 if (!f) exit(1);
6754 fprintf(f, "%d\n", sizeof(wchar_t));
Guido van Rossumef2255b2000-03-10 22:30:29 +00006755 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00006756}
Guido van Rossumef2255b2000-03-10 22:30:29 +00006757EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006758if { (eval echo configure:6759: \"$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 +00006759then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006760 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006761else
6762 echo "configure: failed program was:" >&5
6763 cat conftest.$ac_ext >&5
6764 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006765 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00006766fi
6767rm -fr conftest*
6768fi
6769
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006770fi
6771echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
6772cat >> confdefs.h <<EOF
6773#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
6774EOF
6775
6776
6777fi
6778
6779echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006780echo "configure:6781: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006781# Check whether --enable-unicode or --disable-unicode was given.
6782if test "${enable_unicode+set}" = set; then
6783 enableval="$enable_unicode"
6784 :
6785else
6786 enable_unicode=yes
6787fi
6788
6789
6790if test $enable_unicode = yes
6791then
Martin v. Löwisfd917792001-06-27 20:22:04 +00006792 # Without any arguments, Py_UNICODE defaults to two-byte mode
6793 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006794fi
6795
6796case "$enable_unicode" in
6797ucs2) unicode_size="2"
6798 cat >> confdefs.h <<\EOF
6799#define Py_UNICODE_SIZE 2
6800EOF
6801
6802 ;;
6803ucs4) unicode_size="4"
6804 cat >> confdefs.h <<\EOF
6805#define Py_UNICODE_SIZE 4
6806EOF
6807
6808 ;;
6809esac
6810
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006811
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006812if test "$enable_unicode" = "no"
6813then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006814 UNICODE_OBJS=""
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006815 echo "$ac_t""not used" 1>&6
6816else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006817 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006818 cat >> confdefs.h <<\EOF
6819#define Py_USING_UNICODE 1
6820EOF
6821
6822 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
6823 then
6824 PY_UNICODE_TYPE="wchar_t"
6825 cat >> confdefs.h <<\EOF
6826#define HAVE_USABLE_WCHAR_T 1
6827EOF
6828
6829 cat >> confdefs.h <<\EOF
6830#define PY_UNICODE_TYPE wchar_t
6831EOF
6832
6833 elif test "$ac_cv_sizeof_short" = "$unicode_size"
6834 then
6835 PY_UNICODE_TYPE="unsigned short"
6836 cat >> confdefs.h <<\EOF
6837#define PY_UNICODE_TYPE unsigned short
6838EOF
6839
6840 elif test "$ac_cv_sizeof_long" = "$unicode_size"
6841 then
6842 PY_UNICODE_TYPE="unsigned long"
6843 cat >> confdefs.h <<\EOF
6844#define PY_UNICODE_TYPE unsigned long
6845EOF
6846
6847 else
6848 PY_UNICODE_TYPE="no type found"
6849 fi
6850 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
6851fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006852
6853# check for endianness
6854echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006855echo "configure:6856: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006856if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006857 echo $ac_n "(cached) $ac_c" 1>&6
6858else
6859 ac_cv_c_bigendian=unknown
6860# See if sys/param.h defines the BYTE_ORDER macro.
6861cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006862#line 6863 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006863#include "confdefs.h"
6864#include <sys/types.h>
6865#include <sys/param.h>
6866int main() {
6867
6868#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6869 bogus endian macros
6870#endif
6871; return 0; }
6872EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006873if { (eval echo configure:6874: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006874 rm -rf conftest*
6875 # It does; now see whether it defined to BIG_ENDIAN or not.
6876cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006877#line 6878 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006878#include "confdefs.h"
6879#include <sys/types.h>
6880#include <sys/param.h>
6881int main() {
6882
6883#if BYTE_ORDER != BIG_ENDIAN
6884 not big endian
6885#endif
6886; return 0; }
6887EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006888if { (eval echo configure:6889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006889 rm -rf conftest*
6890 ac_cv_c_bigendian=yes
6891else
6892 echo "configure: failed program was:" >&5
6893 cat conftest.$ac_ext >&5
6894 rm -rf conftest*
6895 ac_cv_c_bigendian=no
6896fi
6897rm -f conftest*
6898else
6899 echo "configure: failed program was:" >&5
6900 cat conftest.$ac_ext >&5
6901fi
6902rm -f conftest*
6903if test $ac_cv_c_bigendian = unknown; then
6904if test "$cross_compiling" = yes; then
6905 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6906else
6907 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006908#line 6909 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006909#include "confdefs.h"
6910main () {
6911 /* Are we little or big endian? From Harbison&Steele. */
6912 union
6913 {
6914 long l;
6915 char c[sizeof (long)];
6916 } u;
6917 u.l = 1;
6918 exit (u.c[sizeof (long) - 1] == 1);
6919}
6920EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006921if { (eval echo configure:6922: \"$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 +00006922then
6923 ac_cv_c_bigendian=no
6924else
6925 echo "configure: failed program was:" >&5
6926 cat conftest.$ac_ext >&5
6927 rm -fr conftest*
6928 ac_cv_c_bigendian=yes
6929fi
6930rm -fr conftest*
6931fi
6932
6933fi
6934fi
6935
6936echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6937if test $ac_cv_c_bigendian = yes; then
6938 cat >> confdefs.h <<\EOF
6939#define WORDS_BIGENDIAN 1
6940EOF
6941
6942fi
6943
6944
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006945# Check whether right shifting a negative integer extends the sign bit
6946# or fills with zeros (like the Cray J90, according to Tim Peters).
6947echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006948echo "configure:6949: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006949if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006950 echo $ac_n "(cached) $ac_c" 1>&6
6951else
6952
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006953if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006954 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006955else
6956 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006957#line 6958 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006958#include "confdefs.h"
6959
6960int main()
6961{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006962 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006963}
6964
6965EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006966if { (eval echo configure:6967: \"$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 +00006967then
6968 ac_cv_rshift_extends_sign=yes
6969else
6970 echo "configure: failed program was:" >&5
6971 cat conftest.$ac_ext >&5
6972 rm -fr conftest*
6973 ac_cv_rshift_extends_sign=no
6974fi
6975rm -fr conftest*
6976fi
6977
6978fi
6979
6980echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6981if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006982then
6983 cat >> confdefs.h <<\EOF
6984#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6985EOF
6986
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006987fi
6988
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006989# check for getc_unlocked and related locking functions
6990echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00006991echo "configure:6992: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006992if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6993 echo $ac_n "(cached) $ac_c" 1>&6
6994else
6995
6996cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00006997#line 6998 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006998#include "confdefs.h"
6999#include <stdio.h>
7000int main() {
7001
7002 FILE *f = fopen("/dev/null", "r");
7003 flockfile(f);
7004 getc_unlocked(f);
7005 funlockfile(f);
7006
7007; return 0; }
7008EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00007009if { (eval echo configure:7010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007010 rm -rf conftest*
7011 ac_cv_have_getc_unlocked=yes
7012else
7013 echo "configure: failed program was:" >&5
7014 cat conftest.$ac_ext >&5
7015 rm -rf conftest*
7016 ac_cv_have_getc_unlocked=no
7017fi
7018rm -f conftest*
7019fi
7020
7021echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
7022if test "$ac_cv_have_getc_unlocked" = yes
7023then
7024 cat >> confdefs.h <<\EOF
7025#define HAVE_GETC_UNLOCKED 1
7026EOF
7027
7028fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007029
Guido van Rossum353ae582001-07-10 16:45:32 +00007030# check for readline 4.2
7031echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00007032echo "configure:7033: checking for rl_completion_matches in -lreadline" >&5
Guido van Rossum353ae582001-07-10 16:45:32 +00007033ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
7034if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7035 echo $ac_n "(cached) $ac_c" 1>&6
7036else
7037 ac_save_LIBS="$LIBS"
7038LIBS="-lreadline -ltermcap $LIBS"
7039cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00007040#line 7041 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00007041#include "confdefs.h"
7042/* Override any gcc2 internal prototype to avoid an error. */
7043/* We use char because int might match the return type of a gcc2
7044 builtin and then its argument prototype would still apply. */
7045char rl_completion_matches();
7046
7047int main() {
7048rl_completion_matches()
7049; return 0; }
7050EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00007051if { (eval echo configure:7052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum353ae582001-07-10 16:45:32 +00007052 rm -rf conftest*
7053 eval "ac_cv_lib_$ac_lib_var=yes"
7054else
7055 echo "configure: failed program was:" >&5
7056 cat conftest.$ac_ext >&5
7057 rm -rf conftest*
7058 eval "ac_cv_lib_$ac_lib_var=no"
7059fi
7060rm -f conftest*
7061LIBS="$ac_save_LIBS"
7062
7063fi
7064if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7065 echo "$ac_t""yes" 1>&6
7066 cat >> confdefs.h <<\EOF
7067#define HAVE_RL_COMPLETION_MATCHES 1
7068EOF
7069
7070else
7071 echo "$ac_t""no" 1>&6
7072fi
7073
7074
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007075echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00007076echo "configure:7077: checking for broken nice()" >&5
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007077if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
7078 echo $ac_n "(cached) $ac_c" 1>&6
7079else
7080
7081if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007082 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007083else
7084 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00007085#line 7086 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007086#include "confdefs.h"
7087
7088int main()
7089{
7090 int val1 = nice(1);
7091 if (val1 != -1 && val1 == nice(2))
7092 exit(0);
7093 exit(1);
7094}
7095
7096EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00007097if { (eval echo configure:7098: \"$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 +00007098then
7099 ac_cv_broken_nice=yes
7100else
7101 echo "configure: failed program was:" >&5
7102 cat conftest.$ac_ext >&5
7103 rm -fr conftest*
7104 ac_cv_broken_nice=no
7105fi
7106rm -fr conftest*
7107fi
7108
7109fi
7110
7111echo "$ac_t""$ac_cv_broken_nice" 1>&6
7112if test "$ac_cv_broken_nice" = yes
7113then
7114 cat >> confdefs.h <<\EOF
7115#define HAVE_BROKEN_NICE 1
7116EOF
7117
7118fi
7119
Guido van Rossum95713eb2000-05-18 20:53:31 +00007120# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7121# Add sys/socket.h to confdefs.h
7122cat >> confdefs.h <<\EOF
7123#ifdef HAVE_SYS_SOCKET_H
7124#include <sys/socket.h>
7125#endif
7126EOF
7127echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00007128echo "configure:7129: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007129if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00007130 echo $ac_n "(cached) $ac_c" 1>&6
7131else
7132 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00007133#line 7134 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007134#include "confdefs.h"
7135#include <sys/types.h>
7136#if STDC_HEADERS
7137#include <stdlib.h>
7138#include <stddef.h>
7139#endif
7140EOF
7141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7142 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7143 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007144 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007145else
7146 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007147 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007148fi
7149rm -f conftest*
7150
7151fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007152echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7153if test $ac_cv_type_socklen_t = no; then
7154 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007155#define socklen_t int
7156EOF
7157
7158fi
7159
7160
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007161# Add Python/ prefix to LIBOBJS
7162libobjs=$LIBOBJS
7163LIBOBJS=
7164for obj in $libobjs; do
7165 LIBOBJS="$LIBOBJS Python/$obj"
7166done
7167
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007168#AC_MSG_CHECKING(for Modules/Setup)
7169#if test ! -f Modules/Setup ; then
7170# if test ! -d Modules ; then
7171# mkdir Modules
7172# fi
7173# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7174# AC_MSG_RESULT(creating)
7175#else
7176# AC_MSG_RESULT(already exists)
7177#fi
7178
7179
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007180SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007181echo $ac_n "checking for build directories""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00007182echo "configure:7183: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007183for dir in $SRCDIRS; do
7184 if test ! -d $dir; then
7185 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007186 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007187done
7188echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007189
Guido van Rossum627b2d71993-12-24 10:39:16 +00007190# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007191trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007192cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007193# This file is a shell script that caches the results of configure
7194# tests run on this system so they can be shared between configure
7195# scripts and configure runs. It is not useful on other systems.
7196# If it contains results you don't want to keep, you may remove or edit it.
7197#
7198# By default, configure uses ./config.cache as the cache file,
7199# creating it if it does not exist already. You can give configure
7200# the --cache-file=FILE option to use a different cache file; that is
7201# what configure does when it calls configure scripts in
7202# subdirectories, so they share the cache.
7203# Giving --cache-file=/dev/null disables caching, for debugging configure.
7204# config.status only pays attention to the cache file if you give it the
7205# --recheck option to rerun configure.
7206#
7207EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007208# The following way of writing the cache mishandles newlines in values,
7209# but we know of no workaround that is simple, portable, and efficient.
7210# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007211# Ultrix sh set writes to stderr and can't be redirected directly,
7212# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007213(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007214 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007215 *ac_space=\ *)
7216 # `set' does not quote correctly, so add quotes (double-quote substitution
7217 # turns \\\\ into \\, and sed turns \\ into \).
7218 sed -n \
7219 -e "s/'/'\\\\''/g" \
7220 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7221 ;;
7222 *)
7223 # `set' quotes correctly as required by POSIX, so do not add quotes.
7224 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7225 ;;
7226 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007227if cmp -s $cache_file confcache; then
7228 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007229else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007230 if test -w $cache_file; then
7231 echo "updating cache $cache_file"
7232 cat confcache > $cache_file
7233 else
7234 echo "not updating unwritable cache $cache_file"
7235 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007236fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007237rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007238
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007239trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007240
7241test "x$prefix" = xNONE && prefix=$ac_default_prefix
7242# Let make expand exec_prefix.
7243test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007244
Guido van Rossum7f43da71994-08-01 12:15:30 +00007245# Any assignment to VPATH causes Sun make to only execute
7246# the first set of double-colon rules, so remove it if not needed.
7247# If there is a colon in the path, we need to keep it.
7248if test "x$srcdir" = x.; then
7249 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7250fi
7251
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007252trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00007253
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007254DEFS=-DHAVE_CONFIG_H
7255
7256# Without the "./", some shells look in PATH for config.status.
7257: ${CONFIG_STATUS=./config.status}
7258
7259echo creating $CONFIG_STATUS
7260rm -f $CONFIG_STATUS
7261cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007262#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007263# Generated automatically by configure.
7264# Run this file to recreate the current configuration.
7265# This directory was configured as follows,
7266# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7267#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007268# $0 $ac_configure_args
7269#
7270# Compiler output produced by configure, useful for debugging
7271# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007272
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007273ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007274for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00007275do
Guido van Rossum7f43da71994-08-01 12:15:30 +00007276 case "\$ac_option" in
7277 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007278 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7279 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00007280 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007281 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007282 exit 0 ;;
7283 -help | --help | --hel | --he | --h)
7284 echo "\$ac_cs_usage"; exit 0 ;;
7285 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00007286 esac
7287done
7288
Guido van Rossum7f43da71994-08-01 12:15:30 +00007289ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007290ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00007291
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007292trap '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 +00007293EOF
7294cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007295
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007296# Protect against being on the right side of a sed subst in config.status.
7297sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7298 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007299$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00007300$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007301s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007302s%@CFLAGS@%$CFLAGS%g
7303s%@CPPFLAGS@%$CPPFLAGS%g
7304s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007305s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007306s%@DEFS@%$DEFS%g
7307s%@LDFLAGS@%$LDFLAGS%g
7308s%@LIBS@%$LIBS%g
7309s%@exec_prefix@%$exec_prefix%g
7310s%@prefix@%$prefix%g
7311s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007312s%@bindir@%$bindir%g
7313s%@sbindir@%$sbindir%g
7314s%@libexecdir@%$libexecdir%g
7315s%@datadir@%$datadir%g
7316s%@sysconfdir@%$sysconfdir%g
7317s%@sharedstatedir@%$sharedstatedir%g
7318s%@localstatedir@%$localstatedir%g
7319s%@libdir@%$libdir%g
7320s%@includedir@%$includedir%g
7321s%@oldincludedir@%$oldincludedir%g
7322s%@infodir@%$infodir%g
7323s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00007324s%@VERSION@%$VERSION%g
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00007325s%@CONFIG_ARGS@%$CONFIG_ARGS%g
Jack Jansene578a632001-08-15 01:27:14 +00007326s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7327s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7328s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7329s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00007330s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00007331s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00007332s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007333s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007334s%@CC@%$CC%g
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00007335s%@CPP@%$CPP%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007336s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007337s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007338s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007339s%@DLLLIBRARY@%$DLLLIBRARY%g
Jack Jansene578a632001-08-15 01:27:14 +00007340s%@BLDLIBRARY@%$BLDLIBRARY%g
7341s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00007342s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007343s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007344s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007345s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007346s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007347s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007348s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00007349s%@OPT@%$OPT%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007350s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007351s%@SO@%$SO%g
7352s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007353s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007354s%@CCSHARED@%$CCSHARED%g
7355s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007356s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007357s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7358s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00007359s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00007360s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007361s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00007362s%@DYNLOADFILE@%$DYNLOADFILE%g
Neil Schemenauer4e425612001-06-19 15:44:15 +00007363s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007364s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007365s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7366s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7367s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00007368s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007369s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007370s%@LIBM@%$LIBM%g
7371s%@LIBC@%$LIBC%g
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007372s%@UNICODE_OBJS@%$UNICODE_OBJS%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007373s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007374
7375CEOF
7376EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007377
7378cat >> $CONFIG_STATUS <<\EOF
7379
7380# Split the substitutions into bite-sized pieces for seds with
7381# small command number limits, like on Digital OSF/1 and HP-UX.
7382ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7383ac_file=1 # Number of current file.
7384ac_beg=1 # First line for current file.
7385ac_end=$ac_max_sed_cmds # Line after last line for current file.
7386ac_more_lines=:
7387ac_sed_cmds=""
7388while $ac_more_lines; do
7389 if test $ac_beg -gt 1; then
7390 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7391 else
7392 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7393 fi
7394 if test ! -s conftest.s$ac_file; then
7395 ac_more_lines=false
7396 rm -f conftest.s$ac_file
7397 else
7398 if test -z "$ac_sed_cmds"; then
7399 ac_sed_cmds="sed -f conftest.s$ac_file"
7400 else
7401 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7402 fi
7403 ac_file=`expr $ac_file + 1`
7404 ac_beg=$ac_end
7405 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7406 fi
7407done
7408if test -z "$ac_sed_cmds"; then
7409 ac_sed_cmds=cat
7410fi
7411EOF
7412
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007413cat >> $CONFIG_STATUS <<EOF
7414
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007415CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007416EOF
7417cat >> $CONFIG_STATUS <<\EOF
7418for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007419 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007420 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007421 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007422 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7423 *) ac_file_in="${ac_file}.in" ;;
7424 esac
7425
Guido van Rossumf78abae1997-01-21 22:02:36 +00007426 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007427
7428 # Remove last slash and all that follows it. Not all systems have dirname.
7429 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7430 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7431 # The file is in a subdirectory.
7432 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007433 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007434 # A "../" for each directory in $ac_dir_suffix.
7435 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7436 else
7437 ac_dir_suffix= ac_dots=
7438 fi
7439
7440 case "$ac_given_srcdir" in
7441 .) srcdir=.
7442 if test -z "$ac_dots"; then top_srcdir=.
7443 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7444 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7445 *) # Relative path.
7446 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7447 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7448 esac
7449
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007450 case "$ac_given_INSTALL" in
7451 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7452 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7453 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007454
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007455 echo creating "$ac_file"
7456 rm -f "$ac_file"
7457 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7458 case "$ac_file" in
7459 *Makefile*) ac_comsub="1i\\
7460# $configure_input" ;;
7461 *) ac_comsub= ;;
7462 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007463
7464 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 +00007465 sed -e "$ac_comsub
7466s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007467s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007468s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007469s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00007470" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00007471fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00007472rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007473
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007474# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7475# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007476#
7477# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007478ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7479ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007480ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007481ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007482# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007483ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7484ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007485ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007486ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007487# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007488ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7489ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007490ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007491ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007492
Guido van Rossumf78abae1997-01-21 22:02:36 +00007493if test "${CONFIG_HEADERS+set}" != set; then
7494EOF
7495cat >> $CONFIG_STATUS <<EOF
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007496 CONFIG_HEADERS="pyconfig.h"
Guido van Rossumf78abae1997-01-21 22:02:36 +00007497EOF
7498cat >> $CONFIG_STATUS <<\EOF
7499fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007500for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007501 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007502 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007503 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007504 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7505 *) ac_file_in="${ac_file}.in" ;;
7506 esac
7507
Guido van Rossum7f43da71994-08-01 12:15:30 +00007508 echo creating $ac_file
7509
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007510 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00007511 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7512 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007513
7514EOF
7515
7516# Transform confdefs.h into a sed script conftest.vals that substitutes
7517# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007518# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007519# Protect against being in an unquoted here document in config.status.
7520rm -f conftest.vals
7521cat > conftest.hdr <<\EOF
7522s/[\\&%]/\\&/g
7523s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007524s%#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 +00007525s%ac_d%ac_u%gp
7526s%ac_u%ac_e%gp
7527EOF
7528sed -n -f conftest.hdr confdefs.h > conftest.vals
7529rm -f conftest.hdr
7530
7531# This sed command replaces #undef with comments. This is necessary, for
7532# example, in the case of _POSIX_SOURCE, which is predefined and required
7533# on some systems where configure will not decide to define it.
7534cat >> conftest.vals <<\EOF
7535s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7536EOF
7537
7538# Break up conftest.vals because some shells have a limit on
7539# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007540
7541rm -f conftest.tail
7542while :
7543do
7544 ac_lines=`grep -c . conftest.vals`
7545 # grep -c gives empty output for an empty file on some AIX systems.
7546 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7547 # Write a limited-size here document to conftest.frag.
7548 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7549 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7550 echo 'CEOF
7551 sed -f conftest.frag conftest.in > conftest.out
7552 rm -f conftest.in
7553 mv conftest.out conftest.in
7554' >> $CONFIG_STATUS
7555 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7556 rm -f conftest.vals
7557 mv conftest.tail conftest.vals
7558done
7559rm -f conftest.vals
7560
7561cat >> $CONFIG_STATUS <<\EOF
7562 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007563 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007564 cat conftest.in >> conftest.h
7565 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00007566 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00007567 echo "$ac_file is unchanged"
7568 rm -f conftest.h
7569 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007570 # Remove last slash and all that follows it. Not all systems have dirname.
7571 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7572 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7573 # The file is in a subdirectory.
7574 test ! -d "$ac_dir" && mkdir "$ac_dir"
7575 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00007576 rm -f $ac_file
7577 mv conftest.h $ac_file
7578 fi
7579fi; done
7580
Guido van Rossumf78abae1997-01-21 22:02:36 +00007581EOF
7582cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007583
Guido van Rossumf78abae1997-01-21 22:02:36 +00007584EOF
7585cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007586
7587exit 0
7588EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007589chmod +x $CONFIG_STATUS
7590rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007591test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00007592
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007593
7594echo "creating Setup"
7595if test ! -f Modules/Setup
7596then
7597 cp $srcdir/Modules/Setup.dist Modules/Setup
7598fi
7599
7600echo "creating Setup.local"
7601if test ! -f Modules/Setup.local
7602then
7603 echo "# Edit this file for local setup changes" >Modules/Setup.local
7604fi
7605
7606echo "creating Makefile"
7607$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
7608 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00007609 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007610mv config.c Modules