blob: 821b3910ad2c1615ffd5139fef10bdbd59c3fe91 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Michael W. Hudson54241132001-12-07 15:38:26 +00002
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003# From configure.in Revision: 1.289
Michael W. Hudson54241132001-12-07 15:38:26 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Michael W. Hudson54241132001-12-07 15:38:26 +00006# Generated automatically using autoconf version 2.13
7# 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
Michael W. Hudson54241132001-12-07 15:38:26 +000012# Defaults:
13ac_help=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014ac_default_prefix=/usr/local
Michael W. Hudson54241132001-12-07 15:38:26 +000015# Any additions from configure.in:
16ac_help="$ac_help
17 --enable-framework[=INSTALLDIR] Build (MacOSX|Darwin) framework"
18ac_help="$ac_help
19 --without-gcc never use gcc"
20ac_help="$ac_help
21 --with-cxx=<compiler> enable C++ support"
22ac_help="$ac_help
23 --with-suffix=.exe set executable suffix"
24ac_help="$ac_help
25 --with-pydebug build with Py_DEBUG defined"
26ac_help="$ac_help
27 --enable-toolbox-glue disable/enable MacOSX glue code for extensions"
28ac_help="$ac_help
29 --with-libs='lib1 ...' link against additional libs"
30ac_help="$ac_help
31 --with-signal-module disable/enable signal module"
32ac_help="$ac_help
33 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
34ac_help="$ac_help
35 --with(out)-threads[=DIRECTORY] disable/enable thread support"
36ac_help="$ac_help
37 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
38ac_help="$ac_help
39 --with-pth use GNU pth threading libraries"
40ac_help="$ac_help
41 --enable-ipv6 Enable ipv6 (with ipv4) support
42 --disable-ipv6 Disable ipv6 support"
43ac_help="$ac_help
44 --with(out)-cycle-gc disable/enable garbage collection"
45ac_help="$ac_help
46 --with(out)-pymalloc disable/enable specialized mallocs"
47ac_help="$ac_help
48 --with-wctype-functions use wctype.h functions"
49ac_help="$ac_help
50 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
51ac_help="$ac_help
52 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
53ac_help="$ac_help
54 --with-fpectl enable SIGFPE catching"
55ac_help="$ac_help
56 --with-libm=STRING math library"
57ac_help="$ac_help
58 --with-libc=STRING C library"
59ac_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.
Michael W. Hudson54241132001-12-07 15:38:26 +000065build=NONE
66cache_file=./config.cache
Guido van Rossum76be6ed1995-01-02 18:33:54 +000067exec_prefix=NONE
Michael W. Hudson54241132001-12-07 15:38:26 +000068host=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000069no_create=
Michael W. Hudson54241132001-12-07 15:38:26 +000070nonopt=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=
Michael W. Hudson54241132001-12-07 15:38:26 +000079target=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000080verbose=
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
Michael W. Hudson54241132001-12-07 15:38:26 +000096# Initialize some other variables.
97subdirs=
98MFLAGS= MAKEFLAGS=
99SHELL=${CONFIG_SHELL-/bin/sh}
100# 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
Michael W. Hudson54241132001-12-07 15:38:26 +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
Michael W. Hudson54241132001-12-07 15:38:26 +0000114 case "$ac_option" in
115 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
116 *) ac_optarg= ;;
117 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000118
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000119 # Accept the important Cygnus configure options, so we can diagnose typos.
120
Michael W. Hudson54241132001-12-07 15:38:26 +0000121 case "$ac_option" in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000122
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000126 bindir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000127
128 -build | --build | --buil | --bui | --bu)
Michael W. Hudson54241132001-12-07 15:38:26 +0000129 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000130 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000131 build="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000132
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000138 cache_file="$ac_optarg" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000139
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000144 datadir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000145
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 -disable-* | --disable-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000147 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.
Michael W. Hudson54241132001-12-07 15:38:26 +0000149 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
150 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
151 fi
152 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
153 eval "enable_${ac_feature}=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000154
155 -enable-* | --enable-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000156 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.
Michael W. Hudson54241132001-12-07 15:38:26 +0000158 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
159 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
160 fi
161 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
162 case "$ac_option" in
163 *=*) ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000164 *) ac_optarg=yes ;;
165 esac
Michael W. Hudson54241132001-12-07 15:38:26 +0000166 eval "enable_${ac_feature}='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000167
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000175 exec_prefix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000176
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
Michael W. Hudson54241132001-12-07 15:38:26 +0000181 -help | --help | --hel | --he)
182 # 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.
184 cat << EOF
185Usage: 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]
196 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
197 [same as prefix]
198 --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]
212 --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
215 --program-transform-name=PROGRAM
216 run sed PROGRAM on installed program names
217EOF
218 cat << EOF
219Host 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
230EOF
231 if test -n "$ac_help"; then
232 echo "--enable and --with options recognized:$ac_help"
233 fi
234 exit 0 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000235
236 -host | --host | --hos | --ho)
Michael W. Hudson54241132001-12-07 15:38:26 +0000237 ac_prev=host ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000238 -host=* | --host=* | --hos=* | --ho=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000239 host="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000240
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000246 includedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000247
248 -infodir | --infodir | --infodi | --infod | --info | --inf)
249 ac_prev=infodir ;;
250 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000251 infodir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000252
253 -libdir | --libdir | --libdi | --libd)
254 ac_prev=libdir ;;
255 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000256 libdir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000257
258 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
259 | --libexe | --libex | --libe)
260 ac_prev=libexecdir ;;
261 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
262 | --libexe=* | --libex=* | --libe=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000263 libexecdir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000264
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000272 localstatedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000273
274 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
275 ac_prev=mandir ;;
276 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000277 mandir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000278
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000298 oldincludedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000299
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000303 prefix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000310 program_prefix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000311
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000317 program_suffix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000318
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000334 program_transform_name="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000335
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000344 sbindir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000345
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000355 sharedstatedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000356
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000357 -site | --site | --sit)
358 ac_prev=site ;;
359 -site=* | --site=* | --sit=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000360 site="$ac_optarg" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000361
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000365 srcdir="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000366
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000372 sysconfdir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000373
Guido van Rossum7f43da71994-08-01 12:15:30 +0000374 -target | --target | --targe | --targ | --tar | --ta | --t)
Michael W. Hudson54241132001-12-07 15:38:26 +0000375 ac_prev=target ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000376 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000377 target="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000378
379 -v | -verbose | --verbose | --verbos | --verbo | --verb)
380 verbose=yes ;;
381
Michael W. Hudson54241132001-12-07 15:38:26 +0000382 -version | --version | --versio | --versi | --vers)
383 echo "configure generated by autoconf version 2.13"
384 exit 0 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000385
386 -with-* | --with-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000387 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.
Michael W. Hudson54241132001-12-07 15:38:26 +0000389 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
390 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
391 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000392 ac_package=`echo $ac_package| sed 's/-/_/g'`
Michael W. Hudson54241132001-12-07 15:38:26 +0000393 case "$ac_option" in
394 *=*) ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000395 *) ac_optarg=yes ;;
396 esac
Michael W. Hudson54241132001-12-07 15:38:26 +0000397 eval "with_${ac_package}='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000398
399 -without-* | --without-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000400 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.
Michael W. Hudson54241132001-12-07 15:38:26 +0000402 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
403 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
404 fi
405 ac_package=`echo $ac_package| sed 's/-/_/g'`
406 eval "with_${ac_package}=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000407
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000417 x_includes="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000418
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=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000424 x_libraries="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425
Michael W. Hudson54241132001-12-07 15:38:26 +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 *)
Michael W. Hudson54241132001-12-07 15:38:26 +0000430 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
431 echo "configure: warning: $ac_option: invalid host type" 1>&2
432 fi
433 if test "x$nonopt" != xNONE; then
434 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
435 fi
436 nonopt="$ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000437 ;;
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
Michael W. Hudson54241132001-12-07 15:38:26 +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
Michael W. Hudson54241132001-12-07 15:38:26 +0000446trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
447
448# File descriptor usage:
449# 0 standard input
450# 1 file creation
451# 2 errors and warnings
452# 3 some systems may open it to /dev/tty
453# 4 used on the Kubota Titan
454# 6 checking for... messages and results
455# 5 compiler messages saved in config.log
456if test "$silent" = yes; then
457 exec 6>/dev/null
458else
459 exec 6>&1
460fi
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
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000472do
Michael W. Hudson54241132001-12-07 15:38:26 +0000473 case "$ac_arg" in
474 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
475 | --no-cr | --no-c) ;;
476 -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
Michael W. Hudson54241132001-12-07 15:38:26 +0000484# NLS nuisances.
485# 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.
489if test "${LANG+set}" = set; then LANG=C; export LANG; fi
490if 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
Michael W. Hudson54241132001-12-07 15:38:26 +0000494# confdefs.h avoids OS command line length limits that DEFS can exceed.
495rm -rf conftest* confdefs.h
496# 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
Michael W. Hudson54241132001-12-07 15:38:26 +0000499# 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.
501ac_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
Michael W. Hudson54241132001-12-07 15:38:26 +0000508 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000509 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
Michael W. Hudson54241132001-12-07 15:38:26 +0000519 { 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
Michael W. Hudson54241132001-12-07 15:38:26 +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
Michael W. Hudson54241132001-12-07 15:38:26 +0000524srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000525
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
Michael W. Hudson54241132001-12-07 15:38:26 +0000536 echo "loading site script $ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000537 . "$ac_site_file"
538 fi
539done
540
541if test -r "$cache_file"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000542 echo "loading cache $cache_file"
543 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544else
Michael W. Hudson54241132001-12-07 15:38:26 +0000545 echo "creating cache $cache_file"
546 > $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000547fi
548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549ac_ext=c
Michael W. Hudson54241132001-12-07 15:38:26 +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'
Michael W. Hudson54241132001-12-07 15:38:26 +0000552ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
553ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
554cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000555
Michael W. Hudson54241132001-12-07 15:38:26 +0000556ac_exeext=
557ac_objext=o
558if (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
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000566else
Michael W. Hudson54241132001-12-07 15:38:26 +0000567 ac_n= ac_c='\c' ac_t=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000568fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000569
Michael W. Hudson54241132001-12-07 15:38:26 +0000570
571
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
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +0000575VERSION=2.3
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
Michael W. Hudson54241132001-12-07 15:38:26 +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"
Michael W. Hudson54241132001-12-07 15:38:26 +0000585
Jack Jansene578a632001-08-15 01:27:14 +0000586 case $enableval in
Michael W. Hudson54241132001-12-07 15:38:26 +0000587 yes)
Jack Jansene578a632001-08-15 01:27:14 +0000588 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
Michael W. Hudson54241132001-12-07 15:38:26 +0000605
Guido van Rossum563e7081996-09-10 18:20:48 +0000606else
Michael W. Hudson54241132001-12-07 15:38:26 +0000607
Jack Jansene578a632001-08-15 01:27:14 +0000608 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
Michael W. Hudson54241132001-12-07 15:38:26 +0000614fi
615
616
617
618
619
Jack Jansene578a632001-08-15 01:27:14 +0000620
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
Michael W. Hudson54241132001-12-07 15:38:26 +0000626echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
627echo "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
Michael W. Hudson54241132001-12-07 15:38:26 +0000665echo "$ac_t""$MACHDEP" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000666
Guido van Rossum627b2d71993-12-24 10:39:16 +0000667# checks for alternative programs
Michael W. Hudson54241132001-12-07 15:38:26 +0000668echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
669echo "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"
Michael W. Hudson54241132001-12-07 15:38:26 +0000673
Guido van Rossum7f43da71994-08-01 12:15:30 +0000674 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
Michael W. Hudson54241132001-12-07 15:38:26 +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 *)
Michael W. Hudson54241132001-12-07 15:38:26 +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
Michael W. Hudson54241132001-12-07 15:38:26 +0000713fi
714
715echo "$ac_t""$without_gcc" 1>&6
716
717
Guido van Rossum95012191999-12-16 17:50:52 +0000718
Fred Drakea1a84e72001-03-06 05:52:16 +0000719MAINOBJ=python.o
Michael W. Hudson54241132001-12-07 15:38:26 +0000720echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
721echo "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"
Michael W. Hudson54241132001-12-07 15:38:26 +0000725
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
Michael W. Hudson54241132001-12-07 15:38:26 +0000735
Guido van Rossum95012191999-12-16 17:50:52 +0000736 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
Michael W. Hudson54241132001-12-07 15:38:26 +0000739fi
Guido van Rossum95012191999-12-16 17:50:52 +0000740
Michael W. Hudson54241132001-12-07 15:38:26 +0000741echo "$ac_t""$with_cxx" 1>&6
742
743if test "$with_cxx" = "yes"
744then
745 { echo "configure: error: must supply a compiler when using --with-cxx" 1>&2; exit 1; }
746fi
747
748
749
750
751if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +0000752then
753 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
754do
Michael W. Hudson54241132001-12-07 15:38:26 +0000755# Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +0000756set dummy $ac_prog; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +0000757echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
758echo "configure:759: checking for $ac_word" >&5
759if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
760 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000761else
762 if test -n "$CXX"; then
763 ac_cv_prog_CXX="$CXX" # Let the user override the test.
764else
Michael W. Hudson54241132001-12-07 15:38:26 +0000765 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
766 ac_dummy="$PATH"
767 for ac_dir in $ac_dummy; do
768 test -z "$ac_dir" && ac_dir=.
769 if test -f $ac_dir/$ac_word; then
770 ac_cv_prog_CXX="$ac_prog"
771 break
772 fi
773 done
774 IFS="$ac_save_ifs"
Martin v. Löwis22352952000-12-13 17:37:02 +0000775fi
776fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000777CXX="$ac_cv_prog_CXX"
Martin v. Löwis22352952000-12-13 17:37:02 +0000778if test -n "$CXX"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000779 echo "$ac_t""$CXX" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000780else
Michael W. Hudson54241132001-12-07 15:38:26 +0000781 echo "$ac_t""no" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000782fi
783
Michael W. Hudson54241132001-12-07 15:38:26 +0000784test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +0000785done
786test -n "$CXX" || CXX="notfound"
787
788 if test "$CXX" = "notfound"
789 then
790 CXX=
791 else
Michael W. Hudson54241132001-12-07 15:38:26 +0000792 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
793echo "configure:794: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
794
795ac_ext=C
796# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Martin v. Löwis22352952000-12-13 17:37:02 +0000797ac_cpp='$CXXCPP $CPPFLAGS'
Michael W. Hudson54241132001-12-07 15:38:26 +0000798ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
799ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
800cross_compiling=$ac_cv_prog_cxx_cross
801
802cat > conftest.$ac_ext << EOF
803
804#line 805 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000805#include "confdefs.h"
806
Michael W. Hudson54241132001-12-07 15:38:26 +0000807int main(){return(0);}
808EOF
809if { (eval echo configure:810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
810 ac_cv_prog_cxx_works=yes
811 # If we can't run a trivial program, we are probably using a cross compiler.
812 if (./conftest; exit) 2>/dev/null; then
813 ac_cv_prog_cxx_cross=no
Jack Jansendd19cf82001-12-06 22:36:17 +0000814 else
Michael W. Hudson54241132001-12-07 15:38:26 +0000815 ac_cv_prog_cxx_cross=yes
Jack Jansendd19cf82001-12-06 22:36:17 +0000816 fi
Jack Jansendd19cf82001-12-06 22:36:17 +0000817else
Michael W. Hudson54241132001-12-07 15:38:26 +0000818 echo "configure: failed program was:" >&5
819 cat conftest.$ac_ext >&5
820 ac_cv_prog_cxx_works=no
Jack Jansendd19cf82001-12-06 22:36:17 +0000821fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000822rm -fr conftest*
823ac_ext=c
824# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Jack Jansendd19cf82001-12-06 22:36:17 +0000825ac_cpp='$CPP $CPPFLAGS'
Michael W. Hudson54241132001-12-07 15:38:26 +0000826ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
827ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
828cross_compiling=$ac_cv_prog_cc_cross
829
830echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
831if test $ac_cv_prog_cxx_works = no; then
832 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
833fi
834echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
835echo "configure:836: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
836echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
837cross_compiling=$ac_cv_prog_cxx_cross
Martin v. Löwis22352952000-12-13 17:37:02 +0000838
839 fi
840fi
841
Guido van Rossum8b131c51995-03-09 14:10:13 +0000842# If the user switches compilers, we can't believe the cache
843if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
844then
Michael W. Hudson54241132001-12-07 15:38:26 +0000845 { echo "configure: error: cached CC is different -- throw away $cache_file
846(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
Guido van Rossum8b131c51995-03-09 14:10:13 +0000847fi
848
Michael W. Hudson54241132001-12-07 15:38:26 +0000849# Extract the first word of "gcc", so it can be a program name with args.
Jack Jansendd19cf82001-12-06 22:36:17 +0000850set dummy gcc; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +0000851echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
852echo "configure:853: checking for $ac_word" >&5
853if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
854 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855else
856 if test -n "$CC"; then
857 ac_cv_prog_CC="$CC" # Let the user override the test.
858else
Michael W. Hudson54241132001-12-07 15:38:26 +0000859 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
860 ac_dummy="$PATH"
861 for ac_dir in $ac_dummy; do
862 test -z "$ac_dir" && ac_dir=.
863 if test -f $ac_dir/$ac_word; then
864 ac_cv_prog_CC="gcc"
865 break
866 fi
867 done
868 IFS="$ac_save_ifs"
Jack Jansendd19cf82001-12-06 22:36:17 +0000869fi
870fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000871CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +0000872if test -n "$CC"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000873 echo "$ac_t""$CC" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +0000874else
Michael W. Hudson54241132001-12-07 15:38:26 +0000875 echo "$ac_t""no" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +0000876fi
877
Jack Jansendd19cf82001-12-06 22:36:17 +0000878if test -z "$CC"; then
879 # Extract the first word of "cc", so it can be a program name with args.
880set dummy cc; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +0000881echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
882echo "configure:883: checking for $ac_word" >&5
883if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
884 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +0000885else
886 if test -n "$CC"; then
887 ac_cv_prog_CC="$CC" # Let the user override the test.
888else
Michael W. Hudson54241132001-12-07 15:38:26 +0000889 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890 ac_prog_rejected=no
Michael W. Hudson54241132001-12-07 15:38:26 +0000891 ac_dummy="$PATH"
892 for ac_dir in $ac_dummy; do
893 test -z "$ac_dir" && ac_dir=.
894 if test -f $ac_dir/$ac_word; then
895 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
896 ac_prog_rejected=yes
897 continue
898 fi
899 ac_cv_prog_CC="cc"
900 break
901 fi
902 done
903 IFS="$ac_save_ifs"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904if test $ac_prog_rejected = yes; then
905 # We found a bogon in the path, so make sure we never use it.
906 set dummy $ac_cv_prog_CC
907 shift
Michael W. Hudson54241132001-12-07 15:38:26 +0000908 if test $# -gt 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909 # We chose a different compiler from the bogus one.
910 # However, it has the same basename, so the bogon will be chosen
911 # first if we set CC to just the basename; use the full file name.
912 shift
Michael W. Hudson54241132001-12-07 15:38:26 +0000913 set dummy "$ac_dir/$ac_word" "$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 shift
915 ac_cv_prog_CC="$@"
916 fi
917fi
918fi
919fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000920CC="$ac_cv_prog_CC"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921if test -n "$CC"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000922 echo "$ac_t""$CC" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923else
Michael W. Hudson54241132001-12-07 15:38:26 +0000924 echo "$ac_t""no" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925fi
926
Michael W. Hudson54241132001-12-07 15:38:26 +0000927 if test -z "$CC"; then
928 case "`uname -s`" in
929 *win32* | *WIN32*)
930 # Extract the first word of "cl", so it can be a program name with args.
931set dummy cl; ac_word=$2
932echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
933echo "configure:934: checking for $ac_word" >&5
934if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
935 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000936else
937 if test -n "$CC"; then
938 ac_cv_prog_CC="$CC" # Let the user override the test.
939else
Michael W. Hudson54241132001-12-07 15:38:26 +0000940 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
941 ac_dummy="$PATH"
942 for ac_dir in $ac_dummy; do
943 test -z "$ac_dir" && ac_dir=.
944 if test -f $ac_dir/$ac_word; then
945 ac_cv_prog_CC="cl"
946 break
Jack Jansendd19cf82001-12-06 22:36:17 +0000947 fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000948 done
949 IFS="$ac_save_ifs"
950fi
951fi
952CC="$ac_cv_prog_CC"
953if test -n "$CC"; then
954 echo "$ac_t""$CC" 1>&6
955else
956 echo "$ac_t""no" 1>&6
957fi
958 ;;
959 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +0000960 fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000961 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
Jack Jansendd19cf82001-12-06 22:36:17 +0000962fi
963
Michael W. Hudson54241132001-12-07 15:38:26 +0000964echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
965echo "configure:966: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Jack Jansendd19cf82001-12-06 22:36:17 +0000966
Michael W. Hudson54241132001-12-07 15:38:26 +0000967ac_ext=c
968# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
969ac_cpp='$CPP $CPPFLAGS'
970ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
971ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
972cross_compiling=$ac_cv_prog_cc_cross
973
974cat > conftest.$ac_ext << EOF
975
976#line 977 "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +0000977#include "confdefs.h"
978
Michael W. Hudson54241132001-12-07 15:38:26 +0000979main(){return(0);}
980EOF
981if { (eval echo configure:982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
982 ac_cv_prog_cc_works=yes
983 # If we can't run a trivial program, we are probably using a cross compiler.
984 if (./conftest; exit) 2>/dev/null; then
985 ac_cv_prog_cc_cross=no
986 else
987 ac_cv_prog_cc_cross=yes
988 fi
Jack Jansendd19cf82001-12-06 22:36:17 +0000989else
Michael W. Hudson54241132001-12-07 15:38:26 +0000990 echo "configure: failed program was:" >&5
991 cat conftest.$ac_ext >&5
992 ac_cv_prog_cc_works=no
Jack Jansendd19cf82001-12-06 22:36:17 +0000993fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000994rm -fr conftest*
995ac_ext=c
996# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
997ac_cpp='$CPP $CPPFLAGS'
998ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
999ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1000cross_compiling=$ac_cv_prog_cc_cross
Jack Jansendd19cf82001-12-06 22:36:17 +00001001
Michael W. Hudson54241132001-12-07 15:38:26 +00001002echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1003if test $ac_cv_prog_cc_works = no; then
1004 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
Jack Jansendd19cf82001-12-06 22:36:17 +00001005fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001006echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1007echo "configure:1008: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1008echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1009cross_compiling=$ac_cv_prog_cc_cross
1010
1011echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1012echo "configure:1013: checking whether we are using GNU C" >&5
1013if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1014 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001015else
Michael W. Hudson54241132001-12-07 15:38:26 +00001016 cat > conftest.c <<EOF
1017#ifdef __GNUC__
1018 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001019#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00001020EOF
1021if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1022 ac_cv_prog_gcc=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001023else
Michael W. Hudson54241132001-12-07 15:38:26 +00001024 ac_cv_prog_gcc=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001025fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001026fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001027
Michael W. Hudson54241132001-12-07 15:38:26 +00001028echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1029
1030if test $ac_cv_prog_gcc = yes; then
1031 GCC=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001032else
Michael W. Hudson54241132001-12-07 15:38:26 +00001033 GCC=
1034fi
Jack Jansendd19cf82001-12-06 22:36:17 +00001035
Michael W. Hudson54241132001-12-07 15:38:26 +00001036ac_test_CFLAGS="${CFLAGS+set}"
1037ac_save_CFLAGS="$CFLAGS"
1038CFLAGS=
1039echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1040echo "configure:1041: checking whether ${CC-cc} accepts -g" >&5
1041if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1042 echo $ac_n "(cached) $ac_c" 1>&6
1043else
1044 echo 'void f(){}' > conftest.c
1045if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001046 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047else
Michael W. Hudson54241132001-12-07 15:38:26 +00001048 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001049fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001050rm -f conftest*
1051
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001052fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001053
1054echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001055if test "$ac_test_CFLAGS" = set; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001056 CFLAGS="$ac_save_CFLAGS"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001057elif test $ac_cv_prog_cc_g = yes; then
1058 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001059 CFLAGS="-g -O2"
1060 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001061 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001062 fi
1063else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001064 if test "$GCC" = yes; then
1065 CFLAGS="-O2"
1066 else
1067 CFLAGS=
1068 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001069fi
1070
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001071
1072# checks for UNIX variants that set C preprocessor variables
Michael W. Hudson54241132001-12-07 15:38:26 +00001073echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1074echo "configure:1075: checking how to run the C preprocessor" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001075# On Suns, sometimes $CPP names a directory.
1076if test -n "$CPP" && test -d "$CPP"; then
1077 CPP=
1078fi
1079if test -z "$CPP"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001080if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1081 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001082else
Michael W. Hudson54241132001-12-07 15:38:26 +00001083 # This must be in double quotes, not single quotes, because CPP may get
1084 # substituted into the Makefile and "${CC-cc}" will confuse make.
1085 CPP="${CC-cc} -E"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001086 # On the NeXT, cc -E runs the code through the compiler's parser,
Michael W. Hudson54241132001-12-07 15:38:26 +00001087 # not just through cpp.
1088 cat > conftest.$ac_ext <<EOF
1089#line 1090 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001090#include "confdefs.h"
1091#include <assert.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001092Syntax Error
1093EOF
1094ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1095{ (eval echo configure:1096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1096ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1097if test -z "$ac_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001098 :
1099else
Michael W. Hudson54241132001-12-07 15:38:26 +00001100 echo "$ac_err" >&5
1101 echo "configure: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001102 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001103 rm -rf conftest*
1104 CPP="${CC-cc} -E -traditional-cpp"
1105 cat > conftest.$ac_ext <<EOF
1106#line 1107 "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001107#include "confdefs.h"
1108#include <assert.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001109Syntax Error
1110EOF
1111ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1112{ (eval echo configure:1113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1113ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1114if test -z "$ac_err"; then
Jack Jansendd19cf82001-12-06 22:36:17 +00001115 :
1116else
Michael W. Hudson54241132001-12-07 15:38:26 +00001117 echo "$ac_err" >&5
1118 echo "configure: failed program was:" >&5
Jack Jansendd19cf82001-12-06 22:36:17 +00001119 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001120 rm -rf conftest*
1121 CPP="${CC-cc} -nologo -E"
1122 cat > conftest.$ac_ext <<EOF
1123#line 1124 "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001124#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00001125#include <assert.h>
1126Syntax Error
1127EOF
1128ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1129{ (eval echo configure:1130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1130ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1131if test -z "$ac_err"; then
Jack Jansendd19cf82001-12-06 22:36:17 +00001132 :
1133else
Michael W. Hudson54241132001-12-07 15:38:26 +00001134 echo "$ac_err" >&5
1135 echo "configure: failed program was:" >&5
1136 cat conftest.$ac_ext >&5
1137 rm -rf conftest*
1138 CPP=/lib/cpp
Jack Jansendd19cf82001-12-06 22:36:17 +00001139fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001140rm -f conftest*
1141fi
1142rm -f conftest*
1143fi
1144rm -f conftest*
1145 ac_cv_prog_CPP="$CPP"
1146fi
1147 CPP="$ac_cv_prog_CPP"
1148else
1149 ac_cv_prog_CPP="$CPP"
1150fi
1151echo "$ac_t""$CPP" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001152
Michael W. Hudson54241132001-12-07 15:38:26 +00001153echo $ac_n "checking for AIX""... $ac_c" 1>&6
1154echo "configure:1155: checking for AIX" >&5
1155cat > conftest.$ac_ext <<EOF
1156#line 1157 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001157#include "confdefs.h"
1158#ifdef _AIX
1159 yes
1160#endif
1161
Michael W. Hudson54241132001-12-07 15:38:26 +00001162EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001163if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1164 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001165 rm -rf conftest*
1166 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001167#define _ALL_SOURCE 1
1168EOF
1169
1170else
Michael W. Hudson54241132001-12-07 15:38:26 +00001171 rm -rf conftest*
1172 echo "$ac_t""no" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001173fi
1174rm -f conftest*
1175
Michael W. Hudson54241132001-12-07 15:38:26 +00001176
1177ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1178echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
1179echo "configure:1180: checking for minix/config.h" >&5
1180if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1181 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001182else
Michael W. Hudson54241132001-12-07 15:38:26 +00001183 cat > conftest.$ac_ext <<EOF
1184#line 1185 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001185#include "confdefs.h"
1186#include <minix/config.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001187EOF
1188ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1189{ (eval echo configure:1190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1190ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1191if test -z "$ac_err"; then
1192 rm -rf conftest*
1193 eval "ac_cv_header_$ac_safe=yes"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001194else
Michael W. Hudson54241132001-12-07 15:38:26 +00001195 echo "$ac_err" >&5
1196 echo "configure: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001197 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001198 rm -rf conftest*
1199 eval "ac_cv_header_$ac_safe=no"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001200fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001201rm -f conftest*
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001202fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001203if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1204 echo "$ac_t""yes" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001205 MINIX=yes
1206else
Michael W. Hudson54241132001-12-07 15:38:26 +00001207 echo "$ac_t""no" 1>&6
1208MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001209fi
1210
1211if test "$MINIX" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001212 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001213#define _POSIX_SOURCE 1
1214EOF
1215
Michael W. Hudson54241132001-12-07 15:38:26 +00001216 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001217#define _POSIX_1_SOURCE 2
1218EOF
1219
Michael W. Hudson54241132001-12-07 15:38:26 +00001220 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001221#define _MINIX 1
1222EOF
1223
1224fi
1225
1226
Michael W. Hudson54241132001-12-07 15:38:26 +00001227echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1228echo "configure:1229: checking for Cygwin environment" >&5
1229if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1230 echo $ac_n "(cached) $ac_c" 1>&6
1231else
1232 cat > conftest.$ac_ext <<EOF
1233#line 1234 "configure"
1234#include "confdefs.h"
1235
1236int main() {
1237
1238#ifndef __CYGWIN__
1239#define __CYGWIN__ __CYGWIN32__
1240#endif
1241return __CYGWIN__;
1242; return 0; }
1243EOF
1244if { (eval echo configure:1245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1245 rm -rf conftest*
1246 ac_cv_cygwin=yes
1247else
1248 echo "configure: failed program was:" >&5
1249 cat conftest.$ac_ext >&5
1250 rm -rf conftest*
1251 ac_cv_cygwin=no
1252fi
1253rm -f conftest*
1254rm -f conftest*
1255fi
1256
1257echo "$ac_t""$ac_cv_cygwin" 1>&6
1258CYGWIN=
1259test "$ac_cv_cygwin" = yes && CYGWIN=yes
1260echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1261echo "configure:1262: checking for mingw32 environment" >&5
1262if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1263 echo $ac_n "(cached) $ac_c" 1>&6
1264else
1265 cat > conftest.$ac_ext <<EOF
1266#line 1267 "configure"
1267#include "confdefs.h"
1268
1269int main() {
1270return __MINGW32__;
1271; return 0; }
1272EOF
1273if { (eval echo configure:1274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1274 rm -rf conftest*
1275 ac_cv_mingw32=yes
1276else
1277 echo "configure: failed program was:" >&5
1278 cat conftest.$ac_ext >&5
1279 rm -rf conftest*
1280 ac_cv_mingw32=no
1281fi
1282rm -f conftest*
1283rm -f conftest*
1284fi
1285
1286echo "$ac_t""$ac_cv_mingw32" 1>&6
1287MINGW32=
1288test "$ac_cv_mingw32" = yes && MINGW32=yes
1289
1290
1291echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1292echo "configure:1293: checking for executable suffix" >&5
1293if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1294 echo $ac_n "(cached) $ac_c" 1>&6
1295else
1296 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1297 ac_cv_exeext=.exe
1298else
1299 rm -f conftest*
1300 echo 'int main () { return 0; }' > conftest.$ac_ext
1301 ac_cv_exeext=
1302 if { (eval echo configure:1303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1303 for file in conftest.*; do
1304 case $file in
1305 *.c | *.o | *.obj) ;;
1306 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1307 esac
1308 done
1309 else
1310 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1311 fi
1312 rm -f conftest*
1313 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1314fi
1315fi
1316
1317EXEEXT=""
1318test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1319echo "$ac_t""${ac_cv_exeext}" 1>&6
1320ac_exeext=$EXEEXT
1321
1322echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
1323echo "configure:1324: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001324# Check whether --with-suffix or --without-suffix was given.
1325if test "${with_suffix+set}" = set; then
1326 withval="$with_suffix"
Michael W. Hudson54241132001-12-07 15:38:26 +00001327
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001328 case $withval in
1329 no) EXEEXT=;;
1330 yes) EXEEXT=.exe;;
1331 *) EXEEXT=$withval;;
1332 esac
Michael W. Hudson54241132001-12-07 15:38:26 +00001333fi
1334
1335echo "$ac_t""$EXEEXT" 1>&6
Jack Jansen1999ef42001-12-06 21:47:20 +00001336
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001337# Test whether we're running on a non-case-sensitive system, in which
1338# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00001339
Michael W. Hudson54241132001-12-07 15:38:26 +00001340echo $ac_n "checking for case-insensitive build directory""... $ac_c" 1>&6
1341echo "configure:1342: checking for case-insensitive build directory" >&5
Jack Jansen1999ef42001-12-06 21:47:20 +00001342if test -d "python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001343then
Michael W. Hudson54241132001-12-07 15:38:26 +00001344 echo "$ac_t""yes" 1>&6
Jack Jansen1999ef42001-12-06 21:47:20 +00001345 BUILDEXEEXT=.exe
1346else
Michael W. Hudson54241132001-12-07 15:38:26 +00001347 echo "$ac_t""no" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001348 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001349fi
Guido van Rossumff555e32000-09-22 15:38:21 +00001350
Guido van Rossumdd997f71998-10-07 19:58:26 +00001351case $MACHDEP in
1352bsdos*)
1353 case $CC in
1354 gcc) CC="$CC -D_HAVE_BSDI";;
1355 esac;;
1356esac
1357
Guido van Rossum24b1e751997-08-21 02:29:16 +00001358case $ac_sys_system in
1359hp*|HP*)
1360 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001361 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001362 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001363Monterey*)
1364 case $CC in
1365 cc) CC="$CC -Wl,-Bexport";;
1366 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001367SunOS*)
1368 # Some functions have a prototype only with that define, e.g. confstr
Michael W. Hudson54241132001-12-07 15:38:26 +00001369 cat >> confdefs.h <<\EOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001370#define __EXTENSIONS__ 1
1371EOF
1372
1373 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001374esac
1375
Michael W. Hudson54241132001-12-07 15:38:26 +00001376
1377
1378echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
1379echo "configure:1380: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001380if test -z "$LIBRARY"
1381then
1382 LIBRARY='libpython$(VERSION).a'
1383fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001384echo "$ac_t""$LIBRARY" 1>&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001385
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001386# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00001387# name of the library into which to insert object files). BLDLIBRARY is also
1388# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
1389# is blank as the main program is not linked directly against LDLIBRARY.
1390# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
1391# systems without shared libraries, LDLIBRARY is the same as LIBRARY
1392# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
1393# DLLLIBRARY is the shared (i.e., DLL) library.
Michael W. Hudson54241132001-12-07 15:38:26 +00001394#
1395
1396
1397
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001398
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001399LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00001400BLDLIBRARY='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00001401DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00001402LDLIBRARYDIR=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001403
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001404# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001405# If CXX is set, and if it is needed to link a main function that was
1406# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
1407# python might then depend on the C++ runtime
Michael W. Hudson54241132001-12-07 15:38:26 +00001408# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001409# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001410
Michael W. Hudson54241132001-12-07 15:38:26 +00001411echo $ac_n "checking LINKCC""... $ac_c" 1>&6
1412echo "configure:1413: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001413if test -z "$LINKCC"
1414then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001415 if test -z "$CXX"; then
1416 LINKCC="\$(PURIFY) \$(CC)"
1417 else
1418 echo 'int main(){return 0;}' > conftest.$ac_ext
1419 $CXX -c conftest.$ac_ext 2>&5
1420 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
1421 && test -s conftest$ac_exeext && ./conftest$ac_exeext
1422 then
1423 LINKCC="\$(PURIFY) \$(CC)"
1424 else
1425 LINKCC="\$(PURIFY) \$(CXX)"
1426 fi
1427 rm -fr conftest*
1428 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001429 case $ac_sys_system in
1430 AIX*)
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001431 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $(LINKCC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001432 dgux*)
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001433 LINKCC="LD_RUN_PATH=$libdir $(LINKCC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001434 Monterey64*)
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001435 LINKCC="$(LINKCC) -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001436 esac
1437fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001438echo "$ac_t""$LINKCC" 1>&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001439
Michael W. Hudson54241132001-12-07 15:38:26 +00001440echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
1441echo "configure:1442: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001442
1443# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001444case $MACHDEP in
1445dguxR4)
1446 LDLIBRARY='libpython$(VERSION).so'
1447 OPT="$OPT -pic"
1448 ;;
1449beos*)
1450 LDLIBRARY='libpython$(VERSION).so'
1451 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001452cygwin*)
1453 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001454 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001455 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001456esac
Jack Jansene578a632001-08-15 01:27:14 +00001457
Guido van Rossumb8552162001-09-05 14:58:11 +00001458# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
1459# library that we build, but we do not want to link against it (we
1460# will find it with a -framework option). For this reason there is an
1461# extra variable BLDLIBRARY against which Python and the extension
1462# modules are linked, BLDLIBRARY. This is normally the same as
1463# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00001464if test "$enable_framework"
1465then
1466 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
1467 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
1468 BLDLIBRARY=''
1469else
1470 BLDLIBRARY='$(LDLIBRARY)'
Michael W. Hudson54241132001-12-07 15:38:26 +00001471fi
Jack Jansene578a632001-08-15 01:27:14 +00001472
Michael W. Hudson54241132001-12-07 15:38:26 +00001473echo "$ac_t""$LDLIBRARY" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001474
Michael W. Hudson54241132001-12-07 15:38:26 +00001475# Extract the first word of "ranlib", so it can be a program name with args.
1476set dummy ranlib; ac_word=$2
1477echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1478echo "configure:1479: checking for $ac_word" >&5
1479if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1480 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001481else
1482 if test -n "$RANLIB"; then
1483 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1484else
Michael W. Hudson54241132001-12-07 15:38:26 +00001485 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1486 ac_dummy="$PATH"
1487 for ac_dir in $ac_dummy; do
1488 test -z "$ac_dir" && ac_dir=.
1489 if test -f $ac_dir/$ac_word; then
1490 ac_cv_prog_RANLIB="ranlib"
1491 break
1492 fi
1493 done
1494 IFS="$ac_save_ifs"
1495 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001496fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001497fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001498RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001499if test -n "$RANLIB"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001500 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001501else
Michael W. Hudson54241132001-12-07 15:38:26 +00001502 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001503fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001504
1505
Guido van Rossum7f43da71994-08-01 12:15:30 +00001506for ac_prog in ar aal
1507do
Michael W. Hudson54241132001-12-07 15:38:26 +00001508# Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001509set dummy $ac_prog; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +00001510echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1511echo "configure:1512: checking for $ac_word" >&5
1512if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1513 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001514else
1515 if test -n "$AR"; then
1516 ac_cv_prog_AR="$AR" # Let the user override the test.
1517else
Michael W. Hudson54241132001-12-07 15:38:26 +00001518 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1519 ac_dummy="$PATH"
1520 for ac_dir in $ac_dummy; do
1521 test -z "$ac_dir" && ac_dir=.
1522 if test -f $ac_dir/$ac_word; then
1523 ac_cv_prog_AR="$ac_prog"
1524 break
1525 fi
1526 done
1527 IFS="$ac_save_ifs"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001528fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001529fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001530AR="$ac_cv_prog_AR"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531if test -n "$AR"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001532 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001533else
Michael W. Hudson54241132001-12-07 15:38:26 +00001534 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001535fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001536
Michael W. Hudson54241132001-12-07 15:38:26 +00001537test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00001538done
1539test -n "$AR" || AR="ar"
1540
Michael W. Hudson54241132001-12-07 15:38:26 +00001541
Neil Schemenauera42c8272001-03-31 00:01:55 +00001542case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00001543bsdos*|hp*|HP*)
1544 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00001545 if test -z "$INSTALL"
1546 then
1547 INSTALL="${srcdir}/install-sh -c"
1548 fi
1549esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001550ac_aux_dir=
1551for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1552 if test -f $ac_dir/install-sh; then
1553 ac_aux_dir=$ac_dir
1554 ac_install_sh="$ac_aux_dir/install-sh -c"
1555 break
1556 elif test -f $ac_dir/install.sh; then
1557 ac_aux_dir=$ac_dir
1558 ac_install_sh="$ac_aux_dir/install.sh -c"
1559 break
1560 fi
1561done
1562if test -z "$ac_aux_dir"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001563 { 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 +00001564fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001565ac_config_guess=$ac_aux_dir/config.guess
1566ac_config_sub=$ac_aux_dir/config.sub
1567ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001568
1569# Find a good install program. We prefer a C program (faster),
1570# so one script is as good as another. But avoid the broken or
1571# incompatible versions:
1572# SysV /etc/install, /usr/sbin/install
1573# SunOS /usr/etc/install
1574# IRIX /sbin/install
1575# AIX /bin/install
1576# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1577# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1578# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1579# ./install, which can be erroneously created by make from ./install.sh.
Michael W. Hudson54241132001-12-07 15:38:26 +00001580echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1581echo "configure:1582: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001582if test -z "$INSTALL"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001583if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1584 echo $ac_n "(cached) $ac_c" 1>&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001585else
Michael W. Hudson54241132001-12-07 15:38:26 +00001586 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001587 for ac_dir in $PATH; do
1588 # Account for people who put trailing slashes in PATH elements.
Michael W. Hudson54241132001-12-07 15:38:26 +00001589 case "$ac_dir/" in
1590 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001591 *)
1592 # OSF1 and SCO ODT 3.0 have their own names for install.
1593 # Don't use installbsd from OSF since it installs stuff as root
1594 # by default.
1595 for ac_prog in ginstall scoinst install; do
Michael W. Hudson54241132001-12-07 15:38:26 +00001596 if test -f $ac_dir/$ac_prog; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001597 if test $ac_prog = install &&
Michael W. Hudson54241132001-12-07 15:38:26 +00001598 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001599 # AIX install. It has an incompatible calling convention.
1600 :
1601 else
1602 ac_cv_path_install="$ac_dir/$ac_prog -c"
1603 break 2
1604 fi
1605 fi
1606 done
1607 ;;
1608 esac
1609 done
Michael W. Hudson54241132001-12-07 15:38:26 +00001610 IFS="$ac_save_IFS"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001611
1612fi
1613 if test "${ac_cv_path_install+set}" = set; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001614 INSTALL="$ac_cv_path_install"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001615 else
1616 # As a last resort, use the slow shell script. We don't cache a
1617 # path for INSTALL within a source directory, because that will
1618 # break other packages using the cache if that directory is
1619 # removed, or if the path is relative.
Michael W. Hudson54241132001-12-07 15:38:26 +00001620 INSTALL="$ac_install_sh"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001621 fi
1622fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001623echo "$ac_t""$INSTALL" 1>&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001624
1625# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1626# It thinks the first close brace ends the variable substitution.
1627test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1628
Michael W. Hudson54241132001-12-07 15:38:26 +00001629test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001630
1631test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1632
Michael W. Hudson54241132001-12-07 15:38:26 +00001633
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001634# Not every filesystem supports hard links
1635
1636if test -z "$LN" ; then
1637 case $ac_sys_system in
1638 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001639 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001640 *) LN=ln;;
1641 esac
1642fi
1643
Fred Drake109d9862001-07-11 06:27:56 +00001644# Check for --with-pydebug
Michael W. Hudson54241132001-12-07 15:38:26 +00001645echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
1646echo "configure:1647: checking for --with-pydebug" >&5
Fred Drake109d9862001-07-11 06:27:56 +00001647# Check whether --with-pydebug or --without-pydebug was given.
1648if test "${with_pydebug+set}" = set; then
1649 withval="$with_pydebug"
Michael W. Hudson54241132001-12-07 15:38:26 +00001650
Fred Drake109d9862001-07-11 06:27:56 +00001651if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00001652then cat >> confdefs.h <<\EOF
Fred Drake109d9862001-07-11 06:27:56 +00001653#define Py_DEBUG 1
1654EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00001655 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1656else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00001657fi
1658else
Michael W. Hudson54241132001-12-07 15:38:26 +00001659 echo "$ac_t""no" 1>&6
1660fi
1661
Fred Drake109d9862001-07-11 06:27:56 +00001662
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001663# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001664
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001665if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001666then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001667 case $GCC in
1668 yes)
1669 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001670 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001671 if test "$Py_DEBUG" = 'true' ; then
1672 # Optimization messes up debuggers, so turn it off for
1673 # debug builds.
1674 OPT="-g -Wall -Wstrict-prototypes"
1675 else
1676 OPT="-g -O3 -Wall -Wstrict-prototypes"
1677 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001678 *)
Fred Drake109d9862001-07-11 06:27:56 +00001679 OPT="-O3 -Wall -Wstrict-prototypes";;
1680 esac
1681 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001682 *)
1683 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00001684 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001685 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1686 *)
1687 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001688 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001689 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00001690 case $ac_sys_system in
1691 Darwin*)
1692 OPT="$OPT -no-cpp-precomp";;
1693 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001694fi
1695
Fred Drakee1ceaa02001-12-04 20:55:47 +00001696if test "$Py_DEBUG" = 'true'; then
1697 :
1698else
1699 OPT="-DNDEBUG $OPT"
1700fi
1701
Trent Mick635f6fb2000-08-23 21:33:05 +00001702# The current (beta) Monterey compiler dies with optimizations
1703case $ac_sys_system in
1704Monterey*) OPT="";;
1705esac
1706
Guido van Rossum563e7081996-09-10 18:20:48 +00001707if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001708then
1709 OPT="$OPT $ac_arch_flags"
1710fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00001711
Michael W. Hudson54241132001-12-07 15:38:26 +00001712echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
1713echo "configure:1714: checking whether $CC accepts -OPT:Olimit=0" >&5
1714if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
1715 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +00001716else
1717 ac_save_cc="$CC"
1718CC="$CC -OPT:Olimit=0"
1719if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001720 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00001721else
Michael W. Hudson54241132001-12-07 15:38:26 +00001722 cat > conftest.$ac_ext <<EOF
1723#line 1724 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001724#include "confdefs.h"
1725int main() { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001726EOF
1727if { (eval echo configure:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1728then
Guido van Rossum91922671997-10-09 20:24:13 +00001729 ac_cv_opt_olimit_ok=yes
1730else
Michael W. Hudson54241132001-12-07 15:38:26 +00001731 echo "configure: failed program was:" >&5
1732 cat conftest.$ac_ext >&5
1733 rm -fr conftest*
1734 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00001735fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001736rm -fr conftest*
Guido van Rossum91922671997-10-09 20:24:13 +00001737fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001738
Guido van Rossum91922671997-10-09 20:24:13 +00001739CC="$ac_save_cc"
1740fi
1741
Michael W. Hudson54241132001-12-07 15:38:26 +00001742echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001743if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001744 case $ac_sys_system in
1745 Darwin*) OPT="$OPT" ;;
1746 *) OPT="$OPT -OPT:Olimit=0";;
1747 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001748else
Michael W. Hudson54241132001-12-07 15:38:26 +00001749 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
1750echo "configure:1751: checking whether $CC accepts -Olimit 1500" >&5
1751 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1752 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001753else
1754 ac_save_cc="$CC"
1755 CC="$CC -Olimit 1500"
1756 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001757 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001758else
Michael W. Hudson54241132001-12-07 15:38:26 +00001759 cat > conftest.$ac_ext <<EOF
1760#line 1761 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001761#include "confdefs.h"
1762int main() { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001763EOF
1764if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1765then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001766 ac_cv_olimit_ok=yes
1767else
Michael W. Hudson54241132001-12-07 15:38:26 +00001768 echo "configure: failed program was:" >&5
1769 cat conftest.$ac_ext >&5
1770 rm -fr conftest*
1771 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001772fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001773rm -fr conftest*
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001774fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001775
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001776 CC="$ac_save_cc"
1777fi
1778
Michael W. Hudson54241132001-12-07 15:38:26 +00001779 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001780 if test $ac_cv_olimit_ok = yes; then
1781 OPT="$OPT -Olimit 1500"
1782 fi
1783fi
1784
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001785# On some compilers, pthreads are available without further options
1786# (e.g. MacOS X). On some of these systems, the compiler will not
1787# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
1788# So we have to see first whether pthreads are available without
1789# options before we can check whether -Kpthread improves anything.
Michael W. Hudson54241132001-12-07 15:38:26 +00001790echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6
1791echo "configure:1792: checking whether pthreads are available without options" >&5
1792if eval "test \"`echo '$''{'ac_cv_pthread_is_default'+set}'`\" = set"; then
1793 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00001794else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001795 if test "$cross_compiling" = yes; then
1796 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001797else
Michael W. Hudson54241132001-12-07 15:38:26 +00001798 cat > conftest.$ac_ext <<EOF
1799#line 1800 "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00001800#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001801
Martin v. Löwis130fb172001-07-19 11:00:41 +00001802#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001803
1804void* routine(void* p){return NULL;}
1805
1806int main(){
1807 pthread_t p;
1808 if(pthread_create(&p,NULL,routine,NULL)!=0)
1809 return 1;
1810 return 0;
1811}
1812
Michael W. Hudson54241132001-12-07 15:38:26 +00001813EOF
1814if { (eval echo configure:1815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1815then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001816 ac_cv_pthread_is_default=yes
1817else
Michael W. Hudson54241132001-12-07 15:38:26 +00001818 echo "configure: failed program was:" >&5
1819 cat conftest.$ac_ext >&5
1820 rm -fr conftest*
1821 ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001822fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001823rm -fr conftest*
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001824fi
1825
Michael W. Hudson54241132001-12-07 15:38:26 +00001826
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001827fi
1828
Michael W. Hudson54241132001-12-07 15:38:26 +00001829echo "$ac_t""$ac_cv_pthread_is_default" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001830
Michael W. Hudson54241132001-12-07 15:38:26 +00001831
1832if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001833then
1834 ac_cv_kpthread=no
1835else
1836# -Kpthread, if available, provides the right #defines
1837# and linker options to make pthread_create available
1838# Some compilers won't report that they do not support -Kpthread,
1839# so we need to run a program to see whether it really made the
1840# function available.
Michael W. Hudson54241132001-12-07 15:38:26 +00001841echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
1842echo "configure:1843: checking whether $CC accepts -Kpthread" >&5
1843if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1844 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001845else
1846 ac_save_cc="$CC"
1847CC="$CC -Kpthread"
1848if test "$cross_compiling" = yes; then
1849 ac_cv_kpthread=no
1850else
Michael W. Hudson54241132001-12-07 15:38:26 +00001851 cat > conftest.$ac_ext <<EOF
1852#line 1853 "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001853#include "confdefs.h"
1854
1855#include <pthread.h>
1856
1857void* routine(void* p){return NULL;}
1858
1859int main(){
1860 pthread_t p;
1861 if(pthread_create(&p,NULL,routine,NULL)!=0)
1862 return 1;
1863 return 0;
1864}
1865
Michael W. Hudson54241132001-12-07 15:38:26 +00001866EOF
1867if { (eval echo configure:1868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1868then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001869 ac_cv_kpthread=yes
1870else
Michael W. Hudson54241132001-12-07 15:38:26 +00001871 echo "configure: failed program was:" >&5
1872 cat conftest.$ac_ext >&5
1873 rm -fr conftest*
1874 ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00001875fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001876rm -fr conftest*
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001877fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001878
Martin v. Löwis130fb172001-07-19 11:00:41 +00001879CC="$ac_save_cc"
1880fi
1881
Michael W. Hudson54241132001-12-07 15:38:26 +00001882echo "$ac_t""$ac_cv_kpthread" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001883fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00001884
Michael W. Hudson54241132001-12-07 15:38:26 +00001885
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001886# checks for header files
Michael W. Hudson54241132001-12-07 15:38:26 +00001887echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1888echo "configure:1889: checking for ANSI C header files" >&5
1889if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1890 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001891else
Michael W. Hudson54241132001-12-07 15:38:26 +00001892 cat > conftest.$ac_ext <<EOF
1893#line 1894 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001894#include "confdefs.h"
1895#include <stdlib.h>
1896#include <stdarg.h>
1897#include <string.h>
1898#include <float.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001899EOF
1900ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1901{ (eval echo configure:1902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1902ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1903if test -z "$ac_err"; then
1904 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001905 ac_cv_header_stdc=yes
1906else
Michael W. Hudson54241132001-12-07 15:38:26 +00001907 echo "$ac_err" >&5
1908 echo "configure: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001909 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001910 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001911 ac_cv_header_stdc=no
1912fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001913rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001914
1915if test $ac_cv_header_stdc = yes; then
1916 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Michael W. Hudson54241132001-12-07 15:38:26 +00001917cat > conftest.$ac_ext <<EOF
1918#line 1919 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001919#include "confdefs.h"
1920#include <string.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001921EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1923 egrep "memchr" >/dev/null 2>&1; then
1924 :
1925else
Michael W. Hudson54241132001-12-07 15:38:26 +00001926 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001927 ac_cv_header_stdc=no
1928fi
1929rm -f conftest*
1930
1931fi
1932
1933if test $ac_cv_header_stdc = yes; then
1934 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Michael W. Hudson54241132001-12-07 15:38:26 +00001935cat > conftest.$ac_ext <<EOF
1936#line 1937 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001937#include "confdefs.h"
1938#include <stdlib.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001939EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1941 egrep "free" >/dev/null 2>&1; then
1942 :
1943else
Michael W. Hudson54241132001-12-07 15:38:26 +00001944 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001945 ac_cv_header_stdc=no
1946fi
1947rm -f conftest*
1948
1949fi
1950
1951if test $ac_cv_header_stdc = yes; then
1952 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Michael W. Hudson54241132001-12-07 15:38:26 +00001953if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001954 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001955else
Michael W. Hudson54241132001-12-07 15:38:26 +00001956 cat > conftest.$ac_ext <<EOF
1957#line 1958 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001958#include "confdefs.h"
1959#include <ctype.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001960#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1961#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Jack Jansendd19cf82001-12-06 22:36:17 +00001962#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Michael W. Hudson54241132001-12-07 15:38:26 +00001963int main () { int i; for (i = 0; i < 256; i++)
1964if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1965exit (0); }
1966
1967EOF
1968if { (eval echo configure:1969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1969then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001970 :
1971else
Michael W. Hudson54241132001-12-07 15:38:26 +00001972 echo "configure: failed program was:" >&5
1973 cat conftest.$ac_ext >&5
1974 rm -fr conftest*
1975 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001976fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001977rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00001978fi
Jack Jansendd19cf82001-12-06 22:36:17 +00001979
Michael W. Hudson54241132001-12-07 15:38:26 +00001980fi
1981fi
1982
1983echo "$ac_t""$ac_cv_header_stdc" 1>&6
1984if test $ac_cv_header_stdc = yes; then
1985 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001986#define STDC_HEADERS 1
1987EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001988
1989fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001990
Michael W. Hudson54241132001-12-07 15:38:26 +00001991for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h locale.h \
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001992ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00001993signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00001994sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00001995sys/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 +00001996sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00001997ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001998do
Michael W. Hudson54241132001-12-07 15:38:26 +00001999ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2000echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2001echo "configure:2002: checking for $ac_hdr" >&5
2002if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2003 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002004else
Michael W. Hudson54241132001-12-07 15:38:26 +00002005 cat > conftest.$ac_ext <<EOF
2006#line 2007 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002007#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002008#include <$ac_hdr>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002009EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002010ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2011{ (eval echo configure:2012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2012ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2013if test -z "$ac_err"; then
2014 rm -rf conftest*
2015 eval "ac_cv_header_$ac_safe=yes"
2016else
2017 echo "$ac_err" >&5
2018 echo "configure: failed program was:" >&5
2019 cat conftest.$ac_ext >&5
2020 rm -rf conftest*
2021 eval "ac_cv_header_$ac_safe=no"
2022fi
2023rm -f conftest*
2024fi
2025if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2026 echo "$ac_t""yes" 1>&6
2027 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2028 cat >> confdefs.h <<EOF
2029#define $ac_tr_hdr 1
2030EOF
2031
2032else
2033 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002034fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002035done
2036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002037ac_header_dirent=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002038for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2039do
2040ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2041echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2042echo "configure:2043: checking for $ac_hdr that defines DIR" >&5
2043if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2044 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002045else
Michael W. Hudson54241132001-12-07 15:38:26 +00002046 cat > conftest.$ac_ext <<EOF
2047#line 2048 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002048#include "confdefs.h"
2049#include <sys/types.h>
2050#include <$ac_hdr>
Michael W. Hudson54241132001-12-07 15:38:26 +00002051int main() {
2052DIR *dirp = 0;
2053; return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002054EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002055if { (eval echo configure:2056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2056 rm -rf conftest*
2057 eval "ac_cv_header_dirent_$ac_safe=yes"
2058else
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 rm -rf conftest*
2062 eval "ac_cv_header_dirent_$ac_safe=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002063fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002064rm -f conftest*
2065fi
2066if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2067 echo "$ac_t""yes" 1>&6
2068 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2069 cat >> confdefs.h <<EOF
2070#define $ac_tr_hdr 1
2071EOF
2072 ac_header_dirent=$ac_hdr; break
2073else
2074 echo "$ac_t""no" 1>&6
2075fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002076done
2077# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2078if test $ac_header_dirent = dirent.h; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002079echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2080echo "configure:2081: checking for opendir in -ldir" >&5
2081ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2082if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2083 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002084else
Michael W. Hudson54241132001-12-07 15:38:26 +00002085 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002086LIBS="-ldir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00002087cat > conftest.$ac_ext <<EOF
2088#line 2089 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002089#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002090/* Override any gcc2 internal prototype to avoid an error. */
2091/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00002092 builtin and then its argument prototype would still apply. */
2093char opendir();
2094
2095int main() {
2096opendir()
2097; return 0; }
2098EOF
2099if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2100 rm -rf conftest*
2101 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002102else
Michael W. Hudson54241132001-12-07 15:38:26 +00002103 echo "configure: failed program was:" >&5
2104 cat conftest.$ac_ext >&5
2105 rm -rf conftest*
2106 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002107fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002108rm -f conftest*
2109LIBS="$ac_save_LIBS"
2110
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002111fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002112if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2113 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002114 LIBS="$LIBS -ldir"
Michael W. Hudson54241132001-12-07 15:38:26 +00002115else
2116 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002117fi
2118
2119else
Michael W. Hudson54241132001-12-07 15:38:26 +00002120echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2121echo "configure:2122: checking for opendir in -lx" >&5
2122ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2123if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2124 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002125else
Michael W. Hudson54241132001-12-07 15:38:26 +00002126 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002127LIBS="-lx $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00002128cat > conftest.$ac_ext <<EOF
2129#line 2130 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002130#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002131/* Override any gcc2 internal prototype to avoid an error. */
2132/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00002133 builtin and then its argument prototype would still apply. */
2134char opendir();
2135
2136int main() {
2137opendir()
2138; return 0; }
2139EOF
2140if { (eval echo configure:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2141 rm -rf conftest*
2142 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002143else
Michael W. Hudson54241132001-12-07 15:38:26 +00002144 echo "configure: failed program was:" >&5
2145 cat conftest.$ac_ext >&5
2146 rm -rf conftest*
2147 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002148fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002149rm -f conftest*
2150LIBS="$ac_save_LIBS"
2151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002152fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002153if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2154 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002155 LIBS="$LIBS -lx"
Michael W. Hudson54241132001-12-07 15:38:26 +00002156else
2157 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002158fi
2159
2160fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002161
Michael W. Hudson54241132001-12-07 15:38:26 +00002162
Guido van Rossum627b2d71993-12-24 10:39:16 +00002163# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002164was_it_defined=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002165echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
2166echo "configure:2167: checking for clock_t in time.h" >&5
2167cat > conftest.$ac_ext <<EOF
2168#line 2169 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002169#include "confdefs.h"
2170#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002171EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002172if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2173 egrep "clock_t" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002174 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00002175 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002176else
Michael W. Hudson54241132001-12-07 15:38:26 +00002177 rm -rf conftest*
2178 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002179#define clock_t long
2180EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002181
2182fi
2183rm -f conftest*
2184
Michael W. Hudson54241132001-12-07 15:38:26 +00002185echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002186
Guido van Rossum810cc512001-09-09 23:51:39 +00002187# Two defines needed to enable largefile support on various platforms
2188# These may affect some typedefs
Michael W. Hudson54241132001-12-07 15:38:26 +00002189cat >> confdefs.h <<\EOF
Guido van Rossum810cc512001-09-09 23:51:39 +00002190#define _LARGEFILE_SOURCE 1
2191EOF
2192
Michael W. Hudson54241132001-12-07 15:38:26 +00002193cat >> confdefs.h <<\EOF
Guido van Rossum810cc512001-09-09 23:51:39 +00002194#define _FILE_OFFSET_BITS 64
2195EOF
2196
Michael W. Hudson54241132001-12-07 15:38:26 +00002197
Guido van Rossum84e7b241996-08-19 21:59:00 +00002198# Add some code to confdefs.h so that the test for off_t works on SCO
2199cat >> confdefs.h <<\EOF
2200#if defined(SCO_DS)
2201#undef _OFF_T
2202#endif
2203EOF
2204
Guido van Rossumef2255b2000-03-10 22:30:29 +00002205# Type availability checks
Michael W. Hudson54241132001-12-07 15:38:26 +00002206echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2207echo "configure:2208: checking for mode_t" >&5
2208if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2209 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002210else
Michael W. Hudson54241132001-12-07 15:38:26 +00002211 cat > conftest.$ac_ext <<EOF
2212#line 2213 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002213#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002214#include <sys/types.h>
2215#if STDC_HEADERS
2216#include <stdlib.h>
2217#include <stddef.h>
2218#endif
Jack Jansendd19cf82001-12-06 22:36:17 +00002219EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002220if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2221 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2222 rm -rf conftest*
Jack Jansendd19cf82001-12-06 22:36:17 +00002223 ac_cv_type_mode_t=yes
2224else
Michael W. Hudson54241132001-12-07 15:38:26 +00002225 rm -rf conftest*
2226 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00002227fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002228rm -f conftest*
Jack Jansendd19cf82001-12-06 22:36:17 +00002229
Michael W. Hudson54241132001-12-07 15:38:26 +00002230fi
2231echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2232if test $ac_cv_type_mode_t = no; then
2233 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002234#define mode_t int
2235EOF
2236
2237fi
2238
Michael W. Hudson54241132001-12-07 15:38:26 +00002239echo $ac_n "checking for off_t""... $ac_c" 1>&6
2240echo "configure:2241: checking for off_t" >&5
2241if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2242 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002243else
Michael W. Hudson54241132001-12-07 15:38:26 +00002244 cat > conftest.$ac_ext <<EOF
2245#line 2246 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002246#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002247#include <sys/types.h>
2248#if STDC_HEADERS
2249#include <stdlib.h>
2250#include <stddef.h>
2251#endif
2252EOF
2253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2254 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2255 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002256 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002257else
Michael W. Hudson54241132001-12-07 15:38:26 +00002258 rm -rf conftest*
2259 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002260fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002261rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002262
Michael W. Hudson54241132001-12-07 15:38:26 +00002263fi
2264echo "$ac_t""$ac_cv_type_off_t" 1>&6
2265if test $ac_cv_type_off_t = no; then
2266 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002267#define off_t long
2268EOF
2269
2270fi
2271
Michael W. Hudson54241132001-12-07 15:38:26 +00002272echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2273echo "configure:2274: checking for pid_t" >&5
2274if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2275 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002276else
Michael W. Hudson54241132001-12-07 15:38:26 +00002277 cat > conftest.$ac_ext <<EOF
2278#line 2279 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002279#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002280#include <sys/types.h>
2281#if STDC_HEADERS
2282#include <stdlib.h>
2283#include <stddef.h>
2284#endif
2285EOF
2286if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2287 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2288 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002289 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002290else
Michael W. Hudson54241132001-12-07 15:38:26 +00002291 rm -rf conftest*
2292 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002293fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002294rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002295
Michael W. Hudson54241132001-12-07 15:38:26 +00002296fi
2297echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2298if test $ac_cv_type_pid_t = no; then
2299 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002300#define pid_t int
2301EOF
2302
2303fi
2304
Michael W. Hudson54241132001-12-07 15:38:26 +00002305echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2306echo "configure:2307: checking return type of signal handlers" >&5
2307if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2308 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002309else
Michael W. Hudson54241132001-12-07 15:38:26 +00002310 cat > conftest.$ac_ext <<EOF
2311#line 2312 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002312#include "confdefs.h"
2313#include <sys/types.h>
2314#include <signal.h>
2315#ifdef signal
Michael W. Hudson54241132001-12-07 15:38:26 +00002316#undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00002317#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002318#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002319extern "C" void (*signal (int, void (*)(int)))(int);
2320#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002321void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002322#endif
2323
Michael W. Hudson54241132001-12-07 15:38:26 +00002324int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002325int i;
Michael W. Hudson54241132001-12-07 15:38:26 +00002326; return 0; }
2327EOF
2328if { (eval echo configure:2329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2329 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002330 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002331else
Michael W. Hudson54241132001-12-07 15:38:26 +00002332 echo "configure: failed program was:" >&5
2333 cat conftest.$ac_ext >&5
2334 rm -rf conftest*
2335 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002336fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002337rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002338fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002339
Michael W. Hudson54241132001-12-07 15:38:26 +00002340echo "$ac_t""$ac_cv_type_signal" 1>&6
2341cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002342#define RETSIGTYPE $ac_cv_type_signal
2343EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002344
Michael W. Hudson54241132001-12-07 15:38:26 +00002345
2346echo $ac_n "checking for size_t""... $ac_c" 1>&6
2347echo "configure:2348: checking for size_t" >&5
2348if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2349 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002350else
Michael W. Hudson54241132001-12-07 15:38:26 +00002351 cat > conftest.$ac_ext <<EOF
2352#line 2353 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002353#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002354#include <sys/types.h>
2355#if STDC_HEADERS
2356#include <stdlib.h>
2357#include <stddef.h>
2358#endif
2359EOF
2360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2361 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2362 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002363 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002364else
Michael W. Hudson54241132001-12-07 15:38:26 +00002365 rm -rf conftest*
2366 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002367fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002368rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002369
Michael W. Hudson54241132001-12-07 15:38:26 +00002370fi
2371echo "$ac_t""$ac_cv_type_size_t" 1>&6
2372if test $ac_cv_type_size_t = no; then
2373 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002374#define size_t unsigned
2375EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002376
2377fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002378
Michael W. Hudson54241132001-12-07 15:38:26 +00002379echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2380echo "configure:2381: checking for uid_t in sys/types.h" >&5
2381if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2382 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002383else
Michael W. Hudson54241132001-12-07 15:38:26 +00002384 cat > conftest.$ac_ext <<EOF
2385#line 2386 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002386#include "confdefs.h"
2387#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002388EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002389if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2390 egrep "uid_t" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002391 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002392 ac_cv_type_uid_t=yes
2393else
Michael W. Hudson54241132001-12-07 15:38:26 +00002394 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002395 ac_cv_type_uid_t=no
2396fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002397rm -f conftest*
2398
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002399fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002400
Michael W. Hudson54241132001-12-07 15:38:26 +00002401echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2402if test $ac_cv_type_uid_t = no; then
2403 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002404#define uid_t int
2405EOF
2406
Michael W. Hudson54241132001-12-07 15:38:26 +00002407 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002408#define gid_t int
2409EOF
2410
2411fi
2412
Jack Jansendd19cf82001-12-06 22:36:17 +00002413
Michael W. Hudson54241132001-12-07 15:38:26 +00002414# Sizes of various common basic types
2415echo $ac_n "checking size of int""... $ac_c" 1>&6
2416echo "configure:2417: checking size of int" >&5
2417if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2418 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002419else
2420 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002421 ac_cv_sizeof_int=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002422else
Michael W. Hudson54241132001-12-07 15:38:26 +00002423 cat > conftest.$ac_ext <<EOF
2424#line 2425 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002425#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002426#include <stdio.h>
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002427#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002428main()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002429{
Michael W. Hudson54241132001-12-07 15:38:26 +00002430 FILE *f=fopen("conftestval", "w");
2431 if (!f) exit(1);
2432 fprintf(f, "%d\n", sizeof(int));
2433 exit(0);
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002434}
Michael W. Hudson54241132001-12-07 15:38:26 +00002435EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002436if { (eval echo configure:2437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002437then
2438 ac_cv_sizeof_int=`cat conftestval`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002439else
Michael W. Hudson54241132001-12-07 15:38:26 +00002440 echo "configure: failed program was:" >&5
2441 cat conftest.$ac_ext >&5
2442 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002443 ac_cv_sizeof_int=0
2444fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002445rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002446fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002447
2448fi
2449echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2450cat >> confdefs.h <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002451#define SIZEOF_INT $ac_cv_sizeof_int
2452EOF
2453
2454
Michael W. Hudson54241132001-12-07 15:38:26 +00002455echo $ac_n "checking size of long""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002456echo "configure:2457: checking size of long" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002457if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2458 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002459else
2460 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002461 ac_cv_sizeof_long=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002462else
Michael W. Hudson54241132001-12-07 15:38:26 +00002463 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002464#line 2465 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002465#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002466#include <stdio.h>
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002467#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002468main()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002469{
Michael W. Hudson54241132001-12-07 15:38:26 +00002470 FILE *f=fopen("conftestval", "w");
2471 if (!f) exit(1);
2472 fprintf(f, "%d\n", sizeof(long));
2473 exit(0);
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002474}
Michael W. Hudson54241132001-12-07 15:38:26 +00002475EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002476if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002477then
2478 ac_cv_sizeof_long=`cat conftestval`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002479else
Michael W. Hudson54241132001-12-07 15:38:26 +00002480 echo "configure: failed program was:" >&5
2481 cat conftest.$ac_ext >&5
2482 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002483 ac_cv_sizeof_long=0
2484fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002485rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002486fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002487
2488fi
2489echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2490cat >> confdefs.h <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002491#define SIZEOF_LONG $ac_cv_sizeof_long
2492EOF
2493
2494
Michael W. Hudson54241132001-12-07 15:38:26 +00002495echo $ac_n "checking size of void *""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002496echo "configure:2497: checking size of void *" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002497if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
2498 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002499else
2500 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002501 ac_cv_sizeof_void_p=4
Guido van Rossumad678af1998-10-02 14:42:15 +00002502else
Michael W. Hudson54241132001-12-07 15:38:26 +00002503 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002504#line 2505 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002505#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002506#include <stdio.h>
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002507#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002508main()
Guido van Rossumad678af1998-10-02 14:42:15 +00002509{
Michael W. Hudson54241132001-12-07 15:38:26 +00002510 FILE *f=fopen("conftestval", "w");
2511 if (!f) exit(1);
2512 fprintf(f, "%d\n", sizeof(void *));
2513 exit(0);
Guido van Rossumad678af1998-10-02 14:42:15 +00002514}
Michael W. Hudson54241132001-12-07 15:38:26 +00002515EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002516if { (eval echo configure:2517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002517then
2518 ac_cv_sizeof_void_p=`cat conftestval`
Guido van Rossumad678af1998-10-02 14:42:15 +00002519else
Michael W. Hudson54241132001-12-07 15:38:26 +00002520 echo "configure: failed program was:" >&5
2521 cat conftest.$ac_ext >&5
2522 rm -fr conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00002523 ac_cv_sizeof_void_p=0
2524fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002525rm -fr conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00002526fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002527
2528fi
2529echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2530cat >> confdefs.h <<EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00002531#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2532EOF
2533
2534
Michael W. Hudson54241132001-12-07 15:38:26 +00002535echo $ac_n "checking size of char""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002536echo "configure:2537: checking size of char" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002537if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2538 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002539else
2540 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002541 ac_cv_sizeof_char=1
Guido van Rossumef2255b2000-03-10 22:30:29 +00002542else
Michael W. Hudson54241132001-12-07 15:38:26 +00002543 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002544#line 2545 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002545#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002546#include <stdio.h>
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002547#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002548main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002549{
Michael W. Hudson54241132001-12-07 15:38:26 +00002550 FILE *f=fopen("conftestval", "w");
2551 if (!f) exit(1);
2552 fprintf(f, "%d\n", sizeof(char));
2553 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002554}
Michael W. Hudson54241132001-12-07 15:38:26 +00002555EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002556if { (eval echo configure:2557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002557then
2558 ac_cv_sizeof_char=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002559else
Michael W. Hudson54241132001-12-07 15:38:26 +00002560 echo "configure: failed program was:" >&5
2561 cat conftest.$ac_ext >&5
2562 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002563 ac_cv_sizeof_char=0
2564fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002565rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002566fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002567
2568fi
2569echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2570cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002571#define SIZEOF_CHAR $ac_cv_sizeof_char
2572EOF
2573
2574
Michael W. Hudson54241132001-12-07 15:38:26 +00002575echo $ac_n "checking size of short""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002576echo "configure:2577: checking size of short" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002577if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2578 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002579else
2580 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002581 ac_cv_sizeof_short=2
Guido van Rossumef2255b2000-03-10 22:30:29 +00002582else
Michael W. Hudson54241132001-12-07 15:38:26 +00002583 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002584#line 2585 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002585#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002586#include <stdio.h>
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002587#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002588main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002589{
Michael W. Hudson54241132001-12-07 15:38:26 +00002590 FILE *f=fopen("conftestval", "w");
2591 if (!f) exit(1);
2592 fprintf(f, "%d\n", sizeof(short));
2593 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002594}
Michael W. Hudson54241132001-12-07 15:38:26 +00002595EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002596if { (eval echo configure:2597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002597then
2598 ac_cv_sizeof_short=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002599else
Michael W. Hudson54241132001-12-07 15:38:26 +00002600 echo "configure: failed program was:" >&5
2601 cat conftest.$ac_ext >&5
2602 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002603 ac_cv_sizeof_short=0
2604fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002605rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002606fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002607
2608fi
2609echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2610cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002611#define SIZEOF_SHORT $ac_cv_sizeof_short
2612EOF
2613
2614
Michael W. Hudson54241132001-12-07 15:38:26 +00002615echo $ac_n "checking size of float""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002616echo "configure:2617: checking size of float" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002617if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
2618 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002619else
2620 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002621 ac_cv_sizeof_float=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00002622else
Michael W. Hudson54241132001-12-07 15:38:26 +00002623 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002624#line 2625 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002625#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002626#include <stdio.h>
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002627#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002628main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002629{
Michael W. Hudson54241132001-12-07 15:38:26 +00002630 FILE *f=fopen("conftestval", "w");
2631 if (!f) exit(1);
2632 fprintf(f, "%d\n", sizeof(float));
2633 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002634}
Michael W. Hudson54241132001-12-07 15:38:26 +00002635EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002636if { (eval echo configure:2637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002637then
2638 ac_cv_sizeof_float=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002639else
Michael W. Hudson54241132001-12-07 15:38:26 +00002640 echo "configure: failed program was:" >&5
2641 cat conftest.$ac_ext >&5
2642 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002643 ac_cv_sizeof_float=0
2644fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002645rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002646fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002647
2648fi
2649echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2650cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002651#define SIZEOF_FLOAT $ac_cv_sizeof_float
2652EOF
2653
2654
Michael W. Hudson54241132001-12-07 15:38:26 +00002655echo $ac_n "checking size of double""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002656echo "configure:2657: checking size of double" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002657if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
2658 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002659else
2660 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002661 ac_cv_sizeof_double=8
Guido van Rossumef2255b2000-03-10 22:30:29 +00002662else
Michael W. Hudson54241132001-12-07 15:38:26 +00002663 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002664#line 2665 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002665#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002666#include <stdio.h>
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002667#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002668main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002669{
Michael W. Hudson54241132001-12-07 15:38:26 +00002670 FILE *f=fopen("conftestval", "w");
2671 if (!f) exit(1);
2672 fprintf(f, "%d\n", sizeof(double));
2673 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002674}
Michael W. Hudson54241132001-12-07 15:38:26 +00002675EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002676if { (eval echo configure:2677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002677then
2678 ac_cv_sizeof_double=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002679else
Michael W. Hudson54241132001-12-07 15:38:26 +00002680 echo "configure: failed program was:" >&5
2681 cat conftest.$ac_ext >&5
2682 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002683 ac_cv_sizeof_double=0
2684fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002685rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002686fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002687
2688fi
2689echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2690cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002691#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2692EOF
2693
2694
Michael W. Hudson54241132001-12-07 15:38:26 +00002695echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002696echo "configure:2697: checking size of fpos_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002697if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
2698 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002699else
2700 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002701 ac_cv_sizeof_fpos_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002702else
Michael W. Hudson54241132001-12-07 15:38:26 +00002703 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002704#line 2705 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002705#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002706#include <stdio.h>
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002707#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002708main()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002709{
Michael W. Hudson54241132001-12-07 15:38:26 +00002710 FILE *f=fopen("conftestval", "w");
2711 if (!f) exit(1);
2712 fprintf(f, "%d\n", sizeof(fpos_t));
2713 exit(0);
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002714}
Michael W. Hudson54241132001-12-07 15:38:26 +00002715EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002716if { (eval echo configure:2717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002717then
2718 ac_cv_sizeof_fpos_t=`cat conftestval`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002719else
Michael W. Hudson54241132001-12-07 15:38:26 +00002720 echo "configure: failed program was:" >&5
2721 cat conftest.$ac_ext >&5
2722 rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002723 ac_cv_sizeof_fpos_t=0
2724fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002725rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002726fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002727
2728fi
2729echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2730cat >> confdefs.h <<EOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002731#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2732EOF
2733
Michael W. Hudson54241132001-12-07 15:38:26 +00002734
2735
2736echo $ac_n "checking for long long support""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002737echo "configure:2738: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002738have_long_long=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002739cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002740#line 2741 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002741#include "confdefs.h"
2742
Michael W. Hudson54241132001-12-07 15:38:26 +00002743int main() {
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002744long long x; x = (long long)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002745; return 0; }
2746EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002747if { (eval echo configure:2748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002748 rm -rf conftest*
2749 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002750#define HAVE_LONG_LONG 1
2751EOF
2752 have_long_long=yes
2753else
Michael W. Hudson54241132001-12-07 15:38:26 +00002754 echo "configure: failed program was:" >&5
2755 cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002756fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002757rm -f conftest*
2758echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002759if test "$have_long_long" = yes ; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002760echo $ac_n "checking size of long long""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002761echo "configure:2762: checking size of long long" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002762if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2763 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002764else
2765 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002766 ac_cv_sizeof_long_long=8
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002767else
Michael W. Hudson54241132001-12-07 15:38:26 +00002768 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002769#line 2770 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002770#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002771#include <stdio.h>
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002772#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002773main()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002774{
Michael W. Hudson54241132001-12-07 15:38:26 +00002775 FILE *f=fopen("conftestval", "w");
2776 if (!f) exit(1);
2777 fprintf(f, "%d\n", sizeof(long long));
2778 exit(0);
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002779}
Michael W. Hudson54241132001-12-07 15:38:26 +00002780EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002781if { (eval echo configure:2782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002782then
2783 ac_cv_sizeof_long_long=`cat conftestval`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002784else
Michael W. Hudson54241132001-12-07 15:38:26 +00002785 echo "configure: failed program was:" >&5
2786 cat conftest.$ac_ext >&5
2787 rm -fr conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002788 ac_cv_sizeof_long_long=0
2789fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002790rm -fr conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002791fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002792
2793fi
2794echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2795cat >> confdefs.h <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002796#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2797EOF
2798
Michael W. Hudson54241132001-12-07 15:38:26 +00002799
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002800fi
2801
Michael W. Hudson54241132001-12-07 15:38:26 +00002802echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002803echo "configure:2804: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002804have_uintptr_t=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002805cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002806#line 2807 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002807#include "confdefs.h"
2808
Michael W. Hudson54241132001-12-07 15:38:26 +00002809int main() {
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002810uintptr_t x; x = (uintptr_t)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002811; return 0; }
2812EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002813if { (eval echo configure:2814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002814 rm -rf conftest*
2815 cat >> confdefs.h <<\EOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002816#define HAVE_UINTPTR_T 1
2817EOF
2818 have_uintptr_t=yes
2819else
Michael W. Hudson54241132001-12-07 15:38:26 +00002820 echo "configure: failed program was:" >&5
2821 cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002822fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002823rm -f conftest*
2824echo "$ac_t""$have_uintptr_t" 1>&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002825if test "$have_uintptr_t" = yes ; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002826echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002827echo "configure:2828: checking size of uintptr_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002828if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
2829 echo $ac_n "(cached) $ac_c" 1>&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002830else
2831 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002832 ac_cv_sizeof_uintptr_t=4
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002833else
Michael W. Hudson54241132001-12-07 15:38:26 +00002834 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002835#line 2836 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002836#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002837#include <stdio.h>
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002838#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002839main()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002840{
Michael W. Hudson54241132001-12-07 15:38:26 +00002841 FILE *f=fopen("conftestval", "w");
2842 if (!f) exit(1);
2843 fprintf(f, "%d\n", sizeof(uintptr_t));
2844 exit(0);
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002845}
Michael W. Hudson54241132001-12-07 15:38:26 +00002846EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002847if { (eval echo configure:2848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002848then
2849 ac_cv_sizeof_uintptr_t=`cat conftestval`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002850else
Michael W. Hudson54241132001-12-07 15:38:26 +00002851 echo "configure: failed program was:" >&5
2852 cat conftest.$ac_ext >&5
2853 rm -fr conftest*
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002854 ac_cv_sizeof_uintptr_t=0
2855fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002856rm -fr conftest*
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002857fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002858
2859fi
2860echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2861cat >> confdefs.h <<EOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002862#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2863EOF
2864
Michael W. Hudson54241132001-12-07 15:38:26 +00002865
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002866fi
2867
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002868# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002869echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002870echo "configure:2871: checking size of off_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002871if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
2872 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002873else
2874 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002875 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002876else
Michael W. Hudson54241132001-12-07 15:38:26 +00002877 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002878#line 2879 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002879#include "confdefs.h"
2880#include <stdio.h>
2881#include <sys/types.h>
2882main()
2883{
2884 FILE *f=fopen("conftestval", "w");
2885 if (!f) exit(1);
2886 fprintf(f, "%d\n", sizeof(off_t));
2887 exit(0);
2888}
Michael W. Hudson54241132001-12-07 15:38:26 +00002889EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002890if { (eval echo configure:2891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002891then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002892 ac_cv_sizeof_off_t=`cat conftestval`
2893else
Michael W. Hudson54241132001-12-07 15:38:26 +00002894 echo "configure: failed program was:" >&5
2895 cat conftest.$ac_ext >&5
2896 rm -fr conftest*
2897 ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002898fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002899rm -fr conftest*
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002900fi
2901
Michael W. Hudson54241132001-12-07 15:38:26 +00002902
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002903fi
2904
Michael W. Hudson54241132001-12-07 15:38:26 +00002905echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2906cat >> confdefs.h <<EOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002907#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2908EOF
2909
Michael W. Hudson54241132001-12-07 15:38:26 +00002910
2911echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002912echo "configure:2913: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002913if test "$have_long_long" = yes -a \
2914 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2915 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002916 cat >> confdefs.h <<\EOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002917#define HAVE_LARGEFILE_SUPPORT 1
2918EOF
2919
Michael W. Hudson54241132001-12-07 15:38:26 +00002920 echo "$ac_t""yes" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002921else
Michael W. Hudson54241132001-12-07 15:38:26 +00002922 echo "$ac_t""no" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002923fi
2924
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002925# AC_CHECK_SIZEOF() doesn't include <time.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002926echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002927echo "configure:2928: checking size of time_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002928if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
2929 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002930else
2931 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002932 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002933else
Michael W. Hudson54241132001-12-07 15:38:26 +00002934 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002935#line 2936 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002936#include "confdefs.h"
2937#include <stdio.h>
2938#include <time.h>
2939main()
2940{
2941 FILE *f=fopen("conftestval", "w");
2942 if (!f) exit(1);
2943 fprintf(f, "%d\n", sizeof(time_t));
2944 exit(0);
2945}
Michael W. Hudson54241132001-12-07 15:38:26 +00002946EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002947if { (eval echo configure:2948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002948then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002949 ac_cv_sizeof_time_t=`cat conftestval`
2950else
Michael W. Hudson54241132001-12-07 15:38:26 +00002951 echo "configure: failed program was:" >&5
2952 cat conftest.$ac_ext >&5
2953 rm -fr conftest*
2954 ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002955fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002956rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002957fi
2958
Michael W. Hudson54241132001-12-07 15:38:26 +00002959
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002960fi
2961
Michael W. Hudson54241132001-12-07 15:38:26 +00002962echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2963cat >> confdefs.h <<EOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002964#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2965EOF
2966
Michael W. Hudson54241132001-12-07 15:38:26 +00002967
2968
Trent Mick635f6fb2000-08-23 21:33:05 +00002969# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002970ac_save_cc="$CC"
2971if test "$ac_cv_kpthread" = "yes"
2972then CC="$CC -Kpthread"
2973fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002974echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002975echo "configure:2976: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002976have_pthread_t=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002977cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002978#line 2979 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002979#include "confdefs.h"
2980#include <pthread.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002981int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002982pthread_t x; x = *(pthread_t*)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002983; return 0; }
2984EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002985if { (eval echo configure:2986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002986 rm -rf conftest*
Trent Mick635f6fb2000-08-23 21:33:05 +00002987 have_pthread_t=yes
2988else
Michael W. Hudson54241132001-12-07 15:38:26 +00002989 echo "configure: failed program was:" >&5
2990 cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002991fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002992rm -f conftest*
2993echo "$ac_t""$have_pthread_t" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002994if test "$have_pthread_t" = yes ; then
2995 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002996 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00002997echo "configure:2998: checking size of pthread_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002998 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
2999 echo $ac_n "(cached) $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003000else
3001 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003002 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00003003else
Michael W. Hudson54241132001-12-07 15:38:26 +00003004 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003005#line 3006 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00003006#include "confdefs.h"
3007#include <stdio.h>
3008 #include <pthread.h>
3009 main()
3010 {
3011 FILE *f=fopen("conftestval", "w");
3012 if (!f) exit(1);
3013 fprintf(f, "%d\n", sizeof(pthread_t));
3014 exit(0);
3015 }
Michael W. Hudson54241132001-12-07 15:38:26 +00003016EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003017if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00003018then
Trent Mick635f6fb2000-08-23 21:33:05 +00003019 ac_cv_sizeof_pthread_t=`cat conftestval`
3020else
Michael W. Hudson54241132001-12-07 15:38:26 +00003021 echo "configure: failed program was:" >&5
3022 cat conftest.$ac_ext >&5
3023 rm -fr conftest*
3024 ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00003025fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003026rm -fr conftest*
Trent Mick635f6fb2000-08-23 21:33:05 +00003027fi
3028
Michael W. Hudson54241132001-12-07 15:38:26 +00003029
Trent Mick635f6fb2000-08-23 21:33:05 +00003030fi
3031
Michael W. Hudson54241132001-12-07 15:38:26 +00003032 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
3033 cat >> confdefs.h <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003034#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
3035EOF
3036
3037fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003038CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00003039
Michael W. Hudson54241132001-12-07 15:38:26 +00003040echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003041echo "configure:3042: checking for --enable-toolbox-glue" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003042# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
3043if test "${enable_toolbox_glue+set}" = set; then
3044 enableval="$enable_toolbox_glue"
Michael W. Hudson54241132001-12-07 15:38:26 +00003045 :
3046fi
Jack Jansene578a632001-08-15 01:27:14 +00003047
3048
3049if test -z "$enable_toolbox_glue"
Michael W. Hudson54241132001-12-07 15:38:26 +00003050then
Jack Jansene578a632001-08-15 01:27:14 +00003051 case $ac_sys_system/$ac_sys_release in
3052 Darwin/*)
3053 enable_toolbox_glue="yes";;
3054 *)
3055 enable_toolbox_glue="no";;
3056 esac
3057fi
3058case "$enable_toolbox_glue" in
3059yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00003060 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00003061 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00003062 extra_undefs="-u __dummy -u _PyMac_Error"
Michael W. Hudson54241132001-12-07 15:38:26 +00003063 cat >> confdefs.h <<\EOF
Jack Jansene578a632001-08-15 01:27:14 +00003064#define USE_TOOLBOX_OBJECT_GLUE 1
3065EOF
3066
3067 ;;
3068*)
3069 extra_frameworks=""
3070 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00003071 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00003072 ;;
3073esac
Michael W. Hudson54241132001-12-07 15:38:26 +00003074echo "$ac_t""$enable_toolbox_glue" 1>&6
3075
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003076
3077case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003078 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003079 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003080 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
3081 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00003082 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3083 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00003084 Darwin/*)
3085 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003086 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
3087 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00003088 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3089 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003090esac
3091
Michael W. Hudson54241132001-12-07 15:38:26 +00003092echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003093echo "configure:3094: checking for --enable-framework" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003094if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003095then
Jack Jansenca06bc62001-08-03 15:32:23 +00003096 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003097 # -U __environ is needed since bundles don't have access
3098 # to crt0 when built but will always be linked against it
Michael W. Hudson54241132001-12-07 15:38:26 +00003099 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00003100 # in the build location.
Michael W. Hudson54241132001-12-07 15:38:26 +00003101
Jack Jansena3891ea2001-09-07 14:25:12 +00003102 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003103 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
3104 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00003105 esac
Michael W. Hudson54241132001-12-07 15:38:26 +00003106 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003107#define WITH_NEXT_FRAMEWORK 1
3108EOF
3109
Michael W. Hudson54241132001-12-07 15:38:26 +00003110 echo "$ac_t""yes" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003111else
Michael W. Hudson54241132001-12-07 15:38:26 +00003112 echo "$ac_t""no" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003113fi
3114
Michael W. Hudson54241132001-12-07 15:38:26 +00003115echo $ac_n "checking for dyld""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003116echo "configure:3117: checking for dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003117case $ac_sys_system/$ac_sys_release in
3118 Darwin/*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003119 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003120#define WITH_DYLD 1
3121EOF
3122
Michael W. Hudson54241132001-12-07 15:38:26 +00003123 echo "$ac_t""always on for Darwin" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003124 ;;
3125 *)
Michael W. Hudson54241132001-12-07 15:38:26 +00003126 echo "$ac_t""no" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00003127 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003128esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003129
Guido van Rossum0a516c91994-09-12 10:58:40 +00003130# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003131
Michael W. Hudson54241132001-12-07 15:38:26 +00003132
3133
3134
3135
Guido van Rossum0a516c91994-09-12 10:58:40 +00003136# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003137# -- usually .so, .sl on HP-UX, .dll on Cygwin
Michael W. Hudson54241132001-12-07 15:38:26 +00003138echo $ac_n "checking SO""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003139echo "configure:3140: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003140if test -z "$SO"
3141then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003142 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003143 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003144 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003145 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003146 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003147fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003148echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003149# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003150# -- "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 +00003151# (Shared libraries in this instance are shared modules to be loaded into
3152# Python, as opposed to building Python itself as a shared library.)
Michael W. Hudson54241132001-12-07 15:38:26 +00003153echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003154echo "configure:3155: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003155if test -z "$LDSHARED"
3156then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003157 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003158 AIX*)
3159 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00003160 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003161 ;;
3162 BeOS*)
3163 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00003164 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003165 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003166 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003167 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003168 SunOS/4*) LDSHARED="ld";;
Michael W. Hudson54241132001-12-07 15:38:26 +00003169 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00003170 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003171 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003172 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00003173 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003174 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003175 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3176 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00003177 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003178 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3179 if test "$enable_framework" ; then
3180 # Link against the framework. All externals should be defined.
3181 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3182 else
3183 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00003184 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00003185 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00003186 Darwin/*)
3187 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3188 if test "$enable_framework" ; then
3189 # Link against the framework. All externals should be defined.
3190 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3191 else
3192 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00003193 LDSHARED="$LDSHARED -flat_namespace -undefined suppress"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003194 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003195 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003196 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003197 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003198 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003199 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003200 then
3201 LDSHARED="cc -shared ${LDFLAGS}"
3202 else
3203 LDSHARED="ld -Bshareable ${LDFLAGS}"
3204 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003205 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003206 if test "$GCC" = "yes"
3207 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003208 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003209 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003210 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003211 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003212 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003213 *) LDSHARED="ld";;
3214 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003215fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003216echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003217BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003218# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003219# library (module) -- this is only needed for a few systems
Michael W. Hudson54241132001-12-07 15:38:26 +00003220echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003221echo "configure:3222: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003222if test -z "$CCSHARED"
3223then
Guido van Rossum07397971997-04-29 21:49:50 +00003224 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003225 SunOS*) if test "$GCC" = yes;
3226 then CCSHARED="-fPIC";
3227 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003228 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00003229 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00003230 else CCSHARED="+z";
3231 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003232 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003233 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003234 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003235 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003236 if test "$GCC" = "yes"
3237 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003238 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003239 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003240 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003241 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003242 IRIX*/6*) case $CC in
3243 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003244 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003245 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003246 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003247 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003248fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003249echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003250# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003251# the python executable -- this is only needed for a few systems
Michael W. Hudson54241132001-12-07 15:38:26 +00003252echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003253echo "configure:3254: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003254if test -z "$LINKFORSHARED"
3255then
Guido van Rossum07397971997-04-29 21:49:50 +00003256 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003257 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003258 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003259 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003260 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003261 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003262 # -u libsys_s pulls in all symbols in libsys
Michael W. Hudson54241132001-12-07 15:38:26 +00003263 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00003264 # -u __dummy makes the linker aware of the objc runtime
3265 # in System.framework; otherwise, __objcInit (referenced in
3266 # crt1.o) gets erroneously defined as common, which breaks dynamic
3267 # loading of any modules which reference it in System.framework.
3268 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3269 # not used by the core itself but which needs to be in the core so
3270 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00003271 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00003272 if test "$enable_framework"
3273 then
3274 LINKFORSHARED="$LINKFORSHARED -framework Python"
3275 fi
3276 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003277 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003278 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003279 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Michael W. Hudson54241132001-12-07 15:38:26 +00003280 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003281 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3282 then
3283 LINKFORSHARED="-Wl,--export-dynamic"
3284 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003285 SunOS/5*) case $CC in
3286 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003287 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003288 then
3289 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003290 fi;;
3291 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003292 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003293fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003294echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003295
Michael W. Hudson54241132001-12-07 15:38:26 +00003296
3297echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003298echo "configure:3299: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003299if test ! "$LIBRARY" = "$LDLIBRARY"
3300then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003301 case $ac_sys_system in
3302 CYGWIN*)
3303 # Cygwin needs CCSHARED when building extension DLLs
3304 # but not when building the interpreter DLL.
3305 CFLAGSFORSHARED='';;
3306 *)
3307 CFLAGSFORSHARED='$(CCSHARED)'
3308 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003309fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003310echo "$ac_t""$CFLAGSFORSHARED" 1>&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003311
Guido van Rossum627b2d71993-12-24 10:39:16 +00003312# checks for libraries
Michael W. Hudson54241132001-12-07 15:38:26 +00003313echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003314echo "configure:3315: checking for dlopen in -ldl" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003315ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3316if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3317 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003318else
Michael W. Hudson54241132001-12-07 15:38:26 +00003319 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003320LIBS="-ldl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003321cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003322#line 3323 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003323#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003324/* Override any gcc2 internal prototype to avoid an error. */
3325/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003326 builtin and then its argument prototype would still apply. */
3327char dlopen();
3328
3329int main() {
3330dlopen()
3331; return 0; }
3332EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003333if { (eval echo configure:3334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003334 rm -rf conftest*
3335 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003336else
Michael W. Hudson54241132001-12-07 15:38:26 +00003337 echo "configure: failed program was:" >&5
3338 cat conftest.$ac_ext >&5
3339 rm -rf conftest*
3340 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003341fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003342rm -f conftest*
3343LIBS="$ac_save_LIBS"
3344
Guido van Rossum627b2d71993-12-24 10:39:16 +00003345fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003346if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3347 echo "$ac_t""yes" 1>&6
3348 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3349 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3350 cat >> confdefs.h <<EOF
3351#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003352EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003353
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003354 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003355
Michael W. Hudson54241132001-12-07 15:38:26 +00003356else
3357 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003358fi
3359 # Dynamic linking for SunOS/Solaris and SYSV
Michael W. Hudson54241132001-12-07 15:38:26 +00003360echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003361echo "configure:3362: checking for shl_load in -ldld" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003362ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
3363if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3364 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003365else
Michael W. Hudson54241132001-12-07 15:38:26 +00003366 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003367LIBS="-ldld $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003368cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003369#line 3370 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003370#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003371/* Override any gcc2 internal prototype to avoid an error. */
3372/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003373 builtin and then its argument prototype would still apply. */
3374char shl_load();
3375
3376int main() {
3377shl_load()
3378; return 0; }
3379EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003380if { (eval echo configure:3381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003381 rm -rf conftest*
3382 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003383else
Michael W. Hudson54241132001-12-07 15:38:26 +00003384 echo "configure: failed program was:" >&5
3385 cat conftest.$ac_ext >&5
3386 rm -rf conftest*
3387 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003388fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003389rm -f conftest*
3390LIBS="$ac_save_LIBS"
3391
Guido van Rossum627b2d71993-12-24 10:39:16 +00003392fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003393if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3394 echo "$ac_t""yes" 1>&6
3395 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3396 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3397 cat >> confdefs.h <<EOF
3398#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003399EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003400
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003401 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003402
Michael W. Hudson54241132001-12-07 15:38:26 +00003403else
3404 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003405fi
3406 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003407
3408# checks for system dependent C++ extensions support
3409case "$ac_sys_system" in
Michael W. Hudson54241132001-12-07 15:38:26 +00003410 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003411echo "configure:3412: checking for genuine AIX C++ extensions support" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003412 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003413#line 3414 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003414#include "confdefs.h"
3415#include "/usr/lpp/xlC/include/load.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00003416int main() {
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003417loadAndInit("", 0, "")
Michael W. Hudson54241132001-12-07 15:38:26 +00003418; return 0; }
3419EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003420if { (eval echo configure:3421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003421 rm -rf conftest*
3422 cat >> confdefs.h <<\EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003423#define AIX_GENUINE_CPLUSPLUS 1
3424EOF
3425
Michael W. Hudson54241132001-12-07 15:38:26 +00003426 echo "$ac_t""yes" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003427else
Michael W. Hudson54241132001-12-07 15:38:26 +00003428 echo "configure: failed program was:" >&5
3429 cat conftest.$ac_ext >&5
3430 rm -rf conftest*
3431 echo "$ac_t""no" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003432fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003433rm -f conftest*;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003434 *) ;;
3435esac
3436
Guido van Rossum70c7f481998-03-26 18:44:10 +00003437# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3438# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003439# BeOS' sockets are stashed in libnet.
3440case "$ac_sys_system" in
3441IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003442*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003443echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003444echo "configure:3445: checking for t_open in -lnsl" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003445ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
3446if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3447 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003448else
Michael W. Hudson54241132001-12-07 15:38:26 +00003449 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003450LIBS="-lnsl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003451cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003452#line 3453 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003453#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003454/* Override any gcc2 internal prototype to avoid an error. */
3455/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003456 builtin and then its argument prototype would still apply. */
3457char t_open();
3458
3459int main() {
3460t_open()
3461; return 0; }
3462EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003463if { (eval echo configure:3464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003464 rm -rf conftest*
3465 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003466else
Michael W. Hudson54241132001-12-07 15:38:26 +00003467 echo "configure: failed program was:" >&5
3468 cat conftest.$ac_ext >&5
3469 rm -rf conftest*
3470 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003471fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003472rm -f conftest*
3473LIBS="$ac_save_LIBS"
3474
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003475fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003476if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3477 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003478 LIBS="-lnsl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003479else
3480 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003481fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003482 # SVR4
Michael W. Hudson54241132001-12-07 15:38:26 +00003483echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003484echo "configure:3485: checking for socket in -lsocket" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003485ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3486if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3487 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003488else
Michael W. Hudson54241132001-12-07 15:38:26 +00003489 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003490LIBS="-lsocket $LIBS $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003491cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003492#line 3493 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003493#include "confdefs.h"
3494/* Override any gcc2 internal prototype to avoid an error. */
3495/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003496 builtin and then its argument prototype would still apply. */
3497char socket();
3498
3499int main() {
3500socket()
3501; return 0; }
3502EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003503if { (eval echo configure:3504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003504 rm -rf conftest*
3505 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003506else
Michael W. Hudson54241132001-12-07 15:38:26 +00003507 echo "configure: failed program was:" >&5
3508 cat conftest.$ac_ext >&5
3509 rm -rf conftest*
3510 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003511fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003512rm -f conftest*
3513LIBS="$ac_save_LIBS"
3514
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003515fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003516if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3517 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003518 LIBS="-lsocket $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003519else
3520 echo "$ac_t""no" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003521fi
3522 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003523;;
3524esac
3525case "$ac_sys_system" in
3526BeOS*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003527echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003528echo "configure:3529: checking for socket in -lnet" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003529ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
3530if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3531 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003532else
Michael W. Hudson54241132001-12-07 15:38:26 +00003533 ac_save_LIBS="$LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00003534LIBS="-lnet $LIBS $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003535cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003536#line 3537 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003537#include "confdefs.h"
3538/* Override any gcc2 internal prototype to avoid an error. */
3539/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003540 builtin and then its argument prototype would still apply. */
3541char socket();
3542
3543int main() {
3544socket()
3545; return 0; }
3546EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003547if { (eval echo configure:3548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003548 rm -rf conftest*
3549 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003550else
Michael W. Hudson54241132001-12-07 15:38:26 +00003551 echo "configure: failed program was:" >&5
3552 cat conftest.$ac_ext >&5
3553 rm -rf conftest*
3554 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003555fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003556rm -f conftest*
3557LIBS="$ac_save_LIBS"
3558
Guido van Rossumad678af1998-10-02 14:42:15 +00003559fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003560if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3561 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003562 LIBS="-lnet $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003563else
3564 echo "$ac_t""no" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003565fi
3566 # BeOS
3567;;
3568esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003569
Michael W. Hudson54241132001-12-07 15:38:26 +00003570echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003571echo "configure:3572: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003572# Check whether --with-libs or --without-libs was given.
3573if test "${with_libs+set}" = set; then
3574 withval="$with_libs"
Michael W. Hudson54241132001-12-07 15:38:26 +00003575
3576echo "$ac_t""$withval" 1>&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00003577LIBS="$withval $LIBS"
3578
3579else
Michael W. Hudson54241132001-12-07 15:38:26 +00003580 echo "$ac_t""no" 1>&6
3581fi
3582
Guido van Rossum7f43da71994-08-01 12:15:30 +00003583
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003584# Determine if signalmodule should be used.
3585
3586
Michael W. Hudson54241132001-12-07 15:38:26 +00003587echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003588echo "configure:3589: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003589# Check whether --with-signal-module or --without-signal-module was given.
3590if test "${with_signal_module+set}" = set; then
3591 withval="$with_signal_module"
Michael W. Hudson54241132001-12-07 15:38:26 +00003592 :
3593fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003594
3595
3596if test -z "$with_signal_module"
3597then with_signal_module="yes"
3598fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003599echo "$ac_t""$with_signal_module" 1>&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003600
3601if test "${with_signal_module}" = "yes"; then
3602 USE_SIGNAL_MODULE=""
3603 SIGNAL_OBJS=""
3604else
3605 USE_SIGNAL_MODULE="#"
3606 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3607fi
3608
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003609# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003610
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003611USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003612
Michael W. Hudson54241132001-12-07 15:38:26 +00003613echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003614echo "configure:3615: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003615
3616# Check whether --with-dec-threads or --without-dec-threads was given.
3617if test "${with_dec_threads+set}" = set; then
3618 withval="$with_dec_threads"
Michael W. Hudson54241132001-12-07 15:38:26 +00003619
3620echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003621LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003622if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003623 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003624fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003625else
Michael W. Hudson54241132001-12-07 15:38:26 +00003626 echo "$ac_t""no" 1>&6
3627fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003628
3629
Michael W. Hudson54241132001-12-07 15:38:26 +00003630echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003631echo "configure:3632: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003632# Check whether --with-threads or --without-threads was given.
3633if test "${with_threads+set}" = set; then
3634 withval="$with_threads"
Michael W. Hudson54241132001-12-07 15:38:26 +00003635 :
3636fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003637
3638
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003639# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003640# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003641if test "${with_thread+set}" = set; then
3642 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003643
Jack Jansendd19cf82001-12-06 22:36:17 +00003644with_threads=$with_thread
Michael W. Hudson54241132001-12-07 15:38:26 +00003645fi
3646
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003647
3648if test -z "$with_threads"
3649then with_threads="yes"
3650fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003651echo "$ac_t""$with_threads" 1>&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003652
3653if test "$with_threads" = "no"
3654then
3655 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003656elif test "$ac_cv_pthread_is_default" = yes
3657then
Michael W. Hudson54241132001-12-07 15:38:26 +00003658 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003659#define WITH_THREAD 1
3660EOF
3661
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003662 # Defining _REENTRANT on system with POSIX threads should not hurt.
Michael W. Hudson54241132001-12-07 15:38:26 +00003663 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003664#define _REENTRANT 1
3665EOF
3666
3667 posix_threads=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003668 LIBOBJS="$LIBOBJS thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003669elif test "$ac_cv_kpthread" = "yes"
3670then
3671 CC="$CC -Kpthread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003672 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003673#define WITH_THREAD 1
3674EOF
3675
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003676 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003677 LIBOBJS="$LIBOBJS thread.o"
3678else
3679 if test ! -z "$with_threads" -a -d "$with_threads"
3680 then LDFLAGS="$LDFLAGS -L$with_threads"
3681 fi
3682 if test ! -z "$withval" -a -d "$withval"
3683 then LDFLAGS="$LDFLAGS -L$withval"
3684 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003685
3686 # According to the POSIX spec, a pthreads implementation must
3687 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Michael W. Hudson54241132001-12-07 15:38:26 +00003688 echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003689echo "configure:3690: checking for _POSIX_THREADS in unistd.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003690 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003691#line 3692 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003692#include "confdefs.h"
3693#include <unistd.h>
3694 #ifdef _POSIX_THREADS
3695 yes
3696 #endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003697
3698EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003699if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3700 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003701 rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003702 unistd_defines_pthreads=yes
3703else
Michael W. Hudson54241132001-12-07 15:38:26 +00003704 rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003705 unistd_defines_pthreads=no
3706fi
3707rm -f conftest*
3708
Michael W. Hudson54241132001-12-07 15:38:26 +00003709 echo "$ac_t""$unistd_defines_pthreads" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003710
Michael W. Hudson54241132001-12-07 15:38:26 +00003711 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003712#define _REENTRANT 1
3713EOF
3714
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003715 ac_safe=`echo "cthreads.h" | sed 'y%./+-%__p_%'`
3716echo $ac_n "checking for cthreads.h""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003717echo "configure:3718: checking for cthreads.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003718if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3719 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003720else
Michael W. Hudson54241132001-12-07 15:38:26 +00003721 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003722#line 3723 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003723#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003724#include <cthreads.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00003725EOF
3726ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003727{ (eval echo configure:3728: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003728ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3729if test -z "$ac_err"; then
3730 rm -rf conftest*
3731 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003732else
Michael W. Hudson54241132001-12-07 15:38:26 +00003733 echo "$ac_err" >&5
3734 echo "configure: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003735 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003736 rm -rf conftest*
3737 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003738fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003739rm -f conftest*
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003740fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003741if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3742 echo "$ac_t""yes" 1>&6
3743 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003744#define WITH_THREAD 1
3745EOF
3746
Michael W. Hudson54241132001-12-07 15:38:26 +00003747 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003748#define C_THREADS 1
3749EOF
3750
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003751 cat >> confdefs.h <<\EOF
3752#define HURD_C_THREADS 1
3753EOF
3754
3755 LIBS="$LIBS -lthreads"
3756 LIBOBJS="$LIBOBJS thread.o"
3757else
3758 echo "$ac_t""no" 1>&6
3759
3760 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
3761echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003762echo "configure:3763: checking for mach/cthreads.h" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003763if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3764 echo $ac_n "(cached) $ac_c" 1>&6
3765else
3766 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003767#line 3768 "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003768#include "confdefs.h"
3769#include <mach/cthreads.h>
3770EOF
3771ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003772{ (eval echo configure:3773: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003773ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3774if test -z "$ac_err"; then
3775 rm -rf conftest*
3776 eval "ac_cv_header_$ac_safe=yes"
3777else
3778 echo "$ac_err" >&5
3779 echo "configure: failed program was:" >&5
3780 cat conftest.$ac_ext >&5
3781 rm -rf conftest*
3782 eval "ac_cv_header_$ac_safe=no"
3783fi
3784rm -f conftest*
3785fi
3786if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3787 echo "$ac_t""yes" 1>&6
3788 cat >> confdefs.h <<\EOF
3789#define WITH_THREAD 1
3790EOF
3791
3792 cat >> confdefs.h <<\EOF
3793#define C_THREADS 1
3794EOF
3795
3796 cat >> confdefs.h <<\EOF
3797#define MACH_C_THREADS 1
3798EOF
3799
Martin v. Löwis130fb172001-07-19 11:00:41 +00003800 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003801else
Michael W. Hudson54241132001-12-07 15:38:26 +00003802 echo "$ac_t""no" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003803
Michael W. Hudson54241132001-12-07 15:38:26 +00003804 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003805echo "configure:3806: checking for --with-pth" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003806 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003807if test "${with_pth+set}" = set; then
3808 withval="$with_pth"
Michael W. Hudson54241132001-12-07 15:38:26 +00003809
3810 echo "$ac_t""$withval" 1>&6
3811 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003812#define WITH_THREAD 1
3813EOF
3814
Michael W. Hudson54241132001-12-07 15:38:26 +00003815 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003816#define HAVE_PTH 1
3817EOF
3818
Martin v. Löwis130fb172001-07-19 11:00:41 +00003819 LIBS="-lpth $LIBS"
3820 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003821else
Michael W. Hudson54241132001-12-07 15:38:26 +00003822
3823 echo "$ac_t""no" 1>&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003824
3825 # Just looking for pthread_create in libpthread is not enough:
3826 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
3827 # So we really have to include pthread.h, and then link.
3828 _libs=$LIBS
3829 LIBS="$LIBS -lpthread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003830 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003831echo "configure:3832: checking for pthread_create in -lpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003832 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003833#line 3834 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003834#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003835#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00003836
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003837void * start_routine (void *arg) { exit (0); }
Michael W. Hudson54241132001-12-07 15:38:26 +00003838int main() {
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003839
3840pthread_create (NULL, NULL, start_routine, NULL)
Michael W. Hudson54241132001-12-07 15:38:26 +00003841; return 0; }
3842EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003843if { (eval echo configure:3844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003844 rm -rf conftest*
3845
3846 echo "$ac_t""yes" 1>&6
3847 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003848#define WITH_THREAD 1
3849EOF
3850
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003851 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003852 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003853else
Michael W. Hudson54241132001-12-07 15:38:26 +00003854 echo "configure: failed program was:" >&5
3855 cat conftest.$ac_ext >&5
3856 rm -rf conftest*
3857
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003858 LIBS=$_libs
Michael W. Hudson54241132001-12-07 15:38:26 +00003859 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003860echo "configure:3861: checking for pthread_detach" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003861if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
3862 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003863else
Michael W. Hudson54241132001-12-07 15:38:26 +00003864 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003865#line 3866 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003866#include "confdefs.h"
3867/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00003868 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003869#include <assert.h>
3870/* Override any gcc2 internal prototype to avoid an error. */
3871/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003872 builtin and then its argument prototype would still apply. */
3873char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003874
Michael W. Hudson54241132001-12-07 15:38:26 +00003875int main() {
3876
Guido van Rossumad678af1998-10-02 14:42:15 +00003877/* The GNU C library defines this for functions which it implements
3878 to always fail with ENOSYS. Some functions are actually named
3879 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003880#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003881choke me
3882#else
Michael W. Hudson54241132001-12-07 15:38:26 +00003883pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003884#endif
3885
Michael W. Hudson54241132001-12-07 15:38:26 +00003886; return 0; }
3887EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003888if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003889 rm -rf conftest*
3890 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003891else
Michael W. Hudson54241132001-12-07 15:38:26 +00003892 echo "configure: failed program was:" >&5
3893 cat conftest.$ac_ext >&5
3894 rm -rf conftest*
3895 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003896fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003897rm -f conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00003898fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003899
3900if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
3901 echo "$ac_t""yes" 1>&6
3902 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003903#define WITH_THREAD 1
3904EOF
3905
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003906 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003907 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003908else
Michael W. Hudson54241132001-12-07 15:38:26 +00003909 echo "$ac_t""no" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003910
Michael W. Hudson54241132001-12-07 15:38:26 +00003911 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
3912echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003913echo "configure:3914: checking for kernel/OS.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003914if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3915 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003916else
Michael W. Hudson54241132001-12-07 15:38:26 +00003917 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003918#line 3919 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003919#include "confdefs.h"
3920#include <kernel/OS.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00003921EOF
3922ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003923{ (eval echo configure:3924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003924ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3925if test -z "$ac_err"; then
3926 rm -rf conftest*
3927 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003928else
Michael W. Hudson54241132001-12-07 15:38:26 +00003929 echo "$ac_err" >&5
3930 echo "configure: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003931 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003932 rm -rf conftest*
3933 eval "ac_cv_header_$ac_safe=no"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003934fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003935rm -f conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003936fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003937if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3938 echo "$ac_t""yes" 1>&6
3939 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003940#define WITH_THREAD 1
3941EOF
3942
Michael W. Hudson54241132001-12-07 15:38:26 +00003943 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003944#define BEOS_THREADS 1
3945EOF
3946
Martin v. Löwis130fb172001-07-19 11:00:41 +00003947 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003948else
Michael W. Hudson54241132001-12-07 15:38:26 +00003949 echo "$ac_t""no" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003950
Michael W. Hudson54241132001-12-07 15:38:26 +00003951 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003952echo "configure:3953: checking for pthread_create in -lpthreads" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003953ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
3954if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3955 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003956else
Michael W. Hudson54241132001-12-07 15:38:26 +00003957 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003958LIBS="-lpthreads $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003959cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003960#line 3961 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003961#include "confdefs.h"
3962/* Override any gcc2 internal prototype to avoid an error. */
3963/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003964 builtin and then its argument prototype would still apply. */
3965char pthread_create();
3966
3967int main() {
3968pthread_create()
3969; return 0; }
3970EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003971if { (eval echo configure:3972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003972 rm -rf conftest*
3973 eval "ac_cv_lib_$ac_lib_var=yes"
Greg Steinadf63d62000-07-05 10:38:09 +00003974else
Michael W. Hudson54241132001-12-07 15:38:26 +00003975 echo "configure: failed program was:" >&5
3976 cat conftest.$ac_ext >&5
3977 rm -rf conftest*
3978 eval "ac_cv_lib_$ac_lib_var=no"
Greg Steinadf63d62000-07-05 10:38:09 +00003979fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003980rm -f conftest*
3981LIBS="$ac_save_LIBS"
3982
Greg Steinadf63d62000-07-05 10:38:09 +00003983fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003984if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3985 echo "$ac_t""yes" 1>&6
3986 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003987#define WITH_THREAD 1
3988EOF
3989
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003990 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003991 LIBS="$LIBS -lpthreads"
3992 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003993else
Michael W. Hudson54241132001-12-07 15:38:26 +00003994 echo "$ac_t""no" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00003995
Michael W. Hudson54241132001-12-07 15:38:26 +00003996 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00003997echo "configure:3998: checking for pthread_create in -lc_r" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003998ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
3999if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4000 echo $ac_n "(cached) $ac_c" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00004001else
Michael W. Hudson54241132001-12-07 15:38:26 +00004002 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00004003LIBS="-lc_r $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004004cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004005#line 4006 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00004006#include "confdefs.h"
4007/* Override any gcc2 internal prototype to avoid an error. */
4008/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004009 builtin and then its argument prototype would still apply. */
4010char pthread_create();
4011
4012int main() {
4013pthread_create()
4014; return 0; }
4015EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004016if { (eval echo configure:4017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004017 rm -rf conftest*
4018 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum49545951997-12-02 19:28:29 +00004019else
Michael W. Hudson54241132001-12-07 15:38:26 +00004020 echo "configure: failed program was:" >&5
4021 cat conftest.$ac_ext >&5
4022 rm -rf conftest*
4023 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum49545951997-12-02 19:28:29 +00004024fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004025rm -f conftest*
4026LIBS="$ac_save_LIBS"
4027
Guido van Rossum49545951997-12-02 19:28:29 +00004028fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004029if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4030 echo "$ac_t""yes" 1>&6
4031 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00004032#define WITH_THREAD 1
4033EOF
4034
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004035 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004036 LIBS="$LIBS -lc_r"
4037 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004038else
Michael W. Hudson54241132001-12-07 15:38:26 +00004039 echo "$ac_t""no" 1>&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004040
Michael W. Hudson54241132001-12-07 15:38:26 +00004041 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004042echo "configure:4043: checking for __d6_pthread_create in -lthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004043ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
4044if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4045 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004046else
Michael W. Hudson54241132001-12-07 15:38:26 +00004047 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00004048LIBS="-lthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004049cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004050#line 4051 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004051#include "confdefs.h"
4052/* Override any gcc2 internal prototype to avoid an error. */
4053/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004054 builtin and then its argument prototype would still apply. */
4055char __d6_pthread_create();
4056
4057int main() {
4058__d6_pthread_create()
4059; return 0; }
4060EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004061if { (eval echo configure:4062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004062 rm -rf conftest*
4063 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004064else
Michael W. Hudson54241132001-12-07 15:38:26 +00004065 echo "configure: failed program was:" >&5
4066 cat conftest.$ac_ext >&5
4067 rm -rf conftest*
4068 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004069fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004070rm -f conftest*
4071LIBS="$ac_save_LIBS"
4072
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004073fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004074if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4075 echo "$ac_t""yes" 1>&6
4076 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004077#define WITH_THREAD 1
4078EOF
4079
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004080 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004081 LIBS="$LIBS -lthread"
4082 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00004083else
Michael W. Hudson54241132001-12-07 15:38:26 +00004084 echo "$ac_t""no" 1>&6
Guido van Rossum49545951997-12-02 19:28:29 +00004085
Michael W. Hudson54241132001-12-07 15:38:26 +00004086 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004087echo "configure:4088: checking for __pthread_create_system in -lpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004088ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
4089if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4090 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004091else
Michael W. Hudson54241132001-12-07 15:38:26 +00004092 ac_save_LIBS="$LIBS"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004093LIBS="-lpthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004094cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004095#line 4096 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004096#include "confdefs.h"
4097/* Override any gcc2 internal prototype to avoid an error. */
4098/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004099 builtin and then its argument prototype would still apply. */
4100char __pthread_create_system();
4101
4102int main() {
4103__pthread_create_system()
4104; return 0; }
4105EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004106if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004107 rm -rf conftest*
4108 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004109else
Michael W. Hudson54241132001-12-07 15:38:26 +00004110 echo "configure: failed program was:" >&5
4111 cat conftest.$ac_ext >&5
4112 rm -rf conftest*
4113 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004114fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004115rm -f conftest*
4116LIBS="$ac_save_LIBS"
4117
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004118fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004119if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4120 echo "$ac_t""yes" 1>&6
4121 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004122#define WITH_THREAD 1
4123EOF
4124
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004125 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004126 LIBS="$LIBS -lpthread"
4127 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004128else
Michael W. Hudson54241132001-12-07 15:38:26 +00004129 echo "$ac_t""no" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004130
Michael W. Hudson54241132001-12-07 15:38:26 +00004131 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004132echo "configure:4133: checking for pthread_create in -lcma" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004133ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
4134if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4135 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00004136else
Michael W. Hudson54241132001-12-07 15:38:26 +00004137 ac_save_LIBS="$LIBS"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004138LIBS="-lcma $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004139cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004140#line 4141 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004141#include "confdefs.h"
4142/* Override any gcc2 internal prototype to avoid an error. */
4143/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004144 builtin and then its argument prototype would still apply. */
4145char pthread_create();
4146
4147int main() {
4148pthread_create()
4149; return 0; }
4150EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004151if { (eval echo configure:4152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004152 rm -rf conftest*
4153 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004154else
Michael W. Hudson54241132001-12-07 15:38:26 +00004155 echo "configure: failed program was:" >&5
4156 cat conftest.$ac_ext >&5
4157 rm -rf conftest*
4158 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004159fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004160rm -f conftest*
4161LIBS="$ac_save_LIBS"
4162
Guido van Rossumb93a8621998-05-07 13:27:32 +00004163fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004164if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4165 echo "$ac_t""yes" 1>&6
4166 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00004167#define WITH_THREAD 1
4168EOF
4169
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004170 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004171 LIBS="$LIBS -lcma"
4172 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004173else
Michael W. Hudson54241132001-12-07 15:38:26 +00004174 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004175
Martin v. Löwis130fb172001-07-19 11:00:41 +00004176 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004177fi
4178
Michael W. Hudson54241132001-12-07 15:38:26 +00004179
Guido van Rossum627b2d71993-12-24 10:39:16 +00004180fi
4181
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004182fi
4183
Guido van Rossum0be3e491997-05-22 20:33:33 +00004184fi
4185
Guido van Rossum49545951997-12-02 19:28:29 +00004186fi
4187
Guido van Rossumb93a8621998-05-07 13:27:32 +00004188fi
4189
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004190fi
4191
Guido van Rossumad678af1998-10-02 14:42:15 +00004192fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004193rm -f conftest*
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004194fi
4195
Michael W. Hudson54241132001-12-07 15:38:26 +00004196fi
4197
Martin v. Löwisa6e97582002-01-01 18:41:33 +00004198fi
4199
Michael W. Hudson54241132001-12-07 15:38:26 +00004200
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004201 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004202 if test "$unistd_defines_pthreads" = "no"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004203 cat >> confdefs.h <<\EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004204#define _POSIX_THREADS 1
4205EOF
4206
4207 fi
4208
Michael W. Hudson54241132001-12-07 15:38:26 +00004209 echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004210echo "configure:4211: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004211 if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then
4212 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004213else
4214 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004215 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004216else
Michael W. Hudson54241132001-12-07 15:38:26 +00004217 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004218#line 4219 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004219#include "confdefs.h"
4220#include <pthread.h>
4221 void *foo(void *parm) {
4222 return NULL;
4223 }
4224 main() {
4225 pthread_attr_t attr;
4226 if (pthread_attr_init(&attr)) exit(-1);
4227 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
4228 if (pthread_create(NULL, &attr, foo, NULL)) exit(-1);
4229 exit(0);
4230 }
Michael W. Hudson54241132001-12-07 15:38:26 +00004231EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004232if { (eval echo configure:4233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00004233then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004234 ac_cv_pthread_system_supported=yes
4235else
Michael W. Hudson54241132001-12-07 15:38:26 +00004236 echo "configure: failed program was:" >&5
4237 cat conftest.$ac_ext >&5
4238 rm -fr conftest*
4239 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004240fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004241rm -fr conftest*
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004242fi
4243
Michael W. Hudson54241132001-12-07 15:38:26 +00004244
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004245fi
4246
Michael W. Hudson54241132001-12-07 15:38:26 +00004247 echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004248 if test "$ac_cv_pthread_system_supported" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004249 cat >> confdefs.h <<\EOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004250#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
4251EOF
4252
4253 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004254 for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004255do
Michael W. Hudson54241132001-12-07 15:38:26 +00004256echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004257echo "configure:4258: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004258if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4259 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004260else
Michael W. Hudson54241132001-12-07 15:38:26 +00004261 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004262#line 4263 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004263#include "confdefs.h"
4264/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004265 which can conflict with char $ac_func(); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004266#include <assert.h>
4267/* Override any gcc2 internal prototype to avoid an error. */
4268/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004269 builtin and then its argument prototype would still apply. */
4270char $ac_func();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004271
Michael W. Hudson54241132001-12-07 15:38:26 +00004272int main() {
4273
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004274/* The GNU C library defines this for functions which it implements
4275 to always fail with ENOSYS. Some functions are actually named
4276 something starting with __ and the normal name is an alias. */
4277#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4278choke me
4279#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004280$ac_func();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004281#endif
4282
Michael W. Hudson54241132001-12-07 15:38:26 +00004283; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004284EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004285if { (eval echo configure:4286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004286 rm -rf conftest*
4287 eval "ac_cv_func_$ac_func=yes"
4288else
4289 echo "configure: failed program was:" >&5
4290 cat conftest.$ac_ext >&5
4291 rm -rf conftest*
4292 eval "ac_cv_func_$ac_func=no"
4293fi
4294rm -f conftest*
4295fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004296
Michael W. Hudson54241132001-12-07 15:38:26 +00004297if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4298 echo "$ac_t""yes" 1>&6
4299 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4300 cat >> confdefs.h <<EOF
4301#define $ac_tr_func 1
4302EOF
4303
4304else
4305 echo "$ac_t""no" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004306fi
4307done
4308
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004309 fi
4310
Michael W. Hudson54241132001-12-07 15:38:26 +00004311 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004312echo "configure:4313: checking for usconfig in -lmpc" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004313ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
4314if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4315 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004316else
Michael W. Hudson54241132001-12-07 15:38:26 +00004317 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004318LIBS="-lmpc $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004319cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004320#line 4321 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004321#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004322/* Override any gcc2 internal prototype to avoid an error. */
4323/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004324 builtin and then its argument prototype would still apply. */
4325char usconfig();
4326
4327int main() {
4328usconfig()
4329; return 0; }
4330EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004331if { (eval echo configure:4332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004332 rm -rf conftest*
4333 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004334else
Michael W. Hudson54241132001-12-07 15:38:26 +00004335 echo "configure: failed program was:" >&5
4336 cat conftest.$ac_ext >&5
4337 rm -rf conftest*
4338 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004339fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004340rm -f conftest*
4341LIBS="$ac_save_LIBS"
4342
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004343fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004344if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4345 echo "$ac_t""yes" 1>&6
4346 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004347#define WITH_THREAD 1
4348EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004349
Martin v. Löwis130fb172001-07-19 11:00:41 +00004350 LIBS="$LIBS -lmpc"
4351 LIBOBJS="$LIBOBJS thread.o"
4352 USE_THREAD_MODULE=""
Michael W. Hudson54241132001-12-07 15:38:26 +00004353else
4354 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004355fi
4356
Michael W. Hudson54241132001-12-07 15:38:26 +00004357 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004358echo "configure:4359: checking for thr_create in -lthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004359ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
4360if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4361 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004362else
Michael W. Hudson54241132001-12-07 15:38:26 +00004363 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004364LIBS="-lthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004365cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004366#line 4367 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004367#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004368/* Override any gcc2 internal prototype to avoid an error. */
4369/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004370 builtin and then its argument prototype would still apply. */
4371char thr_create();
4372
4373int main() {
4374thr_create()
4375; return 0; }
4376EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004377if { (eval echo configure:4378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004378 rm -rf conftest*
4379 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004380else
Michael W. Hudson54241132001-12-07 15:38:26 +00004381 echo "configure: failed program was:" >&5
4382 cat conftest.$ac_ext >&5
4383 rm -rf conftest*
4384 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004385fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004386rm -f conftest*
4387LIBS="$ac_save_LIBS"
4388
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004389fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004390if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4391 echo "$ac_t""yes" 1>&6
4392 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004393#define WITH_THREAD 1
4394EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004395
Martin v. Löwis130fb172001-07-19 11:00:41 +00004396 LIBS="$LIBS -lthread"
4397 LIBOBJS="$LIBOBJS thread.o"
4398 USE_THREAD_MODULE=""
Michael W. Hudson54241132001-12-07 15:38:26 +00004399else
4400 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004401fi
4402
Michael W. Hudson54241132001-12-07 15:38:26 +00004403
Martin v. Löwis130fb172001-07-19 11:00:41 +00004404 if test "$USE_THREAD_MODULE" != "#"
4405 then
4406 # If the above checks didn't disable threads, (at least) OSF1
4407 # needs this '-threads' argument during linking.
4408 case $ac_sys_system in
4409 OSF1) LDLAST=-threads;;
4410 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004411 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004412fi
4413
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004414# Check for enable-ipv6
Michael W. Hudson54241132001-12-07 15:38:26 +00004415echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004416echo "configure:4417: checking if --enable-ipv6 is specified" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004417# Check whether --enable-ipv6 or --disable-ipv6 was given.
4418if test "${enable_ipv6+set}" = set; then
4419 enableval="$enable_ipv6"
4420 case "$enableval" in
4421 no)
Michael W. Hudson54241132001-12-07 15:38:26 +00004422 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004423 ipv6=no
4424 ;;
Michael W. Hudson54241132001-12-07 15:38:26 +00004425 *) echo "$ac_t""yes" 1>&6
4426 cat >> confdefs.h <<\EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004427#define ENABLE_IPV6 1
4428EOF
4429
4430 ipv6=yes
4431 ;;
Michael W. Hudson54241132001-12-07 15:38:26 +00004432 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004433else
Michael W. Hudson54241132001-12-07 15:38:26 +00004434
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004435 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004436 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004437 ipv6=no
4438
4439else
Michael W. Hudson54241132001-12-07 15:38:26 +00004440 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004441#line 4442 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004442#include "confdefs.h"
4443 /* AF_INET6 available check */
4444#include <sys/types.h>
4445#include <sys/socket.h>
4446main()
4447{
4448 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4449 exit(1);
4450 else
4451 exit(0);
4452}
4453
Michael W. Hudson54241132001-12-07 15:38:26 +00004454EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004455if { (eval echo configure:4456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00004456then
4457 echo "$ac_t""yes" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004458 ipv6=yes
4459else
Michael W. Hudson54241132001-12-07 15:38:26 +00004460 echo "configure: failed program was:" >&5
4461 cat conftest.$ac_ext >&5
4462 rm -fr conftest*
4463 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004464 ipv6=no
4465fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004466rm -fr conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004467fi
4468
Michael W. Hudson54241132001-12-07 15:38:26 +00004469
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004470if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004471 echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004472echo "configure:4473: checking if RFC2553 API is available" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004473 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004474#line 4475 "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004475#include "confdefs.h"
4476#include <sys/types.h>
4477#include <netinet/in.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00004478int main() {
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004479struct sockaddr_in6 x;
4480x.sin6_scope_id;
Michael W. Hudson54241132001-12-07 15:38:26 +00004481; return 0; }
4482EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004483if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004484 rm -rf conftest*
4485 echo "$ac_t""yes" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004486 ipv6=yes
4487else
Michael W. Hudson54241132001-12-07 15:38:26 +00004488 echo "configure: failed program was:" >&5
4489 cat conftest.$ac_ext >&5
4490 rm -rf conftest*
4491 echo "$ac_t""no" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004492 ipv6=no
4493fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004494rm -f conftest*
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004495fi
4496
4497if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004498 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004499#define ENABLE_IPV6 1
4500EOF
4501
4502fi
4503
Michael W. Hudson54241132001-12-07 15:38:26 +00004504fi
4505
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004506
4507ipv6type=unknown
4508ipv6lib=none
4509ipv6trylibc=no
4510
4511if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004512 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004513echo "configure:4514: checking ipv6 stack type" >&5
Guido van Rossumb8552162001-09-05 14:58:11 +00004514 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
4515 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004516 case $i in
4517 inria)
Michael W. Hudson54241132001-12-07 15:38:26 +00004518 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +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 <netinet/in.h>
4523#ifdef IPV6_INRIA_VERSION
4524yes
4525#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004526EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004527if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4528 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004529 rm -rf conftest*
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004530 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004531fi
4532rm -f conftest*
4533
4534 ;;
4535 kame)
Michael W. Hudson54241132001-12-07 15:38:26 +00004536 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004537#line 4538 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004538#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004539
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004540#include <netinet/in.h>
4541#ifdef __KAME__
4542yes
4543#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004544EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004545if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4546 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004547 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004548 ipv6type=$i;
4549 ipv6lib=inet6
4550 ipv6libdir=/usr/local/v6/lib
4551 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004552fi
4553rm -f conftest*
4554
4555 ;;
4556 linux-glibc)
Michael W. Hudson54241132001-12-07 15:38:26 +00004557 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004558#line 4559 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004559#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004560
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004561#include <features.h>
4562#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4563yes
4564#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004565EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004566if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4567 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004568 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004569 ipv6type=$i;
4570 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004571fi
4572rm -f conftest*
4573
4574 ;;
4575 linux-inet6)
4576 if test -d /usr/inet6; then
4577 ipv6type=$i
4578 ipv6lib=inet6
4579 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004580 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004581 fi
4582 ;;
4583 solaris)
4584 if test -f /etc/netconfig; then
4585 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4586 ipv6type=$i
4587 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004588 fi
4589 fi
4590 ;;
4591 toshiba)
Michael W. Hudson54241132001-12-07 15:38:26 +00004592 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004593#line 4594 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004594#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004595
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004596#include <sys/param.h>
4597#ifdef _TOSHIBA_INET6
4598yes
4599#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004600EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004601if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4602 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004603 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004604 ipv6type=$i;
4605 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004606 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004607fi
4608rm -f conftest*
4609
4610 ;;
4611 v6d)
Michael W. Hudson54241132001-12-07 15:38:26 +00004612 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004613#line 4614 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004614#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004615
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004616#include </usr/local/v6/include/sys/v6config.h>
4617#ifdef __V6D__
4618yes
4619#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004620EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004621if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4622 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004623 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004624 ipv6type=$i;
4625 ipv6lib=v6;
4626 ipv6libdir=/usr/local/v6/lib;
4627 OPT="-I/usr/local/v6/include $OPT"
4628fi
4629rm -f conftest*
4630
4631 ;;
4632 zeta)
Michael W. Hudson54241132001-12-07 15:38:26 +00004633 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004634#line 4635 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004635#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004636
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004637#include <sys/param.h>
4638#ifdef _ZETA_MINAMI_INET6
4639yes
4640#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004641EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004642if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4643 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004644 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004645 ipv6type=$i;
4646 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004647 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004648fi
4649rm -f conftest*
4650
4651 ;;
4652 esac
4653 if test "$ipv6type" != "unknown"; then
4654 break
4655 fi
4656 done
Michael W. Hudson54241132001-12-07 15:38:26 +00004657 echo "$ac_t""$ipv6type" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004658fi
4659
4660if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4661 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4662 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4663 echo "using lib$ipv6lib"
4664 else
4665 if test $ipv6trylibc = "yes"; then
4666 echo "using libc"
4667 else
4668 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4669 echo "You need to fetch lib$ipv6lib.a from appropriate"
4670 echo 'ipv6 kit and compile beforehand.'
4671 exit 1
4672 fi
4673 fi
4674fi
4675
Barry Warsawef82cd72000-06-30 16:21:01 +00004676# Check for GC support
Michael W. Hudson54241132001-12-07 15:38:26 +00004677echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004678echo "configure:4679: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004679# Check whether --with-cycle-gc or --without-cycle-gc was given.
4680if test "${with_cycle_gc+set}" = set; then
4681 withval="$with_cycle_gc"
Michael W. Hudson54241132001-12-07 15:38:26 +00004682 :
4683fi
Barry Warsawef82cd72000-06-30 16:21:01 +00004684
4685
4686if test -z "$with_cycle_gc"
4687then with_cycle_gc="yes"
4688fi
Neil Schemenauercf229462001-08-29 23:58:47 +00004689if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +00004690then
Michael W. Hudson54241132001-12-07 15:38:26 +00004691 cat >> confdefs.h <<\EOF
Barry Warsawef82cd72000-06-30 16:21:01 +00004692#define WITH_CYCLE_GC 1
4693EOF
4694
4695fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004696echo "$ac_t""$with_cycle_gc" 1>&6
Barry Warsawef82cd72000-06-30 16:21:01 +00004697
Neil Schemenauera35c6882001-02-27 04:45:05 +00004698# Check for Python-specific malloc support
Michael W. Hudson54241132001-12-07 15:38:26 +00004699echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004700echo "configure:4701: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004701# Check whether --with-pymalloc or --without-pymalloc was given.
4702if test "${with_pymalloc+set}" = set; then
4703 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +00004704
Neil Schemenauera35c6882001-02-27 04:45:05 +00004705if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00004706then cat >> confdefs.h <<\EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004707#define WITH_PYMALLOC 1
4708EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00004709 echo "$ac_t""yes" 1>&6
4710else echo "$ac_t""no" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004711fi
4712else
Michael W. Hudson54241132001-12-07 15:38:26 +00004713 echo "$ac_t""no" 1>&6
4714fi
4715
Neil Schemenauera35c6882001-02-27 04:45:05 +00004716
Barry Warsawef82cd72000-06-30 16:21:01 +00004717# Check for --with-wctype-functions
Michael W. Hudson54241132001-12-07 15:38:26 +00004718echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004719echo "configure:4720: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004720# Check whether --with-wctype-functions or --without-wctype-functions was given.
4721if test "${with_wctype_functions+set}" = set; then
4722 withval="$with_wctype_functions"
Michael W. Hudson54241132001-12-07 15:38:26 +00004723
Barry Warsawef82cd72000-06-30 16:21:01 +00004724if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00004725then cat >> confdefs.h <<\EOF
Barry Warsawef82cd72000-06-30 16:21:01 +00004726#define WANT_WCTYPE_FUNCTIONS 1
4727EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00004728 echo "$ac_t""yes" 1>&6
4729else echo "$ac_t""no" 1>&6
Barry Warsawef82cd72000-06-30 16:21:01 +00004730fi
4731else
Michael W. Hudson54241132001-12-07 15:38:26 +00004732 echo "$ac_t""no" 1>&6
4733fi
4734
Barry Warsawef82cd72000-06-30 16:21:01 +00004735
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004736# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004737
Guido van Rossum98935bf2001-09-05 19:13:16 +00004738DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004739
Michael W. Hudson54241132001-12-07 15:38:26 +00004740echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004741echo "configure:4742: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004742# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004743if test "${with_sgi_dl+set}" = set; then
4744 withval="$with_sgi_dl"
Michael W. Hudson54241132001-12-07 15:38:26 +00004745
4746echo "$ac_t""$withval" 1>&6
4747cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004748#define WITH_SGI_DL 1
4749EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004750
Guido van Rossume97ee181999-12-20 21:27:22 +00004751DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004752dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004753if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004754then LDFLAGS="$LDFLAGS -L$dldir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004755else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004756fi
4757DLINCLDIR=${dldir}
4758LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004759else
Michael W. Hudson54241132001-12-07 15:38:26 +00004760 echo "$ac_t""no" 1>&6
4761fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004762
4763
Michael W. Hudson54241132001-12-07 15:38:26 +00004764echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004765echo "configure:4766: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004766# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004767if test "${with_dl_dld+set}" = set; then
4768 withval="$with_dl_dld"
Michael W. Hudson54241132001-12-07 15:38:26 +00004769
4770echo "$ac_t""$withval" 1>&6
4771cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004772#define WITH_DL_DLD 1
4773EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004774
Guido van Rossume97ee181999-12-20 21:27:22 +00004775DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004776dldir=`echo "$withval" | sed 's/,.*//'`
4777dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004778if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004779then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004780else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004781fi
4782DLINCLDIR=${dldir}
4783LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004784else
Michael W. Hudson54241132001-12-07 15:38:26 +00004785 echo "$ac_t""no" 1>&6
4786fi
4787
Guido van Rossum7f43da71994-08-01 12:15:30 +00004788
Guido van Rossume97ee181999-12-20 21:27:22 +00004789# the dlopen() function means we might want to use dynload_shlib.o. some
4790# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004791for ac_func in dlopen
4792do
Michael W. Hudson54241132001-12-07 15:38:26 +00004793echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004794echo "configure:4795: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004795if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4796 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004797else
Michael W. Hudson54241132001-12-07 15:38:26 +00004798 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004799#line 4800 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004800#include "confdefs.h"
4801/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004802 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004803#include <assert.h>
4804/* Override any gcc2 internal prototype to avoid an error. */
4805/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004806 builtin and then its argument prototype would still apply. */
4807char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004808
Michael W. Hudson54241132001-12-07 15:38:26 +00004809int main() {
4810
Guido van Rossume97ee181999-12-20 21:27:22 +00004811/* The GNU C library defines this for functions which it implements
4812 to always fail with ENOSYS. Some functions are actually named
4813 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004814#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004815choke me
4816#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004817$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004818#endif
4819
Michael W. Hudson54241132001-12-07 15:38:26 +00004820; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004821EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004822if { (eval echo configure:4823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004823 rm -rf conftest*
4824 eval "ac_cv_func_$ac_func=yes"
4825else
4826 echo "configure: failed program was:" >&5
4827 cat conftest.$ac_ext >&5
4828 rm -rf conftest*
4829 eval "ac_cv_func_$ac_func=no"
4830fi
4831rm -f conftest*
4832fi
Guido van Rossume97ee181999-12-20 21:27:22 +00004833
Michael W. Hudson54241132001-12-07 15:38:26 +00004834if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4835 echo "$ac_t""yes" 1>&6
4836 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4837 cat >> confdefs.h <<EOF
4838#define $ac_tr_func 1
4839EOF
4840
4841else
4842 echo "$ac_t""no" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004843fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004844done
Guido van Rossume97ee181999-12-20 21:27:22 +00004845
Michael W. Hudson54241132001-12-07 15:38:26 +00004846
Guido van Rossume97ee181999-12-20 21:27:22 +00004847# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4848# loading of modules.
4849
Michael W. Hudson54241132001-12-07 15:38:26 +00004850echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004851echo "configure:4852: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004852if test -z "$DYNLOADFILE"
4853then
4854 case $ac_sys_system/$ac_sys_release in
4855 AIX*) DYNLOADFILE="dynload_aix.o";;
4856 BeOS*) DYNLOADFILE="dynload_beos.o";;
4857 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004858 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004859 *)
4860 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4861 # out any dynamic loading
4862 if test "$ac_cv_func_dlopen" = yes
4863 then DYNLOADFILE="dynload_shlib.o"
4864 else DYNLOADFILE="dynload_stub.o"
4865 fi
4866 ;;
4867 esac
4868fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004869echo "$ac_t""$DYNLOADFILE" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004870if test "$DYNLOADFILE" != "dynload_stub.o"
4871then
Michael W. Hudson54241132001-12-07 15:38:26 +00004872 cat >> confdefs.h <<\EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004873#define HAVE_DYNAMIC_LOADING 1
4874EOF
4875
4876fi
4877
Neil Schemenauer4e425612001-06-19 15:44:15 +00004878# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4879
Michael W. Hudson54241132001-12-07 15:38:26 +00004880
4881echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004882echo "configure:4883: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004883if test -z "$MACHDEP_OBJS"
4884then
Jack Jansene578a632001-08-15 01:27:14 +00004885 MACHDEP_OBJS=$extra_machdep_objs
4886else
4887 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004888fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004889echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004890
Guido van Rossum627b2d71993-12-24 10:39:16 +00004891# checks for library functions
Martin v. Löwis244edc82001-10-04 22:44:26 +00004892for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004893 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00004894 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis864e9ff2001-08-04 22:32:03 +00004895 hstrerror inet_pton kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004896 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004897 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +00004898 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004899 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004900 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004901 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +00004902 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004903do
Michael W. Hudson54241132001-12-07 15:38:26 +00004904echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004905echo "configure:4906: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004906if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4907 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004908else
Michael W. Hudson54241132001-12-07 15:38:26 +00004909 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004910#line 4911 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004911#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004912/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004913 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004914#include <assert.h>
4915/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004916/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004917 builtin and then its argument prototype would still apply. */
4918char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004919
Michael W. Hudson54241132001-12-07 15:38:26 +00004920int main() {
4921
Guido van Rossum627b2d71993-12-24 10:39:16 +00004922/* The GNU C library defines this for functions which it implements
4923 to always fail with ENOSYS. Some functions are actually named
4924 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004925#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004926choke me
4927#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004928$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004929#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004930
Michael W. Hudson54241132001-12-07 15:38:26 +00004931; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004932EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004933if { (eval echo configure:4934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004934 rm -rf conftest*
4935 eval "ac_cv_func_$ac_func=yes"
4936else
4937 echo "configure: failed program was:" >&5
4938 cat conftest.$ac_ext >&5
4939 rm -rf conftest*
4940 eval "ac_cv_func_$ac_func=no"
4941fi
4942rm -f conftest*
4943fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00004944
Michael W. Hudson54241132001-12-07 15:38:26 +00004945if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4946 echo "$ac_t""yes" 1>&6
4947 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4948 cat >> confdefs.h <<EOF
4949#define $ac_tr_func 1
4950EOF
4951
4952else
4953 echo "$ac_t""no" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004954fi
4955done
4956
Michael W. Hudson54241132001-12-07 15:38:26 +00004957
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004958# check for openpty and forkpty
4959
4960for ac_func in openpty
4961do
Michael W. Hudson54241132001-12-07 15:38:26 +00004962echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004963echo "configure:4964: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004964if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4965 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004966else
Michael W. Hudson54241132001-12-07 15:38:26 +00004967 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004968#line 4969 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004969#include "confdefs.h"
4970/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004971 which can conflict with char $ac_func(); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004972#include <assert.h>
4973/* Override any gcc2 internal prototype to avoid an error. */
4974/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004975 builtin and then its argument prototype would still apply. */
4976char $ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004977
Michael W. Hudson54241132001-12-07 15:38:26 +00004978int main() {
4979
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004980/* The GNU C library defines this for functions which it implements
4981 to always fail with ENOSYS. Some functions are actually named
4982 something starting with __ and the normal name is an alias. */
4983#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4984choke me
4985#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004986$ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004987#endif
4988
Michael W. Hudson54241132001-12-07 15:38:26 +00004989; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004990EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00004991if { (eval echo configure:4992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004992 rm -rf conftest*
4993 eval "ac_cv_func_$ac_func=yes"
4994else
4995 echo "configure: failed program was:" >&5
4996 cat conftest.$ac_ext >&5
4997 rm -rf conftest*
4998 eval "ac_cv_func_$ac_func=no"
4999fi
5000rm -f conftest*
5001fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005002
Michael W. Hudson54241132001-12-07 15:38:26 +00005003if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5004 echo "$ac_t""yes" 1>&6
5005 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5006 cat >> confdefs.h <<EOF
5007#define $ac_tr_func 1
5008EOF
5009
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005010else
Michael W. Hudson54241132001-12-07 15:38:26 +00005011 echo "$ac_t""no" 1>&6
5012echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005013echo "configure:5014: checking for openpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005014ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
5015if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5016 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005017else
Michael W. Hudson54241132001-12-07 15:38:26 +00005018 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005019LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005020cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005021#line 5022 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005022#include "confdefs.h"
5023/* Override any gcc2 internal prototype to avoid an error. */
5024/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005025 builtin and then its argument prototype would still apply. */
5026char openpty();
5027
5028int main() {
5029openpty()
5030; return 0; }
5031EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005032if { (eval echo configure:5033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005033 rm -rf conftest*
5034 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005035else
Michael W. Hudson54241132001-12-07 15:38:26 +00005036 echo "configure: failed program was:" >&5
5037 cat conftest.$ac_ext >&5
5038 rm -rf conftest*
5039 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005040fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005041rm -f conftest*
5042LIBS="$ac_save_LIBS"
5043
Fred Drake8cef4cf2000-06-28 16:40:38 +00005044fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005045if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5046 echo "$ac_t""yes" 1>&6
5047 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005048#define HAVE_OPENPTY 1
5049EOF
5050 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005051else
5052 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005053fi
5054
5055fi
5056done
5057
5058for ac_func in forkpty
5059do
Michael W. Hudson54241132001-12-07 15:38:26 +00005060echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005061echo "configure:5062: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005062if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5063 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005064else
Michael W. Hudson54241132001-12-07 15:38:26 +00005065 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005066#line 5067 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005067#include "confdefs.h"
5068/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005069 which can conflict with char $ac_func(); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +00005070#include <assert.h>
5071/* Override any gcc2 internal prototype to avoid an error. */
5072/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005073 builtin and then its argument prototype would still apply. */
5074char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005075
Michael W. Hudson54241132001-12-07 15:38:26 +00005076int main() {
5077
Fred Drake8cef4cf2000-06-28 16:40:38 +00005078/* The GNU C library defines this for functions which it implements
5079 to always fail with ENOSYS. Some functions are actually named
5080 something starting with __ and the normal name is an alias. */
5081#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5082choke me
5083#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005084$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005085#endif
5086
Michael W. Hudson54241132001-12-07 15:38:26 +00005087; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005088EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005089if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005090 rm -rf conftest*
5091 eval "ac_cv_func_$ac_func=yes"
5092else
5093 echo "configure: failed program was:" >&5
5094 cat conftest.$ac_ext >&5
5095 rm -rf conftest*
5096 eval "ac_cv_func_$ac_func=no"
5097fi
5098rm -f conftest*
5099fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00005100
Michael W. Hudson54241132001-12-07 15:38:26 +00005101if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5102 echo "$ac_t""yes" 1>&6
5103 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5104 cat >> confdefs.h <<EOF
5105#define $ac_tr_func 1
5106EOF
5107
Fred Drake8cef4cf2000-06-28 16:40:38 +00005108else
Michael W. Hudson54241132001-12-07 15:38:26 +00005109 echo "$ac_t""no" 1>&6
5110echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005111echo "configure:5112: checking for forkpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005112ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
5113if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5114 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005115else
Michael W. Hudson54241132001-12-07 15:38:26 +00005116 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005117LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005118cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005119#line 5120 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005120#include "confdefs.h"
5121/* Override any gcc2 internal prototype to avoid an error. */
5122/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005123 builtin and then its argument prototype would still apply. */
5124char forkpty();
5125
5126int main() {
5127forkpty()
5128; return 0; }
5129EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005130if { (eval echo configure:5131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005131 rm -rf conftest*
5132 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005133else
Michael W. Hudson54241132001-12-07 15:38:26 +00005134 echo "configure: failed program was:" >&5
5135 cat conftest.$ac_ext >&5
5136 rm -rf conftest*
5137 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005138fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005139rm -f conftest*
5140LIBS="$ac_save_LIBS"
5141
Fred Drake8cef4cf2000-06-28 16:40:38 +00005142fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005143if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5144 echo "$ac_t""yes" 1>&6
5145 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005146#define HAVE_FORKPTY 1
5147EOF
5148 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005149else
5150 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005151fi
5152
5153fi
5154done
5155
Jack Jansendd19cf82001-12-06 22:36:17 +00005156
Michael W. Hudson54241132001-12-07 15:38:26 +00005157# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +00005158for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
5159do
Michael W. Hudson54241132001-12-07 15:38:26 +00005160echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005161echo "configure:5162: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005162if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5163 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005164else
Michael W. Hudson54241132001-12-07 15:38:26 +00005165 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005166#line 5167 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005167#include "confdefs.h"
5168/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005169 which can conflict with char $ac_func(); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +00005170#include <assert.h>
5171/* Override any gcc2 internal prototype to avoid an error. */
5172/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005173 builtin and then its argument prototype would still apply. */
5174char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005175
Michael W. Hudson54241132001-12-07 15:38:26 +00005176int main() {
5177
Fred Drake8cef4cf2000-06-28 16:40:38 +00005178/* The GNU C library defines this for functions which it implements
5179 to always fail with ENOSYS. Some functions are actually named
5180 something starting with __ and the normal name is an alias. */
5181#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5182choke me
5183#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005184$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005185#endif
5186
Michael W. Hudson54241132001-12-07 15:38:26 +00005187; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005188EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005189if { (eval echo configure:5190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005190 rm -rf conftest*
5191 eval "ac_cv_func_$ac_func=yes"
5192else
5193 echo "configure: failed program was:" >&5
5194 cat conftest.$ac_ext >&5
5195 rm -rf conftest*
5196 eval "ac_cv_func_$ac_func=no"
5197fi
5198rm -f conftest*
5199fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005200
Michael W. Hudson54241132001-12-07 15:38:26 +00005201if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5202 echo "$ac_t""yes" 1>&6
5203 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5204 cat >> confdefs.h <<EOF
5205#define $ac_tr_func 1
5206EOF
5207
5208else
5209 echo "$ac_t""no" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005210fi
5211done
5212
Michael W. Hudson54241132001-12-07 15:38:26 +00005213
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005214for ac_func in dup2 getcwd strdup strerror memmove
5215do
Michael W. Hudson54241132001-12-07 15:38:26 +00005216echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005217echo "configure:5218: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005218if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5219 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005220else
Michael W. Hudson54241132001-12-07 15:38:26 +00005221 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005222#line 5223 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005223#include "confdefs.h"
5224/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005225 which can conflict with char $ac_func(); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005226#include <assert.h>
5227/* Override any gcc2 internal prototype to avoid an error. */
5228/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005229 builtin and then its argument prototype would still apply. */
5230char $ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005231
Michael W. Hudson54241132001-12-07 15:38:26 +00005232int main() {
5233
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005234/* The GNU C library defines this for functions which it implements
5235 to always fail with ENOSYS. Some functions are actually named
5236 something starting with __ and the normal name is an alias. */
5237#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5238choke me
5239#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005240$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005241#endif
5242
Michael W. Hudson54241132001-12-07 15:38:26 +00005243; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005244EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005245if { (eval echo configure:5246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005246 rm -rf conftest*
5247 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005248else
Michael W. Hudson54241132001-12-07 15:38:26 +00005249 echo "configure: failed program was:" >&5
5250 cat conftest.$ac_ext >&5
5251 rm -rf conftest*
5252 eval "ac_cv_func_$ac_func=no"
5253fi
5254rm -f conftest*
5255fi
5256
5257if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5258 echo "$ac_t""yes" 1>&6
5259 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5260 cat >> confdefs.h <<EOF
5261#define $ac_tr_func 1
5262EOF
5263
5264else
5265 echo "$ac_t""no" 1>&6
5266LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005267fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005268done
5269
Michael W. Hudson54241132001-12-07 15:38:26 +00005270
Thomas Wouters3a584202000-08-05 23:28:51 +00005271for ac_func in getpgrp
5272do
Michael W. Hudson54241132001-12-07 15:38:26 +00005273echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005274echo "configure:5275: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005275if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5276 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005277else
Michael W. Hudson54241132001-12-07 15:38:26 +00005278 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005279#line 5280 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005280#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005281/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005282 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005283#include <assert.h>
5284/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005285/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005286 builtin and then its argument prototype would still apply. */
5287char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005288
Michael W. Hudson54241132001-12-07 15:38:26 +00005289int main() {
5290
Guido van Rossum627b2d71993-12-24 10:39:16 +00005291/* The GNU C library defines this for functions which it implements
5292 to always fail with ENOSYS. Some functions are actually named
5293 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005294#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005295choke me
5296#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005297$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005298#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005299
Michael W. Hudson54241132001-12-07 15:38:26 +00005300; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005301EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005302if { (eval echo configure:5303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005303 rm -rf conftest*
5304 eval "ac_cv_func_$ac_func=yes"
5305else
5306 echo "configure: failed program was:" >&5
5307 cat conftest.$ac_ext >&5
5308 rm -rf conftest*
5309 eval "ac_cv_func_$ac_func=no"
5310fi
5311rm -f conftest*
5312fi
5313
5314if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5315 echo "$ac_t""yes" 1>&6
5316 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5317 cat >> confdefs.h <<EOF
5318#define $ac_tr_func 1
5319EOF
5320 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005321#line 5322 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005322#include "confdefs.h"
5323#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005324int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005325getpgrp(0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005326; return 0; }
5327EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005328if { (eval echo configure:5329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005329 rm -rf conftest*
5330 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005331#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005332EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005333
Guido van Rossumf78abae1997-01-21 22:02:36 +00005334else
Michael W. Hudson54241132001-12-07 15:38:26 +00005335 echo "configure: failed program was:" >&5
5336 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005337fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005338rm -f conftest*
5339else
5340 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005341fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005342done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005343
Thomas Wouters3a584202000-08-05 23:28:51 +00005344for ac_func in setpgrp
5345do
Michael W. Hudson54241132001-12-07 15:38:26 +00005346echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005347echo "configure:5348: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005348if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5349 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005350else
Michael W. Hudson54241132001-12-07 15:38:26 +00005351 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005352#line 5353 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005353#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005354/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005355 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005356#include <assert.h>
5357/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005358/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005359 builtin and then its argument prototype would still apply. */
5360char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005361
Michael W. Hudson54241132001-12-07 15:38:26 +00005362int main() {
5363
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005364/* The GNU C library defines this for functions which it implements
5365 to always fail with ENOSYS. Some functions are actually named
5366 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005367#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005368choke me
5369#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005370$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005371#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005372
Michael W. Hudson54241132001-12-07 15:38:26 +00005373; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005374EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005375if { (eval echo configure:5376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005376 rm -rf conftest*
5377 eval "ac_cv_func_$ac_func=yes"
5378else
5379 echo "configure: failed program was:" >&5
5380 cat conftest.$ac_ext >&5
5381 rm -rf conftest*
5382 eval "ac_cv_func_$ac_func=no"
5383fi
5384rm -f conftest*
5385fi
5386
5387if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5388 echo "$ac_t""yes" 1>&6
5389 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5390 cat >> confdefs.h <<EOF
5391#define $ac_tr_func 1
5392EOF
5393 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005394#line 5395 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005395#include "confdefs.h"
5396#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005397int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005398setpgrp(0,0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005399; return 0; }
5400EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005401if { (eval echo configure:5402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005402 rm -rf conftest*
5403 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005404#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005405EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005406
Guido van Rossumf78abae1997-01-21 22:02:36 +00005407else
Michael W. Hudson54241132001-12-07 15:38:26 +00005408 echo "configure: failed program was:" >&5
5409 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005410fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005411rm -f conftest*
5412else
5413 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005414fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005415done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005416
Thomas Wouters3a584202000-08-05 23:28:51 +00005417for ac_func in gettimeofday
5418do
Michael W. Hudson54241132001-12-07 15:38:26 +00005419echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005420echo "configure:5421: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005421if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5422 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005423else
Michael W. Hudson54241132001-12-07 15:38:26 +00005424 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005425#line 5426 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005426#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005427/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005428 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005429#include <assert.h>
5430/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005431/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005432 builtin and then its argument prototype would still apply. */
5433char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005434
Michael W. Hudson54241132001-12-07 15:38:26 +00005435int main() {
5436
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005437/* The GNU C library defines this for functions which it implements
5438 to always fail with ENOSYS. Some functions are actually named
5439 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005440#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005441choke me
5442#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005443$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005444#endif
5445
Michael W. Hudson54241132001-12-07 15:38:26 +00005446; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005447EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005448if { (eval echo configure:5449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005449 rm -rf conftest*
5450 eval "ac_cv_func_$ac_func=yes"
5451else
5452 echo "configure: failed program was:" >&5
5453 cat conftest.$ac_ext >&5
5454 rm -rf conftest*
5455 eval "ac_cv_func_$ac_func=no"
5456fi
5457rm -f conftest*
5458fi
5459
5460if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5461 echo "$ac_t""yes" 1>&6
5462 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5463 cat >> confdefs.h <<EOF
5464#define $ac_tr_func 1
5465EOF
5466 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005467#line 5468 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005468#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005469#include <sys/time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005470int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005471gettimeofday((struct timeval*)0,(struct timezone*)0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005472; return 0; }
5473EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005474if { (eval echo configure:5475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005475 :
5476else
Michael W. Hudson54241132001-12-07 15:38:26 +00005477 echo "configure: failed program was:" >&5
5478 cat conftest.$ac_ext >&5
5479 rm -rf conftest*
5480 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005481#define GETTIMEOFDAY_NO_TZ 1
5482EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005483
5484fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005485rm -f conftest*
5486else
5487 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005488fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005489done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005490
Michael W. Hudson54241132001-12-07 15:38:26 +00005491
5492
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005493# On OSF/1 V5.1, getaddrinfo is available, but a define
Michael W. Hudson54241132001-12-07 15:38:26 +00005494# for [no]getaddrinfo in netdb.h.
5495echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005496echo "configure:5497: checking for getaddrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005497cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005498#line 5499 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005499#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005500
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005501#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005502#include <sys/socket.h>
5503#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005504#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005505
Michael W. Hudson54241132001-12-07 15:38:26 +00005506int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005507
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005508getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005509
Michael W. Hudson54241132001-12-07 15:38:26 +00005510; return 0; }
5511EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005512if { (eval echo configure:5513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005513 rm -rf conftest*
5514
5515echo "$ac_t""yes" 1>&6
5516echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005517echo "configure:5518: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005518if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005519 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005520buggygetaddrinfo=yes
5521else
Michael W. Hudson54241132001-12-07 15:38:26 +00005522 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005523#line 5524 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005524#include "confdefs.h"
5525
5526#include <sys/types.h>
5527#include <netdb.h>
5528#include <string.h>
5529#include <sys/socket.h>
5530#include <netinet/in.h>
5531
5532main()
5533{
5534 int passive, gaierr, inet4 = 0, inet6 = 0;
5535 struct addrinfo hints, *ai, *aitop;
5536 char straddr[INET6_ADDRSTRLEN], strport[16];
5537
5538 for (passive = 0; passive <= 1; passive++) {
5539 memset(&hints, 0, sizeof(hints));
5540 hints.ai_family = AF_UNSPEC;
5541 hints.ai_flags = passive ? AI_PASSIVE : 0;
5542 hints.ai_socktype = SOCK_STREAM;
5543 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5544 (void)gai_strerror(gaierr);
5545 goto bad;
5546 }
5547 for (ai = aitop; ai; ai = ai->ai_next) {
5548 if (ai->ai_addr == NULL ||
5549 ai->ai_addrlen == 0 ||
5550 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5551 straddr, sizeof(straddr), strport, sizeof(strport),
5552 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5553 goto bad;
5554 }
5555 switch (ai->ai_family) {
5556 case AF_INET:
5557 if (strcmp(strport, "54321") != 0) {
5558 goto bad;
5559 }
5560 if (passive) {
5561 if (strcmp(straddr, "0.0.0.0") != 0) {
5562 goto bad;
5563 }
5564 } else {
5565 if (strcmp(straddr, "127.0.0.1") != 0) {
5566 goto bad;
5567 }
5568 }
5569 inet4++;
5570 break;
5571 case AF_INET6:
5572 if (strcmp(strport, "54321") != 0) {
5573 goto bad;
5574 }
5575 if (passive) {
5576 if (strcmp(straddr, "::") != 0) {
5577 goto bad;
5578 }
5579 } else {
5580 if (strcmp(straddr, "::1") != 0) {
5581 goto bad;
5582 }
5583 }
5584 inet6++;
5585 break;
5586 case AF_UNSPEC:
5587 goto bad;
5588 break;
5589 default:
5590 /* another family support? */
5591 break;
5592 }
5593 }
5594 }
5595
5596 if (!(inet4 == 0 || inet4 == 2))
5597 goto bad;
5598 if (!(inet6 == 0 || inet6 == 2))
5599 goto bad;
5600
5601 if (aitop)
5602 freeaddrinfo(aitop);
5603 exit(0);
5604
5605 bad:
5606 if (aitop)
5607 freeaddrinfo(aitop);
5608 exit(1);
5609}
5610
Michael W. Hudson54241132001-12-07 15:38:26 +00005611EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005612if { (eval echo configure:5613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00005613then
5614 echo "$ac_t""good" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005615buggygetaddrinfo=no
5616else
Michael W. Hudson54241132001-12-07 15:38:26 +00005617 echo "configure: failed program was:" >&5
5618 cat conftest.$ac_ext >&5
5619 rm -fr conftest*
5620 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005621buggygetaddrinfo=yes
5622fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005623rm -fr conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005624fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005625
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005626else
Michael W. Hudson54241132001-12-07 15:38:26 +00005627 echo "configure: failed program was:" >&5
5628 cat conftest.$ac_ext >&5
5629 rm -rf conftest*
5630
5631echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005632buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005633
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005634fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005635rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005636
5637if test "$buggygetaddrinfo" = "yes"; then
5638 if test "$ipv6" = "yes"; then
5639 echo 'Fatal: You must get working getaddrinfo() function.'
5640 echo ' or you can specify "--disable-ipv6"'.
5641 exit 1
5642 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005643else
Michael W. Hudson54241132001-12-07 15:38:26 +00005644 cat >> confdefs.h <<\EOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005645#define HAVE_GETADDRINFO 1
5646EOF
5647
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005648fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005649for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005650do
Michael W. Hudson54241132001-12-07 15:38:26 +00005651echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005652echo "configure:5653: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005653if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5654 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005655else
Michael W. Hudson54241132001-12-07 15:38:26 +00005656 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005657#line 5658 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005658#include "confdefs.h"
5659/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005660 which can conflict with char $ac_func(); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005661#include <assert.h>
5662/* Override any gcc2 internal prototype to avoid an error. */
5663/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005664 builtin and then its argument prototype would still apply. */
5665char $ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005666
Michael W. Hudson54241132001-12-07 15:38:26 +00005667int main() {
5668
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005669/* The GNU C library defines this for functions which it implements
5670 to always fail with ENOSYS. Some functions are actually named
5671 something starting with __ and the normal name is an alias. */
5672#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5673choke me
5674#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005675$ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005676#endif
5677
Michael W. Hudson54241132001-12-07 15:38:26 +00005678; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005679EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005680if { (eval echo configure:5681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005681 rm -rf conftest*
5682 eval "ac_cv_func_$ac_func=yes"
5683else
5684 echo "configure: failed program was:" >&5
5685 cat conftest.$ac_ext >&5
5686 rm -rf conftest*
5687 eval "ac_cv_func_$ac_func=no"
5688fi
5689rm -f conftest*
5690fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005691
Michael W. Hudson54241132001-12-07 15:38:26 +00005692if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5693 echo "$ac_t""yes" 1>&6
5694 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5695 cat >> confdefs.h <<EOF
5696#define $ac_tr_func 1
5697EOF
5698
5699else
5700 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005701fi
5702done
5703
Michael W. Hudson54241132001-12-07 15:38:26 +00005704
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005705# checks for structures
Michael W. Hudson54241132001-12-07 15:38:26 +00005706echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005707echo "configure:5708: checking whether time.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005708if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5709 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005710else
Michael W. Hudson54241132001-12-07 15:38:26 +00005711 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005712#line 5713 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005713#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005714#include <sys/types.h>
5715#include <sys/time.h>
5716#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005717int main() {
5718struct tm *tp;
5719; return 0; }
5720EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005721if { (eval echo configure:5722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005722 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005723 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005724else
Michael W. Hudson54241132001-12-07 15:38:26 +00005725 echo "configure: failed program was:" >&5
5726 cat conftest.$ac_ext >&5
5727 rm -rf conftest*
5728 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005729fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005730rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005731fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005732
Michael W. Hudson54241132001-12-07 15:38:26 +00005733echo "$ac_t""$ac_cv_header_time" 1>&6
5734if test $ac_cv_header_time = yes; then
5735 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005736#define TIME_WITH_SYS_TIME 1
5737EOF
5738
5739fi
5740
Michael W. Hudson54241132001-12-07 15:38:26 +00005741echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005742echo "configure:5743: checking whether struct tm is in sys/time.h or time.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005743if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5744 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005745else
Michael W. Hudson54241132001-12-07 15:38:26 +00005746 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005747#line 5748 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005748#include "confdefs.h"
5749#include <sys/types.h>
5750#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005751int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005752struct tm *tp; tp->tm_sec;
Michael W. Hudson54241132001-12-07 15:38:26 +00005753; return 0; }
5754EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005755if { (eval echo configure:5756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005756 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005757 ac_cv_struct_tm=time.h
5758else
Michael W. Hudson54241132001-12-07 15:38:26 +00005759 echo "configure: failed program was:" >&5
5760 cat conftest.$ac_ext >&5
5761 rm -rf conftest*
5762 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005763fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005764rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005765fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005766
Michael W. Hudson54241132001-12-07 15:38:26 +00005767echo "$ac_t""$ac_cv_struct_tm" 1>&6
5768if test $ac_cv_struct_tm = sys/time.h; then
5769 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005770#define TM_IN_SYS_TIME 1
5771EOF
5772
5773fi
5774
Michael W. Hudson54241132001-12-07 15:38:26 +00005775echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005776echo "configure:5777: checking for tm_zone in struct tm" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005777if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5778 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005779else
Michael W. Hudson54241132001-12-07 15:38:26 +00005780 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005781#line 5782 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005782#include "confdefs.h"
5783#include <sys/types.h>
5784#include <$ac_cv_struct_tm>
Michael W. Hudson54241132001-12-07 15:38:26 +00005785int main() {
5786struct tm tm; tm.tm_zone;
5787; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005788EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005789if { (eval echo configure:5790: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005790 rm -rf conftest*
5791 ac_cv_struct_tm_zone=yes
5792else
5793 echo "configure: failed program was:" >&5
5794 cat conftest.$ac_ext >&5
5795 rm -rf conftest*
5796 ac_cv_struct_tm_zone=no
5797fi
5798rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005799fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005800
Michael W. Hudson54241132001-12-07 15:38:26 +00005801echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5802if test "$ac_cv_struct_tm_zone" = yes; then
5803 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005804#define HAVE_TM_ZONE 1
5805EOF
5806
5807else
Michael W. Hudson54241132001-12-07 15:38:26 +00005808 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005809echo "configure:5810: checking for tzname" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005810if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5811 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005812else
Michael W. Hudson54241132001-12-07 15:38:26 +00005813 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005814#line 5815 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005815#include "confdefs.h"
5816#include <time.h>
5817#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005818extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005819#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005820int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005821atoi(*tzname);
Michael W. Hudson54241132001-12-07 15:38:26 +00005822; return 0; }
5823EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005824if { (eval echo configure:5825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005825 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005826 ac_cv_var_tzname=yes
5827else
Michael W. Hudson54241132001-12-07 15:38:26 +00005828 echo "configure: failed program was:" >&5
5829 cat conftest.$ac_ext >&5
5830 rm -rf conftest*
5831 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005832fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005833rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005834fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005835
Michael W. Hudson54241132001-12-07 15:38:26 +00005836echo "$ac_t""$ac_cv_var_tzname" 1>&6
5837 if test $ac_cv_var_tzname = yes; then
5838 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005839#define HAVE_TZNAME 1
5840EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005841
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005842 fi
5843fi
5844
Michael W. Hudson54241132001-12-07 15:38:26 +00005845echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005846echo "configure:5847: checking for st_rdev in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005847if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
5848 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005849else
Michael W. Hudson54241132001-12-07 15:38:26 +00005850 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005851#line 5852 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005852#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005853#include <sys/types.h>
5854#include <sys/stat.h>
5855int main() {
5856struct stat s; s.st_rdev;
5857; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005858EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005859if { (eval echo configure:5860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005860 rm -rf conftest*
5861 ac_cv_struct_st_rdev=yes
5862else
5863 echo "configure: failed program was:" >&5
5864 cat conftest.$ac_ext >&5
5865 rm -rf conftest*
5866 ac_cv_struct_st_rdev=no
5867fi
5868rm -f conftest*
5869fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005870
Michael W. Hudson54241132001-12-07 15:38:26 +00005871echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
5872if test $ac_cv_struct_st_rdev = yes; then
5873 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005874#define HAVE_ST_RDEV 1
5875EOF
5876
5877fi
5878
Michael W. Hudson54241132001-12-07 15:38:26 +00005879echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005880echo "configure:5881: checking for st_blksize in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005881if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
5882 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005883else
Michael W. Hudson54241132001-12-07 15:38:26 +00005884 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005885#line 5886 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005886#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005887#include <sys/types.h>
5888#include <sys/stat.h>
5889int main() {
5890struct stat s; s.st_blksize;
5891; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005892EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005893if { (eval echo configure:5894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005894 rm -rf conftest*
5895 ac_cv_struct_st_blksize=yes
5896else
5897 echo "configure: failed program was:" >&5
5898 cat conftest.$ac_ext >&5
5899 rm -rf conftest*
5900 ac_cv_struct_st_blksize=no
5901fi
5902rm -f conftest*
5903fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005904
Michael W. Hudson54241132001-12-07 15:38:26 +00005905echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
5906if test $ac_cv_struct_st_blksize = yes; then
5907 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005908#define HAVE_ST_BLKSIZE 1
5909EOF
5910
5911fi
5912
Michael W. Hudson54241132001-12-07 15:38:26 +00005913echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005914echo "configure:5915: checking for st_blocks in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005915if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
5916 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005917else
Michael W. Hudson54241132001-12-07 15:38:26 +00005918 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005919#line 5920 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005920#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005921#include <sys/types.h>
5922#include <sys/stat.h>
5923int main() {
5924struct stat s; s.st_blocks;
5925; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005926EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005927if { (eval echo configure:5928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005928 rm -rf conftest*
5929 ac_cv_struct_st_blocks=yes
5930else
5931 echo "configure: failed program was:" >&5
5932 cat conftest.$ac_ext >&5
5933 rm -rf conftest*
5934 ac_cv_struct_st_blocks=no
5935fi
5936rm -f conftest*
5937fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005938
Michael W. Hudson54241132001-12-07 15:38:26 +00005939echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
5940if test $ac_cv_struct_st_blocks = yes; then
5941 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005942#define HAVE_ST_BLOCKS 1
5943EOF
5944
5945else
Michael W. Hudson54241132001-12-07 15:38:26 +00005946 LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005947fi
5948
Michael W. Hudson54241132001-12-07 15:38:26 +00005949
5950echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005951echo "configure:5952: checking for time.h that defines altzone" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005952if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
5953 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005954else
Michael W. Hudson54241132001-12-07 15:38:26 +00005955 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005956#line 5957 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005957#include "confdefs.h"
5958#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005959int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005960return altzone;
Michael W. Hudson54241132001-12-07 15:38:26 +00005961; return 0; }
5962EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005963if { (eval echo configure:5964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005964 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005965 ac_cv_header_time_altzone=yes
5966else
Michael W. Hudson54241132001-12-07 15:38:26 +00005967 echo "configure: failed program was:" >&5
5968 cat conftest.$ac_ext >&5
5969 rm -rf conftest*
5970 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005971fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005972rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005973fi
5974
Michael W. Hudson54241132001-12-07 15:38:26 +00005975echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005976if test $ac_cv_header_time_altzone = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005977 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005978#define HAVE_ALTZONE 1
5979EOF
5980
5981fi
5982
Guido van Rossumda88dad1995-01-26 00:46:29 +00005983was_it_defined=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005984echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005985echo "configure:5986: checking whether sys/select.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005986cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005987#line 5988 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005988#include "confdefs.h"
5989
5990#include <sys/types.h>
5991#include <sys/select.h>
5992#include <sys/time.h>
5993
Michael W. Hudson54241132001-12-07 15:38:26 +00005994int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005995;
Michael W. Hudson54241132001-12-07 15:38:26 +00005996; return 0; }
5997EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00005998if { (eval echo configure:5999: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005999 rm -rf conftest*
6000 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006001#define SYS_SELECT_WITH_SYS_TIME 1
6002EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006003 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006004else
Michael W. Hudson54241132001-12-07 15:38:26 +00006005 echo "configure: failed program was:" >&5
6006 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006007fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006008rm -f conftest*
6009echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006010
Michael W. Hudson54241132001-12-07 15:38:26 +00006011echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006012echo "configure:6013: checking for addrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006013if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
6014 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006015else
Michael W. Hudson54241132001-12-07 15:38:26 +00006016 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006017#line 6018 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006018#include "confdefs.h"
6019
6020# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006021int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006022struct addrinfo a
Michael W. Hudson54241132001-12-07 15:38:26 +00006023; return 0; }
6024EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006025if { (eval echo configure:6026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006026 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006027 ac_cv_struct_addrinfo=yes
6028else
Michael W. Hudson54241132001-12-07 15:38:26 +00006029 echo "configure: failed program was:" >&5
6030 cat conftest.$ac_ext >&5
6031 rm -rf conftest*
6032 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006033fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006034rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006035fi
6036
Michael W. Hudson54241132001-12-07 15:38:26 +00006037echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006038if test $ac_cv_struct_addrinfo = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006039 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006040#define HAVE_ADDRINFO 1
6041EOF
6042
6043fi
6044
Michael W. Hudson54241132001-12-07 15:38:26 +00006045echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006046echo "configure:6047: checking for sockaddr_storage" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006047if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
6048 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006049else
Michael W. Hudson54241132001-12-07 15:38:26 +00006050 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006051#line 6052 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006052#include "confdefs.h"
6053
6054# include <sys/types.h>
6055# include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006056int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006057struct sockaddr_storage s
Michael W. Hudson54241132001-12-07 15:38:26 +00006058; return 0; }
6059EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006060if { (eval echo configure:6061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006061 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006062 ac_cv_struct_sockaddr_storage=yes
6063else
Michael W. Hudson54241132001-12-07 15:38:26 +00006064 echo "configure: failed program was:" >&5
6065 cat conftest.$ac_ext >&5
6066 rm -rf conftest*
6067 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006068fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006069rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006070fi
6071
Michael W. Hudson54241132001-12-07 15:38:26 +00006072echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006073if test $ac_cv_struct_sockaddr_storage = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006074 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006075#define HAVE_SOCKADDR_STORAGE 1
6076EOF
6077
6078fi
6079
Guido van Rossum627b2d71993-12-24 10:39:16 +00006080# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00006081
Michael W. Hudson54241132001-12-07 15:38:26 +00006082echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006083echo "configure:6084: checking whether char is unsigned" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006084if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
6085 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006086else
Michael W. Hudson54241132001-12-07 15:38:26 +00006087 if test "$GCC" = yes; then
6088 # GCC predefines this symbol on systems where it applies.
6089cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006090#line 6091 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006091#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00006092#ifdef __CHAR_UNSIGNED__
6093 yes
6094#endif
6095
6096EOF
6097if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6098 egrep "yes" >/dev/null 2>&1; then
6099 rm -rf conftest*
6100 ac_cv_c_char_unsigned=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006101else
Michael W. Hudson54241132001-12-07 15:38:26 +00006102 rm -rf conftest*
6103 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006104fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006105rm -f conftest*
6106
6107else
6108if test "$cross_compiling" = yes; then
6109 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6110else
6111 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006112#line 6113 "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +00006113#include "confdefs.h"
6114/* volatile prevents gcc2 from optimizing the test away on sparcs. */
6115#if !defined(__STDC__) || __STDC__ != 1
6116#define volatile
6117#endif
6118main() {
6119 volatile char c = 255; exit(c < 0);
6120}
6121EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006122if { (eval echo configure:6123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00006123then
6124 ac_cv_c_char_unsigned=yes
6125else
6126 echo "configure: failed program was:" >&5
6127 cat conftest.$ac_ext >&5
6128 rm -fr conftest*
6129 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006130fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006131rm -fr conftest*
6132fi
6133
6134fi
6135fi
6136
6137echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006138if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006139 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006140#define __CHAR_UNSIGNED__ 1
6141EOF
6142
6143fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006144
Michael W. Hudson54241132001-12-07 15:38:26 +00006145echo $ac_n "checking for working const""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006146echo "configure:6147: checking for working const" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006147if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6148 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006149else
Michael W. Hudson54241132001-12-07 15:38:26 +00006150 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006151#line 6152 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006152#include "confdefs.h"
6153
Michael W. Hudson54241132001-12-07 15:38:26 +00006154int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006155
Michael W. Hudson54241132001-12-07 15:38:26 +00006156/* Ultrix mips cc rejects this. */
6157typedef int charset[2]; const charset x;
6158/* SunOS 4.1.1 cc rejects this. */
6159char const *const *ccp;
6160char **p;
6161/* NEC SVR4.0.2 mips cc rejects this. */
6162struct point {int x, y;};
6163static struct point const zero = {0,0};
6164/* AIX XL C 1.02.0.0 rejects this.
6165 It does not let you subtract one const X* pointer from another in an arm
6166 of an if-expression whose if-part is not a constant expression */
6167const char *g = "string";
6168ccp = &g + (g ? g-g : 0);
6169/* HPUX 7.0 cc rejects these. */
6170++ccp;
6171p = (char**) ccp;
6172ccp = (char const *const *) p;
6173{ /* SCO 3.2v4 cc rejects this. */
6174 char *t;
6175 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006176
Michael W. Hudson54241132001-12-07 15:38:26 +00006177 *t++ = 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006178}
Michael W. Hudson54241132001-12-07 15:38:26 +00006179{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6180 int x[] = {25, 17};
6181 const int *foo = &x[0];
6182 ++foo;
6183}
6184{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6185 typedef const int *iptr;
6186 iptr p = 0;
6187 ++p;
6188}
6189{ /* AIX XL C 1.02.0.0 rejects this saying
6190 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6191 struct s { int j; const int *ap[3]; };
6192 struct s *b; b->j = 5;
6193}
6194{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6195 const int foo = 10;
6196}
6197
6198; return 0; }
6199EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006200if { (eval echo configure:6201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006201 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006202 ac_cv_c_const=yes
6203else
Michael W. Hudson54241132001-12-07 15:38:26 +00006204 echo "configure: failed program was:" >&5
6205 cat conftest.$ac_ext >&5
6206 rm -rf conftest*
6207 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006208fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006209rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006210fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006211
6212echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006213if test $ac_cv_c_const = no; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006214 cat >> confdefs.h <<\EOF
6215#define const
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006216EOF
6217
6218fi
6219
Michael W. Hudson54241132001-12-07 15:38:26 +00006220
Guido van Rossumda88dad1995-01-26 00:46:29 +00006221works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006222echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006223echo "configure:6224: checking for working volatile" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006224cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006225#line 6226 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006226#include "confdefs.h"
6227
Michael W. Hudson54241132001-12-07 15:38:26 +00006228int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006229volatile int x; x = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006230; return 0; }
6231EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006232if { (eval echo configure:6233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006233 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006234 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006235else
Michael W. Hudson54241132001-12-07 15:38:26 +00006236 echo "configure: failed program was:" >&5
6237 cat conftest.$ac_ext >&5
6238 rm -rf conftest*
6239 cat >> confdefs.h <<\EOF
6240#define volatile
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006241EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006242
6243fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006244rm -f conftest*
6245echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006246
Guido van Rossumda88dad1995-01-26 00:46:29 +00006247works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006248echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006249echo "configure:6250: checking for working signed char" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006250cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006251#line 6252 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006252#include "confdefs.h"
6253
Michael W. Hudson54241132001-12-07 15:38:26 +00006254int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006255signed char c;
Michael W. Hudson54241132001-12-07 15:38:26 +00006256; return 0; }
6257EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006258if { (eval echo configure:6259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006259 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006260 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006261else
Michael W. Hudson54241132001-12-07 15:38:26 +00006262 echo "configure: failed program was:" >&5
6263 cat conftest.$ac_ext >&5
6264 rm -rf conftest*
6265 cat >> confdefs.h <<\EOF
6266#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00006267EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006268
6269fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006270rm -f conftest*
6271echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006272
Guido van Rossumda88dad1995-01-26 00:46:29 +00006273have_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006274echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006275echo "configure:6276: checking for prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006276cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006277#line 6278 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006278#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006279int foo(int x) { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006280int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006281return foo(10);
Michael W. Hudson54241132001-12-07 15:38:26 +00006282; return 0; }
6283EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006284if { (eval echo configure:6285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006285 rm -rf conftest*
6286 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006287#define HAVE_PROTOTYPES 1
6288EOF
6289 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006290else
Michael W. Hudson54241132001-12-07 15:38:26 +00006291 echo "configure: failed program was:" >&5
6292 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006293fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006294rm -f conftest*
6295echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006296
Guido van Rossumda88dad1995-01-26 00:46:29 +00006297works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006298echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006299echo "configure:6300: checking for variable length prototypes and stdarg.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006300cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006301#line 6302 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006302#include "confdefs.h"
6303
6304#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00006305int foo(int x, ...) {
6306 va_list va;
6307 va_start(va, x);
6308 va_arg(va, int);
6309 va_arg(va, char *);
6310 va_arg(va, double);
6311 return 0;
6312}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006313
Michael W. Hudson54241132001-12-07 15:38:26 +00006314int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00006315return foo(10, "", 3.14);
Michael W. Hudson54241132001-12-07 15:38:26 +00006316; return 0; }
6317EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006318if { (eval echo configure:6319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006319 rm -rf conftest*
6320 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006321#define HAVE_STDARG_PROTOTYPES 1
6322EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006323 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006324else
Michael W. Hudson54241132001-12-07 15:38:26 +00006325 echo "configure: failed program was:" >&5
6326 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006327fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006328rm -f conftest*
6329echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006330
Guido van Rossumda88dad1995-01-26 00:46:29 +00006331if test "$have_prototypes" = yes; then
6332bad_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006333echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006334echo "configure:6335: checking for bad exec* prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006335cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006336#line 6337 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006337#include "confdefs.h"
6338#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006339int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006340char **t;execve("@",t,t);
Michael W. Hudson54241132001-12-07 15:38:26 +00006341; return 0; }
6342EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006343if { (eval echo configure:6344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006344 :
6345else
Michael W. Hudson54241132001-12-07 15:38:26 +00006346 echo "configure: failed program was:" >&5
6347 cat conftest.$ac_ext >&5
6348 rm -rf conftest*
6349 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006350#define BAD_EXEC_PROTOTYPES 1
6351EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006352 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006353fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006354rm -f conftest*
6355echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006356fi
6357
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006358# check if sockaddr has sa_len member
Michael W. Hudson54241132001-12-07 15:38:26 +00006359echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006360echo "configure:6361: checking if sockaddr has sa_len member" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006361cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006362#line 6363 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006363#include "confdefs.h"
6364#include <sys/types.h>
6365#include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006366int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006367struct sockaddr x;
6368x.sa_len = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006369; return 0; }
6370EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006371if { (eval echo configure:6372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006372 rm -rf conftest*
6373 echo "$ac_t""yes" 1>&6
6374 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006375#define HAVE_SOCKADDR_SA_LEN 1
6376EOF
6377
6378else
Michael W. Hudson54241132001-12-07 15:38:26 +00006379 echo "configure: failed program was:" >&5
6380 cat conftest.$ac_ext >&5
6381 rm -rf conftest*
6382 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006383fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006384rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006385
Michael W. Hudson54241132001-12-07 15:38:26 +00006386echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006387echo "configure:6388: checking for bad static forward" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006388if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
6389 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006390else
6391 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006392 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006393else
Michael W. Hudson54241132001-12-07 15:38:26 +00006394 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006395#line 6396 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006396#include "confdefs.h"
6397
6398struct s { int a; int b; };
6399static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006400int foobar() {
6401 static int random;
6402 random = (int) &foo;
6403 return random;
6404}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006405static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006406main() {
6407 exit(!((int)&foo == foobar()));
6408}
Michael W. Hudson54241132001-12-07 15:38:26 +00006409EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006410if { (eval echo configure:6411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00006411then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006412 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006413else
Michael W. Hudson54241132001-12-07 15:38:26 +00006414 echo "configure: failed program was:" >&5
6415 cat conftest.$ac_ext >&5
6416 rm -fr conftest*
6417 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006418fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006419rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006420fi
6421
Michael W. Hudson54241132001-12-07 15:38:26 +00006422fi
6423
6424echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006425if test "$ac_cv_bad_static_forward" = yes
6426then
Michael W. Hudson54241132001-12-07 15:38:26 +00006427 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006428#define BAD_STATIC_FORWARD 1
6429EOF
6430
6431fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006432
Guido van Rossumda88dad1995-01-26 00:46:29 +00006433va_list_is_array=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006434echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006435echo "configure:6436: checking whether va_list is an array" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006436cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006437#line 6438 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006438#include "confdefs.h"
6439
6440#ifdef HAVE_STDARG_PROTOTYPES
6441#include <stdarg.h>
6442#else
6443#include <varargs.h>
6444#endif
6445
Michael W. Hudson54241132001-12-07 15:38:26 +00006446int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006447va_list list1, list2; list1 = list2;
Michael W. Hudson54241132001-12-07 15:38:26 +00006448; return 0; }
6449EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006450if { (eval echo configure:6451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006451 :
6452else
Michael W. Hudson54241132001-12-07 15:38:26 +00006453 echo "configure: failed program was:" >&5
6454 cat conftest.$ac_ext >&5
6455 rm -rf conftest*
6456 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006457#define VA_LIST_IS_ARRAY 1
6458EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006459 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006460fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006461rm -f conftest*
6462echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006463
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006464# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Michael W. Hudson54241132001-12-07 15:38:26 +00006465echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006466echo "configure:6467: checking for gethostbyname_r" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006467if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
6468 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006469else
Michael W. Hudson54241132001-12-07 15:38:26 +00006470 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006471#line 6472 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006472#include "confdefs.h"
6473/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006474 which can conflict with char gethostbyname_r(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006475#include <assert.h>
6476/* Override any gcc2 internal prototype to avoid an error. */
6477/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006478 builtin and then its argument prototype would still apply. */
6479char gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006480
Michael W. Hudson54241132001-12-07 15:38:26 +00006481int main() {
6482
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006483/* The GNU C library defines this for functions which it implements
6484 to always fail with ENOSYS. Some functions are actually named
6485 something starting with __ and the normal name is an alias. */
6486#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6487choke me
6488#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006489gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006490#endif
6491
Michael W. Hudson54241132001-12-07 15:38:26 +00006492; return 0; }
6493EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006494if { (eval echo configure:6495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006495 rm -rf conftest*
6496 eval "ac_cv_func_gethostbyname_r=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006497else
Michael W. Hudson54241132001-12-07 15:38:26 +00006498 echo "configure: failed program was:" >&5
6499 cat conftest.$ac_ext >&5
6500 rm -rf conftest*
6501 eval "ac_cv_func_gethostbyname_r=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006502fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006503rm -f conftest*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006504fi
6505
Michael W. Hudson54241132001-12-07 15:38:26 +00006506if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6507 echo "$ac_t""yes" 1>&6
6508
6509 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006510#define HAVE_GETHOSTBYNAME_R 1
6511EOF
6512
Michael W. Hudson54241132001-12-07 15:38:26 +00006513 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006514echo "configure:6515: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006515 OLD_CFLAGS=$CFLAGS
6516 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006517 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006518#line 6519 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006519#include "confdefs.h"
6520
6521# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006522
6523int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006524
6525 char *name;
6526 struct hostent *he, *res;
6527 char buffer[2048];
6528 int buflen = 2048;
6529 int h_errnop;
6530
6531 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006532
6533; return 0; }
6534EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006535if { (eval echo configure:6536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006536 rm -rf conftest*
6537
6538 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006539#define HAVE_GETHOSTBYNAME_R 1
6540EOF
6541
Michael W. Hudson54241132001-12-07 15:38:26 +00006542 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006543#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6544EOF
6545
Michael W. Hudson54241132001-12-07 15:38:26 +00006546 echo "$ac_t""yes" 1>&6
6547
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006548else
Michael W. Hudson54241132001-12-07 15:38:26 +00006549 echo "configure: failed program was:" >&5
6550 cat conftest.$ac_ext >&5
6551 rm -rf conftest*
6552
6553 echo "$ac_t""no" 1>&6
6554 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006555echo "configure:6556: checking gethostbyname_r with 5 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006556 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006557#line 6558 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006558#include "confdefs.h"
6559
6560# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006561
6562int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006563
6564 char *name;
6565 struct hostent *he;
6566 char buffer[2048];
6567 int buflen = 2048;
6568 int h_errnop;
6569
6570 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006571
6572; return 0; }
6573EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006574if { (eval echo configure:6575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006575 rm -rf conftest*
6576
6577 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006578#define HAVE_GETHOSTBYNAME_R 1
6579EOF
6580
Michael W. Hudson54241132001-12-07 15:38:26 +00006581 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006582#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6583EOF
6584
Michael W. Hudson54241132001-12-07 15:38:26 +00006585 echo "$ac_t""yes" 1>&6
6586
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006587else
Michael W. Hudson54241132001-12-07 15:38:26 +00006588 echo "configure: failed program was:" >&5
6589 cat conftest.$ac_ext >&5
6590 rm -rf conftest*
6591
6592 echo "$ac_t""no" 1>&6
6593 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006594echo "configure:6595: checking gethostbyname_r with 3 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006595 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006596#line 6597 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006597#include "confdefs.h"
6598
6599# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006600
6601int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006602
6603 char *name;
6604 struct hostent *he;
6605 struct hostent_data data;
6606
6607 (void) gethostbyname_r(name, he, &data);
Michael W. Hudson54241132001-12-07 15:38:26 +00006608
6609; return 0; }
6610EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006611if { (eval echo configure:6612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006612 rm -rf conftest*
6613
6614 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006615#define HAVE_GETHOSTBYNAME_R 1
6616EOF
6617
Michael W. Hudson54241132001-12-07 15:38:26 +00006618 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006619#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6620EOF
6621
Michael W. Hudson54241132001-12-07 15:38:26 +00006622 echo "$ac_t""yes" 1>&6
6623
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006624else
Michael W. Hudson54241132001-12-07 15:38:26 +00006625 echo "configure: failed program was:" >&5
6626 cat conftest.$ac_ext >&5
6627 rm -rf conftest*
6628
6629 echo "$ac_t""no" 1>&6
6630
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006631fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006632rm -f conftest*
6633
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006634fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006635rm -f conftest*
6636
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006637fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006638rm -f conftest*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006639 CFLAGS=$OLD_CFLAGS
6640
6641else
Michael W. Hudson54241132001-12-07 15:38:26 +00006642 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006643
Michael W. Hudson54241132001-12-07 15:38:26 +00006644 for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +00006645do
Michael W. Hudson54241132001-12-07 15:38:26 +00006646echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006647echo "configure:6648: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006648if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6649 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006650else
Michael W. Hudson54241132001-12-07 15:38:26 +00006651 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006652#line 6653 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006653#include "confdefs.h"
6654/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006655 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006656#include <assert.h>
6657/* Override any gcc2 internal prototype to avoid an error. */
6658/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006659 builtin and then its argument prototype would still apply. */
6660char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006661
Michael W. Hudson54241132001-12-07 15:38:26 +00006662int main() {
6663
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006664/* The GNU C library defines this for functions which it implements
6665 to always fail with ENOSYS. Some functions are actually named
6666 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006667#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006668choke me
6669#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006670$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006671#endif
6672
Michael W. Hudson54241132001-12-07 15:38:26 +00006673; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006674EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006675if { (eval echo configure:6676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006676 rm -rf conftest*
6677 eval "ac_cv_func_$ac_func=yes"
6678else
6679 echo "configure: failed program was:" >&5
6680 cat conftest.$ac_ext >&5
6681 rm -rf conftest*
6682 eval "ac_cv_func_$ac_func=no"
6683fi
6684rm -f conftest*
6685fi
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006686
Michael W. Hudson54241132001-12-07 15:38:26 +00006687if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6688 echo "$ac_t""yes" 1>&6
6689 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6690 cat >> confdefs.h <<EOF
6691#define $ac_tr_func 1
6692EOF
6693
6694else
6695 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006696fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006697done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006698
Michael W. Hudson54241132001-12-07 15:38:26 +00006699
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006700fi
6701
Michael W. Hudson54241132001-12-07 15:38:26 +00006702
6703
6704
6705
6706
6707
Guido van Rossum627b2d71993-12-24 10:39:16 +00006708# checks for system services
6709# (none yet)
6710
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006711# Linux requires this for correct f.p. operations
Michael W. Hudson54241132001-12-07 15:38:26 +00006712echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006713echo "configure:6714: checking for __fpu_control" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006714if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
6715 echo $ac_n "(cached) $ac_c" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006716else
Michael W. Hudson54241132001-12-07 15:38:26 +00006717 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006718#line 6719 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006719#include "confdefs.h"
6720/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006721 which can conflict with char __fpu_control(); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006722#include <assert.h>
6723/* Override any gcc2 internal prototype to avoid an error. */
6724/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006725 builtin and then its argument prototype would still apply. */
6726char __fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006727
Michael W. Hudson54241132001-12-07 15:38:26 +00006728int main() {
6729
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006730/* The GNU C library defines this for functions which it implements
6731 to always fail with ENOSYS. Some functions are actually named
6732 something starting with __ and the normal name is an alias. */
6733#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6734choke me
6735#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006736__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006737#endif
6738
Michael W. Hudson54241132001-12-07 15:38:26 +00006739; return 0; }
6740EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006741if { (eval echo configure:6742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006742 rm -rf conftest*
6743 eval "ac_cv_func___fpu_control=yes"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006744else
Michael W. Hudson54241132001-12-07 15:38:26 +00006745 echo "configure: failed program was:" >&5
6746 cat conftest.$ac_ext >&5
6747 rm -rf conftest*
6748 eval "ac_cv_func___fpu_control=no"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006749fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006750rm -f conftest*
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006751fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006752
6753if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6754 echo "$ac_t""yes" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006755 :
6756else
Michael W. Hudson54241132001-12-07 15:38:26 +00006757 echo "$ac_t""no" 1>&6
6758echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006759echo "configure:6760: checking for __fpu_control in -lieee" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006760ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
6761if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6762 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006763else
Michael W. Hudson54241132001-12-07 15:38:26 +00006764 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006765LIBS="-lieee $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006766cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006767#line 6768 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006768#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006769/* Override any gcc2 internal prototype to avoid an error. */
6770/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006771 builtin and then its argument prototype would still apply. */
6772char __fpu_control();
6773
6774int main() {
6775__fpu_control()
6776; return 0; }
6777EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006778if { (eval echo configure:6779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006779 rm -rf conftest*
6780 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006781else
Michael W. Hudson54241132001-12-07 15:38:26 +00006782 echo "configure: failed program was:" >&5
6783 cat conftest.$ac_ext >&5
6784 rm -rf conftest*
6785 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006786fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006787rm -f conftest*
6788LIBS="$ac_save_LIBS"
6789
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006790fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006791if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6792 echo "$ac_t""yes" 1>&6
6793 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6794 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6795 cat >> confdefs.h <<EOF
6796#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006797EOF
6798
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006799 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006800
Michael W. Hudson54241132001-12-07 15:38:26 +00006801else
6802 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006803fi
6804
Michael W. Hudson54241132001-12-07 15:38:26 +00006805
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006806fi
6807
Michael W. Hudson54241132001-12-07 15:38:26 +00006808
Guido van Rossum7f253911997-05-09 02:42:48 +00006809# Check for --with-fpectl
Michael W. Hudson54241132001-12-07 15:38:26 +00006810echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006811echo "configure:6812: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006812# Check whether --with-fpectl or --without-fpectl was given.
6813if test "${with_fpectl+set}" = set; then
6814 withval="$with_fpectl"
Michael W. Hudson54241132001-12-07 15:38:26 +00006815
Guido van Rossum7f253911997-05-09 02:42:48 +00006816if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00006817then cat >> confdefs.h <<\EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00006818#define WANT_SIGFPE_HANDLER 1
6819EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00006820 echo "$ac_t""yes" 1>&6
6821else echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006822fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006823else
Michael W. Hudson54241132001-12-07 15:38:26 +00006824 echo "$ac_t""no" 1>&6
6825fi
6826
Guido van Rossum7f253911997-05-09 02:42:48 +00006827
Guido van Rossum7f43da71994-08-01 12:15:30 +00006828# check for --with-libm=...
6829
Guido van Rossum563e7081996-09-10 18:20:48 +00006830case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006831Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006832BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006833*) LIBM=-lm
6834esac
Michael W. Hudson54241132001-12-07 15:38:26 +00006835echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006836echo "configure:6837: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006837# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006838if test "${with_libm+set}" = set; then
6839 withval="$with_libm"
Michael W. Hudson54241132001-12-07 15:38:26 +00006840
Guido van Rossum7f253911997-05-09 02:42:48 +00006841if test "$withval" = no
6842then LIBM=
Michael W. Hudson54241132001-12-07 15:38:26 +00006843 echo "$ac_t""force LIBM empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006844elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006845then LIBM=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00006846 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
6847else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006848fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006849else
Michael W. Hudson54241132001-12-07 15:38:26 +00006850 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
6851fi
6852
Guido van Rossum7f43da71994-08-01 12:15:30 +00006853
6854# check for --with-libc=...
6855
Michael W. Hudson54241132001-12-07 15:38:26 +00006856echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006857echo "configure:6858: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006858# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006859if test "${with_libc+set}" = set; then
6860 withval="$with_libc"
Michael W. Hudson54241132001-12-07 15:38:26 +00006861
Guido van Rossum7f253911997-05-09 02:42:48 +00006862if test "$withval" = no
6863then LIBC=
Michael W. Hudson54241132001-12-07 15:38:26 +00006864 echo "$ac_t""force LIBC empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006865elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006866then LIBC=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00006867 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
6868else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006869fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006870else
Michael W. Hudson54241132001-12-07 15:38:26 +00006871 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
6872fi
6873
Guido van Rossum7f43da71994-08-01 12:15:30 +00006874
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006875# check for hypot() in math library
6876LIBS_SAVE=$LIBS
6877LIBS="$LIBS $LIBM"
6878for ac_func in hypot
6879do
Michael W. Hudson54241132001-12-07 15:38:26 +00006880echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006881echo "configure:6882: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006882if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6883 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006884else
Michael W. Hudson54241132001-12-07 15:38:26 +00006885 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006886#line 6887 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006887#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006888/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006889 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006890#include <assert.h>
6891/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006892/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006893 builtin and then its argument prototype would still apply. */
6894char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006895
Michael W. Hudson54241132001-12-07 15:38:26 +00006896int main() {
6897
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006898/* The GNU C library defines this for functions which it implements
6899 to always fail with ENOSYS. Some functions are actually named
6900 something starting with __ and the normal name is an alias. */
6901#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6902choke me
6903#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006904$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006905#endif
6906
Michael W. Hudson54241132001-12-07 15:38:26 +00006907; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006908EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006909if { (eval echo configure:6910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006910 rm -rf conftest*
6911 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006912else
Michael W. Hudson54241132001-12-07 15:38:26 +00006913 echo "configure: failed program was:" >&5
6914 cat conftest.$ac_ext >&5
6915 rm -rf conftest*
6916 eval "ac_cv_func_$ac_func=no"
6917fi
6918rm -f conftest*
6919fi
6920
6921if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6922 echo "$ac_t""yes" 1>&6
6923 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6924 cat >> confdefs.h <<EOF
6925#define $ac_tr_func 1
6926EOF
6927
6928else
6929 echo "$ac_t""no" 1>&6
6930LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006931fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006932done
6933
Michael W. Hudson54241132001-12-07 15:38:26 +00006934
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006935LIBS=$LIBS_SAVE
6936
Guido van Rossumad713701997-07-10 22:42:38 +00006937# check whether malloc(0) returns NULL or not
Michael W. Hudson54241132001-12-07 15:38:26 +00006938echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006939echo "configure:6940: checking what malloc(0) returns" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006940if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
6941 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00006942else
6943 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006944 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +00006945else
Michael W. Hudson54241132001-12-07 15:38:26 +00006946 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006947#line 6948 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006948#include "confdefs.h"
6949#include <stdio.h>
6950#ifdef HAVE_STDLIB
6951#include <stdlib.h>
6952#else
6953char *malloc(), *realloc();
6954int *free();
6955#endif
6956main() {
6957 char *p;
6958 p = malloc(0);
6959 if (p == NULL) exit(1);
6960 p = realloc(p, 0);
6961 if (p == NULL) exit(1);
6962 free(p);
6963 exit(0);
6964}
Michael W. Hudson54241132001-12-07 15:38:26 +00006965EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006966if { (eval echo configure:6967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00006967then
Guido van Rossumad713701997-07-10 22:42:38 +00006968 ac_cv_malloc_zero=nonnull
6969else
Michael W. Hudson54241132001-12-07 15:38:26 +00006970 echo "configure: failed program was:" >&5
6971 cat conftest.$ac_ext >&5
6972 rm -fr conftest*
6973 ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +00006974fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006975rm -fr conftest*
Guido van Rossumad713701997-07-10 22:42:38 +00006976fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006977
Guido van Rossumad713701997-07-10 22:42:38 +00006978fi
Guido van Rossum3065c942001-09-17 04:03:14 +00006979 # XXX arm cross-compile?
Michael W. Hudson54241132001-12-07 15:38:26 +00006980echo "$ac_t""$ac_cv_malloc_zero" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00006981if test "$ac_cv_malloc_zero" = null
6982then
Michael W. Hudson54241132001-12-07 15:38:26 +00006983 cat >> confdefs.h <<\EOF
Guido van Rossumad713701997-07-10 22:42:38 +00006984#define MALLOC_ZERO_RETURNS_NULL 1
6985EOF
6986
6987fi
6988
Guido van Rossumef2255b2000-03-10 22:30:29 +00006989# check for wchar.h
Michael W. Hudson54241132001-12-07 15:38:26 +00006990ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6991echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006992echo "configure:6993: checking for wchar.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006993if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6994 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00006995else
Michael W. Hudson54241132001-12-07 15:38:26 +00006996 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00006997#line 6998 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006998#include "confdefs.h"
6999#include <wchar.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007000EOF
7001ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007002{ (eval echo configure:7003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007003ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7004if test -z "$ac_err"; then
7005 rm -rf conftest*
7006 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007007else
Michael W. Hudson54241132001-12-07 15:38:26 +00007008 echo "$ac_err" >&5
7009 echo "configure: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007010 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007011 rm -rf conftest*
7012 eval "ac_cv_header_$ac_safe=no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007013fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007014rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007015fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007016if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7017 echo "$ac_t""yes" 1>&6
7018 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007019#define HAVE_WCHAR_H 1
7020EOF
7021 wchar_h="yes"
7022else
Michael W. Hudson54241132001-12-07 15:38:26 +00007023 echo "$ac_t""no" 1>&6
7024wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007025
7026fi
7027
Michael W. Hudson54241132001-12-07 15:38:26 +00007028
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007029# determine wchar_t size
7030if test "$wchar_h" = yes
7031then
Michael W. Hudson54241132001-12-07 15:38:26 +00007032 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007033echo "configure:7034: checking size of wchar_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007034if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
7035 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007036else
7037 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007038 ac_cv_sizeof_wchar_t=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00007039else
Michael W. Hudson54241132001-12-07 15:38:26 +00007040 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007041#line 7042 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007042#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007043#include <stdio.h>
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007044#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007045main()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007046{
Michael W. Hudson54241132001-12-07 15:38:26 +00007047 FILE *f=fopen("conftestval", "w");
7048 if (!f) exit(1);
7049 fprintf(f, "%d\n", sizeof(wchar_t));
7050 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00007051}
Michael W. Hudson54241132001-12-07 15:38:26 +00007052EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007053if { (eval echo configure:7054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00007054then
7055 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007056else
Michael W. Hudson54241132001-12-07 15:38:26 +00007057 echo "configure: failed program was:" >&5
7058 cat conftest.$ac_ext >&5
7059 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007060 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00007061fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007062rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007063fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007064
7065fi
7066echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
7067cat >> confdefs.h <<EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007068#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
7069EOF
7070
Michael W. Hudson54241132001-12-07 15:38:26 +00007071
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007072fi
7073
Michael W. Hudson54241132001-12-07 15:38:26 +00007074echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007075echo "configure:7076: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007076# Check whether --enable-unicode or --disable-unicode was given.
7077if test "${enable_unicode+set}" = set; then
7078 enableval="$enable_unicode"
Michael W. Hudson54241132001-12-07 15:38:26 +00007079 :
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007080else
7081 enable_unicode=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00007082fi
7083
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007084
7085if test $enable_unicode = yes
7086then
Martin v. Löwisfd917792001-06-27 20:22:04 +00007087 # Without any arguments, Py_UNICODE defaults to two-byte mode
7088 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007089fi
7090
7091case "$enable_unicode" in
7092ucs2) unicode_size="2"
Michael W. Hudson54241132001-12-07 15:38:26 +00007093 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007094#define Py_UNICODE_SIZE 2
7095EOF
7096
7097 ;;
7098ucs4) unicode_size="4"
Michael W. Hudson54241132001-12-07 15:38:26 +00007099 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007100#define Py_UNICODE_SIZE 4
7101EOF
7102
7103 ;;
7104esac
7105
Michael W. Hudson54241132001-12-07 15:38:26 +00007106
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007107if test "$enable_unicode" = "no"
7108then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007109 UNICODE_OBJS=""
Michael W. Hudson54241132001-12-07 15:38:26 +00007110 echo "$ac_t""not used" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007111else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007112 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Michael W. Hudson54241132001-12-07 15:38:26 +00007113 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007114#define Py_USING_UNICODE 1
7115EOF
7116
7117 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
7118 then
7119 PY_UNICODE_TYPE="wchar_t"
Michael W. Hudson54241132001-12-07 15:38:26 +00007120 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007121#define HAVE_USABLE_WCHAR_T 1
7122EOF
7123
Michael W. Hudson54241132001-12-07 15:38:26 +00007124 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007125#define PY_UNICODE_TYPE wchar_t
7126EOF
7127
7128 elif test "$ac_cv_sizeof_short" = "$unicode_size"
7129 then
7130 PY_UNICODE_TYPE="unsigned short"
Michael W. Hudson54241132001-12-07 15:38:26 +00007131 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007132#define PY_UNICODE_TYPE unsigned short
7133EOF
7134
7135 elif test "$ac_cv_sizeof_long" = "$unicode_size"
7136 then
7137 PY_UNICODE_TYPE="unsigned long"
Michael W. Hudson54241132001-12-07 15:38:26 +00007138 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007139#define PY_UNICODE_TYPE unsigned long
7140EOF
7141
7142 else
7143 PY_UNICODE_TYPE="no type found"
7144 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007145 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007146fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007147
7148# check for endianness
Michael W. Hudson54241132001-12-07 15:38:26 +00007149echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007150echo "configure:7151: checking whether byte ordering is bigendian" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007151if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
7152 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00007153else
7154 ac_cv_c_bigendian=unknown
7155# See if sys/param.h defines the BYTE_ORDER macro.
Michael W. Hudson54241132001-12-07 15:38:26 +00007156cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007157#line 7158 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007158#include "confdefs.h"
7159#include <sys/types.h>
7160#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007161int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007162
7163#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
7164 bogus endian macros
7165#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007166; return 0; }
7167EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007168if { (eval echo configure:7169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007169 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007170 # It does; now see whether it defined to BIG_ENDIAN or not.
Michael W. Hudson54241132001-12-07 15:38:26 +00007171cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007172#line 7173 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007173#include "confdefs.h"
7174#include <sys/types.h>
7175#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007176int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007177
7178#if BYTE_ORDER != BIG_ENDIAN
7179 not big endian
7180#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007181; return 0; }
7182EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007183if { (eval echo configure:7184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007184 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007185 ac_cv_c_bigendian=yes
7186else
Michael W. Hudson54241132001-12-07 15:38:26 +00007187 echo "configure: failed program was:" >&5
7188 cat conftest.$ac_ext >&5
7189 rm -rf conftest*
7190 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +00007191fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007192rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007193else
Michael W. Hudson54241132001-12-07 15:38:26 +00007194 echo "configure: failed program was:" >&5
7195 cat conftest.$ac_ext >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007196fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007197rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007198if test $ac_cv_c_bigendian = unknown; then
7199if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007200 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007201else
Michael W. Hudson54241132001-12-07 15:38:26 +00007202 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007203#line 7204 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007204#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007205main () {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007206 /* Are we little or big endian? From Harbison&Steele. */
7207 union
7208 {
7209 long l;
7210 char c[sizeof (long)];
7211 } u;
7212 u.l = 1;
7213 exit (u.c[sizeof (long) - 1] == 1);
7214}
Michael W. Hudson54241132001-12-07 15:38:26 +00007215EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007216if { (eval echo configure:7217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00007217then
Guido van Rossumef2255b2000-03-10 22:30:29 +00007218 ac_cv_c_bigendian=no
7219else
Michael W. Hudson54241132001-12-07 15:38:26 +00007220 echo "configure: failed program was:" >&5
7221 cat conftest.$ac_ext >&5
7222 rm -fr conftest*
7223 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +00007224fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007225rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007226fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007227
Michael W. Hudson54241132001-12-07 15:38:26 +00007228fi
7229fi
7230
7231echo "$ac_t""$ac_cv_c_bigendian" 1>&6
7232if test $ac_cv_c_bigendian = yes; then
7233 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007234#define WORDS_BIGENDIAN 1
7235EOF
7236
7237fi
7238
Michael W. Hudson54241132001-12-07 15:38:26 +00007239
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007240# Check whether right shifting a negative integer extends the sign bit
7241# or fills with zeros (like the Cray J90, according to Tim Peters).
Michael W. Hudson54241132001-12-07 15:38:26 +00007242echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007243echo "configure:7244: checking whether right shift extends the sign bit" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007244if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
7245 echo $ac_n "(cached) $ac_c" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007246else
Michael W. Hudson54241132001-12-07 15:38:26 +00007247
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007248if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007249 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007250else
Michael W. Hudson54241132001-12-07 15:38:26 +00007251 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007252#line 7253 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007253#include "confdefs.h"
7254
7255int main()
7256{
Vladimir Marangozova6180282000-07-12 05:05:06 +00007257 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007258}
7259
Michael W. Hudson54241132001-12-07 15:38:26 +00007260EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007261if { (eval echo configure:7262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00007262then
Vladimir Marangozova6180282000-07-12 05:05:06 +00007263 ac_cv_rshift_extends_sign=yes
7264else
Michael W. Hudson54241132001-12-07 15:38:26 +00007265 echo "configure: failed program was:" >&5
7266 cat conftest.$ac_ext >&5
7267 rm -fr conftest*
7268 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +00007269fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007270rm -fr conftest*
Vladimir Marangozova6180282000-07-12 05:05:06 +00007271fi
7272
Michael W. Hudson54241132001-12-07 15:38:26 +00007273fi
7274
7275echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007276if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007277then
Michael W. Hudson54241132001-12-07 15:38:26 +00007278 cat >> confdefs.h <<\EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007279#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
7280EOF
7281
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007282fi
7283
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007284# check for getc_unlocked and related locking functions
Michael W. Hudson54241132001-12-07 15:38:26 +00007285echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007286echo "configure:7287: checking for getc_unlocked() and friends" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007287if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
7288 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007289else
Michael W. Hudson54241132001-12-07 15:38:26 +00007290
7291cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007292#line 7293 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007293#include "confdefs.h"
7294#include <stdio.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007295int main() {
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007296
7297 FILE *f = fopen("/dev/null", "r");
7298 flockfile(f);
7299 getc_unlocked(f);
7300 funlockfile(f);
7301
Michael W. Hudson54241132001-12-07 15:38:26 +00007302; return 0; }
7303EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007304if { (eval echo configure:7305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007305 rm -rf conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007306 ac_cv_have_getc_unlocked=yes
7307else
Michael W. Hudson54241132001-12-07 15:38:26 +00007308 echo "configure: failed program was:" >&5
7309 cat conftest.$ac_ext >&5
7310 rm -rf conftest*
7311 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007312fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007313rm -f conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007314fi
7315
Michael W. Hudson54241132001-12-07 15:38:26 +00007316echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007317if test "$ac_cv_have_getc_unlocked" = yes
7318then
Michael W. Hudson54241132001-12-07 15:38:26 +00007319 cat >> confdefs.h <<\EOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007320#define HAVE_GETC_UNLOCKED 1
7321EOF
7322
7323fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007324
Martin v. Löwis0daad592001-09-30 21:09:59 +00007325# check for readline 4.0
Michael W. Hudson54241132001-12-07 15:38:26 +00007326echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007327echo "configure:7328: checking for rl_pre_input_hook in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007328ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'`
7329if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7330 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007331else
Michael W. Hudson54241132001-12-07 15:38:26 +00007332 ac_save_LIBS="$LIBS"
Guido van Rossum353ae582001-07-10 16:45:32 +00007333LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007334cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007335#line 7336 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00007336#include "confdefs.h"
7337/* Override any gcc2 internal prototype to avoid an error. */
7338/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007339 builtin and then its argument prototype would still apply. */
7340char rl_pre_input_hook();
7341
7342int main() {
7343rl_pre_input_hook()
7344; return 0; }
7345EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007346if { (eval echo configure:7347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007347 rm -rf conftest*
7348 eval "ac_cv_lib_$ac_lib_var=yes"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007349else
Michael W. Hudson54241132001-12-07 15:38:26 +00007350 echo "configure: failed program was:" >&5
7351 cat conftest.$ac_ext >&5
7352 rm -rf conftest*
7353 eval "ac_cv_lib_$ac_lib_var=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007354fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007355rm -f conftest*
7356LIBS="$ac_save_LIBS"
7357
Martin v. Löwis0daad592001-09-30 21:09:59 +00007358fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007359if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7360 echo "$ac_t""yes" 1>&6
7361 cat >> confdefs.h <<\EOF
Martin v. Löwis0daad592001-09-30 21:09:59 +00007362#define HAVE_RL_PRE_INPUT_HOOK 1
7363EOF
7364
Michael W. Hudson54241132001-12-07 15:38:26 +00007365else
7366 echo "$ac_t""no" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007367fi
7368
Michael W. Hudson54241132001-12-07 15:38:26 +00007369
Martin v. Löwis0daad592001-09-30 21:09:59 +00007370# check for readline 4.2
Michael W. Hudson54241132001-12-07 15:38:26 +00007371echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007372echo "configure:7373: checking for rl_completion_matches in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007373ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
7374if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7375 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007376else
Michael W. Hudson54241132001-12-07 15:38:26 +00007377 ac_save_LIBS="$LIBS"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007378LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007379cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007380#line 7381 "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007381#include "confdefs.h"
7382/* Override any gcc2 internal prototype to avoid an error. */
7383/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007384 builtin and then its argument prototype would still apply. */
7385char rl_completion_matches();
7386
7387int main() {
7388rl_completion_matches()
7389; return 0; }
7390EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007391if { (eval echo configure:7392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007392 rm -rf conftest*
7393 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum353ae582001-07-10 16:45:32 +00007394else
Michael W. Hudson54241132001-12-07 15:38:26 +00007395 echo "configure: failed program was:" >&5
7396 cat conftest.$ac_ext >&5
7397 rm -rf conftest*
7398 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum353ae582001-07-10 16:45:32 +00007399fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007400rm -f conftest*
7401LIBS="$ac_save_LIBS"
7402
Guido van Rossum353ae582001-07-10 16:45:32 +00007403fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007404if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7405 echo "$ac_t""yes" 1>&6
7406 cat >> confdefs.h <<\EOF
Guido van Rossum353ae582001-07-10 16:45:32 +00007407#define HAVE_RL_COMPLETION_MATCHES 1
7408EOF
7409
Michael W. Hudson54241132001-12-07 15:38:26 +00007410else
7411 echo "$ac_t""no" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007412fi
7413
Jack Jansendd19cf82001-12-06 22:36:17 +00007414
Michael W. Hudson54241132001-12-07 15:38:26 +00007415echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007416echo "configure:7417: checking for broken nice()" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007417if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
7418 echo $ac_n "(cached) $ac_c" 1>&6
7419else
7420
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007421if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007422 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007423else
Michael W. Hudson54241132001-12-07 15:38:26 +00007424 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007425#line 7426 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007426#include "confdefs.h"
7427
7428int main()
7429{
7430 int val1 = nice(1);
7431 if (val1 != -1 && val1 == nice(2))
7432 exit(0);
7433 exit(1);
7434}
7435
Michael W. Hudson54241132001-12-07 15:38:26 +00007436EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007437if { (eval echo configure:7438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00007438then
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007439 ac_cv_broken_nice=yes
7440else
Michael W. Hudson54241132001-12-07 15:38:26 +00007441 echo "configure: failed program was:" >&5
7442 cat conftest.$ac_ext >&5
7443 rm -fr conftest*
7444 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007445fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007446rm -fr conftest*
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007447fi
7448
Michael W. Hudson54241132001-12-07 15:38:26 +00007449fi
7450
7451echo "$ac_t""$ac_cv_broken_nice" 1>&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007452if test "$ac_cv_broken_nice" = yes
7453then
Michael W. Hudson54241132001-12-07 15:38:26 +00007454 cat >> confdefs.h <<\EOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007455#define HAVE_BROKEN_NICE 1
7456EOF
7457
7458fi
7459
Jack Jansen666b1e72001-10-31 12:11:48 +00007460# On HP/UX 11.0, mvwdelch is a block with a return statement
Michael W. Hudson54241132001-12-07 15:38:26 +00007461echo $ac_n "checking whether mvwdelch is an expression""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007462echo "configure:7463: checking whether mvwdelch is an expression" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007463if eval "test \"`echo '$''{'ac_cv_mvwdelch_is_expression'+set}'`\" = set"; then
7464 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007465else
Michael W. Hudson54241132001-12-07 15:38:26 +00007466 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007467#line 7468 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007468#include "confdefs.h"
7469#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007470int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007471
7472 int rtn;
7473 rtn = mvwdelch(0,0,0);
7474
Michael W. Hudson54241132001-12-07 15:38:26 +00007475; return 0; }
7476EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007477if { (eval echo configure:7478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007478 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007479 ac_cv_mvwdelch_is_expression=yes
7480else
Michael W. Hudson54241132001-12-07 15:38:26 +00007481 echo "configure: failed program was:" >&5
7482 cat conftest.$ac_ext >&5
7483 rm -rf conftest*
7484 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007485fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007486rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007487fi
7488
Michael W. Hudson54241132001-12-07 15:38:26 +00007489echo "$ac_t""$ac_cv_mvwdelch_is_expression" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007490
7491if test "$ac_cv_mvwdelch_is_expression" = yes
7492then
Michael W. Hudson54241132001-12-07 15:38:26 +00007493 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007494#define MVWDELCH_IS_EXPRESSION 1
7495EOF
7496
7497fi
7498
Michael W. Hudson54241132001-12-07 15:38:26 +00007499echo $ac_n "checking whether WINDOW has _flags""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007500echo "configure:7501: checking whether WINDOW has _flags" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007501if eval "test \"`echo '$''{'ac_cv_window_has_flags'+set}'`\" = set"; then
7502 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007503else
Michael W. Hudson54241132001-12-07 15:38:26 +00007504 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007505#line 7506 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007506#include "confdefs.h"
7507#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007508int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007509
7510 WINDOW *w;
7511 w->_flags = 0;
7512
Michael W. Hudson54241132001-12-07 15:38:26 +00007513; return 0; }
7514EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007515if { (eval echo configure:7516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007516 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007517 ac_cv_window_has_flags=yes
7518else
Michael W. Hudson54241132001-12-07 15:38:26 +00007519 echo "configure: failed program was:" >&5
7520 cat conftest.$ac_ext >&5
7521 rm -rf conftest*
7522 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007523fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007524rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007525fi
7526
Michael W. Hudson54241132001-12-07 15:38:26 +00007527echo "$ac_t""$ac_cv_window_has_flags" 1>&6
7528
Jack Jansen666b1e72001-10-31 12:11:48 +00007529
7530if test "$ac_cv_window_has_flags" = yes
7531then
Michael W. Hudson54241132001-12-07 15:38:26 +00007532 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007533#define WINDOW_HAS_FLAGS 1
7534EOF
7535
7536fi
7537
Guido van Rossum95713eb2000-05-18 20:53:31 +00007538# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7539# Add sys/socket.h to confdefs.h
7540cat >> confdefs.h <<\EOF
7541#ifdef HAVE_SYS_SOCKET_H
7542#include <sys/socket.h>
7543#endif
7544EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007545echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007546echo "configure:7547: checking for socklen_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007547if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
7548 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum95713eb2000-05-18 20:53:31 +00007549else
Michael W. Hudson54241132001-12-07 15:38:26 +00007550 cat > conftest.$ac_ext <<EOF
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007551#line 7552 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007552#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007553#include <sys/types.h>
7554#if STDC_HEADERS
7555#include <stdlib.h>
7556#include <stddef.h>
7557#endif
7558EOF
7559if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7560 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7561 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007562 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007563else
Michael W. Hudson54241132001-12-07 15:38:26 +00007564 rm -rf conftest*
7565 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007566fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007567rm -f conftest*
Guido van Rossum95713eb2000-05-18 20:53:31 +00007568
Michael W. Hudson54241132001-12-07 15:38:26 +00007569fi
7570echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7571if test $ac_cv_type_socklen_t = no; then
7572 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007573#define socklen_t int
7574EOF
7575
7576fi
7577
Michael W. Hudson54241132001-12-07 15:38:26 +00007578
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007579# Add Python/ prefix to LIBOBJS
7580libobjs=$LIBOBJS
7581LIBOBJS=
7582for obj in $libobjs; do
7583 LIBOBJS="$LIBOBJS Python/$obj"
7584done
7585
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007586#AC_MSG_CHECKING(for Modules/Setup)
7587#if test ! -f Modules/Setup ; then
7588# if test ! -d Modules ; then
7589# mkdir Modules
7590# fi
7591# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7592# AC_MSG_RESULT(creating)
7593#else
7594# AC_MSG_RESULT(already exists)
7595#fi
7596
Michael W. Hudson54241132001-12-07 15:38:26 +00007597
7598
Martin v. Löwis06f15bb2001-12-02 13:02:32 +00007599for h in `(cd $srcdir;echo Python/thread_*.h)`
7600do
7601 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
7602done
7603
Michael W. Hudson54241132001-12-07 15:38:26 +00007604
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007605SRCDIRS="Parser Grammar Objects Python Modules"
Michael W. Hudson54241132001-12-07 15:38:26 +00007606echo $ac_n "checking for build directories""... $ac_c" 1>&6
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +00007607echo "configure:7608: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007608for dir in $SRCDIRS; do
7609 if test ! -d $dir; then
7610 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007611 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007612done
Michael W. Hudson54241132001-12-07 15:38:26 +00007613echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007614
Guido van Rossum627b2d71993-12-24 10:39:16 +00007615# generate output files
Michael W. Hudson54241132001-12-07 15:38:26 +00007616trap '' 1 2 15
7617cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007618# This file is a shell script that caches the results of configure
7619# tests run on this system so they can be shared between configure
Michael W. Hudson54241132001-12-07 15:38:26 +00007620# scripts and configure runs. It is not useful on other systems.
7621# If it contains results you don't want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007622#
Michael W. Hudson54241132001-12-07 15:38:26 +00007623# By default, configure uses ./config.cache as the cache file,
7624# creating it if it does not exist already. You can give configure
7625# the --cache-file=FILE option to use a different cache file; that is
7626# what configure does when it calls configure scripts in
7627# subdirectories, so they share the cache.
7628# Giving --cache-file=/dev/null disables caching, for debugging configure.
7629# config.status only pays attention to the cache file if you give it the
7630# --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007631#
Michael W. Hudson54241132001-12-07 15:38:26 +00007632EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007633# The following way of writing the cache mishandles newlines in values,
7634# but we know of no workaround that is simple, portable, and efficient.
7635# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007636# Ultrix sh set writes to stderr and can't be redirected directly,
7637# and sets the high bit in the cache file unless we assign to the vars.
Michael W. Hudson54241132001-12-07 15:38:26 +00007638(set) 2>&1 |
7639 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7640 *ac_space=\ *)
7641 # `set' does not quote correctly, so add quotes (double-quote substitution
7642 # turns \\\\ into \\, and sed turns \\ into \).
7643 sed -n \
7644 -e "s/'/'\\\\''/g" \
7645 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7646 ;;
7647 *)
7648 # `set' quotes correctly as required by POSIX, so do not add quotes.
7649 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7650 ;;
7651 esac >> confcache
7652if cmp -s $cache_file confcache; then
7653 :
7654else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007655 if test -w $cache_file; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007656 echo "updating cache $cache_file"
7657 cat confcache > $cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007658 else
7659 echo "not updating unwritable cache $cache_file"
7660 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007661fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007662rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007663
Michael W. Hudson54241132001-12-07 15:38:26 +00007664trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7665
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007666test "x$prefix" = xNONE && prefix=$ac_default_prefix
7667# Let make expand exec_prefix.
7668test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007669
Michael W. Hudson54241132001-12-07 15:38:26 +00007670# Any assignment to VPATH causes Sun make to only execute
7671# the first set of double-colon rules, so remove it if not needed.
7672# If there is a colon in the path, we need to keep it.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007673if test "x$srcdir" = x.; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007674 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007675fi
7676
Michael W. Hudson54241132001-12-07 15:38:26 +00007677trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7678
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007679DEFS=-DHAVE_CONFIG_H
7680
Michael W. Hudson54241132001-12-07 15:38:26 +00007681# Without the "./", some shells look in PATH for config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007682: ${CONFIG_STATUS=./config.status}
Michael W. Hudson54241132001-12-07 15:38:26 +00007683
7684echo creating $CONFIG_STATUS
7685rm -f $CONFIG_STATUS
7686cat > $CONFIG_STATUS <<EOF
7687#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007688# Generated automatically by configure.
7689# Run this file to recreate the current configuration.
Michael W. Hudson54241132001-12-07 15:38:26 +00007690# This directory was configured as follows,
7691# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7692#
7693# $0 $ac_configure_args
7694#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007695# Compiler output produced by configure, useful for debugging
Michael W. Hudson54241132001-12-07 15:38:26 +00007696# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007697
Michael W. Hudson54241132001-12-07 15:38:26 +00007698ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7699for ac_option
Jack Jansendd19cf82001-12-06 22:36:17 +00007700do
Michael W. Hudson54241132001-12-07 15:38:26 +00007701 case "\$ac_option" in
Jack Jansendd19cf82001-12-06 22:36:17 +00007702 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Michael W. Hudson54241132001-12-07 15:38:26 +00007703 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7704 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7705 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7706 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7707 exit 0 ;;
7708 -help | --help | --hel | --he | --h)
7709 echo "\$ac_cs_usage"; exit 0 ;;
7710 *) echo "\$ac_cs_usage"; exit 1 ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007711 esac
7712done
7713
Michael W. Hudson54241132001-12-07 15:38:26 +00007714ac_given_srcdir=$srcdir
7715ac_given_INSTALL="$INSTALL"
Jack Jansendd19cf82001-12-06 22:36:17 +00007716
Michael W. Hudson54241132001-12-07 15:38:26 +00007717trap 'rm -fr `echo "Makefile.pre Modules/Setup.config pyconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Jack Jansendd19cf82001-12-06 22:36:17 +00007718EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007719cat >> $CONFIG_STATUS <<EOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007720
Michael W. Hudson54241132001-12-07 15:38:26 +00007721# Protect against being on the right side of a sed subst in config.status.
7722sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7723 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7724$ac_vpsub
7725$extrasub
7726s%@SHELL@%$SHELL%g
7727s%@CFLAGS@%$CFLAGS%g
7728s%@CPPFLAGS@%$CPPFLAGS%g
7729s%@CXXFLAGS@%$CXXFLAGS%g
7730s%@FFLAGS@%$FFLAGS%g
7731s%@DEFS@%$DEFS%g
7732s%@LDFLAGS@%$LDFLAGS%g
7733s%@LIBS@%$LIBS%g
7734s%@exec_prefix@%$exec_prefix%g
7735s%@prefix@%$prefix%g
7736s%@program_transform_name@%$program_transform_name%g
7737s%@bindir@%$bindir%g
7738s%@sbindir@%$sbindir%g
7739s%@libexecdir@%$libexecdir%g
7740s%@datadir@%$datadir%g
7741s%@sysconfdir@%$sysconfdir%g
7742s%@sharedstatedir@%$sharedstatedir%g
7743s%@localstatedir@%$localstatedir%g
7744s%@libdir@%$libdir%g
7745s%@includedir@%$includedir%g
7746s%@oldincludedir@%$oldincludedir%g
7747s%@infodir@%$infodir%g
7748s%@mandir@%$mandir%g
7749s%@VERSION@%$VERSION%g
7750s%@CONFIG_ARGS@%$CONFIG_ARGS%g
7751s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7752s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7753s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7754s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
7755s%@MACHDEP@%$MACHDEP%g
7756s%@SGI_ABI@%$SGI_ABI%g
7757s%@CXX@%$CXX%g
7758s%@MAINOBJ@%$MAINOBJ%g
7759s%@CC@%$CC%g
7760s%@CPP@%$CPP%g
7761s%@EXEEXT@%$EXEEXT%g
7762s%@BUILDEXEEXT@%$BUILDEXEEXT%g
7763s%@LIBRARY@%$LIBRARY%g
7764s%@LDLIBRARY@%$LDLIBRARY%g
7765s%@DLLLIBRARY@%$DLLLIBRARY%g
7766s%@BLDLIBRARY@%$BLDLIBRARY%g
7767s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
7768s%@LINKCC@%$LINKCC%g
7769s%@RANLIB@%$RANLIB%g
7770s%@AR@%$AR%g
7771s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7772s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7773s%@INSTALL_DATA@%$INSTALL_DATA%g
7774s%@LN@%$LN%g
7775s%@OPT@%$OPT%g
7776s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
7777s%@SO@%$SO%g
7778s%@LDSHARED@%$LDSHARED%g
7779s%@BLDSHARED@%$BLDSHARED%g
7780s%@CCSHARED@%$CCSHARED%g
7781s%@LINKFORSHARED@%$LINKFORSHARED%g
7782s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
7783s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7784s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
7785s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
7786s%@LDLAST@%$LDLAST%g
7787s%@DLINCLDIR@%$DLINCLDIR%g
7788s%@DYNLOADFILE@%$DYNLOADFILE%g
7789s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
7790s%@LIBOBJS@%$LIBOBJS%g
7791s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7792s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7793s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
7794s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
7795s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
7796s%@LIBM@%$LIBM%g
7797s%@LIBC@%$LIBC%g
7798s%@UNICODE_OBJS@%$UNICODE_OBJS%g
7799s%@THREADHEADERS@%$THREADHEADERS%g
7800s%@SRCDIRS@%$SRCDIRS%g
Jack Jansendd19cf82001-12-06 22:36:17 +00007801
Jack Jansendd19cf82001-12-06 22:36:17 +00007802CEOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007803EOF
7804
Michael W. Hudson54241132001-12-07 15:38:26 +00007805cat >> $CONFIG_STATUS <<\EOF
7806
7807# Split the substitutions into bite-sized pieces for seds with
7808# small command number limits, like on Digital OSF/1 and HP-UX.
7809ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7810ac_file=1 # Number of current file.
7811ac_beg=1 # First line for current file.
7812ac_end=$ac_max_sed_cmds # Line after last line for current file.
7813ac_more_lines=:
7814ac_sed_cmds=""
7815while $ac_more_lines; do
7816 if test $ac_beg -gt 1; then
7817 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7818 else
7819 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00007820 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007821 if test ! -s conftest.s$ac_file; then
7822 ac_more_lines=false
7823 rm -f conftest.s$ac_file
7824 else
7825 if test -z "$ac_sed_cmds"; then
7826 ac_sed_cmds="sed -f conftest.s$ac_file"
7827 else
7828 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7829 fi
7830 ac_file=`expr $ac_file + 1`
7831 ac_beg=$ac_end
7832 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7833 fi
7834done
7835if test -z "$ac_sed_cmds"; then
7836 ac_sed_cmds=cat
7837fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007838EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007839
7840cat >> $CONFIG_STATUS <<EOF
7841
7842CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
7843EOF
7844cat >> $CONFIG_STATUS <<\EOF
7845for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Jack Jansendd19cf82001-12-06 22:36:17 +00007846 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00007847 case "$ac_file" in
7848 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7849 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7850 *) ac_file_in="${ac_file}.in" ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007851 esac
7852
Michael W. Hudson54241132001-12-07 15:38:26 +00007853 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7854
7855 # Remove last slash and all that follows it. Not all systems have dirname.
7856 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007857 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007858 # The file is in a subdirectory.
7859 test ! -d "$ac_dir" && mkdir "$ac_dir"
7860 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007861 # A "../" for each directory in $ac_dir_suffix.
Michael W. Hudson54241132001-12-07 15:38:26 +00007862 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007863 else
7864 ac_dir_suffix= ac_dots=
7865 fi
7866
Michael W. Hudson54241132001-12-07 15:38:26 +00007867 case "$ac_given_srcdir" in
7868 .) srcdir=.
7869 if test -z "$ac_dots"; then top_srcdir=.
7870 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7871 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007872 *) # Relative path.
Michael W. Hudson54241132001-12-07 15:38:26 +00007873 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7874 top_srcdir="$ac_dots$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007875 esac
7876
Michael W. Hudson54241132001-12-07 15:38:26 +00007877 case "$ac_given_INSTALL" in
7878 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7879 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007880 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007881
Michael W. Hudson54241132001-12-07 15:38:26 +00007882 echo creating "$ac_file"
7883 rm -f "$ac_file"
7884 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7885 case "$ac_file" in
7886 *Makefile*) ac_comsub="1i\\
7887# $configure_input" ;;
7888 *) ac_comsub= ;;
7889 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007890
Michael W. Hudson54241132001-12-07 15:38:26 +00007891 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7892 sed -e "$ac_comsub
7893s%@configure_input@%$configure_input%g
7894s%@srcdir@%$srcdir%g
7895s%@top_srcdir@%$top_srcdir%g
7896s%@INSTALL@%$INSTALL%g
7897" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7898fi; done
7899rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007900
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007901# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7902# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007903#
7904# ac_d sets the value in "#define NAME VALUE" lines.
Michael W. Hudson54241132001-12-07 15:38:26 +00007905ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7906ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7907ac_dC='\3'
7908ac_dD='%g'
7909# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7910ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7911ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007912ac_uC=' '
Michael W. Hudson54241132001-12-07 15:38:26 +00007913ac_uD='\4%g'
7914# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7915ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7916ac_eB='$%\1#\2define\3'
7917ac_eC=' '
7918ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007919
Michael W. Hudson54241132001-12-07 15:38:26 +00007920if test "${CONFIG_HEADERS+set}" != set; then
7921EOF
7922cat >> $CONFIG_STATUS <<EOF
7923 CONFIG_HEADERS="pyconfig.h"
7924EOF
7925cat >> $CONFIG_STATUS <<\EOF
7926fi
7927for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007928 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00007929 case "$ac_file" in
7930 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7931 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7932 *) ac_file_in="${ac_file}.in" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007933 esac
7934
Michael W. Hudson54241132001-12-07 15:38:26 +00007935 echo creating $ac_file
Guido van Rossum7f43da71994-08-01 12:15:30 +00007936
Michael W. Hudson54241132001-12-07 15:38:26 +00007937 rm -f conftest.frag conftest.in conftest.out
7938 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7939 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007940
7941EOF
7942
Michael W. Hudson54241132001-12-07 15:38:26 +00007943# Transform confdefs.h into a sed script conftest.vals that substitutes
7944# the proper values into config.h.in to produce config.h. And first:
7945# Protect against being on the right side of a sed subst in config.status.
7946# Protect against being in an unquoted here document in config.status.
7947rm -f conftest.vals
7948cat > conftest.hdr <<\EOF
7949s/[\\&%]/\\&/g
7950s%[\\$`]%\\&%g
7951s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7952s%ac_d%ac_u%gp
7953s%ac_u%ac_e%gp
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007954EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007955sed -n -f conftest.hdr confdefs.h > conftest.vals
7956rm -f conftest.hdr
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007957
7958# This sed command replaces #undef with comments. This is necessary, for
7959# example, in the case of _POSIX_SOURCE, which is predefined and required
7960# on some systems where configure will not decide to define it.
Michael W. Hudson54241132001-12-07 15:38:26 +00007961cat >> conftest.vals <<\EOF
7962s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007963EOF
7964
Michael W. Hudson54241132001-12-07 15:38:26 +00007965# Break up conftest.vals because some shells have a limit on
7966# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007967
Jack Jansendd19cf82001-12-06 22:36:17 +00007968rm -f conftest.tail
Michael W. Hudson54241132001-12-07 15:38:26 +00007969while :
Jack Jansendd19cf82001-12-06 22:36:17 +00007970do
Michael W. Hudson54241132001-12-07 15:38:26 +00007971 ac_lines=`grep -c . conftest.vals`
7972 # grep -c gives empty output for an empty file on some AIX systems.
7973 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7974 # Write a limited-size here document to conftest.frag.
7975 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7976 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +00007977 echo 'CEOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007978 sed -f conftest.frag conftest.in > conftest.out
7979 rm -f conftest.in
7980 mv conftest.out conftest.in
7981' >> $CONFIG_STATUS
7982 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7983 rm -f conftest.vals
7984 mv conftest.tail conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00007985done
Michael W. Hudson54241132001-12-07 15:38:26 +00007986rm -f conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00007987
Michael W. Hudson54241132001-12-07 15:38:26 +00007988cat >> $CONFIG_STATUS <<\EOF
7989 rm -f conftest.frag conftest.h
7990 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7991 cat conftest.in >> conftest.h
7992 rm -f conftest.in
7993 if cmp -s $ac_file conftest.h 2>/dev/null; then
7994 echo "$ac_file is unchanged"
7995 rm -f conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007996 else
Michael W. Hudson54241132001-12-07 15:38:26 +00007997 # Remove last slash and all that follows it. Not all systems have dirname.
7998 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Jack Jansendd19cf82001-12-06 22:36:17 +00007999 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00008000 # The file is in a subdirectory.
8001 test ! -d "$ac_dir" && mkdir "$ac_dir"
Jack Jansendd19cf82001-12-06 22:36:17 +00008002 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008003 rm -f $ac_file
8004 mv conftest.h $ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00008005 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008006fi; done
8007
Guido van Rossumf78abae1997-01-21 22:02:36 +00008008EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008009cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00008010
Michael W. Hudson54241132001-12-07 15:38:26 +00008011EOF
8012cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008013
Michael W. Hudson54241132001-12-07 15:38:26 +00008014exit 0
Guido van Rossum627b2d71993-12-24 10:39:16 +00008015EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008016chmod +x $CONFIG_STATUS
Michael W. Hudson54241132001-12-07 15:38:26 +00008017rm -fr confdefs* $ac_clean_files
8018test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00008019
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008020
8021echo "creating Setup"
8022if test ! -f Modules/Setup
8023then
8024 cp $srcdir/Modules/Setup.dist Modules/Setup
8025fi
8026
8027echo "creating Setup.local"
8028if test ! -f Modules/Setup.local
8029then
8030 echo "# Edit this file for local setup changes" >Modules/Setup.local
8031fi
8032
8033echo "creating Makefile"
8034$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
8035 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00008036 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008037mv config.c Modules