blob: b4afecb9fec7161d4a1e40b3d70638fc43f211b1 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003# From configure.in Revision: 1.284
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006# Generated automatically using autoconf version 2.13
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Jack Jansene578a632001-08-15 01:27:14 +000017 --enable-framework[=INSTALLDIR] Build (MacOSX|Darwin) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000018ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000019 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000021 --with-cxx=<compiler> enable C++ support"
Guido van Rossum95012191999-12-16 17:50:52 +000022ac_help="$ac_help
Neil Schemenauerdfb38e42001-01-27 06:57:08 +000023 --with-suffix=.exe set executable suffix"
24ac_help="$ac_help
Fred Drake109d9862001-07-11 06:27:56 +000025 --with-pydebug build with Py_DEBUG defined"
26ac_help="$ac_help
Jack Jansene578a632001-08-15 01:27:14 +000027 --enable-toolbox-glue disable/enable MacOSX glue code for extensions"
28ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000029 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000030ac_help="$ac_help
Neil Schemenauerd32c2492001-01-24 17:25:28 +000031 --with-signal-module disable/enable signal module"
32ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000033 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000034ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000035 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000036ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000037 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000038ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000039 --with-pth use GNU pth threading libraries"
40ac_help="$ac_help
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000041 --enable-ipv6 Enable ipv6 (with ipv4) support
42 --disable-ipv6 Disable ipv6 support"
43ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000044 --with(out)-cycle-gc disable/enable garbage collection"
45ac_help="$ac_help
Neil Schemenauera35c6882001-02-27 04:45:05 +000046 --with(out)-pymalloc disable/enable specialized mallocs"
47ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000048 --with-wctype-functions use wctype.h functions"
49ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000050 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000051ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000052 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000053ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000054 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000055ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000056 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000057ac_help="$ac_help
Barry Warsawc0d24d82000-06-29 16:12:00 +000058 --with-libc=STRING C library"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000059ac_help="$ac_help
60 --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)"
Guido van Rossum627b2d71993-12-24 10:39:16 +000061
Guido van Rossum7f43da71994-08-01 12:15:30 +000062# Initialize some variables set by options.
63# The variables have the same names as the options, with
64# dashes changed to underlines.
65build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000066cache_file=./config.cache
67exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000068host=NONE
69no_create=
70nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000071no_recursion=
72prefix=NONE
73program_prefix=NONE
74program_suffix=NONE
75program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000076silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000077site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000078srcdir=
79target=NONE
80verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000081x_includes=NONE
82x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000083bindir='${exec_prefix}/bin'
84sbindir='${exec_prefix}/sbin'
85libexecdir='${exec_prefix}/libexec'
86datadir='${prefix}/share'
87sysconfdir='${prefix}/etc'
88sharedstatedir='${prefix}/com'
89localstatedir='${prefix}/var'
90libdir='${exec_prefix}/lib'
91includedir='${prefix}/include'
92oldincludedir='/usr/include'
93infodir='${prefix}/info'
94mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000095
96# Initialize some other variables.
97subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000098MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000099SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +0000100# Maximum number of lines to put in a shell here document.
101ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +0000102
103ac_prev=
104for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000105do
Guido van Rossum627b2d71993-12-24 10:39:16 +0000106
Guido van Rossum7f43da71994-08-01 12:15:30 +0000107 # If the previous option needs an argument, assign it.
108 if test -n "$ac_prev"; then
109 eval "$ac_prev=\$ac_option"
110 ac_prev=
111 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000112 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000113
Guido van Rossum7f43da71994-08-01 12:15:30 +0000114 case "$ac_option" in
115 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
116 *) ac_optarg= ;;
117 esac
118
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000119 # Accept the important Cygnus configure options, so we can diagnose typos.
120
Guido van Rossum7f43da71994-08-01 12:15:30 +0000121 case "$ac_option" in
122
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000123 -bindir | --bindir | --bindi | --bind | --bin | --bi)
124 ac_prev=bindir ;;
125 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
126 bindir="$ac_optarg" ;;
127
128 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000129 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000130 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000131 build="$ac_optarg" ;;
132
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000133 -cache-file | --cache-file | --cache-fil | --cache-fi \
134 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
135 ac_prev=cache_file ;;
136 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
137 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
138 cache_file="$ac_optarg" ;;
139
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000140 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
141 ac_prev=datadir ;;
142 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
143 | --da=*)
144 datadir="$ac_optarg" ;;
145
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 -disable-* | --disable-*)
147 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000148 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000149 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000150 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000151 fi
152 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
153 eval "enable_${ac_feature}=no" ;;
154
155 -enable-* | --enable-*)
156 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000157 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000158 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000159 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000160 fi
161 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
162 case "$ac_option" in
163 *=*) ;;
164 *) ac_optarg=yes ;;
165 esac
166 eval "enable_${ac_feature}='$ac_optarg'" ;;
167
Guido van Rossum7f43da71994-08-01 12:15:30 +0000168 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
169 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
170 | --exec | --exe | --ex)
171 ac_prev=exec_prefix ;;
172 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
173 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
174 | --exec=* | --exe=* | --ex=*)
175 exec_prefix="$ac_optarg" ;;
176
177 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000178 # Obsolete; use --with-gas.
179 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000180
181 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000182 # Omit some internal or obsolete options to make the list less imposing.
183 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000184 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000185Usage: configure [options] [host]
186Options: [defaults in brackets after descriptions]
187Configuration:
188 --cache-file=FILE cache test results in FILE
189 --help print this message
190 --no-create do not create output files
191 --quiet, --silent do not print \`checking...' messages
192 --version print the version of autoconf that created configure
193Directory and file names:
194 --prefix=PREFIX install architecture-independent files in PREFIX
195 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000196 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000197 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000198 --bindir=DIR user executables in DIR [EPREFIX/bin]
199 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
200 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
201 --datadir=DIR read-only architecture-independent data in DIR
202 [PREFIX/share]
203 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
204 --sharedstatedir=DIR modifiable architecture-independent data in DIR
205 [PREFIX/com]
206 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
207 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
208 --includedir=DIR C header files in DIR [PREFIX/include]
209 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
210 --infodir=DIR info documentation in DIR [PREFIX/info]
211 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000212 --srcdir=DIR find the sources in DIR [configure dir or ..]
213 --program-prefix=PREFIX prepend PREFIX to installed program names
214 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000215 --program-transform-name=PROGRAM
216 run sed PROGRAM on installed program names
217EOF
218 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000219Host type:
220 --build=BUILD configure for building on BUILD [BUILD=HOST]
221 --host=HOST configure for HOST [guessed]
222 --target=TARGET configure for TARGET [TARGET=HOST]
223Features and packages:
224 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
225 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
226 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
227 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
228 --x-includes=DIR X include files are in DIR
229 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000230EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000231 if test -n "$ac_help"; then
232 echo "--enable and --with options recognized:$ac_help"
233 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000234 exit 0 ;;
235
236 -host | --host | --hos | --ho)
237 ac_prev=host ;;
238 -host=* | --host=* | --hos=* | --ho=*)
239 host="$ac_optarg" ;;
240
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000241 -includedir | --includedir | --includedi | --included | --include \
242 | --includ | --inclu | --incl | --inc)
243 ac_prev=includedir ;;
244 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
245 | --includ=* | --inclu=* | --incl=* | --inc=*)
246 includedir="$ac_optarg" ;;
247
248 -infodir | --infodir | --infodi | --infod | --info | --inf)
249 ac_prev=infodir ;;
250 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
251 infodir="$ac_optarg" ;;
252
253 -libdir | --libdir | --libdi | --libd)
254 ac_prev=libdir ;;
255 -libdir=* | --libdir=* | --libdi=* | --libd=*)
256 libdir="$ac_optarg" ;;
257
258 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
259 | --libexe | --libex | --libe)
260 ac_prev=libexecdir ;;
261 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
262 | --libexe=* | --libex=* | --libe=*)
263 libexecdir="$ac_optarg" ;;
264
265 -localstatedir | --localstatedir | --localstatedi | --localstated \
266 | --localstate | --localstat | --localsta | --localst \
267 | --locals | --local | --loca | --loc | --lo)
268 ac_prev=localstatedir ;;
269 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
270 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
271 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
272 localstatedir="$ac_optarg" ;;
273
274 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
275 ac_prev=mandir ;;
276 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
277 mandir="$ac_optarg" ;;
278
Guido van Rossum7f43da71994-08-01 12:15:30 +0000279 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000280 # Obsolete; use --without-fp.
281 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000282
283 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
284 | --no-cr | --no-c)
285 no_create=yes ;;
286
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000287 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
288 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
289 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000290
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000291 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
292 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
293 | --oldin | --oldi | --old | --ol | --o)
294 ac_prev=oldincludedir ;;
295 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
296 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
297 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
298 oldincludedir="$ac_optarg" ;;
299
Guido van Rossum7f43da71994-08-01 12:15:30 +0000300 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
301 ac_prev=prefix ;;
302 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
303 prefix="$ac_optarg" ;;
304
305 -program-prefix | --program-prefix | --program-prefi | --program-pref \
306 | --program-pre | --program-pr | --program-p)
307 ac_prev=program_prefix ;;
308 -program-prefix=* | --program-prefix=* | --program-prefi=* \
309 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
310 program_prefix="$ac_optarg" ;;
311
312 -program-suffix | --program-suffix | --program-suffi | --program-suff \
313 | --program-suf | --program-su | --program-s)
314 ac_prev=program_suffix ;;
315 -program-suffix=* | --program-suffix=* | --program-suffi=* \
316 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
317 program_suffix="$ac_optarg" ;;
318
319 -program-transform-name | --program-transform-name \
320 | --program-transform-nam | --program-transform-na \
321 | --program-transform-n | --program-transform- \
322 | --program-transform | --program-transfor \
323 | --program-transfo | --program-transf \
324 | --program-trans | --program-tran \
325 | --progr-tra | --program-tr | --program-t)
326 ac_prev=program_transform_name ;;
327 -program-transform-name=* | --program-transform-name=* \
328 | --program-transform-nam=* | --program-transform-na=* \
329 | --program-transform-n=* | --program-transform-=* \
330 | --program-transform=* | --program-transfor=* \
331 | --program-transfo=* | --program-transf=* \
332 | --program-trans=* | --program-tran=* \
333 | --progr-tra=* | --program-tr=* | --program-t=*)
334 program_transform_name="$ac_optarg" ;;
335
336 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
337 | -silent | --silent | --silen | --sile | --sil)
338 silent=yes ;;
339
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000340 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
341 ac_prev=sbindir ;;
342 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
343 | --sbi=* | --sb=*)
344 sbindir="$ac_optarg" ;;
345
346 -sharedstatedir | --sharedstatedir | --sharedstatedi \
347 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
348 | --sharedst | --shareds | --shared | --share | --shar \
349 | --sha | --sh)
350 ac_prev=sharedstatedir ;;
351 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
352 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
353 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
354 | --sha=* | --sh=*)
355 sharedstatedir="$ac_optarg" ;;
356
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000357 -site | --site | --sit)
358 ac_prev=site ;;
359 -site=* | --site=* | --sit=*)
360 site="$ac_optarg" ;;
361
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
363 ac_prev=srcdir ;;
364 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
365 srcdir="$ac_optarg" ;;
366
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000367 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
368 | --syscon | --sysco | --sysc | --sys | --sy)
369 ac_prev=sysconfdir ;;
370 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
371 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
372 sysconfdir="$ac_optarg" ;;
373
Guido van Rossum7f43da71994-08-01 12:15:30 +0000374 -target | --target | --targe | --targ | --tar | --ta | --t)
375 ac_prev=target ;;
376 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
377 target="$ac_optarg" ;;
378
379 -v | -verbose | --verbose | --verbos | --verbo | --verb)
380 verbose=yes ;;
381
382 -version | --version | --versio | --versi | --vers)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000383 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000384 exit 0 ;;
385
386 -with-* | --with-*)
387 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000388 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000390 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000391 fi
392 ac_package=`echo $ac_package| sed 's/-/_/g'`
393 case "$ac_option" in
394 *=*) ;;
395 *) ac_optarg=yes ;;
396 esac
397 eval "with_${ac_package}='$ac_optarg'" ;;
398
399 -without-* | --without-*)
400 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000401 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000403 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000404 fi
405 ac_package=`echo $ac_package| sed 's/-/_/g'`
406 eval "with_${ac_package}=no" ;;
407
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000408 --x)
409 # Obsolete; use --with-x.
410 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
413 | --x-incl | --x-inc | --x-in | --x-i)
414 ac_prev=x_includes ;;
415 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
416 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
417 x_includes="$ac_optarg" ;;
418
419 -x-libraries | --x-libraries | --x-librarie | --x-librari \
420 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
421 ac_prev=x_libraries ;;
422 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
423 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
424 x_libraries="$ac_optarg" ;;
425
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000426 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427 ;;
428
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000429 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000430 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000431 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000432 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000433 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000434 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000435 fi
436 nonopt="$ac_option"
437 ;;
438
439 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000440done
441
Guido van Rossum7f43da71994-08-01 12:15:30 +0000442if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000443 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444fi
445
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000446trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000447
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000448# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000449# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000450# 1 file creation
451# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000452# 3 some systems may open it to /dev/tty
453# 4 used on the Kubota Titan
454# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000455# 5 compiler messages saved in config.log
456if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000457 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000458else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000459 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000460fi
461exec 5>./config.log
462
463echo "\
464This file contains any messages produced by compilers while
465running configure, to aid debugging if configure makes a mistake.
466" 1>&5
467
468# Strip out --no-create and --no-recursion so they do not pile up.
469# Also quote any args containing shell metacharacters.
470ac_configure_args=
471for ac_arg
472do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000473 case "$ac_arg" in
474 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
475 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000476 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
477 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
478 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
479 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
480 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000481 esac
482done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000483
484# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000485# Only set these to C if already set. These must not be set unconditionally
486# because not all systems understand e.g. LANG=C (notably SCO).
487# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
488# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000489if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000490if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
491if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
492if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000493
Guido van Rossum7f43da71994-08-01 12:15:30 +0000494# confdefs.h avoids OS command line length limits that DEFS can exceed.
495rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000496# AIX cpp loses on an empty file, so make sure it contains at least a newline.
497echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000498
499# A filename unique to this package, relative to the directory that
500# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000501ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000502
503# Find the source files, if location was not specified.
504if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000506 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000507 ac_prog=$0
508 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
509 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
510 srcdir=$ac_confdir
511 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000512 srcdir=..
513 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000514else
515 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000516fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000517if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000518 if test "$ac_srcdir_defaulted" = yes; then
519 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000520 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000521 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000522 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000523fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000524srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
525
526# Prefer explicitly selected file to automatically selected ones.
527if test -z "$CONFIG_SITE"; then
528 if test "x$prefix" != xNONE; then
529 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
530 else
531 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
532 fi
533fi
534for ac_site_file in $CONFIG_SITE; do
535 if test -r "$ac_site_file"; then
536 echo "loading site script $ac_site_file"
537 . "$ac_site_file"
538 fi
539done
540
541if test -r "$cache_file"; then
542 echo "loading cache $cache_file"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000543 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544else
545 echo "creating cache $cache_file"
546 > $cache_file
547fi
548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000550# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000552ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000553ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000554cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000555
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000556ac_exeext=
557ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000558if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
559 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
560 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
561 ac_n= ac_c='
562' ac_t=' '
563 else
564 ac_n=-n ac_c= ac_t=
565 fi
566else
567 ac_n= ac_c='\c' ac_t=
568fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000569
Guido van Rossum0a516c91994-09-12 10:58:40 +0000570
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571
Guido van Rossum627b2d71993-12-24 10:39:16 +0000572
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000573# Set VERSION so we only need to edit in one place (i.e., here)
574
Guido van Rossum6db412b2001-04-18 04:37:57 +0000575VERSION=2.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000576
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +0000577# Arguments passed to configure.
578
579CONFIG_ARGS="$ac_configure_args"
580
Guido van Rossum563e7081996-09-10 18:20:48 +0000581
Jack Jansene578a632001-08-15 01:27:14 +0000582# Check whether --enable-framework or --disable-framework was given.
583if test "${enable_framework+set}" = set; then
584 enableval="$enable_framework"
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000585
Jack Jansene578a632001-08-15 01:27:14 +0000586 case $enableval in
587 yes)
588 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +0000589 esac
590 case $enableval in
591 no)
592 PYTHONFRAMEWORK=
593 PYTHONFRAMEWORKDIR=no-framework
594 PYTHONFRAMEWORKPREFIX=
595 PYTHONFRAMEWORKINSTALLDIR=
596 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +0000597 ;;
598 *)
Jack Jansen127e56e2001-09-11 14:41:54 +0000599 PYTHONFRAMEWORK=Python
600 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +0000601 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +0000602 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
603 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +0000604 esac
Guido van Rossum563e7081996-09-10 18:20:48 +0000605
606else
Jack Jansene578a632001-08-15 01:27:14 +0000607
608 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +0000609 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +0000610 PYTHONFRAMEWORKPREFIX=
611 PYTHONFRAMEWORKINSTALLDIR=
612 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000613
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000614fi
615
Guido van Rossum91922671997-10-09 20:24:13 +0000616
Jack Jansene578a632001-08-15 01:27:14 +0000617
618
619
620
621##AC_ARG_WITH(dyld,
622##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
623##
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000624# Set name for machine-dependent library files
625
626echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000627echo "configure:628: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000628if test -z "$MACHDEP"
629then
Guido van Rossum563e7081996-09-10 18:20:48 +0000630 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +0000631 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000632 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000633 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000634 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000635 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000636 ac_md_system=`echo $ac_sys_system |
637 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
638 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +0000639 tr -d '/ ' | sed 's/^[A-Z]\.//' | 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";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000644 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +0000645 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000646 esac
647fi
Guido van Rossum91922671997-10-09 20:24:13 +0000648
649#
650# SGI compilers allow the specification of the both the ABI and the
651# ISA on the command line. Depending on the values of these switches,
652# different and often incompatable code will be generated.
653#
654# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
655# thus supply support for various ABI/ISA combinations. The MACHDEP
656# variable is also adjusted.
657#
658
659if test ! -z "$SGI_ABI"
660then
661 CC="cc $SGI_ABI"
662 LDFLAGS="$SGI_ABI $LDFLAGS"
663 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
664fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000665echo "$ac_t""$MACHDEP" 1>&6
666
Guido van Rossum627b2d71993-12-24 10:39:16 +0000667# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000668echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000669echo "configure:670: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000670# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000671if test "${with_gcc+set}" = set; then
672 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000673
674 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000675 no) CC=cc
676 without_gcc=yes;;
677 yes) CC=gcc
678 without_gcc=no;;
679 *) CC=$withval
680 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000681 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000682else
Guido van Rossume77438c1995-09-13 18:59:59 +0000683
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000684 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000685 AIX*) CC=cc_r
686 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000687 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000688 case $BE_HOST_CPU in
689 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000690 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000691 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000692 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 +0000693 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000694 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000695 ;;
696 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000697 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000698 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000699 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000700 ;;
701 *)
Fred Drake5790be12000-10-09 17:06:13 +0000702 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000703 ;;
704 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000705 AR="\$(srcdir)/Modules/ar_beos"
706 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000707 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000708 Monterey*)
709 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +0000710 without_gcc=;;
711 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000712 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000713fi
714
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000715echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000716
Guido van Rossum95012191999-12-16 17:50:52 +0000717
718
Fred Drakea1a84e72001-03-06 05:52:16 +0000719MAINOBJ=python.o
Guido van Rossum95012191999-12-16 17:50:52 +0000720echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000721echo "configure:722: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000722# Check whether --with-cxx or --without-cxx was given.
723if test "${with_cxx+set}" = set; then
724 withval="$with_cxx"
725
Martin v. Löwis22352952000-12-13 17:37:02 +0000726 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000727 case $withval in
728 no) CXX=
729 with_cxx=no;;
730 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000731 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000732 with_cxx=$withval;;
733 esac
734else
735
736 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000737 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000738
739fi
740
741echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000742
743
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000744
745
Martin v. Löwis22352952000-12-13 17:37:02 +0000746if test "$check_cxx" = "yes"
747then
748 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
749do
750# Extract the first word of "$ac_prog", so it can be a program name with args.
751set dummy $ac_prog; ac_word=$2
752echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000753echo "configure:754: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000754if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
755 echo $ac_n "(cached) $ac_c" 1>&6
756else
757 if test -n "$CXX"; then
758 ac_cv_prog_CXX="$CXX" # Let the user override the test.
759else
760 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
761 ac_dummy="$PATH"
762 for ac_dir in $ac_dummy; do
763 test -z "$ac_dir" && ac_dir=.
764 if test -f $ac_dir/$ac_word; then
765 ac_cv_prog_CXX="$ac_prog"
766 break
767 fi
768 done
769 IFS="$ac_save_ifs"
770fi
771fi
772CXX="$ac_cv_prog_CXX"
773if test -n "$CXX"; then
774 echo "$ac_t""$CXX" 1>&6
775else
776 echo "$ac_t""no" 1>&6
777fi
778
779test -n "$CXX" && break
780done
781test -n "$CXX" || CXX="notfound"
782
783 if test "$CXX" = "notfound"
784 then
785 CXX=
786 else
787 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000788echo "configure:789: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000789
790ac_ext=C
791# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
792ac_cpp='$CXXCPP $CPPFLAGS'
793ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
794ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
795cross_compiling=$ac_cv_prog_cxx_cross
796
797cat > conftest.$ac_ext << EOF
798
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000799#line 800 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000800#include "confdefs.h"
801
802int main(){return(0);}
803EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000804if { (eval echo configure:805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000805 ac_cv_prog_cxx_works=yes
806 # If we can't run a trivial program, we are probably using a cross compiler.
807 if (./conftest; exit) 2>/dev/null; then
808 ac_cv_prog_cxx_cross=no
809 else
810 ac_cv_prog_cxx_cross=yes
811 fi
812else
813 echo "configure: failed program was:" >&5
814 cat conftest.$ac_ext >&5
815 ac_cv_prog_cxx_works=no
816fi
817rm -fr conftest*
818ac_ext=c
819# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
820ac_cpp='$CPP $CPPFLAGS'
821ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
822ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
823cross_compiling=$ac_cv_prog_cc_cross
824
825echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
826if test $ac_cv_prog_cxx_works = no; then
827 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
828fi
829echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000830echo "configure:831: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000831echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
832cross_compiling=$ac_cv_prog_cxx_cross
833
834 fi
835fi
836
Guido van Rossum8b131c51995-03-09 14:10:13 +0000837# If the user switches compilers, we can't believe the cache
838if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
839then
840 { echo "configure: error: cached CC is different -- throw away $cache_file
841(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
842fi
843
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000844# Extract the first word of "gcc", so it can be a program name with args.
845set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000846echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000847echo "configure:848: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000848if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000849 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850else
851 if test -n "$CC"; then
852 ac_cv_prog_CC="$CC" # Let the user override the test.
853else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000854 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
855 ac_dummy="$PATH"
856 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857 test -z "$ac_dir" && ac_dir=.
858 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860 break
861 fi
862 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000864fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000865fi
866CC="$ac_cv_prog_CC"
867if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000868 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000870 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000871fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000872
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000873if test -z "$CC"; then
874 # Extract the first word of "cc", so it can be a program name with args.
875set dummy cc; ac_word=$2
876echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000877echo "configure:878: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000878if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879 echo $ac_n "(cached) $ac_c" 1>&6
880else
881 if test -n "$CC"; then
882 ac_cv_prog_CC="$CC" # Let the user override the test.
883else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000884 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000886 ac_dummy="$PATH"
887 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000888 test -z "$ac_dir" && ac_dir=.
889 if test -f $ac_dir/$ac_word; then
890 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
891 ac_prog_rejected=yes
892 continue
893 fi
894 ac_cv_prog_CC="cc"
895 break
896 fi
897 done
898 IFS="$ac_save_ifs"
899if test $ac_prog_rejected = yes; then
900 # We found a bogon in the path, so make sure we never use it.
901 set dummy $ac_cv_prog_CC
902 shift
903 if test $# -gt 0; then
904 # We chose a different compiler from the bogus one.
905 # However, it has the same basename, so the bogon will be chosen
906 # first if we set CC to just the basename; use the full file name.
907 shift
908 set dummy "$ac_dir/$ac_word" "$@"
909 shift
910 ac_cv_prog_CC="$@"
911 fi
912fi
913fi
914fi
915CC="$ac_cv_prog_CC"
916if test -n "$CC"; then
917 echo "$ac_t""$CC" 1>&6
918else
919 echo "$ac_t""no" 1>&6
920fi
921
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000922 if test -z "$CC"; then
923 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000924 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000925 # Extract the first word of "cl", so it can be a program name with args.
926set dummy cl; ac_word=$2
927echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000928echo "configure:929: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000929if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000930 echo $ac_n "(cached) $ac_c" 1>&6
931else
932 if test -n "$CC"; then
933 ac_cv_prog_CC="$CC" # Let the user override the test.
934else
935 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
936 ac_dummy="$PATH"
937 for ac_dir in $ac_dummy; do
938 test -z "$ac_dir" && ac_dir=.
939 if test -f $ac_dir/$ac_word; then
940 ac_cv_prog_CC="cl"
941 break
942 fi
943 done
944 IFS="$ac_save_ifs"
945fi
946fi
947CC="$ac_cv_prog_CC"
948if test -n "$CC"; then
949 echo "$ac_t""$CC" 1>&6
950else
951 echo "$ac_t""no" 1>&6
952fi
953 ;;
954 esac
955 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000956 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
957fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000959echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000960echo "configure:961: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000961
962ac_ext=c
963# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
964ac_cpp='$CPP $CPPFLAGS'
965ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000966ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000967cross_compiling=$ac_cv_prog_cc_cross
968
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000969cat > conftest.$ac_ext << EOF
970
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000971#line 972 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000972#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000973
Guido van Rossumf78abae1997-01-21 22:02:36 +0000974main(){return(0);}
975EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000976if { (eval echo configure:977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000977 ac_cv_prog_cc_works=yes
978 # If we can't run a trivial program, we are probably using a cross compiler.
979 if (./conftest; exit) 2>/dev/null; then
980 ac_cv_prog_cc_cross=no
981 else
982 ac_cv_prog_cc_cross=yes
983 fi
984else
985 echo "configure: failed program was:" >&5
986 cat conftest.$ac_ext >&5
987 ac_cv_prog_cc_works=no
988fi
989rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000990ac_ext=c
991# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
992ac_cpp='$CPP $CPPFLAGS'
993ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
994ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
995cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000996
997echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
998if test $ac_cv_prog_cc_works = no; then
999 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1000fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001001echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001002echo "configure:1003: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001003echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1004cross_compiling=$ac_cv_prog_cc_cross
1005
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001006echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001007echo "configure:1008: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001008if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001009 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010else
1011 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001012#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001013 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001014#endif
1015EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001016if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001017 ac_cv_prog_gcc=yes
1018else
1019 ac_cv_prog_gcc=no
1020fi
1021fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001023echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001024
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001025if test $ac_cv_prog_gcc = yes; then
1026 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001027else
1028 GCC=
1029fi
1030
1031ac_test_CFLAGS="${CFLAGS+set}"
1032ac_save_CFLAGS="$CFLAGS"
1033CFLAGS=
1034echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001035echo "configure:1036: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001036if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001037 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001038else
1039 echo 'void f(){}' > conftest.c
1040if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001041 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001042else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001043 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001044fi
1045rm -f conftest*
1046
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001048
Guido van Rossumf78abae1997-01-21 22:02:36 +00001049echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001050if test "$ac_test_CFLAGS" = set; then
1051 CFLAGS="$ac_save_CFLAGS"
1052elif test $ac_cv_prog_cc_g = yes; then
1053 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001054 CFLAGS="-g -O2"
1055 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001056 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001057 fi
1058else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001059 if test "$GCC" = yes; then
1060 CFLAGS="-O2"
1061 else
1062 CFLAGS=
1063 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001064fi
1065
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001066
1067# checks for UNIX variants that set C preprocessor variables
1068echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001069echo "configure:1070: checking how to run the C preprocessor" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001070# On Suns, sometimes $CPP names a directory.
1071if test -n "$CPP" && test -d "$CPP"; then
1072 CPP=
1073fi
1074if test -z "$CPP"; then
1075if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1076 echo $ac_n "(cached) $ac_c" 1>&6
1077else
1078 # This must be in double quotes, not single quotes, because CPP may get
1079 # substituted into the Makefile and "${CC-cc}" will confuse make.
1080 CPP="${CC-cc} -E"
1081 # On the NeXT, cc -E runs the code through the compiler's parser,
1082 # not just through cpp.
1083 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001084#line 1085 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001085#include "confdefs.h"
1086#include <assert.h>
1087Syntax Error
1088EOF
1089ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001090{ (eval echo configure:1091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001091ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1092if test -z "$ac_err"; then
1093 :
1094else
1095 echo "$ac_err" >&5
1096 echo "configure: failed program was:" >&5
1097 cat conftest.$ac_ext >&5
1098 rm -rf conftest*
1099 CPP="${CC-cc} -E -traditional-cpp"
1100 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001101#line 1102 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001102#include "confdefs.h"
1103#include <assert.h>
1104Syntax Error
1105EOF
1106ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001107{ (eval echo configure:1108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001108ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1109if test -z "$ac_err"; then
1110 :
1111else
1112 echo "$ac_err" >&5
1113 echo "configure: failed program was:" >&5
1114 cat conftest.$ac_ext >&5
1115 rm -rf conftest*
1116 CPP="${CC-cc} -nologo -E"
1117 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001118#line 1119 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001119#include "confdefs.h"
1120#include <assert.h>
1121Syntax Error
1122EOF
1123ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001124{ (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001125ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1126if test -z "$ac_err"; then
1127 :
1128else
1129 echo "$ac_err" >&5
1130 echo "configure: failed program was:" >&5
1131 cat conftest.$ac_ext >&5
1132 rm -rf conftest*
1133 CPP=/lib/cpp
1134fi
1135rm -f conftest*
1136fi
1137rm -f conftest*
1138fi
1139rm -f conftest*
1140 ac_cv_prog_CPP="$CPP"
1141fi
1142 CPP="$ac_cv_prog_CPP"
1143else
1144 ac_cv_prog_CPP="$CPP"
1145fi
1146echo "$ac_t""$CPP" 1>&6
1147
1148echo $ac_n "checking for AIX""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001149echo "configure:1150: checking for AIX" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001150cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001151#line 1152 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001152#include "confdefs.h"
1153#ifdef _AIX
1154 yes
1155#endif
1156
1157EOF
1158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1159 egrep "yes" >/dev/null 2>&1; then
1160 rm -rf conftest*
1161 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1162#define _ALL_SOURCE 1
1163EOF
1164
1165else
1166 rm -rf conftest*
1167 echo "$ac_t""no" 1>&6
1168fi
1169rm -f conftest*
1170
1171
1172ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1173echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001174echo "configure:1175: checking for minix/config.h" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001175if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1176 echo $ac_n "(cached) $ac_c" 1>&6
1177else
1178 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001179#line 1180 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001180#include "confdefs.h"
1181#include <minix/config.h>
1182EOF
1183ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001184{ (eval echo configure:1185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001185ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1186if test -z "$ac_err"; then
1187 rm -rf conftest*
1188 eval "ac_cv_header_$ac_safe=yes"
1189else
1190 echo "$ac_err" >&5
1191 echo "configure: failed program was:" >&5
1192 cat conftest.$ac_ext >&5
1193 rm -rf conftest*
1194 eval "ac_cv_header_$ac_safe=no"
1195fi
1196rm -f conftest*
1197fi
1198if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1199 echo "$ac_t""yes" 1>&6
1200 MINIX=yes
1201else
1202 echo "$ac_t""no" 1>&6
1203MINIX=
1204fi
1205
1206if test "$MINIX" = yes; then
1207 cat >> confdefs.h <<\EOF
1208#define _POSIX_SOURCE 1
1209EOF
1210
1211 cat >> confdefs.h <<\EOF
1212#define _POSIX_1_SOURCE 2
1213EOF
1214
1215 cat >> confdefs.h <<\EOF
1216#define _MINIX 1
1217EOF
1218
1219fi
1220
1221
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001222echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001223echo "configure:1224: checking for Cygwin environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001224if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1225 echo $ac_n "(cached) $ac_c" 1>&6
1226else
1227 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001228#line 1229 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001229#include "confdefs.h"
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001230
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001231int main() {
1232
1233#ifndef __CYGWIN__
1234#define __CYGWIN__ __CYGWIN32__
1235#endif
1236return __CYGWIN__;
1237; return 0; }
1238EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001239if { (eval echo configure:1240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001240 rm -rf conftest*
1241 ac_cv_cygwin=yes
1242else
1243 echo "configure: failed program was:" >&5
1244 cat conftest.$ac_ext >&5
1245 rm -rf conftest*
1246 ac_cv_cygwin=no
1247fi
1248rm -f conftest*
1249rm -f conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001250fi
1251
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001252echo "$ac_t""$ac_cv_cygwin" 1>&6
1253CYGWIN=
1254test "$ac_cv_cygwin" = yes && CYGWIN=yes
1255echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001256echo "configure:1257: checking for mingw32 environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001257if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1258 echo $ac_n "(cached) $ac_c" 1>&6
1259else
1260 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001261#line 1262 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001262#include "confdefs.h"
1263
1264int main() {
1265return __MINGW32__;
1266; return 0; }
1267EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001268if { (eval echo configure:1269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001269 rm -rf conftest*
1270 ac_cv_mingw32=yes
1271else
1272 echo "configure: failed program was:" >&5
1273 cat conftest.$ac_ext >&5
1274 rm -rf conftest*
1275 ac_cv_mingw32=no
1276fi
1277rm -f conftest*
1278rm -f conftest*
1279fi
1280
1281echo "$ac_t""$ac_cv_mingw32" 1>&6
1282MINGW32=
1283test "$ac_cv_mingw32" = yes && MINGW32=yes
1284
1285
1286echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001287echo "configure:1288: checking for executable suffix" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001288if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1289 echo $ac_n "(cached) $ac_c" 1>&6
1290else
1291 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1292 ac_cv_exeext=.exe
1293else
1294 rm -f conftest*
1295 echo 'int main () { return 0; }' > conftest.$ac_ext
1296 ac_cv_exeext=
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001297 if { (eval echo configure:1298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001298 for file in conftest.*; do
1299 case $file in
1300 *.c | *.o | *.obj) ;;
1301 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1302 esac
1303 done
1304 else
1305 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1306 fi
1307 rm -f conftest*
1308 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1309fi
1310fi
1311
1312EXEEXT=""
1313test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1314echo "$ac_t""${ac_cv_exeext}" 1>&6
1315ac_exeext=$EXEEXT
1316
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001317echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001318echo "configure:1319: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001319# Check whether --with-suffix or --without-suffix was given.
1320if test "${with_suffix+set}" = set; then
1321 withval="$with_suffix"
1322
1323 case $withval in
1324 no) EXEEXT=;;
1325 yes) EXEEXT=.exe;;
1326 *) EXEEXT=$withval;;
1327 esac
1328fi
1329
1330echo "$ac_t""$EXEEXT" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001331# Test whether we're running on a non-case-sensitive system, in which
1332# case we give a warning if no ext is given
1333if test -d "python" -a -z "$EXEEXT"
1334then
1335 echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2
1336fi
Guido van Rossumff555e32000-09-22 15:38:21 +00001337
Guido van Rossumdd997f71998-10-07 19:58:26 +00001338case $MACHDEP in
1339bsdos*)
1340 case $CC in
1341 gcc) CC="$CC -D_HAVE_BSDI";;
1342 esac;;
1343esac
1344
Guido van Rossum24b1e751997-08-21 02:29:16 +00001345case $ac_sys_system in
1346hp*|HP*)
1347 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001348 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001349 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001350Monterey*)
1351 case $CC in
1352 cc) CC="$CC -Wl,-Bexport";;
1353 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001354SunOS*)
1355 # Some functions have a prototype only with that define, e.g. confstr
1356 cat >> confdefs.h <<\EOF
1357#define __EXTENSIONS__ 1
1358EOF
1359
1360 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001361esac
1362
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001363
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001364
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001365echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001366echo "configure:1367: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001367if test -z "$LIBRARY"
1368then
1369 LIBRARY='libpython$(VERSION).a'
1370fi
1371echo "$ac_t""$LIBRARY" 1>&6
1372
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001373# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00001374# name of the library into which to insert object files). BLDLIBRARY is also
1375# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
1376# is blank as the main program is not linked directly against LDLIBRARY.
1377# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
1378# systems without shared libraries, LDLIBRARY is the same as LIBRARY
1379# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
1380# DLLLIBRARY is the shared (i.e., DLL) library.
1381#
1382
1383
Guido van Rossumaef734b2001-01-10 21:09:12 +00001384
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001385
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001386LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00001387BLDLIBRARY='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00001388DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00001389LDLIBRARYDIR=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001390
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001391# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001392# If CXX is set, and if it is needed to link a main function that was
1393# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
1394# python might then depend on the C++ runtime
Fred Drake5790be12000-10-09 17:06:13 +00001395# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001396# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001397
1398echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001399echo "configure:1400: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001400if test -z "$LINKCC"
1401then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001402 if test -z "$CXX"; then
1403 LINKCC="\$(PURIFY) \$(CC)"
1404 else
1405 echo 'int main(){return 0;}' > conftest.$ac_ext
1406 $CXX -c conftest.$ac_ext 2>&5
1407 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
1408 && test -s conftest$ac_exeext && ./conftest$ac_exeext
1409 then
1410 LINKCC="\$(PURIFY) \$(CC)"
1411 else
1412 LINKCC="\$(PURIFY) \$(CXX)"
1413 fi
1414 rm -fr conftest*
1415 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001416 case $ac_sys_system in
1417 AIX*)
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001418 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $(LINKCC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001419 dgux*)
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001420 LINKCC="LD_RUN_PATH=$libdir $(LINKCC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001421 Monterey64*)
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001422 LINKCC="$(LINKCC) -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001423 esac
1424fi
1425echo "$ac_t""$LINKCC" 1>&6
1426
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001427echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001428echo "configure:1429: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001429
1430# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001431case $MACHDEP in
1432dguxR4)
1433 LDLIBRARY='libpython$(VERSION).so'
1434 OPT="$OPT -pic"
1435 ;;
1436beos*)
1437 LDLIBRARY='libpython$(VERSION).so'
1438 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001439cygwin*)
1440 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001441 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001442 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001443esac
Jack Jansene578a632001-08-15 01:27:14 +00001444
Guido van Rossumb8552162001-09-05 14:58:11 +00001445# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
1446# library that we build, but we do not want to link against it (we
1447# will find it with a -framework option). For this reason there is an
1448# extra variable BLDLIBRARY against which Python and the extension
1449# modules are linked, BLDLIBRARY. This is normally the same as
1450# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00001451if test "$enable_framework"
1452then
1453 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
1454 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
1455 BLDLIBRARY=''
1456else
1457 BLDLIBRARY='$(LDLIBRARY)'
1458fi
1459
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001460echo "$ac_t""$LDLIBRARY" 1>&6
1461
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001462# Extract the first word of "ranlib", so it can be a program name with args.
1463set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001464echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001465echo "configure:1466: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001466if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001467 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001468else
1469 if test -n "$RANLIB"; then
1470 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1471else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001472 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1473 ac_dummy="$PATH"
1474 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001475 test -z "$ac_dir" && ac_dir=.
1476 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001477 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001478 break
1479 fi
1480 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001481 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001482 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001483fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001484fi
1485RANLIB="$ac_cv_prog_RANLIB"
1486if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001487 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001488else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001489 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001490fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001491
1492
Guido van Rossum7f43da71994-08-01 12:15:30 +00001493for ac_prog in ar aal
1494do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001495# Extract the first word of "$ac_prog", so it can be a program name with args.
1496set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001497echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001498echo "configure:1499: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001499if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001500 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001501else
1502 if test -n "$AR"; then
1503 ac_cv_prog_AR="$AR" # Let the user override the test.
1504else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001505 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1506 ac_dummy="$PATH"
1507 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001508 test -z "$ac_dir" && ac_dir=.
1509 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001510 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001511 break
1512 fi
1513 done
1514 IFS="$ac_save_ifs"
1515fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001516fi
1517AR="$ac_cv_prog_AR"
1518if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001519 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001520else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001521 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001522fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001523
1524test -n "$AR" && break
1525done
1526test -n "$AR" || AR="ar"
1527
Neil Schemenauera42c8272001-03-31 00:01:55 +00001528
1529case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00001530bsdos*|hp*|HP*)
1531 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00001532 if test -z "$INSTALL"
1533 then
1534 INSTALL="${srcdir}/install-sh -c"
1535 fi
1536esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001537ac_aux_dir=
1538for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1539 if test -f $ac_dir/install-sh; then
1540 ac_aux_dir=$ac_dir
1541 ac_install_sh="$ac_aux_dir/install-sh -c"
1542 break
1543 elif test -f $ac_dir/install.sh; then
1544 ac_aux_dir=$ac_dir
1545 ac_install_sh="$ac_aux_dir/install.sh -c"
1546 break
1547 fi
1548done
1549if test -z "$ac_aux_dir"; then
1550 { 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 +00001551fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001552ac_config_guess=$ac_aux_dir/config.guess
1553ac_config_sub=$ac_aux_dir/config.sub
1554ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1555
1556# Find a good install program. We prefer a C program (faster),
1557# so one script is as good as another. But avoid the broken or
1558# incompatible versions:
1559# SysV /etc/install, /usr/sbin/install
1560# SunOS /usr/etc/install
1561# IRIX /sbin/install
1562# AIX /bin/install
1563# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1564# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1565# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1566# ./install, which can be erroneously created by make from ./install.sh.
1567echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001568echo "configure:1569: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001569if test -z "$INSTALL"; then
1570if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1571 echo $ac_n "(cached) $ac_c" 1>&6
1572else
1573 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1574 for ac_dir in $PATH; do
1575 # Account for people who put trailing slashes in PATH elements.
1576 case "$ac_dir/" in
1577 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1578 *)
1579 # OSF1 and SCO ODT 3.0 have their own names for install.
1580 # Don't use installbsd from OSF since it installs stuff as root
1581 # by default.
1582 for ac_prog in ginstall scoinst install; do
1583 if test -f $ac_dir/$ac_prog; then
1584 if test $ac_prog = install &&
1585 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1586 # AIX install. It has an incompatible calling convention.
1587 :
1588 else
1589 ac_cv_path_install="$ac_dir/$ac_prog -c"
1590 break 2
1591 fi
1592 fi
1593 done
1594 ;;
1595 esac
1596 done
1597 IFS="$ac_save_IFS"
1598
1599fi
1600 if test "${ac_cv_path_install+set}" = set; then
1601 INSTALL="$ac_cv_path_install"
1602 else
1603 # As a last resort, use the slow shell script. We don't cache a
1604 # path for INSTALL within a source directory, because that will
1605 # break other packages using the cache if that directory is
1606 # removed, or if the path is relative.
1607 INSTALL="$ac_install_sh"
1608 fi
1609fi
1610echo "$ac_t""$INSTALL" 1>&6
1611
1612# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1613# It thinks the first close brace ends the variable substitution.
1614test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1615
1616test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1617
1618test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1619
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001620
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001621# Not every filesystem supports hard links
1622
1623if test -z "$LN" ; then
1624 case $ac_sys_system in
1625 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001626 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001627 *) LN=ln;;
1628 esac
1629fi
1630
Fred Drake109d9862001-07-11 06:27:56 +00001631# Check for --with-pydebug
1632echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001633echo "configure:1634: checking for --with-pydebug" >&5
Fred Drake109d9862001-07-11 06:27:56 +00001634# Check whether --with-pydebug or --without-pydebug was given.
1635if test "${with_pydebug+set}" = set; then
1636 withval="$with_pydebug"
1637
1638if test "$withval" != no
1639then cat >> confdefs.h <<\EOF
1640#define Py_DEBUG 1
1641EOF
1642 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1643else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
1644fi
1645else
1646 echo "$ac_t""no" 1>&6
1647fi
1648
1649
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001650# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001651
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001652if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001653then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001654 case $GCC in
1655 yes)
1656 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001657 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001658 if test "$Py_DEBUG" = 'true' ; then
1659 # Optimization messes up debuggers, so turn it off for
1660 # debug builds.
1661 OPT="-g -Wall -Wstrict-prototypes"
1662 else
1663 OPT="-g -O3 -Wall -Wstrict-prototypes"
1664 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001665 *)
Fred Drake109d9862001-07-11 06:27:56 +00001666 OPT="-O3 -Wall -Wstrict-prototypes";;
1667 esac
1668 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001669 *)
1670 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00001671 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001672 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1673 *)
1674 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001675 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001676 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00001677 case $ac_sys_system in
1678 Darwin*)
1679 OPT="$OPT -no-cpp-precomp";;
1680 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001681fi
1682
Fred Drakee1ceaa02001-12-04 20:55:47 +00001683if test "$Py_DEBUG" = 'true'; then
1684 :
1685else
1686 OPT="-DNDEBUG $OPT"
1687fi
1688
Trent Mick635f6fb2000-08-23 21:33:05 +00001689# The current (beta) Monterey compiler dies with optimizations
1690case $ac_sys_system in
1691Monterey*) OPT="";;
1692esac
1693
Guido van Rossum563e7081996-09-10 18:20:48 +00001694if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001695then
1696 OPT="$OPT $ac_arch_flags"
1697fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00001698
Guido van Rossum91922671997-10-09 20:24:13 +00001699echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001700echo "configure:1701: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001701if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001702 echo $ac_n "(cached) $ac_c" 1>&6
1703else
1704 ac_save_cc="$CC"
1705CC="$CC -OPT:Olimit=0"
1706if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001707 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00001708else
1709 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001710#line 1711 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001711#include "confdefs.h"
1712int main() { return 0; }
1713EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001714if { (eval echo configure:1715: \"$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 +00001715then
1716 ac_cv_opt_olimit_ok=yes
1717else
1718 echo "configure: failed program was:" >&5
1719 cat conftest.$ac_ext >&5
1720 rm -fr conftest*
1721 ac_cv_opt_olimit_ok=no
1722fi
1723rm -fr conftest*
1724fi
1725
1726CC="$ac_save_cc"
1727fi
1728
1729echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001730if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001731 case $ac_sys_system in
1732 Darwin*) OPT="$OPT" ;;
1733 *) OPT="$OPT -OPT:Olimit=0";;
1734 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001735else
1736 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001737echo "configure:1738: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001738 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001739 echo $ac_n "(cached) $ac_c" 1>&6
1740else
1741 ac_save_cc="$CC"
1742 CC="$CC -Olimit 1500"
1743 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001744 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001745else
1746 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001747#line 1748 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001748#include "confdefs.h"
1749int main() { return 0; }
1750EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001751if { (eval echo configure:1752: \"$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 +00001752then
1753 ac_cv_olimit_ok=yes
1754else
1755 echo "configure: failed program was:" >&5
1756 cat conftest.$ac_ext >&5
1757 rm -fr conftest*
1758 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001759fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001760rm -fr conftest*
1761fi
1762
1763 CC="$ac_save_cc"
1764fi
1765
1766 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1767 if test $ac_cv_olimit_ok = yes; then
1768 OPT="$OPT -Olimit 1500"
1769 fi
1770fi
1771
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001772# On some compilers, pthreads are available without further options
1773# (e.g. MacOS X). On some of these systems, the compiler will not
1774# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
1775# So we have to see first whether pthreads are available without
1776# options before we can check whether -Kpthread improves anything.
1777echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001778echo "configure:1779: checking whether pthreads are available without options" >&5
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001779if eval "test \"`echo '$''{'ac_cv_pthread_is_default'+set}'`\" = set"; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001780 echo $ac_n "(cached) $ac_c" 1>&6
1781else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001782 if test "$cross_compiling" = yes; then
1783 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001784else
1785 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001786#line 1787 "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00001787#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001788
Martin v. Löwis130fb172001-07-19 11:00:41 +00001789#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001790
1791void* routine(void* p){return NULL;}
1792
1793int main(){
1794 pthread_t p;
1795 if(pthread_create(&p,NULL,routine,NULL)!=0)
1796 return 1;
1797 return 0;
1798}
1799
Martin v. Löwis130fb172001-07-19 11:00:41 +00001800EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001801if { (eval echo configure:1802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001802then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001803 ac_cv_pthread_is_default=yes
1804else
1805 echo "configure: failed program was:" >&5
1806 cat conftest.$ac_ext >&5
1807 rm -fr conftest*
1808 ac_cv_pthread_is_default=no
1809fi
1810rm -fr conftest*
1811fi
1812
1813
1814fi
1815
1816echo "$ac_t""$ac_cv_pthread_is_default" 1>&6
1817
1818
1819if test $ac_cv_pthread_is_default = yes
1820then
1821 ac_cv_kpthread=no
1822else
1823# -Kpthread, if available, provides the right #defines
1824# and linker options to make pthread_create available
1825# Some compilers won't report that they do not support -Kpthread,
1826# so we need to run a program to see whether it really made the
1827# function available.
1828echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001829echo "configure:1830: checking whether $CC accepts -Kpthread" >&5
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001830if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1831 echo $ac_n "(cached) $ac_c" 1>&6
1832else
1833 ac_save_cc="$CC"
1834CC="$CC -Kpthread"
1835if test "$cross_compiling" = yes; then
1836 ac_cv_kpthread=no
1837else
1838 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001839#line 1840 "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001840#include "confdefs.h"
1841
1842#include <pthread.h>
1843
1844void* routine(void* p){return NULL;}
1845
1846int main(){
1847 pthread_t p;
1848 if(pthread_create(&p,NULL,routine,NULL)!=0)
1849 return 1;
1850 return 0;
1851}
1852
1853EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001854if { (eval echo configure:1855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001855then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001856 ac_cv_kpthread=yes
1857else
1858 echo "configure: failed program was:" >&5
1859 cat conftest.$ac_ext >&5
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001860 rm -fr conftest*
Martin v. Löwis130fb172001-07-19 11:00:41 +00001861 ac_cv_kpthread=no
1862fi
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001863rm -fr conftest*
1864fi
1865
Martin v. Löwis130fb172001-07-19 11:00:41 +00001866CC="$ac_save_cc"
1867fi
1868
Martin v. Löwis130fb172001-07-19 11:00:41 +00001869echo "$ac_t""$ac_cv_kpthread" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001870fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00001871
Guido van Rossum84e7b241996-08-19 21:59:00 +00001872
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001873# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001874echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001875echo "configure:1876: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001876if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001877 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001878else
1879 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001880#line 1881 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001881#include "confdefs.h"
1882#include <stdlib.h>
1883#include <stdarg.h>
1884#include <string.h>
1885#include <float.h>
1886EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001887ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001888{ (eval echo configure:1889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001889ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001890if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001891 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001892 ac_cv_header_stdc=yes
1893else
1894 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001895 echo "configure: failed program was:" >&5
1896 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001897 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001898 ac_cv_header_stdc=no
1899fi
1900rm -f conftest*
1901
1902if test $ac_cv_header_stdc = yes; then
1903 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1904cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001905#line 1906 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001906#include "confdefs.h"
1907#include <string.h>
1908EOF
1909if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1910 egrep "memchr" >/dev/null 2>&1; then
1911 :
1912else
1913 rm -rf conftest*
1914 ac_cv_header_stdc=no
1915fi
1916rm -f conftest*
1917
1918fi
1919
1920if test $ac_cv_header_stdc = yes; then
1921 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1922cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001923#line 1924 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001924#include "confdefs.h"
1925#include <stdlib.h>
1926EOF
1927if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1928 egrep "free" >/dev/null 2>&1; then
1929 :
1930else
1931 rm -rf conftest*
1932 ac_cv_header_stdc=no
1933fi
1934rm -f conftest*
1935
1936fi
1937
1938if test $ac_cv_header_stdc = yes; then
1939 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1940if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001941 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001942else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001943 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001944#line 1945 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001945#include "confdefs.h"
1946#include <ctype.h>
1947#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1948#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001949#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001950int main () { int i; for (i = 0; i < 256; i++)
1951if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1952exit (0); }
1953
1954EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001955if { (eval echo configure:1956: \"$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 +00001956then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001957 :
1958else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001959 echo "configure: failed program was:" >&5
1960 cat conftest.$ac_ext >&5
1961 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001962 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001963fi
1964rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001965fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001966
1967fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001968fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001969
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001970echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001971if test $ac_cv_header_stdc = yes; then
1972 cat >> confdefs.h <<\EOF
1973#define STDC_HEADERS 1
1974EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001975
1976fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001977
Guido van Rossuma6535fd2001-10-18 19:44:10 +00001978for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h locale.h \
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001979ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00001980signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00001981sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00001982sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwis69532332001-10-13 09:12:41 +00001983sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00001984ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001985do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001986ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001987echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001988echo "configure:1989: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001989if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001990 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001991else
1992 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001993#line 1994 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001994#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001995#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001996EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001997ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001998{ (eval echo configure:1999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001999ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00002000if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002001 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002002 eval "ac_cv_header_$ac_safe=yes"
2003else
2004 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002005 echo "configure: failed program was:" >&5
2006 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002007 rm -rf conftest*
2008 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002009fi
2010rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002011fi
2012if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002013 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002014 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002015 cat >> confdefs.h <<EOF
2016#define $ac_tr_hdr 1
2017EOF
2018
2019else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002020 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002021fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002022done
2023
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002024ac_header_dirent=no
2025for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2026do
Guido van Rossumf78abae1997-01-21 22:02:36 +00002027ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002028echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002029echo "configure:2030: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002030if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002031 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002032else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002033 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002034#line 2035 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002035#include "confdefs.h"
2036#include <sys/types.h>
2037#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002038int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002039DIR *dirp = 0;
2040; return 0; }
2041EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002042if { (eval echo configure:2043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002043 rm -rf conftest*
2044 eval "ac_cv_header_dirent_$ac_safe=yes"
2045else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002046 echo "configure: failed program was:" >&5
2047 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002048 rm -rf conftest*
2049 eval "ac_cv_header_dirent_$ac_safe=no"
2050fi
2051rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002052fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002053if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002054 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002055 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002056 cat >> confdefs.h <<EOF
2057#define $ac_tr_hdr 1
2058EOF
2059 ac_header_dirent=$ac_hdr; break
2060else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002061 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002062fi
2063done
2064# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2065if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002066echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002067echo "configure:2068: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002068ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002069if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002070 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002071else
2072 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002073LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002074cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002075#line 2076 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002076#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002077/* Override any gcc2 internal prototype to avoid an error. */
2078/* We use char because int might match the return type of a gcc2
2079 builtin and then its argument prototype would still apply. */
2080char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002081
Guido van Rossumf78abae1997-01-21 22:02:36 +00002082int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002083opendir()
2084; return 0; }
2085EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002086if { (eval echo configure:2087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002087 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002088 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002089else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002090 echo "configure: failed program was:" >&5
2091 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002092 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002093 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002094fi
2095rm -f conftest*
2096LIBS="$ac_save_LIBS"
2097
2098fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002099if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002100 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002101 LIBS="$LIBS -ldir"
2102else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002103 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002104fi
2105
2106else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002107echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002108echo "configure:2109: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002109ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002110if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002111 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002112else
2113 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002114LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002115cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002116#line 2117 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002117#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002118/* Override any gcc2 internal prototype to avoid an error. */
2119/* We use char because int might match the return type of a gcc2
2120 builtin and then its argument prototype would still apply. */
2121char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002122
Guido van Rossumf78abae1997-01-21 22:02:36 +00002123int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002124opendir()
2125; return 0; }
2126EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002127if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002128 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002129 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002130else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002131 echo "configure: failed program was:" >&5
2132 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002133 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002134 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002135fi
2136rm -f conftest*
2137LIBS="$ac_save_LIBS"
2138
2139fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002140if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002141 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002142 LIBS="$LIBS -lx"
2143else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002144 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002145fi
2146
2147fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002148
2149
2150# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002151was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002152echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002153echo "configure:2154: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002154cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002155#line 2156 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002156#include "confdefs.h"
2157#include <time.h>
2158EOF
2159if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2160 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002161 rm -rf conftest*
2162 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002163else
2164 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002165 cat >> confdefs.h <<\EOF
2166#define clock_t long
2167EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002168
2169fi
2170rm -f conftest*
2171
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002172echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002173
Guido van Rossum810cc512001-09-09 23:51:39 +00002174# Two defines needed to enable largefile support on various platforms
2175# These may affect some typedefs
2176cat >> confdefs.h <<\EOF
2177#define _LARGEFILE_SOURCE 1
2178EOF
2179
2180cat >> confdefs.h <<\EOF
2181#define _FILE_OFFSET_BITS 64
2182EOF
2183
2184
Guido van Rossum84e7b241996-08-19 21:59:00 +00002185# Add some code to confdefs.h so that the test for off_t works on SCO
2186cat >> confdefs.h <<\EOF
2187#if defined(SCO_DS)
2188#undef _OFF_T
2189#endif
2190EOF
2191
Guido van Rossumef2255b2000-03-10 22:30:29 +00002192# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002193echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002194echo "configure:2195: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002195if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002196 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002197else
2198 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002199#line 2200 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002200#include "confdefs.h"
2201#include <sys/types.h>
2202#if STDC_HEADERS
2203#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002204#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002205#endif
2206EOF
2207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002208 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 +00002209 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002210 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002211else
2212 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002213 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002214fi
2215rm -f conftest*
2216
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002217fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002218echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2219if test $ac_cv_type_mode_t = no; then
2220 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002221#define mode_t int
2222EOF
2223
2224fi
2225
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002226echo $ac_n "checking for off_t""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002227echo "configure:2228: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002228if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002229 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002230else
2231 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002232#line 2233 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002233#include "confdefs.h"
2234#include <sys/types.h>
2235#if STDC_HEADERS
2236#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002237#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002238#endif
2239EOF
2240if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002241 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 +00002242 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002243 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002244else
2245 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002246 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002247fi
2248rm -f conftest*
2249
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002250fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002251echo "$ac_t""$ac_cv_type_off_t" 1>&6
2252if test $ac_cv_type_off_t = no; then
2253 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002254#define off_t long
2255EOF
2256
2257fi
2258
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002259echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002260echo "configure:2261: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002261if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002262 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002263else
2264 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002265#line 2266 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002266#include "confdefs.h"
2267#include <sys/types.h>
2268#if STDC_HEADERS
2269#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002270#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002271#endif
2272EOF
2273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002274 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 +00002275 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002276 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002277else
2278 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002279 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002280fi
2281rm -f conftest*
2282
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002283fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002284echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2285if test $ac_cv_type_pid_t = no; then
2286 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002287#define pid_t int
2288EOF
2289
2290fi
2291
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002292echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002293echo "configure:2294: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002294if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002295 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002296else
2297 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002298#line 2299 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002299#include "confdefs.h"
2300#include <sys/types.h>
2301#include <signal.h>
2302#ifdef signal
2303#undef signal
2304#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002305#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002306extern "C" void (*signal (int, void (*)(int)))(int);
2307#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002308void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002309#endif
2310
Guido van Rossumf78abae1997-01-21 22:02:36 +00002311int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002312int i;
2313; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002314EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002315if { (eval echo configure:2316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002316 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002317 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002318else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002319 echo "configure: failed program was:" >&5
2320 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002321 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002322 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002323fi
2324rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002325fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002326
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002327echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002328cat >> confdefs.h <<EOF
2329#define RETSIGTYPE $ac_cv_type_signal
2330EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002331
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002332
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002333echo $ac_n "checking for size_t""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002334echo "configure:2335: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002335if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002336 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002337else
2338 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002339#line 2340 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002340#include "confdefs.h"
2341#include <sys/types.h>
2342#if STDC_HEADERS
2343#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002344#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002345#endif
2346EOF
2347if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002348 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 +00002349 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002350 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002351else
2352 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002353 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002354fi
2355rm -f conftest*
2356
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002357fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002358echo "$ac_t""$ac_cv_type_size_t" 1>&6
2359if test $ac_cv_type_size_t = no; then
2360 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002361#define size_t unsigned
2362EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002363
2364fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002365
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002366echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002367echo "configure:2368: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002368if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002369 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002370else
2371 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002372#line 2373 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002373#include "confdefs.h"
2374#include <sys/types.h>
2375EOF
2376if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2377 egrep "uid_t" >/dev/null 2>&1; then
2378 rm -rf conftest*
2379 ac_cv_type_uid_t=yes
2380else
2381 rm -rf conftest*
2382 ac_cv_type_uid_t=no
2383fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002384rm -f conftest*
2385
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002386fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002387
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002388echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002389if test $ac_cv_type_uid_t = no; then
2390 cat >> confdefs.h <<\EOF
2391#define uid_t int
2392EOF
2393
2394 cat >> confdefs.h <<\EOF
2395#define gid_t int
2396EOF
2397
2398fi
2399
Guido van Rossum627b2d71993-12-24 10:39:16 +00002400
Guido van Rossumef2255b2000-03-10 22:30:29 +00002401# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002402echo $ac_n "checking size of int""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002403echo "configure:2404: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002404if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002405 echo $ac_n "(cached) $ac_c" 1>&6
2406else
2407 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002408 ac_cv_sizeof_int=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002409else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002410 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002411#line 2412 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002412#include "confdefs.h"
2413#include <stdio.h>
2414main()
2415{
2416 FILE *f=fopen("conftestval", "w");
2417 if (!f) exit(1);
2418 fprintf(f, "%d\n", sizeof(int));
2419 exit(0);
2420}
2421EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002422if { (eval echo configure:2423: \"$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 +00002423then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002424 ac_cv_sizeof_int=`cat conftestval`
2425else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002426 echo "configure: failed program was:" >&5
2427 cat conftest.$ac_ext >&5
2428 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002429 ac_cv_sizeof_int=0
2430fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002431rm -fr conftest*
2432fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002433
2434fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002435echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2436cat >> confdefs.h <<EOF
2437#define SIZEOF_INT $ac_cv_sizeof_int
2438EOF
2439
2440
2441echo $ac_n "checking size of long""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002442echo "configure:2443: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002443if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002444 echo $ac_n "(cached) $ac_c" 1>&6
2445else
2446 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002447 ac_cv_sizeof_long=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002448else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002449 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002450#line 2451 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002451#include "confdefs.h"
2452#include <stdio.h>
2453main()
2454{
2455 FILE *f=fopen("conftestval", "w");
2456 if (!f) exit(1);
2457 fprintf(f, "%d\n", sizeof(long));
2458 exit(0);
2459}
2460EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002461if { (eval echo configure:2462: \"$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 +00002462then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002463 ac_cv_sizeof_long=`cat conftestval`
2464else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002465 echo "configure: failed program was:" >&5
2466 cat conftest.$ac_ext >&5
2467 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002468 ac_cv_sizeof_long=0
2469fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002470rm -fr conftest*
2471fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002472
2473fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002474echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2475cat >> confdefs.h <<EOF
2476#define SIZEOF_LONG $ac_cv_sizeof_long
2477EOF
2478
2479
Guido van Rossumad678af1998-10-02 14:42:15 +00002480echo $ac_n "checking size of void *""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002481echo "configure:2482: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002482if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002483 echo $ac_n "(cached) $ac_c" 1>&6
2484else
2485 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002486 ac_cv_sizeof_void_p=4
Guido van Rossumad678af1998-10-02 14:42:15 +00002487else
2488 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002489#line 2490 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002490#include "confdefs.h"
2491#include <stdio.h>
2492main()
2493{
2494 FILE *f=fopen("conftestval", "w");
2495 if (!f) exit(1);
2496 fprintf(f, "%d\n", sizeof(void *));
2497 exit(0);
2498}
2499EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002500if { (eval echo configure:2501: \"$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 +00002501then
2502 ac_cv_sizeof_void_p=`cat conftestval`
2503else
2504 echo "configure: failed program was:" >&5
2505 cat conftest.$ac_ext >&5
2506 rm -fr conftest*
2507 ac_cv_sizeof_void_p=0
2508fi
2509rm -fr conftest*
2510fi
2511
2512fi
2513echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2514cat >> confdefs.h <<EOF
2515#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2516EOF
2517
2518
Guido van Rossumef2255b2000-03-10 22:30:29 +00002519echo $ac_n "checking size of char""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002520echo "configure:2521: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002521if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002522 echo $ac_n "(cached) $ac_c" 1>&6
2523else
2524 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002525 ac_cv_sizeof_char=1
Guido van Rossumef2255b2000-03-10 22:30:29 +00002526else
2527 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002528#line 2529 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002529#include "confdefs.h"
2530#include <stdio.h>
2531main()
2532{
2533 FILE *f=fopen("conftestval", "w");
2534 if (!f) exit(1);
2535 fprintf(f, "%d\n", sizeof(char));
2536 exit(0);
2537}
2538EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002539if { (eval echo configure:2540: \"$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 +00002540then
2541 ac_cv_sizeof_char=`cat conftestval`
2542else
2543 echo "configure: failed program was:" >&5
2544 cat conftest.$ac_ext >&5
2545 rm -fr conftest*
2546 ac_cv_sizeof_char=0
2547fi
2548rm -fr conftest*
2549fi
2550
2551fi
2552echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2553cat >> confdefs.h <<EOF
2554#define SIZEOF_CHAR $ac_cv_sizeof_char
2555EOF
2556
2557
2558echo $ac_n "checking size of short""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002559echo "configure:2560: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002560if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002561 echo $ac_n "(cached) $ac_c" 1>&6
2562else
2563 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002564 ac_cv_sizeof_short=2
Guido van Rossumef2255b2000-03-10 22:30:29 +00002565else
2566 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002567#line 2568 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002568#include "confdefs.h"
2569#include <stdio.h>
2570main()
2571{
2572 FILE *f=fopen("conftestval", "w");
2573 if (!f) exit(1);
2574 fprintf(f, "%d\n", sizeof(short));
2575 exit(0);
2576}
2577EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002578if { (eval echo configure:2579: \"$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 +00002579then
2580 ac_cv_sizeof_short=`cat conftestval`
2581else
2582 echo "configure: failed program was:" >&5
2583 cat conftest.$ac_ext >&5
2584 rm -fr conftest*
2585 ac_cv_sizeof_short=0
2586fi
2587rm -fr conftest*
2588fi
2589
2590fi
2591echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2592cat >> confdefs.h <<EOF
2593#define SIZEOF_SHORT $ac_cv_sizeof_short
2594EOF
2595
2596
2597echo $ac_n "checking size of float""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002598echo "configure:2599: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002599if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002600 echo $ac_n "(cached) $ac_c" 1>&6
2601else
2602 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002603 ac_cv_sizeof_float=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00002604else
2605 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002606#line 2607 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002607#include "confdefs.h"
2608#include <stdio.h>
2609main()
2610{
2611 FILE *f=fopen("conftestval", "w");
2612 if (!f) exit(1);
2613 fprintf(f, "%d\n", sizeof(float));
2614 exit(0);
2615}
2616EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002617if { (eval echo configure:2618: \"$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 +00002618then
2619 ac_cv_sizeof_float=`cat conftestval`
2620else
2621 echo "configure: failed program was:" >&5
2622 cat conftest.$ac_ext >&5
2623 rm -fr conftest*
2624 ac_cv_sizeof_float=0
2625fi
2626rm -fr conftest*
2627fi
2628
2629fi
2630echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2631cat >> confdefs.h <<EOF
2632#define SIZEOF_FLOAT $ac_cv_sizeof_float
2633EOF
2634
2635
2636echo $ac_n "checking size of double""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002637echo "configure:2638: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002638if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002639 echo $ac_n "(cached) $ac_c" 1>&6
2640else
2641 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002642 ac_cv_sizeof_double=8
Guido van Rossumef2255b2000-03-10 22:30:29 +00002643else
2644 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002645#line 2646 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002646#include "confdefs.h"
2647#include <stdio.h>
2648main()
2649{
2650 FILE *f=fopen("conftestval", "w");
2651 if (!f) exit(1);
2652 fprintf(f, "%d\n", sizeof(double));
2653 exit(0);
2654}
2655EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002656if { (eval echo configure:2657: \"$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 +00002657then
2658 ac_cv_sizeof_double=`cat conftestval`
2659else
2660 echo "configure: failed program was:" >&5
2661 cat conftest.$ac_ext >&5
2662 rm -fr conftest*
2663 ac_cv_sizeof_double=0
2664fi
2665rm -fr conftest*
2666fi
2667
2668fi
2669echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2670cat >> confdefs.h <<EOF
2671#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2672EOF
2673
2674
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002675echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002676echo "configure:2677: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002677if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002678 echo $ac_n "(cached) $ac_c" 1>&6
2679else
2680 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002681 ac_cv_sizeof_fpos_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002682else
2683 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002684#line 2685 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002685#include "confdefs.h"
2686#include <stdio.h>
2687main()
2688{
2689 FILE *f=fopen("conftestval", "w");
2690 if (!f) exit(1);
2691 fprintf(f, "%d\n", sizeof(fpos_t));
2692 exit(0);
2693}
2694EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002695if { (eval echo configure:2696: \"$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 +00002696then
2697 ac_cv_sizeof_fpos_t=`cat conftestval`
2698else
2699 echo "configure: failed program was:" >&5
2700 cat conftest.$ac_ext >&5
2701 rm -fr conftest*
2702 ac_cv_sizeof_fpos_t=0
2703fi
2704rm -fr conftest*
2705fi
2706
2707fi
2708echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2709cat >> confdefs.h <<EOF
2710#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2711EOF
2712
2713
Guido van Rossum0a516c91994-09-12 10:58:40 +00002714
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002715echo $ac_n "checking for long long support""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002716echo "configure:2717: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002717have_long_long=no
2718cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002719#line 2720 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002720#include "confdefs.h"
2721
2722int main() {
2723long long x; x = (long long)0;
2724; return 0; }
2725EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002726if { (eval echo configure:2727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002727 rm -rf conftest*
2728 cat >> confdefs.h <<\EOF
2729#define HAVE_LONG_LONG 1
2730EOF
2731 have_long_long=yes
2732else
2733 echo "configure: failed program was:" >&5
2734 cat conftest.$ac_ext >&5
2735fi
2736rm -f conftest*
2737echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002738if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002739echo $ac_n "checking size of long long""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002740echo "configure:2741: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002741if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002742 echo $ac_n "(cached) $ac_c" 1>&6
2743else
2744 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002745 ac_cv_sizeof_long_long=8
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002746else
2747 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002748#line 2749 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002749#include "confdefs.h"
2750#include <stdio.h>
2751main()
2752{
2753 FILE *f=fopen("conftestval", "w");
2754 if (!f) exit(1);
2755 fprintf(f, "%d\n", sizeof(long long));
2756 exit(0);
2757}
2758EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002759if { (eval echo configure:2760: \"$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 +00002760then
2761 ac_cv_sizeof_long_long=`cat conftestval`
2762else
2763 echo "configure: failed program was:" >&5
2764 cat conftest.$ac_ext >&5
2765 rm -fr conftest*
2766 ac_cv_sizeof_long_long=0
2767fi
2768rm -fr conftest*
2769fi
2770
2771fi
2772echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2773cat >> confdefs.h <<EOF
2774#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2775EOF
2776
2777
2778fi
2779
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002780echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002781echo "configure:2782: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002782have_uintptr_t=no
2783cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002784#line 2785 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002785#include "confdefs.h"
2786
2787int main() {
2788uintptr_t x; x = (uintptr_t)0;
2789; return 0; }
2790EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002791if { (eval echo configure:2792: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002792 rm -rf conftest*
2793 cat >> confdefs.h <<\EOF
2794#define HAVE_UINTPTR_T 1
2795EOF
2796 have_uintptr_t=yes
2797else
2798 echo "configure: failed program was:" >&5
2799 cat conftest.$ac_ext >&5
2800fi
2801rm -f conftest*
2802echo "$ac_t""$have_uintptr_t" 1>&6
2803if test "$have_uintptr_t" = yes ; then
2804echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002805echo "configure:2806: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002806if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002807 echo $ac_n "(cached) $ac_c" 1>&6
2808else
2809 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002810 ac_cv_sizeof_uintptr_t=4
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002811else
2812 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002813#line 2814 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002814#include "confdefs.h"
2815#include <stdio.h>
2816main()
2817{
2818 FILE *f=fopen("conftestval", "w");
2819 if (!f) exit(1);
2820 fprintf(f, "%d\n", sizeof(uintptr_t));
2821 exit(0);
2822}
2823EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002824if { (eval echo configure:2825: \"$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 +00002825then
2826 ac_cv_sizeof_uintptr_t=`cat conftestval`
2827else
2828 echo "configure: failed program was:" >&5
2829 cat conftest.$ac_ext >&5
2830 rm -fr conftest*
2831 ac_cv_sizeof_uintptr_t=0
2832fi
2833rm -fr conftest*
2834fi
2835
2836fi
2837echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2838cat >> confdefs.h <<EOF
2839#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2840EOF
2841
2842
2843fi
2844
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002845# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2846echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002847echo "configure:2848: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002848if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002849 echo $ac_n "(cached) $ac_c" 1>&6
2850else
2851 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002852 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002853else
2854 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002855#line 2856 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002856#include "confdefs.h"
2857#include <stdio.h>
2858#include <sys/types.h>
2859main()
2860{
2861 FILE *f=fopen("conftestval", "w");
2862 if (!f) exit(1);
2863 fprintf(f, "%d\n", sizeof(off_t));
2864 exit(0);
2865}
2866EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002867if { (eval echo configure:2868: \"$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 +00002868then
2869 ac_cv_sizeof_off_t=`cat conftestval`
2870else
2871 echo "configure: failed program was:" >&5
2872 cat conftest.$ac_ext >&5
2873 rm -fr conftest*
2874 ac_cv_sizeof_off_t=0
2875fi
2876rm -fr conftest*
2877fi
2878
2879
2880fi
2881
2882echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2883cat >> confdefs.h <<EOF
2884#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2885EOF
2886
2887
2888echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002889echo "configure:2890: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002890if test "$have_long_long" = yes -a \
2891 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2892 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002893 cat >> confdefs.h <<\EOF
2894#define HAVE_LARGEFILE_SUPPORT 1
2895EOF
2896
2897 echo "$ac_t""yes" 1>&6
2898else
2899 echo "$ac_t""no" 1>&6
2900fi
2901
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002902# AC_CHECK_SIZEOF() doesn't include <time.h>.
2903echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002904echo "configure:2905: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002905if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002906 echo $ac_n "(cached) $ac_c" 1>&6
2907else
2908 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002909 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002910else
2911 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002912#line 2913 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002913#include "confdefs.h"
2914#include <stdio.h>
2915#include <time.h>
2916main()
2917{
2918 FILE *f=fopen("conftestval", "w");
2919 if (!f) exit(1);
2920 fprintf(f, "%d\n", sizeof(time_t));
2921 exit(0);
2922}
2923EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002924if { (eval echo configure:2925: \"$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 +00002925then
2926 ac_cv_sizeof_time_t=`cat conftestval`
2927else
2928 echo "configure: failed program was:" >&5
2929 cat conftest.$ac_ext >&5
2930 rm -fr conftest*
2931 ac_cv_sizeof_time_t=0
2932fi
2933rm -fr conftest*
2934fi
2935
2936
2937fi
2938
2939echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2940cat >> confdefs.h <<EOF
2941#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2942EOF
2943
2944
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002945
Trent Mick635f6fb2000-08-23 21:33:05 +00002946# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002947ac_save_cc="$CC"
2948if test "$ac_cv_kpthread" = "yes"
2949then CC="$CC -Kpthread"
2950fi
Trent Mick635f6fb2000-08-23 21:33:05 +00002951echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002952echo "configure:2953: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002953have_pthread_t=no
2954cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002955#line 2956 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002956#include "confdefs.h"
2957#include <pthread.h>
2958int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002959pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002960; return 0; }
2961EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002962if { (eval echo configure:2963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002963 rm -rf conftest*
2964 have_pthread_t=yes
2965else
2966 echo "configure: failed program was:" >&5
2967 cat conftest.$ac_ext >&5
2968fi
2969rm -f conftest*
2970echo "$ac_t""$have_pthread_t" 1>&6
2971if test "$have_pthread_t" = yes ; then
2972 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2973 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002974echo "configure:2975: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002975 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002976 echo $ac_n "(cached) $ac_c" 1>&6
2977else
2978 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002979 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00002980else
2981 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002982#line 2983 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002983#include "confdefs.h"
2984#include <stdio.h>
2985 #include <pthread.h>
2986 main()
2987 {
2988 FILE *f=fopen("conftestval", "w");
2989 if (!f) exit(1);
2990 fprintf(f, "%d\n", sizeof(pthread_t));
2991 exit(0);
2992 }
2993EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002994if { (eval echo configure:2995: \"$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 +00002995then
2996 ac_cv_sizeof_pthread_t=`cat conftestval`
2997else
2998 echo "configure: failed program was:" >&5
2999 cat conftest.$ac_ext >&5
3000 rm -fr conftest*
3001 ac_cv_sizeof_pthread_t=0
3002fi
3003rm -fr conftest*
3004fi
3005
3006
3007fi
3008
3009 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
3010 cat >> confdefs.h <<EOF
3011#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
3012EOF
3013
3014fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003015CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00003016
Jack Jansene578a632001-08-15 01:27:14 +00003017echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003018echo "configure:3019: checking for --enable-toolbox-glue" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003019# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
3020if test "${enable_toolbox_glue+set}" = set; then
3021 enableval="$enable_toolbox_glue"
3022 :
3023fi
3024
3025
3026if test -z "$enable_toolbox_glue"
3027then
3028 case $ac_sys_system/$ac_sys_release in
3029 Darwin/*)
3030 enable_toolbox_glue="yes";;
3031 *)
3032 enable_toolbox_glue="no";;
3033 esac
3034fi
3035case "$enable_toolbox_glue" in
3036yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00003037 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00003038 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00003039 extra_undefs="-u __dummy -u _PyMac_Error"
Jack Jansene578a632001-08-15 01:27:14 +00003040 cat >> confdefs.h <<\EOF
3041#define USE_TOOLBOX_OBJECT_GLUE 1
3042EOF
3043
3044 ;;
3045*)
3046 extra_frameworks=""
3047 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00003048 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00003049 ;;
3050esac
3051echo "$ac_t""$enable_toolbox_glue" 1>&6
3052
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003053
3054case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003055 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003056 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003057 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
3058 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00003059 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3060 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00003061 Darwin/*)
3062 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003063 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
3064 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00003065 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3066 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003067esac
3068
Jack Jansene578a632001-08-15 01:27:14 +00003069echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003070echo "configure:3071: checking for --enable-framework" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003071if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003072then
Jack Jansenca06bc62001-08-03 15:32:23 +00003073 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003074 # -U __environ is needed since bundles don't have access
3075 # to crt0 when built but will always be linked against it
Jack Jansene578a632001-08-15 01:27:14 +00003076 # -F. is needed to allow linking to the framework while
3077 # in the build location.
3078
Jack Jansena3891ea2001-09-07 14:25:12 +00003079 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003080 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
3081 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00003082 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003083 cat >> confdefs.h <<\EOF
3084#define WITH_NEXT_FRAMEWORK 1
3085EOF
3086
3087 echo "$ac_t""yes" 1>&6
3088else
3089 echo "$ac_t""no" 1>&6
3090fi
3091
Jack Jansene578a632001-08-15 01:27:14 +00003092echo $ac_n "checking for dyld""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003093echo "configure:3094: checking for dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003094case $ac_sys_system/$ac_sys_release in
3095 Darwin/*)
3096 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003097#define WITH_DYLD 1
3098EOF
3099
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003100 echo "$ac_t""always on for Darwin" 1>&6
3101 ;;
3102 *)
Jack Jansene578a632001-08-15 01:27:14 +00003103 echo "$ac_t""no" 1>&6
3104 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003105esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003106
Guido van Rossum0a516c91994-09-12 10:58:40 +00003107# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003108
3109
3110
3111
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003112
Guido van Rossum0a516c91994-09-12 10:58:40 +00003113# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003114# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003115echo $ac_n "checking SO""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003116echo "configure:3117: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003117if test -z "$SO"
3118then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003119 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003120 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003121 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003122 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003123 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003124fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003125echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003126# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003127# -- "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 +00003128# (Shared libraries in this instance are shared modules to be loaded into
3129# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003130echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003131echo "configure:3132: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003132if test -z "$LDSHARED"
3133then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003134 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003135 AIX*)
3136 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00003137 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003138 ;;
3139 BeOS*)
3140 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00003141 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003142 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003143 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003144 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003145 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a662000-05-26 12:22:54 +00003146 SunOS/5*)
3147 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003148 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003149 else LDSHARED="$(CC) -G";
Greg Ward57c9a662000-05-26 12:22:54 +00003150 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003151 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003152 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3153 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00003154 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003155 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3156 if test "$enable_framework" ; then
3157 # Link against the framework. All externals should be defined.
3158 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3159 else
3160 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00003161 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00003162 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00003163 Darwin/*)
3164 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3165 if test "$enable_framework" ; then
3166 # Link against the framework. All externals should be defined.
3167 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3168 else
3169 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00003170 LDSHARED="$LDSHARED -flat_namespace -undefined suppress"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003171 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00003172 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003173 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003174 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003175 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003176 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003177 then
3178 LDSHARED="cc -shared ${LDFLAGS}"
3179 else
3180 LDSHARED="ld -Bshareable ${LDFLAGS}"
3181 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003182 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003183 if test "$GCC" = "yes"
3184 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003185 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003186 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003187 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003188 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003189 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003190 *) LDSHARED="ld";;
3191 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003192fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003193echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003194BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003195# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003196# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003197echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003198echo "configure:3199: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003199if test -z "$CCSHARED"
3200then
Guido van Rossum07397971997-04-29 21:49:50 +00003201 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003202 SunOS*) if test "$GCC" = yes;
3203 then CCSHARED="-fPIC";
3204 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003205 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00003206 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00003207 else CCSHARED="+z";
3208 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003209 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003210 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003211 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003212 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003213 if test "$GCC" = "yes"
3214 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003215 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003216 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003217 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003218 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003219 IRIX*/6*) case $CC in
3220 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003221 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003222 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003223 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003224 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003225fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003226echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003227# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003228# the python executable -- this is only needed for a few systems
3229echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003230echo "configure:3231: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003231if test -z "$LINKFORSHARED"
3232then
Guido van Rossum07397971997-04-29 21:49:50 +00003233 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003234 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003235 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003236 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003237 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00003238 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003239 # -u libsys_s pulls in all symbols in libsys
Jack Jansene578a632001-08-15 01:27:14 +00003240 Darwin/*)
3241 # -u __dummy makes the linker aware of the objc runtime
3242 # in System.framework; otherwise, __objcInit (referenced in
3243 # crt1.o) gets erroneously defined as common, which breaks dynamic
3244 # loading of any modules which reference it in System.framework.
3245 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3246 # not used by the core itself but which needs to be in the core so
3247 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00003248 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00003249 if test "$enable_framework"
3250 then
3251 LINKFORSHARED="$LINKFORSHARED -framework Python"
3252 fi
3253 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003254 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003255 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003256 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003257 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003258 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3259 then
3260 LINKFORSHARED="-Wl,--export-dynamic"
3261 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003262 SunOS/5*) case $CC in
3263 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003264 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003265 then
3266 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003267 fi;;
3268 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003269 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003270fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003271echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003272
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003273
3274echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003275echo "configure:3276: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003276if test ! "$LIBRARY" = "$LDLIBRARY"
3277then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003278 case $ac_sys_system in
3279 CYGWIN*)
3280 # Cygwin needs CCSHARED when building extension DLLs
3281 # but not when building the interpreter DLL.
3282 CFLAGSFORSHARED='';;
3283 *)
3284 CFLAGSFORSHARED='$(CCSHARED)'
3285 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003286fi
3287echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3288
Guido van Rossum627b2d71993-12-24 10:39:16 +00003289# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003290echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003291echo "configure:3292: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003292ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003293if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003294 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003295else
3296 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003297LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003298cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003299#line 3300 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003300#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003301/* Override any gcc2 internal prototype to avoid an error. */
3302/* We use char because int might match the return type of a gcc2
3303 builtin and then its argument prototype would still apply. */
3304char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003305
Guido van Rossumf78abae1997-01-21 22:02:36 +00003306int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003307dlopen()
3308; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003309EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003310if { (eval echo configure:3311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003311 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003312 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003313else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003314 echo "configure: failed program was:" >&5
3315 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003316 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003317 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003318fi
3319rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003320LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003321
Guido van Rossum627b2d71993-12-24 10:39:16 +00003322fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003323if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003324 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003325 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3326 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003327 cat >> confdefs.h <<EOF
3328#define $ac_tr_lib 1
3329EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003330
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003331 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003332
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003333else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003334 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003335fi
3336 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003337echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003338echo "configure:3339: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003339ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003340if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003341 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003342else
3343 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003344LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003345cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003346#line 3347 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003347#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003348/* Override any gcc2 internal prototype to avoid an error. */
3349/* We use char because int might match the return type of a gcc2
3350 builtin and then its argument prototype would still apply. */
3351char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003352
Guido van Rossumf78abae1997-01-21 22:02:36 +00003353int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003354shl_load()
3355; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003356EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003357if { (eval echo configure:3358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003358 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003359 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003360else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003361 echo "configure: failed program was:" >&5
3362 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003363 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003364 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003365fi
3366rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003367LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003368
Guido van Rossum627b2d71993-12-24 10:39:16 +00003369fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003370if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003371 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003372 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3373 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003374 cat >> confdefs.h <<EOF
3375#define $ac_tr_lib 1
3376EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003377
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003378 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003379
3380else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003381 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003382fi
3383 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003384
3385# checks for system dependent C++ extensions support
3386case "$ac_sys_system" in
3387 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003388echo "configure:3389: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003389 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003390#line 3391 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003391#include "confdefs.h"
3392#include "/usr/lpp/xlC/include/load.h"
3393int main() {
3394loadAndInit("", 0, "")
3395; return 0; }
3396EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003397if { (eval echo configure:3398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003398 rm -rf conftest*
3399 cat >> confdefs.h <<\EOF
3400#define AIX_GENUINE_CPLUSPLUS 1
3401EOF
3402
3403 echo "$ac_t""yes" 1>&6
3404else
3405 echo "configure: failed program was:" >&5
3406 cat conftest.$ac_ext >&5
3407 rm -rf conftest*
3408 echo "$ac_t""no" 1>&6
3409fi
3410rm -f conftest*;;
3411 *) ;;
3412esac
3413
Guido van Rossum70c7f481998-03-26 18:44:10 +00003414# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3415# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003416# BeOS' sockets are stashed in libnet.
3417case "$ac_sys_system" in
3418IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003419*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003420echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003421echo "configure:3422: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003422ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003423if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003424 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003425else
3426 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003427LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003428cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003429#line 3430 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003430#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003431/* Override any gcc2 internal prototype to avoid an error. */
3432/* We use char because int might match the return type of a gcc2
3433 builtin and then its argument prototype would still apply. */
3434char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003435
Guido van Rossumf78abae1997-01-21 22:02:36 +00003436int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003437t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003438; return 0; }
3439EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003440if { (eval echo configure:3441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003441 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003442 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003443else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003444 echo "configure: failed program was:" >&5
3445 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003446 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003447 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003448fi
3449rm -f conftest*
3450LIBS="$ac_save_LIBS"
3451
3452fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003453if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003454 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003455 LIBS="-lnsl $LIBS"
3456else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003457 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003458fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003459 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003460echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003461echo "configure:3462: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003462ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003463if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003464 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003465else
3466 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003467LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003468cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003469#line 3470 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003470#include "confdefs.h"
3471/* Override any gcc2 internal prototype to avoid an error. */
3472/* We use char because int might match the return type of a gcc2
3473 builtin and then its argument prototype would still apply. */
3474char socket();
3475
3476int main() {
3477socket()
3478; return 0; }
3479EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003480if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003481 rm -rf conftest*
3482 eval "ac_cv_lib_$ac_lib_var=yes"
3483else
3484 echo "configure: failed program was:" >&5
3485 cat conftest.$ac_ext >&5
3486 rm -rf conftest*
3487 eval "ac_cv_lib_$ac_lib_var=no"
3488fi
3489rm -f conftest*
3490LIBS="$ac_save_LIBS"
3491
3492fi
3493if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3494 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003495 LIBS="-lsocket $LIBS"
3496else
3497 echo "$ac_t""no" 1>&6
3498fi
3499 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003500;;
3501esac
3502case "$ac_sys_system" in
3503BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003504echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003505echo "configure:3506: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003506ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003507if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003508 echo $ac_n "(cached) $ac_c" 1>&6
3509else
3510 ac_save_LIBS="$LIBS"
3511LIBS="-lnet $LIBS $LIBS"
3512cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003513#line 3514 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003514#include "confdefs.h"
3515/* Override any gcc2 internal prototype to avoid an error. */
3516/* We use char because int might match the return type of a gcc2
3517 builtin and then its argument prototype would still apply. */
3518char socket();
3519
3520int main() {
3521socket()
3522; return 0; }
3523EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003524if { (eval echo configure:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003525 rm -rf conftest*
3526 eval "ac_cv_lib_$ac_lib_var=yes"
3527else
3528 echo "configure: failed program was:" >&5
3529 cat conftest.$ac_ext >&5
3530 rm -rf conftest*
3531 eval "ac_cv_lib_$ac_lib_var=no"
3532fi
3533rm -f conftest*
3534LIBS="$ac_save_LIBS"
3535
3536fi
3537if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3538 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003539 LIBS="-lnet $LIBS"
3540else
3541 echo "$ac_t""no" 1>&6
3542fi
3543 # BeOS
3544;;
3545esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003546
Guido van Rossuma68acba1996-07-31 17:36:39 +00003547echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003548echo "configure:3549: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003549# Check whether --with-libs or --without-libs was given.
3550if test "${with_libs+set}" = set; then
3551 withval="$with_libs"
3552
3553echo "$ac_t""$withval" 1>&6
3554LIBS="$withval $LIBS"
3555
3556else
3557 echo "$ac_t""no" 1>&6
3558fi
3559
Guido van Rossum7f43da71994-08-01 12:15:30 +00003560
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003561# Determine if signalmodule should be used.
3562
3563
3564echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003565echo "configure:3566: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003566# Check whether --with-signal-module or --without-signal-module was given.
3567if test "${with_signal_module+set}" = set; then
3568 withval="$with_signal_module"
3569 :
3570fi
3571
3572
3573if test -z "$with_signal_module"
3574then with_signal_module="yes"
3575fi
3576echo "$ac_t""$with_signal_module" 1>&6
3577
3578if test "${with_signal_module}" = "yes"; then
3579 USE_SIGNAL_MODULE=""
3580 SIGNAL_OBJS=""
3581else
3582 USE_SIGNAL_MODULE="#"
3583 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3584fi
3585
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003586# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003587
Barry Warsawc0d24d82000-06-29 16:12:00 +00003588USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003589
Guido van Rossumec2f0731997-01-22 20:54:01 +00003590echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003591echo "configure:3592: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003592
3593# Check whether --with-dec-threads or --without-dec-threads was given.
3594if test "${with_dec_threads+set}" = set; then
3595 withval="$with_dec_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003596
3597echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003598LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003599if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003600 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003601fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003602else
3603 echo "$ac_t""no" 1>&6
3604fi
3605
3606
3607echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003608echo "configure:3609: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003609# Check whether --with-threads or --without-threads was given.
3610if test "${with_threads+set}" = set; then
3611 withval="$with_threads"
Barry Warsawc0d24d82000-06-29 16:12:00 +00003612 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003613fi
3614
3615
Barry Warsawc0d24d82000-06-29 16:12:00 +00003616# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003617# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003618if test "${with_thread+set}" = set; then
3619 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003620
3621with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003622fi
Barry Warsawc0d24d82000-06-29 16:12:00 +00003623
3624
3625if test -z "$with_threads"
3626then with_threads="yes"
3627fi
3628echo "$ac_t""$with_threads" 1>&6
3629
3630if test "$with_threads" = "no"
3631then
3632 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003633elif test "$ac_cv_pthread_is_default" = yes
3634then
3635 cat >> confdefs.h <<\EOF
3636#define WITH_THREAD 1
3637EOF
3638
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003639 # Defining _REENTRANT on system with POSIX threads should not hurt.
3640 cat >> confdefs.h <<\EOF
3641#define _REENTRANT 1
3642EOF
3643
3644 posix_threads=yes
3645 LIBOBJS="$LIBOBJS thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003646elif test "$ac_cv_kpthread" = "yes"
3647then
3648 CC="$CC -Kpthread"
3649 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003650#define WITH_THREAD 1
3651EOF
3652
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003653 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003654 LIBOBJS="$LIBOBJS thread.o"
3655else
3656 if test ! -z "$with_threads" -a -d "$with_threads"
3657 then LDFLAGS="$LDFLAGS -L$with_threads"
3658 fi
3659 if test ! -z "$withval" -a -d "$withval"
3660 then LDFLAGS="$LDFLAGS -L$withval"
3661 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003662
3663 # According to the POSIX spec, a pthreads implementation must
3664 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
3665 echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003666echo "configure:3667: checking for _POSIX_THREADS in unistd.h" >&5
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003667 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003668#line 3669 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003669#include "confdefs.h"
3670#include <unistd.h>
3671 #ifdef _POSIX_THREADS
3672 yes
3673 #endif
3674
3675EOF
3676if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3677 egrep "yes" >/dev/null 2>&1; then
3678 rm -rf conftest*
3679 unistd_defines_pthreads=yes
3680else
3681 rm -rf conftest*
3682 unistd_defines_pthreads=no
3683fi
3684rm -f conftest*
3685
3686 echo "$ac_t""$unistd_defines_pthreads" 1>&6
3687
Martin v. Löwis130fb172001-07-19 11:00:41 +00003688 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003689#define _REENTRANT 1
3690EOF
3691
Martin v. Löwis130fb172001-07-19 11:00:41 +00003692 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003693echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003694echo "configure:3695: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003695if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003696 echo $ac_n "(cached) $ac_c" 1>&6
3697else
3698 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003699#line 3700 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003700#include "confdefs.h"
3701#include <mach/cthreads.h>
3702EOF
3703ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003704{ (eval echo configure:3705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003705ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003706if test -z "$ac_err"; then
3707 rm -rf conftest*
3708 eval "ac_cv_header_$ac_safe=yes"
3709else
3710 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003711 echo "configure: failed program was:" >&5
3712 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003713 rm -rf conftest*
3714 eval "ac_cv_header_$ac_safe=no"
3715fi
3716rm -f conftest*
3717fi
3718if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3719 echo "$ac_t""yes" 1>&6
3720 cat >> confdefs.h <<\EOF
3721#define WITH_THREAD 1
3722EOF
3723
Martin v. Löwis130fb172001-07-19 11:00:41 +00003724 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003725#define C_THREADS 1
3726EOF
3727
Martin v. Löwis130fb172001-07-19 11:00:41 +00003728 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003729else
3730 echo "$ac_t""no" 1>&6
3731
Martin v. Löwis130fb172001-07-19 11:00:41 +00003732 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003733echo "configure:3734: checking for --with-pth" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00003734 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003735if test "${with_pth+set}" = set; then
3736 withval="$with_pth"
3737
Martin v. Löwis130fb172001-07-19 11:00:41 +00003738 echo "$ac_t""$withval" 1>&6
3739 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003740#define WITH_THREAD 1
3741EOF
3742
Martin v. Löwis130fb172001-07-19 11:00:41 +00003743 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003744#define HAVE_PTH 1
3745EOF
3746
Martin v. Löwis130fb172001-07-19 11:00:41 +00003747 LIBS="-lpth $LIBS"
3748 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003749else
3750
Martin v. Löwis130fb172001-07-19 11:00:41 +00003751 echo "$ac_t""no" 1>&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003752
3753 # Just looking for pthread_create in libpthread is not enough:
3754 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
3755 # So we really have to include pthread.h, and then link.
3756 _libs=$LIBS
3757 LIBS="$LIBS -lpthread"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003758 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003759echo "configure:3760: checking for pthread_create in -lpthread" >&5
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003760 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003761#line 3762 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003762#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003763#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00003764
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003765void * start_routine (void *arg) { exit (0); }
Guido van Rossum02a1c402000-02-25 19:26:31 +00003766int main() {
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003767
3768pthread_create (NULL, NULL, start_routine, NULL)
Guido van Rossum02a1c402000-02-25 19:26:31 +00003769; return 0; }
3770EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003771if { (eval echo configure:3772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003772 rm -rf conftest*
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003773
3774 echo "$ac_t""yes" 1>&6
3775 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003776#define WITH_THREAD 1
3777EOF
3778
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003779 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003780 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003781else
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003782 echo "configure: failed program was:" >&5
3783 cat conftest.$ac_ext >&5
3784 rm -rf conftest*
3785
3786 LIBS=$_libs
Martin v. Löwis130fb172001-07-19 11:00:41 +00003787 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003788echo "configure:3789: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003789if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003790 echo $ac_n "(cached) $ac_c" 1>&6
3791else
3792 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003793#line 3794 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003794#include "confdefs.h"
3795/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003796 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003797#include <assert.h>
3798/* Override any gcc2 internal prototype to avoid an error. */
3799/* We use char because int might match the return type of a gcc2
3800 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003801char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003802
3803int main() {
3804
3805/* The GNU C library defines this for functions which it implements
3806 to always fail with ENOSYS. Some functions are actually named
3807 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003808#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003809choke me
3810#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003811pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003812#endif
3813
3814; return 0; }
3815EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003816if { (eval echo configure:3817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003817 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003818 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003819else
3820 echo "configure: failed program was:" >&5
3821 cat conftest.$ac_ext >&5
3822 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003823 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003824fi
3825rm -f conftest*
3826fi
3827
Guido van Rossumea516321998-12-17 18:08:55 +00003828if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003829 echo "$ac_t""yes" 1>&6
3830 cat >> confdefs.h <<\EOF
3831#define WITH_THREAD 1
3832EOF
3833
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003834 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003835 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003836else
3837 echo "$ac_t""no" 1>&6
3838
Martin v. Löwis130fb172001-07-19 11:00:41 +00003839 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003840echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003841echo "configure:3842: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003842if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003843 echo $ac_n "(cached) $ac_c" 1>&6
3844else
3845 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003846#line 3847 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003847#include "confdefs.h"
3848#include <kernel/OS.h>
3849EOF
3850ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003851{ (eval echo configure:3852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003852ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003853if test -z "$ac_err"; then
3854 rm -rf conftest*
3855 eval "ac_cv_header_$ac_safe=yes"
3856else
3857 echo "$ac_err" >&5
3858 echo "configure: failed program was:" >&5
3859 cat conftest.$ac_ext >&5
3860 rm -rf conftest*
3861 eval "ac_cv_header_$ac_safe=no"
3862fi
3863rm -f conftest*
3864fi
3865if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = 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 Rossumec95c7b1998-08-04 17:59:56 +00003872#define BEOS_THREADS 1
3873EOF
3874
Martin v. Löwis130fb172001-07-19 11:00:41 +00003875 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003876else
3877 echo "$ac_t""no" 1>&6
3878
Martin v. Löwis130fb172001-07-19 11:00:41 +00003879 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003880echo "configure:3881: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003881ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003882if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003883 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003884else
3885 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003886LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003887cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003888#line 3889 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003889#include "confdefs.h"
3890/* Override any gcc2 internal prototype to avoid an error. */
3891/* We use char because int might match the return type of a gcc2
3892 builtin and then its argument prototype would still apply. */
3893char pthread_create();
3894
3895int main() {
3896pthread_create()
3897; return 0; }
3898EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003899if { (eval echo configure:3900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003900 rm -rf conftest*
3901 eval "ac_cv_lib_$ac_lib_var=yes"
3902else
3903 echo "configure: failed program was:" >&5
3904 cat conftest.$ac_ext >&5
3905 rm -rf conftest*
3906 eval "ac_cv_lib_$ac_lib_var=no"
3907fi
3908rm -f conftest*
3909LIBS="$ac_save_LIBS"
3910
3911fi
3912if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3913 echo "$ac_t""yes" 1>&6
3914 cat >> confdefs.h <<\EOF
3915#define WITH_THREAD 1
3916EOF
3917
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003918 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003919 LIBS="$LIBS -lpthreads"
3920 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003921else
3922 echo "$ac_t""no" 1>&6
3923
Martin v. Löwis130fb172001-07-19 11:00:41 +00003924 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003925echo "configure:3926: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003926ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003927if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003928 echo $ac_n "(cached) $ac_c" 1>&6
3929else
3930 ac_save_LIBS="$LIBS"
3931LIBS="-lc_r $LIBS"
3932cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003933#line 3934 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003934#include "confdefs.h"
3935/* Override any gcc2 internal prototype to avoid an error. */
3936/* We use char because int might match the return type of a gcc2
3937 builtin and then its argument prototype would still apply. */
3938char pthread_create();
3939
3940int main() {
3941pthread_create()
3942; return 0; }
3943EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003944if { (eval echo configure:3945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003945 rm -rf conftest*
3946 eval "ac_cv_lib_$ac_lib_var=yes"
3947else
3948 echo "configure: failed program was:" >&5
3949 cat conftest.$ac_ext >&5
3950 rm -rf conftest*
3951 eval "ac_cv_lib_$ac_lib_var=no"
3952fi
3953rm -f conftest*
3954LIBS="$ac_save_LIBS"
3955
3956fi
3957if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3958 echo "$ac_t""yes" 1>&6
3959 cat >> confdefs.h <<\EOF
3960#define WITH_THREAD 1
3961EOF
3962
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003963 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003964 LIBS="$LIBS -lc_r"
3965 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003966else
3967 echo "$ac_t""no" 1>&6
3968
Martin v. Löwis130fb172001-07-19 11:00:41 +00003969 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003970echo "configure:3971: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003971ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003972if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003973 echo $ac_n "(cached) $ac_c" 1>&6
3974else
3975 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003976LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003977cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003978#line 3979 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003979#include "confdefs.h"
3980/* Override any gcc2 internal prototype to avoid an error. */
3981/* We use char because int might match the return type of a gcc2
3982 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003983char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003984
3985int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003986__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003987; return 0; }
3988EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003989if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003990 rm -rf conftest*
3991 eval "ac_cv_lib_$ac_lib_var=yes"
3992else
3993 echo "configure: failed program was:" >&5
3994 cat conftest.$ac_ext >&5
3995 rm -rf conftest*
3996 eval "ac_cv_lib_$ac_lib_var=no"
3997fi
3998rm -f conftest*
3999LIBS="$ac_save_LIBS"
4000
4001fi
4002if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4003 echo "$ac_t""yes" 1>&6
4004 cat >> confdefs.h <<\EOF
4005#define WITH_THREAD 1
4006EOF
4007
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004008 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004009 LIBS="$LIBS -lthread"
4010 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00004011else
4012 echo "$ac_t""no" 1>&6
4013
Martin v. Löwis130fb172001-07-19 11:00:41 +00004014 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004015echo "configure:4016: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004016ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
4017if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4018 echo $ac_n "(cached) $ac_c" 1>&6
4019else
4020 ac_save_LIBS="$LIBS"
4021LIBS="-lpthread $LIBS"
4022cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004023#line 4024 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004024#include "confdefs.h"
4025/* Override any gcc2 internal prototype to avoid an error. */
4026/* We use char because int might match the return type of a gcc2
4027 builtin and then its argument prototype would still apply. */
4028char __pthread_create_system();
4029
4030int main() {
4031__pthread_create_system()
4032; return 0; }
4033EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004034if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004035 rm -rf conftest*
4036 eval "ac_cv_lib_$ac_lib_var=yes"
4037else
4038 echo "configure: failed program was:" >&5
4039 cat conftest.$ac_ext >&5
4040 rm -rf conftest*
4041 eval "ac_cv_lib_$ac_lib_var=no"
4042fi
4043rm -f conftest*
4044LIBS="$ac_save_LIBS"
4045
4046fi
4047if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4048 echo "$ac_t""yes" 1>&6
4049 cat >> confdefs.h <<\EOF
4050#define WITH_THREAD 1
4051EOF
4052
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004053 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004054 LIBS="$LIBS -lpthread"
4055 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004056else
4057 echo "$ac_t""no" 1>&6
4058
Martin v. Löwis130fb172001-07-19 11:00:41 +00004059 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004060echo "configure:4061: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00004061ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004062if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004063 echo $ac_n "(cached) $ac_c" 1>&6
4064else
4065 ac_save_LIBS="$LIBS"
4066LIBS="-lcma $LIBS"
4067cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004068#line 4069 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004069#include "confdefs.h"
4070/* Override any gcc2 internal prototype to avoid an error. */
4071/* We use char because int might match the return type of a gcc2
4072 builtin and then its argument prototype would still apply. */
4073char pthread_create();
4074
4075int main() {
4076pthread_create()
4077; return 0; }
4078EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004079if { (eval echo configure:4080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004080 rm -rf conftest*
4081 eval "ac_cv_lib_$ac_lib_var=yes"
4082else
4083 echo "configure: failed program was:" >&5
4084 cat conftest.$ac_ext >&5
4085 rm -rf conftest*
4086 eval "ac_cv_lib_$ac_lib_var=no"
4087fi
4088rm -f conftest*
4089LIBS="$ac_save_LIBS"
4090
4091fi
4092if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4093 echo "$ac_t""yes" 1>&6
4094 cat >> confdefs.h <<\EOF
4095#define WITH_THREAD 1
4096EOF
4097
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004098 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004099 LIBS="$LIBS -lcma"
4100 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004101else
4102 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004103
Martin v. Löwis130fb172001-07-19 11:00:41 +00004104 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004105fi
4106
Martin v. Löwis130fb172001-07-19 11:00:41 +00004107
Guido van Rossum627b2d71993-12-24 10:39:16 +00004108fi
4109
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004110fi
4111
Guido van Rossum0be3e491997-05-22 20:33:33 +00004112fi
4113
Guido van Rossum49545951997-12-02 19:28:29 +00004114fi
4115
Guido van Rossumb93a8621998-05-07 13:27:32 +00004116fi
4117
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004118fi
4119
Guido van Rossumad678af1998-10-02 14:42:15 +00004120fi
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00004121rm -f conftest*
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004122fi
4123
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004124fi
4125
Guido van Rossum0be3e491997-05-22 20:33:33 +00004126
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004127 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004128 if test "$unistd_defines_pthreads" = "no"; then
4129 cat >> confdefs.h <<\EOF
4130#define _POSIX_THREADS 1
4131EOF
4132
4133 fi
4134
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004135 echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004136echo "configure:4137: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004137 if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then
4138 echo $ac_n "(cached) $ac_c" 1>&6
4139else
4140 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004141 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004142else
4143 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004144#line 4145 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004145#include "confdefs.h"
4146#include <pthread.h>
4147 void *foo(void *parm) {
4148 return NULL;
4149 }
4150 main() {
4151 pthread_attr_t attr;
4152 if (pthread_attr_init(&attr)) exit(-1);
4153 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
4154 if (pthread_create(NULL, &attr, foo, NULL)) exit(-1);
4155 exit(0);
4156 }
4157EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004158if { (eval echo configure:4159: \"$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 +00004159then
4160 ac_cv_pthread_system_supported=yes
4161else
4162 echo "configure: failed program was:" >&5
4163 cat conftest.$ac_ext >&5
4164 rm -fr conftest*
4165 ac_cv_pthread_system_supported=no
4166fi
4167rm -fr conftest*
4168fi
4169
4170
4171fi
4172
4173 echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6
4174 if test "$ac_cv_pthread_system_supported" = "yes"; then
4175 cat >> confdefs.h <<\EOF
4176#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
4177EOF
4178
4179 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004180 for ac_func in pthread_sigmask
4181do
4182echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004183echo "configure:4184: checking for $ac_func" >&5
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004184if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4185 echo $ac_n "(cached) $ac_c" 1>&6
4186else
4187 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004188#line 4189 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004189#include "confdefs.h"
4190/* System header to define __stub macros and hopefully few prototypes,
4191 which can conflict with char $ac_func(); below. */
4192#include <assert.h>
4193/* Override any gcc2 internal prototype to avoid an error. */
4194/* We use char because int might match the return type of a gcc2
4195 builtin and then its argument prototype would still apply. */
4196char $ac_func();
4197
4198int main() {
4199
4200/* The GNU C library defines this for functions which it implements
4201 to always fail with ENOSYS. Some functions are actually named
4202 something starting with __ and the normal name is an alias. */
4203#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4204choke me
4205#else
4206$ac_func();
4207#endif
4208
4209; return 0; }
4210EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004211if { (eval echo configure:4212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004212 rm -rf conftest*
4213 eval "ac_cv_func_$ac_func=yes"
4214else
4215 echo "configure: failed program was:" >&5
4216 cat conftest.$ac_ext >&5
4217 rm -rf conftest*
4218 eval "ac_cv_func_$ac_func=no"
4219fi
4220rm -f conftest*
4221fi
4222
4223if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4224 echo "$ac_t""yes" 1>&6
4225 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4226 cat >> confdefs.h <<EOF
4227#define $ac_tr_func 1
4228EOF
4229
4230else
4231 echo "$ac_t""no" 1>&6
4232fi
4233done
4234
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004235 fi
4236
Martin v. Löwis130fb172001-07-19 11:00:41 +00004237 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004238echo "configure:4239: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004239ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004240if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004241 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004242else
4243 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004244LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004245cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004246#line 4247 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004247#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004248/* Override any gcc2 internal prototype to avoid an error. */
4249/* We use char because int might match the return type of a gcc2
4250 builtin and then its argument prototype would still apply. */
4251char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004252
Guido van Rossumf78abae1997-01-21 22:02:36 +00004253int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254usconfig()
4255; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004256EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004257if { (eval echo configure:4258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004258 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004259 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004260else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004261 echo "configure: failed program was:" >&5
4262 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004264 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004265fi
4266rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004267LIBS="$ac_save_LIBS"
4268
4269fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004270if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004271 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004272 cat >> confdefs.h <<\EOF
4273#define WITH_THREAD 1
4274EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004275
Martin v. Löwis130fb172001-07-19 11:00:41 +00004276 LIBS="$LIBS -lmpc"
4277 LIBOBJS="$LIBOBJS thread.o"
4278 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004279else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004280 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004281fi
4282
Martin v. Löwis130fb172001-07-19 11:00:41 +00004283 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004284echo "configure:4285: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004285ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004286if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004287 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288else
4289 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004290LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004291cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004292#line 4293 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004293#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004294/* Override any gcc2 internal prototype to avoid an error. */
4295/* We use char because int might match the return type of a gcc2
4296 builtin and then its argument prototype would still apply. */
4297char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004298
Guido van Rossumf78abae1997-01-21 22:02:36 +00004299int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004300thr_create()
4301; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004302EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004303if { (eval echo configure:4304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004304 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004305 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004306else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004307 echo "configure: failed program was:" >&5
4308 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004309 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004310 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004311fi
4312rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004313LIBS="$ac_save_LIBS"
4314
4315fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004316if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004317 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004318 cat >> confdefs.h <<\EOF
4319#define WITH_THREAD 1
4320EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004321
Martin v. Löwis130fb172001-07-19 11:00:41 +00004322 LIBS="$LIBS -lthread"
4323 LIBOBJS="$LIBOBJS thread.o"
4324 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004325else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004326 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004327fi
4328
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004329
Martin v. Löwis130fb172001-07-19 11:00:41 +00004330 if test "$USE_THREAD_MODULE" != "#"
4331 then
4332 # If the above checks didn't disable threads, (at least) OSF1
4333 # needs this '-threads' argument during linking.
4334 case $ac_sys_system in
4335 OSF1) LDLAST=-threads;;
4336 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004337 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004338fi
4339
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004340# Check for enable-ipv6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004341echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004342echo "configure:4343: checking if --enable-ipv6 is specified" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004343# Check whether --enable-ipv6 or --disable-ipv6 was given.
4344if test "${enable_ipv6+set}" = set; then
4345 enableval="$enable_ipv6"
4346 case "$enableval" in
4347 no)
4348 echo "$ac_t""no" 1>&6
4349 ipv6=no
4350 ;;
4351 *) echo "$ac_t""yes" 1>&6
4352 cat >> confdefs.h <<\EOF
4353#define ENABLE_IPV6 1
4354EOF
4355
4356 ipv6=yes
4357 ;;
4358 esac
4359else
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004360
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004361 if test "$cross_compiling" = yes; then
4362 echo "$ac_t""no" 1>&6
4363 ipv6=no
4364
4365else
4366 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004367#line 4368 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004368#include "confdefs.h"
4369 /* AF_INET6 available check */
4370#include <sys/types.h>
4371#include <sys/socket.h>
4372main()
4373{
4374 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4375 exit(1);
4376 else
4377 exit(0);
4378}
4379
4380EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004381if { (eval echo configure:4382: \"$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 +00004382then
4383 echo "$ac_t""yes" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004384 ipv6=yes
4385else
4386 echo "configure: failed program was:" >&5
4387 cat conftest.$ac_ext >&5
4388 rm -fr conftest*
4389 echo "$ac_t""no" 1>&6
4390 ipv6=no
4391fi
4392rm -fr conftest*
4393fi
4394
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004395
4396if test "$ipv6" = "yes"; then
4397 echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004398echo "configure:4399: checking if RFC2553 API is available" >&5
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004399 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004400#line 4401 "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004401#include "confdefs.h"
4402#include <sys/types.h>
4403#include <netinet/in.h>
4404int main() {
4405struct sockaddr_in6 x;
4406x.sin6_scope_id;
4407; return 0; }
4408EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004409if { (eval echo configure:4410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004410 rm -rf conftest*
4411 echo "$ac_t""yes" 1>&6
4412 ipv6=yes
4413else
4414 echo "configure: failed program was:" >&5
4415 cat conftest.$ac_ext >&5
4416 rm -rf conftest*
4417 echo "$ac_t""no" 1>&6
4418 ipv6=no
4419fi
4420rm -f conftest*
4421fi
4422
4423if test "$ipv6" = "yes"; then
4424 cat >> confdefs.h <<\EOF
4425#define ENABLE_IPV6 1
4426EOF
4427
4428fi
4429
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004430fi
4431
4432
4433ipv6type=unknown
4434ipv6lib=none
4435ipv6trylibc=no
4436
4437if test "$ipv6" = "yes"; then
4438 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004439echo "configure:4440: checking ipv6 stack type" >&5
Guido van Rossumb8552162001-09-05 14:58:11 +00004440 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
4441 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004442 case $i in
4443 inria)
4444 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004445#line 4446 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004446#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004447
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004448#include <netinet/in.h>
4449#ifdef IPV6_INRIA_VERSION
4450yes
4451#endif
4452EOF
4453if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4454 egrep "yes" >/dev/null 2>&1; then
4455 rm -rf conftest*
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004456 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004457fi
4458rm -f conftest*
4459
4460 ;;
4461 kame)
4462 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004463#line 4464 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004464#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004465
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004466#include <netinet/in.h>
4467#ifdef __KAME__
4468yes
4469#endif
4470EOF
4471if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4472 egrep "yes" >/dev/null 2>&1; then
4473 rm -rf conftest*
4474 ipv6type=$i;
4475 ipv6lib=inet6
4476 ipv6libdir=/usr/local/v6/lib
4477 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004478fi
4479rm -f conftest*
4480
4481 ;;
4482 linux-glibc)
4483 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004484#line 4485 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004485#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004486
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004487#include <features.h>
4488#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4489yes
4490#endif
4491EOF
4492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4493 egrep "yes" >/dev/null 2>&1; then
4494 rm -rf conftest*
4495 ipv6type=$i;
4496 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004497fi
4498rm -f conftest*
4499
4500 ;;
4501 linux-inet6)
4502 if test -d /usr/inet6; then
4503 ipv6type=$i
4504 ipv6lib=inet6
4505 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004506 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004507 fi
4508 ;;
4509 solaris)
4510 if test -f /etc/netconfig; then
4511 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4512 ipv6type=$i
4513 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004514 fi
4515 fi
4516 ;;
4517 toshiba)
4518 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004519#line 4520 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004520#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004521
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004522#include <sys/param.h>
4523#ifdef _TOSHIBA_INET6
4524yes
4525#endif
4526EOF
4527if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4528 egrep "yes" >/dev/null 2>&1; then
4529 rm -rf conftest*
4530 ipv6type=$i;
4531 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004532 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004533fi
4534rm -f conftest*
4535
4536 ;;
4537 v6d)
4538 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004539#line 4540 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004540#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004541
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004542#include </usr/local/v6/include/sys/v6config.h>
4543#ifdef __V6D__
4544yes
4545#endif
4546EOF
4547if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4548 egrep "yes" >/dev/null 2>&1; then
4549 rm -rf conftest*
4550 ipv6type=$i;
4551 ipv6lib=v6;
4552 ipv6libdir=/usr/local/v6/lib;
4553 OPT="-I/usr/local/v6/include $OPT"
4554fi
4555rm -f conftest*
4556
4557 ;;
4558 zeta)
4559 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004560#line 4561 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004561#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004562
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004563#include <sys/param.h>
4564#ifdef _ZETA_MINAMI_INET6
4565yes
4566#endif
4567EOF
4568if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4569 egrep "yes" >/dev/null 2>&1; then
4570 rm -rf conftest*
4571 ipv6type=$i;
4572 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004573 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004574fi
4575rm -f conftest*
4576
4577 ;;
4578 esac
4579 if test "$ipv6type" != "unknown"; then
4580 break
4581 fi
4582 done
4583 echo "$ac_t""$ipv6type" 1>&6
4584fi
4585
4586if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4587 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4588 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4589 echo "using lib$ipv6lib"
4590 else
4591 if test $ipv6trylibc = "yes"; then
4592 echo "using libc"
4593 else
4594 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4595 echo "You need to fetch lib$ipv6lib.a from appropriate"
4596 echo 'ipv6 kit and compile beforehand.'
4597 exit 1
4598 fi
4599 fi
4600fi
4601
Barry Warsawef82cd72000-06-30 16:21:01 +00004602# Check for GC support
Barry Warsawef82cd72000-06-30 16:21:01 +00004603echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004604echo "configure:4605: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004605# Check whether --with-cycle-gc or --without-cycle-gc was given.
4606if test "${with_cycle_gc+set}" = set; then
4607 withval="$with_cycle_gc"
4608 :
4609fi
4610
4611
4612if test -z "$with_cycle_gc"
4613then with_cycle_gc="yes"
4614fi
Neil Schemenauercf229462001-08-29 23:58:47 +00004615if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +00004616then
Barry Warsawef82cd72000-06-30 16:21:01 +00004617 cat >> confdefs.h <<\EOF
4618#define WITH_CYCLE_GC 1
4619EOF
4620
4621fi
4622echo "$ac_t""$with_cycle_gc" 1>&6
4623
Neil Schemenauera35c6882001-02-27 04:45:05 +00004624# Check for Python-specific malloc support
4625echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004626echo "configure:4627: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004627# Check whether --with-pymalloc or --without-pymalloc was given.
4628if test "${with_pymalloc+set}" = set; then
4629 withval="$with_pymalloc"
4630
4631if test "$withval" != no
4632then cat >> confdefs.h <<\EOF
4633#define WITH_PYMALLOC 1
4634EOF
4635 echo "$ac_t""yes" 1>&6
4636else echo "$ac_t""no" 1>&6
4637fi
4638else
4639 echo "$ac_t""no" 1>&6
4640fi
4641
4642
Barry Warsawef82cd72000-06-30 16:21:01 +00004643# Check for --with-wctype-functions
4644echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004645echo "configure:4646: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004646# Check whether --with-wctype-functions or --without-wctype-functions was given.
4647if test "${with_wctype_functions+set}" = set; then
4648 withval="$with_wctype_functions"
4649
4650if test "$withval" != no
4651then cat >> confdefs.h <<\EOF
4652#define WANT_WCTYPE_FUNCTIONS 1
4653EOF
4654 echo "$ac_t""yes" 1>&6
4655else echo "$ac_t""no" 1>&6
4656fi
4657else
4658 echo "$ac_t""no" 1>&6
4659fi
4660
4661
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004662# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004663
Guido van Rossum98935bf2001-09-05 19:13:16 +00004664DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004665
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004666echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004667echo "configure:4668: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004668# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004669if test "${with_sgi_dl+set}" = set; then
4670 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004671
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004672echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004673cat >> confdefs.h <<\EOF
4674#define WITH_SGI_DL 1
4675EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004676
Guido van Rossume97ee181999-12-20 21:27:22 +00004677DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004678dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004679if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004680then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004681else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004682fi
4683DLINCLDIR=${dldir}
4684LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004685else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004686 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004687fi
4688
4689
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004690echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004691echo "configure:4692: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004692# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004693if test "${with_dl_dld+set}" = set; then
4694 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004695
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004696echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004697cat >> confdefs.h <<\EOF
4698#define WITH_DL_DLD 1
4699EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004700
Guido van Rossume97ee181999-12-20 21:27:22 +00004701DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004702dldir=`echo "$withval" | sed 's/,.*//'`
4703dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004704if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004705then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004706else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004707fi
4708DLINCLDIR=${dldir}
4709LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004710else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004711 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004712fi
4713
4714
Guido van Rossume97ee181999-12-20 21:27:22 +00004715# the dlopen() function means we might want to use dynload_shlib.o. some
4716# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004717for ac_func in dlopen
4718do
4719echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004720echo "configure:4721: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004721if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004722 echo $ac_n "(cached) $ac_c" 1>&6
4723else
4724 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004725#line 4726 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004726#include "confdefs.h"
4727/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004728 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004729#include <assert.h>
4730/* Override any gcc2 internal prototype to avoid an error. */
4731/* We use char because int might match the return type of a gcc2
4732 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004733char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004734
4735int main() {
4736
4737/* The GNU C library defines this for functions which it implements
4738 to always fail with ENOSYS. Some functions are actually named
4739 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004740#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004741choke me
4742#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004743$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004744#endif
4745
4746; return 0; }
4747EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004748if { (eval echo configure:4749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004749 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004750 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004751else
4752 echo "configure: failed program was:" >&5
4753 cat conftest.$ac_ext >&5
4754 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004755 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004756fi
4757rm -f conftest*
4758fi
4759
Thomas Wouters3a584202000-08-05 23:28:51 +00004760if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004761 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004762 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4763 cat >> confdefs.h <<EOF
4764#define $ac_tr_func 1
4765EOF
4766
Guido van Rossume97ee181999-12-20 21:27:22 +00004767else
4768 echo "$ac_t""no" 1>&6
4769fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004770done
Guido van Rossume97ee181999-12-20 21:27:22 +00004771
4772
4773# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4774# loading of modules.
4775
4776echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004777echo "configure:4778: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004778if test -z "$DYNLOADFILE"
4779then
4780 case $ac_sys_system/$ac_sys_release in
4781 AIX*) DYNLOADFILE="dynload_aix.o";;
4782 BeOS*) DYNLOADFILE="dynload_beos.o";;
4783 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004784 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004785 *)
4786 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4787 # out any dynamic loading
4788 if test "$ac_cv_func_dlopen" = yes
4789 then DYNLOADFILE="dynload_shlib.o"
4790 else DYNLOADFILE="dynload_stub.o"
4791 fi
4792 ;;
4793 esac
4794fi
4795echo "$ac_t""$DYNLOADFILE" 1>&6
4796if test "$DYNLOADFILE" != "dynload_stub.o"
4797then
4798 cat >> confdefs.h <<\EOF
4799#define HAVE_DYNAMIC_LOADING 1
4800EOF
4801
4802fi
4803
Neil Schemenauer4e425612001-06-19 15:44:15 +00004804# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4805
4806
4807echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004808echo "configure:4809: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004809if test -z "$MACHDEP_OBJS"
4810then
Jack Jansene578a632001-08-15 01:27:14 +00004811 MACHDEP_OBJS=$extra_machdep_objs
4812else
4813 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004814fi
Jack Jansene578a632001-08-15 01:27:14 +00004815echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004816
Guido van Rossum627b2d71993-12-24 10:39:16 +00004817# checks for library functions
Martin v. Löwis244edc82001-10-04 22:44:26 +00004818for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004819 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00004820 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis864e9ff2001-08-04 22:32:03 +00004821 hstrerror inet_pton kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004822 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004823 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +00004824 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004825 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004826 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004827 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +00004828 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004829do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004830echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004831echo "configure:4832: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004832if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004833 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004834else
4835 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004836#line 4837 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004837#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004838/* System header to define __stub macros and hopefully few prototypes,
4839 which can conflict with char $ac_func(); below. */
4840#include <assert.h>
4841/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004842/* We use char because int might match the return type of a gcc2
4843 builtin and then its argument prototype would still apply. */
4844char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004845
Guido van Rossumf78abae1997-01-21 22:02:36 +00004846int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004847
Guido van Rossum627b2d71993-12-24 10:39:16 +00004848/* The GNU C library defines this for functions which it implements
4849 to always fail with ENOSYS. Some functions are actually named
4850 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004851#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004852choke me
4853#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004854$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004855#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004856
Guido van Rossum7f43da71994-08-01 12:15:30 +00004857; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004858EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004859if { (eval echo configure:4860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004860 rm -rf conftest*
4861 eval "ac_cv_func_$ac_func=yes"
4862else
4863 echo "configure: failed program was:" >&5
4864 cat conftest.$ac_ext >&5
4865 rm -rf conftest*
4866 eval "ac_cv_func_$ac_func=no"
4867fi
4868rm -f conftest*
4869fi
4870
4871if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4872 echo "$ac_t""yes" 1>&6
4873 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4874 cat >> confdefs.h <<EOF
4875#define $ac_tr_func 1
4876EOF
4877
4878else
4879 echo "$ac_t""no" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004880fi
4881done
4882
4883
4884# check for openpty and forkpty
4885
4886for ac_func in openpty
4887do
4888echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004889echo "configure:4890: checking for $ac_func" >&5
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004890if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4891 echo $ac_n "(cached) $ac_c" 1>&6
4892else
4893 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004894#line 4895 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004895#include "confdefs.h"
4896/* System header to define __stub macros and hopefully few prototypes,
4897 which can conflict with char $ac_func(); below. */
4898#include <assert.h>
4899/* Override any gcc2 internal prototype to avoid an error. */
4900/* We use char because int might match the return type of a gcc2
4901 builtin and then its argument prototype would still apply. */
4902char $ac_func();
4903
4904int main() {
4905
4906/* The GNU C library defines this for functions which it implements
4907 to always fail with ENOSYS. Some functions are actually named
4908 something starting with __ and the normal name is an alias. */
4909#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4910choke me
4911#else
4912$ac_func();
4913#endif
4914
4915; return 0; }
4916EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004917if { (eval echo configure:4918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004918 rm -rf conftest*
4919 eval "ac_cv_func_$ac_func=yes"
4920else
4921 echo "configure: failed program was:" >&5
4922 cat conftest.$ac_ext >&5
4923 rm -rf conftest*
4924 eval "ac_cv_func_$ac_func=no"
4925fi
4926rm -f conftest*
4927fi
4928
4929if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4930 echo "$ac_t""yes" 1>&6
4931 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4932 cat >> confdefs.h <<EOF
4933#define $ac_tr_func 1
4934EOF
4935
4936else
4937 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004938echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004939echo "configure:4940: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004940ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004941if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004942 echo $ac_n "(cached) $ac_c" 1>&6
4943else
4944 ac_save_LIBS="$LIBS"
4945LIBS="-lutil $LIBS"
4946cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004947#line 4948 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004948#include "confdefs.h"
4949/* Override any gcc2 internal prototype to avoid an error. */
4950/* We use char because int might match the return type of a gcc2
4951 builtin and then its argument prototype would still apply. */
4952char openpty();
4953
4954int main() {
4955openpty()
4956; return 0; }
4957EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004958if { (eval echo configure:4959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004959 rm -rf conftest*
4960 eval "ac_cv_lib_$ac_lib_var=yes"
4961else
4962 echo "configure: failed program was:" >&5
4963 cat conftest.$ac_ext >&5
4964 rm -rf conftest*
4965 eval "ac_cv_lib_$ac_lib_var=no"
4966fi
4967rm -f conftest*
4968LIBS="$ac_save_LIBS"
4969
4970fi
4971if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4972 echo "$ac_t""yes" 1>&6
4973 cat >> confdefs.h <<\EOF
4974#define HAVE_OPENPTY 1
4975EOF
4976 LIBS="$LIBS -lutil"
4977else
4978 echo "$ac_t""no" 1>&6
4979fi
4980
4981fi
4982done
4983
4984for ac_func in forkpty
4985do
4986echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004987echo "configure:4988: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004988if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004989 echo $ac_n "(cached) $ac_c" 1>&6
4990else
4991 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00004992#line 4993 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004993#include "confdefs.h"
4994/* System header to define __stub macros and hopefully few prototypes,
4995 which can conflict with char $ac_func(); below. */
4996#include <assert.h>
4997/* Override any gcc2 internal prototype to avoid an error. */
4998/* We use char because int might match the return type of a gcc2
4999 builtin and then its argument prototype would still apply. */
5000char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005001
5002int main() {
5003
5004/* The GNU C library defines this for functions which it implements
5005 to always fail with ENOSYS. Some functions are actually named
5006 something starting with __ and the normal name is an alias. */
5007#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5008choke me
5009#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005010$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005011#endif
5012
5013; return 0; }
5014EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005015if { (eval echo configure:5016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00005016 rm -rf conftest*
5017 eval "ac_cv_func_$ac_func=yes"
5018else
5019 echo "configure: failed program was:" >&5
5020 cat conftest.$ac_ext >&5
5021 rm -rf conftest*
5022 eval "ac_cv_func_$ac_func=no"
5023fi
5024rm -f conftest*
5025fi
5026
5027if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5028 echo "$ac_t""yes" 1>&6
5029 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5030 cat >> confdefs.h <<EOF
5031#define $ac_tr_func 1
5032EOF
5033
5034else
5035 echo "$ac_t""no" 1>&6
5036echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005037echo "configure:5038: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00005038ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005039if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00005040 echo $ac_n "(cached) $ac_c" 1>&6
5041else
5042 ac_save_LIBS="$LIBS"
5043LIBS="-lutil $LIBS"
5044cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005045#line 5046 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005046#include "confdefs.h"
5047/* Override any gcc2 internal prototype to avoid an error. */
5048/* We use char because int might match the return type of a gcc2
5049 builtin and then its argument prototype would still apply. */
5050char forkpty();
5051
5052int main() {
5053forkpty()
5054; return 0; }
5055EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005056if { (eval echo configure:5057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00005057 rm -rf conftest*
5058 eval "ac_cv_lib_$ac_lib_var=yes"
5059else
5060 echo "configure: failed program was:" >&5
5061 cat conftest.$ac_ext >&5
5062 rm -rf conftest*
5063 eval "ac_cv_lib_$ac_lib_var=no"
5064fi
5065rm -f conftest*
5066LIBS="$ac_save_LIBS"
5067
5068fi
5069if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5070 echo "$ac_t""yes" 1>&6
5071 cat >> confdefs.h <<\EOF
5072#define HAVE_FORKPTY 1
5073EOF
5074 LIBS="$LIBS -lutil"
5075else
5076 echo "$ac_t""no" 1>&6
5077fi
5078
5079fi
5080done
5081
5082
5083# check for long file support functions
5084for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
5085do
5086echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005087echo "configure:5088: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005088if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00005089 echo $ac_n "(cached) $ac_c" 1>&6
5090else
5091 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005092#line 5093 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005093#include "confdefs.h"
5094/* System header to define __stub macros and hopefully few prototypes,
5095 which can conflict with char $ac_func(); below. */
5096#include <assert.h>
5097/* Override any gcc2 internal prototype to avoid an error. */
5098/* We use char because int might match the return type of a gcc2
5099 builtin and then its argument prototype would still apply. */
5100char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005101
5102int main() {
5103
5104/* The GNU C library defines this for functions which it implements
5105 to always fail with ENOSYS. Some functions are actually named
5106 something starting with __ and the normal name is an alias. */
5107#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5108choke me
5109#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005110$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005111#endif
5112
5113; return 0; }
5114EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005115if { (eval echo configure:5116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005116 rm -rf conftest*
5117 eval "ac_cv_func_$ac_func=yes"
5118else
5119 echo "configure: failed program was:" >&5
5120 cat conftest.$ac_ext >&5
5121 rm -rf conftest*
5122 eval "ac_cv_func_$ac_func=no"
5123fi
5124rm -f conftest*
5125fi
5126
5127if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5128 echo "$ac_t""yes" 1>&6
5129 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5130 cat >> confdefs.h <<EOF
5131#define $ac_tr_func 1
5132EOF
5133
5134else
5135 echo "$ac_t""no" 1>&6
5136fi
5137done
5138
5139
5140for ac_func in dup2 getcwd strdup strerror memmove
5141do
5142echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005143echo "configure:5144: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005144if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005145 echo $ac_n "(cached) $ac_c" 1>&6
5146else
5147 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005148#line 5149 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005149#include "confdefs.h"
5150/* System header to define __stub macros and hopefully few prototypes,
5151 which can conflict with char $ac_func(); below. */
5152#include <assert.h>
5153/* Override any gcc2 internal prototype to avoid an error. */
5154/* We use char because int might match the return type of a gcc2
5155 builtin and then its argument prototype would still apply. */
5156char $ac_func();
5157
5158int main() {
5159
5160/* The GNU C library defines this for functions which it implements
5161 to always fail with ENOSYS. Some functions are actually named
5162 something starting with __ and the normal name is an alias. */
5163#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5164choke me
5165#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005166$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005167#endif
5168
5169; return 0; }
5170EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005171if { (eval echo configure:5172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005172 rm -rf conftest*
5173 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005174else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005175 echo "configure: failed program was:" >&5
5176 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005177 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005178 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005179fi
5180rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005181fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005182
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005183if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005184 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005185 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5186 cat >> confdefs.h <<EOF
5187#define $ac_tr_func 1
5188EOF
5189
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005190else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005191 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005192LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005193fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005194done
5195
Guido van Rossumf78abae1997-01-21 22:02:36 +00005196
Thomas Wouters3a584202000-08-05 23:28:51 +00005197for ac_func in getpgrp
5198do
5199echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005200echo "configure:5201: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005201if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005202 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005203else
5204 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005205#line 5206 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005206#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005207/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005208 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005209#include <assert.h>
5210/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005211/* We use char because int might match the return type of a gcc2
5212 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005213char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005214
Guido van Rossumf78abae1997-01-21 22:02:36 +00005215int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005216
Guido van Rossum627b2d71993-12-24 10:39:16 +00005217/* The GNU C library defines this for functions which it implements
5218 to always fail with ENOSYS. Some functions are actually named
5219 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005220#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005221choke me
5222#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005223$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005224#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005225
5226; return 0; }
5227EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005228if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005229 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005230 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005231else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005232 echo "configure: failed program was:" >&5
5233 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005234 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005235 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005236fi
5237rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005238fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005239
Thomas Wouters3a584202000-08-05 23:28:51 +00005240if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005241 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005242 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5243 cat >> confdefs.h <<EOF
5244#define $ac_tr_func 1
5245EOF
5246 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005247#line 5248 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005248#include "confdefs.h"
5249#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005250int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005251getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005252; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005253EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005254if { (eval echo configure:5255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005255 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005256 cat >> confdefs.h <<\EOF
5257#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005258EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005259
Guido van Rossumf78abae1997-01-21 22:02:36 +00005260else
5261 echo "configure: failed program was:" >&5
5262 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005263fi
5264rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005265else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005266 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005267fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005268done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005269
Thomas Wouters3a584202000-08-05 23:28:51 +00005270for ac_func in setpgrp
5271do
5272echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005273echo "configure:5274: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005274if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005275 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005276else
5277 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005278#line 5279 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005279#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005280/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005281 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005282#include <assert.h>
5283/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005284/* We use char because int might match the return type of a gcc2
5285 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005286char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005287
Guido van Rossumf78abae1997-01-21 22:02:36 +00005288int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005289
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005290/* The GNU C library defines this for functions which it implements
5291 to always fail with ENOSYS. Some functions are actually named
5292 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005293#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005294choke me
5295#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005296$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005297#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005298
5299; return 0; }
5300EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005301if { (eval echo configure:5302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005302 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005303 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005304else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005305 echo "configure: failed program was:" >&5
5306 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005307 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005308 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005309fi
5310rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005311fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005312
Thomas Wouters3a584202000-08-05 23:28:51 +00005313if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005314 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005315 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5316 cat >> confdefs.h <<EOF
5317#define $ac_tr_func 1
5318EOF
5319 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005320#line 5321 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005321#include "confdefs.h"
5322#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005323int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005324setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005325; return 0; }
5326EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005327if { (eval echo configure:5328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005328 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005329 cat >> confdefs.h <<\EOF
5330#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005331EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005332
Guido van Rossumf78abae1997-01-21 22:02:36 +00005333else
5334 echo "configure: failed program was:" >&5
5335 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005336fi
5337rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005338else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005339 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005340fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005341done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005342
Thomas Wouters3a584202000-08-05 23:28:51 +00005343for ac_func in gettimeofday
5344do
5345echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005346echo "configure:5347: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005347if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005348 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005349else
5350 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005351#line 5352 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005352#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005353/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005354 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005355#include <assert.h>
5356/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005357/* We use char because int might match the return type of a gcc2
5358 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005359char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005360
Guido van Rossumf78abae1997-01-21 22:02:36 +00005361int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005362
5363/* The GNU C library defines this for functions which it implements
5364 to always fail with ENOSYS. Some functions are actually named
5365 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005366#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005367choke me
5368#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005369$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005370#endif
5371
5372; return 0; }
5373EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005374if { (eval echo configure:5375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005375 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005376 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005377else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005378 echo "configure: failed program was:" >&5
5379 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005380 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005381 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005382fi
5383rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005384fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005385
Thomas Wouters3a584202000-08-05 23:28:51 +00005386if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005387 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005388 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5389 cat >> confdefs.h <<EOF
5390#define $ac_tr_func 1
5391EOF
5392 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005393#line 5394 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005394#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005395#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005396int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005397gettimeofday((struct timeval*)0,(struct timezone*)0);
5398; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005399EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005400if { (eval echo configure:5401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005401 :
5402else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005403 echo "configure: failed program was:" >&5
5404 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005405 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005406 cat >> confdefs.h <<\EOF
5407#define GETTIMEOFDAY_NO_TZ 1
5408EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005409
5410fi
5411rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005412else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005413 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005414fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005415done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005416
5417
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005418
5419# On OSF/1 V5.1, getaddrinfo is available, but a define
5420# for [no]getaddrinfo in netdb.h.
5421echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005422echo "configure:5423: checking for getaddrinfo" >&5
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005423cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005424#line 5425 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005425#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005426
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005427#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005428#include <sys/socket.h>
5429#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005430#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005431
5432int main() {
5433
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005434getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005435
5436; return 0; }
5437EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005438if { (eval echo configure:5439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005439 rm -rf conftest*
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005440
5441echo "$ac_t""yes" 1>&6
5442echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005443echo "configure:5444: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005444if test "$cross_compiling" = yes; then
5445 echo "$ac_t""buggy" 1>&6
5446buggygetaddrinfo=yes
5447else
5448 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005449#line 5450 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005450#include "confdefs.h"
5451
5452#include <sys/types.h>
5453#include <netdb.h>
5454#include <string.h>
5455#include <sys/socket.h>
5456#include <netinet/in.h>
5457
5458main()
5459{
5460 int passive, gaierr, inet4 = 0, inet6 = 0;
5461 struct addrinfo hints, *ai, *aitop;
5462 char straddr[INET6_ADDRSTRLEN], strport[16];
5463
5464 for (passive = 0; passive <= 1; passive++) {
5465 memset(&hints, 0, sizeof(hints));
5466 hints.ai_family = AF_UNSPEC;
5467 hints.ai_flags = passive ? AI_PASSIVE : 0;
5468 hints.ai_socktype = SOCK_STREAM;
5469 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5470 (void)gai_strerror(gaierr);
5471 goto bad;
5472 }
5473 for (ai = aitop; ai; ai = ai->ai_next) {
5474 if (ai->ai_addr == NULL ||
5475 ai->ai_addrlen == 0 ||
5476 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5477 straddr, sizeof(straddr), strport, sizeof(strport),
5478 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5479 goto bad;
5480 }
5481 switch (ai->ai_family) {
5482 case AF_INET:
5483 if (strcmp(strport, "54321") != 0) {
5484 goto bad;
5485 }
5486 if (passive) {
5487 if (strcmp(straddr, "0.0.0.0") != 0) {
5488 goto bad;
5489 }
5490 } else {
5491 if (strcmp(straddr, "127.0.0.1") != 0) {
5492 goto bad;
5493 }
5494 }
5495 inet4++;
5496 break;
5497 case AF_INET6:
5498 if (strcmp(strport, "54321") != 0) {
5499 goto bad;
5500 }
5501 if (passive) {
5502 if (strcmp(straddr, "::") != 0) {
5503 goto bad;
5504 }
5505 } else {
5506 if (strcmp(straddr, "::1") != 0) {
5507 goto bad;
5508 }
5509 }
5510 inet6++;
5511 break;
5512 case AF_UNSPEC:
5513 goto bad;
5514 break;
5515 default:
5516 /* another family support? */
5517 break;
5518 }
5519 }
5520 }
5521
5522 if (!(inet4 == 0 || inet4 == 2))
5523 goto bad;
5524 if (!(inet6 == 0 || inet6 == 2))
5525 goto bad;
5526
5527 if (aitop)
5528 freeaddrinfo(aitop);
5529 exit(0);
5530
5531 bad:
5532 if (aitop)
5533 freeaddrinfo(aitop);
5534 exit(1);
5535}
5536
5537EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005538if { (eval echo configure:5539: \"$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 +00005539then
5540 echo "$ac_t""good" 1>&6
5541buggygetaddrinfo=no
5542else
5543 echo "configure: failed program was:" >&5
5544 cat conftest.$ac_ext >&5
5545 rm -fr conftest*
5546 echo "$ac_t""buggy" 1>&6
5547buggygetaddrinfo=yes
5548fi
5549rm -fr conftest*
5550fi
5551
5552else
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005553 echo "configure: failed program was:" >&5
5554 cat conftest.$ac_ext >&5
5555 rm -rf conftest*
5556
5557echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005558buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005559
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005560fi
5561rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005562
5563if test "$buggygetaddrinfo" = "yes"; then
5564 if test "$ipv6" = "yes"; then
5565 echo 'Fatal: You must get working getaddrinfo() function.'
5566 echo ' or you can specify "--disable-ipv6"'.
5567 exit 1
5568 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005569else
5570 cat >> confdefs.h <<\EOF
5571#define HAVE_GETADDRINFO 1
5572EOF
5573
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005574fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005575for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005576do
5577echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005578echo "configure:5579: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005579if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5580 echo $ac_n "(cached) $ac_c" 1>&6
5581else
5582 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005583#line 5584 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005584#include "confdefs.h"
5585/* System header to define __stub macros and hopefully few prototypes,
5586 which can conflict with char $ac_func(); below. */
5587#include <assert.h>
5588/* Override any gcc2 internal prototype to avoid an error. */
5589/* We use char because int might match the return type of a gcc2
5590 builtin and then its argument prototype would still apply. */
5591char $ac_func();
5592
5593int main() {
5594
5595/* The GNU C library defines this for functions which it implements
5596 to always fail with ENOSYS. Some functions are actually named
5597 something starting with __ and the normal name is an alias. */
5598#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5599choke me
5600#else
5601$ac_func();
5602#endif
5603
5604; return 0; }
5605EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005606if { (eval echo configure:5607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005607 rm -rf conftest*
5608 eval "ac_cv_func_$ac_func=yes"
5609else
5610 echo "configure: failed program was:" >&5
5611 cat conftest.$ac_ext >&5
5612 rm -rf conftest*
5613 eval "ac_cv_func_$ac_func=no"
5614fi
5615rm -f conftest*
5616fi
5617
5618if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5619 echo "$ac_t""yes" 1>&6
5620 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5621 cat >> confdefs.h <<EOF
5622#define $ac_tr_func 1
5623EOF
5624
5625else
5626 echo "$ac_t""no" 1>&6
5627fi
5628done
5629
5630
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005631# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005632echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005633echo "configure:5634: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005634if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005635 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005636else
5637 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005638#line 5639 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005639#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005640#include <sys/types.h>
5641#include <sys/time.h>
5642#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005643int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005644struct tm *tp;
5645; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005646EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005647if { (eval echo configure:5648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005648 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005649 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005650else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005651 echo "configure: failed program was:" >&5
5652 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005653 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005654 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005655fi
5656rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005657fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005658
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005659echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005660if test $ac_cv_header_time = yes; then
5661 cat >> confdefs.h <<\EOF
5662#define TIME_WITH_SYS_TIME 1
5663EOF
5664
5665fi
5666
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005667echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005668echo "configure:5669: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005669if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005670 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005671else
5672 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005673#line 5674 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005674#include "confdefs.h"
5675#include <sys/types.h>
5676#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005677int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005678struct tm *tp; tp->tm_sec;
5679; return 0; }
5680EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005681if { (eval echo configure:5682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005682 rm -rf conftest*
5683 ac_cv_struct_tm=time.h
5684else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005685 echo "configure: failed program was:" >&5
5686 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005687 rm -rf conftest*
5688 ac_cv_struct_tm=sys/time.h
5689fi
5690rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005691fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005692
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005693echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005694if test $ac_cv_struct_tm = sys/time.h; then
5695 cat >> confdefs.h <<\EOF
5696#define TM_IN_SYS_TIME 1
5697EOF
5698
5699fi
5700
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005701echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005702echo "configure:5703: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005703if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005704 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005705else
5706 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005707#line 5708 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005708#include "confdefs.h"
5709#include <sys/types.h>
5710#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005711int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005712struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005713; return 0; }
5714EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005715if { (eval echo configure:5716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005716 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005717 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005718else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005719 echo "configure: failed program was:" >&5
5720 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005721 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005722 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005723fi
5724rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005725fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005726
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005727echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5728if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005729 cat >> confdefs.h <<\EOF
5730#define HAVE_TM_ZONE 1
5731EOF
5732
5733else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005734 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005735echo "configure:5736: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005736if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005737 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005738else
5739 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005740#line 5741 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005741#include "confdefs.h"
5742#include <time.h>
5743#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005744extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005745#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00005746int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005747atoi(*tzname);
5748; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005749EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005750if { (eval echo configure:5751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005751 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005752 ac_cv_var_tzname=yes
5753else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005754 echo "configure: failed program was:" >&5
5755 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005756 rm -rf conftest*
5757 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005758fi
5759rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005760fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005761
5762echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005763 if test $ac_cv_var_tzname = yes; then
5764 cat >> confdefs.h <<\EOF
5765#define HAVE_TZNAME 1
5766EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005767
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005768 fi
5769fi
5770
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005771echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005772echo "configure:5773: checking for st_rdev in struct stat" >&5
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005773if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
5774 echo $ac_n "(cached) $ac_c" 1>&6
5775else
5776 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005777#line 5778 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005778#include "confdefs.h"
5779#include <sys/types.h>
5780#include <sys/stat.h>
5781int main() {
5782struct stat s; s.st_rdev;
5783; return 0; }
5784EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005785if { (eval echo configure:5786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005786 rm -rf conftest*
5787 ac_cv_struct_st_rdev=yes
5788else
5789 echo "configure: failed program was:" >&5
5790 cat conftest.$ac_ext >&5
5791 rm -rf conftest*
5792 ac_cv_struct_st_rdev=no
5793fi
5794rm -f conftest*
5795fi
5796
5797echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
5798if test $ac_cv_struct_st_rdev = yes; then
5799 cat >> confdefs.h <<\EOF
5800#define HAVE_ST_RDEV 1
5801EOF
5802
5803fi
5804
5805echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005806echo "configure:5807: checking for st_blksize in struct stat" >&5
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005807if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
5808 echo $ac_n "(cached) $ac_c" 1>&6
5809else
5810 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005811#line 5812 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005812#include "confdefs.h"
5813#include <sys/types.h>
5814#include <sys/stat.h>
5815int main() {
5816struct stat s; s.st_blksize;
5817; return 0; }
5818EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005819if { (eval echo configure:5820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005820 rm -rf conftest*
5821 ac_cv_struct_st_blksize=yes
5822else
5823 echo "configure: failed program was:" >&5
5824 cat conftest.$ac_ext >&5
5825 rm -rf conftest*
5826 ac_cv_struct_st_blksize=no
5827fi
5828rm -f conftest*
5829fi
5830
5831echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
5832if test $ac_cv_struct_st_blksize = yes; then
5833 cat >> confdefs.h <<\EOF
5834#define HAVE_ST_BLKSIZE 1
5835EOF
5836
5837fi
5838
5839echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005840echo "configure:5841: checking for st_blocks in struct stat" >&5
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005841if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
5842 echo $ac_n "(cached) $ac_c" 1>&6
5843else
5844 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005845#line 5846 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005846#include "confdefs.h"
5847#include <sys/types.h>
5848#include <sys/stat.h>
5849int main() {
5850struct stat s; s.st_blocks;
5851; return 0; }
5852EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005853if { (eval echo configure:5854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005854 rm -rf conftest*
5855 ac_cv_struct_st_blocks=yes
5856else
5857 echo "configure: failed program was:" >&5
5858 cat conftest.$ac_ext >&5
5859 rm -rf conftest*
5860 ac_cv_struct_st_blocks=no
5861fi
5862rm -f conftest*
5863fi
5864
5865echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
5866if test $ac_cv_struct_st_blocks = yes; then
5867 cat >> confdefs.h <<\EOF
5868#define HAVE_ST_BLOCKS 1
5869EOF
5870
5871else
5872 LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
5873fi
5874
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005875
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005876echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005877echo "configure:5878: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005878if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005879 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005880else
5881 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005882#line 5883 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005883#include "confdefs.h"
5884#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005885int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005886return altzone;
5887; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005888EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005889if { (eval echo configure:5890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005890 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005891 ac_cv_header_time_altzone=yes
5892else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005893 echo "configure: failed program was:" >&5
5894 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005895 rm -rf conftest*
5896 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005897fi
5898rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005899fi
5900
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005901echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005902if test $ac_cv_header_time_altzone = yes; then
5903 cat >> confdefs.h <<\EOF
5904#define HAVE_ALTZONE 1
5905EOF
5906
5907fi
5908
Guido van Rossumda88dad1995-01-26 00:46:29 +00005909was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005910echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005911echo "configure:5912: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005912cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005913#line 5914 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005914#include "confdefs.h"
5915
5916#include <sys/types.h>
5917#include <sys/select.h>
5918#include <sys/time.h>
5919
Guido van Rossumf78abae1997-01-21 22:02:36 +00005920int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005921;
5922; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005923EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005924if { (eval echo configure:5925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005925 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005926 cat >> confdefs.h <<\EOF
5927#define SYS_SELECT_WITH_SYS_TIME 1
5928EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005929 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005930else
5931 echo "configure: failed program was:" >&5
5932 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005933fi
5934rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005935echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005936
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005937echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005938echo "configure:5939: checking for addrinfo" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005939if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
5940 echo $ac_n "(cached) $ac_c" 1>&6
5941else
5942 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005943#line 5944 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005944#include "confdefs.h"
5945
5946# include <netdb.h>
5947int main() {
5948struct addrinfo a
5949; return 0; }
5950EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005951if { (eval echo configure:5952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005952 rm -rf conftest*
5953 ac_cv_struct_addrinfo=yes
5954else
5955 echo "configure: failed program was:" >&5
5956 cat conftest.$ac_ext >&5
5957 rm -rf conftest*
5958 ac_cv_struct_addrinfo=no
5959fi
5960rm -f conftest*
5961fi
5962
5963echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
5964if test $ac_cv_struct_addrinfo = yes; then
5965 cat >> confdefs.h <<\EOF
5966#define HAVE_ADDRINFO 1
5967EOF
5968
5969fi
5970
5971echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005972echo "configure:5973: checking for sockaddr_storage" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005973if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
5974 echo $ac_n "(cached) $ac_c" 1>&6
5975else
5976 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005977#line 5978 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005978#include "confdefs.h"
5979
5980# include <sys/types.h>
5981# include <sys/socket.h>
5982int main() {
5983struct sockaddr_storage s
5984; return 0; }
5985EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00005986if { (eval echo configure:5987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005987 rm -rf conftest*
5988 ac_cv_struct_sockaddr_storage=yes
5989else
5990 echo "configure: failed program was:" >&5
5991 cat conftest.$ac_ext >&5
5992 rm -rf conftest*
5993 ac_cv_struct_sockaddr_storage=no
5994fi
5995rm -f conftest*
5996fi
5997
5998echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
5999if test $ac_cv_struct_sockaddr_storage = yes; then
6000 cat >> confdefs.h <<\EOF
6001#define HAVE_SOCKADDR_STORAGE 1
6002EOF
6003
6004fi
6005
Guido van Rossum627b2d71993-12-24 10:39:16 +00006006# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00006007
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006008echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006009echo "configure:6010: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006010if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006011 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006012else
6013 if test "$GCC" = yes; then
6014 # GCC predefines this symbol on systems where it applies.
6015cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006016#line 6017 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006017#include "confdefs.h"
6018#ifdef __CHAR_UNSIGNED__
6019 yes
6020#endif
6021
6022EOF
6023if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6024 egrep "yes" >/dev/null 2>&1; then
6025 rm -rf conftest*
6026 ac_cv_c_char_unsigned=yes
6027else
6028 rm -rf conftest*
6029 ac_cv_c_char_unsigned=no
6030fi
6031rm -f conftest*
6032
6033else
6034if test "$cross_compiling" = yes; then
6035 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6036else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006037 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006038#line 6039 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006039#include "confdefs.h"
6040/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006041#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00006042#define volatile
6043#endif
6044main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00006045 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00006046}
6047EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006048if { (eval echo configure:6049: \"$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 +00006049then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006050 ac_cv_c_char_unsigned=yes
6051else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006052 echo "configure: failed program was:" >&5
6053 cat conftest.$ac_ext >&5
6054 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006055 ac_cv_c_char_unsigned=no
6056fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006057rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006058fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00006059
6060fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006061fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006062
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006063echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006064if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
6065 cat >> confdefs.h <<\EOF
6066#define __CHAR_UNSIGNED__ 1
6067EOF
6068
6069fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006070
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006071echo $ac_n "checking for working const""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006072echo "configure:6073: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006073if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006074 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006075else
6076 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006077#line 6078 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006078#include "confdefs.h"
6079
Guido van Rossumf78abae1997-01-21 22:02:36 +00006080int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006081
6082/* Ultrix mips cc rejects this. */
Martin v. Löwis9db2f572001-07-23 01:30:10 +00006083typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006084/* SunOS 4.1.1 cc rejects this. */
6085char const *const *ccp;
6086char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006087/* NEC SVR4.0.2 mips cc rejects this. */
6088struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006089static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00006090/* AIX XL C 1.02.0.0 rejects this.
6091 It does not let you subtract one const X* pointer from another in an arm
6092 of an if-expression whose if-part is not a constant expression */
6093const char *g = "string";
6094ccp = &g + (g ? g-g : 0);
6095/* HPUX 7.0 cc rejects these. */
6096++ccp;
6097p = (char**) ccp;
6098ccp = (char const *const *) p;
6099{ /* SCO 3.2v4 cc rejects this. */
6100 char *t;
6101 char const *s = 0 ? (char *) 0 : (char const *) 0;
6102
6103 *t++ = 0;
6104}
6105{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006106 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00006107 const int *foo = &x[0];
6108 ++foo;
6109}
6110{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6111 typedef const int *iptr;
6112 iptr p = 0;
6113 ++p;
6114}
6115{ /* AIX XL C 1.02.0.0 rejects this saying
6116 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6117 struct s { int j; const int *ap[3]; };
6118 struct s *b; b->j = 5;
6119}
6120{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6121 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006122}
6123
6124; return 0; }
6125EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006126if { (eval echo configure:6127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006127 rm -rf conftest*
6128 ac_cv_c_const=yes
6129else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006130 echo "configure: failed program was:" >&5
6131 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006132 rm -rf conftest*
6133 ac_cv_c_const=no
6134fi
6135rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006136fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006137
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006138echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006139if test $ac_cv_c_const = no; then
6140 cat >> confdefs.h <<\EOF
6141#define const
6142EOF
6143
6144fi
6145
6146
Guido van Rossumda88dad1995-01-26 00:46:29 +00006147works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006148echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006149echo "configure:6150: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006150cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006151#line 6152 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006152#include "confdefs.h"
6153
Guido van Rossumf78abae1997-01-21 22:02:36 +00006154int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006155volatile int x; x = 0;
6156; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006157EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006158if { (eval echo configure:6159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006159 rm -rf conftest*
6160 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006161else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006162 echo "configure: failed program was:" >&5
6163 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006164 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006165 cat >> confdefs.h <<\EOF
6166#define volatile
6167EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006168
6169fi
6170rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006171echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006172
Guido van Rossumda88dad1995-01-26 00:46:29 +00006173works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006174echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006175echo "configure:6176: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006176cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006177#line 6178 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006178#include "confdefs.h"
6179
Guido van Rossumf78abae1997-01-21 22:02:36 +00006180int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006181signed char c;
6182; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006183EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006184if { (eval echo configure:6185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006185 rm -rf conftest*
6186 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006187else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006188 echo "configure: failed program was:" >&5
6189 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006190 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006191 cat >> confdefs.h <<\EOF
6192#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00006193EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006194
6195fi
6196rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006197echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006198
Guido van Rossumda88dad1995-01-26 00:46:29 +00006199have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006200echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006201echo "configure:6202: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006202cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006203#line 6204 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006204#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006205int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00006206int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006207return foo(10);
6208; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006209EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006210if { (eval echo configure:6211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006211 rm -rf conftest*
6212 cat >> confdefs.h <<\EOF
6213#define HAVE_PROTOTYPES 1
6214EOF
6215 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006216else
6217 echo "configure: failed program was:" >&5
6218 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006219fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006220rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006221echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006222
Guido van Rossumda88dad1995-01-26 00:46:29 +00006223works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006224echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006225echo "configure:6226: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006226cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006227#line 6228 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006228#include "confdefs.h"
6229
6230#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00006231int foo(int x, ...) {
6232 va_list va;
6233 va_start(va, x);
6234 va_arg(va, int);
6235 va_arg(va, char *);
6236 va_arg(va, double);
6237 return 0;
6238}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006239
Guido van Rossumf78abae1997-01-21 22:02:36 +00006240int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00006241return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006242; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006243EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006244if { (eval echo configure:6245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006245 rm -rf conftest*
6246 cat >> confdefs.h <<\EOF
6247#define HAVE_STDARG_PROTOTYPES 1
6248EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006249 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006250else
6251 echo "configure: failed program was:" >&5
6252 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006253fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006254rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006255echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006256
Guido van Rossumda88dad1995-01-26 00:46:29 +00006257if test "$have_prototypes" = yes; then
6258bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006259echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006260echo "configure:6261: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006261cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006262#line 6263 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006263#include "confdefs.h"
6264#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00006265int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006266char **t;execve("@",t,t);
6267; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006268EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006269if { (eval echo configure:6270: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006270 :
6271else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006272 echo "configure: failed program was:" >&5
6273 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006274 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006275 cat >> confdefs.h <<\EOF
6276#define BAD_EXEC_PROTOTYPES 1
6277EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006278 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006279fi
6280rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006281echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006282fi
6283
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006284# check if sockaddr has sa_len member
6285echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006286echo "configure:6287: checking if sockaddr has sa_len member" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006287cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006288#line 6289 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006289#include "confdefs.h"
6290#include <sys/types.h>
6291#include <sys/socket.h>
6292int main() {
6293struct sockaddr x;
6294x.sa_len = 0;
6295; return 0; }
6296EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006297if { (eval echo configure:6298: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006298 rm -rf conftest*
6299 echo "$ac_t""yes" 1>&6
6300 cat >> confdefs.h <<\EOF
6301#define HAVE_SOCKADDR_SA_LEN 1
6302EOF
6303
6304else
6305 echo "configure: failed program was:" >&5
6306 cat conftest.$ac_ext >&5
6307 rm -rf conftest*
6308 echo "$ac_t""no" 1>&6
6309fi
6310rm -f conftest*
6311
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006312echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006313echo "configure:6314: checking for bad static forward" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006314if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
6315 echo $ac_n "(cached) $ac_c" 1>&6
6316else
6317 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006318 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006319else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006320 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006321#line 6322 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006322#include "confdefs.h"
6323
6324struct s { int a; int b; };
6325static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006326int foobar() {
6327 static int random;
6328 random = (int) &foo;
6329 return random;
6330}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006331static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006332main() {
6333 exit(!((int)&foo == foobar()));
6334}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006335EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006336if { (eval echo configure:6337: \"$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 +00006337then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006338 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006339else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006340 echo "configure: failed program was:" >&5
6341 cat conftest.$ac_ext >&5
6342 rm -fr conftest*
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006343 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006344fi
6345rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006346fi
6347
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006348fi
6349
6350echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
6351if test "$ac_cv_bad_static_forward" = yes
6352then
6353 cat >> confdefs.h <<\EOF
6354#define BAD_STATIC_FORWARD 1
6355EOF
6356
6357fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006358
Guido van Rossumda88dad1995-01-26 00:46:29 +00006359va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006360echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006361echo "configure:6362: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006362cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006363#line 6364 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006364#include "confdefs.h"
6365
6366#ifdef HAVE_STDARG_PROTOTYPES
6367#include <stdarg.h>
6368#else
6369#include <varargs.h>
6370#endif
6371
Guido van Rossumf78abae1997-01-21 22:02:36 +00006372int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006373va_list list1, list2; list1 = list2;
6374; return 0; }
6375EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006376if { (eval echo configure:6377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006377 :
6378else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006379 echo "configure: failed program was:" >&5
6380 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006381 rm -rf conftest*
6382 cat >> confdefs.h <<\EOF
6383#define VA_LIST_IS_ARRAY 1
6384EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006385 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006386fi
6387rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006388echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006389
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006390# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
6391echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006392echo "configure:6393: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006393if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006394 echo $ac_n "(cached) $ac_c" 1>&6
6395else
6396 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006397#line 6398 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006398#include "confdefs.h"
6399/* System header to define __stub macros and hopefully few prototypes,
6400 which can conflict with char gethostbyname_r(); below. */
6401#include <assert.h>
6402/* Override any gcc2 internal prototype to avoid an error. */
6403/* We use char because int might match the return type of a gcc2
6404 builtin and then its argument prototype would still apply. */
6405char gethostbyname_r();
6406
6407int main() {
6408
6409/* The GNU C library defines this for functions which it implements
6410 to always fail with ENOSYS. Some functions are actually named
6411 something starting with __ and the normal name is an alias. */
6412#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6413choke me
6414#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006415gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006416#endif
6417
6418; return 0; }
6419EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006420if { (eval echo configure:6421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006421 rm -rf conftest*
6422 eval "ac_cv_func_gethostbyname_r=yes"
6423else
6424 echo "configure: failed program was:" >&5
6425 cat conftest.$ac_ext >&5
6426 rm -rf conftest*
6427 eval "ac_cv_func_gethostbyname_r=no"
6428fi
6429rm -f conftest*
6430fi
6431
6432if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6433 echo "$ac_t""yes" 1>&6
6434
6435 cat >> confdefs.h <<\EOF
6436#define HAVE_GETHOSTBYNAME_R 1
6437EOF
6438
6439 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006440echo "configure:6441: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006441 OLD_CFLAGS=$CFLAGS
6442 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
6443 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006444#line 6445 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006445#include "confdefs.h"
6446
6447# include <netdb.h>
6448
6449int main() {
6450
6451 char *name;
6452 struct hostent *he, *res;
6453 char buffer[2048];
6454 int buflen = 2048;
6455 int h_errnop;
6456
6457 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
6458
6459; return 0; }
6460EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006461if { (eval echo configure:6462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006462 rm -rf conftest*
6463
6464 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006465#define HAVE_GETHOSTBYNAME_R 1
6466EOF
6467
6468 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006469#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6470EOF
6471
6472 echo "$ac_t""yes" 1>&6
6473
6474else
6475 echo "configure: failed program was:" >&5
6476 cat conftest.$ac_ext >&5
6477 rm -rf conftest*
6478
6479 echo "$ac_t""no" 1>&6
6480 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006481echo "configure:6482: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006482 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006483#line 6484 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006484#include "confdefs.h"
6485
6486# include <netdb.h>
6487
6488int main() {
6489
6490 char *name;
6491 struct hostent *he;
6492 char buffer[2048];
6493 int buflen = 2048;
6494 int h_errnop;
6495
6496 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
6497
6498; return 0; }
6499EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006500if { (eval echo configure:6501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006501 rm -rf conftest*
6502
6503 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006504#define HAVE_GETHOSTBYNAME_R 1
6505EOF
6506
6507 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006508#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6509EOF
6510
6511 echo "$ac_t""yes" 1>&6
6512
6513else
6514 echo "configure: failed program was:" >&5
6515 cat conftest.$ac_ext >&5
6516 rm -rf conftest*
6517
6518 echo "$ac_t""no" 1>&6
6519 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006520echo "configure:6521: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006521 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006522#line 6523 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006523#include "confdefs.h"
6524
6525# include <netdb.h>
6526
6527int main() {
6528
6529 char *name;
6530 struct hostent *he;
6531 struct hostent_data data;
6532
6533 (void) gethostbyname_r(name, he, &data);
6534
6535; return 0; }
6536EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006537if { (eval echo configure:6538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006538 rm -rf conftest*
6539
6540 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006541#define HAVE_GETHOSTBYNAME_R 1
6542EOF
6543
6544 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006545#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6546EOF
6547
6548 echo "$ac_t""yes" 1>&6
6549
6550else
6551 echo "configure: failed program was:" >&5
6552 cat conftest.$ac_ext >&5
6553 rm -rf conftest*
6554
6555 echo "$ac_t""no" 1>&6
6556
6557fi
6558rm -f conftest*
6559
6560fi
6561rm -f conftest*
6562
6563fi
6564rm -f conftest*
6565 CFLAGS=$OLD_CFLAGS
6566
6567else
6568 echo "$ac_t""no" 1>&6
6569
Thomas Wouters3a584202000-08-05 23:28:51 +00006570 for ac_func in gethostbyname
6571do
6572echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006573echo "configure:6574: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006574if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006575 echo $ac_n "(cached) $ac_c" 1>&6
6576else
6577 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006578#line 6579 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006579#include "confdefs.h"
6580/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00006581 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006582#include <assert.h>
6583/* Override any gcc2 internal prototype to avoid an error. */
6584/* We use char because int might match the return type of a gcc2
6585 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006586char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006587
6588int main() {
6589
6590/* The GNU C library defines this for functions which it implements
6591 to always fail with ENOSYS. Some functions are actually named
6592 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006593#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006594choke me
6595#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006596$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006597#endif
6598
6599; return 0; }
6600EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006601if { (eval echo configure:6602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006602 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006603 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006604else
6605 echo "configure: failed program was:" >&5
6606 cat conftest.$ac_ext >&5
6607 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006608 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006609fi
6610rm -f conftest*
6611fi
6612
Thomas Wouters3a584202000-08-05 23:28:51 +00006613if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006614 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00006615 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6616 cat >> confdefs.h <<EOF
6617#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006618EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00006619
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006620else
6621 echo "$ac_t""no" 1>&6
6622fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006623done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006624
6625
6626fi
6627
6628
6629
6630
6631
6632
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006633
Guido van Rossum627b2d71993-12-24 10:39:16 +00006634# checks for system services
6635# (none yet)
6636
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006637# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006638echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006639echo "configure:6640: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006640if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006641 echo $ac_n "(cached) $ac_c" 1>&6
6642else
6643 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006644#line 6645 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006645#include "confdefs.h"
6646/* System header to define __stub macros and hopefully few prototypes,
6647 which can conflict with char __fpu_control(); below. */
6648#include <assert.h>
6649/* Override any gcc2 internal prototype to avoid an error. */
6650/* We use char because int might match the return type of a gcc2
6651 builtin and then its argument prototype would still apply. */
6652char __fpu_control();
6653
6654int main() {
6655
6656/* The GNU C library defines this for functions which it implements
6657 to always fail with ENOSYS. Some functions are actually named
6658 something starting with __ and the normal name is an alias. */
6659#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6660choke me
6661#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006662__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006663#endif
6664
6665; return 0; }
6666EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006667if { (eval echo configure:6668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006668 rm -rf conftest*
6669 eval "ac_cv_func___fpu_control=yes"
6670else
6671 echo "configure: failed program was:" >&5
6672 cat conftest.$ac_ext >&5
6673 rm -rf conftest*
6674 eval "ac_cv_func___fpu_control=no"
6675fi
6676rm -f conftest*
6677fi
6678
6679if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6680 echo "$ac_t""yes" 1>&6
6681 :
6682else
6683 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006684echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006685echo "configure:6686: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00006686ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006687if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006688 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006689else
6690 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006691LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006692cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006693#line 6694 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006694#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006695/* Override any gcc2 internal prototype to avoid an error. */
6696/* We use char because int might match the return type of a gcc2
6697 builtin and then its argument prototype would still apply. */
6698char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00006699
Guido van Rossumf78abae1997-01-21 22:02:36 +00006700int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006701__fpu_control()
6702; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006703EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006704if { (eval echo configure:6705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006705 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006706 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006707else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006708 echo "configure: failed program was:" >&5
6709 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006710 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006711 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006712fi
6713rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006714LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006715
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006716fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006717if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006718 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006719 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6720 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006721 cat >> confdefs.h <<EOF
6722#define $ac_tr_lib 1
6723EOF
6724
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006725 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006726
6727else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006728 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006729fi
6730
6731
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006732fi
6733
6734
Guido van Rossum7f253911997-05-09 02:42:48 +00006735# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00006736echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006737echo "configure:6738: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006738# Check whether --with-fpectl or --without-fpectl was given.
6739if test "${with_fpectl+set}" = set; then
6740 withval="$with_fpectl"
6741
6742if test "$withval" != no
6743then cat >> confdefs.h <<\EOF
6744#define WANT_SIGFPE_HANDLER 1
6745EOF
6746 echo "$ac_t""yes" 1>&6
6747else echo "$ac_t""no" 1>&6
6748fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006749else
6750 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006751fi
6752
6753
Guido van Rossum7f43da71994-08-01 12:15:30 +00006754# check for --with-libm=...
6755
Guido van Rossum563e7081996-09-10 18:20:48 +00006756case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006757Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006758BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006759*) LIBM=-lm
6760esac
Guido van Rossum7f253911997-05-09 02:42:48 +00006761echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006762echo "configure:6763: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006763# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006764if test "${with_libm+set}" = set; then
6765 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006766
Guido van Rossum7f253911997-05-09 02:42:48 +00006767if test "$withval" = no
6768then LIBM=
6769 echo "$ac_t""force LIBM empty" 1>&6
6770elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006771then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006772 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006773else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006774fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006775else
6776 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006777fi
6778
6779
6780# check for --with-libc=...
6781
Guido van Rossum7f253911997-05-09 02:42:48 +00006782echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006783echo "configure:6784: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006784# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006785if test "${with_libc+set}" = set; then
6786 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006787
Guido van Rossum7f253911997-05-09 02:42:48 +00006788if test "$withval" = no
6789then LIBC=
6790 echo "$ac_t""force LIBC empty" 1>&6
6791elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006792then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006793 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006794else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006795fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006796else
6797 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006798fi
6799
6800
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006801# check for hypot() in math library
6802LIBS_SAVE=$LIBS
6803LIBS="$LIBS $LIBM"
6804for ac_func in hypot
6805do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006806echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006807echo "configure:6808: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006808if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006809 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006810else
6811 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006812#line 6813 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006813#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006814/* System header to define __stub macros and hopefully few prototypes,
6815 which can conflict with char $ac_func(); below. */
6816#include <assert.h>
6817/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006818/* We use char because int might match the return type of a gcc2
6819 builtin and then its argument prototype would still apply. */
6820char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006821
Guido van Rossumf78abae1997-01-21 22:02:36 +00006822int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006823
6824/* The GNU C library defines this for functions which it implements
6825 to always fail with ENOSYS. Some functions are actually named
6826 something starting with __ and the normal name is an alias. */
6827#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6828choke me
6829#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006830$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006831#endif
6832
6833; return 0; }
6834EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006835if { (eval echo configure:6836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006836 rm -rf conftest*
6837 eval "ac_cv_func_$ac_func=yes"
6838else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006839 echo "configure: failed program was:" >&5
6840 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006841 rm -rf conftest*
6842 eval "ac_cv_func_$ac_func=no"
6843fi
6844rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006845fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00006846
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006847if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6848 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006849 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6850 cat >> confdefs.h <<EOF
6851#define $ac_tr_func 1
6852EOF
6853
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006854else
6855 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006856LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006857fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006858done
6859
Guido van Rossumf78abae1997-01-21 22:02:36 +00006860
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006861LIBS=$LIBS_SAVE
6862
Guido van Rossumad713701997-07-10 22:42:38 +00006863# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00006864echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006865echo "configure:6866: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006866if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00006867 echo $ac_n "(cached) $ac_c" 1>&6
6868else
6869 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006870 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +00006871else
6872 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006873#line 6874 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006874#include "confdefs.h"
6875#include <stdio.h>
6876#ifdef HAVE_STDLIB
6877#include <stdlib.h>
6878#else
6879char *malloc(), *realloc();
6880int *free();
6881#endif
6882main() {
6883 char *p;
6884 p = malloc(0);
6885 if (p == NULL) exit(1);
6886 p = realloc(p, 0);
6887 if (p == NULL) exit(1);
6888 free(p);
6889 exit(0);
6890}
6891EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006892if { (eval echo configure:6893: \"$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 +00006893then
6894 ac_cv_malloc_zero=nonnull
6895else
6896 echo "configure: failed program was:" >&5
6897 cat conftest.$ac_ext >&5
6898 rm -fr conftest*
6899 ac_cv_malloc_zero=null
6900fi
6901rm -fr conftest*
6902fi
6903
6904fi
Guido van Rossum3065c942001-09-17 04:03:14 +00006905 # XXX arm cross-compile?
Guido van Rossumad713701997-07-10 22:42:38 +00006906echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6907if test "$ac_cv_malloc_zero" = null
6908then
6909 cat >> confdefs.h <<\EOF
6910#define MALLOC_ZERO_RETURNS_NULL 1
6911EOF
6912
6913fi
6914
Guido van Rossumef2255b2000-03-10 22:30:29 +00006915# check for wchar.h
6916ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6917echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006918echo "configure:6919: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006919if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006920 echo $ac_n "(cached) $ac_c" 1>&6
6921else
6922 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006923#line 6924 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006924#include "confdefs.h"
6925#include <wchar.h>
6926EOF
6927ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006928{ (eval echo configure:6929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006929ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6930if test -z "$ac_err"; then
6931 rm -rf conftest*
6932 eval "ac_cv_header_$ac_safe=yes"
6933else
6934 echo "$ac_err" >&5
6935 echo "configure: failed program was:" >&5
6936 cat conftest.$ac_ext >&5
6937 rm -rf conftest*
6938 eval "ac_cv_header_$ac_safe=no"
6939fi
6940rm -f conftest*
6941fi
6942if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6943 echo "$ac_t""yes" 1>&6
6944 cat >> confdefs.h <<\EOF
6945#define HAVE_WCHAR_H 1
6946EOF
6947 wchar_h="yes"
6948else
6949 echo "$ac_t""no" 1>&6
6950wchar_h="no"
6951
6952fi
6953
6954
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006955# determine wchar_t size
6956if test "$wchar_h" = yes
6957then
6958 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006959echo "configure:6960: checking size of wchar_t" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006960if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
6961 echo $ac_n "(cached) $ac_c" 1>&6
6962else
6963 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006964 ac_cv_sizeof_wchar_t=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00006965else
6966 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006967#line 6968 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006968#include "confdefs.h"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006969#include <stdio.h>
6970main()
6971{
6972 FILE *f=fopen("conftestval", "w");
6973 if (!f) exit(1);
6974 fprintf(f, "%d\n", sizeof(wchar_t));
Guido van Rossumef2255b2000-03-10 22:30:29 +00006975 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00006976}
Guido van Rossumef2255b2000-03-10 22:30:29 +00006977EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00006978if { (eval echo configure:6979: \"$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 +00006979then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006980 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006981else
6982 echo "configure: failed program was:" >&5
6983 cat conftest.$ac_ext >&5
6984 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006985 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00006986fi
6987rm -fr conftest*
6988fi
6989
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006990fi
6991echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
6992cat >> confdefs.h <<EOF
6993#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
6994EOF
6995
6996
6997fi
6998
6999echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007000echo "configure:7001: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007001# Check whether --enable-unicode or --disable-unicode was given.
7002if test "${enable_unicode+set}" = set; then
7003 enableval="$enable_unicode"
7004 :
7005else
7006 enable_unicode=yes
7007fi
7008
7009
7010if test $enable_unicode = yes
7011then
Martin v. Löwisfd917792001-06-27 20:22:04 +00007012 # Without any arguments, Py_UNICODE defaults to two-byte mode
7013 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007014fi
7015
7016case "$enable_unicode" in
7017ucs2) unicode_size="2"
7018 cat >> confdefs.h <<\EOF
7019#define Py_UNICODE_SIZE 2
7020EOF
7021
7022 ;;
7023ucs4) unicode_size="4"
7024 cat >> confdefs.h <<\EOF
7025#define Py_UNICODE_SIZE 4
7026EOF
7027
7028 ;;
7029esac
7030
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007031
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007032if test "$enable_unicode" = "no"
7033then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007034 UNICODE_OBJS=""
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007035 echo "$ac_t""not used" 1>&6
7036else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007037 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007038 cat >> confdefs.h <<\EOF
7039#define Py_USING_UNICODE 1
7040EOF
7041
7042 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
7043 then
7044 PY_UNICODE_TYPE="wchar_t"
7045 cat >> confdefs.h <<\EOF
7046#define HAVE_USABLE_WCHAR_T 1
7047EOF
7048
7049 cat >> confdefs.h <<\EOF
7050#define PY_UNICODE_TYPE wchar_t
7051EOF
7052
7053 elif test "$ac_cv_sizeof_short" = "$unicode_size"
7054 then
7055 PY_UNICODE_TYPE="unsigned short"
7056 cat >> confdefs.h <<\EOF
7057#define PY_UNICODE_TYPE unsigned short
7058EOF
7059
7060 elif test "$ac_cv_sizeof_long" = "$unicode_size"
7061 then
7062 PY_UNICODE_TYPE="unsigned long"
7063 cat >> confdefs.h <<\EOF
7064#define PY_UNICODE_TYPE unsigned long
7065EOF
7066
7067 else
7068 PY_UNICODE_TYPE="no type found"
7069 fi
7070 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
7071fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007072
7073# check for endianness
7074echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007075echo "configure:7076: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007076if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00007077 echo $ac_n "(cached) $ac_c" 1>&6
7078else
7079 ac_cv_c_bigendian=unknown
7080# See if sys/param.h defines the BYTE_ORDER macro.
7081cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007082#line 7083 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007083#include "confdefs.h"
7084#include <sys/types.h>
7085#include <sys/param.h>
7086int main() {
7087
7088#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
7089 bogus endian macros
7090#endif
7091; return 0; }
7092EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007093if { (eval echo configure:7094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00007094 rm -rf conftest*
7095 # It does; now see whether it defined to BIG_ENDIAN or not.
7096cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007097#line 7098 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007098#include "confdefs.h"
7099#include <sys/types.h>
7100#include <sys/param.h>
7101int main() {
7102
7103#if BYTE_ORDER != BIG_ENDIAN
7104 not big endian
7105#endif
7106; return 0; }
7107EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007108if { (eval echo configure:7109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00007109 rm -rf conftest*
7110 ac_cv_c_bigendian=yes
7111else
7112 echo "configure: failed program was:" >&5
7113 cat conftest.$ac_ext >&5
7114 rm -rf conftest*
7115 ac_cv_c_bigendian=no
7116fi
7117rm -f conftest*
7118else
7119 echo "configure: failed program was:" >&5
7120 cat conftest.$ac_ext >&5
7121fi
7122rm -f conftest*
7123if test $ac_cv_c_bigendian = unknown; then
7124if test "$cross_compiling" = yes; then
7125 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
7126else
7127 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007128#line 7129 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007129#include "confdefs.h"
7130main () {
7131 /* Are we little or big endian? From Harbison&Steele. */
7132 union
7133 {
7134 long l;
7135 char c[sizeof (long)];
7136 } u;
7137 u.l = 1;
7138 exit (u.c[sizeof (long) - 1] == 1);
7139}
7140EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007141if { (eval echo configure:7142: \"$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 +00007142then
7143 ac_cv_c_bigendian=no
7144else
7145 echo "configure: failed program was:" >&5
7146 cat conftest.$ac_ext >&5
7147 rm -fr conftest*
7148 ac_cv_c_bigendian=yes
7149fi
7150rm -fr conftest*
7151fi
7152
7153fi
7154fi
7155
7156echo "$ac_t""$ac_cv_c_bigendian" 1>&6
7157if test $ac_cv_c_bigendian = yes; then
7158 cat >> confdefs.h <<\EOF
7159#define WORDS_BIGENDIAN 1
7160EOF
7161
7162fi
7163
7164
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007165# Check whether right shifting a negative integer extends the sign bit
7166# or fills with zeros (like the Cray J90, according to Tim Peters).
7167echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007168echo "configure:7169: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007169if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00007170 echo $ac_n "(cached) $ac_c" 1>&6
7171else
7172
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007173if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007174 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007175else
7176 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007177#line 7178 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007178#include "confdefs.h"
7179
7180int main()
7181{
Vladimir Marangozova6180282000-07-12 05:05:06 +00007182 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007183}
7184
7185EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007186if { (eval echo configure:7187: \"$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 +00007187then
7188 ac_cv_rshift_extends_sign=yes
7189else
7190 echo "configure: failed program was:" >&5
7191 cat conftest.$ac_ext >&5
7192 rm -fr conftest*
7193 ac_cv_rshift_extends_sign=no
7194fi
7195rm -fr conftest*
7196fi
7197
7198fi
7199
7200echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
7201if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007202then
7203 cat >> confdefs.h <<\EOF
7204#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
7205EOF
7206
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007207fi
7208
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007209# check for getc_unlocked and related locking functions
7210echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007211echo "configure:7212: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007212if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
7213 echo $ac_n "(cached) $ac_c" 1>&6
7214else
7215
7216cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007217#line 7218 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007218#include "confdefs.h"
7219#include <stdio.h>
7220int main() {
7221
7222 FILE *f = fopen("/dev/null", "r");
7223 flockfile(f);
7224 getc_unlocked(f);
7225 funlockfile(f);
7226
7227; return 0; }
7228EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007229if { (eval echo configure:7230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007230 rm -rf conftest*
7231 ac_cv_have_getc_unlocked=yes
7232else
7233 echo "configure: failed program was:" >&5
7234 cat conftest.$ac_ext >&5
7235 rm -rf conftest*
7236 ac_cv_have_getc_unlocked=no
7237fi
7238rm -f conftest*
7239fi
7240
7241echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
7242if test "$ac_cv_have_getc_unlocked" = yes
7243then
7244 cat >> confdefs.h <<\EOF
7245#define HAVE_GETC_UNLOCKED 1
7246EOF
7247
7248fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007249
Martin v. Löwis0daad592001-09-30 21:09:59 +00007250# check for readline 4.0
7251echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007252echo "configure:7253: checking for rl_pre_input_hook in -lreadline" >&5
Martin v. Löwis0daad592001-09-30 21:09:59 +00007253ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'`
Guido van Rossum353ae582001-07-10 16:45:32 +00007254if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7255 echo $ac_n "(cached) $ac_c" 1>&6
7256else
7257 ac_save_LIBS="$LIBS"
7258LIBS="-lreadline -ltermcap $LIBS"
7259cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007260#line 7261 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00007261#include "confdefs.h"
7262/* Override any gcc2 internal prototype to avoid an error. */
7263/* We use char because int might match the return type of a gcc2
7264 builtin and then its argument prototype would still apply. */
Martin v. Löwis0daad592001-09-30 21:09:59 +00007265char rl_pre_input_hook();
7266
7267int main() {
7268rl_pre_input_hook()
7269; return 0; }
7270EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007271if { (eval echo configure:7272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis0daad592001-09-30 21:09:59 +00007272 rm -rf conftest*
7273 eval "ac_cv_lib_$ac_lib_var=yes"
7274else
7275 echo "configure: failed program was:" >&5
7276 cat conftest.$ac_ext >&5
7277 rm -rf conftest*
7278 eval "ac_cv_lib_$ac_lib_var=no"
7279fi
7280rm -f conftest*
7281LIBS="$ac_save_LIBS"
7282
7283fi
7284if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7285 echo "$ac_t""yes" 1>&6
7286 cat >> confdefs.h <<\EOF
7287#define HAVE_RL_PRE_INPUT_HOOK 1
7288EOF
7289
7290else
7291 echo "$ac_t""no" 1>&6
7292fi
7293
7294
7295# check for readline 4.2
7296echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007297echo "configure:7298: checking for rl_completion_matches in -lreadline" >&5
Martin v. Löwis0daad592001-09-30 21:09:59 +00007298ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
7299if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7300 echo $ac_n "(cached) $ac_c" 1>&6
7301else
7302 ac_save_LIBS="$LIBS"
7303LIBS="-lreadline -ltermcap $LIBS"
7304cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007305#line 7306 "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007306#include "confdefs.h"
7307/* Override any gcc2 internal prototype to avoid an error. */
7308/* We use char because int might match the return type of a gcc2
7309 builtin and then its argument prototype would still apply. */
Guido van Rossum353ae582001-07-10 16:45:32 +00007310char rl_completion_matches();
7311
7312int main() {
7313rl_completion_matches()
7314; return 0; }
7315EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007316if { (eval echo configure:7317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum353ae582001-07-10 16:45:32 +00007317 rm -rf conftest*
7318 eval "ac_cv_lib_$ac_lib_var=yes"
7319else
7320 echo "configure: failed program was:" >&5
7321 cat conftest.$ac_ext >&5
7322 rm -rf conftest*
7323 eval "ac_cv_lib_$ac_lib_var=no"
7324fi
7325rm -f conftest*
7326LIBS="$ac_save_LIBS"
7327
7328fi
7329if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7330 echo "$ac_t""yes" 1>&6
7331 cat >> confdefs.h <<\EOF
7332#define HAVE_RL_COMPLETION_MATCHES 1
7333EOF
7334
7335else
7336 echo "$ac_t""no" 1>&6
7337fi
7338
7339
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007340echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007341echo "configure:7342: checking for broken nice()" >&5
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007342if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
7343 echo $ac_n "(cached) $ac_c" 1>&6
7344else
7345
7346if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007347 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007348else
7349 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007350#line 7351 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007351#include "confdefs.h"
7352
7353int main()
7354{
7355 int val1 = nice(1);
7356 if (val1 != -1 && val1 == nice(2))
7357 exit(0);
7358 exit(1);
7359}
7360
7361EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007362if { (eval echo configure:7363: \"$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 +00007363then
7364 ac_cv_broken_nice=yes
7365else
7366 echo "configure: failed program was:" >&5
7367 cat conftest.$ac_ext >&5
7368 rm -fr conftest*
7369 ac_cv_broken_nice=no
7370fi
7371rm -fr conftest*
7372fi
7373
7374fi
7375
7376echo "$ac_t""$ac_cv_broken_nice" 1>&6
7377if test "$ac_cv_broken_nice" = yes
7378then
7379 cat >> confdefs.h <<\EOF
7380#define HAVE_BROKEN_NICE 1
7381EOF
7382
7383fi
7384
Jack Jansen666b1e72001-10-31 12:11:48 +00007385# On HP/UX 11.0, mvwdelch is a block with a return statement
7386echo $ac_n "checking whether mvwdelch is an expression""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007387echo "configure:7388: checking whether mvwdelch is an expression" >&5
Jack Jansen666b1e72001-10-31 12:11:48 +00007388if eval "test \"`echo '$''{'ac_cv_mvwdelch_is_expression'+set}'`\" = set"; then
7389 echo $ac_n "(cached) $ac_c" 1>&6
7390else
7391 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007392#line 7393 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007393#include "confdefs.h"
7394#include <curses.h>
7395int main() {
7396
7397 int rtn;
7398 rtn = mvwdelch(0,0,0);
7399
7400; return 0; }
7401EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007402if { (eval echo configure:7403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +00007403 rm -rf conftest*
7404 ac_cv_mvwdelch_is_expression=yes
7405else
7406 echo "configure: failed program was:" >&5
7407 cat conftest.$ac_ext >&5
7408 rm -rf conftest*
7409 ac_cv_mvwdelch_is_expression=no
7410fi
7411rm -f conftest*
7412fi
7413
7414echo "$ac_t""$ac_cv_mvwdelch_is_expression" 1>&6
7415
7416if test "$ac_cv_mvwdelch_is_expression" = yes
7417then
7418 cat >> confdefs.h <<\EOF
7419#define MVWDELCH_IS_EXPRESSION 1
7420EOF
7421
7422fi
7423
7424echo $ac_n "checking whether WINDOW has _flags""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007425echo "configure:7426: checking whether WINDOW has _flags" >&5
Jack Jansen666b1e72001-10-31 12:11:48 +00007426if eval "test \"`echo '$''{'ac_cv_window_has_flags'+set}'`\" = set"; then
7427 echo $ac_n "(cached) $ac_c" 1>&6
7428else
7429 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007430#line 7431 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007431#include "confdefs.h"
7432#include <curses.h>
7433int main() {
7434
7435 WINDOW *w;
7436 w->_flags = 0;
7437
7438; return 0; }
7439EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007440if { (eval echo configure:7441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +00007441 rm -rf conftest*
7442 ac_cv_window_has_flags=yes
7443else
7444 echo "configure: failed program was:" >&5
7445 cat conftest.$ac_ext >&5
7446 rm -rf conftest*
7447 ac_cv_window_has_flags=no
7448fi
7449rm -f conftest*
7450fi
7451
7452echo "$ac_t""$ac_cv_window_has_flags" 1>&6
7453
7454
7455if test "$ac_cv_window_has_flags" = yes
7456then
7457 cat >> confdefs.h <<\EOF
7458#define WINDOW_HAS_FLAGS 1
7459EOF
7460
7461fi
7462
Guido van Rossum95713eb2000-05-18 20:53:31 +00007463# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7464# Add sys/socket.h to confdefs.h
7465cat >> confdefs.h <<\EOF
7466#ifdef HAVE_SYS_SOCKET_H
7467#include <sys/socket.h>
7468#endif
7469EOF
7470echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007471echo "configure:7472: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007472if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00007473 echo $ac_n "(cached) $ac_c" 1>&6
7474else
7475 cat > conftest.$ac_ext <<EOF
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007476#line 7477 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007477#include "confdefs.h"
7478#include <sys/types.h>
7479#if STDC_HEADERS
7480#include <stdlib.h>
7481#include <stddef.h>
7482#endif
7483EOF
7484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7485 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7486 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007487 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007488else
7489 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007490 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007491fi
7492rm -f conftest*
7493
7494fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007495echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7496if test $ac_cv_type_socklen_t = no; then
7497 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007498#define socklen_t int
7499EOF
7500
7501fi
7502
7503
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007504# Add Python/ prefix to LIBOBJS
7505libobjs=$LIBOBJS
7506LIBOBJS=
7507for obj in $libobjs; do
7508 LIBOBJS="$LIBOBJS Python/$obj"
7509done
7510
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007511#AC_MSG_CHECKING(for Modules/Setup)
7512#if test ! -f Modules/Setup ; then
7513# if test ! -d Modules ; then
7514# mkdir Modules
7515# fi
7516# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7517# AC_MSG_RESULT(creating)
7518#else
7519# AC_MSG_RESULT(already exists)
7520#fi
7521
7522
Martin v. Löwis06f15bb2001-12-02 13:02:32 +00007523
7524for h in `(cd $srcdir;echo Python/thread_*.h)`
7525do
7526 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
7527done
7528
7529
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007530SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007531echo $ac_n "checking for build directories""... $ac_c" 1>&6
Jack Jansen8a97f4a2001-12-05 23:27:32 +00007532echo "configure:7533: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007533for dir in $SRCDIRS; do
7534 if test ! -d $dir; then
7535 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007536 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007537done
7538echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007539
Guido van Rossum627b2d71993-12-24 10:39:16 +00007540# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007541trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007542cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007543# This file is a shell script that caches the results of configure
7544# tests run on this system so they can be shared between configure
7545# scripts and configure runs. It is not useful on other systems.
7546# If it contains results you don't want to keep, you may remove or edit it.
7547#
7548# By default, configure uses ./config.cache as the cache file,
7549# creating it if it does not exist already. You can give configure
7550# the --cache-file=FILE option to use a different cache file; that is
7551# what configure does when it calls configure scripts in
7552# subdirectories, so they share the cache.
7553# Giving --cache-file=/dev/null disables caching, for debugging configure.
7554# config.status only pays attention to the cache file if you give it the
7555# --recheck option to rerun configure.
7556#
7557EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007558# The following way of writing the cache mishandles newlines in values,
7559# but we know of no workaround that is simple, portable, and efficient.
7560# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007561# Ultrix sh set writes to stderr and can't be redirected directly,
7562# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007563(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007564 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007565 *ac_space=\ *)
7566 # `set' does not quote correctly, so add quotes (double-quote substitution
7567 # turns \\\\ into \\, and sed turns \\ into \).
7568 sed -n \
7569 -e "s/'/'\\\\''/g" \
7570 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7571 ;;
7572 *)
7573 # `set' quotes correctly as required by POSIX, so do not add quotes.
7574 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7575 ;;
7576 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007577if cmp -s $cache_file confcache; then
7578 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007579else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007580 if test -w $cache_file; then
7581 echo "updating cache $cache_file"
7582 cat confcache > $cache_file
7583 else
7584 echo "not updating unwritable cache $cache_file"
7585 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007586fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007587rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007588
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007589trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007590
7591test "x$prefix" = xNONE && prefix=$ac_default_prefix
7592# Let make expand exec_prefix.
7593test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007594
Guido van Rossum7f43da71994-08-01 12:15:30 +00007595# Any assignment to VPATH causes Sun make to only execute
7596# the first set of double-colon rules, so remove it if not needed.
7597# If there is a colon in the path, we need to keep it.
7598if test "x$srcdir" = x.; then
7599 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7600fi
7601
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007602trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00007603
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007604DEFS=-DHAVE_CONFIG_H
7605
7606# Without the "./", some shells look in PATH for config.status.
7607: ${CONFIG_STATUS=./config.status}
7608
7609echo creating $CONFIG_STATUS
7610rm -f $CONFIG_STATUS
7611cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007612#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007613# Generated automatically by configure.
7614# Run this file to recreate the current configuration.
7615# This directory was configured as follows,
7616# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7617#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007618# $0 $ac_configure_args
7619#
7620# Compiler output produced by configure, useful for debugging
7621# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007622
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007623ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007624for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00007625do
Guido van Rossum7f43da71994-08-01 12:15:30 +00007626 case "\$ac_option" in
7627 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007628 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7629 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00007630 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007631 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007632 exit 0 ;;
7633 -help | --help | --hel | --he | --h)
7634 echo "\$ac_cs_usage"; exit 0 ;;
7635 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00007636 esac
7637done
7638
Guido van Rossum7f43da71994-08-01 12:15:30 +00007639ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007640ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00007641
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007642trap '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 +00007643EOF
7644cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007645
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007646# Protect against being on the right side of a sed subst in config.status.
7647sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7648 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007649$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00007650$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007651s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007652s%@CFLAGS@%$CFLAGS%g
7653s%@CPPFLAGS@%$CPPFLAGS%g
7654s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007655s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007656s%@DEFS@%$DEFS%g
7657s%@LDFLAGS@%$LDFLAGS%g
7658s%@LIBS@%$LIBS%g
7659s%@exec_prefix@%$exec_prefix%g
7660s%@prefix@%$prefix%g
7661s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007662s%@bindir@%$bindir%g
7663s%@sbindir@%$sbindir%g
7664s%@libexecdir@%$libexecdir%g
7665s%@datadir@%$datadir%g
7666s%@sysconfdir@%$sysconfdir%g
7667s%@sharedstatedir@%$sharedstatedir%g
7668s%@localstatedir@%$localstatedir%g
7669s%@libdir@%$libdir%g
7670s%@includedir@%$includedir%g
7671s%@oldincludedir@%$oldincludedir%g
7672s%@infodir@%$infodir%g
7673s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00007674s%@VERSION@%$VERSION%g
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00007675s%@CONFIG_ARGS@%$CONFIG_ARGS%g
Jack Jansene578a632001-08-15 01:27:14 +00007676s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7677s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7678s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7679s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00007680s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00007681s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00007682s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007683s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007684s%@CC@%$CC%g
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00007685s%@CPP@%$CPP%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007686s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007687s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007688s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007689s%@DLLLIBRARY@%$DLLLIBRARY%g
Jack Jansene578a632001-08-15 01:27:14 +00007690s%@BLDLIBRARY@%$BLDLIBRARY%g
7691s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00007692s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007693s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007694s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007695s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007696s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007697s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007698s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00007699s%@OPT@%$OPT%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007700s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007701s%@SO@%$SO%g
7702s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007703s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007704s%@CCSHARED@%$CCSHARED%g
7705s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007706s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007707s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7708s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00007709s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00007710s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007711s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00007712s%@DYNLOADFILE@%$DYNLOADFILE%g
Neil Schemenauer4e425612001-06-19 15:44:15 +00007713s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007714s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007715s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7716s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7717s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00007718s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007719s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007720s%@LIBM@%$LIBM%g
7721s%@LIBC@%$LIBC%g
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007722s%@UNICODE_OBJS@%$UNICODE_OBJS%g
Martin v. Löwis06f15bb2001-12-02 13:02:32 +00007723s%@THREADHEADERS@%$THREADHEADERS%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007724s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007725
7726CEOF
7727EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007728
7729cat >> $CONFIG_STATUS <<\EOF
7730
7731# Split the substitutions into bite-sized pieces for seds with
7732# small command number limits, like on Digital OSF/1 and HP-UX.
7733ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7734ac_file=1 # Number of current file.
7735ac_beg=1 # First line for current file.
7736ac_end=$ac_max_sed_cmds # Line after last line for current file.
7737ac_more_lines=:
7738ac_sed_cmds=""
7739while $ac_more_lines; do
7740 if test $ac_beg -gt 1; then
7741 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7742 else
7743 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7744 fi
7745 if test ! -s conftest.s$ac_file; then
7746 ac_more_lines=false
7747 rm -f conftest.s$ac_file
7748 else
7749 if test -z "$ac_sed_cmds"; then
7750 ac_sed_cmds="sed -f conftest.s$ac_file"
7751 else
7752 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7753 fi
7754 ac_file=`expr $ac_file + 1`
7755 ac_beg=$ac_end
7756 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7757 fi
7758done
7759if test -z "$ac_sed_cmds"; then
7760 ac_sed_cmds=cat
7761fi
7762EOF
7763
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007764cat >> $CONFIG_STATUS <<EOF
7765
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007766CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007767EOF
7768cat >> $CONFIG_STATUS <<\EOF
7769for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007770 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007771 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007772 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007773 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7774 *) ac_file_in="${ac_file}.in" ;;
7775 esac
7776
Guido van Rossumf78abae1997-01-21 22:02:36 +00007777 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007778
7779 # Remove last slash and all that follows it. Not all systems have dirname.
7780 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7781 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7782 # The file is in a subdirectory.
7783 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007784 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007785 # A "../" for each directory in $ac_dir_suffix.
7786 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7787 else
7788 ac_dir_suffix= ac_dots=
7789 fi
7790
7791 case "$ac_given_srcdir" in
7792 .) srcdir=.
7793 if test -z "$ac_dots"; then top_srcdir=.
7794 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7795 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7796 *) # Relative path.
7797 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7798 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7799 esac
7800
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007801 case "$ac_given_INSTALL" in
7802 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7803 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7804 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007805
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007806 echo creating "$ac_file"
7807 rm -f "$ac_file"
7808 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7809 case "$ac_file" in
7810 *Makefile*) ac_comsub="1i\\
7811# $configure_input" ;;
7812 *) ac_comsub= ;;
7813 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007814
7815 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 +00007816 sed -e "$ac_comsub
7817s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007818s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007819s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007820s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00007821" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00007822fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00007823rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007824
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007825# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7826# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007827#
7828# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007829ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7830ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007831ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007832ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007833# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007834ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7835ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007836ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007837ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007838# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007839ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7840ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007841ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007842ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007843
Guido van Rossumf78abae1997-01-21 22:02:36 +00007844if test "${CONFIG_HEADERS+set}" != set; then
7845EOF
7846cat >> $CONFIG_STATUS <<EOF
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007847 CONFIG_HEADERS="pyconfig.h"
Guido van Rossumf78abae1997-01-21 22:02:36 +00007848EOF
7849cat >> $CONFIG_STATUS <<\EOF
7850fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007851for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007852 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007853 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007854 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007855 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7856 *) ac_file_in="${ac_file}.in" ;;
7857 esac
7858
Guido van Rossum7f43da71994-08-01 12:15:30 +00007859 echo creating $ac_file
7860
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007861 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00007862 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7863 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007864
7865EOF
7866
7867# Transform confdefs.h into a sed script conftest.vals that substitutes
7868# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007869# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007870# Protect against being in an unquoted here document in config.status.
7871rm -f conftest.vals
7872cat > conftest.hdr <<\EOF
7873s/[\\&%]/\\&/g
7874s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007875s%#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 +00007876s%ac_d%ac_u%gp
7877s%ac_u%ac_e%gp
7878EOF
7879sed -n -f conftest.hdr confdefs.h > conftest.vals
7880rm -f conftest.hdr
7881
7882# This sed command replaces #undef with comments. This is necessary, for
7883# example, in the case of _POSIX_SOURCE, which is predefined and required
7884# on some systems where configure will not decide to define it.
7885cat >> conftest.vals <<\EOF
7886s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7887EOF
7888
7889# Break up conftest.vals because some shells have a limit on
7890# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007891
7892rm -f conftest.tail
7893while :
7894do
7895 ac_lines=`grep -c . conftest.vals`
7896 # grep -c gives empty output for an empty file on some AIX systems.
7897 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7898 # Write a limited-size here document to conftest.frag.
7899 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7900 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7901 echo 'CEOF
7902 sed -f conftest.frag conftest.in > conftest.out
7903 rm -f conftest.in
7904 mv conftest.out conftest.in
7905' >> $CONFIG_STATUS
7906 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7907 rm -f conftest.vals
7908 mv conftest.tail conftest.vals
7909done
7910rm -f conftest.vals
7911
7912cat >> $CONFIG_STATUS <<\EOF
7913 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007914 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007915 cat conftest.in >> conftest.h
7916 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00007917 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00007918 echo "$ac_file is unchanged"
7919 rm -f conftest.h
7920 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007921 # Remove last slash and all that follows it. Not all systems have dirname.
7922 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7923 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7924 # The file is in a subdirectory.
7925 test ! -d "$ac_dir" && mkdir "$ac_dir"
7926 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00007927 rm -f $ac_file
7928 mv conftest.h $ac_file
7929 fi
7930fi; done
7931
Guido van Rossumf78abae1997-01-21 22:02:36 +00007932EOF
7933cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007934
Guido van Rossumf78abae1997-01-21 22:02:36 +00007935EOF
7936cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007937
7938exit 0
7939EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007940chmod +x $CONFIG_STATUS
7941rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007942test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00007943
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007944
7945echo "creating Setup"
7946if test ! -f Modules/Setup
7947then
7948 cp $srcdir/Modules/Setup.dist Modules/Setup
7949fi
7950
7951echo "creating Setup.local"
7952if test ! -f Modules/Setup.local
7953then
7954 echo "# Edit this file for local setup changes" >Modules/Setup.local
7955fi
7956
7957echo "creating Makefile"
7958$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
7959 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00007960 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007961mv config.c Modules