blob: 14297567df1919b9bd9d25afec7329f4919d7c84 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Michael W. Hudson54241132001-12-07 15:38:26 +00002
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00003# From configure.in Revision: 1.296
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*)
Jack Jansen524a0982002-03-12 15:25:52 +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*)
Jack Jansen524a0982002-03-12 15:25:52 +00001692 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00001693 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;
Jack Jansen4f8d0542002-03-08 13:43:01 +00001810 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001811 return 0;
1812}
1813
Michael W. Hudson54241132001-12-07 15:38:26 +00001814EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00001815if { (eval echo configure:1816: \"$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 +00001816then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001817 ac_cv_pthread_is_default=yes
1818else
Michael W. Hudson54241132001-12-07 15:38:26 +00001819 echo "configure: failed program was:" >&5
1820 cat conftest.$ac_ext >&5
1821 rm -fr conftest*
1822 ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001823fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001824rm -fr conftest*
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001825fi
1826
Michael W. Hudson54241132001-12-07 15:38:26 +00001827
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001828fi
1829
Michael W. Hudson54241132001-12-07 15:38:26 +00001830echo "$ac_t""$ac_cv_pthread_is_default" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001831
Michael W. Hudson54241132001-12-07 15:38:26 +00001832
1833if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001834then
1835 ac_cv_kpthread=no
1836else
1837# -Kpthread, if available, provides the right #defines
1838# and linker options to make pthread_create available
1839# Some compilers won't report that they do not support -Kpthread,
1840# so we need to run a program to see whether it really made the
1841# function available.
Michael W. Hudson54241132001-12-07 15:38:26 +00001842echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00001843echo "configure:1844: checking whether $CC accepts -Kpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001844if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1845 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001846else
1847 ac_save_cc="$CC"
1848CC="$CC -Kpthread"
1849if test "$cross_compiling" = yes; then
1850 ac_cv_kpthread=no
1851else
Michael W. Hudson54241132001-12-07 15:38:26 +00001852 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00001853#line 1854 "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001854#include "confdefs.h"
1855
1856#include <pthread.h>
1857
1858void* routine(void* p){return NULL;}
1859
1860int main(){
1861 pthread_t p;
1862 if(pthread_create(&p,NULL,routine,NULL)!=0)
1863 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00001864 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001865 return 0;
1866}
1867
Michael W. Hudson54241132001-12-07 15:38:26 +00001868EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00001869if { (eval echo configure:1870: \"$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 +00001870then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001871 ac_cv_kpthread=yes
1872else
Michael W. Hudson54241132001-12-07 15:38:26 +00001873 echo "configure: failed program was:" >&5
1874 cat conftest.$ac_ext >&5
1875 rm -fr conftest*
1876 ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00001877fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001878rm -fr conftest*
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001879fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001880
Martin v. Löwis130fb172001-07-19 11:00:41 +00001881CC="$ac_save_cc"
1882fi
1883
Michael W. Hudson54241132001-12-07 15:38:26 +00001884echo "$ac_t""$ac_cv_kpthread" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001885fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00001886
Michael W. Hudson54241132001-12-07 15:38:26 +00001887
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001888# checks for header files
Michael W. Hudson54241132001-12-07 15:38:26 +00001889echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00001890echo "configure:1891: checking for ANSI C header files" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001891if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1892 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001893else
Michael W. Hudson54241132001-12-07 15:38:26 +00001894 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00001895#line 1896 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001896#include "confdefs.h"
1897#include <stdlib.h>
1898#include <stdarg.h>
1899#include <string.h>
1900#include <float.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001901EOF
1902ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen4f8d0542002-03-08 13:43:01 +00001903{ (eval echo configure:1904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001904ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1905if test -z "$ac_err"; then
1906 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001907 ac_cv_header_stdc=yes
1908else
Michael W. Hudson54241132001-12-07 15:38:26 +00001909 echo "$ac_err" >&5
1910 echo "configure: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001911 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001912 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001913 ac_cv_header_stdc=no
1914fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001915rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001916
1917if test $ac_cv_header_stdc = yes; then
1918 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Michael W. Hudson54241132001-12-07 15:38:26 +00001919cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00001920#line 1921 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001921#include "confdefs.h"
1922#include <string.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001923EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1925 egrep "memchr" >/dev/null 2>&1; then
1926 :
1927else
Michael W. Hudson54241132001-12-07 15:38:26 +00001928 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001929 ac_cv_header_stdc=no
1930fi
1931rm -f conftest*
1932
1933fi
1934
1935if test $ac_cv_header_stdc = yes; then
1936 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Michael W. Hudson54241132001-12-07 15:38:26 +00001937cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00001938#line 1939 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001939#include "confdefs.h"
1940#include <stdlib.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001941EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001942if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1943 egrep "free" >/dev/null 2>&1; then
1944 :
1945else
Michael W. Hudson54241132001-12-07 15:38:26 +00001946 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001947 ac_cv_header_stdc=no
1948fi
1949rm -f conftest*
1950
1951fi
1952
1953if test $ac_cv_header_stdc = yes; then
1954 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Michael W. Hudson54241132001-12-07 15:38:26 +00001955if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001956 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001957else
Michael W. Hudson54241132001-12-07 15:38:26 +00001958 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00001959#line 1960 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001960#include "confdefs.h"
1961#include <ctype.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001962#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1963#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Jack Jansendd19cf82001-12-06 22:36:17 +00001964#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Michael W. Hudson54241132001-12-07 15:38:26 +00001965int main () { int i; for (i = 0; i < 256; i++)
1966if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1967exit (0); }
1968
1969EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00001970if { (eval echo configure:1971: \"$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 +00001971then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001972 :
1973else
Michael W. Hudson54241132001-12-07 15:38:26 +00001974 echo "configure: failed program was:" >&5
1975 cat conftest.$ac_ext >&5
1976 rm -fr conftest*
1977 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001978fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001979rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00001980fi
Jack Jansendd19cf82001-12-06 22:36:17 +00001981
Michael W. Hudson54241132001-12-07 15:38:26 +00001982fi
1983fi
1984
1985echo "$ac_t""$ac_cv_header_stdc" 1>&6
1986if test $ac_cv_header_stdc = yes; then
1987 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001988#define STDC_HEADERS 1
1989EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001990
1991fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001992
Michael W. Hudson54241132001-12-07 15:38:26 +00001993for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h locale.h \
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001994ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00001995signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00001996sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00001997sys/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 +00001998sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00001999ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00002000do
Michael W. Hudson54241132001-12-07 15:38:26 +00002001ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2002echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002003echo "configure:2004: checking for $ac_hdr" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002004if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2005 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002006else
Michael W. Hudson54241132001-12-07 15:38:26 +00002007 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002008#line 2009 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002009#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002010#include <$ac_hdr>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002011EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002012ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen4f8d0542002-03-08 13:43:01 +00002013{ (eval echo configure:2014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002014ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2015if test -z "$ac_err"; then
2016 rm -rf conftest*
2017 eval "ac_cv_header_$ac_safe=yes"
2018else
2019 echo "$ac_err" >&5
2020 echo "configure: failed program was:" >&5
2021 cat conftest.$ac_ext >&5
2022 rm -rf conftest*
2023 eval "ac_cv_header_$ac_safe=no"
2024fi
2025rm -f conftest*
2026fi
2027if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2028 echo "$ac_t""yes" 1>&6
2029 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2030 cat >> confdefs.h <<EOF
2031#define $ac_tr_hdr 1
2032EOF
2033
2034else
2035 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002036fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002037done
2038
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002039ac_header_dirent=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002040for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2041do
2042ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2043echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002044echo "configure:2045: checking for $ac_hdr that defines DIR" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002045if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2046 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002047else
Michael W. Hudson54241132001-12-07 15:38:26 +00002048 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002049#line 2050 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002050#include "confdefs.h"
2051#include <sys/types.h>
2052#include <$ac_hdr>
Michael W. Hudson54241132001-12-07 15:38:26 +00002053int main() {
2054DIR *dirp = 0;
2055; return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002056EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002057if { (eval echo configure:2058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002058 rm -rf conftest*
2059 eval "ac_cv_header_dirent_$ac_safe=yes"
2060else
2061 echo "configure: failed program was:" >&5
2062 cat conftest.$ac_ext >&5
2063 rm -rf conftest*
2064 eval "ac_cv_header_dirent_$ac_safe=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002065fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002066rm -f conftest*
2067fi
2068if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2069 echo "$ac_t""yes" 1>&6
2070 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2071 cat >> confdefs.h <<EOF
2072#define $ac_tr_hdr 1
2073EOF
2074 ac_header_dirent=$ac_hdr; break
2075else
2076 echo "$ac_t""no" 1>&6
2077fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002078done
2079# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2080if test $ac_header_dirent = dirent.h; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002081echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002082echo "configure:2083: checking for opendir in -ldir" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002083ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2084if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2085 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002086else
Michael W. Hudson54241132001-12-07 15:38:26 +00002087 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002088LIBS="-ldir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00002089cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002090#line 2091 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002091#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002092/* Override any gcc2 internal prototype to avoid an error. */
2093/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00002094 builtin and then its argument prototype would still apply. */
2095char opendir();
2096
2097int main() {
2098opendir()
2099; return 0; }
2100EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002101if { (eval echo configure:2102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002102 rm -rf conftest*
2103 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002104else
Michael W. Hudson54241132001-12-07 15:38:26 +00002105 echo "configure: failed program was:" >&5
2106 cat conftest.$ac_ext >&5
2107 rm -rf conftest*
2108 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002109fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002110rm -f conftest*
2111LIBS="$ac_save_LIBS"
2112
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002113fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002114if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2115 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002116 LIBS="$LIBS -ldir"
Michael W. Hudson54241132001-12-07 15:38:26 +00002117else
2118 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002119fi
2120
2121else
Michael W. Hudson54241132001-12-07 15:38:26 +00002122echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002123echo "configure:2124: checking for opendir in -lx" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002124ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2125if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2126 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002127else
Michael W. Hudson54241132001-12-07 15:38:26 +00002128 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002129LIBS="-lx $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00002130cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002131#line 2132 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002132#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002133/* Override any gcc2 internal prototype to avoid an error. */
2134/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00002135 builtin and then its argument prototype would still apply. */
2136char opendir();
2137
2138int main() {
2139opendir()
2140; return 0; }
2141EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002142if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002143 rm -rf conftest*
2144 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002145else
Michael W. Hudson54241132001-12-07 15:38:26 +00002146 echo "configure: failed program was:" >&5
2147 cat conftest.$ac_ext >&5
2148 rm -rf conftest*
2149 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002150fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002151rm -f conftest*
2152LIBS="$ac_save_LIBS"
2153
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002154fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002155if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2156 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002157 LIBS="$LIBS -lx"
Michael W. Hudson54241132001-12-07 15:38:26 +00002158else
2159 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002160fi
2161
2162fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002163
Michael W. Hudson54241132001-12-07 15:38:26 +00002164
Guido van Rossum627b2d71993-12-24 10:39:16 +00002165# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002166was_it_defined=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002167echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002168echo "configure:2169: checking for clock_t in time.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002169cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002170#line 2171 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002171#include "confdefs.h"
2172#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002173EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2175 egrep "clock_t" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002176 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00002177 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002178else
Michael W. Hudson54241132001-12-07 15:38:26 +00002179 rm -rf conftest*
2180 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002181#define clock_t long
2182EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002183
2184fi
2185rm -f conftest*
2186
Michael W. Hudson54241132001-12-07 15:38:26 +00002187echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002188
Guido van Rossum810cc512001-09-09 23:51:39 +00002189# Two defines needed to enable largefile support on various platforms
2190# These may affect some typedefs
Michael W. Hudson54241132001-12-07 15:38:26 +00002191cat >> confdefs.h <<\EOF
Guido van Rossum810cc512001-09-09 23:51:39 +00002192#define _LARGEFILE_SOURCE 1
2193EOF
2194
Michael W. Hudson54241132001-12-07 15:38:26 +00002195cat >> confdefs.h <<\EOF
Guido van Rossum810cc512001-09-09 23:51:39 +00002196#define _FILE_OFFSET_BITS 64
2197EOF
2198
Michael W. Hudson54241132001-12-07 15:38:26 +00002199
Guido van Rossum84e7b241996-08-19 21:59:00 +00002200# Add some code to confdefs.h so that the test for off_t works on SCO
2201cat >> confdefs.h <<\EOF
2202#if defined(SCO_DS)
2203#undef _OFF_T
2204#endif
2205EOF
2206
Guido van Rossumef2255b2000-03-10 22:30:29 +00002207# Type availability checks
Michael W. Hudson54241132001-12-07 15:38:26 +00002208echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002209echo "configure:2210: checking for mode_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002210if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2211 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002212else
Michael W. Hudson54241132001-12-07 15:38:26 +00002213 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002214#line 2215 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002215#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002216#include <sys/types.h>
2217#if STDC_HEADERS
2218#include <stdlib.h>
2219#include <stddef.h>
2220#endif
Jack Jansendd19cf82001-12-06 22:36:17 +00002221EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2223 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2224 rm -rf conftest*
Jack Jansendd19cf82001-12-06 22:36:17 +00002225 ac_cv_type_mode_t=yes
2226else
Michael W. Hudson54241132001-12-07 15:38:26 +00002227 rm -rf conftest*
2228 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00002229fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002230rm -f conftest*
Jack Jansendd19cf82001-12-06 22:36:17 +00002231
Michael W. Hudson54241132001-12-07 15:38:26 +00002232fi
2233echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2234if test $ac_cv_type_mode_t = no; then
2235 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002236#define mode_t int
2237EOF
2238
2239fi
2240
Michael W. Hudson54241132001-12-07 15:38:26 +00002241echo $ac_n "checking for off_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002242echo "configure:2243: checking for off_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002243if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2244 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002245else
Michael W. Hudson54241132001-12-07 15:38:26 +00002246 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002247#line 2248 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002248#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002249#include <sys/types.h>
2250#if STDC_HEADERS
2251#include <stdlib.h>
2252#include <stddef.h>
2253#endif
2254EOF
2255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2256 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2257 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002258 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002259else
Michael W. Hudson54241132001-12-07 15:38:26 +00002260 rm -rf conftest*
2261 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002262fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002263rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002264
Michael W. Hudson54241132001-12-07 15:38:26 +00002265fi
2266echo "$ac_t""$ac_cv_type_off_t" 1>&6
2267if test $ac_cv_type_off_t = no; then
2268 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002269#define off_t long
2270EOF
2271
2272fi
2273
Michael W. Hudson54241132001-12-07 15:38:26 +00002274echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002275echo "configure:2276: checking for pid_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002276if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2277 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002278else
Michael W. Hudson54241132001-12-07 15:38:26 +00002279 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002280#line 2281 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002281#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002282#include <sys/types.h>
2283#if STDC_HEADERS
2284#include <stdlib.h>
2285#include <stddef.h>
2286#endif
2287EOF
2288if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2289 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2290 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002291 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002292else
Michael W. Hudson54241132001-12-07 15:38:26 +00002293 rm -rf conftest*
2294 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002295fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002296rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002297
Michael W. Hudson54241132001-12-07 15:38:26 +00002298fi
2299echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2300if test $ac_cv_type_pid_t = no; then
2301 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002302#define pid_t int
2303EOF
2304
2305fi
2306
Michael W. Hudson54241132001-12-07 15:38:26 +00002307echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002308echo "configure:2309: checking return type of signal handlers" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002309if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2310 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002311else
Michael W. Hudson54241132001-12-07 15:38:26 +00002312 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002313#line 2314 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002314#include "confdefs.h"
2315#include <sys/types.h>
2316#include <signal.h>
2317#ifdef signal
Michael W. Hudson54241132001-12-07 15:38:26 +00002318#undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00002319#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002320#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002321extern "C" void (*signal (int, void (*)(int)))(int);
2322#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002323void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002324#endif
2325
Michael W. Hudson54241132001-12-07 15:38:26 +00002326int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002327int i;
Michael W. Hudson54241132001-12-07 15:38:26 +00002328; return 0; }
2329EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002330if { (eval echo configure:2331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002331 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002332 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002333else
Michael W. Hudson54241132001-12-07 15:38:26 +00002334 echo "configure: failed program was:" >&5
2335 cat conftest.$ac_ext >&5
2336 rm -rf conftest*
2337 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002338fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002339rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002340fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002341
Michael W. Hudson54241132001-12-07 15:38:26 +00002342echo "$ac_t""$ac_cv_type_signal" 1>&6
2343cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002344#define RETSIGTYPE $ac_cv_type_signal
2345EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002346
Michael W. Hudson54241132001-12-07 15:38:26 +00002347
2348echo $ac_n "checking for size_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002349echo "configure:2350: checking for size_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002350if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2351 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002352else
Michael W. Hudson54241132001-12-07 15:38:26 +00002353 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002354#line 2355 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002355#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002356#include <sys/types.h>
2357#if STDC_HEADERS
2358#include <stdlib.h>
2359#include <stddef.h>
2360#endif
2361EOF
2362if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2363 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2364 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002365 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002366else
Michael W. Hudson54241132001-12-07 15:38:26 +00002367 rm -rf conftest*
2368 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002369fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002370rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002371
Michael W. Hudson54241132001-12-07 15:38:26 +00002372fi
2373echo "$ac_t""$ac_cv_type_size_t" 1>&6
2374if test $ac_cv_type_size_t = no; then
2375 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002376#define size_t unsigned
2377EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002378
2379fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002380
Michael W. Hudson54241132001-12-07 15:38:26 +00002381echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002382echo "configure:2383: checking for uid_t in sys/types.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002383if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2384 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002385else
Michael W. Hudson54241132001-12-07 15:38:26 +00002386 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002387#line 2388 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002388#include "confdefs.h"
2389#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002390EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2392 egrep "uid_t" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002393 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002394 ac_cv_type_uid_t=yes
2395else
Michael W. Hudson54241132001-12-07 15:38:26 +00002396 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002397 ac_cv_type_uid_t=no
2398fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002399rm -f conftest*
2400
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002401fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002402
Michael W. Hudson54241132001-12-07 15:38:26 +00002403echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2404if test $ac_cv_type_uid_t = no; then
2405 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002406#define uid_t int
2407EOF
2408
Michael W. Hudson54241132001-12-07 15:38:26 +00002409 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002410#define gid_t int
2411EOF
2412
2413fi
2414
Jack Jansendd19cf82001-12-06 22:36:17 +00002415
Michael W. Hudson54241132001-12-07 15:38:26 +00002416# Sizes of various common basic types
2417echo $ac_n "checking size of int""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002418echo "configure:2419: checking size of int" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002419if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2420 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002421else
2422 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002423 ac_cv_sizeof_int=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002424else
Michael W. Hudson54241132001-12-07 15:38:26 +00002425 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002426#line 2427 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002427#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002428#include <stdio.h>
2429main()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002430{
Michael W. Hudson54241132001-12-07 15:38:26 +00002431 FILE *f=fopen("conftestval", "w");
2432 if (!f) exit(1);
2433 fprintf(f, "%d\n", sizeof(int));
2434 exit(0);
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002435}
Michael W. Hudson54241132001-12-07 15:38:26 +00002436EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002437if { (eval echo configure:2438: \"$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 +00002438then
2439 ac_cv_sizeof_int=`cat conftestval`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002440else
Michael W. Hudson54241132001-12-07 15:38:26 +00002441 echo "configure: failed program was:" >&5
2442 cat conftest.$ac_ext >&5
2443 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002444 ac_cv_sizeof_int=0
2445fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002446rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002447fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002448
2449fi
2450echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2451cat >> confdefs.h <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002452#define SIZEOF_INT $ac_cv_sizeof_int
2453EOF
2454
2455
Michael W. Hudson54241132001-12-07 15:38:26 +00002456echo $ac_n "checking size of long""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002457echo "configure:2458: checking size of long" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002458if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2459 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002460else
2461 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002462 ac_cv_sizeof_long=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002463else
Michael W. Hudson54241132001-12-07 15:38:26 +00002464 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002465#line 2466 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002466#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002467#include <stdio.h>
2468main()
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
Jack Jansen4f8d0542002-03-08 13:43:01 +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
Jack Jansen4f8d0542002-03-08 13:43:01 +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
Jack Jansen4f8d0542002-03-08 13:43:01 +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>
2507main()
Guido van Rossumad678af1998-10-02 14:42:15 +00002508{
Michael W. Hudson54241132001-12-07 15:38:26 +00002509 FILE *f=fopen("conftestval", "w");
2510 if (!f) exit(1);
2511 fprintf(f, "%d\n", sizeof(void *));
2512 exit(0);
Guido van Rossumad678af1998-10-02 14:42:15 +00002513}
Michael W. Hudson54241132001-12-07 15:38:26 +00002514EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002515if { (eval echo configure:2516: \"$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 +00002516then
2517 ac_cv_sizeof_void_p=`cat conftestval`
Guido van Rossumad678af1998-10-02 14:42:15 +00002518else
Michael W. Hudson54241132001-12-07 15:38:26 +00002519 echo "configure: failed program was:" >&5
2520 cat conftest.$ac_ext >&5
2521 rm -fr conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00002522 ac_cv_sizeof_void_p=0
2523fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002524rm -fr conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00002525fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002526
2527fi
2528echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2529cat >> confdefs.h <<EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00002530#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2531EOF
2532
2533
Michael W. Hudson54241132001-12-07 15:38:26 +00002534echo $ac_n "checking size of char""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002535echo "configure:2536: checking size of char" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002536if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2537 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002538else
2539 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002540 ac_cv_sizeof_char=1
Guido van Rossumef2255b2000-03-10 22:30:29 +00002541else
Michael W. Hudson54241132001-12-07 15:38:26 +00002542 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002543#line 2544 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002544#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002545#include <stdio.h>
2546main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002547{
Michael W. Hudson54241132001-12-07 15:38:26 +00002548 FILE *f=fopen("conftestval", "w");
2549 if (!f) exit(1);
2550 fprintf(f, "%d\n", sizeof(char));
2551 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002552}
Michael W. Hudson54241132001-12-07 15:38:26 +00002553EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002554if { (eval echo configure:2555: \"$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 +00002555then
2556 ac_cv_sizeof_char=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002557else
Michael W. Hudson54241132001-12-07 15:38:26 +00002558 echo "configure: failed program was:" >&5
2559 cat conftest.$ac_ext >&5
2560 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002561 ac_cv_sizeof_char=0
2562fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002563rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002564fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002565
2566fi
2567echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2568cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002569#define SIZEOF_CHAR $ac_cv_sizeof_char
2570EOF
2571
2572
Michael W. Hudson54241132001-12-07 15:38:26 +00002573echo $ac_n "checking size of short""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002574echo "configure:2575: checking size of short" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002575if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2576 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002577else
2578 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002579 ac_cv_sizeof_short=2
Guido van Rossumef2255b2000-03-10 22:30:29 +00002580else
Michael W. Hudson54241132001-12-07 15:38:26 +00002581 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002582#line 2583 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002583#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002584#include <stdio.h>
2585main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002586{
Michael W. Hudson54241132001-12-07 15:38:26 +00002587 FILE *f=fopen("conftestval", "w");
2588 if (!f) exit(1);
2589 fprintf(f, "%d\n", sizeof(short));
2590 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002591}
Michael W. Hudson54241132001-12-07 15:38:26 +00002592EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002593if { (eval echo configure:2594: \"$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 +00002594then
2595 ac_cv_sizeof_short=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002596else
Michael W. Hudson54241132001-12-07 15:38:26 +00002597 echo "configure: failed program was:" >&5
2598 cat conftest.$ac_ext >&5
2599 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002600 ac_cv_sizeof_short=0
2601fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002602rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002603fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002604
2605fi
2606echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2607cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002608#define SIZEOF_SHORT $ac_cv_sizeof_short
2609EOF
2610
2611
Michael W. Hudson54241132001-12-07 15:38:26 +00002612echo $ac_n "checking size of float""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002613echo "configure:2614: checking size of float" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002614if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
2615 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002616else
2617 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002618 ac_cv_sizeof_float=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00002619else
Michael W. Hudson54241132001-12-07 15:38:26 +00002620 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002621#line 2622 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002622#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002623#include <stdio.h>
2624main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002625{
Michael W. Hudson54241132001-12-07 15:38:26 +00002626 FILE *f=fopen("conftestval", "w");
2627 if (!f) exit(1);
2628 fprintf(f, "%d\n", sizeof(float));
2629 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002630}
Michael W. Hudson54241132001-12-07 15:38:26 +00002631EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002632if { (eval echo configure:2633: \"$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 +00002633then
2634 ac_cv_sizeof_float=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002635else
Michael W. Hudson54241132001-12-07 15:38:26 +00002636 echo "configure: failed program was:" >&5
2637 cat conftest.$ac_ext >&5
2638 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002639 ac_cv_sizeof_float=0
2640fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002641rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002642fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002643
2644fi
2645echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2646cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002647#define SIZEOF_FLOAT $ac_cv_sizeof_float
2648EOF
2649
2650
Michael W. Hudson54241132001-12-07 15:38:26 +00002651echo $ac_n "checking size of double""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002652echo "configure:2653: checking size of double" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002653if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
2654 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002655else
2656 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002657 ac_cv_sizeof_double=8
Guido van Rossumef2255b2000-03-10 22:30:29 +00002658else
Michael W. Hudson54241132001-12-07 15:38:26 +00002659 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002660#line 2661 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002661#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002662#include <stdio.h>
2663main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002664{
Michael W. Hudson54241132001-12-07 15:38:26 +00002665 FILE *f=fopen("conftestval", "w");
2666 if (!f) exit(1);
2667 fprintf(f, "%d\n", sizeof(double));
2668 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002669}
Michael W. Hudson54241132001-12-07 15:38:26 +00002670EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002671if { (eval echo configure:2672: \"$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 +00002672then
2673 ac_cv_sizeof_double=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002674else
Michael W. Hudson54241132001-12-07 15:38:26 +00002675 echo "configure: failed program was:" >&5
2676 cat conftest.$ac_ext >&5
2677 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002678 ac_cv_sizeof_double=0
2679fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002680rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002681fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002682
2683fi
2684echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2685cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002686#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2687EOF
2688
2689
Michael W. Hudson54241132001-12-07 15:38:26 +00002690echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002691echo "configure:2692: checking size of fpos_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002692if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
2693 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002694else
2695 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002696 ac_cv_sizeof_fpos_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002697else
Michael W. Hudson54241132001-12-07 15:38:26 +00002698 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002699#line 2700 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002700#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002701#include <stdio.h>
2702main()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002703{
Michael W. Hudson54241132001-12-07 15:38:26 +00002704 FILE *f=fopen("conftestval", "w");
2705 if (!f) exit(1);
2706 fprintf(f, "%d\n", sizeof(fpos_t));
2707 exit(0);
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002708}
Michael W. Hudson54241132001-12-07 15:38:26 +00002709EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002710if { (eval echo configure:2711: \"$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 +00002711then
2712 ac_cv_sizeof_fpos_t=`cat conftestval`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002713else
Michael W. Hudson54241132001-12-07 15:38:26 +00002714 echo "configure: failed program was:" >&5
2715 cat conftest.$ac_ext >&5
2716 rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002717 ac_cv_sizeof_fpos_t=0
2718fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002719rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002720fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002721
2722fi
2723echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2724cat >> confdefs.h <<EOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002725#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2726EOF
2727
Michael W. Hudson54241132001-12-07 15:38:26 +00002728
2729
2730echo $ac_n "checking for long long support""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002731echo "configure:2732: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002732have_long_long=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002733cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002734#line 2735 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002735#include "confdefs.h"
2736
Michael W. Hudson54241132001-12-07 15:38:26 +00002737int main() {
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002738long long x; x = (long long)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002739; return 0; }
2740EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002741if { (eval echo configure:2742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002742 rm -rf conftest*
2743 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002744#define HAVE_LONG_LONG 1
2745EOF
2746 have_long_long=yes
2747else
Michael W. Hudson54241132001-12-07 15:38:26 +00002748 echo "configure: failed program was:" >&5
2749 cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002750fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002751rm -f conftest*
2752echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002753if test "$have_long_long" = yes ; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002754echo $ac_n "checking size of long long""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002755echo "configure:2756: checking size of long long" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002756if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2757 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002758else
2759 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002760 ac_cv_sizeof_long_long=8
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002761else
Michael W. Hudson54241132001-12-07 15:38:26 +00002762 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002763#line 2764 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002764#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002765#include <stdio.h>
2766main()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002767{
Michael W. Hudson54241132001-12-07 15:38:26 +00002768 FILE *f=fopen("conftestval", "w");
2769 if (!f) exit(1);
2770 fprintf(f, "%d\n", sizeof(long long));
2771 exit(0);
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002772}
Michael W. Hudson54241132001-12-07 15:38:26 +00002773EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002774if { (eval echo configure:2775: \"$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 +00002775then
2776 ac_cv_sizeof_long_long=`cat conftestval`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002777else
Michael W. Hudson54241132001-12-07 15:38:26 +00002778 echo "configure: failed program was:" >&5
2779 cat conftest.$ac_ext >&5
2780 rm -fr conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002781 ac_cv_sizeof_long_long=0
2782fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002783rm -fr conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002784fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002785
2786fi
2787echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2788cat >> confdefs.h <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002789#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2790EOF
2791
Michael W. Hudson54241132001-12-07 15:38:26 +00002792
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002793fi
2794
Michael W. Hudson54241132001-12-07 15:38:26 +00002795echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002796echo "configure:2797: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002797have_uintptr_t=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002798cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002799#line 2800 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002800#include "confdefs.h"
2801
Michael W. Hudson54241132001-12-07 15:38:26 +00002802int main() {
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002803uintptr_t x; x = (uintptr_t)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002804; return 0; }
2805EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002806if { (eval echo configure:2807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002807 rm -rf conftest*
2808 cat >> confdefs.h <<\EOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002809#define HAVE_UINTPTR_T 1
2810EOF
2811 have_uintptr_t=yes
2812else
Michael W. Hudson54241132001-12-07 15:38:26 +00002813 echo "configure: failed program was:" >&5
2814 cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002815fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002816rm -f conftest*
2817echo "$ac_t""$have_uintptr_t" 1>&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002818if test "$have_uintptr_t" = yes ; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002819echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002820echo "configure:2821: checking size of uintptr_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002821if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
2822 echo $ac_n "(cached) $ac_c" 1>&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002823else
2824 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002825 ac_cv_sizeof_uintptr_t=4
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002826else
Michael W. Hudson54241132001-12-07 15:38:26 +00002827 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002828#line 2829 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002829#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002830#include <stdio.h>
2831main()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002832{
Michael W. Hudson54241132001-12-07 15:38:26 +00002833 FILE *f=fopen("conftestval", "w");
2834 if (!f) exit(1);
2835 fprintf(f, "%d\n", sizeof(uintptr_t));
2836 exit(0);
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002837}
Michael W. Hudson54241132001-12-07 15:38:26 +00002838EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002839if { (eval echo configure:2840: \"$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 +00002840then
2841 ac_cv_sizeof_uintptr_t=`cat conftestval`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002842else
Michael W. Hudson54241132001-12-07 15:38:26 +00002843 echo "configure: failed program was:" >&5
2844 cat conftest.$ac_ext >&5
2845 rm -fr conftest*
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002846 ac_cv_sizeof_uintptr_t=0
2847fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002848rm -fr conftest*
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002849fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002850
2851fi
2852echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2853cat >> confdefs.h <<EOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002854#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2855EOF
2856
Michael W. Hudson54241132001-12-07 15:38:26 +00002857
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002858fi
2859
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002860# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002861echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002862echo "configure:2863: checking size of off_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002863if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
2864 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002865else
2866 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002867 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002868else
Michael W. Hudson54241132001-12-07 15:38:26 +00002869 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002870#line 2871 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002871#include "confdefs.h"
2872#include <stdio.h>
2873#include <sys/types.h>
2874main()
2875{
2876 FILE *f=fopen("conftestval", "w");
2877 if (!f) exit(1);
2878 fprintf(f, "%d\n", sizeof(off_t));
2879 exit(0);
2880}
Michael W. Hudson54241132001-12-07 15:38:26 +00002881EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002882if { (eval echo configure:2883: \"$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 +00002883then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002884 ac_cv_sizeof_off_t=`cat conftestval`
2885else
Michael W. Hudson54241132001-12-07 15:38:26 +00002886 echo "configure: failed program was:" >&5
2887 cat conftest.$ac_ext >&5
2888 rm -fr conftest*
2889 ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002890fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002891rm -fr conftest*
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002892fi
2893
Michael W. Hudson54241132001-12-07 15:38:26 +00002894
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002895fi
2896
Michael W. Hudson54241132001-12-07 15:38:26 +00002897echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2898cat >> confdefs.h <<EOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002899#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2900EOF
2901
Michael W. Hudson54241132001-12-07 15:38:26 +00002902
2903echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002904echo "configure:2905: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002905if test "$have_long_long" = yes -a \
2906 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2907 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002908 cat >> confdefs.h <<\EOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002909#define HAVE_LARGEFILE_SUPPORT 1
2910EOF
2911
Michael W. Hudson54241132001-12-07 15:38:26 +00002912 echo "$ac_t""yes" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002913else
Michael W. Hudson54241132001-12-07 15:38:26 +00002914 echo "$ac_t""no" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002915fi
2916
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002917# AC_CHECK_SIZEOF() doesn't include <time.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002918echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002919echo "configure:2920: checking size of time_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002920if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
2921 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002922else
2923 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002924 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002925else
Michael W. Hudson54241132001-12-07 15:38:26 +00002926 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002927#line 2928 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002928#include "confdefs.h"
2929#include <stdio.h>
2930#include <time.h>
2931main()
2932{
2933 FILE *f=fopen("conftestval", "w");
2934 if (!f) exit(1);
2935 fprintf(f, "%d\n", sizeof(time_t));
2936 exit(0);
2937}
Michael W. Hudson54241132001-12-07 15:38:26 +00002938EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002939if { (eval echo configure:2940: \"$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 +00002940then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002941 ac_cv_sizeof_time_t=`cat conftestval`
2942else
Michael W. Hudson54241132001-12-07 15:38:26 +00002943 echo "configure: failed program was:" >&5
2944 cat conftest.$ac_ext >&5
2945 rm -fr conftest*
2946 ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002947fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002948rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002949fi
2950
Michael W. Hudson54241132001-12-07 15:38:26 +00002951
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002952fi
2953
Michael W. Hudson54241132001-12-07 15:38:26 +00002954echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2955cat >> confdefs.h <<EOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002956#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2957EOF
2958
Michael W. Hudson54241132001-12-07 15:38:26 +00002959
2960
Trent Mick635f6fb2000-08-23 21:33:05 +00002961# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002962ac_save_cc="$CC"
2963if test "$ac_cv_kpthread" = "yes"
2964then CC="$CC -Kpthread"
2965fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002966echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002967echo "configure:2968: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002968have_pthread_t=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002969cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002970#line 2971 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002971#include "confdefs.h"
2972#include <pthread.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002973int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002974pthread_t x; x = *(pthread_t*)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002975; return 0; }
2976EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002977if { (eval echo configure:2978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002978 rm -rf conftest*
Trent Mick635f6fb2000-08-23 21:33:05 +00002979 have_pthread_t=yes
2980else
Michael W. Hudson54241132001-12-07 15:38:26 +00002981 echo "configure: failed program was:" >&5
2982 cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002983fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002984rm -f conftest*
2985echo "$ac_t""$have_pthread_t" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002986if test "$have_pthread_t" = yes ; then
2987 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002988 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002989echo "configure:2990: checking size of pthread_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002990 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
2991 echo $ac_n "(cached) $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002992else
2993 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002994 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00002995else
Michael W. Hudson54241132001-12-07 15:38:26 +00002996 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002997#line 2998 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002998#include "confdefs.h"
2999#include <stdio.h>
3000 #include <pthread.h>
3001 main()
3002 {
3003 FILE *f=fopen("conftestval", "w");
3004 if (!f) exit(1);
3005 fprintf(f, "%d\n", sizeof(pthread_t));
3006 exit(0);
3007 }
Michael W. Hudson54241132001-12-07 15:38:26 +00003008EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003009if { (eval echo configure:3010: \"$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 +00003010then
Trent Mick635f6fb2000-08-23 21:33:05 +00003011 ac_cv_sizeof_pthread_t=`cat conftestval`
3012else
Michael W. Hudson54241132001-12-07 15:38:26 +00003013 echo "configure: failed program was:" >&5
3014 cat conftest.$ac_ext >&5
3015 rm -fr conftest*
3016 ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00003017fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003018rm -fr conftest*
Trent Mick635f6fb2000-08-23 21:33:05 +00003019fi
3020
Michael W. Hudson54241132001-12-07 15:38:26 +00003021
Trent Mick635f6fb2000-08-23 21:33:05 +00003022fi
3023
Michael W. Hudson54241132001-12-07 15:38:26 +00003024 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
3025 cat >> confdefs.h <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003026#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
3027EOF
3028
3029fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003030CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00003031
Michael W. Hudson54241132001-12-07 15:38:26 +00003032echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003033echo "configure:3034: checking for --enable-toolbox-glue" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003034# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
3035if test "${enable_toolbox_glue+set}" = set; then
3036 enableval="$enable_toolbox_glue"
Michael W. Hudson54241132001-12-07 15:38:26 +00003037 :
3038fi
Jack Jansene578a632001-08-15 01:27:14 +00003039
3040
3041if test -z "$enable_toolbox_glue"
Michael W. Hudson54241132001-12-07 15:38:26 +00003042then
Jack Jansene578a632001-08-15 01:27:14 +00003043 case $ac_sys_system/$ac_sys_release in
3044 Darwin/*)
3045 enable_toolbox_glue="yes";;
3046 *)
3047 enable_toolbox_glue="no";;
3048 esac
3049fi
3050case "$enable_toolbox_glue" in
3051yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00003052 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00003053 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00003054 extra_undefs="-u __dummy -u _PyMac_Error"
Michael W. Hudson54241132001-12-07 15:38:26 +00003055 cat >> confdefs.h <<\EOF
Jack Jansene578a632001-08-15 01:27:14 +00003056#define USE_TOOLBOX_OBJECT_GLUE 1
3057EOF
3058
3059 ;;
3060*)
3061 extra_frameworks=""
3062 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00003063 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00003064 ;;
3065esac
Michael W. Hudson54241132001-12-07 15:38:26 +00003066echo "$ac_t""$enable_toolbox_glue" 1>&6
3067
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003068
3069case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003070 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003071 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003072 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
3073 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00003074 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3075 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00003076 Darwin/*)
3077 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003078 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
3079 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00003080 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3081 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003082esac
3083
Michael W. Hudson54241132001-12-07 15:38:26 +00003084echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003085echo "configure:3086: checking for --enable-framework" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003086if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003087then
Jack Jansenca06bc62001-08-03 15:32:23 +00003088 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003089 # -U __environ is needed since bundles don't have access
3090 # to crt0 when built but will always be linked against it
Michael W. Hudson54241132001-12-07 15:38:26 +00003091 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00003092 # in the build location.
Michael W. Hudson54241132001-12-07 15:38:26 +00003093
Jack Jansena3891ea2001-09-07 14:25:12 +00003094 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003095 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
3096 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00003097 esac
Michael W. Hudson54241132001-12-07 15:38:26 +00003098 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003099#define WITH_NEXT_FRAMEWORK 1
3100EOF
3101
Michael W. Hudson54241132001-12-07 15:38:26 +00003102 echo "$ac_t""yes" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003103else
Michael W. Hudson54241132001-12-07 15:38:26 +00003104 echo "$ac_t""no" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003105fi
3106
Michael W. Hudson54241132001-12-07 15:38:26 +00003107echo $ac_n "checking for dyld""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003108echo "configure:3109: checking for dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003109case $ac_sys_system/$ac_sys_release in
3110 Darwin/*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003111 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003112#define WITH_DYLD 1
3113EOF
3114
Michael W. Hudson54241132001-12-07 15:38:26 +00003115 echo "$ac_t""always on for Darwin" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003116 ;;
3117 *)
Michael W. Hudson54241132001-12-07 15:38:26 +00003118 echo "$ac_t""no" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00003119 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003120esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003121
Guido van Rossum0a516c91994-09-12 10:58:40 +00003122# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003123
Michael W. Hudson54241132001-12-07 15:38:26 +00003124
3125
3126
3127
Guido van Rossum0a516c91994-09-12 10:58:40 +00003128# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003129# -- usually .so, .sl on HP-UX, .dll on Cygwin
Michael W. Hudson54241132001-12-07 15:38:26 +00003130echo $ac_n "checking SO""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003131echo "configure:3132: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003132if test -z "$SO"
3133then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003134 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003135 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003136 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003137 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003138 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003139fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003140echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003141# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003142# -- "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 +00003143# (Shared libraries in this instance are shared modules to be loaded into
3144# Python, as opposed to building Python itself as a shared library.)
Michael W. Hudson54241132001-12-07 15:38:26 +00003145echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003146echo "configure:3147: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003147if test -z "$LDSHARED"
3148then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003149 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003150 AIX*)
3151 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00003152 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003153 ;;
3154 BeOS*)
3155 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00003156 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003157 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003158 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003159 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003160 SunOS/4*) LDSHARED="ld";;
Michael W. Hudson54241132001-12-07 15:38:26 +00003161 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00003162 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003163 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003164 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00003165 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003166 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003167 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3168 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00003169 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003170 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3171 if test "$enable_framework" ; then
3172 # Link against the framework. All externals should be defined.
3173 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3174 else
3175 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00003176 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00003177 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00003178 Darwin/*)
3179 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3180 if test "$enable_framework" ; then
3181 # Link against the framework. All externals should be defined.
3182 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3183 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00003184 # No framework, use the Python app as bundle-loader
3185 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
3186 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003187 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003188 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003189 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003190 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003191 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003192 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003193 then
3194 LDSHARED="cc -shared ${LDFLAGS}"
3195 else
3196 LDSHARED="ld -Bshareable ${LDFLAGS}"
3197 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003198 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003199 if test "$GCC" = "yes"
3200 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003201 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003202 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003203 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003204 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003205 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003206 *) LDSHARED="ld";;
3207 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003208fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003209echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003210BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003211# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003212# library (module) -- this is only needed for a few systems
Michael W. Hudson54241132001-12-07 15:38:26 +00003213echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003214echo "configure:3215: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003215if test -z "$CCSHARED"
3216then
Guido van Rossum07397971997-04-29 21:49:50 +00003217 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003218 SunOS*) if test "$GCC" = yes;
3219 then CCSHARED="-fPIC";
3220 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003221 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00003222 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00003223 else CCSHARED="+z";
3224 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003225 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003226 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003227 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003228 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003229 if test "$GCC" = "yes"
3230 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003231 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003232 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003233 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003234 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003235 IRIX*/6*) case $CC in
3236 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003237 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003238 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003239 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003240 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003241fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003242echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003243# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003244# the python executable -- this is only needed for a few systems
Michael W. Hudson54241132001-12-07 15:38:26 +00003245echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003246echo "configure:3247: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003247if test -z "$LINKFORSHARED"
3248then
Guido van Rossum07397971997-04-29 21:49:50 +00003249 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003250 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003251 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003252 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003253 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003254 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003255 # -u libsys_s pulls in all symbols in libsys
Michael W. Hudson54241132001-12-07 15:38:26 +00003256 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00003257 # -u __dummy makes the linker aware of the objc runtime
3258 # in System.framework; otherwise, __objcInit (referenced in
3259 # crt1.o) gets erroneously defined as common, which breaks dynamic
3260 # loading of any modules which reference it in System.framework.
3261 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3262 # not used by the core itself but which needs to be in the core so
3263 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00003264 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00003265 if test "$enable_framework"
3266 then
3267 LINKFORSHARED="$LINKFORSHARED -framework Python"
3268 fi
3269 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003270 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003271 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003272 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Michael W. Hudson54241132001-12-07 15:38:26 +00003273 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003274 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3275 then
3276 LINKFORSHARED="-Wl,--export-dynamic"
3277 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003278 SunOS/5*) case $CC in
3279 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003280 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003281 then
3282 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003283 fi;;
3284 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003285 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003286fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003287echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003288
Michael W. Hudson54241132001-12-07 15:38:26 +00003289
3290echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003291echo "configure:3292: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003292if test ! "$LIBRARY" = "$LDLIBRARY"
3293then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003294 case $ac_sys_system in
3295 CYGWIN*)
3296 # Cygwin needs CCSHARED when building extension DLLs
3297 # but not when building the interpreter DLL.
3298 CFLAGSFORSHARED='';;
3299 *)
3300 CFLAGSFORSHARED='$(CCSHARED)'
3301 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003302fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003303echo "$ac_t""$CFLAGSFORSHARED" 1>&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003304
Guido van Rossum627b2d71993-12-24 10:39:16 +00003305# checks for libraries
Michael W. Hudson54241132001-12-07 15:38:26 +00003306echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003307echo "configure:3308: checking for dlopen in -ldl" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003308ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3309if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3310 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003311else
Michael W. Hudson54241132001-12-07 15:38:26 +00003312 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003313LIBS="-ldl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003314cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003315#line 3316 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003316#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003317/* Override any gcc2 internal prototype to avoid an error. */
3318/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003319 builtin and then its argument prototype would still apply. */
3320char dlopen();
3321
3322int main() {
3323dlopen()
3324; return 0; }
3325EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003326if { (eval echo configure:3327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003327 rm -rf conftest*
3328 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003329else
Michael W. Hudson54241132001-12-07 15:38:26 +00003330 echo "configure: failed program was:" >&5
3331 cat conftest.$ac_ext >&5
3332 rm -rf conftest*
3333 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003334fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003335rm -f conftest*
3336LIBS="$ac_save_LIBS"
3337
Guido van Rossum627b2d71993-12-24 10:39:16 +00003338fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003339if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3340 echo "$ac_t""yes" 1>&6
3341 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3342 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3343 cat >> confdefs.h <<EOF
3344#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003345EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003346
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003347 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003348
Michael W. Hudson54241132001-12-07 15:38:26 +00003349else
3350 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003351fi
3352 # Dynamic linking for SunOS/Solaris and SYSV
Michael W. Hudson54241132001-12-07 15:38:26 +00003353echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003354echo "configure:3355: checking for shl_load in -ldld" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003355ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
3356if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3357 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003358else
Michael W. Hudson54241132001-12-07 15:38:26 +00003359 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003360LIBS="-ldld $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003361cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003362#line 3363 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003363#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003364/* Override any gcc2 internal prototype to avoid an error. */
3365/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003366 builtin and then its argument prototype would still apply. */
3367char shl_load();
3368
3369int main() {
3370shl_load()
3371; return 0; }
3372EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003373if { (eval echo configure:3374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003374 rm -rf conftest*
3375 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003376else
Michael W. Hudson54241132001-12-07 15:38:26 +00003377 echo "configure: failed program was:" >&5
3378 cat conftest.$ac_ext >&5
3379 rm -rf conftest*
3380 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003381fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003382rm -f conftest*
3383LIBS="$ac_save_LIBS"
3384
Guido van Rossum627b2d71993-12-24 10:39:16 +00003385fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003386if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3387 echo "$ac_t""yes" 1>&6
3388 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3389 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3390 cat >> confdefs.h <<EOF
3391#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003392EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003393
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003394 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003395
Michael W. Hudson54241132001-12-07 15:38:26 +00003396else
3397 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003398fi
3399 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003400
3401# checks for system dependent C++ extensions support
3402case "$ac_sys_system" in
Michael W. Hudson54241132001-12-07 15:38:26 +00003403 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003404echo "configure:3405: checking for genuine AIX C++ extensions support" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003405 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003406#line 3407 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003407#include "confdefs.h"
3408#include "/usr/lpp/xlC/include/load.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00003409int main() {
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003410loadAndInit("", 0, "")
Michael W. Hudson54241132001-12-07 15:38:26 +00003411; return 0; }
3412EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003413if { (eval echo configure:3414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003414 rm -rf conftest*
3415 cat >> confdefs.h <<\EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003416#define AIX_GENUINE_CPLUSPLUS 1
3417EOF
3418
Michael W. Hudson54241132001-12-07 15:38:26 +00003419 echo "$ac_t""yes" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003420else
Michael W. Hudson54241132001-12-07 15:38:26 +00003421 echo "configure: failed program was:" >&5
3422 cat conftest.$ac_ext >&5
3423 rm -rf conftest*
3424 echo "$ac_t""no" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003425fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003426rm -f conftest*;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003427 *) ;;
3428esac
3429
Guido van Rossum70c7f481998-03-26 18:44:10 +00003430# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3431# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003432# BeOS' sockets are stashed in libnet.
3433case "$ac_sys_system" in
3434IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003435*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003436echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003437echo "configure:3438: checking for t_open in -lnsl" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003438ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
3439if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3440 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003441else
Michael W. Hudson54241132001-12-07 15:38:26 +00003442 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003443LIBS="-lnsl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003444cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003445#line 3446 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003446#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003447/* Override any gcc2 internal prototype to avoid an error. */
3448/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003449 builtin and then its argument prototype would still apply. */
3450char t_open();
3451
3452int main() {
3453t_open()
3454; return 0; }
3455EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003456if { (eval echo configure:3457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003457 rm -rf conftest*
3458 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003459else
Michael W. Hudson54241132001-12-07 15:38:26 +00003460 echo "configure: failed program was:" >&5
3461 cat conftest.$ac_ext >&5
3462 rm -rf conftest*
3463 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003464fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003465rm -f conftest*
3466LIBS="$ac_save_LIBS"
3467
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003468fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003469if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3470 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003471 LIBS="-lnsl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003472else
3473 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003474fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003475 # SVR4
Michael W. Hudson54241132001-12-07 15:38:26 +00003476echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003477echo "configure:3478: checking for socket in -lsocket" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003478ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3479if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3480 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003481else
Michael W. Hudson54241132001-12-07 15:38:26 +00003482 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003483LIBS="-lsocket $LIBS $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003484cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003485#line 3486 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003486#include "confdefs.h"
3487/* Override any gcc2 internal prototype to avoid an error. */
3488/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003489 builtin and then its argument prototype would still apply. */
3490char socket();
3491
3492int main() {
3493socket()
3494; return 0; }
3495EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003496if { (eval echo configure:3497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003497 rm -rf conftest*
3498 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003499else
Michael W. Hudson54241132001-12-07 15:38:26 +00003500 echo "configure: failed program was:" >&5
3501 cat conftest.$ac_ext >&5
3502 rm -rf conftest*
3503 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003504fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003505rm -f conftest*
3506LIBS="$ac_save_LIBS"
3507
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003508fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003509if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3510 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003511 LIBS="-lsocket $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003512else
3513 echo "$ac_t""no" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003514fi
3515 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003516;;
3517esac
3518case "$ac_sys_system" in
3519BeOS*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003520echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003521echo "configure:3522: checking for socket in -lnet" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003522ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
3523if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3524 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003525else
Michael W. Hudson54241132001-12-07 15:38:26 +00003526 ac_save_LIBS="$LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00003527LIBS="-lnet $LIBS $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003528cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003529#line 3530 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003530#include "confdefs.h"
3531/* Override any gcc2 internal prototype to avoid an error. */
3532/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003533 builtin and then its argument prototype would still apply. */
3534char socket();
3535
3536int main() {
3537socket()
3538; return 0; }
3539EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003540if { (eval echo configure:3541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003541 rm -rf conftest*
3542 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003543else
Michael W. Hudson54241132001-12-07 15:38:26 +00003544 echo "configure: failed program was:" >&5
3545 cat conftest.$ac_ext >&5
3546 rm -rf conftest*
3547 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003548fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003549rm -f conftest*
3550LIBS="$ac_save_LIBS"
3551
Guido van Rossumad678af1998-10-02 14:42:15 +00003552fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003553if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3554 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003555 LIBS="-lnet $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003556else
3557 echo "$ac_t""no" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003558fi
3559 # BeOS
3560;;
3561esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003562
Michael W. Hudson54241132001-12-07 15:38:26 +00003563echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003564echo "configure:3565: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003565# Check whether --with-libs or --without-libs was given.
3566if test "${with_libs+set}" = set; then
3567 withval="$with_libs"
Michael W. Hudson54241132001-12-07 15:38:26 +00003568
3569echo "$ac_t""$withval" 1>&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00003570LIBS="$withval $LIBS"
3571
3572else
Michael W. Hudson54241132001-12-07 15:38:26 +00003573 echo "$ac_t""no" 1>&6
3574fi
3575
Guido van Rossum7f43da71994-08-01 12:15:30 +00003576
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003577# Determine if signalmodule should be used.
3578
3579
Michael W. Hudson54241132001-12-07 15:38:26 +00003580echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003581echo "configure:3582: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003582# Check whether --with-signal-module or --without-signal-module was given.
3583if test "${with_signal_module+set}" = set; then
3584 withval="$with_signal_module"
Michael W. Hudson54241132001-12-07 15:38:26 +00003585 :
3586fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003587
3588
3589if test -z "$with_signal_module"
3590then with_signal_module="yes"
3591fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003592echo "$ac_t""$with_signal_module" 1>&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003593
3594if test "${with_signal_module}" = "yes"; then
3595 USE_SIGNAL_MODULE=""
3596 SIGNAL_OBJS=""
3597else
3598 USE_SIGNAL_MODULE="#"
3599 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3600fi
3601
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003602# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003603
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003604USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003605
Michael W. Hudson54241132001-12-07 15:38:26 +00003606echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003607echo "configure:3608: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003608
3609# Check whether --with-dec-threads or --without-dec-threads was given.
3610if test "${with_dec_threads+set}" = set; then
3611 withval="$with_dec_threads"
Michael W. Hudson54241132001-12-07 15:38:26 +00003612
3613echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003614LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003615if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003616 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003617fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003618else
Michael W. Hudson54241132001-12-07 15:38:26 +00003619 echo "$ac_t""no" 1>&6
3620fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003621
3622
Michael W. Hudson54241132001-12-07 15:38:26 +00003623echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003624echo "configure:3625: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003625# Check whether --with-threads or --without-threads was given.
3626if test "${with_threads+set}" = set; then
3627 withval="$with_threads"
Michael W. Hudson54241132001-12-07 15:38:26 +00003628 :
3629fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003630
3631
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003632# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003633# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003634if test "${with_thread+set}" = set; then
3635 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003636
Jack Jansendd19cf82001-12-06 22:36:17 +00003637with_threads=$with_thread
Michael W. Hudson54241132001-12-07 15:38:26 +00003638fi
3639
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003640
3641if test -z "$with_threads"
3642then with_threads="yes"
3643fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003644echo "$ac_t""$with_threads" 1>&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003645
3646if test "$with_threads" = "no"
3647then
3648 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003649elif test "$ac_cv_pthread_is_default" = yes
3650then
Michael W. Hudson54241132001-12-07 15:38:26 +00003651 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003652#define WITH_THREAD 1
3653EOF
3654
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003655 # Defining _REENTRANT on system with POSIX threads should not hurt.
Michael W. Hudson54241132001-12-07 15:38:26 +00003656 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003657#define _REENTRANT 1
3658EOF
3659
3660 posix_threads=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003661 LIBOBJS="$LIBOBJS thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003662elif test "$ac_cv_kpthread" = "yes"
3663then
3664 CC="$CC -Kpthread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003665 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003666#define WITH_THREAD 1
3667EOF
3668
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003669 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003670 LIBOBJS="$LIBOBJS thread.o"
3671else
3672 if test ! -z "$with_threads" -a -d "$with_threads"
3673 then LDFLAGS="$LDFLAGS -L$with_threads"
3674 fi
3675 if test ! -z "$withval" -a -d "$withval"
3676 then LDFLAGS="$LDFLAGS -L$withval"
3677 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003678
3679 # According to the POSIX spec, a pthreads implementation must
3680 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Michael W. Hudson54241132001-12-07 15:38:26 +00003681 echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003682echo "configure:3683: checking for _POSIX_THREADS in unistd.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003683 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003684#line 3685 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003685#include "confdefs.h"
3686#include <unistd.h>
3687 #ifdef _POSIX_THREADS
3688 yes
3689 #endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003690
3691EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003692if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3693 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003694 rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003695 unistd_defines_pthreads=yes
3696else
Michael W. Hudson54241132001-12-07 15:38:26 +00003697 rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003698 unistd_defines_pthreads=no
3699fi
3700rm -f conftest*
3701
Michael W. Hudson54241132001-12-07 15:38:26 +00003702 echo "$ac_t""$unistd_defines_pthreads" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003703
Michael W. Hudson54241132001-12-07 15:38:26 +00003704 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003705#define _REENTRANT 1
3706EOF
3707
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003708 ac_safe=`echo "cthreads.h" | sed 'y%./+-%__p_%'`
3709echo $ac_n "checking for cthreads.h""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003710echo "configure:3711: checking for cthreads.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003711if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3712 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003713else
Michael W. Hudson54241132001-12-07 15:38:26 +00003714 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003715#line 3716 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003716#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003717#include <cthreads.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00003718EOF
3719ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen4f8d0542002-03-08 13:43:01 +00003720{ (eval echo configure:3721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003721ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3722if test -z "$ac_err"; then
3723 rm -rf conftest*
3724 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003725else
Michael W. Hudson54241132001-12-07 15:38:26 +00003726 echo "$ac_err" >&5
3727 echo "configure: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003728 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003729 rm -rf conftest*
3730 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003731fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003732rm -f conftest*
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003733fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003734if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3735 echo "$ac_t""yes" 1>&6
3736 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003737#define WITH_THREAD 1
3738EOF
3739
Michael W. Hudson54241132001-12-07 15:38:26 +00003740 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003741#define C_THREADS 1
3742EOF
3743
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003744 cat >> confdefs.h <<\EOF
3745#define HURD_C_THREADS 1
3746EOF
3747
3748 LIBS="$LIBS -lthreads"
3749 LIBOBJS="$LIBOBJS thread.o"
3750else
3751 echo "$ac_t""no" 1>&6
3752
3753 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
3754echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003755echo "configure:3756: checking for mach/cthreads.h" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003756if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3757 echo $ac_n "(cached) $ac_c" 1>&6
3758else
3759 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003760#line 3761 "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003761#include "confdefs.h"
3762#include <mach/cthreads.h>
3763EOF
3764ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen4f8d0542002-03-08 13:43:01 +00003765{ (eval echo configure:3766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003766ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3767if test -z "$ac_err"; then
3768 rm -rf conftest*
3769 eval "ac_cv_header_$ac_safe=yes"
3770else
3771 echo "$ac_err" >&5
3772 echo "configure: failed program was:" >&5
3773 cat conftest.$ac_ext >&5
3774 rm -rf conftest*
3775 eval "ac_cv_header_$ac_safe=no"
3776fi
3777rm -f conftest*
3778fi
3779if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3780 echo "$ac_t""yes" 1>&6
3781 cat >> confdefs.h <<\EOF
3782#define WITH_THREAD 1
3783EOF
3784
3785 cat >> confdefs.h <<\EOF
3786#define C_THREADS 1
3787EOF
3788
3789 cat >> confdefs.h <<\EOF
3790#define MACH_C_THREADS 1
3791EOF
3792
Martin v. Löwis130fb172001-07-19 11:00:41 +00003793 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003794else
Michael W. Hudson54241132001-12-07 15:38:26 +00003795 echo "$ac_t""no" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003796
Michael W. Hudson54241132001-12-07 15:38:26 +00003797 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003798echo "configure:3799: checking for --with-pth" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003799 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003800if test "${with_pth+set}" = set; then
3801 withval="$with_pth"
Michael W. Hudson54241132001-12-07 15:38:26 +00003802
3803 echo "$ac_t""$withval" 1>&6
3804 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003805#define WITH_THREAD 1
3806EOF
3807
Michael W. Hudson54241132001-12-07 15:38:26 +00003808 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003809#define HAVE_PTH 1
3810EOF
3811
Martin v. Löwis130fb172001-07-19 11:00:41 +00003812 LIBS="-lpth $LIBS"
3813 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003814else
Michael W. Hudson54241132001-12-07 15:38:26 +00003815
3816 echo "$ac_t""no" 1>&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003817
3818 # Just looking for pthread_create in libpthread is not enough:
3819 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
3820 # So we really have to include pthread.h, and then link.
3821 _libs=$LIBS
3822 LIBS="$LIBS -lpthread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003823 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003824echo "configure:3825: checking for pthread_create in -lpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003825 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003826#line 3827 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003827#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003828#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00003829
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003830void * start_routine (void *arg) { exit (0); }
Michael W. Hudson54241132001-12-07 15:38:26 +00003831int main() {
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003832
3833pthread_create (NULL, NULL, start_routine, NULL)
Michael W. Hudson54241132001-12-07 15:38:26 +00003834; return 0; }
3835EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003836if { (eval echo configure:3837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003837 rm -rf conftest*
3838
3839 echo "$ac_t""yes" 1>&6
3840 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003841#define WITH_THREAD 1
3842EOF
3843
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003844 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003845 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003846else
Michael W. Hudson54241132001-12-07 15:38:26 +00003847 echo "configure: failed program was:" >&5
3848 cat conftest.$ac_ext >&5
3849 rm -rf conftest*
3850
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003851 LIBS=$_libs
Michael W. Hudson54241132001-12-07 15:38:26 +00003852 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003853echo "configure:3854: checking for pthread_detach" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003854if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
3855 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003856else
Michael W. Hudson54241132001-12-07 15:38:26 +00003857 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003858#line 3859 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003859#include "confdefs.h"
3860/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00003861 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003862#include <assert.h>
3863/* Override any gcc2 internal prototype to avoid an error. */
3864/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003865 builtin and then its argument prototype would still apply. */
3866char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003867
Michael W. Hudson54241132001-12-07 15:38:26 +00003868int main() {
3869
Guido van Rossumad678af1998-10-02 14:42:15 +00003870/* The GNU C library defines this for functions which it implements
3871 to always fail with ENOSYS. Some functions are actually named
3872 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003873#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003874choke me
3875#else
Michael W. Hudson54241132001-12-07 15:38:26 +00003876pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003877#endif
3878
Michael W. Hudson54241132001-12-07 15:38:26 +00003879; return 0; }
3880EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003881if { (eval echo configure:3882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003882 rm -rf conftest*
3883 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003884else
Michael W. Hudson54241132001-12-07 15:38:26 +00003885 echo "configure: failed program was:" >&5
3886 cat conftest.$ac_ext >&5
3887 rm -rf conftest*
3888 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003889fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003890rm -f conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00003891fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003892
3893if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
3894 echo "$ac_t""yes" 1>&6
3895 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003896#define WITH_THREAD 1
3897EOF
3898
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003899 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003900 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003901else
Michael W. Hudson54241132001-12-07 15:38:26 +00003902 echo "$ac_t""no" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003903
Michael W. Hudson54241132001-12-07 15:38:26 +00003904 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
3905echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003906echo "configure:3907: checking for kernel/OS.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003907if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3908 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003909else
Michael W. Hudson54241132001-12-07 15:38:26 +00003910 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003911#line 3912 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003912#include "confdefs.h"
3913#include <kernel/OS.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00003914EOF
3915ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen4f8d0542002-03-08 13:43:01 +00003916{ (eval echo configure:3917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003917ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3918if test -z "$ac_err"; then
3919 rm -rf conftest*
3920 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003921else
Michael W. Hudson54241132001-12-07 15:38:26 +00003922 echo "$ac_err" >&5
3923 echo "configure: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003924 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003925 rm -rf conftest*
3926 eval "ac_cv_header_$ac_safe=no"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003927fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003928rm -f conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003929fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003930if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3931 echo "$ac_t""yes" 1>&6
3932 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003933#define WITH_THREAD 1
3934EOF
3935
Michael W. Hudson54241132001-12-07 15:38:26 +00003936 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003937#define BEOS_THREADS 1
3938EOF
3939
Martin v. Löwis130fb172001-07-19 11:00:41 +00003940 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003941else
Michael W. Hudson54241132001-12-07 15:38:26 +00003942 echo "$ac_t""no" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003943
Michael W. Hudson54241132001-12-07 15:38:26 +00003944 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003945echo "configure:3946: checking for pthread_create in -lpthreads" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003946ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
3947if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3948 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003949else
Michael W. Hudson54241132001-12-07 15:38:26 +00003950 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003951LIBS="-lpthreads $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003952cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003953#line 3954 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003954#include "confdefs.h"
3955/* Override any gcc2 internal prototype to avoid an error. */
3956/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003957 builtin and then its argument prototype would still apply. */
3958char pthread_create();
3959
3960int main() {
3961pthread_create()
3962; return 0; }
3963EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003964if { (eval echo configure:3965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003965 rm -rf conftest*
3966 eval "ac_cv_lib_$ac_lib_var=yes"
Greg Steinadf63d62000-07-05 10:38:09 +00003967else
Michael W. Hudson54241132001-12-07 15:38:26 +00003968 echo "configure: failed program was:" >&5
3969 cat conftest.$ac_ext >&5
3970 rm -rf conftest*
3971 eval "ac_cv_lib_$ac_lib_var=no"
Greg Steinadf63d62000-07-05 10:38:09 +00003972fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003973rm -f conftest*
3974LIBS="$ac_save_LIBS"
3975
Greg Steinadf63d62000-07-05 10:38:09 +00003976fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003977if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3978 echo "$ac_t""yes" 1>&6
3979 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003980#define WITH_THREAD 1
3981EOF
3982
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003983 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003984 LIBS="$LIBS -lpthreads"
3985 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003986else
Michael W. Hudson54241132001-12-07 15:38:26 +00003987 echo "$ac_t""no" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00003988
Michael W. Hudson54241132001-12-07 15:38:26 +00003989 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003990echo "configure:3991: checking for pthread_create in -lc_r" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003991ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
3992if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3993 echo $ac_n "(cached) $ac_c" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00003994else
Michael W. Hudson54241132001-12-07 15:38:26 +00003995 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003996LIBS="-lc_r $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003997cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003998#line 3999 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003999#include "confdefs.h"
4000/* Override any gcc2 internal prototype to avoid an error. */
4001/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004002 builtin and then its argument prototype would still apply. */
4003char pthread_create();
4004
4005int main() {
4006pthread_create()
4007; return 0; }
4008EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00004009if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004010 rm -rf conftest*
4011 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum49545951997-12-02 19:28:29 +00004012else
Michael W. Hudson54241132001-12-07 15:38:26 +00004013 echo "configure: failed program was:" >&5
4014 cat conftest.$ac_ext >&5
4015 rm -rf conftest*
4016 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum49545951997-12-02 19:28:29 +00004017fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004018rm -f conftest*
4019LIBS="$ac_save_LIBS"
4020
Guido van Rossum49545951997-12-02 19:28:29 +00004021fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004022if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4023 echo "$ac_t""yes" 1>&6
4024 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00004025#define WITH_THREAD 1
4026EOF
4027
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004028 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004029 LIBS="$LIBS -lc_r"
4030 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004031else
Michael W. Hudson54241132001-12-07 15:38:26 +00004032 echo "$ac_t""no" 1>&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004033
Michael W. Hudson54241132001-12-07 15:38:26 +00004034 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00004035echo "configure:4036: checking for __d6_pthread_create in -lthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004036ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
4037if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4038 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004039else
Michael W. Hudson54241132001-12-07 15:38:26 +00004040 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00004041LIBS="-lthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004042cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00004043#line 4044 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004044#include "confdefs.h"
4045/* Override any gcc2 internal prototype to avoid an error. */
4046/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004047 builtin and then its argument prototype would still apply. */
4048char __d6_pthread_create();
4049
4050int main() {
4051__d6_pthread_create()
4052; return 0; }
4053EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00004054if { (eval echo configure:4055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004055 rm -rf conftest*
4056 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004057else
Michael W. Hudson54241132001-12-07 15:38:26 +00004058 echo "configure: failed program was:" >&5
4059 cat conftest.$ac_ext >&5
4060 rm -rf conftest*
4061 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004062fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004063rm -f conftest*
4064LIBS="$ac_save_LIBS"
4065
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004066fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004067if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4068 echo "$ac_t""yes" 1>&6
4069 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004070#define WITH_THREAD 1
4071EOF
4072
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004073 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004074 LIBS="$LIBS -lthread"
4075 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00004076else
Michael W. Hudson54241132001-12-07 15:38:26 +00004077 echo "$ac_t""no" 1>&6
Guido van Rossum49545951997-12-02 19:28:29 +00004078
Michael W. Hudson54241132001-12-07 15:38:26 +00004079 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00004080echo "configure:4081: checking for __pthread_create_system in -lpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004081ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
4082if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4083 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004084else
Michael W. Hudson54241132001-12-07 15:38:26 +00004085 ac_save_LIBS="$LIBS"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004086LIBS="-lpthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004087cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00004088#line 4089 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004089#include "confdefs.h"
4090/* Override any gcc2 internal prototype to avoid an error. */
4091/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004092 builtin and then its argument prototype would still apply. */
4093char __pthread_create_system();
4094
4095int main() {
4096__pthread_create_system()
4097; return 0; }
4098EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00004099if { (eval echo configure:4100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004100 rm -rf conftest*
4101 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004102else
Michael W. Hudson54241132001-12-07 15:38:26 +00004103 echo "configure: failed program was:" >&5
4104 cat conftest.$ac_ext >&5
4105 rm -rf conftest*
4106 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004107fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004108rm -f conftest*
4109LIBS="$ac_save_LIBS"
4110
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004111fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004112if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4113 echo "$ac_t""yes" 1>&6
4114 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004115#define WITH_THREAD 1
4116EOF
4117
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004118 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004119 LIBS="$LIBS -lpthread"
4120 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004121else
Michael W. Hudson54241132001-12-07 15:38:26 +00004122 echo "$ac_t""no" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004123
Michael W. Hudson54241132001-12-07 15:38:26 +00004124 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00004125echo "configure:4126: checking for pthread_create in -lcma" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004126ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
4127if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4128 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00004129else
Michael W. Hudson54241132001-12-07 15:38:26 +00004130 ac_save_LIBS="$LIBS"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004131LIBS="-lcma $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004132cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00004133#line 4134 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004134#include "confdefs.h"
4135/* Override any gcc2 internal prototype to avoid an error. */
4136/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004137 builtin and then its argument prototype would still apply. */
4138char pthread_create();
4139
4140int main() {
4141pthread_create()
4142; return 0; }
4143EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00004144if { (eval echo configure:4145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004145 rm -rf conftest*
4146 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004147else
Michael W. Hudson54241132001-12-07 15:38:26 +00004148 echo "configure: failed program was:" >&5
4149 cat conftest.$ac_ext >&5
4150 rm -rf conftest*
4151 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004152fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004153rm -f conftest*
4154LIBS="$ac_save_LIBS"
4155
Guido van Rossumb93a8621998-05-07 13:27:32 +00004156fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004157if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4158 echo "$ac_t""yes" 1>&6
4159 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00004160#define WITH_THREAD 1
4161EOF
4162
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004163 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004164 LIBS="$LIBS -lcma"
4165 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004166else
Michael W. Hudson54241132001-12-07 15:38:26 +00004167 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004168
Martin v. Löwis130fb172001-07-19 11:00:41 +00004169 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004170fi
4171
Michael W. Hudson54241132001-12-07 15:38:26 +00004172
Guido van Rossum627b2d71993-12-24 10:39:16 +00004173fi
4174
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004175fi
4176
Guido van Rossum0be3e491997-05-22 20:33:33 +00004177fi
4178
Guido van Rossum49545951997-12-02 19:28:29 +00004179fi
4180
Guido van Rossumb93a8621998-05-07 13:27:32 +00004181fi
4182
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004183fi
4184
Guido van Rossumad678af1998-10-02 14:42:15 +00004185fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004186rm -f conftest*
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004187fi
4188
Michael W. Hudson54241132001-12-07 15:38:26 +00004189fi
4190
Martin v. Löwisa6e97582002-01-01 18:41:33 +00004191fi
4192
Michael W. Hudson54241132001-12-07 15:38:26 +00004193
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004194 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004195 if test "$unistd_defines_pthreads" = "no"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004196 cat >> confdefs.h <<\EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004197#define _POSIX_THREADS 1
4198EOF
4199
4200 fi
4201
Michael W. Hudson54241132001-12-07 15:38:26 +00004202 echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00004203echo "configure:4204: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004204 if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then
4205 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004206else
4207 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004208 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004209else
Michael W. Hudson54241132001-12-07 15:38:26 +00004210 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00004211#line 4212 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004212#include "confdefs.h"
4213#include <pthread.h>
4214 void *foo(void *parm) {
4215 return NULL;
4216 }
4217 main() {
4218 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004219 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004220 if (pthread_attr_init(&attr)) exit(-1);
4221 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004222 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004223 exit(0);
4224 }
Michael W. Hudson54241132001-12-07 15:38:26 +00004225EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00004226if { (eval echo configure:4227: \"$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 +00004227then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004228 ac_cv_pthread_system_supported=yes
4229else
Michael W. Hudson54241132001-12-07 15:38:26 +00004230 echo "configure: failed program was:" >&5
4231 cat conftest.$ac_ext >&5
4232 rm -fr conftest*
4233 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004234fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004235rm -fr conftest*
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004236fi
4237
Michael W. Hudson54241132001-12-07 15:38:26 +00004238
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004239fi
4240
Michael W. Hudson54241132001-12-07 15:38:26 +00004241 echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004242 if test "$ac_cv_pthread_system_supported" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004243 cat >> confdefs.h <<\EOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004244#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
4245EOF
4246
4247 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004248 for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004249do
Michael W. Hudson54241132001-12-07 15:38:26 +00004250echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00004251echo "configure:4252: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004252if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4253 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004254else
Michael W. Hudson54241132001-12-07 15:38:26 +00004255 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00004256#line 4257 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004257#include "confdefs.h"
4258/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004259 which can conflict with char $ac_func(); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004260#include <assert.h>
4261/* Override any gcc2 internal prototype to avoid an error. */
4262/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004263 builtin and then its argument prototype would still apply. */
4264char $ac_func();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004265
Michael W. Hudson54241132001-12-07 15:38:26 +00004266int main() {
4267
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004268/* The GNU C library defines this for functions which it implements
4269 to always fail with ENOSYS. Some functions are actually named
4270 something starting with __ and the normal name is an alias. */
4271#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4272choke me
4273#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004274$ac_func();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004275#endif
4276
Michael W. Hudson54241132001-12-07 15:38:26 +00004277; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004278EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00004279if { (eval echo configure:4280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004280 rm -rf conftest*
4281 eval "ac_cv_func_$ac_func=yes"
4282else
4283 echo "configure: failed program was:" >&5
4284 cat conftest.$ac_ext >&5
4285 rm -rf conftest*
4286 eval "ac_cv_func_$ac_func=no"
4287fi
4288rm -f conftest*
4289fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004290
Michael W. Hudson54241132001-12-07 15:38:26 +00004291if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4292 echo "$ac_t""yes" 1>&6
4293 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4294 cat >> confdefs.h <<EOF
4295#define $ac_tr_func 1
4296EOF
4297
4298else
4299 echo "$ac_t""no" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004300fi
4301done
4302
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004303 fi
4304
Michael W. Hudson54241132001-12-07 15:38:26 +00004305 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00004306echo "configure:4307: checking for usconfig in -lmpc" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004307ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
4308if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4309 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004310else
Michael W. Hudson54241132001-12-07 15:38:26 +00004311 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004312LIBS="-lmpc $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004313cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00004314#line 4315 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004315#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004316/* Override any gcc2 internal prototype to avoid an error. */
4317/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004318 builtin and then its argument prototype would still apply. */
4319char usconfig();
4320
4321int main() {
4322usconfig()
4323; return 0; }
4324EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00004325if { (eval echo configure:4326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004326 rm -rf conftest*
4327 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004328else
Michael W. Hudson54241132001-12-07 15:38:26 +00004329 echo "configure: failed program was:" >&5
4330 cat conftest.$ac_ext >&5
4331 rm -rf conftest*
4332 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004333fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004334rm -f conftest*
4335LIBS="$ac_save_LIBS"
4336
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004337fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004338if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4339 echo "$ac_t""yes" 1>&6
4340 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004341#define WITH_THREAD 1
4342EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004343
Martin v. Löwis130fb172001-07-19 11:00:41 +00004344 LIBS="$LIBS -lmpc"
4345 LIBOBJS="$LIBOBJS thread.o"
4346 USE_THREAD_MODULE=""
Michael W. Hudson54241132001-12-07 15:38:26 +00004347else
4348 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004349fi
4350
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004351
4352 if test $posix_threads != "yes"; then
4353 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
4354echo "configure:4355: checking for thr_create in -lthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004355ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
4356if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4357 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004358else
Michael W. Hudson54241132001-12-07 15:38:26 +00004359 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004360LIBS="-lthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004361cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004362#line 4363 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004363#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004364/* Override any gcc2 internal prototype to avoid an error. */
4365/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004366 builtin and then its argument prototype would still apply. */
4367char thr_create();
4368
4369int main() {
4370thr_create()
4371; return 0; }
4372EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004373if { (eval echo configure:4374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004374 rm -rf conftest*
4375 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004376else
Michael W. Hudson54241132001-12-07 15:38:26 +00004377 echo "configure: failed program was:" >&5
4378 cat conftest.$ac_ext >&5
4379 rm -rf conftest*
4380 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004381fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004382rm -f conftest*
4383LIBS="$ac_save_LIBS"
4384
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004385fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004386if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4387 echo "$ac_t""yes" 1>&6
4388 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004389#define WITH_THREAD 1
4390EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004391
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004392 LIBS="$LIBS -lthread"
4393 LIBOBJS="$LIBOBJS thread.o"
4394 USE_THREAD_MODULE=""
Michael W. Hudson54241132001-12-07 15:38:26 +00004395else
4396 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004397fi
4398
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004399 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004400
Martin v. Löwis130fb172001-07-19 11:00:41 +00004401 if test "$USE_THREAD_MODULE" != "#"
4402 then
4403 # If the above checks didn't disable threads, (at least) OSF1
4404 # needs this '-threads' argument during linking.
4405 case $ac_sys_system in
4406 OSF1) LDLAST=-threads;;
4407 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004408 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004409fi
4410
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004411# Check for enable-ipv6
Michael W. Hudson54241132001-12-07 15:38:26 +00004412echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004413echo "configure:4414: checking if --enable-ipv6 is specified" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004414# Check whether --enable-ipv6 or --disable-ipv6 was given.
4415if test "${enable_ipv6+set}" = set; then
4416 enableval="$enable_ipv6"
4417 case "$enableval" in
4418 no)
Michael W. Hudson54241132001-12-07 15:38:26 +00004419 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004420 ipv6=no
4421 ;;
Michael W. Hudson54241132001-12-07 15:38:26 +00004422 *) echo "$ac_t""yes" 1>&6
4423 cat >> confdefs.h <<\EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004424#define ENABLE_IPV6 1
4425EOF
4426
4427 ipv6=yes
4428 ;;
Michael W. Hudson54241132001-12-07 15:38:26 +00004429 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004430else
Michael W. Hudson54241132001-12-07 15:38:26 +00004431
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004432 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004433 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004434 ipv6=no
4435
4436else
Michael W. Hudson54241132001-12-07 15:38:26 +00004437 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004438#line 4439 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004439#include "confdefs.h"
4440 /* AF_INET6 available check */
4441#include <sys/types.h>
4442#include <sys/socket.h>
4443main()
4444{
4445 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4446 exit(1);
4447 else
4448 exit(0);
4449}
4450
Michael W. Hudson54241132001-12-07 15:38:26 +00004451EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004452if { (eval echo configure:4453: \"$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 +00004453then
4454 echo "$ac_t""yes" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004455 ipv6=yes
4456else
Michael W. Hudson54241132001-12-07 15:38:26 +00004457 echo "configure: failed program was:" >&5
4458 cat conftest.$ac_ext >&5
4459 rm -fr conftest*
4460 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004461 ipv6=no
4462fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004463rm -fr conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004464fi
4465
Michael W. Hudson54241132001-12-07 15:38:26 +00004466
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004467if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004468 echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004469echo "configure:4470: checking if RFC2553 API is available" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004470 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004471#line 4472 "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004472#include "confdefs.h"
4473#include <sys/types.h>
4474#include <netinet/in.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00004475int main() {
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004476struct sockaddr_in6 x;
4477x.sin6_scope_id;
Michael W. Hudson54241132001-12-07 15:38:26 +00004478; return 0; }
4479EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004480if { (eval echo configure:4481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004481 rm -rf conftest*
4482 echo "$ac_t""yes" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004483 ipv6=yes
4484else
Michael W. Hudson54241132001-12-07 15:38:26 +00004485 echo "configure: failed program was:" >&5
4486 cat conftest.$ac_ext >&5
4487 rm -rf conftest*
4488 echo "$ac_t""no" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004489 ipv6=no
4490fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004491rm -f conftest*
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004492fi
4493
4494if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004495 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004496#define ENABLE_IPV6 1
4497EOF
4498
4499fi
4500
Michael W. Hudson54241132001-12-07 15:38:26 +00004501fi
4502
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004503
4504ipv6type=unknown
4505ipv6lib=none
4506ipv6trylibc=no
4507
4508if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004509 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004510echo "configure:4511: checking ipv6 stack type" >&5
Guido van Rossumb8552162001-09-05 14:58:11 +00004511 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
4512 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004513 case $i in
4514 inria)
Michael W. Hudson54241132001-12-07 15:38:26 +00004515 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004516#line 4517 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004517#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004518
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004519#include <netinet/in.h>
4520#ifdef IPV6_INRIA_VERSION
4521yes
4522#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004523EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004524if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4525 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004526 rm -rf conftest*
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004527 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004528fi
4529rm -f conftest*
4530
4531 ;;
4532 kame)
Michael W. Hudson54241132001-12-07 15:38:26 +00004533 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004534#line 4535 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004535#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004536
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004537#include <netinet/in.h>
4538#ifdef __KAME__
4539yes
4540#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004541EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004542if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4543 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004544 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004545 ipv6type=$i;
4546 ipv6lib=inet6
4547 ipv6libdir=/usr/local/v6/lib
4548 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004549fi
4550rm -f conftest*
4551
4552 ;;
4553 linux-glibc)
Michael W. Hudson54241132001-12-07 15:38:26 +00004554 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004555#line 4556 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004556#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004557
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004558#include <features.h>
4559#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4560yes
4561#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004562EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004563if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4564 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004565 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004566 ipv6type=$i;
4567 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004568fi
4569rm -f conftest*
4570
4571 ;;
4572 linux-inet6)
4573 if test -d /usr/inet6; then
4574 ipv6type=$i
4575 ipv6lib=inet6
4576 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004577 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004578 fi
4579 ;;
4580 solaris)
4581 if test -f /etc/netconfig; then
4582 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4583 ipv6type=$i
4584 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004585 fi
4586 fi
4587 ;;
4588 toshiba)
Michael W. Hudson54241132001-12-07 15:38:26 +00004589 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004590#line 4591 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004591#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004592
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004593#include <sys/param.h>
4594#ifdef _TOSHIBA_INET6
4595yes
4596#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004597EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004598if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4599 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004600 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004601 ipv6type=$i;
4602 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004603 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004604fi
4605rm -f conftest*
4606
4607 ;;
4608 v6d)
Michael W. Hudson54241132001-12-07 15:38:26 +00004609 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004610#line 4611 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004611#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004612
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004613#include </usr/local/v6/include/sys/v6config.h>
4614#ifdef __V6D__
4615yes
4616#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004617EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004618if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4619 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004620 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004621 ipv6type=$i;
4622 ipv6lib=v6;
4623 ipv6libdir=/usr/local/v6/lib;
4624 OPT="-I/usr/local/v6/include $OPT"
4625fi
4626rm -f conftest*
4627
4628 ;;
4629 zeta)
Michael W. Hudson54241132001-12-07 15:38:26 +00004630 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004631#line 4632 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004632#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004633
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004634#include <sys/param.h>
4635#ifdef _ZETA_MINAMI_INET6
4636yes
4637#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004638EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004639if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4640 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004641 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004642 ipv6type=$i;
4643 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004644 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004645fi
4646rm -f conftest*
4647
4648 ;;
4649 esac
4650 if test "$ipv6type" != "unknown"; then
4651 break
4652 fi
4653 done
Michael W. Hudson54241132001-12-07 15:38:26 +00004654 echo "$ac_t""$ipv6type" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004655fi
4656
4657if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4658 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4659 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4660 echo "using lib$ipv6lib"
4661 else
4662 if test $ipv6trylibc = "yes"; then
4663 echo "using libc"
4664 else
4665 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4666 echo "You need to fetch lib$ipv6lib.a from appropriate"
4667 echo 'ipv6 kit and compile beforehand.'
4668 exit 1
4669 fi
4670 fi
4671fi
4672
Barry Warsawef82cd72000-06-30 16:21:01 +00004673# Check for GC support
Michael W. Hudson54241132001-12-07 15:38:26 +00004674echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004675echo "configure:4676: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004676# Check whether --with-cycle-gc or --without-cycle-gc was given.
4677if test "${with_cycle_gc+set}" = set; then
4678 withval="$with_cycle_gc"
Michael W. Hudson54241132001-12-07 15:38:26 +00004679 :
4680fi
Barry Warsawef82cd72000-06-30 16:21:01 +00004681
4682
4683if test -z "$with_cycle_gc"
4684then with_cycle_gc="yes"
4685fi
Neil Schemenauercf229462001-08-29 23:58:47 +00004686if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +00004687then
Michael W. Hudson54241132001-12-07 15:38:26 +00004688 cat >> confdefs.h <<\EOF
Barry Warsawef82cd72000-06-30 16:21:01 +00004689#define WITH_CYCLE_GC 1
4690EOF
4691
4692fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004693echo "$ac_t""$with_cycle_gc" 1>&6
Barry Warsawef82cd72000-06-30 16:21:01 +00004694
Neil Schemenauera35c6882001-02-27 04:45:05 +00004695# Check for Python-specific malloc support
Michael W. Hudson54241132001-12-07 15:38:26 +00004696echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004697echo "configure:4698: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004698# Check whether --with-pymalloc or --without-pymalloc was given.
4699if test "${with_pymalloc+set}" = set; then
4700 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +00004701
Neil Schemenauera35c6882001-02-27 04:45:05 +00004702if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00004703then cat >> confdefs.h <<\EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004704#define WITH_PYMALLOC 1
4705EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00004706 echo "$ac_t""yes" 1>&6
4707else echo "$ac_t""no" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004708fi
4709else
Michael W. Hudson54241132001-12-07 15:38:26 +00004710 echo "$ac_t""no" 1>&6
4711fi
4712
Neil Schemenauera35c6882001-02-27 04:45:05 +00004713
Barry Warsawef82cd72000-06-30 16:21:01 +00004714# Check for --with-wctype-functions
Michael W. Hudson54241132001-12-07 15:38:26 +00004715echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004716echo "configure:4717: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004717# Check whether --with-wctype-functions or --without-wctype-functions was given.
4718if test "${with_wctype_functions+set}" = set; then
4719 withval="$with_wctype_functions"
Michael W. Hudson54241132001-12-07 15:38:26 +00004720
Barry Warsawef82cd72000-06-30 16:21:01 +00004721if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00004722then cat >> confdefs.h <<\EOF
Barry Warsawef82cd72000-06-30 16:21:01 +00004723#define WANT_WCTYPE_FUNCTIONS 1
4724EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00004725 echo "$ac_t""yes" 1>&6
4726else echo "$ac_t""no" 1>&6
Barry Warsawef82cd72000-06-30 16:21:01 +00004727fi
4728else
Michael W. Hudson54241132001-12-07 15:38:26 +00004729 echo "$ac_t""no" 1>&6
4730fi
4731
Barry Warsawef82cd72000-06-30 16:21:01 +00004732
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004733# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004734
Guido van Rossum98935bf2001-09-05 19:13:16 +00004735DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004736
Michael W. Hudson54241132001-12-07 15:38:26 +00004737echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004738echo "configure:4739: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004739# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004740if test "${with_sgi_dl+set}" = set; then
4741 withval="$with_sgi_dl"
Michael W. Hudson54241132001-12-07 15:38:26 +00004742
4743echo "$ac_t""$withval" 1>&6
4744cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004745#define WITH_SGI_DL 1
4746EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004747
Guido van Rossume97ee181999-12-20 21:27:22 +00004748DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004749dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004750if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004751then LDFLAGS="$LDFLAGS -L$dldir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004752else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004753fi
4754DLINCLDIR=${dldir}
4755LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004756else
Michael W. Hudson54241132001-12-07 15:38:26 +00004757 echo "$ac_t""no" 1>&6
4758fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004759
4760
Michael W. Hudson54241132001-12-07 15:38:26 +00004761echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004762echo "configure:4763: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004763# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004764if test "${with_dl_dld+set}" = set; then
4765 withval="$with_dl_dld"
Michael W. Hudson54241132001-12-07 15:38:26 +00004766
4767echo "$ac_t""$withval" 1>&6
4768cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004769#define WITH_DL_DLD 1
4770EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004771
Guido van Rossume97ee181999-12-20 21:27:22 +00004772DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004773dldir=`echo "$withval" | sed 's/,.*//'`
4774dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004775if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004776then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004777else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004778fi
4779DLINCLDIR=${dldir}
4780LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004781else
Michael W. Hudson54241132001-12-07 15:38:26 +00004782 echo "$ac_t""no" 1>&6
4783fi
4784
Guido van Rossum7f43da71994-08-01 12:15:30 +00004785
Guido van Rossume97ee181999-12-20 21:27:22 +00004786# the dlopen() function means we might want to use dynload_shlib.o. some
4787# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004788for ac_func in dlopen
4789do
Michael W. Hudson54241132001-12-07 15:38:26 +00004790echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004791echo "configure:4792: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004792if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4793 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004794else
Michael W. Hudson54241132001-12-07 15:38:26 +00004795 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004796#line 4797 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004797#include "confdefs.h"
4798/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004799 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004800#include <assert.h>
4801/* Override any gcc2 internal prototype to avoid an error. */
4802/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004803 builtin and then its argument prototype would still apply. */
4804char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004805
Michael W. Hudson54241132001-12-07 15:38:26 +00004806int main() {
4807
Guido van Rossume97ee181999-12-20 21:27:22 +00004808/* The GNU C library defines this for functions which it implements
4809 to always fail with ENOSYS. Some functions are actually named
4810 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004811#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004812choke me
4813#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004814$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004815#endif
4816
Michael W. Hudson54241132001-12-07 15:38:26 +00004817; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004818EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004819if { (eval echo configure:4820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004820 rm -rf conftest*
4821 eval "ac_cv_func_$ac_func=yes"
4822else
4823 echo "configure: failed program was:" >&5
4824 cat conftest.$ac_ext >&5
4825 rm -rf conftest*
4826 eval "ac_cv_func_$ac_func=no"
4827fi
4828rm -f conftest*
4829fi
Guido van Rossume97ee181999-12-20 21:27:22 +00004830
Michael W. Hudson54241132001-12-07 15:38:26 +00004831if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4832 echo "$ac_t""yes" 1>&6
4833 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4834 cat >> confdefs.h <<EOF
4835#define $ac_tr_func 1
4836EOF
4837
4838else
4839 echo "$ac_t""no" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004840fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004841done
Guido van Rossume97ee181999-12-20 21:27:22 +00004842
Michael W. Hudson54241132001-12-07 15:38:26 +00004843
Guido van Rossume97ee181999-12-20 21:27:22 +00004844# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4845# loading of modules.
4846
Michael W. Hudson54241132001-12-07 15:38:26 +00004847echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004848echo "configure:4849: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004849if test -z "$DYNLOADFILE"
4850then
4851 case $ac_sys_system/$ac_sys_release in
4852 AIX*) DYNLOADFILE="dynload_aix.o";;
4853 BeOS*) DYNLOADFILE="dynload_beos.o";;
4854 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004855 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004856 *)
4857 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4858 # out any dynamic loading
4859 if test "$ac_cv_func_dlopen" = yes
4860 then DYNLOADFILE="dynload_shlib.o"
4861 else DYNLOADFILE="dynload_stub.o"
4862 fi
4863 ;;
4864 esac
4865fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004866echo "$ac_t""$DYNLOADFILE" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004867if test "$DYNLOADFILE" != "dynload_stub.o"
4868then
Michael W. Hudson54241132001-12-07 15:38:26 +00004869 cat >> confdefs.h <<\EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004870#define HAVE_DYNAMIC_LOADING 1
4871EOF
4872
4873fi
4874
Neil Schemenauer4e425612001-06-19 15:44:15 +00004875# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4876
Michael W. Hudson54241132001-12-07 15:38:26 +00004877
4878echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004879echo "configure:4880: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004880if test -z "$MACHDEP_OBJS"
4881then
Jack Jansene578a632001-08-15 01:27:14 +00004882 MACHDEP_OBJS=$extra_machdep_objs
4883else
4884 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004885fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004886echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004887
Guido van Rossum627b2d71993-12-24 10:39:16 +00004888# checks for library functions
Martin v. Löwis244edc82001-10-04 22:44:26 +00004889for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004890 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00004891 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004892 hstrerror inet_pton kill killpg link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004893 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004894 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +00004895 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004896 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004897 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004898 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +00004899 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004900do
Michael W. Hudson54241132001-12-07 15:38:26 +00004901echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004902echo "configure:4903: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004903if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4904 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004905else
Michael W. Hudson54241132001-12-07 15:38:26 +00004906 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004907#line 4908 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004908#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004909/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004910 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004911#include <assert.h>
4912/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004913/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004914 builtin and then its argument prototype would still apply. */
4915char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004916
Michael W. Hudson54241132001-12-07 15:38:26 +00004917int main() {
4918
Guido van Rossum627b2d71993-12-24 10:39:16 +00004919/* The GNU C library defines this for functions which it implements
4920 to always fail with ENOSYS. Some functions are actually named
4921 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004922#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004923choke me
4924#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004925$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004926#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004927
Michael W. Hudson54241132001-12-07 15:38:26 +00004928; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004929EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004930if { (eval echo configure:4931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004931 rm -rf conftest*
4932 eval "ac_cv_func_$ac_func=yes"
4933else
4934 echo "configure: failed program was:" >&5
4935 cat conftest.$ac_ext >&5
4936 rm -rf conftest*
4937 eval "ac_cv_func_$ac_func=no"
4938fi
4939rm -f conftest*
4940fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00004941
Michael W. Hudson54241132001-12-07 15:38:26 +00004942if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4943 echo "$ac_t""yes" 1>&6
4944 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4945 cat >> confdefs.h <<EOF
4946#define $ac_tr_func 1
4947EOF
4948
4949else
4950 echo "$ac_t""no" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004951fi
4952done
4953
Michael W. Hudson54241132001-12-07 15:38:26 +00004954
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004955# check for openpty and forkpty
4956
4957for ac_func in openpty
4958do
Michael W. Hudson54241132001-12-07 15:38:26 +00004959echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004960echo "configure:4961: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004961if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4962 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004963else
Michael W. Hudson54241132001-12-07 15:38:26 +00004964 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004965#line 4966 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004966#include "confdefs.h"
4967/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004968 which can conflict with char $ac_func(); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004969#include <assert.h>
4970/* Override any gcc2 internal prototype to avoid an error. */
4971/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004972 builtin and then its argument prototype would still apply. */
4973char $ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004974
Michael W. Hudson54241132001-12-07 15:38:26 +00004975int main() {
4976
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004977/* The GNU C library defines this for functions which it implements
4978 to always fail with ENOSYS. Some functions are actually named
4979 something starting with __ and the normal name is an alias. */
4980#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4981choke me
4982#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004983$ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004984#endif
4985
Michael W. Hudson54241132001-12-07 15:38:26 +00004986; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004987EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004988if { (eval echo configure:4989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004989 rm -rf conftest*
4990 eval "ac_cv_func_$ac_func=yes"
4991else
4992 echo "configure: failed program was:" >&5
4993 cat conftest.$ac_ext >&5
4994 rm -rf conftest*
4995 eval "ac_cv_func_$ac_func=no"
4996fi
4997rm -f conftest*
4998fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004999
Michael W. Hudson54241132001-12-07 15:38:26 +00005000if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5001 echo "$ac_t""yes" 1>&6
5002 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5003 cat >> confdefs.h <<EOF
5004#define $ac_tr_func 1
5005EOF
5006
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005007else
Michael W. Hudson54241132001-12-07 15:38:26 +00005008 echo "$ac_t""no" 1>&6
5009echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005010echo "configure:5011: checking for openpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005011ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
5012if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5013 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005014else
Michael W. Hudson54241132001-12-07 15:38:26 +00005015 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005016LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005017cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005018#line 5019 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005019#include "confdefs.h"
5020/* Override any gcc2 internal prototype to avoid an error. */
5021/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005022 builtin and then its argument prototype would still apply. */
5023char openpty();
5024
5025int main() {
5026openpty()
5027; return 0; }
5028EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005029if { (eval echo configure:5030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005030 rm -rf conftest*
5031 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005032else
Michael W. Hudson54241132001-12-07 15:38:26 +00005033 echo "configure: failed program was:" >&5
5034 cat conftest.$ac_ext >&5
5035 rm -rf conftest*
5036 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005037fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005038rm -f conftest*
5039LIBS="$ac_save_LIBS"
5040
Fred Drake8cef4cf2000-06-28 16:40:38 +00005041fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005042if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5043 echo "$ac_t""yes" 1>&6
5044 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005045#define HAVE_OPENPTY 1
5046EOF
5047 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005048else
5049 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005050fi
5051
5052fi
5053done
5054
5055for ac_func in forkpty
5056do
Michael W. Hudson54241132001-12-07 15:38:26 +00005057echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005058echo "configure:5059: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005059if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5060 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005061else
Michael W. Hudson54241132001-12-07 15:38:26 +00005062 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005063#line 5064 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005064#include "confdefs.h"
5065/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005066 which can conflict with char $ac_func(); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +00005067#include <assert.h>
5068/* Override any gcc2 internal prototype to avoid an error. */
5069/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005070 builtin and then its argument prototype would still apply. */
5071char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005072
Michael W. Hudson54241132001-12-07 15:38:26 +00005073int main() {
5074
Fred Drake8cef4cf2000-06-28 16:40:38 +00005075/* The GNU C library defines this for functions which it implements
5076 to always fail with ENOSYS. Some functions are actually named
5077 something starting with __ and the normal name is an alias. */
5078#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5079choke me
5080#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005081$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005082#endif
5083
Michael W. Hudson54241132001-12-07 15:38:26 +00005084; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005085EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005086if { (eval echo configure:5087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005087 rm -rf conftest*
5088 eval "ac_cv_func_$ac_func=yes"
5089else
5090 echo "configure: failed program was:" >&5
5091 cat conftest.$ac_ext >&5
5092 rm -rf conftest*
5093 eval "ac_cv_func_$ac_func=no"
5094fi
5095rm -f conftest*
5096fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00005097
Michael W. Hudson54241132001-12-07 15:38:26 +00005098if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5099 echo "$ac_t""yes" 1>&6
5100 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5101 cat >> confdefs.h <<EOF
5102#define $ac_tr_func 1
5103EOF
5104
Fred Drake8cef4cf2000-06-28 16:40:38 +00005105else
Michael W. Hudson54241132001-12-07 15:38:26 +00005106 echo "$ac_t""no" 1>&6
5107echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005108echo "configure:5109: checking for forkpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005109ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
5110if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5111 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005112else
Michael W. Hudson54241132001-12-07 15:38:26 +00005113 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005114LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005115cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005116#line 5117 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005117#include "confdefs.h"
5118/* Override any gcc2 internal prototype to avoid an error. */
5119/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005120 builtin and then its argument prototype would still apply. */
5121char forkpty();
5122
5123int main() {
5124forkpty()
5125; return 0; }
5126EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005127if { (eval echo configure:5128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005128 rm -rf conftest*
5129 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005130else
Michael W. Hudson54241132001-12-07 15:38:26 +00005131 echo "configure: failed program was:" >&5
5132 cat conftest.$ac_ext >&5
5133 rm -rf conftest*
5134 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005135fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005136rm -f conftest*
5137LIBS="$ac_save_LIBS"
5138
Fred Drake8cef4cf2000-06-28 16:40:38 +00005139fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005140if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5141 echo "$ac_t""yes" 1>&6
5142 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005143#define HAVE_FORKPTY 1
5144EOF
5145 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005146else
5147 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005148fi
5149
5150fi
5151done
5152
Jack Jansendd19cf82001-12-06 22:36:17 +00005153
Michael W. Hudson54241132001-12-07 15:38:26 +00005154# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +00005155for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
5156do
Michael W. Hudson54241132001-12-07 15:38:26 +00005157echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005158echo "configure:5159: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005159if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5160 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005161else
Michael W. Hudson54241132001-12-07 15:38:26 +00005162 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005163#line 5164 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005164#include "confdefs.h"
5165/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005166 which can conflict with char $ac_func(); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +00005167#include <assert.h>
5168/* Override any gcc2 internal prototype to avoid an error. */
5169/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005170 builtin and then its argument prototype would still apply. */
5171char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005172
Michael W. Hudson54241132001-12-07 15:38:26 +00005173int main() {
5174
Fred Drake8cef4cf2000-06-28 16:40:38 +00005175/* The GNU C library defines this for functions which it implements
5176 to always fail with ENOSYS. Some functions are actually named
5177 something starting with __ and the normal name is an alias. */
5178#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5179choke me
5180#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005181$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005182#endif
5183
Michael W. Hudson54241132001-12-07 15:38:26 +00005184; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005185EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005186if { (eval echo configure:5187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005187 rm -rf conftest*
5188 eval "ac_cv_func_$ac_func=yes"
5189else
5190 echo "configure: failed program was:" >&5
5191 cat conftest.$ac_ext >&5
5192 rm -rf conftest*
5193 eval "ac_cv_func_$ac_func=no"
5194fi
5195rm -f conftest*
5196fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005197
Michael W. Hudson54241132001-12-07 15:38:26 +00005198if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5199 echo "$ac_t""yes" 1>&6
5200 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5201 cat >> confdefs.h <<EOF
5202#define $ac_tr_func 1
5203EOF
5204
5205else
5206 echo "$ac_t""no" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005207fi
5208done
5209
Michael W. Hudson54241132001-12-07 15:38:26 +00005210
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005211for ac_func in dup2 getcwd strdup strerror memmove
5212do
Michael W. Hudson54241132001-12-07 15:38:26 +00005213echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005214echo "configure:5215: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005215if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5216 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005217else
Michael W. Hudson54241132001-12-07 15:38:26 +00005218 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005219#line 5220 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005220#include "confdefs.h"
5221/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005222 which can conflict with char $ac_func(); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005223#include <assert.h>
5224/* Override any gcc2 internal prototype to avoid an error. */
5225/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005226 builtin and then its argument prototype would still apply. */
5227char $ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005228
Michael W. Hudson54241132001-12-07 15:38:26 +00005229int main() {
5230
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005231/* The GNU C library defines this for functions which it implements
5232 to always fail with ENOSYS. Some functions are actually named
5233 something starting with __ and the normal name is an alias. */
5234#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5235choke me
5236#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005237$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005238#endif
5239
Michael W. Hudson54241132001-12-07 15:38:26 +00005240; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005241EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005242if { (eval echo configure:5243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005243 rm -rf conftest*
5244 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005245else
Michael W. Hudson54241132001-12-07 15:38:26 +00005246 echo "configure: failed program was:" >&5
5247 cat conftest.$ac_ext >&5
5248 rm -rf conftest*
5249 eval "ac_cv_func_$ac_func=no"
5250fi
5251rm -f conftest*
5252fi
5253
5254if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5255 echo "$ac_t""yes" 1>&6
5256 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5257 cat >> confdefs.h <<EOF
5258#define $ac_tr_func 1
5259EOF
5260
5261else
5262 echo "$ac_t""no" 1>&6
5263LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005264fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005265done
5266
Michael W. Hudson54241132001-12-07 15:38:26 +00005267
Thomas Wouters3a584202000-08-05 23:28:51 +00005268for ac_func in getpgrp
5269do
Michael W. Hudson54241132001-12-07 15:38:26 +00005270echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005271echo "configure:5272: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005272if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5273 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005274else
Michael W. Hudson54241132001-12-07 15:38:26 +00005275 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005276#line 5277 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005277#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005278/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005279 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005280#include <assert.h>
5281/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005282/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005283 builtin and then its argument prototype would still apply. */
5284char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005285
Michael W. Hudson54241132001-12-07 15:38:26 +00005286int main() {
5287
Guido van Rossum627b2d71993-12-24 10:39:16 +00005288/* The GNU C library defines this for functions which it implements
5289 to always fail with ENOSYS. Some functions are actually named
5290 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005291#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005292choke me
5293#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005294$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005295#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005296
Michael W. Hudson54241132001-12-07 15:38:26 +00005297; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005298EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005299if { (eval echo configure:5300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005300 rm -rf conftest*
5301 eval "ac_cv_func_$ac_func=yes"
5302else
5303 echo "configure: failed program was:" >&5
5304 cat conftest.$ac_ext >&5
5305 rm -rf conftest*
5306 eval "ac_cv_func_$ac_func=no"
5307fi
5308rm -f conftest*
5309fi
5310
5311if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5312 echo "$ac_t""yes" 1>&6
5313 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5314 cat >> confdefs.h <<EOF
5315#define $ac_tr_func 1
5316EOF
5317 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005318#line 5319 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005319#include "confdefs.h"
5320#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005321int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005322getpgrp(0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005323; return 0; }
5324EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005325if { (eval echo configure:5326: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005326 rm -rf conftest*
5327 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005328#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005329EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005330
Guido van Rossumf78abae1997-01-21 22:02:36 +00005331else
Michael W. Hudson54241132001-12-07 15:38:26 +00005332 echo "configure: failed program was:" >&5
5333 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005334fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005335rm -f conftest*
5336else
5337 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005338fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005339done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005340
Thomas Wouters3a584202000-08-05 23:28:51 +00005341for ac_func in setpgrp
5342do
Michael W. Hudson54241132001-12-07 15:38:26 +00005343echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005344echo "configure:5345: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005345if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5346 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005347else
Michael W. Hudson54241132001-12-07 15:38:26 +00005348 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005349#line 5350 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005350#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005351/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005352 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005353#include <assert.h>
5354/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005355/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005356 builtin and then its argument prototype would still apply. */
5357char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005358
Michael W. Hudson54241132001-12-07 15:38:26 +00005359int main() {
5360
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005361/* The GNU C library defines this for functions which it implements
5362 to always fail with ENOSYS. Some functions are actually named
5363 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005364#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005365choke me
5366#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005367$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005368#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005369
Michael W. Hudson54241132001-12-07 15:38:26 +00005370; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005371EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005372if { (eval echo configure:5373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005373 rm -rf conftest*
5374 eval "ac_cv_func_$ac_func=yes"
5375else
5376 echo "configure: failed program was:" >&5
5377 cat conftest.$ac_ext >&5
5378 rm -rf conftest*
5379 eval "ac_cv_func_$ac_func=no"
5380fi
5381rm -f conftest*
5382fi
5383
5384if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5385 echo "$ac_t""yes" 1>&6
5386 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5387 cat >> confdefs.h <<EOF
5388#define $ac_tr_func 1
5389EOF
5390 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005391#line 5392 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005392#include "confdefs.h"
5393#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005394int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005395setpgrp(0,0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005396; return 0; }
5397EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005398if { (eval echo configure:5399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005399 rm -rf conftest*
5400 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005401#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005402EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005403
Guido van Rossumf78abae1997-01-21 22:02:36 +00005404else
Michael W. Hudson54241132001-12-07 15:38:26 +00005405 echo "configure: failed program was:" >&5
5406 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005407fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005408rm -f conftest*
5409else
5410 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005411fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005412done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005413
Thomas Wouters3a584202000-08-05 23:28:51 +00005414for ac_func in gettimeofday
5415do
Michael W. Hudson54241132001-12-07 15:38:26 +00005416echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005417echo "configure:5418: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005418if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5419 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005420else
Michael W. Hudson54241132001-12-07 15:38:26 +00005421 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005422#line 5423 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005423#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005424/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005425 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005426#include <assert.h>
5427/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005428/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005429 builtin and then its argument prototype would still apply. */
5430char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005431
Michael W. Hudson54241132001-12-07 15:38:26 +00005432int main() {
5433
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005434/* The GNU C library defines this for functions which it implements
5435 to always fail with ENOSYS. Some functions are actually named
5436 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005437#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005438choke me
5439#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005440$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005441#endif
5442
Michael W. Hudson54241132001-12-07 15:38:26 +00005443; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005444EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005445if { (eval echo configure:5446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005446 rm -rf conftest*
5447 eval "ac_cv_func_$ac_func=yes"
5448else
5449 echo "configure: failed program was:" >&5
5450 cat conftest.$ac_ext >&5
5451 rm -rf conftest*
5452 eval "ac_cv_func_$ac_func=no"
5453fi
5454rm -f conftest*
5455fi
5456
5457if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5458 echo "$ac_t""yes" 1>&6
5459 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5460 cat >> confdefs.h <<EOF
5461#define $ac_tr_func 1
5462EOF
5463 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005464#line 5465 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005465#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005466#include <sys/time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005467int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005468gettimeofday((struct timeval*)0,(struct timezone*)0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005469; return 0; }
5470EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005471if { (eval echo configure:5472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005472 :
5473else
Michael W. Hudson54241132001-12-07 15:38:26 +00005474 echo "configure: failed program was:" >&5
5475 cat conftest.$ac_ext >&5
5476 rm -rf conftest*
5477 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005478#define GETTIMEOFDAY_NO_TZ 1
5479EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005480
5481fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005482rm -f conftest*
5483else
5484 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005485fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005486done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005487
Michael W. Hudson54241132001-12-07 15:38:26 +00005488
5489
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005490# On OSF/1 V5.1, getaddrinfo is available, but a define
Michael W. Hudson54241132001-12-07 15:38:26 +00005491# for [no]getaddrinfo in netdb.h.
5492echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005493echo "configure:5494: checking for getaddrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005494cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005495#line 5496 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005496#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005497
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005498#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005499#include <sys/socket.h>
5500#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005501#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005502
Michael W. Hudson54241132001-12-07 15:38:26 +00005503int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005504
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005505getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005506
Michael W. Hudson54241132001-12-07 15:38:26 +00005507; return 0; }
5508EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005509if { (eval echo configure:5510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005510 rm -rf conftest*
5511
5512echo "$ac_t""yes" 1>&6
5513echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005514echo "configure:5515: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005515if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005516 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005517buggygetaddrinfo=yes
5518else
Michael W. Hudson54241132001-12-07 15:38:26 +00005519 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005520#line 5521 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005521#include "confdefs.h"
5522
5523#include <sys/types.h>
5524#include <netdb.h>
5525#include <string.h>
5526#include <sys/socket.h>
5527#include <netinet/in.h>
5528
5529main()
5530{
5531 int passive, gaierr, inet4 = 0, inet6 = 0;
5532 struct addrinfo hints, *ai, *aitop;
5533 char straddr[INET6_ADDRSTRLEN], strport[16];
5534
5535 for (passive = 0; passive <= 1; passive++) {
5536 memset(&hints, 0, sizeof(hints));
5537 hints.ai_family = AF_UNSPEC;
5538 hints.ai_flags = passive ? AI_PASSIVE : 0;
5539 hints.ai_socktype = SOCK_STREAM;
5540 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5541 (void)gai_strerror(gaierr);
5542 goto bad;
5543 }
5544 for (ai = aitop; ai; ai = ai->ai_next) {
5545 if (ai->ai_addr == NULL ||
5546 ai->ai_addrlen == 0 ||
5547 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5548 straddr, sizeof(straddr), strport, sizeof(strport),
5549 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5550 goto bad;
5551 }
5552 switch (ai->ai_family) {
5553 case AF_INET:
5554 if (strcmp(strport, "54321") != 0) {
5555 goto bad;
5556 }
5557 if (passive) {
5558 if (strcmp(straddr, "0.0.0.0") != 0) {
5559 goto bad;
5560 }
5561 } else {
5562 if (strcmp(straddr, "127.0.0.1") != 0) {
5563 goto bad;
5564 }
5565 }
5566 inet4++;
5567 break;
5568 case AF_INET6:
5569 if (strcmp(strport, "54321") != 0) {
5570 goto bad;
5571 }
5572 if (passive) {
5573 if (strcmp(straddr, "::") != 0) {
5574 goto bad;
5575 }
5576 } else {
5577 if (strcmp(straddr, "::1") != 0) {
5578 goto bad;
5579 }
5580 }
5581 inet6++;
5582 break;
5583 case AF_UNSPEC:
5584 goto bad;
5585 break;
5586 default:
5587 /* another family support? */
5588 break;
5589 }
5590 }
5591 }
5592
5593 if (!(inet4 == 0 || inet4 == 2))
5594 goto bad;
5595 if (!(inet6 == 0 || inet6 == 2))
5596 goto bad;
5597
5598 if (aitop)
5599 freeaddrinfo(aitop);
5600 exit(0);
5601
5602 bad:
5603 if (aitop)
5604 freeaddrinfo(aitop);
5605 exit(1);
5606}
5607
Michael W. Hudson54241132001-12-07 15:38:26 +00005608EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005609if { (eval echo configure:5610: \"$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 +00005610then
5611 echo "$ac_t""good" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005612buggygetaddrinfo=no
5613else
Michael W. Hudson54241132001-12-07 15:38:26 +00005614 echo "configure: failed program was:" >&5
5615 cat conftest.$ac_ext >&5
5616 rm -fr conftest*
5617 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005618buggygetaddrinfo=yes
5619fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005620rm -fr conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005621fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005622
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005623else
Michael W. Hudson54241132001-12-07 15:38:26 +00005624 echo "configure: failed program was:" >&5
5625 cat conftest.$ac_ext >&5
5626 rm -rf conftest*
5627
5628echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005629buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005630
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005631fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005632rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005633
5634if test "$buggygetaddrinfo" = "yes"; then
5635 if test "$ipv6" = "yes"; then
5636 echo 'Fatal: You must get working getaddrinfo() function.'
5637 echo ' or you can specify "--disable-ipv6"'.
5638 exit 1
5639 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005640else
Michael W. Hudson54241132001-12-07 15:38:26 +00005641 cat >> confdefs.h <<\EOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005642#define HAVE_GETADDRINFO 1
5643EOF
5644
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005645fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005646for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005647do
Michael W. Hudson54241132001-12-07 15:38:26 +00005648echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005649echo "configure:5650: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005650if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5651 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005652else
Michael W. Hudson54241132001-12-07 15:38:26 +00005653 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005654#line 5655 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005655#include "confdefs.h"
5656/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005657 which can conflict with char $ac_func(); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005658#include <assert.h>
5659/* Override any gcc2 internal prototype to avoid an error. */
5660/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005661 builtin and then its argument prototype would still apply. */
5662char $ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005663
Michael W. Hudson54241132001-12-07 15:38:26 +00005664int main() {
5665
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005666/* The GNU C library defines this for functions which it implements
5667 to always fail with ENOSYS. Some functions are actually named
5668 something starting with __ and the normal name is an alias. */
5669#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5670choke me
5671#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005672$ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005673#endif
5674
Michael W. Hudson54241132001-12-07 15:38:26 +00005675; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005676EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005677if { (eval echo configure:5678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005678 rm -rf conftest*
5679 eval "ac_cv_func_$ac_func=yes"
5680else
5681 echo "configure: failed program was:" >&5
5682 cat conftest.$ac_ext >&5
5683 rm -rf conftest*
5684 eval "ac_cv_func_$ac_func=no"
5685fi
5686rm -f conftest*
5687fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005688
Michael W. Hudson54241132001-12-07 15:38:26 +00005689if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5690 echo "$ac_t""yes" 1>&6
5691 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5692 cat >> confdefs.h <<EOF
5693#define $ac_tr_func 1
5694EOF
5695
5696else
5697 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005698fi
5699done
5700
Michael W. Hudson54241132001-12-07 15:38:26 +00005701
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005702# checks for structures
Michael W. Hudson54241132001-12-07 15:38:26 +00005703echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005704echo "configure:5705: checking whether time.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005705if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5706 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005707else
Michael W. Hudson54241132001-12-07 15:38:26 +00005708 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005709#line 5710 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005710#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005711#include <sys/types.h>
5712#include <sys/time.h>
5713#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005714int main() {
5715struct tm *tp;
5716; return 0; }
5717EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005718if { (eval echo configure:5719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005719 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005720 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005721else
Michael W. Hudson54241132001-12-07 15:38:26 +00005722 echo "configure: failed program was:" >&5
5723 cat conftest.$ac_ext >&5
5724 rm -rf conftest*
5725 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005726fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005727rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005728fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005729
Michael W. Hudson54241132001-12-07 15:38:26 +00005730echo "$ac_t""$ac_cv_header_time" 1>&6
5731if test $ac_cv_header_time = yes; then
5732 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005733#define TIME_WITH_SYS_TIME 1
5734EOF
5735
5736fi
5737
Michael W. Hudson54241132001-12-07 15:38:26 +00005738echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005739echo "configure:5740: checking whether struct tm is in sys/time.h or time.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005740if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5741 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005742else
Michael W. Hudson54241132001-12-07 15:38:26 +00005743 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005744#line 5745 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005745#include "confdefs.h"
5746#include <sys/types.h>
5747#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005748int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005749struct tm *tp; tp->tm_sec;
Michael W. Hudson54241132001-12-07 15:38:26 +00005750; return 0; }
5751EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005752if { (eval echo configure:5753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005753 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005754 ac_cv_struct_tm=time.h
5755else
Michael W. Hudson54241132001-12-07 15:38:26 +00005756 echo "configure: failed program was:" >&5
5757 cat conftest.$ac_ext >&5
5758 rm -rf conftest*
5759 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005760fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005761rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005762fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005763
Michael W. Hudson54241132001-12-07 15:38:26 +00005764echo "$ac_t""$ac_cv_struct_tm" 1>&6
5765if test $ac_cv_struct_tm = sys/time.h; then
5766 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005767#define TM_IN_SYS_TIME 1
5768EOF
5769
5770fi
5771
Michael W. Hudson54241132001-12-07 15:38:26 +00005772echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005773echo "configure:5774: checking for tm_zone in struct tm" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005774if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5775 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005776else
Michael W. Hudson54241132001-12-07 15:38:26 +00005777 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005778#line 5779 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005779#include "confdefs.h"
5780#include <sys/types.h>
5781#include <$ac_cv_struct_tm>
Michael W. Hudson54241132001-12-07 15:38:26 +00005782int main() {
5783struct tm tm; tm.tm_zone;
5784; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005785EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005786if { (eval echo configure:5787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005787 rm -rf conftest*
5788 ac_cv_struct_tm_zone=yes
5789else
5790 echo "configure: failed program was:" >&5
5791 cat conftest.$ac_ext >&5
5792 rm -rf conftest*
5793 ac_cv_struct_tm_zone=no
5794fi
5795rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005796fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005797
Michael W. Hudson54241132001-12-07 15:38:26 +00005798echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5799if test "$ac_cv_struct_tm_zone" = yes; then
5800 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005801#define HAVE_TM_ZONE 1
5802EOF
5803
5804else
Michael W. Hudson54241132001-12-07 15:38:26 +00005805 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005806echo "configure:5807: checking for tzname" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005807if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5808 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005809else
Michael W. Hudson54241132001-12-07 15:38:26 +00005810 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005811#line 5812 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005812#include "confdefs.h"
5813#include <time.h>
5814#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005815extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005816#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005817int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005818atoi(*tzname);
Michael W. Hudson54241132001-12-07 15:38:26 +00005819; return 0; }
5820EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005821if { (eval echo configure:5822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005822 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005823 ac_cv_var_tzname=yes
5824else
Michael W. Hudson54241132001-12-07 15:38:26 +00005825 echo "configure: failed program was:" >&5
5826 cat conftest.$ac_ext >&5
5827 rm -rf conftest*
5828 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005829fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005830rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005831fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005832
Michael W. Hudson54241132001-12-07 15:38:26 +00005833echo "$ac_t""$ac_cv_var_tzname" 1>&6
5834 if test $ac_cv_var_tzname = yes; then
5835 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005836#define HAVE_TZNAME 1
5837EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005838
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005839 fi
5840fi
5841
Michael W. Hudson54241132001-12-07 15:38:26 +00005842echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005843echo "configure:5844: checking for st_rdev in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005844if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
5845 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005846else
Michael W. Hudson54241132001-12-07 15:38:26 +00005847 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005848#line 5849 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005849#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005850#include <sys/types.h>
5851#include <sys/stat.h>
5852int main() {
5853struct stat s; s.st_rdev;
5854; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005855EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005856if { (eval echo configure:5857: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005857 rm -rf conftest*
5858 ac_cv_struct_st_rdev=yes
5859else
5860 echo "configure: failed program was:" >&5
5861 cat conftest.$ac_ext >&5
5862 rm -rf conftest*
5863 ac_cv_struct_st_rdev=no
5864fi
5865rm -f conftest*
5866fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005867
Michael W. Hudson54241132001-12-07 15:38:26 +00005868echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
5869if test $ac_cv_struct_st_rdev = yes; then
5870 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005871#define HAVE_ST_RDEV 1
5872EOF
5873
5874fi
5875
Michael W. Hudson54241132001-12-07 15:38:26 +00005876echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005877echo "configure:5878: checking for st_blksize in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005878if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
5879 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005880else
Michael W. Hudson54241132001-12-07 15:38:26 +00005881 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005882#line 5883 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005883#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005884#include <sys/types.h>
5885#include <sys/stat.h>
5886int main() {
5887struct stat s; s.st_blksize;
5888; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005889EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005890if { (eval echo configure:5891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005891 rm -rf conftest*
5892 ac_cv_struct_st_blksize=yes
5893else
5894 echo "configure: failed program was:" >&5
5895 cat conftest.$ac_ext >&5
5896 rm -rf conftest*
5897 ac_cv_struct_st_blksize=no
5898fi
5899rm -f conftest*
5900fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005901
Michael W. Hudson54241132001-12-07 15:38:26 +00005902echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
5903if test $ac_cv_struct_st_blksize = yes; then
5904 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005905#define HAVE_ST_BLKSIZE 1
5906EOF
5907
5908fi
5909
Michael W. Hudson54241132001-12-07 15:38:26 +00005910echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005911echo "configure:5912: checking for st_blocks in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005912if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
5913 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005914else
Michael W. Hudson54241132001-12-07 15:38:26 +00005915 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005916#line 5917 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005917#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005918#include <sys/types.h>
5919#include <sys/stat.h>
5920int main() {
5921struct stat s; s.st_blocks;
5922; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005923EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005924if { (eval echo configure:5925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005925 rm -rf conftest*
5926 ac_cv_struct_st_blocks=yes
5927else
5928 echo "configure: failed program was:" >&5
5929 cat conftest.$ac_ext >&5
5930 rm -rf conftest*
5931 ac_cv_struct_st_blocks=no
5932fi
5933rm -f conftest*
5934fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005935
Michael W. Hudson54241132001-12-07 15:38:26 +00005936echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
5937if test $ac_cv_struct_st_blocks = yes; then
5938 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005939#define HAVE_ST_BLOCKS 1
5940EOF
5941
5942else
Michael W. Hudson54241132001-12-07 15:38:26 +00005943 LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005944fi
5945
Michael W. Hudson54241132001-12-07 15:38:26 +00005946
5947echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005948echo "configure:5949: checking for time.h that defines altzone" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005949if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
5950 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005951else
Michael W. Hudson54241132001-12-07 15:38:26 +00005952 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005953#line 5954 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005954#include "confdefs.h"
5955#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005956int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005957return altzone;
Michael W. Hudson54241132001-12-07 15:38:26 +00005958; return 0; }
5959EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005960if { (eval echo configure:5961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005961 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005962 ac_cv_header_time_altzone=yes
5963else
Michael W. Hudson54241132001-12-07 15:38:26 +00005964 echo "configure: failed program was:" >&5
5965 cat conftest.$ac_ext >&5
5966 rm -rf conftest*
5967 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005968fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005969rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005970fi
5971
Michael W. Hudson54241132001-12-07 15:38:26 +00005972echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005973if test $ac_cv_header_time_altzone = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005974 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005975#define HAVE_ALTZONE 1
5976EOF
5977
5978fi
5979
Guido van Rossumda88dad1995-01-26 00:46:29 +00005980was_it_defined=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005981echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005982echo "configure:5983: checking whether sys/select.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005983cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005984#line 5985 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005985#include "confdefs.h"
5986
5987#include <sys/types.h>
5988#include <sys/select.h>
5989#include <sys/time.h>
5990
Michael W. Hudson54241132001-12-07 15:38:26 +00005991int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005992;
Michael W. Hudson54241132001-12-07 15:38:26 +00005993; return 0; }
5994EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00005995if { (eval echo configure:5996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005996 rm -rf conftest*
5997 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005998#define SYS_SELECT_WITH_SYS_TIME 1
5999EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006000 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006001else
Michael W. Hudson54241132001-12-07 15:38:26 +00006002 echo "configure: failed program was:" >&5
6003 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006004fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006005rm -f conftest*
6006echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006007
Michael W. Hudson54241132001-12-07 15:38:26 +00006008echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006009echo "configure:6010: checking for addrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006010if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
6011 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006012else
Michael W. Hudson54241132001-12-07 15:38:26 +00006013 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006014#line 6015 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006015#include "confdefs.h"
6016
6017# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006018int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006019struct addrinfo a
Michael W. Hudson54241132001-12-07 15:38:26 +00006020; return 0; }
6021EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006022if { (eval echo configure:6023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006023 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006024 ac_cv_struct_addrinfo=yes
6025else
Michael W. Hudson54241132001-12-07 15:38:26 +00006026 echo "configure: failed program was:" >&5
6027 cat conftest.$ac_ext >&5
6028 rm -rf conftest*
6029 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006030fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006031rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006032fi
6033
Michael W. Hudson54241132001-12-07 15:38:26 +00006034echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006035if test $ac_cv_struct_addrinfo = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006036 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006037#define HAVE_ADDRINFO 1
6038EOF
6039
6040fi
6041
Michael W. Hudson54241132001-12-07 15:38:26 +00006042echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006043echo "configure:6044: checking for sockaddr_storage" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006044if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
6045 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006046else
Michael W. Hudson54241132001-12-07 15:38:26 +00006047 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006048#line 6049 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006049#include "confdefs.h"
6050
6051# include <sys/types.h>
6052# include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006053int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006054struct sockaddr_storage s
Michael W. Hudson54241132001-12-07 15:38:26 +00006055; return 0; }
6056EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006057if { (eval echo configure:6058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006058 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006059 ac_cv_struct_sockaddr_storage=yes
6060else
Michael W. Hudson54241132001-12-07 15:38:26 +00006061 echo "configure: failed program was:" >&5
6062 cat conftest.$ac_ext >&5
6063 rm -rf conftest*
6064 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006065fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006066rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006067fi
6068
Michael W. Hudson54241132001-12-07 15:38:26 +00006069echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006070if test $ac_cv_struct_sockaddr_storage = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006071 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006072#define HAVE_SOCKADDR_STORAGE 1
6073EOF
6074
6075fi
6076
Guido van Rossum627b2d71993-12-24 10:39:16 +00006077# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00006078
Michael W. Hudson54241132001-12-07 15:38:26 +00006079echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006080echo "configure:6081: checking whether char is unsigned" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006081if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
6082 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006083else
Michael W. Hudson54241132001-12-07 15:38:26 +00006084 if test "$GCC" = yes; then
6085 # GCC predefines this symbol on systems where it applies.
6086cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006087#line 6088 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006088#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00006089#ifdef __CHAR_UNSIGNED__
6090 yes
6091#endif
6092
6093EOF
6094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6095 egrep "yes" >/dev/null 2>&1; then
6096 rm -rf conftest*
6097 ac_cv_c_char_unsigned=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006098else
Michael W. Hudson54241132001-12-07 15:38:26 +00006099 rm -rf conftest*
6100 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006101fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006102rm -f conftest*
6103
6104else
6105if test "$cross_compiling" = yes; then
6106 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6107else
6108 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006109#line 6110 "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +00006110#include "confdefs.h"
6111/* volatile prevents gcc2 from optimizing the test away on sparcs. */
6112#if !defined(__STDC__) || __STDC__ != 1
6113#define volatile
6114#endif
6115main() {
6116 volatile char c = 255; exit(c < 0);
6117}
6118EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006119if { (eval echo configure:6120: \"$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 +00006120then
6121 ac_cv_c_char_unsigned=yes
6122else
6123 echo "configure: failed program was:" >&5
6124 cat conftest.$ac_ext >&5
6125 rm -fr conftest*
6126 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006127fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006128rm -fr conftest*
6129fi
6130
6131fi
6132fi
6133
6134echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006135if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006136 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006137#define __CHAR_UNSIGNED__ 1
6138EOF
6139
6140fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006141
Michael W. Hudson54241132001-12-07 15:38:26 +00006142echo $ac_n "checking for working const""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006143echo "configure:6144: checking for working const" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006144if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6145 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006146else
Michael W. Hudson54241132001-12-07 15:38:26 +00006147 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006148#line 6149 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006149#include "confdefs.h"
6150
Michael W. Hudson54241132001-12-07 15:38:26 +00006151int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006152
Michael W. Hudson54241132001-12-07 15:38:26 +00006153/* Ultrix mips cc rejects this. */
6154typedef int charset[2]; const charset x;
6155/* SunOS 4.1.1 cc rejects this. */
6156char const *const *ccp;
6157char **p;
6158/* NEC SVR4.0.2 mips cc rejects this. */
6159struct point {int x, y;};
6160static struct point const zero = {0,0};
6161/* AIX XL C 1.02.0.0 rejects this.
6162 It does not let you subtract one const X* pointer from another in an arm
6163 of an if-expression whose if-part is not a constant expression */
6164const char *g = "string";
6165ccp = &g + (g ? g-g : 0);
6166/* HPUX 7.0 cc rejects these. */
6167++ccp;
6168p = (char**) ccp;
6169ccp = (char const *const *) p;
6170{ /* SCO 3.2v4 cc rejects this. */
6171 char *t;
6172 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006173
Michael W. Hudson54241132001-12-07 15:38:26 +00006174 *t++ = 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006175}
Michael W. Hudson54241132001-12-07 15:38:26 +00006176{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6177 int x[] = {25, 17};
6178 const int *foo = &x[0];
6179 ++foo;
6180}
6181{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6182 typedef const int *iptr;
6183 iptr p = 0;
6184 ++p;
6185}
6186{ /* AIX XL C 1.02.0.0 rejects this saying
6187 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6188 struct s { int j; const int *ap[3]; };
6189 struct s *b; b->j = 5;
6190}
6191{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6192 const int foo = 10;
6193}
6194
6195; return 0; }
6196EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006197if { (eval echo configure:6198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006198 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006199 ac_cv_c_const=yes
6200else
Michael W. Hudson54241132001-12-07 15:38:26 +00006201 echo "configure: failed program was:" >&5
6202 cat conftest.$ac_ext >&5
6203 rm -rf conftest*
6204 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006205fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006206rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006207fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006208
6209echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006210if test $ac_cv_c_const = no; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006211 cat >> confdefs.h <<\EOF
6212#define const
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006213EOF
6214
6215fi
6216
Michael W. Hudson54241132001-12-07 15:38:26 +00006217
Guido van Rossumda88dad1995-01-26 00:46:29 +00006218works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006219echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006220echo "configure:6221: checking for working volatile" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006221cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006222#line 6223 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006223#include "confdefs.h"
6224
Michael W. Hudson54241132001-12-07 15:38:26 +00006225int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006226volatile int x; x = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006227; return 0; }
6228EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006229if { (eval echo configure:6230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006230 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006231 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006232else
Michael W. Hudson54241132001-12-07 15:38:26 +00006233 echo "configure: failed program was:" >&5
6234 cat conftest.$ac_ext >&5
6235 rm -rf conftest*
6236 cat >> confdefs.h <<\EOF
6237#define volatile
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006238EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006239
6240fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006241rm -f conftest*
6242echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006243
Guido van Rossumda88dad1995-01-26 00:46:29 +00006244works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006245echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006246echo "configure:6247: checking for working signed char" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006247cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006248#line 6249 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006249#include "confdefs.h"
6250
Michael W. Hudson54241132001-12-07 15:38:26 +00006251int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006252signed char c;
Michael W. Hudson54241132001-12-07 15:38:26 +00006253; return 0; }
6254EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006255if { (eval echo configure:6256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006256 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006257 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006258else
Michael W. Hudson54241132001-12-07 15:38:26 +00006259 echo "configure: failed program was:" >&5
6260 cat conftest.$ac_ext >&5
6261 rm -rf conftest*
6262 cat >> confdefs.h <<\EOF
6263#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00006264EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006265
6266fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006267rm -f conftest*
6268echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006269
Guido van Rossumda88dad1995-01-26 00:46:29 +00006270have_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006271echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006272echo "configure:6273: checking for prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006273cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006274#line 6275 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006275#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006276int foo(int x) { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006277int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006278return foo(10);
Michael W. Hudson54241132001-12-07 15:38:26 +00006279; return 0; }
6280EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006281if { (eval echo configure:6282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006282 rm -rf conftest*
6283 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006284#define HAVE_PROTOTYPES 1
6285EOF
6286 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006287else
Michael W. Hudson54241132001-12-07 15:38:26 +00006288 echo "configure: failed program was:" >&5
6289 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006290fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006291rm -f conftest*
6292echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006293
Guido van Rossumda88dad1995-01-26 00:46:29 +00006294works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006295echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006296echo "configure:6297: checking for variable length prototypes and stdarg.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006297cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006298#line 6299 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006299#include "confdefs.h"
6300
6301#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00006302int foo(int x, ...) {
6303 va_list va;
6304 va_start(va, x);
6305 va_arg(va, int);
6306 va_arg(va, char *);
6307 va_arg(va, double);
6308 return 0;
6309}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006310
Michael W. Hudson54241132001-12-07 15:38:26 +00006311int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00006312return foo(10, "", 3.14);
Michael W. Hudson54241132001-12-07 15:38:26 +00006313; return 0; }
6314EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006315if { (eval echo configure:6316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006316 rm -rf conftest*
6317 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006318#define HAVE_STDARG_PROTOTYPES 1
6319EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006320 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006321else
Michael W. Hudson54241132001-12-07 15:38:26 +00006322 echo "configure: failed program was:" >&5
6323 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006324fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006325rm -f conftest*
6326echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006327
Guido van Rossumda88dad1995-01-26 00:46:29 +00006328if test "$have_prototypes" = yes; then
6329bad_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006330echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006331echo "configure:6332: checking for bad exec* prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006332cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006333#line 6334 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006334#include "confdefs.h"
6335#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006336int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006337char **t;execve("@",t,t);
Michael W. Hudson54241132001-12-07 15:38:26 +00006338; return 0; }
6339EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006340if { (eval echo configure:6341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006341 :
6342else
Michael W. Hudson54241132001-12-07 15:38:26 +00006343 echo "configure: failed program was:" >&5
6344 cat conftest.$ac_ext >&5
6345 rm -rf conftest*
6346 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006347#define BAD_EXEC_PROTOTYPES 1
6348EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006349 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006350fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006351rm -f conftest*
6352echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006353fi
6354
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006355# check if sockaddr has sa_len member
Michael W. Hudson54241132001-12-07 15:38:26 +00006356echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006357echo "configure:6358: checking if sockaddr has sa_len member" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006358cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006359#line 6360 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006360#include "confdefs.h"
6361#include <sys/types.h>
6362#include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006363int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006364struct sockaddr x;
6365x.sa_len = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006366; return 0; }
6367EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006368if { (eval echo configure:6369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006369 rm -rf conftest*
6370 echo "$ac_t""yes" 1>&6
6371 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006372#define HAVE_SOCKADDR_SA_LEN 1
6373EOF
6374
6375else
Michael W. Hudson54241132001-12-07 15:38:26 +00006376 echo "configure: failed program was:" >&5
6377 cat conftest.$ac_ext >&5
6378 rm -rf conftest*
6379 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006380fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006381rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006382
Michael W. Hudson54241132001-12-07 15:38:26 +00006383echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006384echo "configure:6385: checking for bad static forward" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006385if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
6386 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006387else
6388 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006389 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006390else
Michael W. Hudson54241132001-12-07 15:38:26 +00006391 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006392#line 6393 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006393#include "confdefs.h"
6394
6395struct s { int a; int b; };
6396static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006397int foobar() {
6398 static int random;
6399 random = (int) &foo;
6400 return random;
6401}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006402static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006403main() {
6404 exit(!((int)&foo == foobar()));
6405}
Michael W. Hudson54241132001-12-07 15:38:26 +00006406EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006407if { (eval echo configure:6408: \"$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 +00006408then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006409 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006410else
Michael W. Hudson54241132001-12-07 15:38:26 +00006411 echo "configure: failed program was:" >&5
6412 cat conftest.$ac_ext >&5
6413 rm -fr conftest*
6414 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006415fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006416rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006417fi
6418
Michael W. Hudson54241132001-12-07 15:38:26 +00006419fi
6420
6421echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006422if test "$ac_cv_bad_static_forward" = yes
6423then
Michael W. Hudson54241132001-12-07 15:38:26 +00006424 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006425#define BAD_STATIC_FORWARD 1
6426EOF
6427
6428fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006429
Guido van Rossumda88dad1995-01-26 00:46:29 +00006430va_list_is_array=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006431echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006432echo "configure:6433: checking whether va_list is an array" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006433cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006434#line 6435 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006435#include "confdefs.h"
6436
6437#ifdef HAVE_STDARG_PROTOTYPES
6438#include <stdarg.h>
6439#else
6440#include <varargs.h>
6441#endif
6442
Michael W. Hudson54241132001-12-07 15:38:26 +00006443int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006444va_list list1, list2; list1 = list2;
Michael W. Hudson54241132001-12-07 15:38:26 +00006445; return 0; }
6446EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006447if { (eval echo configure:6448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006448 :
6449else
Michael W. Hudson54241132001-12-07 15:38:26 +00006450 echo "configure: failed program was:" >&5
6451 cat conftest.$ac_ext >&5
6452 rm -rf conftest*
6453 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006454#define VA_LIST_IS_ARRAY 1
6455EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006456 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006457fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006458rm -f conftest*
6459echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006460
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006461# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Michael W. Hudson54241132001-12-07 15:38:26 +00006462echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006463echo "configure:6464: checking for gethostbyname_r" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006464if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
6465 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006466else
Michael W. Hudson54241132001-12-07 15:38:26 +00006467 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006468#line 6469 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006469#include "confdefs.h"
6470/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006471 which can conflict with char gethostbyname_r(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006472#include <assert.h>
6473/* Override any gcc2 internal prototype to avoid an error. */
6474/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006475 builtin and then its argument prototype would still apply. */
6476char gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006477
Michael W. Hudson54241132001-12-07 15:38:26 +00006478int main() {
6479
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006480/* The GNU C library defines this for functions which it implements
6481 to always fail with ENOSYS. Some functions are actually named
6482 something starting with __ and the normal name is an alias. */
6483#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6484choke me
6485#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006486gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006487#endif
6488
Michael W. Hudson54241132001-12-07 15:38:26 +00006489; return 0; }
6490EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006491if { (eval echo configure:6492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006492 rm -rf conftest*
6493 eval "ac_cv_func_gethostbyname_r=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006494else
Michael W. Hudson54241132001-12-07 15:38:26 +00006495 echo "configure: failed program was:" >&5
6496 cat conftest.$ac_ext >&5
6497 rm -rf conftest*
6498 eval "ac_cv_func_gethostbyname_r=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006499fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006500rm -f conftest*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006501fi
6502
Michael W. Hudson54241132001-12-07 15:38:26 +00006503if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6504 echo "$ac_t""yes" 1>&6
6505
6506 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006507#define HAVE_GETHOSTBYNAME_R 1
6508EOF
6509
Michael W. Hudson54241132001-12-07 15:38:26 +00006510 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006511echo "configure:6512: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006512 OLD_CFLAGS=$CFLAGS
6513 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006514 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006515#line 6516 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006516#include "confdefs.h"
6517
6518# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006519
6520int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006521
6522 char *name;
6523 struct hostent *he, *res;
6524 char buffer[2048];
6525 int buflen = 2048;
6526 int h_errnop;
6527
6528 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006529
6530; return 0; }
6531EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006532if { (eval echo configure:6533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006533 rm -rf conftest*
6534
6535 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006536#define HAVE_GETHOSTBYNAME_R 1
6537EOF
6538
Michael W. Hudson54241132001-12-07 15:38:26 +00006539 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006540#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6541EOF
6542
Michael W. Hudson54241132001-12-07 15:38:26 +00006543 echo "$ac_t""yes" 1>&6
6544
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006545else
Michael W. Hudson54241132001-12-07 15:38:26 +00006546 echo "configure: failed program was:" >&5
6547 cat conftest.$ac_ext >&5
6548 rm -rf conftest*
6549
6550 echo "$ac_t""no" 1>&6
6551 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006552echo "configure:6553: checking gethostbyname_r with 5 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006553 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006554#line 6555 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006555#include "confdefs.h"
6556
6557# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006558
6559int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006560
6561 char *name;
6562 struct hostent *he;
6563 char buffer[2048];
6564 int buflen = 2048;
6565 int h_errnop;
6566
6567 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006568
6569; return 0; }
6570EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006571if { (eval echo configure:6572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006572 rm -rf conftest*
6573
6574 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006575#define HAVE_GETHOSTBYNAME_R 1
6576EOF
6577
Michael W. Hudson54241132001-12-07 15:38:26 +00006578 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006579#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6580EOF
6581
Michael W. Hudson54241132001-12-07 15:38:26 +00006582 echo "$ac_t""yes" 1>&6
6583
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006584else
Michael W. Hudson54241132001-12-07 15:38:26 +00006585 echo "configure: failed program was:" >&5
6586 cat conftest.$ac_ext >&5
6587 rm -rf conftest*
6588
6589 echo "$ac_t""no" 1>&6
6590 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006591echo "configure:6592: checking gethostbyname_r with 3 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006592 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006593#line 6594 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006594#include "confdefs.h"
6595
6596# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006597
6598int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006599
6600 char *name;
6601 struct hostent *he;
6602 struct hostent_data data;
6603
6604 (void) gethostbyname_r(name, he, &data);
Michael W. Hudson54241132001-12-07 15:38:26 +00006605
6606; return 0; }
6607EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006608if { (eval echo configure:6609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006609 rm -rf conftest*
6610
6611 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006612#define HAVE_GETHOSTBYNAME_R 1
6613EOF
6614
Michael W. Hudson54241132001-12-07 15:38:26 +00006615 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006616#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6617EOF
6618
Michael W. Hudson54241132001-12-07 15:38:26 +00006619 echo "$ac_t""yes" 1>&6
6620
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006621else
Michael W. Hudson54241132001-12-07 15:38:26 +00006622 echo "configure: failed program was:" >&5
6623 cat conftest.$ac_ext >&5
6624 rm -rf conftest*
6625
6626 echo "$ac_t""no" 1>&6
6627
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006628fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006629rm -f conftest*
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*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006636 CFLAGS=$OLD_CFLAGS
6637
6638else
Michael W. Hudson54241132001-12-07 15:38:26 +00006639 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006640
Michael W. Hudson54241132001-12-07 15:38:26 +00006641 for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +00006642do
Michael W. Hudson54241132001-12-07 15:38:26 +00006643echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006644echo "configure:6645: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006645if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6646 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006647else
Michael W. Hudson54241132001-12-07 15:38:26 +00006648 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006649#line 6650 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006650#include "confdefs.h"
6651/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006652 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006653#include <assert.h>
6654/* Override any gcc2 internal prototype to avoid an error. */
6655/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006656 builtin and then its argument prototype would still apply. */
6657char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006658
Michael W. Hudson54241132001-12-07 15:38:26 +00006659int main() {
6660
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006661/* The GNU C library defines this for functions which it implements
6662 to always fail with ENOSYS. Some functions are actually named
6663 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006664#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006665choke me
6666#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006667$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006668#endif
6669
Michael W. Hudson54241132001-12-07 15:38:26 +00006670; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006671EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006672if { (eval echo configure:6673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006673 rm -rf conftest*
6674 eval "ac_cv_func_$ac_func=yes"
6675else
6676 echo "configure: failed program was:" >&5
6677 cat conftest.$ac_ext >&5
6678 rm -rf conftest*
6679 eval "ac_cv_func_$ac_func=no"
6680fi
6681rm -f conftest*
6682fi
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006683
Michael W. Hudson54241132001-12-07 15:38:26 +00006684if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6685 echo "$ac_t""yes" 1>&6
6686 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6687 cat >> confdefs.h <<EOF
6688#define $ac_tr_func 1
6689EOF
6690
6691else
6692 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006693fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006694done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006695
Michael W. Hudson54241132001-12-07 15:38:26 +00006696
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006697fi
6698
Michael W. Hudson54241132001-12-07 15:38:26 +00006699
6700
6701
6702
6703
6704
Guido van Rossum627b2d71993-12-24 10:39:16 +00006705# checks for system services
6706# (none yet)
6707
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006708# Linux requires this for correct f.p. operations
Michael W. Hudson54241132001-12-07 15:38:26 +00006709echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006710echo "configure:6711: checking for __fpu_control" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006711if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
6712 echo $ac_n "(cached) $ac_c" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006713else
Michael W. Hudson54241132001-12-07 15:38:26 +00006714 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006715#line 6716 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006716#include "confdefs.h"
6717/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006718 which can conflict with char __fpu_control(); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006719#include <assert.h>
6720/* Override any gcc2 internal prototype to avoid an error. */
6721/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006722 builtin and then its argument prototype would still apply. */
6723char __fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006724
Michael W. Hudson54241132001-12-07 15:38:26 +00006725int main() {
6726
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006727/* The GNU C library defines this for functions which it implements
6728 to always fail with ENOSYS. Some functions are actually named
6729 something starting with __ and the normal name is an alias. */
6730#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6731choke me
6732#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006733__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006734#endif
6735
Michael W. Hudson54241132001-12-07 15:38:26 +00006736; return 0; }
6737EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006738if { (eval echo configure:6739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006739 rm -rf conftest*
6740 eval "ac_cv_func___fpu_control=yes"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006741else
Michael W. Hudson54241132001-12-07 15:38:26 +00006742 echo "configure: failed program was:" >&5
6743 cat conftest.$ac_ext >&5
6744 rm -rf conftest*
6745 eval "ac_cv_func___fpu_control=no"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006746fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006747rm -f conftest*
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006748fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006749
6750if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6751 echo "$ac_t""yes" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006752 :
6753else
Michael W. Hudson54241132001-12-07 15:38:26 +00006754 echo "$ac_t""no" 1>&6
6755echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006756echo "configure:6757: checking for __fpu_control in -lieee" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006757ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
6758if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6759 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006760else
Michael W. Hudson54241132001-12-07 15:38:26 +00006761 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006762LIBS="-lieee $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006763cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006764#line 6765 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006765#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006766/* Override any gcc2 internal prototype to avoid an error. */
6767/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006768 builtin and then its argument prototype would still apply. */
6769char __fpu_control();
6770
6771int main() {
6772__fpu_control()
6773; return 0; }
6774EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006775if { (eval echo configure:6776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006776 rm -rf conftest*
6777 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006778else
Michael W. Hudson54241132001-12-07 15:38:26 +00006779 echo "configure: failed program was:" >&5
6780 cat conftest.$ac_ext >&5
6781 rm -rf conftest*
6782 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006783fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006784rm -f conftest*
6785LIBS="$ac_save_LIBS"
6786
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006787fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006788if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6789 echo "$ac_t""yes" 1>&6
6790 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6791 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6792 cat >> confdefs.h <<EOF
6793#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006794EOF
6795
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006796 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006797
Michael W. Hudson54241132001-12-07 15:38:26 +00006798else
6799 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006800fi
6801
Michael W. Hudson54241132001-12-07 15:38:26 +00006802
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006803fi
6804
Michael W. Hudson54241132001-12-07 15:38:26 +00006805
Guido van Rossum7f253911997-05-09 02:42:48 +00006806# Check for --with-fpectl
Michael W. Hudson54241132001-12-07 15:38:26 +00006807echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006808echo "configure:6809: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006809# Check whether --with-fpectl or --without-fpectl was given.
6810if test "${with_fpectl+set}" = set; then
6811 withval="$with_fpectl"
Michael W. Hudson54241132001-12-07 15:38:26 +00006812
Guido van Rossum7f253911997-05-09 02:42:48 +00006813if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00006814then cat >> confdefs.h <<\EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00006815#define WANT_SIGFPE_HANDLER 1
6816EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00006817 echo "$ac_t""yes" 1>&6
6818else echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006819fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006820else
Michael W. Hudson54241132001-12-07 15:38:26 +00006821 echo "$ac_t""no" 1>&6
6822fi
6823
Guido van Rossum7f253911997-05-09 02:42:48 +00006824
Guido van Rossum7f43da71994-08-01 12:15:30 +00006825# check for --with-libm=...
6826
Guido van Rossum563e7081996-09-10 18:20:48 +00006827case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006828Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006829BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006830*) LIBM=-lm
6831esac
Michael W. Hudson54241132001-12-07 15:38:26 +00006832echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006833echo "configure:6834: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006834# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006835if test "${with_libm+set}" = set; then
6836 withval="$with_libm"
Michael W. Hudson54241132001-12-07 15:38:26 +00006837
Guido van Rossum7f253911997-05-09 02:42:48 +00006838if test "$withval" = no
6839then LIBM=
Michael W. Hudson54241132001-12-07 15:38:26 +00006840 echo "$ac_t""force LIBM empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006841elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006842then LIBM=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00006843 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
6844else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006845fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006846else
Michael W. Hudson54241132001-12-07 15:38:26 +00006847 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
6848fi
6849
Guido van Rossum7f43da71994-08-01 12:15:30 +00006850
6851# check for --with-libc=...
6852
Michael W. Hudson54241132001-12-07 15:38:26 +00006853echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006854echo "configure:6855: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006855# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006856if test "${with_libc+set}" = set; then
6857 withval="$with_libc"
Michael W. Hudson54241132001-12-07 15:38:26 +00006858
Guido van Rossum7f253911997-05-09 02:42:48 +00006859if test "$withval" = no
6860then LIBC=
Michael W. Hudson54241132001-12-07 15:38:26 +00006861 echo "$ac_t""force LIBC empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006862elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006863then LIBC=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00006864 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
6865else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006866fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006867else
Michael W. Hudson54241132001-12-07 15:38:26 +00006868 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
6869fi
6870
Guido van Rossum7f43da71994-08-01 12:15:30 +00006871
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006872# check for hypot() in math library
6873LIBS_SAVE=$LIBS
6874LIBS="$LIBS $LIBM"
6875for ac_func in hypot
6876do
Michael W. Hudson54241132001-12-07 15:38:26 +00006877echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006878echo "configure:6879: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006879if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6880 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006881else
Michael W. Hudson54241132001-12-07 15:38:26 +00006882 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006883#line 6884 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006884#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006885/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006886 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006887#include <assert.h>
6888/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006889/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006890 builtin and then its argument prototype would still apply. */
6891char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006892
Michael W. Hudson54241132001-12-07 15:38:26 +00006893int main() {
6894
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006895/* The GNU C library defines this for functions which it implements
6896 to always fail with ENOSYS. Some functions are actually named
6897 something starting with __ and the normal name is an alias. */
6898#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6899choke me
6900#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006901$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006902#endif
6903
Michael W. Hudson54241132001-12-07 15:38:26 +00006904; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006905EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006906if { (eval echo configure:6907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006907 rm -rf conftest*
6908 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006909else
Michael W. Hudson54241132001-12-07 15:38:26 +00006910 echo "configure: failed program was:" >&5
6911 cat conftest.$ac_ext >&5
6912 rm -rf conftest*
6913 eval "ac_cv_func_$ac_func=no"
6914fi
6915rm -f conftest*
6916fi
6917
6918if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6919 echo "$ac_t""yes" 1>&6
6920 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6921 cat >> confdefs.h <<EOF
6922#define $ac_tr_func 1
6923EOF
6924
6925else
6926 echo "$ac_t""no" 1>&6
6927LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006928fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006929done
6930
Michael W. Hudson54241132001-12-07 15:38:26 +00006931
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006932LIBS=$LIBS_SAVE
6933
Guido van Rossumad713701997-07-10 22:42:38 +00006934# check whether malloc(0) returns NULL or not
Michael W. Hudson54241132001-12-07 15:38:26 +00006935echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006936echo "configure:6937: checking what malloc(0) returns" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006937if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
6938 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00006939else
6940 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006941 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +00006942else
Michael W. Hudson54241132001-12-07 15:38:26 +00006943 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006944#line 6945 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006945#include "confdefs.h"
6946#include <stdio.h>
6947#ifdef HAVE_STDLIB
6948#include <stdlib.h>
6949#else
6950char *malloc(), *realloc();
6951int *free();
6952#endif
6953main() {
6954 char *p;
6955 p = malloc(0);
6956 if (p == NULL) exit(1);
6957 p = realloc(p, 0);
6958 if (p == NULL) exit(1);
6959 free(p);
6960 exit(0);
6961}
Michael W. Hudson54241132001-12-07 15:38:26 +00006962EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006963if { (eval echo configure:6964: \"$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 +00006964then
Guido van Rossumad713701997-07-10 22:42:38 +00006965 ac_cv_malloc_zero=nonnull
6966else
Michael W. Hudson54241132001-12-07 15:38:26 +00006967 echo "configure: failed program was:" >&5
6968 cat conftest.$ac_ext >&5
6969 rm -fr conftest*
6970 ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +00006971fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006972rm -fr conftest*
Guido van Rossumad713701997-07-10 22:42:38 +00006973fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006974
Guido van Rossumad713701997-07-10 22:42:38 +00006975fi
Guido van Rossum3065c942001-09-17 04:03:14 +00006976 # XXX arm cross-compile?
Michael W. Hudson54241132001-12-07 15:38:26 +00006977echo "$ac_t""$ac_cv_malloc_zero" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00006978if test "$ac_cv_malloc_zero" = null
6979then
Michael W. Hudson54241132001-12-07 15:38:26 +00006980 cat >> confdefs.h <<\EOF
Guido van Rossumad713701997-07-10 22:42:38 +00006981#define MALLOC_ZERO_RETURNS_NULL 1
6982EOF
6983
6984fi
6985
Guido van Rossumef2255b2000-03-10 22:30:29 +00006986# check for wchar.h
Michael W. Hudson54241132001-12-07 15:38:26 +00006987ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6988echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006989echo "configure:6990: checking for wchar.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006990if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6991 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00006992else
Michael W. Hudson54241132001-12-07 15:38:26 +00006993 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006994#line 6995 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006995#include "confdefs.h"
6996#include <wchar.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006997EOF
6998ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00006999{ (eval echo configure:7000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007000ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7001if test -z "$ac_err"; then
7002 rm -rf conftest*
7003 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007004else
Michael W. Hudson54241132001-12-07 15:38:26 +00007005 echo "$ac_err" >&5
7006 echo "configure: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007007 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007008 rm -rf conftest*
7009 eval "ac_cv_header_$ac_safe=no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007010fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007011rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007012fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007013if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7014 echo "$ac_t""yes" 1>&6
7015 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007016#define HAVE_WCHAR_H 1
7017EOF
7018 wchar_h="yes"
7019else
Michael W. Hudson54241132001-12-07 15:38:26 +00007020 echo "$ac_t""no" 1>&6
7021wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007022
7023fi
7024
Michael W. Hudson54241132001-12-07 15:38:26 +00007025
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007026# determine wchar_t size
7027if test "$wchar_h" = yes
7028then
Michael W. Hudson54241132001-12-07 15:38:26 +00007029 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007030echo "configure:7031: checking size of wchar_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007031if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
7032 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007033else
7034 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007035 ac_cv_sizeof_wchar_t=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00007036else
Michael W. Hudson54241132001-12-07 15:38:26 +00007037 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007038#line 7039 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007039#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007040#include <stdio.h>
7041main()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007042{
Michael W. Hudson54241132001-12-07 15:38:26 +00007043 FILE *f=fopen("conftestval", "w");
7044 if (!f) exit(1);
7045 fprintf(f, "%d\n", sizeof(wchar_t));
7046 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00007047}
Michael W. Hudson54241132001-12-07 15:38:26 +00007048EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007049if { (eval echo configure:7050: \"$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 +00007050then
7051 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007052else
Michael W. Hudson54241132001-12-07 15:38:26 +00007053 echo "configure: failed program was:" >&5
7054 cat conftest.$ac_ext >&5
7055 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007056 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00007057fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007058rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007059fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007060
7061fi
7062echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
7063cat >> confdefs.h <<EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007064#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
7065EOF
7066
Michael W. Hudson54241132001-12-07 15:38:26 +00007067
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007068fi
7069
Michael W. Hudson54241132001-12-07 15:38:26 +00007070echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007071echo "configure:7072: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007072# Check whether --enable-unicode or --disable-unicode was given.
7073if test "${enable_unicode+set}" = set; then
7074 enableval="$enable_unicode"
Michael W. Hudson54241132001-12-07 15:38:26 +00007075 :
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007076else
7077 enable_unicode=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00007078fi
7079
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007080
7081if test $enable_unicode = yes
7082then
Martin v. Löwisfd917792001-06-27 20:22:04 +00007083 # Without any arguments, Py_UNICODE defaults to two-byte mode
7084 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007085fi
7086
7087case "$enable_unicode" in
7088ucs2) unicode_size="2"
Michael W. Hudson54241132001-12-07 15:38:26 +00007089 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007090#define Py_UNICODE_SIZE 2
7091EOF
7092
7093 ;;
7094ucs4) unicode_size="4"
Michael W. Hudson54241132001-12-07 15:38:26 +00007095 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007096#define Py_UNICODE_SIZE 4
7097EOF
7098
7099 ;;
7100esac
7101
Michael W. Hudson54241132001-12-07 15:38:26 +00007102
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007103if test "$enable_unicode" = "no"
7104then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007105 UNICODE_OBJS=""
Michael W. Hudson54241132001-12-07 15:38:26 +00007106 echo "$ac_t""not used" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007107else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007108 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Michael W. Hudson54241132001-12-07 15:38:26 +00007109 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007110#define Py_USING_UNICODE 1
7111EOF
7112
7113 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
7114 then
7115 PY_UNICODE_TYPE="wchar_t"
Michael W. Hudson54241132001-12-07 15:38:26 +00007116 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007117#define HAVE_USABLE_WCHAR_T 1
7118EOF
7119
Michael W. Hudson54241132001-12-07 15:38:26 +00007120 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007121#define PY_UNICODE_TYPE wchar_t
7122EOF
7123
7124 elif test "$ac_cv_sizeof_short" = "$unicode_size"
7125 then
7126 PY_UNICODE_TYPE="unsigned short"
Michael W. Hudson54241132001-12-07 15:38:26 +00007127 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007128#define PY_UNICODE_TYPE unsigned short
7129EOF
7130
7131 elif test "$ac_cv_sizeof_long" = "$unicode_size"
7132 then
7133 PY_UNICODE_TYPE="unsigned long"
Michael W. Hudson54241132001-12-07 15:38:26 +00007134 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007135#define PY_UNICODE_TYPE unsigned long
7136EOF
7137
7138 else
7139 PY_UNICODE_TYPE="no type found"
7140 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007141 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007142fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007143
7144# check for endianness
Michael W. Hudson54241132001-12-07 15:38:26 +00007145echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007146echo "configure:7147: checking whether byte ordering is bigendian" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007147if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
7148 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00007149else
7150 ac_cv_c_bigendian=unknown
7151# See if sys/param.h defines the BYTE_ORDER macro.
Michael W. Hudson54241132001-12-07 15:38:26 +00007152cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007153#line 7154 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007154#include "confdefs.h"
7155#include <sys/types.h>
7156#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007157int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007158
7159#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
7160 bogus endian macros
7161#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007162; return 0; }
7163EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007164if { (eval echo configure:7165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007165 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007166 # It does; now see whether it defined to BIG_ENDIAN or not.
Michael W. Hudson54241132001-12-07 15:38:26 +00007167cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007168#line 7169 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007169#include "confdefs.h"
7170#include <sys/types.h>
7171#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007172int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007173
7174#if BYTE_ORDER != BIG_ENDIAN
7175 not big endian
7176#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007177; return 0; }
7178EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007179if { (eval echo configure:7180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007180 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007181 ac_cv_c_bigendian=yes
7182else
Michael W. Hudson54241132001-12-07 15:38:26 +00007183 echo "configure: failed program was:" >&5
7184 cat conftest.$ac_ext >&5
7185 rm -rf conftest*
7186 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +00007187fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007188rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007189else
Michael W. Hudson54241132001-12-07 15:38:26 +00007190 echo "configure: failed program was:" >&5
7191 cat conftest.$ac_ext >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007192fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007193rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007194if test $ac_cv_c_bigendian = unknown; then
7195if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007196 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007197else
Michael W. Hudson54241132001-12-07 15:38:26 +00007198 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007199#line 7200 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007200#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007201main () {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007202 /* Are we little or big endian? From Harbison&Steele. */
7203 union
7204 {
7205 long l;
7206 char c[sizeof (long)];
7207 } u;
7208 u.l = 1;
7209 exit (u.c[sizeof (long) - 1] == 1);
7210}
Michael W. Hudson54241132001-12-07 15:38:26 +00007211EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007212if { (eval echo configure:7213: \"$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 +00007213then
Guido van Rossumef2255b2000-03-10 22:30:29 +00007214 ac_cv_c_bigendian=no
7215else
Michael W. Hudson54241132001-12-07 15:38:26 +00007216 echo "configure: failed program was:" >&5
7217 cat conftest.$ac_ext >&5
7218 rm -fr conftest*
7219 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +00007220fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007221rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007222fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007223
Michael W. Hudson54241132001-12-07 15:38:26 +00007224fi
7225fi
7226
7227echo "$ac_t""$ac_cv_c_bigendian" 1>&6
7228if test $ac_cv_c_bigendian = yes; then
7229 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007230#define WORDS_BIGENDIAN 1
7231EOF
7232
7233fi
7234
Michael W. Hudson54241132001-12-07 15:38:26 +00007235
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007236# Check whether right shifting a negative integer extends the sign bit
7237# or fills with zeros (like the Cray J90, according to Tim Peters).
Michael W. Hudson54241132001-12-07 15:38:26 +00007238echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007239echo "configure:7240: checking whether right shift extends the sign bit" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007240if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
7241 echo $ac_n "(cached) $ac_c" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007242else
Michael W. Hudson54241132001-12-07 15:38:26 +00007243
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007244if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007245 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007246else
Michael W. Hudson54241132001-12-07 15:38:26 +00007247 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007248#line 7249 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007249#include "confdefs.h"
7250
7251int main()
7252{
Vladimir Marangozova6180282000-07-12 05:05:06 +00007253 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007254}
7255
Michael W. Hudson54241132001-12-07 15:38:26 +00007256EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007257if { (eval echo configure:7258: \"$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 +00007258then
Vladimir Marangozova6180282000-07-12 05:05:06 +00007259 ac_cv_rshift_extends_sign=yes
7260else
Michael W. Hudson54241132001-12-07 15:38:26 +00007261 echo "configure: failed program was:" >&5
7262 cat conftest.$ac_ext >&5
7263 rm -fr conftest*
7264 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +00007265fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007266rm -fr conftest*
Vladimir Marangozova6180282000-07-12 05:05:06 +00007267fi
7268
Michael W. Hudson54241132001-12-07 15:38:26 +00007269fi
7270
7271echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007272if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007273then
Michael W. Hudson54241132001-12-07 15:38:26 +00007274 cat >> confdefs.h <<\EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007275#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
7276EOF
7277
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007278fi
7279
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007280# check for getc_unlocked and related locking functions
Michael W. Hudson54241132001-12-07 15:38:26 +00007281echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007282echo "configure:7283: checking for getc_unlocked() and friends" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007283if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
7284 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007285else
Michael W. Hudson54241132001-12-07 15:38:26 +00007286
7287cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007288#line 7289 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007289#include "confdefs.h"
7290#include <stdio.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007291int main() {
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007292
7293 FILE *f = fopen("/dev/null", "r");
7294 flockfile(f);
7295 getc_unlocked(f);
7296 funlockfile(f);
7297
Michael W. Hudson54241132001-12-07 15:38:26 +00007298; return 0; }
7299EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007300if { (eval echo configure:7301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007301 rm -rf conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007302 ac_cv_have_getc_unlocked=yes
7303else
Michael W. Hudson54241132001-12-07 15:38:26 +00007304 echo "configure: failed program was:" >&5
7305 cat conftest.$ac_ext >&5
7306 rm -rf conftest*
7307 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007308fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007309rm -f conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007310fi
7311
Michael W. Hudson54241132001-12-07 15:38:26 +00007312echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007313if test "$ac_cv_have_getc_unlocked" = yes
7314then
Michael W. Hudson54241132001-12-07 15:38:26 +00007315 cat >> confdefs.h <<\EOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007316#define HAVE_GETC_UNLOCKED 1
7317EOF
7318
7319fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007320
Martin v. Löwis0daad592001-09-30 21:09:59 +00007321# check for readline 4.0
Michael W. Hudson54241132001-12-07 15:38:26 +00007322echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007323echo "configure:7324: checking for rl_pre_input_hook in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007324ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'`
7325if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7326 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007327else
Michael W. Hudson54241132001-12-07 15:38:26 +00007328 ac_save_LIBS="$LIBS"
Guido van Rossum353ae582001-07-10 16:45:32 +00007329LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007330cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007331#line 7332 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00007332#include "confdefs.h"
7333/* Override any gcc2 internal prototype to avoid an error. */
7334/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007335 builtin and then its argument prototype would still apply. */
7336char rl_pre_input_hook();
7337
7338int main() {
7339rl_pre_input_hook()
7340; return 0; }
7341EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007342if { (eval echo configure:7343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007343 rm -rf conftest*
7344 eval "ac_cv_lib_$ac_lib_var=yes"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007345else
Michael W. Hudson54241132001-12-07 15:38:26 +00007346 echo "configure: failed program was:" >&5
7347 cat conftest.$ac_ext >&5
7348 rm -rf conftest*
7349 eval "ac_cv_lib_$ac_lib_var=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007350fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007351rm -f conftest*
7352LIBS="$ac_save_LIBS"
7353
Martin v. Löwis0daad592001-09-30 21:09:59 +00007354fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007355if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7356 echo "$ac_t""yes" 1>&6
7357 cat >> confdefs.h <<\EOF
Martin v. Löwis0daad592001-09-30 21:09:59 +00007358#define HAVE_RL_PRE_INPUT_HOOK 1
7359EOF
7360
Michael W. Hudson54241132001-12-07 15:38:26 +00007361else
7362 echo "$ac_t""no" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007363fi
7364
Michael W. Hudson54241132001-12-07 15:38:26 +00007365
Martin v. Löwis0daad592001-09-30 21:09:59 +00007366# check for readline 4.2
Michael W. Hudson54241132001-12-07 15:38:26 +00007367echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007368echo "configure:7369: checking for rl_completion_matches in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007369ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
7370if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7371 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007372else
Michael W. Hudson54241132001-12-07 15:38:26 +00007373 ac_save_LIBS="$LIBS"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007374LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007375cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007376#line 7377 "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007377#include "confdefs.h"
7378/* Override any gcc2 internal prototype to avoid an error. */
7379/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007380 builtin and then its argument prototype would still apply. */
7381char rl_completion_matches();
7382
7383int main() {
7384rl_completion_matches()
7385; return 0; }
7386EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007387if { (eval echo configure:7388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007388 rm -rf conftest*
7389 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum353ae582001-07-10 16:45:32 +00007390else
Michael W. Hudson54241132001-12-07 15:38:26 +00007391 echo "configure: failed program was:" >&5
7392 cat conftest.$ac_ext >&5
7393 rm -rf conftest*
7394 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum353ae582001-07-10 16:45:32 +00007395fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007396rm -f conftest*
7397LIBS="$ac_save_LIBS"
7398
Guido van Rossum353ae582001-07-10 16:45:32 +00007399fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007400if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7401 echo "$ac_t""yes" 1>&6
7402 cat >> confdefs.h <<\EOF
Guido van Rossum353ae582001-07-10 16:45:32 +00007403#define HAVE_RL_COMPLETION_MATCHES 1
7404EOF
7405
Michael W. Hudson54241132001-12-07 15:38:26 +00007406else
7407 echo "$ac_t""no" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007408fi
7409
Jack Jansendd19cf82001-12-06 22:36:17 +00007410
Michael W. Hudson54241132001-12-07 15:38:26 +00007411echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007412echo "configure:7413: checking for broken nice()" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007413if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
7414 echo $ac_n "(cached) $ac_c" 1>&6
7415else
7416
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007417if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007418 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007419else
Michael W. Hudson54241132001-12-07 15:38:26 +00007420 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007421#line 7422 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007422#include "confdefs.h"
7423
7424int main()
7425{
7426 int val1 = nice(1);
7427 if (val1 != -1 && val1 == nice(2))
7428 exit(0);
7429 exit(1);
7430}
7431
Michael W. Hudson54241132001-12-07 15:38:26 +00007432EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007433if { (eval echo configure:7434: \"$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 +00007434then
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007435 ac_cv_broken_nice=yes
7436else
Michael W. Hudson54241132001-12-07 15:38:26 +00007437 echo "configure: failed program was:" >&5
7438 cat conftest.$ac_ext >&5
7439 rm -fr conftest*
7440 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007441fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007442rm -fr conftest*
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007443fi
7444
Michael W. Hudson54241132001-12-07 15:38:26 +00007445fi
7446
7447echo "$ac_t""$ac_cv_broken_nice" 1>&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007448if test "$ac_cv_broken_nice" = yes
7449then
Michael W. Hudson54241132001-12-07 15:38:26 +00007450 cat >> confdefs.h <<\EOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007451#define HAVE_BROKEN_NICE 1
7452EOF
7453
7454fi
7455
Jack Jansen666b1e72001-10-31 12:11:48 +00007456# On HP/UX 11.0, mvwdelch is a block with a return statement
Michael W. Hudson54241132001-12-07 15:38:26 +00007457echo $ac_n "checking whether mvwdelch is an expression""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007458echo "configure:7459: checking whether mvwdelch is an expression" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007459if eval "test \"`echo '$''{'ac_cv_mvwdelch_is_expression'+set}'`\" = set"; then
7460 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007461else
Michael W. Hudson54241132001-12-07 15:38:26 +00007462 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007463#line 7464 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007464#include "confdefs.h"
7465#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007466int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007467
7468 int rtn;
7469 rtn = mvwdelch(0,0,0);
7470
Michael W. Hudson54241132001-12-07 15:38:26 +00007471; return 0; }
7472EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007473if { (eval echo configure:7474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007474 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007475 ac_cv_mvwdelch_is_expression=yes
7476else
Michael W. Hudson54241132001-12-07 15:38:26 +00007477 echo "configure: failed program was:" >&5
7478 cat conftest.$ac_ext >&5
7479 rm -rf conftest*
7480 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007481fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007482rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007483fi
7484
Michael W. Hudson54241132001-12-07 15:38:26 +00007485echo "$ac_t""$ac_cv_mvwdelch_is_expression" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007486
7487if test "$ac_cv_mvwdelch_is_expression" = yes
7488then
Michael W. Hudson54241132001-12-07 15:38:26 +00007489 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007490#define MVWDELCH_IS_EXPRESSION 1
7491EOF
7492
7493fi
7494
Michael W. Hudson54241132001-12-07 15:38:26 +00007495echo $ac_n "checking whether WINDOW has _flags""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007496echo "configure:7497: checking whether WINDOW has _flags" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007497if eval "test \"`echo '$''{'ac_cv_window_has_flags'+set}'`\" = set"; then
7498 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007499else
Michael W. Hudson54241132001-12-07 15:38:26 +00007500 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007501#line 7502 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007502#include "confdefs.h"
7503#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007504int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007505
7506 WINDOW *w;
7507 w->_flags = 0;
7508
Michael W. Hudson54241132001-12-07 15:38:26 +00007509; return 0; }
7510EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007511if { (eval echo configure:7512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007512 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007513 ac_cv_window_has_flags=yes
7514else
Michael W. Hudson54241132001-12-07 15:38:26 +00007515 echo "configure: failed program was:" >&5
7516 cat conftest.$ac_ext >&5
7517 rm -rf conftest*
7518 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007519fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007520rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007521fi
7522
Michael W. Hudson54241132001-12-07 15:38:26 +00007523echo "$ac_t""$ac_cv_window_has_flags" 1>&6
7524
Jack Jansen666b1e72001-10-31 12:11:48 +00007525
7526if test "$ac_cv_window_has_flags" = yes
7527then
Michael W. Hudson54241132001-12-07 15:38:26 +00007528 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007529#define WINDOW_HAS_FLAGS 1
7530EOF
7531
7532fi
7533
Guido van Rossum95713eb2000-05-18 20:53:31 +00007534# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7535# Add sys/socket.h to confdefs.h
7536cat >> confdefs.h <<\EOF
7537#ifdef HAVE_SYS_SOCKET_H
7538#include <sys/socket.h>
7539#endif
7540EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007541echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007542echo "configure:7543: checking for socklen_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007543if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
7544 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum95713eb2000-05-18 20:53:31 +00007545else
Michael W. Hudson54241132001-12-07 15:38:26 +00007546 cat > conftest.$ac_ext <<EOF
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007547#line 7548 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007548#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007549#include <sys/types.h>
7550#if STDC_HEADERS
7551#include <stdlib.h>
7552#include <stddef.h>
7553#endif
7554EOF
7555if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7556 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7557 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007558 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007559else
Michael W. Hudson54241132001-12-07 15:38:26 +00007560 rm -rf conftest*
7561 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007562fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007563rm -f conftest*
Guido van Rossum95713eb2000-05-18 20:53:31 +00007564
Michael W. Hudson54241132001-12-07 15:38:26 +00007565fi
7566echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7567if test $ac_cv_type_socklen_t = no; then
7568 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007569#define socklen_t int
7570EOF
7571
7572fi
7573
Michael W. Hudson54241132001-12-07 15:38:26 +00007574
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007575# Add Python/ prefix to LIBOBJS
7576libobjs=$LIBOBJS
7577LIBOBJS=
7578for obj in $libobjs; do
7579 LIBOBJS="$LIBOBJS Python/$obj"
7580done
7581
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007582#AC_MSG_CHECKING(for Modules/Setup)
7583#if test ! -f Modules/Setup ; then
7584# if test ! -d Modules ; then
7585# mkdir Modules
7586# fi
7587# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7588# AC_MSG_RESULT(creating)
7589#else
7590# AC_MSG_RESULT(already exists)
7591#fi
7592
Michael W. Hudson54241132001-12-07 15:38:26 +00007593
7594
Martin v. Löwis06f15bb2001-12-02 13:02:32 +00007595for h in `(cd $srcdir;echo Python/thread_*.h)`
7596do
7597 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
7598done
7599
Michael W. Hudson54241132001-12-07 15:38:26 +00007600
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007601SRCDIRS="Parser Grammar Objects Python Modules"
Michael W. Hudson54241132001-12-07 15:38:26 +00007602echo $ac_n "checking for build directories""... $ac_c" 1>&6
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00007603echo "configure:7604: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007604for dir in $SRCDIRS; do
7605 if test ! -d $dir; then
7606 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007607 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007608done
Michael W. Hudson54241132001-12-07 15:38:26 +00007609echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007610
Guido van Rossum627b2d71993-12-24 10:39:16 +00007611# generate output files
Michael W. Hudson54241132001-12-07 15:38:26 +00007612trap '' 1 2 15
7613cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007614# This file is a shell script that caches the results of configure
7615# tests run on this system so they can be shared between configure
Michael W. Hudson54241132001-12-07 15:38:26 +00007616# scripts and configure runs. It is not useful on other systems.
7617# If it contains results you don't want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007618#
Michael W. Hudson54241132001-12-07 15:38:26 +00007619# By default, configure uses ./config.cache as the cache file,
7620# creating it if it does not exist already. You can give configure
7621# the --cache-file=FILE option to use a different cache file; that is
7622# what configure does when it calls configure scripts in
7623# subdirectories, so they share the cache.
7624# Giving --cache-file=/dev/null disables caching, for debugging configure.
7625# config.status only pays attention to the cache file if you give it the
7626# --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007627#
Michael W. Hudson54241132001-12-07 15:38:26 +00007628EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007629# The following way of writing the cache mishandles newlines in values,
7630# but we know of no workaround that is simple, portable, and efficient.
7631# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007632# Ultrix sh set writes to stderr and can't be redirected directly,
7633# and sets the high bit in the cache file unless we assign to the vars.
Michael W. Hudson54241132001-12-07 15:38:26 +00007634(set) 2>&1 |
7635 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7636 *ac_space=\ *)
7637 # `set' does not quote correctly, so add quotes (double-quote substitution
7638 # turns \\\\ into \\, and sed turns \\ into \).
7639 sed -n \
7640 -e "s/'/'\\\\''/g" \
7641 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7642 ;;
7643 *)
7644 # `set' quotes correctly as required by POSIX, so do not add quotes.
7645 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7646 ;;
7647 esac >> confcache
7648if cmp -s $cache_file confcache; then
7649 :
7650else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007651 if test -w $cache_file; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007652 echo "updating cache $cache_file"
7653 cat confcache > $cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007654 else
7655 echo "not updating unwritable cache $cache_file"
7656 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007657fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007658rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007659
Michael W. Hudson54241132001-12-07 15:38:26 +00007660trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7661
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007662test "x$prefix" = xNONE && prefix=$ac_default_prefix
7663# Let make expand exec_prefix.
7664test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007665
Michael W. Hudson54241132001-12-07 15:38:26 +00007666# Any assignment to VPATH causes Sun make to only execute
7667# the first set of double-colon rules, so remove it if not needed.
7668# If there is a colon in the path, we need to keep it.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007669if test "x$srcdir" = x.; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007670 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007671fi
7672
Michael W. Hudson54241132001-12-07 15:38:26 +00007673trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7674
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007675DEFS=-DHAVE_CONFIG_H
7676
Michael W. Hudson54241132001-12-07 15:38:26 +00007677# Without the "./", some shells look in PATH for config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007678: ${CONFIG_STATUS=./config.status}
Michael W. Hudson54241132001-12-07 15:38:26 +00007679
7680echo creating $CONFIG_STATUS
7681rm -f $CONFIG_STATUS
7682cat > $CONFIG_STATUS <<EOF
7683#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007684# Generated automatically by configure.
7685# Run this file to recreate the current configuration.
Michael W. Hudson54241132001-12-07 15:38:26 +00007686# This directory was configured as follows,
7687# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7688#
7689# $0 $ac_configure_args
7690#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007691# Compiler output produced by configure, useful for debugging
Michael W. Hudson54241132001-12-07 15:38:26 +00007692# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007693
Michael W. Hudson54241132001-12-07 15:38:26 +00007694ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7695for ac_option
Jack Jansendd19cf82001-12-06 22:36:17 +00007696do
Michael W. Hudson54241132001-12-07 15:38:26 +00007697 case "\$ac_option" in
Jack Jansendd19cf82001-12-06 22:36:17 +00007698 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Michael W. Hudson54241132001-12-07 15:38:26 +00007699 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7700 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7701 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7702 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7703 exit 0 ;;
7704 -help | --help | --hel | --he | --h)
7705 echo "\$ac_cs_usage"; exit 0 ;;
7706 *) echo "\$ac_cs_usage"; exit 1 ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007707 esac
7708done
7709
Michael W. Hudson54241132001-12-07 15:38:26 +00007710ac_given_srcdir=$srcdir
7711ac_given_INSTALL="$INSTALL"
Jack Jansendd19cf82001-12-06 22:36:17 +00007712
Michael W. Hudson54241132001-12-07 15:38:26 +00007713trap '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 +00007714EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007715cat >> $CONFIG_STATUS <<EOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007716
Michael W. Hudson54241132001-12-07 15:38:26 +00007717# Protect against being on the right side of a sed subst in config.status.
7718sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7719 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7720$ac_vpsub
7721$extrasub
7722s%@SHELL@%$SHELL%g
7723s%@CFLAGS@%$CFLAGS%g
7724s%@CPPFLAGS@%$CPPFLAGS%g
7725s%@CXXFLAGS@%$CXXFLAGS%g
7726s%@FFLAGS@%$FFLAGS%g
7727s%@DEFS@%$DEFS%g
7728s%@LDFLAGS@%$LDFLAGS%g
7729s%@LIBS@%$LIBS%g
7730s%@exec_prefix@%$exec_prefix%g
7731s%@prefix@%$prefix%g
7732s%@program_transform_name@%$program_transform_name%g
7733s%@bindir@%$bindir%g
7734s%@sbindir@%$sbindir%g
7735s%@libexecdir@%$libexecdir%g
7736s%@datadir@%$datadir%g
7737s%@sysconfdir@%$sysconfdir%g
7738s%@sharedstatedir@%$sharedstatedir%g
7739s%@localstatedir@%$localstatedir%g
7740s%@libdir@%$libdir%g
7741s%@includedir@%$includedir%g
7742s%@oldincludedir@%$oldincludedir%g
7743s%@infodir@%$infodir%g
7744s%@mandir@%$mandir%g
7745s%@VERSION@%$VERSION%g
7746s%@CONFIG_ARGS@%$CONFIG_ARGS%g
7747s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7748s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7749s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7750s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
7751s%@MACHDEP@%$MACHDEP%g
7752s%@SGI_ABI@%$SGI_ABI%g
7753s%@CXX@%$CXX%g
7754s%@MAINOBJ@%$MAINOBJ%g
7755s%@CC@%$CC%g
7756s%@CPP@%$CPP%g
7757s%@EXEEXT@%$EXEEXT%g
7758s%@BUILDEXEEXT@%$BUILDEXEEXT%g
7759s%@LIBRARY@%$LIBRARY%g
7760s%@LDLIBRARY@%$LDLIBRARY%g
7761s%@DLLLIBRARY@%$DLLLIBRARY%g
7762s%@BLDLIBRARY@%$BLDLIBRARY%g
7763s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
7764s%@LINKCC@%$LINKCC%g
7765s%@RANLIB@%$RANLIB%g
7766s%@AR@%$AR%g
7767s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7768s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7769s%@INSTALL_DATA@%$INSTALL_DATA%g
7770s%@LN@%$LN%g
7771s%@OPT@%$OPT%g
7772s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
7773s%@SO@%$SO%g
7774s%@LDSHARED@%$LDSHARED%g
7775s%@BLDSHARED@%$BLDSHARED%g
7776s%@CCSHARED@%$CCSHARED%g
7777s%@LINKFORSHARED@%$LINKFORSHARED%g
7778s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
7779s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7780s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
7781s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
7782s%@LDLAST@%$LDLAST%g
7783s%@DLINCLDIR@%$DLINCLDIR%g
7784s%@DYNLOADFILE@%$DYNLOADFILE%g
7785s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
7786s%@LIBOBJS@%$LIBOBJS%g
7787s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7788s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7789s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
7790s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
7791s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
7792s%@LIBM@%$LIBM%g
7793s%@LIBC@%$LIBC%g
7794s%@UNICODE_OBJS@%$UNICODE_OBJS%g
7795s%@THREADHEADERS@%$THREADHEADERS%g
7796s%@SRCDIRS@%$SRCDIRS%g
Jack Jansendd19cf82001-12-06 22:36:17 +00007797
Jack Jansendd19cf82001-12-06 22:36:17 +00007798CEOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007799EOF
7800
Michael W. Hudson54241132001-12-07 15:38:26 +00007801cat >> $CONFIG_STATUS <<\EOF
7802
7803# Split the substitutions into bite-sized pieces for seds with
7804# small command number limits, like on Digital OSF/1 and HP-UX.
7805ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7806ac_file=1 # Number of current file.
7807ac_beg=1 # First line for current file.
7808ac_end=$ac_max_sed_cmds # Line after last line for current file.
7809ac_more_lines=:
7810ac_sed_cmds=""
7811while $ac_more_lines; do
7812 if test $ac_beg -gt 1; then
7813 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7814 else
7815 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00007816 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007817 if test ! -s conftest.s$ac_file; then
7818 ac_more_lines=false
7819 rm -f conftest.s$ac_file
7820 else
7821 if test -z "$ac_sed_cmds"; then
7822 ac_sed_cmds="sed -f conftest.s$ac_file"
7823 else
7824 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7825 fi
7826 ac_file=`expr $ac_file + 1`
7827 ac_beg=$ac_end
7828 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7829 fi
7830done
7831if test -z "$ac_sed_cmds"; then
7832 ac_sed_cmds=cat
7833fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007834EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007835
7836cat >> $CONFIG_STATUS <<EOF
7837
7838CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
7839EOF
7840cat >> $CONFIG_STATUS <<\EOF
7841for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Jack Jansendd19cf82001-12-06 22:36:17 +00007842 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00007843 case "$ac_file" in
7844 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7845 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7846 *) ac_file_in="${ac_file}.in" ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007847 esac
7848
Michael W. Hudson54241132001-12-07 15:38:26 +00007849 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7850
7851 # Remove last slash and all that follows it. Not all systems have dirname.
7852 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007853 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007854 # The file is in a subdirectory.
7855 test ! -d "$ac_dir" && mkdir "$ac_dir"
7856 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007857 # A "../" for each directory in $ac_dir_suffix.
Michael W. Hudson54241132001-12-07 15:38:26 +00007858 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007859 else
7860 ac_dir_suffix= ac_dots=
7861 fi
7862
Michael W. Hudson54241132001-12-07 15:38:26 +00007863 case "$ac_given_srcdir" in
7864 .) srcdir=.
7865 if test -z "$ac_dots"; then top_srcdir=.
7866 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7867 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007868 *) # Relative path.
Michael W. Hudson54241132001-12-07 15:38:26 +00007869 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7870 top_srcdir="$ac_dots$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007871 esac
7872
Michael W. Hudson54241132001-12-07 15:38:26 +00007873 case "$ac_given_INSTALL" in
7874 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7875 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007876 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007877
Michael W. Hudson54241132001-12-07 15:38:26 +00007878 echo creating "$ac_file"
7879 rm -f "$ac_file"
7880 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7881 case "$ac_file" in
7882 *Makefile*) ac_comsub="1i\\
7883# $configure_input" ;;
7884 *) ac_comsub= ;;
7885 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007886
Michael W. Hudson54241132001-12-07 15:38:26 +00007887 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7888 sed -e "$ac_comsub
7889s%@configure_input@%$configure_input%g
7890s%@srcdir@%$srcdir%g
7891s%@top_srcdir@%$top_srcdir%g
7892s%@INSTALL@%$INSTALL%g
7893" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7894fi; done
7895rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007896
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007897# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7898# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007899#
7900# ac_d sets the value in "#define NAME VALUE" lines.
Michael W. Hudson54241132001-12-07 15:38:26 +00007901ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7902ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7903ac_dC='\3'
7904ac_dD='%g'
7905# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7906ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7907ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007908ac_uC=' '
Michael W. Hudson54241132001-12-07 15:38:26 +00007909ac_uD='\4%g'
7910# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7911ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7912ac_eB='$%\1#\2define\3'
7913ac_eC=' '
7914ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007915
Michael W. Hudson54241132001-12-07 15:38:26 +00007916if test "${CONFIG_HEADERS+set}" != set; then
7917EOF
7918cat >> $CONFIG_STATUS <<EOF
7919 CONFIG_HEADERS="pyconfig.h"
7920EOF
7921cat >> $CONFIG_STATUS <<\EOF
7922fi
7923for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007924 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00007925 case "$ac_file" in
7926 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7927 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7928 *) ac_file_in="${ac_file}.in" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007929 esac
7930
Michael W. Hudson54241132001-12-07 15:38:26 +00007931 echo creating $ac_file
Guido van Rossum7f43da71994-08-01 12:15:30 +00007932
Michael W. Hudson54241132001-12-07 15:38:26 +00007933 rm -f conftest.frag conftest.in conftest.out
7934 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7935 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007936
7937EOF
7938
Michael W. Hudson54241132001-12-07 15:38:26 +00007939# Transform confdefs.h into a sed script conftest.vals that substitutes
7940# the proper values into config.h.in to produce config.h. And first:
7941# Protect against being on the right side of a sed subst in config.status.
7942# Protect against being in an unquoted here document in config.status.
7943rm -f conftest.vals
7944cat > conftest.hdr <<\EOF
7945s/[\\&%]/\\&/g
7946s%[\\$`]%\\&%g
7947s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7948s%ac_d%ac_u%gp
7949s%ac_u%ac_e%gp
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007950EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007951sed -n -f conftest.hdr confdefs.h > conftest.vals
7952rm -f conftest.hdr
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007953
7954# This sed command replaces #undef with comments. This is necessary, for
7955# example, in the case of _POSIX_SOURCE, which is predefined and required
7956# on some systems where configure will not decide to define it.
Michael W. Hudson54241132001-12-07 15:38:26 +00007957cat >> conftest.vals <<\EOF
7958s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007959EOF
7960
Michael W. Hudson54241132001-12-07 15:38:26 +00007961# Break up conftest.vals because some shells have a limit on
7962# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007963
Jack Jansendd19cf82001-12-06 22:36:17 +00007964rm -f conftest.tail
Michael W. Hudson54241132001-12-07 15:38:26 +00007965while :
Jack Jansendd19cf82001-12-06 22:36:17 +00007966do
Michael W. Hudson54241132001-12-07 15:38:26 +00007967 ac_lines=`grep -c . conftest.vals`
7968 # grep -c gives empty output for an empty file on some AIX systems.
7969 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7970 # Write a limited-size here document to conftest.frag.
7971 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7972 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +00007973 echo 'CEOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007974 sed -f conftest.frag conftest.in > conftest.out
7975 rm -f conftest.in
7976 mv conftest.out conftest.in
7977' >> $CONFIG_STATUS
7978 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7979 rm -f conftest.vals
7980 mv conftest.tail conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00007981done
Michael W. Hudson54241132001-12-07 15:38:26 +00007982rm -f conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00007983
Michael W. Hudson54241132001-12-07 15:38:26 +00007984cat >> $CONFIG_STATUS <<\EOF
7985 rm -f conftest.frag conftest.h
7986 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7987 cat conftest.in >> conftest.h
7988 rm -f conftest.in
7989 if cmp -s $ac_file conftest.h 2>/dev/null; then
7990 echo "$ac_file is unchanged"
7991 rm -f conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007992 else
Michael W. Hudson54241132001-12-07 15:38:26 +00007993 # Remove last slash and all that follows it. Not all systems have dirname.
7994 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Jack Jansendd19cf82001-12-06 22:36:17 +00007995 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007996 # The file is in a subdirectory.
7997 test ! -d "$ac_dir" && mkdir "$ac_dir"
Jack Jansendd19cf82001-12-06 22:36:17 +00007998 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007999 rm -f $ac_file
8000 mv conftest.h $ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00008001 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008002fi; done
8003
Guido van Rossumf78abae1997-01-21 22:02:36 +00008004EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008005cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00008006
Michael W. Hudson54241132001-12-07 15:38:26 +00008007EOF
8008cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008009
Michael W. Hudson54241132001-12-07 15:38:26 +00008010exit 0
Guido van Rossum627b2d71993-12-24 10:39:16 +00008011EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008012chmod +x $CONFIG_STATUS
Michael W. Hudson54241132001-12-07 15:38:26 +00008013rm -fr confdefs* $ac_clean_files
8014test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00008015
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008016
8017echo "creating Setup"
8018if test ! -f Modules/Setup
8019then
8020 cp $srcdir/Modules/Setup.dist Modules/Setup
8021fi
8022
8023echo "creating Setup.local"
8024if test ! -f Modules/Setup.local
8025then
8026 echo "# Edit this file for local setup changes" >Modules/Setup.local
8027fi
8028
8029echo "creating Makefile"
8030$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
8031 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00008032 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008033mv config.c Modules