blob: d581a00a6aadbd8cebb241e3050c15908760de70 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Michael W. Hudson54241132001-12-07 15:38:26 +00002
Neil Schemenauer16c22972002-03-22 15:34:49 +00003# From configure.in Revision: 1.300
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öwis4e732dc2002-03-19 15:15:32 +00001433 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001434 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +00001993for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
1994libintl.h locale.h ncurses.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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis2e64c342002-03-27 18:49:02 +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
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003400echo $ac_n "checking for sem_init in -lrt""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003401echo "configure:3402: checking for sem_init in -lrt" >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003402ac_lib_var=`echo rt'_'sem_init | sed 'y%./+-%__p_%'`
3403if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3404 echo $ac_n "(cached) $ac_c" 1>&6
3405else
3406 ac_save_LIBS="$LIBS"
3407LIBS="-lrt $LIBS"
3408cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003409#line 3410 "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003410#include "confdefs.h"
3411/* Override any gcc2 internal prototype to avoid an error. */
3412/* We use char because int might match the return type of a gcc2
3413 builtin and then its argument prototype would still apply. */
3414char sem_init();
3415
3416int main() {
3417sem_init()
3418; return 0; }
3419EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003420if { (eval echo configure:3421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003421 rm -rf conftest*
3422 eval "ac_cv_lib_$ac_lib_var=yes"
3423else
3424 echo "configure: failed program was:" >&5
3425 cat conftest.$ac_ext >&5
3426 rm -rf conftest*
3427 eval "ac_cv_lib_$ac_lib_var=no"
3428fi
3429rm -f conftest*
3430LIBS="$ac_save_LIBS"
3431
3432fi
3433if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3434 echo "$ac_t""yes" 1>&6
3435 ac_tr_lib=HAVE_LIB`echo rt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3436 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3437 cat >> confdefs.h <<EOF
3438#define $ac_tr_lib 1
3439EOF
3440
3441 LIBS="-lrt $LIBS"
3442
3443else
3444 echo "$ac_t""no" 1>&6
3445fi
3446 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003447
3448# checks for system dependent C++ extensions support
3449case "$ac_sys_system" in
Michael W. Hudson54241132001-12-07 15:38:26 +00003450 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003451echo "configure:3452: checking for genuine AIX C++ extensions support" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003452 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003453#line 3454 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003454#include "confdefs.h"
3455#include "/usr/lpp/xlC/include/load.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00003456int main() {
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003457loadAndInit("", 0, "")
Michael W. Hudson54241132001-12-07 15:38:26 +00003458; return 0; }
3459EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003460if { (eval echo configure:3461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003461 rm -rf conftest*
3462 cat >> confdefs.h <<\EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003463#define AIX_GENUINE_CPLUSPLUS 1
3464EOF
3465
Michael W. Hudson54241132001-12-07 15:38:26 +00003466 echo "$ac_t""yes" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003467else
Michael W. Hudson54241132001-12-07 15:38:26 +00003468 echo "configure: failed program was:" >&5
3469 cat conftest.$ac_ext >&5
3470 rm -rf conftest*
3471 echo "$ac_t""no" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003472fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003473rm -f conftest*;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003474 *) ;;
3475esac
3476
Guido van Rossum70c7f481998-03-26 18:44:10 +00003477# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3478# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003479# BeOS' sockets are stashed in libnet.
3480case "$ac_sys_system" in
3481IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003482*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003483echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003484echo "configure:3485: checking for t_open in -lnsl" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003485ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
3486if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3487 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003488else
Michael W. Hudson54241132001-12-07 15:38:26 +00003489 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003490LIBS="-lnsl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003491cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003492#line 3493 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003493#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003494/* Override any gcc2 internal prototype to avoid an error. */
3495/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003496 builtin and then its argument prototype would still apply. */
3497char t_open();
3498
3499int main() {
3500t_open()
3501; return 0; }
3502EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003503if { (eval echo configure:3504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003504 rm -rf conftest*
3505 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003506else
Michael W. Hudson54241132001-12-07 15:38:26 +00003507 echo "configure: failed program was:" >&5
3508 cat conftest.$ac_ext >&5
3509 rm -rf conftest*
3510 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003511fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003512rm -f conftest*
3513LIBS="$ac_save_LIBS"
3514
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003515fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003516if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3517 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003518 LIBS="-lnsl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003519else
3520 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003521fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003522 # SVR4
Michael W. Hudson54241132001-12-07 15:38:26 +00003523echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003524echo "configure:3525: checking for socket in -lsocket" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003525ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3526if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3527 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003528else
Michael W. Hudson54241132001-12-07 15:38:26 +00003529 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003530LIBS="-lsocket $LIBS $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003531cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003532#line 3533 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003533#include "confdefs.h"
3534/* Override any gcc2 internal prototype to avoid an error. */
3535/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003536 builtin and then its argument prototype would still apply. */
3537char socket();
3538
3539int main() {
3540socket()
3541; return 0; }
3542EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003543if { (eval echo configure:3544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003544 rm -rf conftest*
3545 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003546else
Michael W. Hudson54241132001-12-07 15:38:26 +00003547 echo "configure: failed program was:" >&5
3548 cat conftest.$ac_ext >&5
3549 rm -rf conftest*
3550 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003551fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003552rm -f conftest*
3553LIBS="$ac_save_LIBS"
3554
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003555fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003556if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3557 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003558 LIBS="-lsocket $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003559else
3560 echo "$ac_t""no" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003561fi
3562 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003563;;
3564esac
3565case "$ac_sys_system" in
3566BeOS*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003567echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003568echo "configure:3569: checking for socket in -lnet" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003569ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
3570if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3571 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003572else
Michael W. Hudson54241132001-12-07 15:38:26 +00003573 ac_save_LIBS="$LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00003574LIBS="-lnet $LIBS $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003575cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003576#line 3577 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003577#include "confdefs.h"
3578/* Override any gcc2 internal prototype to avoid an error. */
3579/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003580 builtin and then its argument prototype would still apply. */
3581char socket();
3582
3583int main() {
3584socket()
3585; return 0; }
3586EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003587if { (eval echo configure:3588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003588 rm -rf conftest*
3589 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003590else
Michael W. Hudson54241132001-12-07 15:38:26 +00003591 echo "configure: failed program was:" >&5
3592 cat conftest.$ac_ext >&5
3593 rm -rf conftest*
3594 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003595fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003596rm -f conftest*
3597LIBS="$ac_save_LIBS"
3598
Guido van Rossumad678af1998-10-02 14:42:15 +00003599fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003600if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3601 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003602 LIBS="-lnet $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003603else
3604 echo "$ac_t""no" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003605fi
3606 # BeOS
3607;;
3608esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003609
Michael W. Hudson54241132001-12-07 15:38:26 +00003610echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003611echo "configure:3612: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003612# Check whether --with-libs or --without-libs was given.
3613if test "${with_libs+set}" = set; then
3614 withval="$with_libs"
Michael W. Hudson54241132001-12-07 15:38:26 +00003615
3616echo "$ac_t""$withval" 1>&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00003617LIBS="$withval $LIBS"
3618
3619else
Michael W. Hudson54241132001-12-07 15:38:26 +00003620 echo "$ac_t""no" 1>&6
3621fi
3622
Guido van Rossum7f43da71994-08-01 12:15:30 +00003623
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003624# Determine if signalmodule should be used.
3625
3626
Michael W. Hudson54241132001-12-07 15:38:26 +00003627echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003628echo "configure:3629: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003629# Check whether --with-signal-module or --without-signal-module was given.
3630if test "${with_signal_module+set}" = set; then
3631 withval="$with_signal_module"
Michael W. Hudson54241132001-12-07 15:38:26 +00003632 :
3633fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003634
3635
3636if test -z "$with_signal_module"
3637then with_signal_module="yes"
3638fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003639echo "$ac_t""$with_signal_module" 1>&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003640
3641if test "${with_signal_module}" = "yes"; then
3642 USE_SIGNAL_MODULE=""
3643 SIGNAL_OBJS=""
3644else
3645 USE_SIGNAL_MODULE="#"
3646 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3647fi
3648
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003649# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003650
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003651USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003652
Michael W. Hudson54241132001-12-07 15:38:26 +00003653echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003654echo "configure:3655: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003655
3656# Check whether --with-dec-threads or --without-dec-threads was given.
3657if test "${with_dec_threads+set}" = set; then
3658 withval="$with_dec_threads"
Michael W. Hudson54241132001-12-07 15:38:26 +00003659
3660echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003661LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003662if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003663 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003664fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003665else
Michael W. Hudson54241132001-12-07 15:38:26 +00003666 echo "$ac_t""no" 1>&6
3667fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003668
3669
Michael W. Hudson54241132001-12-07 15:38:26 +00003670echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003671echo "configure:3672: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003672# Check whether --with-threads or --without-threads was given.
3673if test "${with_threads+set}" = set; then
3674 withval="$with_threads"
Michael W. Hudson54241132001-12-07 15:38:26 +00003675 :
3676fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003677
3678
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003679# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003680# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003681if test "${with_thread+set}" = set; then
3682 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003683
Jack Jansendd19cf82001-12-06 22:36:17 +00003684with_threads=$with_thread
Michael W. Hudson54241132001-12-07 15:38:26 +00003685fi
3686
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003687
3688if test -z "$with_threads"
3689then with_threads="yes"
3690fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003691echo "$ac_t""$with_threads" 1>&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003692
3693if test "$with_threads" = "no"
3694then
3695 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003696elif test "$ac_cv_pthread_is_default" = yes
3697then
Michael W. Hudson54241132001-12-07 15:38:26 +00003698 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003699#define WITH_THREAD 1
3700EOF
3701
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003702 # Defining _REENTRANT on system with POSIX threads should not hurt.
Michael W. Hudson54241132001-12-07 15:38:26 +00003703 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003704#define _REENTRANT 1
3705EOF
3706
3707 posix_threads=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003708 LIBOBJS="$LIBOBJS thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003709elif test "$ac_cv_kpthread" = "yes"
3710then
3711 CC="$CC -Kpthread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003712 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003713#define WITH_THREAD 1
3714EOF
3715
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003716 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003717 LIBOBJS="$LIBOBJS thread.o"
3718else
3719 if test ! -z "$with_threads" -a -d "$with_threads"
3720 then LDFLAGS="$LDFLAGS -L$with_threads"
3721 fi
3722 if test ! -z "$withval" -a -d "$withval"
3723 then LDFLAGS="$LDFLAGS -L$withval"
3724 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003725
3726 # According to the POSIX spec, a pthreads implementation must
3727 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Michael W. Hudson54241132001-12-07 15:38:26 +00003728 echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003729echo "configure:3730: checking for _POSIX_THREADS in unistd.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003730 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003731#line 3732 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003732#include "confdefs.h"
3733#include <unistd.h>
3734 #ifdef _POSIX_THREADS
3735 yes
3736 #endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003737
3738EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003739if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3740 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003741 rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003742 unistd_defines_pthreads=yes
3743else
Michael W. Hudson54241132001-12-07 15:38:26 +00003744 rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003745 unistd_defines_pthreads=no
3746fi
3747rm -f conftest*
3748
Michael W. Hudson54241132001-12-07 15:38:26 +00003749 echo "$ac_t""$unistd_defines_pthreads" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003750
Michael W. Hudson54241132001-12-07 15:38:26 +00003751 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003752#define _REENTRANT 1
3753EOF
3754
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003755 ac_safe=`echo "cthreads.h" | sed 'y%./+-%__p_%'`
3756echo $ac_n "checking for cthreads.h""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003757echo "configure:3758: checking for cthreads.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003758if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3759 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003760else
Michael W. Hudson54241132001-12-07 15:38:26 +00003761 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003762#line 3763 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003763#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003764#include <cthreads.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00003765EOF
3766ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003767{ (eval echo configure:3768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003768ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3769if test -z "$ac_err"; then
3770 rm -rf conftest*
3771 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003772else
Michael W. Hudson54241132001-12-07 15:38:26 +00003773 echo "$ac_err" >&5
3774 echo "configure: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003775 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003776 rm -rf conftest*
3777 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003778fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003779rm -f conftest*
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003780fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003781if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3782 echo "$ac_t""yes" 1>&6
3783 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003784#define WITH_THREAD 1
3785EOF
3786
Michael W. Hudson54241132001-12-07 15:38:26 +00003787 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003788#define C_THREADS 1
3789EOF
3790
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003791 cat >> confdefs.h <<\EOF
3792#define HURD_C_THREADS 1
3793EOF
3794
3795 LIBS="$LIBS -lthreads"
3796 LIBOBJS="$LIBOBJS thread.o"
3797else
3798 echo "$ac_t""no" 1>&6
3799
3800 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
3801echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003802echo "configure:3803: checking for mach/cthreads.h" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003803if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3804 echo $ac_n "(cached) $ac_c" 1>&6
3805else
3806 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003807#line 3808 "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003808#include "confdefs.h"
3809#include <mach/cthreads.h>
3810EOF
3811ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003812{ (eval echo configure:3813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003813ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3814if test -z "$ac_err"; then
3815 rm -rf conftest*
3816 eval "ac_cv_header_$ac_safe=yes"
3817else
3818 echo "$ac_err" >&5
3819 echo "configure: failed program was:" >&5
3820 cat conftest.$ac_ext >&5
3821 rm -rf conftest*
3822 eval "ac_cv_header_$ac_safe=no"
3823fi
3824rm -f conftest*
3825fi
3826if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3827 echo "$ac_t""yes" 1>&6
3828 cat >> confdefs.h <<\EOF
3829#define WITH_THREAD 1
3830EOF
3831
3832 cat >> confdefs.h <<\EOF
3833#define C_THREADS 1
3834EOF
3835
3836 cat >> confdefs.h <<\EOF
3837#define MACH_C_THREADS 1
3838EOF
3839
Martin v. Löwis130fb172001-07-19 11:00:41 +00003840 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003841else
Michael W. Hudson54241132001-12-07 15:38:26 +00003842 echo "$ac_t""no" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003843
Michael W. Hudson54241132001-12-07 15:38:26 +00003844 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003845echo "configure:3846: checking for --with-pth" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003846 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003847if test "${with_pth+set}" = set; then
3848 withval="$with_pth"
Michael W. Hudson54241132001-12-07 15:38:26 +00003849
3850 echo "$ac_t""$withval" 1>&6
3851 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003852#define WITH_THREAD 1
3853EOF
3854
Michael W. Hudson54241132001-12-07 15:38:26 +00003855 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003856#define HAVE_PTH 1
3857EOF
3858
Martin v. Löwis130fb172001-07-19 11:00:41 +00003859 LIBS="-lpth $LIBS"
3860 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003861else
Michael W. Hudson54241132001-12-07 15:38:26 +00003862
3863 echo "$ac_t""no" 1>&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003864
3865 # Just looking for pthread_create in libpthread is not enough:
3866 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
3867 # So we really have to include pthread.h, and then link.
3868 _libs=$LIBS
3869 LIBS="$LIBS -lpthread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003870 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003871echo "configure:3872: checking for pthread_create in -lpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003872 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003873#line 3874 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003874#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003875#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00003876
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003877void * start_routine (void *arg) { exit (0); }
Michael W. Hudson54241132001-12-07 15:38:26 +00003878int main() {
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003879
3880pthread_create (NULL, NULL, start_routine, NULL)
Michael W. Hudson54241132001-12-07 15:38:26 +00003881; return 0; }
3882EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003883if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003884 rm -rf conftest*
3885
3886 echo "$ac_t""yes" 1>&6
3887 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003888#define WITH_THREAD 1
3889EOF
3890
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003891 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003892 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003893else
Michael W. Hudson54241132001-12-07 15:38:26 +00003894 echo "configure: failed program was:" >&5
3895 cat conftest.$ac_ext >&5
3896 rm -rf conftest*
3897
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003898 LIBS=$_libs
Michael W. Hudson54241132001-12-07 15:38:26 +00003899 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003900echo "configure:3901: checking for pthread_detach" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003901if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
3902 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003903else
Michael W. Hudson54241132001-12-07 15:38:26 +00003904 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003905#line 3906 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003906#include "confdefs.h"
3907/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00003908 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003909#include <assert.h>
3910/* Override any gcc2 internal prototype to avoid an error. */
3911/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003912 builtin and then its argument prototype would still apply. */
3913char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003914
Michael W. Hudson54241132001-12-07 15:38:26 +00003915int main() {
3916
Guido van Rossumad678af1998-10-02 14:42:15 +00003917/* The GNU C library defines this for functions which it implements
3918 to always fail with ENOSYS. Some functions are actually named
3919 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003920#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003921choke me
3922#else
Michael W. Hudson54241132001-12-07 15:38:26 +00003923pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003924#endif
3925
Michael W. Hudson54241132001-12-07 15:38:26 +00003926; return 0; }
3927EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003928if { (eval echo configure:3929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003929 rm -rf conftest*
3930 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003931else
Michael W. Hudson54241132001-12-07 15:38:26 +00003932 echo "configure: failed program was:" >&5
3933 cat conftest.$ac_ext >&5
3934 rm -rf conftest*
3935 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003936fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003937rm -f conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00003938fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003939
3940if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
3941 echo "$ac_t""yes" 1>&6
3942 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003943#define WITH_THREAD 1
3944EOF
3945
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003946 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003947 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003948else
Michael W. Hudson54241132001-12-07 15:38:26 +00003949 echo "$ac_t""no" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003950
Michael W. Hudson54241132001-12-07 15:38:26 +00003951 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
3952echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003953echo "configure:3954: checking for kernel/OS.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003954if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3955 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003956else
Michael W. Hudson54241132001-12-07 15:38:26 +00003957 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003958#line 3959 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003959#include "confdefs.h"
3960#include <kernel/OS.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00003961EOF
3962ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003963{ (eval echo configure:3964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003964ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3965if test -z "$ac_err"; then
3966 rm -rf conftest*
3967 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003968else
Michael W. Hudson54241132001-12-07 15:38:26 +00003969 echo "$ac_err" >&5
3970 echo "configure: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003971 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003972 rm -rf conftest*
3973 eval "ac_cv_header_$ac_safe=no"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003974fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003975rm -f conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003976fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003977if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3978 echo "$ac_t""yes" 1>&6
3979 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003980#define WITH_THREAD 1
3981EOF
3982
Michael W. Hudson54241132001-12-07 15:38:26 +00003983 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003984#define BEOS_THREADS 1
3985EOF
3986
Martin v. Löwis130fb172001-07-19 11:00:41 +00003987 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003988else
Michael W. Hudson54241132001-12-07 15:38:26 +00003989 echo "$ac_t""no" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003990
Michael W. Hudson54241132001-12-07 15:38:26 +00003991 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00003992echo "configure:3993: checking for pthread_create in -lpthreads" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003993ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
3994if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3995 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003996else
Michael W. Hudson54241132001-12-07 15:38:26 +00003997 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003998LIBS="-lpthreads $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003999cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004000#line 4001 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00004001#include "confdefs.h"
4002/* Override any gcc2 internal prototype to avoid an error. */
4003/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004004 builtin and then its argument prototype would still apply. */
4005char pthread_create();
4006
4007int main() {
4008pthread_create()
4009; return 0; }
4010EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004011if { (eval echo configure:4012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004012 rm -rf conftest*
4013 eval "ac_cv_lib_$ac_lib_var=yes"
Greg Steinadf63d62000-07-05 10:38:09 +00004014else
Michael W. Hudson54241132001-12-07 15:38:26 +00004015 echo "configure: failed program was:" >&5
4016 cat conftest.$ac_ext >&5
4017 rm -rf conftest*
4018 eval "ac_cv_lib_$ac_lib_var=no"
Greg Steinadf63d62000-07-05 10:38:09 +00004019fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004020rm -f conftest*
4021LIBS="$ac_save_LIBS"
4022
Greg Steinadf63d62000-07-05 10:38:09 +00004023fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004024if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4025 echo "$ac_t""yes" 1>&6
4026 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00004027#define WITH_THREAD 1
4028EOF
4029
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004030 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004031 LIBS="$LIBS -lpthreads"
4032 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00004033else
Michael W. Hudson54241132001-12-07 15:38:26 +00004034 echo "$ac_t""no" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00004035
Michael W. Hudson54241132001-12-07 15:38:26 +00004036 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004037echo "configure:4038: checking for pthread_create in -lc_r" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004038ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
4039if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4040 echo $ac_n "(cached) $ac_c" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00004041else
Michael W. Hudson54241132001-12-07 15:38:26 +00004042 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00004043LIBS="-lc_r $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004044cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004045#line 4046 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00004046#include "confdefs.h"
4047/* Override any gcc2 internal prototype to avoid an error. */
4048/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004049 builtin and then its argument prototype would still apply. */
4050char pthread_create();
4051
4052int main() {
4053pthread_create()
4054; return 0; }
4055EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004056if { (eval echo configure:4057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004057 rm -rf conftest*
4058 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum49545951997-12-02 19:28:29 +00004059else
Michael W. Hudson54241132001-12-07 15:38:26 +00004060 echo "configure: failed program was:" >&5
4061 cat conftest.$ac_ext >&5
4062 rm -rf conftest*
4063 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum49545951997-12-02 19:28:29 +00004064fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004065rm -f conftest*
4066LIBS="$ac_save_LIBS"
4067
Guido van Rossum49545951997-12-02 19:28:29 +00004068fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004069if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4070 echo "$ac_t""yes" 1>&6
4071 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00004072#define WITH_THREAD 1
4073EOF
4074
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004075 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004076 LIBS="$LIBS -lc_r"
4077 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004078else
Michael W. Hudson54241132001-12-07 15:38:26 +00004079 echo "$ac_t""no" 1>&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004080
Michael W. Hudson54241132001-12-07 15:38:26 +00004081 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004082echo "configure:4083: checking for __d6_pthread_create in -lthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004083ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
4084if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4085 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004086else
Michael W. Hudson54241132001-12-07 15:38:26 +00004087 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00004088LIBS="-lthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004089cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004090#line 4091 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004091#include "confdefs.h"
4092/* Override any gcc2 internal prototype to avoid an error. */
4093/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004094 builtin and then its argument prototype would still apply. */
4095char __d6_pthread_create();
4096
4097int main() {
4098__d6_pthread_create()
4099; return 0; }
4100EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004101if { (eval echo configure:4102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004102 rm -rf conftest*
4103 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004104else
Michael W. Hudson54241132001-12-07 15:38:26 +00004105 echo "configure: failed program was:" >&5
4106 cat conftest.$ac_ext >&5
4107 rm -rf conftest*
4108 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004109fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004110rm -f conftest*
4111LIBS="$ac_save_LIBS"
4112
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004113fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004114if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4115 echo "$ac_t""yes" 1>&6
4116 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004117#define WITH_THREAD 1
4118EOF
4119
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004120 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004121 LIBS="$LIBS -lthread"
4122 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00004123else
Michael W. Hudson54241132001-12-07 15:38:26 +00004124 echo "$ac_t""no" 1>&6
Guido van Rossum49545951997-12-02 19:28:29 +00004125
Michael W. Hudson54241132001-12-07 15:38:26 +00004126 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004127echo "configure:4128: checking for __pthread_create_system in -lpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004128ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
4129if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4130 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004131else
Michael W. Hudson54241132001-12-07 15:38:26 +00004132 ac_save_LIBS="$LIBS"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004133LIBS="-lpthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004134cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004135#line 4136 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004136#include "confdefs.h"
4137/* Override any gcc2 internal prototype to avoid an error. */
4138/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004139 builtin and then its argument prototype would still apply. */
4140char __pthread_create_system();
4141
4142int main() {
4143__pthread_create_system()
4144; return 0; }
4145EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004146if { (eval echo configure:4147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004147 rm -rf conftest*
4148 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004149else
Michael W. Hudson54241132001-12-07 15:38:26 +00004150 echo "configure: failed program was:" >&5
4151 cat conftest.$ac_ext >&5
4152 rm -rf conftest*
4153 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004154fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004155rm -f conftest*
4156LIBS="$ac_save_LIBS"
4157
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004158fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004159if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4160 echo "$ac_t""yes" 1>&6
4161 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004162#define WITH_THREAD 1
4163EOF
4164
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004165 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004166 LIBS="$LIBS -lpthread"
4167 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004168else
Michael W. Hudson54241132001-12-07 15:38:26 +00004169 echo "$ac_t""no" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004170
Michael W. Hudson54241132001-12-07 15:38:26 +00004171 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004172echo "configure:4173: checking for pthread_create in -lcma" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004173ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
4174if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4175 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00004176else
Michael W. Hudson54241132001-12-07 15:38:26 +00004177 ac_save_LIBS="$LIBS"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004178LIBS="-lcma $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004179cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004180#line 4181 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004181#include "confdefs.h"
4182/* Override any gcc2 internal prototype to avoid an error. */
4183/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004184 builtin and then its argument prototype would still apply. */
4185char pthread_create();
4186
4187int main() {
4188pthread_create()
4189; return 0; }
4190EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004191if { (eval echo configure:4192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004192 rm -rf conftest*
4193 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004194else
Michael W. Hudson54241132001-12-07 15:38:26 +00004195 echo "configure: failed program was:" >&5
4196 cat conftest.$ac_ext >&5
4197 rm -rf conftest*
4198 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004199fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004200rm -f conftest*
4201LIBS="$ac_save_LIBS"
4202
Guido van Rossumb93a8621998-05-07 13:27:32 +00004203fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004204if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4205 echo "$ac_t""yes" 1>&6
4206 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00004207#define WITH_THREAD 1
4208EOF
4209
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004210 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004211 LIBS="$LIBS -lcma"
4212 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004213else
Michael W. Hudson54241132001-12-07 15:38:26 +00004214 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004215
Martin v. Löwis130fb172001-07-19 11:00:41 +00004216 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004217fi
4218
Michael W. Hudson54241132001-12-07 15:38:26 +00004219
Guido van Rossum627b2d71993-12-24 10:39:16 +00004220fi
4221
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004222fi
4223
Guido van Rossum0be3e491997-05-22 20:33:33 +00004224fi
4225
Guido van Rossum49545951997-12-02 19:28:29 +00004226fi
4227
Guido van Rossumb93a8621998-05-07 13:27:32 +00004228fi
4229
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004230fi
4231
Guido van Rossumad678af1998-10-02 14:42:15 +00004232fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004233rm -f conftest*
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004234fi
4235
Michael W. Hudson54241132001-12-07 15:38:26 +00004236fi
4237
Martin v. Löwisa6e97582002-01-01 18:41:33 +00004238fi
4239
Michael W. Hudson54241132001-12-07 15:38:26 +00004240
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004241 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004242 if test "$unistd_defines_pthreads" = "no"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004243 cat >> confdefs.h <<\EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004244#define _POSIX_THREADS 1
4245EOF
4246
4247 fi
4248
Michael W. Hudson54241132001-12-07 15:38:26 +00004249 echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004250echo "configure:4251: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004251 if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then
4252 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004253else
4254 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004255 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004256else
Michael W. Hudson54241132001-12-07 15:38:26 +00004257 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004258#line 4259 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004259#include "confdefs.h"
4260#include <pthread.h>
4261 void *foo(void *parm) {
4262 return NULL;
4263 }
4264 main() {
4265 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004266 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004267 if (pthread_attr_init(&attr)) exit(-1);
4268 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004269 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004270 exit(0);
4271 }
Michael W. Hudson54241132001-12-07 15:38:26 +00004272EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004273if { (eval echo configure:4274: \"$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 +00004274then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004275 ac_cv_pthread_system_supported=yes
4276else
Michael W. Hudson54241132001-12-07 15:38:26 +00004277 echo "configure: failed program was:" >&5
4278 cat conftest.$ac_ext >&5
4279 rm -fr conftest*
4280 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004281fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004282rm -fr conftest*
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004283fi
4284
Michael W. Hudson54241132001-12-07 15:38:26 +00004285
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004286fi
4287
Michael W. Hudson54241132001-12-07 15:38:26 +00004288 echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004289 if test "$ac_cv_pthread_system_supported" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004290 cat >> confdefs.h <<\EOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004291#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
4292EOF
4293
4294 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004295 for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004296do
Michael W. Hudson54241132001-12-07 15:38:26 +00004297echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004298echo "configure:4299: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004299if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4300 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004301else
Michael W. Hudson54241132001-12-07 15:38:26 +00004302 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004303#line 4304 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004304#include "confdefs.h"
4305/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004306 which can conflict with char $ac_func(); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004307#include <assert.h>
4308/* Override any gcc2 internal prototype to avoid an error. */
4309/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004310 builtin and then its argument prototype would still apply. */
4311char $ac_func();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004312
Michael W. Hudson54241132001-12-07 15:38:26 +00004313int main() {
4314
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004315/* The GNU C library defines this for functions which it implements
4316 to always fail with ENOSYS. Some functions are actually named
4317 something starting with __ and the normal name is an alias. */
4318#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4319choke me
4320#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004321$ac_func();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004322#endif
4323
Michael W. Hudson54241132001-12-07 15:38:26 +00004324; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004325EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004326if { (eval echo configure:4327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004327 rm -rf conftest*
4328 eval "ac_cv_func_$ac_func=yes"
4329else
4330 echo "configure: failed program was:" >&5
4331 cat conftest.$ac_ext >&5
4332 rm -rf conftest*
4333 eval "ac_cv_func_$ac_func=no"
4334fi
4335rm -f conftest*
4336fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004337
Michael W. Hudson54241132001-12-07 15:38:26 +00004338if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4339 echo "$ac_t""yes" 1>&6
4340 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4341 cat >> confdefs.h <<EOF
4342#define $ac_tr_func 1
4343EOF
4344
4345else
4346 echo "$ac_t""no" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004347fi
4348done
4349
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004350 fi
4351
Michael W. Hudson54241132001-12-07 15:38:26 +00004352 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004353echo "configure:4354: checking for usconfig in -lmpc" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004354ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
4355if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4356 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004357else
Michael W. Hudson54241132001-12-07 15:38:26 +00004358 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004359LIBS="-lmpc $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004360cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004361#line 4362 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004362#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004363/* Override any gcc2 internal prototype to avoid an error. */
4364/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004365 builtin and then its argument prototype would still apply. */
4366char usconfig();
4367
4368int main() {
4369usconfig()
4370; return 0; }
4371EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004372if { (eval echo configure:4373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004373 rm -rf conftest*
4374 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004375else
Michael W. Hudson54241132001-12-07 15:38:26 +00004376 echo "configure: failed program was:" >&5
4377 cat conftest.$ac_ext >&5
4378 rm -rf conftest*
4379 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004380fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004381rm -f conftest*
4382LIBS="$ac_save_LIBS"
4383
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004384fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004385if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4386 echo "$ac_t""yes" 1>&6
4387 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004388#define WITH_THREAD 1
4389EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004390
Martin v. Löwis130fb172001-07-19 11:00:41 +00004391 LIBS="$LIBS -lmpc"
4392 LIBOBJS="$LIBOBJS thread.o"
4393 USE_THREAD_MODULE=""
Michael W. Hudson54241132001-12-07 15:38:26 +00004394else
4395 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004396fi
4397
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004398
4399 if test $posix_threads != "yes"; then
4400 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004401echo "configure:4402: checking for thr_create in -lthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004402ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
4403if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4404 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004405else
Michael W. Hudson54241132001-12-07 15:38:26 +00004406 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004407LIBS="-lthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004408cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004409#line 4410 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004410#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004411/* Override any gcc2 internal prototype to avoid an error. */
4412/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004413 builtin and then its argument prototype would still apply. */
4414char thr_create();
4415
4416int main() {
4417thr_create()
4418; return 0; }
4419EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004420if { (eval echo configure:4421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004421 rm -rf conftest*
4422 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004423else
Michael W. Hudson54241132001-12-07 15:38:26 +00004424 echo "configure: failed program was:" >&5
4425 cat conftest.$ac_ext >&5
4426 rm -rf conftest*
4427 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004428fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004429rm -f conftest*
4430LIBS="$ac_save_LIBS"
4431
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004432fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004433if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4434 echo "$ac_t""yes" 1>&6
4435 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004436#define WITH_THREAD 1
4437EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004438
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004439 LIBS="$LIBS -lthread"
4440 LIBOBJS="$LIBOBJS thread.o"
4441 USE_THREAD_MODULE=""
Michael W. Hudson54241132001-12-07 15:38:26 +00004442else
4443 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004444fi
4445
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004446 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004447
Martin v. Löwis130fb172001-07-19 11:00:41 +00004448 if test "$USE_THREAD_MODULE" != "#"
4449 then
4450 # If the above checks didn't disable threads, (at least) OSF1
4451 # needs this '-threads' argument during linking.
4452 case $ac_sys_system in
4453 OSF1) LDLAST=-threads;;
4454 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004455 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004456fi
4457
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004458# Check for enable-ipv6
Michael W. Hudson54241132001-12-07 15:38:26 +00004459echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004460echo "configure:4461: checking if --enable-ipv6 is specified" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004461# Check whether --enable-ipv6 or --disable-ipv6 was given.
4462if test "${enable_ipv6+set}" = set; then
4463 enableval="$enable_ipv6"
4464 case "$enableval" in
4465 no)
Michael W. Hudson54241132001-12-07 15:38:26 +00004466 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004467 ipv6=no
4468 ;;
Michael W. Hudson54241132001-12-07 15:38:26 +00004469 *) echo "$ac_t""yes" 1>&6
4470 cat >> confdefs.h <<\EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004471#define ENABLE_IPV6 1
4472EOF
4473
4474 ipv6=yes
4475 ;;
Michael W. Hudson54241132001-12-07 15:38:26 +00004476 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004477else
Michael W. Hudson54241132001-12-07 15:38:26 +00004478
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004479 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004480 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004481 ipv6=no
4482
4483else
Michael W. Hudson54241132001-12-07 15:38:26 +00004484 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004485#line 4486 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004486#include "confdefs.h"
4487 /* AF_INET6 available check */
4488#include <sys/types.h>
4489#include <sys/socket.h>
4490main()
4491{
4492 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4493 exit(1);
4494 else
4495 exit(0);
4496}
4497
Michael W. Hudson54241132001-12-07 15:38:26 +00004498EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004499if { (eval echo configure:4500: \"$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 +00004500then
4501 echo "$ac_t""yes" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004502 ipv6=yes
4503else
Michael W. Hudson54241132001-12-07 15:38:26 +00004504 echo "configure: failed program was:" >&5
4505 cat conftest.$ac_ext >&5
4506 rm -fr conftest*
4507 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004508 ipv6=no
4509fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004510rm -fr conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004511fi
4512
Michael W. Hudson54241132001-12-07 15:38:26 +00004513
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004514if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004515 echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004516echo "configure:4517: checking if RFC2553 API is available" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004517 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004518#line 4519 "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004519#include "confdefs.h"
4520#include <sys/types.h>
4521#include <netinet/in.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00004522int main() {
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004523struct sockaddr_in6 x;
4524x.sin6_scope_id;
Michael W. Hudson54241132001-12-07 15:38:26 +00004525; return 0; }
4526EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004527if { (eval echo configure:4528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004528 rm -rf conftest*
4529 echo "$ac_t""yes" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004530 ipv6=yes
4531else
Michael W. Hudson54241132001-12-07 15:38:26 +00004532 echo "configure: failed program was:" >&5
4533 cat conftest.$ac_ext >&5
4534 rm -rf conftest*
4535 echo "$ac_t""no" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004536 ipv6=no
4537fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004538rm -f conftest*
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004539fi
4540
4541if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004542 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004543#define ENABLE_IPV6 1
4544EOF
4545
4546fi
4547
Michael W. Hudson54241132001-12-07 15:38:26 +00004548fi
4549
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004550
4551ipv6type=unknown
4552ipv6lib=none
4553ipv6trylibc=no
4554
4555if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004556 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004557echo "configure:4558: checking ipv6 stack type" >&5
Guido van Rossumb8552162001-09-05 14:58:11 +00004558 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
4559 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004560 case $i in
4561 inria)
Michael W. Hudson54241132001-12-07 15:38:26 +00004562 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004563#line 4564 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004564#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004565
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004566#include <netinet/in.h>
4567#ifdef IPV6_INRIA_VERSION
4568yes
4569#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004570EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004571if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4572 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004573 rm -rf conftest*
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004574 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004575fi
4576rm -f conftest*
4577
4578 ;;
4579 kame)
Michael W. Hudson54241132001-12-07 15:38:26 +00004580 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004581#line 4582 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004582#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004583
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004584#include <netinet/in.h>
4585#ifdef __KAME__
4586yes
4587#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004588EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004589if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4590 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004591 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004592 ipv6type=$i;
4593 ipv6lib=inet6
4594 ipv6libdir=/usr/local/v6/lib
4595 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004596fi
4597rm -f conftest*
4598
4599 ;;
4600 linux-glibc)
Michael W. Hudson54241132001-12-07 15:38:26 +00004601 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004602#line 4603 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004603#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004604
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004605#include <features.h>
4606#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4607yes
4608#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004609EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004610if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4611 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004612 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004613 ipv6type=$i;
4614 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004615fi
4616rm -f conftest*
4617
4618 ;;
4619 linux-inet6)
4620 if test -d /usr/inet6; then
4621 ipv6type=$i
4622 ipv6lib=inet6
4623 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004624 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004625 fi
4626 ;;
4627 solaris)
4628 if test -f /etc/netconfig; then
4629 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4630 ipv6type=$i
4631 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004632 fi
4633 fi
4634 ;;
4635 toshiba)
Michael W. Hudson54241132001-12-07 15:38:26 +00004636 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004637#line 4638 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004638#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004639
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004640#include <sys/param.h>
4641#ifdef _TOSHIBA_INET6
4642yes
4643#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004644EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4646 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004647 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004648 ipv6type=$i;
4649 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004650 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004651fi
4652rm -f conftest*
4653
4654 ;;
4655 v6d)
Michael W. Hudson54241132001-12-07 15:38:26 +00004656 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004657#line 4658 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004658#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004659
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004660#include </usr/local/v6/include/sys/v6config.h>
4661#ifdef __V6D__
4662yes
4663#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004664EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004665if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4666 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004667 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004668 ipv6type=$i;
4669 ipv6lib=v6;
4670 ipv6libdir=/usr/local/v6/lib;
4671 OPT="-I/usr/local/v6/include $OPT"
4672fi
4673rm -f conftest*
4674
4675 ;;
4676 zeta)
Michael W. Hudson54241132001-12-07 15:38:26 +00004677 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004678#line 4679 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004679#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004680
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004681#include <sys/param.h>
4682#ifdef _ZETA_MINAMI_INET6
4683yes
4684#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004685EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004686if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4687 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004688 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004689 ipv6type=$i;
4690 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004691 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004692fi
4693rm -f conftest*
4694
4695 ;;
4696 esac
4697 if test "$ipv6type" != "unknown"; then
4698 break
4699 fi
4700 done
Michael W. Hudson54241132001-12-07 15:38:26 +00004701 echo "$ac_t""$ipv6type" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004702fi
4703
4704if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4705 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4706 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4707 echo "using lib$ipv6lib"
4708 else
4709 if test $ipv6trylibc = "yes"; then
4710 echo "using libc"
4711 else
4712 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4713 echo "You need to fetch lib$ipv6lib.a from appropriate"
4714 echo 'ipv6 kit and compile beforehand.'
4715 exit 1
4716 fi
4717 fi
4718fi
4719
Barry Warsawef82cd72000-06-30 16:21:01 +00004720# Check for GC support
Michael W. Hudson54241132001-12-07 15:38:26 +00004721echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004722echo "configure:4723: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004723# Check whether --with-cycle-gc or --without-cycle-gc was given.
4724if test "${with_cycle_gc+set}" = set; then
4725 withval="$with_cycle_gc"
Michael W. Hudson54241132001-12-07 15:38:26 +00004726 :
4727fi
Barry Warsawef82cd72000-06-30 16:21:01 +00004728
4729
4730if test -z "$with_cycle_gc"
4731then with_cycle_gc="yes"
4732fi
Neil Schemenauercf229462001-08-29 23:58:47 +00004733if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +00004734then
Michael W. Hudson54241132001-12-07 15:38:26 +00004735 cat >> confdefs.h <<\EOF
Barry Warsawef82cd72000-06-30 16:21:01 +00004736#define WITH_CYCLE_GC 1
4737EOF
4738
4739fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004740echo "$ac_t""$with_cycle_gc" 1>&6
Barry Warsawef82cd72000-06-30 16:21:01 +00004741
Neil Schemenauera35c6882001-02-27 04:45:05 +00004742# Check for Python-specific malloc support
Michael W. Hudson54241132001-12-07 15:38:26 +00004743echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004744echo "configure:4745: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004745# Check whether --with-pymalloc or --without-pymalloc was given.
4746if test "${with_pymalloc+set}" = set; then
4747 withval="$with_pymalloc"
Neil Schemenauer16c22972002-03-22 15:34:49 +00004748 :
Michael W. Hudson54241132001-12-07 15:38:26 +00004749fi
4750
Neil Schemenauera35c6882001-02-27 04:45:05 +00004751
Neil Schemenauer16c22972002-03-22 15:34:49 +00004752if test -z "$with_pymalloc"
4753then with_pymalloc="yes"
4754fi
4755if test "$with_pymalloc" != "no"
4756then
4757 cat >> confdefs.h <<\EOF
4758#define WITH_PYMALLOC 1
4759EOF
4760
4761fi
4762echo "$ac_t""$with_pymalloc" 1>&6
4763
Barry Warsawef82cd72000-06-30 16:21:01 +00004764# Check for --with-wctype-functions
Michael W. Hudson54241132001-12-07 15:38:26 +00004765echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004766echo "configure:4767: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004767# Check whether --with-wctype-functions or --without-wctype-functions was given.
4768if test "${with_wctype_functions+set}" = set; then
4769 withval="$with_wctype_functions"
Michael W. Hudson54241132001-12-07 15:38:26 +00004770
Barry Warsawef82cd72000-06-30 16:21:01 +00004771if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00004772then cat >> confdefs.h <<\EOF
Barry Warsawef82cd72000-06-30 16:21:01 +00004773#define WANT_WCTYPE_FUNCTIONS 1
4774EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00004775 echo "$ac_t""yes" 1>&6
4776else echo "$ac_t""no" 1>&6
Barry Warsawef82cd72000-06-30 16:21:01 +00004777fi
4778else
Michael W. Hudson54241132001-12-07 15:38:26 +00004779 echo "$ac_t""no" 1>&6
4780fi
4781
Barry Warsawef82cd72000-06-30 16:21:01 +00004782
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004783# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004784
Guido van Rossum98935bf2001-09-05 19:13:16 +00004785DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004786
Michael W. Hudson54241132001-12-07 15:38:26 +00004787echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004788echo "configure:4789: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004789# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004790if test "${with_sgi_dl+set}" = set; then
4791 withval="$with_sgi_dl"
Michael W. Hudson54241132001-12-07 15:38:26 +00004792
4793echo "$ac_t""$withval" 1>&6
4794cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004795#define WITH_SGI_DL 1
4796EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004797
Guido van Rossume97ee181999-12-20 21:27:22 +00004798DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004799dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004800if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004801then LDFLAGS="$LDFLAGS -L$dldir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004802else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004803fi
4804DLINCLDIR=${dldir}
4805LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004806else
Michael W. Hudson54241132001-12-07 15:38:26 +00004807 echo "$ac_t""no" 1>&6
4808fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004809
4810
Michael W. Hudson54241132001-12-07 15:38:26 +00004811echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004812echo "configure:4813: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004813# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004814if test "${with_dl_dld+set}" = set; then
4815 withval="$with_dl_dld"
Michael W. Hudson54241132001-12-07 15:38:26 +00004816
4817echo "$ac_t""$withval" 1>&6
4818cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004819#define WITH_DL_DLD 1
4820EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004821
Guido van Rossume97ee181999-12-20 21:27:22 +00004822DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004823dldir=`echo "$withval" | sed 's/,.*//'`
4824dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004825if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004826then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004827else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004828fi
4829DLINCLDIR=${dldir}
4830LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004831else
Michael W. Hudson54241132001-12-07 15:38:26 +00004832 echo "$ac_t""no" 1>&6
4833fi
4834
Guido van Rossum7f43da71994-08-01 12:15:30 +00004835
Guido van Rossume97ee181999-12-20 21:27:22 +00004836# the dlopen() function means we might want to use dynload_shlib.o. some
4837# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004838for ac_func in dlopen
4839do
Michael W. Hudson54241132001-12-07 15:38:26 +00004840echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004841echo "configure:4842: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004842if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4843 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004844else
Michael W. Hudson54241132001-12-07 15:38:26 +00004845 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004846#line 4847 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004847#include "confdefs.h"
4848/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004849 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004850#include <assert.h>
4851/* Override any gcc2 internal prototype to avoid an error. */
4852/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004853 builtin and then its argument prototype would still apply. */
4854char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004855
Michael W. Hudson54241132001-12-07 15:38:26 +00004856int main() {
4857
Guido van Rossume97ee181999-12-20 21:27:22 +00004858/* The GNU C library defines this for functions which it implements
4859 to always fail with ENOSYS. Some functions are actually named
4860 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004861#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004862choke me
4863#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004864$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004865#endif
4866
Michael W. Hudson54241132001-12-07 15:38:26 +00004867; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004868EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004869if { (eval echo configure:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004870 rm -rf conftest*
4871 eval "ac_cv_func_$ac_func=yes"
4872else
4873 echo "configure: failed program was:" >&5
4874 cat conftest.$ac_ext >&5
4875 rm -rf conftest*
4876 eval "ac_cv_func_$ac_func=no"
4877fi
4878rm -f conftest*
4879fi
Guido van Rossume97ee181999-12-20 21:27:22 +00004880
Michael W. Hudson54241132001-12-07 15:38:26 +00004881if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4882 echo "$ac_t""yes" 1>&6
4883 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4884 cat >> confdefs.h <<EOF
4885#define $ac_tr_func 1
4886EOF
4887
4888else
4889 echo "$ac_t""no" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004890fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004891done
Guido van Rossume97ee181999-12-20 21:27:22 +00004892
Michael W. Hudson54241132001-12-07 15:38:26 +00004893
Guido van Rossume97ee181999-12-20 21:27:22 +00004894# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4895# loading of modules.
4896
Michael W. Hudson54241132001-12-07 15:38:26 +00004897echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004898echo "configure:4899: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004899if test -z "$DYNLOADFILE"
4900then
4901 case $ac_sys_system/$ac_sys_release in
4902 AIX*) DYNLOADFILE="dynload_aix.o";;
4903 BeOS*) DYNLOADFILE="dynload_beos.o";;
4904 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004905 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004906 *)
4907 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4908 # out any dynamic loading
4909 if test "$ac_cv_func_dlopen" = yes
4910 then DYNLOADFILE="dynload_shlib.o"
4911 else DYNLOADFILE="dynload_stub.o"
4912 fi
4913 ;;
4914 esac
4915fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004916echo "$ac_t""$DYNLOADFILE" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004917if test "$DYNLOADFILE" != "dynload_stub.o"
4918then
Michael W. Hudson54241132001-12-07 15:38:26 +00004919 cat >> confdefs.h <<\EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004920#define HAVE_DYNAMIC_LOADING 1
4921EOF
4922
4923fi
4924
Neil Schemenauer4e425612001-06-19 15:44:15 +00004925# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4926
Michael W. Hudson54241132001-12-07 15:38:26 +00004927
4928echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004929echo "configure:4930: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004930if test -z "$MACHDEP_OBJS"
4931then
Jack Jansene578a632001-08-15 01:27:14 +00004932 MACHDEP_OBJS=$extra_machdep_objs
4933else
4934 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004935fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004936echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004937
Guido van Rossum627b2d71993-12-24 10:39:16 +00004938# checks for library functions
Martin v. Löwis244edc82001-10-04 22:44:26 +00004939for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004940 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00004941 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004942 hstrerror inet_pton kill killpg link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004943 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004944 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +00004945 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004946 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004947 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004948 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +00004949 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004950do
Michael W. Hudson54241132001-12-07 15:38:26 +00004951echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004952echo "configure:4953: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004953if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4954 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004955else
Michael W. Hudson54241132001-12-07 15:38:26 +00004956 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004957#line 4958 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004958#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004959/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004960 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004961#include <assert.h>
4962/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004963/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004964 builtin and then its argument prototype would still apply. */
4965char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004966
Michael W. Hudson54241132001-12-07 15:38:26 +00004967int main() {
4968
Guido van Rossum627b2d71993-12-24 10:39:16 +00004969/* The GNU C library defines this for functions which it implements
4970 to always fail with ENOSYS. Some functions are actually named
4971 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004972#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004973choke me
4974#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004975$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004976#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004977
Michael W. Hudson54241132001-12-07 15:38:26 +00004978; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004979EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00004980if { (eval echo configure:4981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004981 rm -rf conftest*
4982 eval "ac_cv_func_$ac_func=yes"
4983else
4984 echo "configure: failed program was:" >&5
4985 cat conftest.$ac_ext >&5
4986 rm -rf conftest*
4987 eval "ac_cv_func_$ac_func=no"
4988fi
4989rm -f conftest*
4990fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00004991
Michael W. Hudson54241132001-12-07 15:38:26 +00004992if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4993 echo "$ac_t""yes" 1>&6
4994 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4995 cat >> confdefs.h <<EOF
4996#define $ac_tr_func 1
4997EOF
4998
4999else
5000 echo "$ac_t""no" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005001fi
5002done
5003
Michael W. Hudson54241132001-12-07 15:38:26 +00005004
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005005# check for openpty and forkpty
5006
5007for ac_func in openpty
5008do
Michael W. Hudson54241132001-12-07 15:38:26 +00005009echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005010echo "configure:5011: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005011if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5012 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005013else
Michael W. Hudson54241132001-12-07 15:38:26 +00005014 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005015#line 5016 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005016#include "confdefs.h"
5017/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005018 which can conflict with char $ac_func(); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005019#include <assert.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 $ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005024
Michael W. Hudson54241132001-12-07 15:38:26 +00005025int main() {
5026
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005027/* The GNU C library defines this for functions which it implements
5028 to always fail with ENOSYS. Some functions are actually named
5029 something starting with __ and the normal name is an alias. */
5030#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5031choke me
5032#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005033$ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005034#endif
5035
Michael W. Hudson54241132001-12-07 15:38:26 +00005036; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005037EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005038if { (eval echo configure:5039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005039 rm -rf conftest*
5040 eval "ac_cv_func_$ac_func=yes"
5041else
5042 echo "configure: failed program was:" >&5
5043 cat conftest.$ac_ext >&5
5044 rm -rf conftest*
5045 eval "ac_cv_func_$ac_func=no"
5046fi
5047rm -f conftest*
5048fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005049
Michael W. Hudson54241132001-12-07 15:38:26 +00005050if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5051 echo "$ac_t""yes" 1>&6
5052 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5053 cat >> confdefs.h <<EOF
5054#define $ac_tr_func 1
5055EOF
5056
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005057else
Michael W. Hudson54241132001-12-07 15:38:26 +00005058 echo "$ac_t""no" 1>&6
5059echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005060echo "configure:5061: checking for openpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005061ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
5062if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5063 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005064else
Michael W. Hudson54241132001-12-07 15:38:26 +00005065 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005066LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005067cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005068#line 5069 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005069#include "confdefs.h"
5070/* Override any gcc2 internal prototype to avoid an error. */
5071/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005072 builtin and then its argument prototype would still apply. */
5073char openpty();
5074
5075int main() {
5076openpty()
5077; return 0; }
5078EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005079if { (eval echo configure:5080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005080 rm -rf conftest*
5081 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005082else
Michael W. Hudson54241132001-12-07 15:38:26 +00005083 echo "configure: failed program was:" >&5
5084 cat conftest.$ac_ext >&5
5085 rm -rf conftest*
5086 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005087fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005088rm -f conftest*
5089LIBS="$ac_save_LIBS"
5090
Fred Drake8cef4cf2000-06-28 16:40:38 +00005091fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005092if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5093 echo "$ac_t""yes" 1>&6
5094 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005095#define HAVE_OPENPTY 1
5096EOF
5097 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005098else
5099 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005100fi
5101
5102fi
5103done
5104
5105for ac_func in forkpty
5106do
Michael W. Hudson54241132001-12-07 15:38:26 +00005107echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005108echo "configure:5109: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005109if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5110 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005111else
Michael W. Hudson54241132001-12-07 15:38:26 +00005112 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005113#line 5114 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005114#include "confdefs.h"
5115/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005116 which can conflict with char $ac_func(); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +00005117#include <assert.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 $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005122
Michael W. Hudson54241132001-12-07 15:38:26 +00005123int main() {
5124
Fred Drake8cef4cf2000-06-28 16:40:38 +00005125/* The GNU C library defines this for functions which it implements
5126 to always fail with ENOSYS. Some functions are actually named
5127 something starting with __ and the normal name is an alias. */
5128#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5129choke me
5130#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005131$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005132#endif
5133
Michael W. Hudson54241132001-12-07 15:38:26 +00005134; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005135EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005136if { (eval echo configure:5137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005137 rm -rf conftest*
5138 eval "ac_cv_func_$ac_func=yes"
5139else
5140 echo "configure: failed program was:" >&5
5141 cat conftest.$ac_ext >&5
5142 rm -rf conftest*
5143 eval "ac_cv_func_$ac_func=no"
5144fi
5145rm -f conftest*
5146fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00005147
Michael W. Hudson54241132001-12-07 15:38:26 +00005148if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5149 echo "$ac_t""yes" 1>&6
5150 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5151 cat >> confdefs.h <<EOF
5152#define $ac_tr_func 1
5153EOF
5154
Fred Drake8cef4cf2000-06-28 16:40:38 +00005155else
Michael W. Hudson54241132001-12-07 15:38:26 +00005156 echo "$ac_t""no" 1>&6
5157echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005158echo "configure:5159: checking for forkpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005159ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
5160if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5161 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005162else
Michael W. Hudson54241132001-12-07 15:38:26 +00005163 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005164LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005165cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005166#line 5167 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005167#include "confdefs.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 forkpty();
5172
5173int main() {
5174forkpty()
5175; return 0; }
5176EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005177if { (eval echo configure:5178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005178 rm -rf conftest*
5179 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005180else
Michael W. Hudson54241132001-12-07 15:38:26 +00005181 echo "configure: failed program was:" >&5
5182 cat conftest.$ac_ext >&5
5183 rm -rf conftest*
5184 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005185fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005186rm -f conftest*
5187LIBS="$ac_save_LIBS"
5188
Fred Drake8cef4cf2000-06-28 16:40:38 +00005189fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005190if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5191 echo "$ac_t""yes" 1>&6
5192 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005193#define HAVE_FORKPTY 1
5194EOF
5195 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005196else
5197 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005198fi
5199
5200fi
5201done
5202
Jack Jansendd19cf82001-12-06 22:36:17 +00005203
Michael W. Hudson54241132001-12-07 15:38:26 +00005204# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +00005205for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
5206do
Michael W. Hudson54241132001-12-07 15:38:26 +00005207echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005208echo "configure:5209: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005209if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5210 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005211else
Michael W. Hudson54241132001-12-07 15:38:26 +00005212 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005213#line 5214 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005214#include "confdefs.h"
5215/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005216 which can conflict with char $ac_func(); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +00005217#include <assert.h>
5218/* Override any gcc2 internal prototype to avoid an error. */
5219/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005220 builtin and then its argument prototype would still apply. */
5221char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005222
Michael W. Hudson54241132001-12-07 15:38:26 +00005223int main() {
5224
Fred Drake8cef4cf2000-06-28 16:40:38 +00005225/* The GNU C library defines this for functions which it implements
5226 to always fail with ENOSYS. Some functions are actually named
5227 something starting with __ and the normal name is an alias. */
5228#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5229choke me
5230#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005231$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005232#endif
5233
Michael W. Hudson54241132001-12-07 15:38:26 +00005234; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005235EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005236if { (eval echo configure:5237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005237 rm -rf conftest*
5238 eval "ac_cv_func_$ac_func=yes"
5239else
5240 echo "configure: failed program was:" >&5
5241 cat conftest.$ac_ext >&5
5242 rm -rf conftest*
5243 eval "ac_cv_func_$ac_func=no"
5244fi
5245rm -f conftest*
5246fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005247
Michael W. Hudson54241132001-12-07 15:38:26 +00005248if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5249 echo "$ac_t""yes" 1>&6
5250 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5251 cat >> confdefs.h <<EOF
5252#define $ac_tr_func 1
5253EOF
5254
5255else
5256 echo "$ac_t""no" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005257fi
5258done
5259
Michael W. Hudson54241132001-12-07 15:38:26 +00005260
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005261for ac_func in dup2 getcwd strdup strerror memmove
5262do
Michael W. Hudson54241132001-12-07 15:38:26 +00005263echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005264echo "configure:5265: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005265if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5266 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005267else
Michael W. Hudson54241132001-12-07 15:38:26 +00005268 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005269#line 5270 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005270#include "confdefs.h"
5271/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005272 which can conflict with char $ac_func(); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005273#include <assert.h>
5274/* Override any gcc2 internal prototype to avoid an error. */
5275/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005276 builtin and then its argument prototype would still apply. */
5277char $ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005278
Michael W. Hudson54241132001-12-07 15:38:26 +00005279int main() {
5280
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005281/* The GNU C library defines this for functions which it implements
5282 to always fail with ENOSYS. Some functions are actually named
5283 something starting with __ and the normal name is an alias. */
5284#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5285choke me
5286#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005287$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005288#endif
5289
Michael W. Hudson54241132001-12-07 15:38:26 +00005290; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005291EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005292if { (eval echo configure:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005293 rm -rf conftest*
5294 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005295else
Michael W. Hudson54241132001-12-07 15:38:26 +00005296 echo "configure: failed program was:" >&5
5297 cat conftest.$ac_ext >&5
5298 rm -rf conftest*
5299 eval "ac_cv_func_$ac_func=no"
5300fi
5301rm -f conftest*
5302fi
5303
5304if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5305 echo "$ac_t""yes" 1>&6
5306 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5307 cat >> confdefs.h <<EOF
5308#define $ac_tr_func 1
5309EOF
5310
5311else
5312 echo "$ac_t""no" 1>&6
5313LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005314fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005315done
5316
Michael W. Hudson54241132001-12-07 15:38:26 +00005317
Thomas Wouters3a584202000-08-05 23:28:51 +00005318for ac_func in getpgrp
5319do
Michael W. Hudson54241132001-12-07 15:38:26 +00005320echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005321echo "configure:5322: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005322if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5323 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005324else
Michael W. Hudson54241132001-12-07 15:38:26 +00005325 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005326#line 5327 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005327#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005328/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005329 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005330#include <assert.h>
5331/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005332/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005333 builtin and then its argument prototype would still apply. */
5334char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005335
Michael W. Hudson54241132001-12-07 15:38:26 +00005336int main() {
5337
Guido van Rossum627b2d71993-12-24 10:39:16 +00005338/* The GNU C library defines this for functions which it implements
5339 to always fail with ENOSYS. Some functions are actually named
5340 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005341#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005342choke me
5343#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005344$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005345#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005346
Michael W. Hudson54241132001-12-07 15:38:26 +00005347; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005348EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005349if { (eval echo configure:5350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005350 rm -rf conftest*
5351 eval "ac_cv_func_$ac_func=yes"
5352else
5353 echo "configure: failed program was:" >&5
5354 cat conftest.$ac_ext >&5
5355 rm -rf conftest*
5356 eval "ac_cv_func_$ac_func=no"
5357fi
5358rm -f conftest*
5359fi
5360
5361if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5362 echo "$ac_t""yes" 1>&6
5363 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5364 cat >> confdefs.h <<EOF
5365#define $ac_tr_func 1
5366EOF
5367 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005368#line 5369 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005369#include "confdefs.h"
5370#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005371int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005372getpgrp(0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005373; return 0; }
5374EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005375if { (eval echo configure:5376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005376 rm -rf conftest*
5377 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005378#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005379EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005380
Guido van Rossumf78abae1997-01-21 22:02:36 +00005381else
Michael W. Hudson54241132001-12-07 15:38:26 +00005382 echo "configure: failed program was:" >&5
5383 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005384fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005385rm -f conftest*
5386else
5387 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005388fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005389done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005390
Thomas Wouters3a584202000-08-05 23:28:51 +00005391for ac_func in setpgrp
5392do
Michael W. Hudson54241132001-12-07 15:38:26 +00005393echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005394echo "configure:5395: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005395if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5396 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005397else
Michael W. Hudson54241132001-12-07 15:38:26 +00005398 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005399#line 5400 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005400#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005401/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005402 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005403#include <assert.h>
5404/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005405/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005406 builtin and then its argument prototype would still apply. */
5407char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005408
Michael W. Hudson54241132001-12-07 15:38:26 +00005409int main() {
5410
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005411/* The GNU C library defines this for functions which it implements
5412 to always fail with ENOSYS. Some functions are actually named
5413 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005414#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005415choke me
5416#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005417$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005418#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005419
Michael W. Hudson54241132001-12-07 15:38:26 +00005420; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005421EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005422if { (eval echo configure:5423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005423 rm -rf conftest*
5424 eval "ac_cv_func_$ac_func=yes"
5425else
5426 echo "configure: failed program was:" >&5
5427 cat conftest.$ac_ext >&5
5428 rm -rf conftest*
5429 eval "ac_cv_func_$ac_func=no"
5430fi
5431rm -f conftest*
5432fi
5433
5434if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5435 echo "$ac_t""yes" 1>&6
5436 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5437 cat >> confdefs.h <<EOF
5438#define $ac_tr_func 1
5439EOF
5440 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005441#line 5442 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005442#include "confdefs.h"
5443#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005444int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005445setpgrp(0,0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005446; return 0; }
5447EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005448if { (eval echo configure:5449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005449 rm -rf conftest*
5450 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005451#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005452EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005453
Guido van Rossumf78abae1997-01-21 22:02:36 +00005454else
Michael W. Hudson54241132001-12-07 15:38:26 +00005455 echo "configure: failed program was:" >&5
5456 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005457fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005458rm -f conftest*
5459else
5460 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005461fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005462done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005463
Thomas Wouters3a584202000-08-05 23:28:51 +00005464for ac_func in gettimeofday
5465do
Michael W. Hudson54241132001-12-07 15:38:26 +00005466echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005467echo "configure:5468: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005468if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5469 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005470else
Michael W. Hudson54241132001-12-07 15:38:26 +00005471 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005472#line 5473 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005473#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005474/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005475 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005476#include <assert.h>
5477/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005478/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005479 builtin and then its argument prototype would still apply. */
5480char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005481
Michael W. Hudson54241132001-12-07 15:38:26 +00005482int main() {
5483
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005484/* The GNU C library defines this for functions which it implements
5485 to always fail with ENOSYS. Some functions are actually named
5486 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005487#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005488choke me
5489#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005490$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005491#endif
5492
Michael W. Hudson54241132001-12-07 15:38:26 +00005493; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005494EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005495if { (eval echo configure:5496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005496 rm -rf conftest*
5497 eval "ac_cv_func_$ac_func=yes"
5498else
5499 echo "configure: failed program was:" >&5
5500 cat conftest.$ac_ext >&5
5501 rm -rf conftest*
5502 eval "ac_cv_func_$ac_func=no"
5503fi
5504rm -f conftest*
5505fi
5506
5507if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5508 echo "$ac_t""yes" 1>&6
5509 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5510 cat >> confdefs.h <<EOF
5511#define $ac_tr_func 1
5512EOF
5513 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005514#line 5515 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005515#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005516#include <sys/time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005517int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005518gettimeofday((struct timeval*)0,(struct timezone*)0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005519; return 0; }
5520EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005521if { (eval echo configure:5522: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005522 :
5523else
Michael W. Hudson54241132001-12-07 15:38:26 +00005524 echo "configure: failed program was:" >&5
5525 cat conftest.$ac_ext >&5
5526 rm -rf conftest*
5527 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005528#define GETTIMEOFDAY_NO_TZ 1
5529EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005530
5531fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005532rm -f conftest*
5533else
5534 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005535fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005536done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005537
Michael W. Hudson54241132001-12-07 15:38:26 +00005538
5539
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005540# On OSF/1 V5.1, getaddrinfo is available, but a define
Michael W. Hudson54241132001-12-07 15:38:26 +00005541# for [no]getaddrinfo in netdb.h.
5542echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005543echo "configure:5544: checking for getaddrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005544cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005545#line 5546 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005546#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005547
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005548#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005549#include <sys/socket.h>
5550#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005551#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005552
Michael W. Hudson54241132001-12-07 15:38:26 +00005553int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005554
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005555getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005556
Michael W. Hudson54241132001-12-07 15:38:26 +00005557; return 0; }
5558EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005559if { (eval echo configure:5560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005560 rm -rf conftest*
5561
5562echo "$ac_t""yes" 1>&6
5563echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005564echo "configure:5565: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005565if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005566 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005567buggygetaddrinfo=yes
5568else
Michael W. Hudson54241132001-12-07 15:38:26 +00005569 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005570#line 5571 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005571#include "confdefs.h"
5572
5573#include <sys/types.h>
5574#include <netdb.h>
5575#include <string.h>
5576#include <sys/socket.h>
5577#include <netinet/in.h>
5578
5579main()
5580{
5581 int passive, gaierr, inet4 = 0, inet6 = 0;
5582 struct addrinfo hints, *ai, *aitop;
5583 char straddr[INET6_ADDRSTRLEN], strport[16];
5584
5585 for (passive = 0; passive <= 1; passive++) {
5586 memset(&hints, 0, sizeof(hints));
5587 hints.ai_family = AF_UNSPEC;
5588 hints.ai_flags = passive ? AI_PASSIVE : 0;
5589 hints.ai_socktype = SOCK_STREAM;
5590 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5591 (void)gai_strerror(gaierr);
5592 goto bad;
5593 }
5594 for (ai = aitop; ai; ai = ai->ai_next) {
5595 if (ai->ai_addr == NULL ||
5596 ai->ai_addrlen == 0 ||
5597 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5598 straddr, sizeof(straddr), strport, sizeof(strport),
5599 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5600 goto bad;
5601 }
5602 switch (ai->ai_family) {
5603 case AF_INET:
5604 if (strcmp(strport, "54321") != 0) {
5605 goto bad;
5606 }
5607 if (passive) {
5608 if (strcmp(straddr, "0.0.0.0") != 0) {
5609 goto bad;
5610 }
5611 } else {
5612 if (strcmp(straddr, "127.0.0.1") != 0) {
5613 goto bad;
5614 }
5615 }
5616 inet4++;
5617 break;
5618 case AF_INET6:
5619 if (strcmp(strport, "54321") != 0) {
5620 goto bad;
5621 }
5622 if (passive) {
5623 if (strcmp(straddr, "::") != 0) {
5624 goto bad;
5625 }
5626 } else {
5627 if (strcmp(straddr, "::1") != 0) {
5628 goto bad;
5629 }
5630 }
5631 inet6++;
5632 break;
5633 case AF_UNSPEC:
5634 goto bad;
5635 break;
5636 default:
5637 /* another family support? */
5638 break;
5639 }
5640 }
5641 }
5642
5643 if (!(inet4 == 0 || inet4 == 2))
5644 goto bad;
5645 if (!(inet6 == 0 || inet6 == 2))
5646 goto bad;
5647
5648 if (aitop)
5649 freeaddrinfo(aitop);
5650 exit(0);
5651
5652 bad:
5653 if (aitop)
5654 freeaddrinfo(aitop);
5655 exit(1);
5656}
5657
Michael W. Hudson54241132001-12-07 15:38:26 +00005658EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005659if { (eval echo configure:5660: \"$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 +00005660then
5661 echo "$ac_t""good" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005662buggygetaddrinfo=no
5663else
Michael W. Hudson54241132001-12-07 15:38:26 +00005664 echo "configure: failed program was:" >&5
5665 cat conftest.$ac_ext >&5
5666 rm -fr conftest*
5667 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005668buggygetaddrinfo=yes
5669fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005670rm -fr conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005671fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005672
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005673else
Michael W. Hudson54241132001-12-07 15:38:26 +00005674 echo "configure: failed program was:" >&5
5675 cat conftest.$ac_ext >&5
5676 rm -rf conftest*
5677
5678echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005679buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005680
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005681fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005682rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005683
5684if test "$buggygetaddrinfo" = "yes"; then
5685 if test "$ipv6" = "yes"; then
5686 echo 'Fatal: You must get working getaddrinfo() function.'
5687 echo ' or you can specify "--disable-ipv6"'.
5688 exit 1
5689 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005690else
Michael W. Hudson54241132001-12-07 15:38:26 +00005691 cat >> confdefs.h <<\EOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005692#define HAVE_GETADDRINFO 1
5693EOF
5694
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005695fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005696for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005697do
Michael W. Hudson54241132001-12-07 15:38:26 +00005698echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005699echo "configure:5700: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005700if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5701 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005702else
Michael W. Hudson54241132001-12-07 15:38:26 +00005703 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005704#line 5705 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005705#include "confdefs.h"
5706/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005707 which can conflict with char $ac_func(); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005708#include <assert.h>
5709/* Override any gcc2 internal prototype to avoid an error. */
5710/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005711 builtin and then its argument prototype would still apply. */
5712char $ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005713
Michael W. Hudson54241132001-12-07 15:38:26 +00005714int main() {
5715
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005716/* The GNU C library defines this for functions which it implements
5717 to always fail with ENOSYS. Some functions are actually named
5718 something starting with __ and the normal name is an alias. */
5719#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5720choke me
5721#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005722$ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005723#endif
5724
Michael W. Hudson54241132001-12-07 15:38:26 +00005725; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005726EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005727if { (eval echo configure:5728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005728 rm -rf conftest*
5729 eval "ac_cv_func_$ac_func=yes"
5730else
5731 echo "configure: failed program was:" >&5
5732 cat conftest.$ac_ext >&5
5733 rm -rf conftest*
5734 eval "ac_cv_func_$ac_func=no"
5735fi
5736rm -f conftest*
5737fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005738
Michael W. Hudson54241132001-12-07 15:38:26 +00005739if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5740 echo "$ac_t""yes" 1>&6
5741 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5742 cat >> confdefs.h <<EOF
5743#define $ac_tr_func 1
5744EOF
5745
5746else
5747 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005748fi
5749done
5750
Michael W. Hudson54241132001-12-07 15:38:26 +00005751
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005752# checks for structures
Michael W. Hudson54241132001-12-07 15:38:26 +00005753echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005754echo "configure:5755: checking whether time.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005755if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5756 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005757else
Michael W. Hudson54241132001-12-07 15:38:26 +00005758 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005759#line 5760 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005760#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005761#include <sys/types.h>
5762#include <sys/time.h>
5763#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005764int main() {
5765struct tm *tp;
5766; return 0; }
5767EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005768if { (eval echo configure:5769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005769 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005770 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005771else
Michael W. Hudson54241132001-12-07 15:38:26 +00005772 echo "configure: failed program was:" >&5
5773 cat conftest.$ac_ext >&5
5774 rm -rf conftest*
5775 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005776fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005777rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005778fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005779
Michael W. Hudson54241132001-12-07 15:38:26 +00005780echo "$ac_t""$ac_cv_header_time" 1>&6
5781if test $ac_cv_header_time = yes; then
5782 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005783#define TIME_WITH_SYS_TIME 1
5784EOF
5785
5786fi
5787
Michael W. Hudson54241132001-12-07 15:38:26 +00005788echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005789echo "configure:5790: checking whether struct tm is in sys/time.h or time.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005790if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5791 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005792else
Michael W. Hudson54241132001-12-07 15:38:26 +00005793 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005794#line 5795 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005795#include "confdefs.h"
5796#include <sys/types.h>
5797#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005798int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005799struct tm *tp; tp->tm_sec;
Michael W. Hudson54241132001-12-07 15:38:26 +00005800; return 0; }
5801EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005802if { (eval echo configure:5803: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005803 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005804 ac_cv_struct_tm=time.h
5805else
Michael W. Hudson54241132001-12-07 15:38:26 +00005806 echo "configure: failed program was:" >&5
5807 cat conftest.$ac_ext >&5
5808 rm -rf conftest*
5809 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005810fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005811rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005812fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005813
Michael W. Hudson54241132001-12-07 15:38:26 +00005814echo "$ac_t""$ac_cv_struct_tm" 1>&6
5815if test $ac_cv_struct_tm = sys/time.h; then
5816 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005817#define TM_IN_SYS_TIME 1
5818EOF
5819
5820fi
5821
Michael W. Hudson54241132001-12-07 15:38:26 +00005822echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005823echo "configure:5824: checking for tm_zone in struct tm" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005824if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5825 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005826else
Michael W. Hudson54241132001-12-07 15:38:26 +00005827 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005828#line 5829 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005829#include "confdefs.h"
5830#include <sys/types.h>
5831#include <$ac_cv_struct_tm>
Michael W. Hudson54241132001-12-07 15:38:26 +00005832int main() {
5833struct tm tm; tm.tm_zone;
5834; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005835EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005836if { (eval echo configure:5837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005837 rm -rf conftest*
5838 ac_cv_struct_tm_zone=yes
5839else
5840 echo "configure: failed program was:" >&5
5841 cat conftest.$ac_ext >&5
5842 rm -rf conftest*
5843 ac_cv_struct_tm_zone=no
5844fi
5845rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005846fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005847
Michael W. Hudson54241132001-12-07 15:38:26 +00005848echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5849if test "$ac_cv_struct_tm_zone" = yes; then
5850 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005851#define HAVE_TM_ZONE 1
5852EOF
5853
5854else
Michael W. Hudson54241132001-12-07 15:38:26 +00005855 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005856echo "configure:5857: checking for tzname" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005857if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5858 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005859else
Michael W. Hudson54241132001-12-07 15:38:26 +00005860 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005861#line 5862 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005862#include "confdefs.h"
5863#include <time.h>
5864#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005865extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005866#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005867int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005868atoi(*tzname);
Michael W. Hudson54241132001-12-07 15:38:26 +00005869; return 0; }
5870EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005871if { (eval echo configure:5872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005872 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005873 ac_cv_var_tzname=yes
5874else
Michael W. Hudson54241132001-12-07 15:38:26 +00005875 echo "configure: failed program was:" >&5
5876 cat conftest.$ac_ext >&5
5877 rm -rf conftest*
5878 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005879fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005880rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005881fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005882
Michael W. Hudson54241132001-12-07 15:38:26 +00005883echo "$ac_t""$ac_cv_var_tzname" 1>&6
5884 if test $ac_cv_var_tzname = yes; then
5885 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005886#define HAVE_TZNAME 1
5887EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005888
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005889 fi
5890fi
5891
Michael W. Hudson54241132001-12-07 15:38:26 +00005892echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005893echo "configure:5894: checking for st_rdev in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005894if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
5895 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005896else
Michael W. Hudson54241132001-12-07 15:38:26 +00005897 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005898#line 5899 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005899#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005900#include <sys/types.h>
5901#include <sys/stat.h>
5902int main() {
5903struct stat s; s.st_rdev;
5904; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005905EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005906if { (eval echo configure:5907: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005907 rm -rf conftest*
5908 ac_cv_struct_st_rdev=yes
5909else
5910 echo "configure: failed program was:" >&5
5911 cat conftest.$ac_ext >&5
5912 rm -rf conftest*
5913 ac_cv_struct_st_rdev=no
5914fi
5915rm -f conftest*
5916fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005917
Michael W. Hudson54241132001-12-07 15:38:26 +00005918echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
5919if test $ac_cv_struct_st_rdev = yes; then
5920 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005921#define HAVE_ST_RDEV 1
5922EOF
5923
5924fi
5925
Michael W. Hudson54241132001-12-07 15:38:26 +00005926echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005927echo "configure:5928: checking for st_blksize in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005928if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
5929 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005930else
Michael W. Hudson54241132001-12-07 15:38:26 +00005931 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005932#line 5933 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005933#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005934#include <sys/types.h>
5935#include <sys/stat.h>
5936int main() {
5937struct stat s; s.st_blksize;
5938; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005939EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005940if { (eval echo configure:5941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005941 rm -rf conftest*
5942 ac_cv_struct_st_blksize=yes
5943else
5944 echo "configure: failed program was:" >&5
5945 cat conftest.$ac_ext >&5
5946 rm -rf conftest*
5947 ac_cv_struct_st_blksize=no
5948fi
5949rm -f conftest*
5950fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005951
Michael W. Hudson54241132001-12-07 15:38:26 +00005952echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
5953if test $ac_cv_struct_st_blksize = yes; then
5954 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005955#define HAVE_ST_BLKSIZE 1
5956EOF
5957
5958fi
5959
Michael W. Hudson54241132001-12-07 15:38:26 +00005960echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005961echo "configure:5962: checking for st_blocks in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005962if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
5963 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005964else
Michael W. Hudson54241132001-12-07 15:38:26 +00005965 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005966#line 5967 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005967#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005968#include <sys/types.h>
5969#include <sys/stat.h>
5970int main() {
5971struct stat s; s.st_blocks;
5972; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005973EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005974if { (eval echo configure:5975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005975 rm -rf conftest*
5976 ac_cv_struct_st_blocks=yes
5977else
5978 echo "configure: failed program was:" >&5
5979 cat conftest.$ac_ext >&5
5980 rm -rf conftest*
5981 ac_cv_struct_st_blocks=no
5982fi
5983rm -f conftest*
5984fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005985
Michael W. Hudson54241132001-12-07 15:38:26 +00005986echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
5987if test $ac_cv_struct_st_blocks = yes; then
5988 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005989#define HAVE_ST_BLOCKS 1
5990EOF
5991
5992else
Michael W. Hudson54241132001-12-07 15:38:26 +00005993 LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005994fi
5995
Michael W. Hudson54241132001-12-07 15:38:26 +00005996
5997echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005998echo "configure:5999: checking for time.h that defines altzone" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005999if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
6000 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006001else
Michael W. Hudson54241132001-12-07 15:38:26 +00006002 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006003#line 6004 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006004#include "confdefs.h"
6005#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006006int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006007return altzone;
Michael W. Hudson54241132001-12-07 15:38:26 +00006008; return 0; }
6009EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006010if { (eval echo configure:6011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006011 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006012 ac_cv_header_time_altzone=yes
6013else
Michael W. Hudson54241132001-12-07 15:38:26 +00006014 echo "configure: failed program was:" >&5
6015 cat conftest.$ac_ext >&5
6016 rm -rf conftest*
6017 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006018fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006019rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006020fi
6021
Michael W. Hudson54241132001-12-07 15:38:26 +00006022echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006023if test $ac_cv_header_time_altzone = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006024 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006025#define HAVE_ALTZONE 1
6026EOF
6027
6028fi
6029
Guido van Rossumda88dad1995-01-26 00:46:29 +00006030was_it_defined=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006031echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006032echo "configure:6033: checking whether sys/select.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006033cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006034#line 6035 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006035#include "confdefs.h"
6036
6037#include <sys/types.h>
6038#include <sys/select.h>
6039#include <sys/time.h>
6040
Michael W. Hudson54241132001-12-07 15:38:26 +00006041int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006042;
Michael W. Hudson54241132001-12-07 15:38:26 +00006043; return 0; }
6044EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006045if { (eval echo configure:6046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006046 rm -rf conftest*
6047 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006048#define SYS_SELECT_WITH_SYS_TIME 1
6049EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006050 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006051else
Michael W. Hudson54241132001-12-07 15:38:26 +00006052 echo "configure: failed program was:" >&5
6053 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006054fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006055rm -f conftest*
6056echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006057
Michael W. Hudson54241132001-12-07 15:38:26 +00006058echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006059echo "configure:6060: checking for addrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006060if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
6061 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006062else
Michael W. Hudson54241132001-12-07 15:38:26 +00006063 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006064#line 6065 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006065#include "confdefs.h"
6066
6067# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006068int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006069struct addrinfo a
Michael W. Hudson54241132001-12-07 15:38:26 +00006070; return 0; }
6071EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006072if { (eval echo configure:6073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006073 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006074 ac_cv_struct_addrinfo=yes
6075else
Michael W. Hudson54241132001-12-07 15:38:26 +00006076 echo "configure: failed program was:" >&5
6077 cat conftest.$ac_ext >&5
6078 rm -rf conftest*
6079 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006080fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006081rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006082fi
6083
Michael W. Hudson54241132001-12-07 15:38:26 +00006084echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006085if test $ac_cv_struct_addrinfo = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006086 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006087#define HAVE_ADDRINFO 1
6088EOF
6089
6090fi
6091
Michael W. Hudson54241132001-12-07 15:38:26 +00006092echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006093echo "configure:6094: checking for sockaddr_storage" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006094if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
6095 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006096else
Michael W. Hudson54241132001-12-07 15:38:26 +00006097 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006098#line 6099 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006099#include "confdefs.h"
6100
6101# include <sys/types.h>
6102# include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006103int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006104struct sockaddr_storage s
Michael W. Hudson54241132001-12-07 15:38:26 +00006105; return 0; }
6106EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006107if { (eval echo configure:6108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006108 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006109 ac_cv_struct_sockaddr_storage=yes
6110else
Michael W. Hudson54241132001-12-07 15:38:26 +00006111 echo "configure: failed program was:" >&5
6112 cat conftest.$ac_ext >&5
6113 rm -rf conftest*
6114 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006115fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006116rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006117fi
6118
Michael W. Hudson54241132001-12-07 15:38:26 +00006119echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006120if test $ac_cv_struct_sockaddr_storage = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006121 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006122#define HAVE_SOCKADDR_STORAGE 1
6123EOF
6124
6125fi
6126
Guido van Rossum627b2d71993-12-24 10:39:16 +00006127# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00006128
Michael W. Hudson54241132001-12-07 15:38:26 +00006129echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006130echo "configure:6131: checking whether char is unsigned" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006131if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
6132 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006133else
Michael W. Hudson54241132001-12-07 15:38:26 +00006134 if test "$GCC" = yes; then
6135 # GCC predefines this symbol on systems where it applies.
6136cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006137#line 6138 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006138#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00006139#ifdef __CHAR_UNSIGNED__
6140 yes
6141#endif
6142
6143EOF
6144if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6145 egrep "yes" >/dev/null 2>&1; then
6146 rm -rf conftest*
6147 ac_cv_c_char_unsigned=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006148else
Michael W. Hudson54241132001-12-07 15:38:26 +00006149 rm -rf conftest*
6150 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006151fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006152rm -f conftest*
6153
6154else
6155if test "$cross_compiling" = yes; then
6156 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6157else
6158 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006159#line 6160 "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +00006160#include "confdefs.h"
6161/* volatile prevents gcc2 from optimizing the test away on sparcs. */
6162#if !defined(__STDC__) || __STDC__ != 1
6163#define volatile
6164#endif
6165main() {
6166 volatile char c = 255; exit(c < 0);
6167}
6168EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006169if { (eval echo configure:6170: \"$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 +00006170then
6171 ac_cv_c_char_unsigned=yes
6172else
6173 echo "configure: failed program was:" >&5
6174 cat conftest.$ac_ext >&5
6175 rm -fr conftest*
6176 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006177fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006178rm -fr conftest*
6179fi
6180
6181fi
6182fi
6183
6184echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006185if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006186 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006187#define __CHAR_UNSIGNED__ 1
6188EOF
6189
6190fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006191
Michael W. Hudson54241132001-12-07 15:38:26 +00006192echo $ac_n "checking for working const""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006193echo "configure:6194: checking for working const" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006194if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6195 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006196else
Michael W. Hudson54241132001-12-07 15:38:26 +00006197 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006198#line 6199 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006199#include "confdefs.h"
6200
Michael W. Hudson54241132001-12-07 15:38:26 +00006201int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006202
Michael W. Hudson54241132001-12-07 15:38:26 +00006203/* Ultrix mips cc rejects this. */
6204typedef int charset[2]; const charset x;
6205/* SunOS 4.1.1 cc rejects this. */
6206char const *const *ccp;
6207char **p;
6208/* NEC SVR4.0.2 mips cc rejects this. */
6209struct point {int x, y;};
6210static struct point const zero = {0,0};
6211/* AIX XL C 1.02.0.0 rejects this.
6212 It does not let you subtract one const X* pointer from another in an arm
6213 of an if-expression whose if-part is not a constant expression */
6214const char *g = "string";
6215ccp = &g + (g ? g-g : 0);
6216/* HPUX 7.0 cc rejects these. */
6217++ccp;
6218p = (char**) ccp;
6219ccp = (char const *const *) p;
6220{ /* SCO 3.2v4 cc rejects this. */
6221 char *t;
6222 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006223
Michael W. Hudson54241132001-12-07 15:38:26 +00006224 *t++ = 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006225}
Michael W. Hudson54241132001-12-07 15:38:26 +00006226{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6227 int x[] = {25, 17};
6228 const int *foo = &x[0];
6229 ++foo;
6230}
6231{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6232 typedef const int *iptr;
6233 iptr p = 0;
6234 ++p;
6235}
6236{ /* AIX XL C 1.02.0.0 rejects this saying
6237 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6238 struct s { int j; const int *ap[3]; };
6239 struct s *b; b->j = 5;
6240}
6241{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6242 const int foo = 10;
6243}
6244
6245; return 0; }
6246EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006247if { (eval echo configure:6248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006248 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006249 ac_cv_c_const=yes
6250else
Michael W. Hudson54241132001-12-07 15:38:26 +00006251 echo "configure: failed program was:" >&5
6252 cat conftest.$ac_ext >&5
6253 rm -rf conftest*
6254 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006255fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006256rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006257fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006258
6259echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006260if test $ac_cv_c_const = no; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006261 cat >> confdefs.h <<\EOF
6262#define const
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006263EOF
6264
6265fi
6266
Michael W. Hudson54241132001-12-07 15:38:26 +00006267
Guido van Rossumda88dad1995-01-26 00:46:29 +00006268works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006269echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006270echo "configure:6271: checking for working volatile" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006271cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006272#line 6273 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006273#include "confdefs.h"
6274
Michael W. Hudson54241132001-12-07 15:38:26 +00006275int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006276volatile int x; x = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006277; return 0; }
6278EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006279if { (eval echo configure:6280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006280 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006281 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006282else
Michael W. Hudson54241132001-12-07 15:38:26 +00006283 echo "configure: failed program was:" >&5
6284 cat conftest.$ac_ext >&5
6285 rm -rf conftest*
6286 cat >> confdefs.h <<\EOF
6287#define volatile
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006288EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006289
6290fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006291rm -f conftest*
6292echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006293
Guido van Rossumda88dad1995-01-26 00:46:29 +00006294works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006295echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006296echo "configure:6297: checking for working signed char" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006297cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006298#line 6299 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006299#include "confdefs.h"
6300
Michael W. Hudson54241132001-12-07 15:38:26 +00006301int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006302signed char c;
Michael W. Hudson54241132001-12-07 15:38:26 +00006303; return 0; }
6304EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006305if { (eval echo configure:6306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006306 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006307 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006308else
Michael W. Hudson54241132001-12-07 15:38:26 +00006309 echo "configure: failed program was:" >&5
6310 cat conftest.$ac_ext >&5
6311 rm -rf conftest*
6312 cat >> confdefs.h <<\EOF
6313#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00006314EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006315
6316fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006317rm -f conftest*
6318echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006319
Guido van Rossumda88dad1995-01-26 00:46:29 +00006320have_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006321echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006322echo "configure:6323: checking for prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006323cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006324#line 6325 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006325#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006326int foo(int x) { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006327int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006328return foo(10);
Michael W. Hudson54241132001-12-07 15:38:26 +00006329; return 0; }
6330EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006331if { (eval echo configure:6332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006332 rm -rf conftest*
6333 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006334#define HAVE_PROTOTYPES 1
6335EOF
6336 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006337else
Michael W. Hudson54241132001-12-07 15:38:26 +00006338 echo "configure: failed program was:" >&5
6339 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006340fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006341rm -f conftest*
6342echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006343
Guido van Rossumda88dad1995-01-26 00:46:29 +00006344works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006345echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006346echo "configure:6347: checking for variable length prototypes and stdarg.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006347cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006348#line 6349 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006349#include "confdefs.h"
6350
6351#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00006352int foo(int x, ...) {
6353 va_list va;
6354 va_start(va, x);
6355 va_arg(va, int);
6356 va_arg(va, char *);
6357 va_arg(va, double);
6358 return 0;
6359}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006360
Michael W. Hudson54241132001-12-07 15:38:26 +00006361int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00006362return foo(10, "", 3.14);
Michael W. Hudson54241132001-12-07 15:38:26 +00006363; return 0; }
6364EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006365if { (eval echo configure:6366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006366 rm -rf conftest*
6367 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006368#define HAVE_STDARG_PROTOTYPES 1
6369EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006370 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006371else
Michael W. Hudson54241132001-12-07 15:38:26 +00006372 echo "configure: failed program was:" >&5
6373 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006374fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006375rm -f conftest*
6376echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006377
Guido van Rossumda88dad1995-01-26 00:46:29 +00006378if test "$have_prototypes" = yes; then
6379bad_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006380echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006381echo "configure:6382: checking for bad exec* prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006382cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006383#line 6384 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006384#include "confdefs.h"
6385#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006386int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006387char **t;execve("@",t,t);
Michael W. Hudson54241132001-12-07 15:38:26 +00006388; return 0; }
6389EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006390if { (eval echo configure:6391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006391 :
6392else
Michael W. Hudson54241132001-12-07 15:38:26 +00006393 echo "configure: failed program was:" >&5
6394 cat conftest.$ac_ext >&5
6395 rm -rf conftest*
6396 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006397#define BAD_EXEC_PROTOTYPES 1
6398EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006399 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006400fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006401rm -f conftest*
6402echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006403fi
6404
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006405# check if sockaddr has sa_len member
Michael W. Hudson54241132001-12-07 15:38:26 +00006406echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006407echo "configure:6408: checking if sockaddr has sa_len member" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006408cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006409#line 6410 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006410#include "confdefs.h"
6411#include <sys/types.h>
6412#include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006413int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006414struct sockaddr x;
6415x.sa_len = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006416; return 0; }
6417EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006418if { (eval echo configure:6419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006419 rm -rf conftest*
6420 echo "$ac_t""yes" 1>&6
6421 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006422#define HAVE_SOCKADDR_SA_LEN 1
6423EOF
6424
6425else
Michael W. Hudson54241132001-12-07 15:38:26 +00006426 echo "configure: failed program was:" >&5
6427 cat conftest.$ac_ext >&5
6428 rm -rf conftest*
6429 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006430fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006431rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006432
Michael W. Hudson54241132001-12-07 15:38:26 +00006433echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006434echo "configure:6435: checking for bad static forward" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006435if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
6436 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006437else
6438 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006439 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006440else
Michael W. Hudson54241132001-12-07 15:38:26 +00006441 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006442#line 6443 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006443#include "confdefs.h"
6444
6445struct s { int a; int b; };
6446static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006447int foobar() {
6448 static int random;
6449 random = (int) &foo;
6450 return random;
6451}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006452static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006453main() {
6454 exit(!((int)&foo == foobar()));
6455}
Michael W. Hudson54241132001-12-07 15:38:26 +00006456EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006457if { (eval echo configure:6458: \"$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 +00006458then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006459 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006460else
Michael W. Hudson54241132001-12-07 15:38:26 +00006461 echo "configure: failed program was:" >&5
6462 cat conftest.$ac_ext >&5
6463 rm -fr conftest*
6464 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006465fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006466rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006467fi
6468
Michael W. Hudson54241132001-12-07 15:38:26 +00006469fi
6470
6471echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006472if test "$ac_cv_bad_static_forward" = yes
6473then
Michael W. Hudson54241132001-12-07 15:38:26 +00006474 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006475#define BAD_STATIC_FORWARD 1
6476EOF
6477
6478fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006479
Guido van Rossumda88dad1995-01-26 00:46:29 +00006480va_list_is_array=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006481echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006482echo "configure:6483: checking whether va_list is an array" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006483cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006484#line 6485 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006485#include "confdefs.h"
6486
6487#ifdef HAVE_STDARG_PROTOTYPES
6488#include <stdarg.h>
6489#else
6490#include <varargs.h>
6491#endif
6492
Michael W. Hudson54241132001-12-07 15:38:26 +00006493int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006494va_list list1, list2; list1 = list2;
Michael W. Hudson54241132001-12-07 15:38:26 +00006495; return 0; }
6496EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006497if { (eval echo configure:6498: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006498 :
6499else
Michael W. Hudson54241132001-12-07 15:38:26 +00006500 echo "configure: failed program was:" >&5
6501 cat conftest.$ac_ext >&5
6502 rm -rf conftest*
6503 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006504#define VA_LIST_IS_ARRAY 1
6505EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006506 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006507fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006508rm -f conftest*
6509echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006510
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006511# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Michael W. Hudson54241132001-12-07 15:38:26 +00006512echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006513echo "configure:6514: checking for gethostbyname_r" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006514if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
6515 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006516else
Michael W. Hudson54241132001-12-07 15:38:26 +00006517 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006518#line 6519 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006519#include "confdefs.h"
6520/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006521 which can conflict with char gethostbyname_r(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006522#include <assert.h>
6523/* Override any gcc2 internal prototype to avoid an error. */
6524/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006525 builtin and then its argument prototype would still apply. */
6526char gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006527
Michael W. Hudson54241132001-12-07 15:38:26 +00006528int main() {
6529
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006530/* The GNU C library defines this for functions which it implements
6531 to always fail with ENOSYS. Some functions are actually named
6532 something starting with __ and the normal name is an alias. */
6533#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6534choke me
6535#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006536gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006537#endif
6538
Michael W. Hudson54241132001-12-07 15:38:26 +00006539; return 0; }
6540EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006541if { (eval echo configure:6542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006542 rm -rf conftest*
6543 eval "ac_cv_func_gethostbyname_r=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006544else
Michael W. Hudson54241132001-12-07 15:38:26 +00006545 echo "configure: failed program was:" >&5
6546 cat conftest.$ac_ext >&5
6547 rm -rf conftest*
6548 eval "ac_cv_func_gethostbyname_r=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006549fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006550rm -f conftest*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006551fi
6552
Michael W. Hudson54241132001-12-07 15:38:26 +00006553if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6554 echo "$ac_t""yes" 1>&6
6555
6556 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006557#define HAVE_GETHOSTBYNAME_R 1
6558EOF
6559
Michael W. Hudson54241132001-12-07 15:38:26 +00006560 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006561echo "configure:6562: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006562 OLD_CFLAGS=$CFLAGS
6563 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006564 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006565#line 6566 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006566#include "confdefs.h"
6567
6568# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006569
6570int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006571
6572 char *name;
6573 struct hostent *he, *res;
6574 char buffer[2048];
6575 int buflen = 2048;
6576 int h_errnop;
6577
6578 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006579
6580; return 0; }
6581EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006582if { (eval echo configure:6583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006583 rm -rf conftest*
6584
6585 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006586#define HAVE_GETHOSTBYNAME_R 1
6587EOF
6588
Michael W. Hudson54241132001-12-07 15:38:26 +00006589 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006590#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6591EOF
6592
Michael W. Hudson54241132001-12-07 15:38:26 +00006593 echo "$ac_t""yes" 1>&6
6594
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006595else
Michael W. Hudson54241132001-12-07 15:38:26 +00006596 echo "configure: failed program was:" >&5
6597 cat conftest.$ac_ext >&5
6598 rm -rf conftest*
6599
6600 echo "$ac_t""no" 1>&6
6601 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006602echo "configure:6603: checking gethostbyname_r with 5 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006603 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006604#line 6605 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006605#include "confdefs.h"
6606
6607# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006608
6609int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006610
6611 char *name;
6612 struct hostent *he;
6613 char buffer[2048];
6614 int buflen = 2048;
6615 int h_errnop;
6616
6617 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006618
6619; return 0; }
6620EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006621if { (eval echo configure:6622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006622 rm -rf conftest*
6623
6624 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006625#define HAVE_GETHOSTBYNAME_R 1
6626EOF
6627
Michael W. Hudson54241132001-12-07 15:38:26 +00006628 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006629#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6630EOF
6631
Michael W. Hudson54241132001-12-07 15:38:26 +00006632 echo "$ac_t""yes" 1>&6
6633
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006634else
Michael W. Hudson54241132001-12-07 15:38:26 +00006635 echo "configure: failed program was:" >&5
6636 cat conftest.$ac_ext >&5
6637 rm -rf conftest*
6638
6639 echo "$ac_t""no" 1>&6
6640 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006641echo "configure:6642: checking gethostbyname_r with 3 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006642 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006643#line 6644 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006644#include "confdefs.h"
6645
6646# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006647
6648int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006649
6650 char *name;
6651 struct hostent *he;
6652 struct hostent_data data;
6653
6654 (void) gethostbyname_r(name, he, &data);
Michael W. Hudson54241132001-12-07 15:38:26 +00006655
6656; return 0; }
6657EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006658if { (eval echo configure:6659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006659 rm -rf conftest*
6660
6661 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006662#define HAVE_GETHOSTBYNAME_R 1
6663EOF
6664
Michael W. Hudson54241132001-12-07 15:38:26 +00006665 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006666#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6667EOF
6668
Michael W. Hudson54241132001-12-07 15:38:26 +00006669 echo "$ac_t""yes" 1>&6
6670
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006671else
Michael W. Hudson54241132001-12-07 15:38:26 +00006672 echo "configure: failed program was:" >&5
6673 cat conftest.$ac_ext >&5
6674 rm -rf conftest*
6675
6676 echo "$ac_t""no" 1>&6
6677
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006678fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006679rm -f conftest*
6680
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006681fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006682rm -f conftest*
6683
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006684fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006685rm -f conftest*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006686 CFLAGS=$OLD_CFLAGS
6687
6688else
Michael W. Hudson54241132001-12-07 15:38:26 +00006689 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006690
Michael W. Hudson54241132001-12-07 15:38:26 +00006691 for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +00006692do
Michael W. Hudson54241132001-12-07 15:38:26 +00006693echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006694echo "configure:6695: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006695if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6696 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006697else
Michael W. Hudson54241132001-12-07 15:38:26 +00006698 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006699#line 6700 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006700#include "confdefs.h"
6701/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006702 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006703#include <assert.h>
6704/* Override any gcc2 internal prototype to avoid an error. */
6705/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006706 builtin and then its argument prototype would still apply. */
6707char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006708
Michael W. Hudson54241132001-12-07 15:38:26 +00006709int main() {
6710
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006711/* The GNU C library defines this for functions which it implements
6712 to always fail with ENOSYS. Some functions are actually named
6713 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006714#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006715choke me
6716#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006717$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006718#endif
6719
Michael W. Hudson54241132001-12-07 15:38:26 +00006720; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006721EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006722if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006723 rm -rf conftest*
6724 eval "ac_cv_func_$ac_func=yes"
6725else
6726 echo "configure: failed program was:" >&5
6727 cat conftest.$ac_ext >&5
6728 rm -rf conftest*
6729 eval "ac_cv_func_$ac_func=no"
6730fi
6731rm -f conftest*
6732fi
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006733
Michael W. Hudson54241132001-12-07 15:38:26 +00006734if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6735 echo "$ac_t""yes" 1>&6
6736 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6737 cat >> confdefs.h <<EOF
6738#define $ac_tr_func 1
6739EOF
6740
6741else
6742 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006743fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006744done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006745
Michael W. Hudson54241132001-12-07 15:38:26 +00006746
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006747fi
6748
Michael W. Hudson54241132001-12-07 15:38:26 +00006749
6750
6751
6752
6753
6754
Guido van Rossum627b2d71993-12-24 10:39:16 +00006755# checks for system services
6756# (none yet)
6757
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006758# Linux requires this for correct f.p. operations
Michael W. Hudson54241132001-12-07 15:38:26 +00006759echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006760echo "configure:6761: checking for __fpu_control" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006761if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
6762 echo $ac_n "(cached) $ac_c" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006763else
Michael W. Hudson54241132001-12-07 15:38:26 +00006764 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006765#line 6766 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006766#include "confdefs.h"
6767/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006768 which can conflict with char __fpu_control(); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006769#include <assert.h>
6770/* Override any gcc2 internal prototype to avoid an error. */
6771/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006772 builtin and then its argument prototype would still apply. */
6773char __fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006774
Michael W. Hudson54241132001-12-07 15:38:26 +00006775int main() {
6776
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006777/* The GNU C library defines this for functions which it implements
6778 to always fail with ENOSYS. Some functions are actually named
6779 something starting with __ and the normal name is an alias. */
6780#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6781choke me
6782#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006783__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006784#endif
6785
Michael W. Hudson54241132001-12-07 15:38:26 +00006786; return 0; }
6787EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006788if { (eval echo configure:6789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006789 rm -rf conftest*
6790 eval "ac_cv_func___fpu_control=yes"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006791else
Michael W. Hudson54241132001-12-07 15:38:26 +00006792 echo "configure: failed program was:" >&5
6793 cat conftest.$ac_ext >&5
6794 rm -rf conftest*
6795 eval "ac_cv_func___fpu_control=no"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006796fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006797rm -f conftest*
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006798fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006799
6800if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6801 echo "$ac_t""yes" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006802 :
6803else
Michael W. Hudson54241132001-12-07 15:38:26 +00006804 echo "$ac_t""no" 1>&6
6805echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006806echo "configure:6807: checking for __fpu_control in -lieee" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006807ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
6808if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6809 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006810else
Michael W. Hudson54241132001-12-07 15:38:26 +00006811 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006812LIBS="-lieee $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006813cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006814#line 6815 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006815#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006816/* Override any gcc2 internal prototype to avoid an error. */
6817/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006818 builtin and then its argument prototype would still apply. */
6819char __fpu_control();
6820
6821int main() {
6822__fpu_control()
6823; return 0; }
6824EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006825if { (eval echo configure:6826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006826 rm -rf conftest*
6827 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006828else
Michael W. Hudson54241132001-12-07 15:38:26 +00006829 echo "configure: failed program was:" >&5
6830 cat conftest.$ac_ext >&5
6831 rm -rf conftest*
6832 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006833fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006834rm -f conftest*
6835LIBS="$ac_save_LIBS"
6836
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006837fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006838if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6839 echo "$ac_t""yes" 1>&6
6840 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6841 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6842 cat >> confdefs.h <<EOF
6843#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006844EOF
6845
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006846 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006847
Michael W. Hudson54241132001-12-07 15:38:26 +00006848else
6849 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006850fi
6851
Michael W. Hudson54241132001-12-07 15:38:26 +00006852
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006853fi
6854
Michael W. Hudson54241132001-12-07 15:38:26 +00006855
Guido van Rossum7f253911997-05-09 02:42:48 +00006856# Check for --with-fpectl
Michael W. Hudson54241132001-12-07 15:38:26 +00006857echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006858echo "configure:6859: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006859# Check whether --with-fpectl or --without-fpectl was given.
6860if test "${with_fpectl+set}" = set; then
6861 withval="$with_fpectl"
Michael W. Hudson54241132001-12-07 15:38:26 +00006862
Guido van Rossum7f253911997-05-09 02:42:48 +00006863if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00006864then cat >> confdefs.h <<\EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00006865#define WANT_SIGFPE_HANDLER 1
6866EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00006867 echo "$ac_t""yes" 1>&6
6868else echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006869fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006870else
Michael W. Hudson54241132001-12-07 15:38:26 +00006871 echo "$ac_t""no" 1>&6
6872fi
6873
Guido van Rossum7f253911997-05-09 02:42:48 +00006874
Guido van Rossum7f43da71994-08-01 12:15:30 +00006875# check for --with-libm=...
6876
Guido van Rossum563e7081996-09-10 18:20:48 +00006877case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006878Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006879BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006880*) LIBM=-lm
6881esac
Michael W. Hudson54241132001-12-07 15:38:26 +00006882echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006883echo "configure:6884: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006884# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006885if test "${with_libm+set}" = set; then
6886 withval="$with_libm"
Michael W. Hudson54241132001-12-07 15:38:26 +00006887
Guido van Rossum7f253911997-05-09 02:42:48 +00006888if test "$withval" = no
6889then LIBM=
Michael W. Hudson54241132001-12-07 15:38:26 +00006890 echo "$ac_t""force LIBM empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006891elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006892then LIBM=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00006893 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
6894else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006895fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006896else
Michael W. Hudson54241132001-12-07 15:38:26 +00006897 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
6898fi
6899
Guido van Rossum7f43da71994-08-01 12:15:30 +00006900
6901# check for --with-libc=...
6902
Michael W. Hudson54241132001-12-07 15:38:26 +00006903echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006904echo "configure:6905: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006905# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006906if test "${with_libc+set}" = set; then
6907 withval="$with_libc"
Michael W. Hudson54241132001-12-07 15:38:26 +00006908
Guido van Rossum7f253911997-05-09 02:42:48 +00006909if test "$withval" = no
6910then LIBC=
Michael W. Hudson54241132001-12-07 15:38:26 +00006911 echo "$ac_t""force LIBC empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006912elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006913then LIBC=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00006914 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
6915else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006916fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006917else
Michael W. Hudson54241132001-12-07 15:38:26 +00006918 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
6919fi
6920
Guido van Rossum7f43da71994-08-01 12:15:30 +00006921
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006922# check for hypot() in math library
6923LIBS_SAVE=$LIBS
6924LIBS="$LIBS $LIBM"
6925for ac_func in hypot
6926do
Michael W. Hudson54241132001-12-07 15:38:26 +00006927echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006928echo "configure:6929: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006929if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6930 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006931else
Michael W. Hudson54241132001-12-07 15:38:26 +00006932 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006933#line 6934 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006934#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006935/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006936 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006937#include <assert.h>
6938/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006939/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006940 builtin and then its argument prototype would still apply. */
6941char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006942
Michael W. Hudson54241132001-12-07 15:38:26 +00006943int main() {
6944
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006945/* The GNU C library defines this for functions which it implements
6946 to always fail with ENOSYS. Some functions are actually named
6947 something starting with __ and the normal name is an alias. */
6948#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6949choke me
6950#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006951$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006952#endif
6953
Michael W. Hudson54241132001-12-07 15:38:26 +00006954; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006955EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006956if { (eval echo configure:6957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006957 rm -rf conftest*
6958 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006959else
Michael W. Hudson54241132001-12-07 15:38:26 +00006960 echo "configure: failed program was:" >&5
6961 cat conftest.$ac_ext >&5
6962 rm -rf conftest*
6963 eval "ac_cv_func_$ac_func=no"
6964fi
6965rm -f conftest*
6966fi
6967
6968if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6969 echo "$ac_t""yes" 1>&6
6970 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6971 cat >> confdefs.h <<EOF
6972#define $ac_tr_func 1
6973EOF
6974
6975else
6976 echo "$ac_t""no" 1>&6
6977LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006978fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006979done
6980
Michael W. Hudson54241132001-12-07 15:38:26 +00006981
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006982LIBS=$LIBS_SAVE
6983
Guido van Rossumad713701997-07-10 22:42:38 +00006984# check whether malloc(0) returns NULL or not
Michael W. Hudson54241132001-12-07 15:38:26 +00006985echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006986echo "configure:6987: checking what malloc(0) returns" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006987if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
6988 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00006989else
6990 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006991 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +00006992else
Michael W. Hudson54241132001-12-07 15:38:26 +00006993 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00006994#line 6995 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006995#include "confdefs.h"
6996#include <stdio.h>
6997#ifdef HAVE_STDLIB
6998#include <stdlib.h>
6999#else
7000char *malloc(), *realloc();
7001int *free();
7002#endif
7003main() {
7004 char *p;
7005 p = malloc(0);
7006 if (p == NULL) exit(1);
7007 p = realloc(p, 0);
7008 if (p == NULL) exit(1);
7009 free(p);
7010 exit(0);
7011}
Michael W. Hudson54241132001-12-07 15:38:26 +00007012EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007013if { (eval echo configure:7014: \"$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 +00007014then
Guido van Rossumad713701997-07-10 22:42:38 +00007015 ac_cv_malloc_zero=nonnull
7016else
Michael W. Hudson54241132001-12-07 15:38:26 +00007017 echo "configure: failed program was:" >&5
7018 cat conftest.$ac_ext >&5
7019 rm -fr conftest*
7020 ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +00007021fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007022rm -fr conftest*
Guido van Rossumad713701997-07-10 22:42:38 +00007023fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007024
Guido van Rossumad713701997-07-10 22:42:38 +00007025fi
Guido van Rossum3065c942001-09-17 04:03:14 +00007026 # XXX arm cross-compile?
Michael W. Hudson54241132001-12-07 15:38:26 +00007027echo "$ac_t""$ac_cv_malloc_zero" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00007028if test "$ac_cv_malloc_zero" = null
7029then
Michael W. Hudson54241132001-12-07 15:38:26 +00007030 cat >> confdefs.h <<\EOF
Guido van Rossumad713701997-07-10 22:42:38 +00007031#define MALLOC_ZERO_RETURNS_NULL 1
7032EOF
7033
7034fi
7035
Guido van Rossumef2255b2000-03-10 22:30:29 +00007036# check for wchar.h
Michael W. Hudson54241132001-12-07 15:38:26 +00007037ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
7038echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007039echo "configure:7040: checking for wchar.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007040if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7041 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00007042else
Michael W. Hudson54241132001-12-07 15:38:26 +00007043 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007044#line 7045 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007045#include "confdefs.h"
7046#include <wchar.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007047EOF
7048ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007049{ (eval echo configure:7050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007050ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7051if test -z "$ac_err"; then
7052 rm -rf conftest*
7053 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007054else
Michael W. Hudson54241132001-12-07 15:38:26 +00007055 echo "$ac_err" >&5
7056 echo "configure: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007057 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007058 rm -rf conftest*
7059 eval "ac_cv_header_$ac_safe=no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007060fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007061rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007062fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007063if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7064 echo "$ac_t""yes" 1>&6
7065 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007066#define HAVE_WCHAR_H 1
7067EOF
7068 wchar_h="yes"
7069else
Michael W. Hudson54241132001-12-07 15:38:26 +00007070 echo "$ac_t""no" 1>&6
7071wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007072
7073fi
7074
Michael W. Hudson54241132001-12-07 15:38:26 +00007075
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007076# determine wchar_t size
7077if test "$wchar_h" = yes
7078then
Michael W. Hudson54241132001-12-07 15:38:26 +00007079 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007080echo "configure:7081: checking size of wchar_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007081if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
7082 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007083else
7084 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007085 ac_cv_sizeof_wchar_t=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00007086else
Michael W. Hudson54241132001-12-07 15:38:26 +00007087 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007088#line 7089 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007089#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007090#include <stdio.h>
7091main()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007092{
Michael W. Hudson54241132001-12-07 15:38:26 +00007093 FILE *f=fopen("conftestval", "w");
7094 if (!f) exit(1);
7095 fprintf(f, "%d\n", sizeof(wchar_t));
7096 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00007097}
Michael W. Hudson54241132001-12-07 15:38:26 +00007098EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007099if { (eval echo configure:7100: \"$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 +00007100then
7101 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007102else
Michael W. Hudson54241132001-12-07 15:38:26 +00007103 echo "configure: failed program was:" >&5
7104 cat conftest.$ac_ext >&5
7105 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007106 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00007107fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007108rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007109fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007110
7111fi
7112echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
7113cat >> confdefs.h <<EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007114#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
7115EOF
7116
Michael W. Hudson54241132001-12-07 15:38:26 +00007117
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007118fi
7119
Michael W. Hudson54241132001-12-07 15:38:26 +00007120echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007121echo "configure:7122: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007122# Check whether --enable-unicode or --disable-unicode was given.
7123if test "${enable_unicode+set}" = set; then
7124 enableval="$enable_unicode"
Michael W. Hudson54241132001-12-07 15:38:26 +00007125 :
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007126else
7127 enable_unicode=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00007128fi
7129
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007130
7131if test $enable_unicode = yes
7132then
Martin v. Löwisfd917792001-06-27 20:22:04 +00007133 # Without any arguments, Py_UNICODE defaults to two-byte mode
7134 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007135fi
7136
7137case "$enable_unicode" in
7138ucs2) unicode_size="2"
Michael W. Hudson54241132001-12-07 15:38:26 +00007139 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007140#define Py_UNICODE_SIZE 2
7141EOF
7142
7143 ;;
7144ucs4) unicode_size="4"
Michael W. Hudson54241132001-12-07 15:38:26 +00007145 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007146#define Py_UNICODE_SIZE 4
7147EOF
7148
7149 ;;
7150esac
7151
Michael W. Hudson54241132001-12-07 15:38:26 +00007152
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007153if test "$enable_unicode" = "no"
7154then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007155 UNICODE_OBJS=""
Michael W. Hudson54241132001-12-07 15:38:26 +00007156 echo "$ac_t""not used" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007157else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007158 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Michael W. Hudson54241132001-12-07 15:38:26 +00007159 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007160#define Py_USING_UNICODE 1
7161EOF
7162
7163 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
7164 then
7165 PY_UNICODE_TYPE="wchar_t"
Michael W. Hudson54241132001-12-07 15:38:26 +00007166 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007167#define HAVE_USABLE_WCHAR_T 1
7168EOF
7169
Michael W. Hudson54241132001-12-07 15:38:26 +00007170 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007171#define PY_UNICODE_TYPE wchar_t
7172EOF
7173
7174 elif test "$ac_cv_sizeof_short" = "$unicode_size"
7175 then
7176 PY_UNICODE_TYPE="unsigned short"
Michael W. Hudson54241132001-12-07 15:38:26 +00007177 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007178#define PY_UNICODE_TYPE unsigned short
7179EOF
7180
7181 elif test "$ac_cv_sizeof_long" = "$unicode_size"
7182 then
7183 PY_UNICODE_TYPE="unsigned long"
Michael W. Hudson54241132001-12-07 15:38:26 +00007184 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007185#define PY_UNICODE_TYPE unsigned long
7186EOF
7187
7188 else
7189 PY_UNICODE_TYPE="no type found"
7190 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007191 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007192fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007193
7194# check for endianness
Michael W. Hudson54241132001-12-07 15:38:26 +00007195echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007196echo "configure:7197: checking whether byte ordering is bigendian" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007197if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
7198 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00007199else
7200 ac_cv_c_bigendian=unknown
7201# See if sys/param.h defines the BYTE_ORDER macro.
Michael W. Hudson54241132001-12-07 15:38:26 +00007202cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007203#line 7204 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007204#include "confdefs.h"
7205#include <sys/types.h>
7206#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007207int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007208
7209#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
7210 bogus endian macros
7211#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007212; return 0; }
7213EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007214if { (eval echo configure:7215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007215 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007216 # It does; now see whether it defined to BIG_ENDIAN or not.
Michael W. Hudson54241132001-12-07 15:38:26 +00007217cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007218#line 7219 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007219#include "confdefs.h"
7220#include <sys/types.h>
7221#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007222int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007223
7224#if BYTE_ORDER != BIG_ENDIAN
7225 not big endian
7226#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007227; return 0; }
7228EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007229if { (eval echo configure:7230: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007230 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007231 ac_cv_c_bigendian=yes
7232else
Michael W. Hudson54241132001-12-07 15:38:26 +00007233 echo "configure: failed program was:" >&5
7234 cat conftest.$ac_ext >&5
7235 rm -rf conftest*
7236 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +00007237fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007238rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007239else
Michael W. Hudson54241132001-12-07 15:38:26 +00007240 echo "configure: failed program was:" >&5
7241 cat conftest.$ac_ext >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007242fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007243rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007244if test $ac_cv_c_bigendian = unknown; then
7245if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007246 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007247else
Michael W. Hudson54241132001-12-07 15:38:26 +00007248 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007249#line 7250 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007250#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007251main () {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007252 /* Are we little or big endian? From Harbison&Steele. */
7253 union
7254 {
7255 long l;
7256 char c[sizeof (long)];
7257 } u;
7258 u.l = 1;
7259 exit (u.c[sizeof (long) - 1] == 1);
7260}
Michael W. Hudson54241132001-12-07 15:38:26 +00007261EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007262if { (eval echo configure:7263: \"$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 +00007263then
Guido van Rossumef2255b2000-03-10 22:30:29 +00007264 ac_cv_c_bigendian=no
7265else
Michael W. Hudson54241132001-12-07 15:38:26 +00007266 echo "configure: failed program was:" >&5
7267 cat conftest.$ac_ext >&5
7268 rm -fr conftest*
7269 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +00007270fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007271rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007272fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007273
Michael W. Hudson54241132001-12-07 15:38:26 +00007274fi
7275fi
7276
7277echo "$ac_t""$ac_cv_c_bigendian" 1>&6
7278if test $ac_cv_c_bigendian = yes; then
7279 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007280#define WORDS_BIGENDIAN 1
7281EOF
7282
7283fi
7284
Michael W. Hudson54241132001-12-07 15:38:26 +00007285
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007286# Check whether right shifting a negative integer extends the sign bit
7287# or fills with zeros (like the Cray J90, according to Tim Peters).
Michael W. Hudson54241132001-12-07 15:38:26 +00007288echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007289echo "configure:7290: checking whether right shift extends the sign bit" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007290if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
7291 echo $ac_n "(cached) $ac_c" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007292else
Michael W. Hudson54241132001-12-07 15:38:26 +00007293
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007294if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007295 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007296else
Michael W. Hudson54241132001-12-07 15:38:26 +00007297 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007298#line 7299 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007299#include "confdefs.h"
7300
7301int main()
7302{
Vladimir Marangozova6180282000-07-12 05:05:06 +00007303 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007304}
7305
Michael W. Hudson54241132001-12-07 15:38:26 +00007306EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007307if { (eval echo configure:7308: \"$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 +00007308then
Vladimir Marangozova6180282000-07-12 05:05:06 +00007309 ac_cv_rshift_extends_sign=yes
7310else
Michael W. Hudson54241132001-12-07 15:38:26 +00007311 echo "configure: failed program was:" >&5
7312 cat conftest.$ac_ext >&5
7313 rm -fr conftest*
7314 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +00007315fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007316rm -fr conftest*
Vladimir Marangozova6180282000-07-12 05:05:06 +00007317fi
7318
Michael W. Hudson54241132001-12-07 15:38:26 +00007319fi
7320
7321echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007322if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007323then
Michael W. Hudson54241132001-12-07 15:38:26 +00007324 cat >> confdefs.h <<\EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007325#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
7326EOF
7327
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007328fi
7329
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007330# check for getc_unlocked and related locking functions
Michael W. Hudson54241132001-12-07 15:38:26 +00007331echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007332echo "configure:7333: checking for getc_unlocked() and friends" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007333if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
7334 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007335else
Michael W. Hudson54241132001-12-07 15:38:26 +00007336
7337cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007338#line 7339 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007339#include "confdefs.h"
7340#include <stdio.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007341int main() {
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007342
7343 FILE *f = fopen("/dev/null", "r");
7344 flockfile(f);
7345 getc_unlocked(f);
7346 funlockfile(f);
7347
Michael W. Hudson54241132001-12-07 15:38:26 +00007348; return 0; }
7349EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007350if { (eval echo configure:7351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007351 rm -rf conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007352 ac_cv_have_getc_unlocked=yes
7353else
Michael W. Hudson54241132001-12-07 15:38:26 +00007354 echo "configure: failed program was:" >&5
7355 cat conftest.$ac_ext >&5
7356 rm -rf conftest*
7357 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007358fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007359rm -f conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007360fi
7361
Michael W. Hudson54241132001-12-07 15:38:26 +00007362echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007363if test "$ac_cv_have_getc_unlocked" = yes
7364then
Michael W. Hudson54241132001-12-07 15:38:26 +00007365 cat >> confdefs.h <<\EOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007366#define HAVE_GETC_UNLOCKED 1
7367EOF
7368
7369fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007370
Martin v. Löwis0daad592001-09-30 21:09:59 +00007371# check for readline 4.0
Michael W. Hudson54241132001-12-07 15:38:26 +00007372echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007373echo "configure:7374: checking for rl_pre_input_hook in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007374ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'`
7375if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7376 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007377else
Michael W. Hudson54241132001-12-07 15:38:26 +00007378 ac_save_LIBS="$LIBS"
Guido van Rossum353ae582001-07-10 16:45:32 +00007379LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007380cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007381#line 7382 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00007382#include "confdefs.h"
7383/* Override any gcc2 internal prototype to avoid an error. */
7384/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007385 builtin and then its argument prototype would still apply. */
7386char rl_pre_input_hook();
7387
7388int main() {
7389rl_pre_input_hook()
7390; return 0; }
7391EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007392if { (eval echo configure:7393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007393 rm -rf conftest*
7394 eval "ac_cv_lib_$ac_lib_var=yes"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007395else
Michael W. Hudson54241132001-12-07 15:38:26 +00007396 echo "configure: failed program was:" >&5
7397 cat conftest.$ac_ext >&5
7398 rm -rf conftest*
7399 eval "ac_cv_lib_$ac_lib_var=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007400fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007401rm -f conftest*
7402LIBS="$ac_save_LIBS"
7403
Martin v. Löwis0daad592001-09-30 21:09:59 +00007404fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007405if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7406 echo "$ac_t""yes" 1>&6
7407 cat >> confdefs.h <<\EOF
Martin v. Löwis0daad592001-09-30 21:09:59 +00007408#define HAVE_RL_PRE_INPUT_HOOK 1
7409EOF
7410
Michael W. Hudson54241132001-12-07 15:38:26 +00007411else
7412 echo "$ac_t""no" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007413fi
7414
Michael W. Hudson54241132001-12-07 15:38:26 +00007415
Martin v. Löwis0daad592001-09-30 21:09:59 +00007416# check for readline 4.2
Michael W. Hudson54241132001-12-07 15:38:26 +00007417echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007418echo "configure:7419: checking for rl_completion_matches in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007419ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
7420if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7421 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007422else
Michael W. Hudson54241132001-12-07 15:38:26 +00007423 ac_save_LIBS="$LIBS"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007424LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007425cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007426#line 7427 "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007427#include "confdefs.h"
7428/* Override any gcc2 internal prototype to avoid an error. */
7429/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007430 builtin and then its argument prototype would still apply. */
7431char rl_completion_matches();
7432
7433int main() {
7434rl_completion_matches()
7435; return 0; }
7436EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007437if { (eval echo configure:7438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007438 rm -rf conftest*
7439 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum353ae582001-07-10 16:45:32 +00007440else
Michael W. Hudson54241132001-12-07 15:38:26 +00007441 echo "configure: failed program was:" >&5
7442 cat conftest.$ac_ext >&5
7443 rm -rf conftest*
7444 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum353ae582001-07-10 16:45:32 +00007445fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007446rm -f conftest*
7447LIBS="$ac_save_LIBS"
7448
Guido van Rossum353ae582001-07-10 16:45:32 +00007449fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007450if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7451 echo "$ac_t""yes" 1>&6
7452 cat >> confdefs.h <<\EOF
Guido van Rossum353ae582001-07-10 16:45:32 +00007453#define HAVE_RL_COMPLETION_MATCHES 1
7454EOF
7455
Michael W. Hudson54241132001-12-07 15:38:26 +00007456else
7457 echo "$ac_t""no" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007458fi
7459
Jack Jansendd19cf82001-12-06 22:36:17 +00007460
Michael W. Hudson54241132001-12-07 15:38:26 +00007461echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007462echo "configure:7463: checking for broken nice()" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007463if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
7464 echo $ac_n "(cached) $ac_c" 1>&6
7465else
7466
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007467if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007468 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007469else
Michael W. Hudson54241132001-12-07 15:38:26 +00007470 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007471#line 7472 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007472#include "confdefs.h"
7473
7474int main()
7475{
7476 int val1 = nice(1);
7477 if (val1 != -1 && val1 == nice(2))
7478 exit(0);
7479 exit(1);
7480}
7481
Michael W. Hudson54241132001-12-07 15:38:26 +00007482EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007483if { (eval echo configure:7484: \"$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 +00007484then
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007485 ac_cv_broken_nice=yes
7486else
Michael W. Hudson54241132001-12-07 15:38:26 +00007487 echo "configure: failed program was:" >&5
7488 cat conftest.$ac_ext >&5
7489 rm -fr conftest*
7490 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007491fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007492rm -fr conftest*
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007493fi
7494
Michael W. Hudson54241132001-12-07 15:38:26 +00007495fi
7496
7497echo "$ac_t""$ac_cv_broken_nice" 1>&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007498if test "$ac_cv_broken_nice" = yes
7499then
Michael W. Hudson54241132001-12-07 15:38:26 +00007500 cat >> confdefs.h <<\EOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007501#define HAVE_BROKEN_NICE 1
7502EOF
7503
7504fi
7505
Jack Jansen666b1e72001-10-31 12:11:48 +00007506# On HP/UX 11.0, mvwdelch is a block with a return statement
Michael W. Hudson54241132001-12-07 15:38:26 +00007507echo $ac_n "checking whether mvwdelch is an expression""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007508echo "configure:7509: checking whether mvwdelch is an expression" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007509if eval "test \"`echo '$''{'ac_cv_mvwdelch_is_expression'+set}'`\" = set"; then
7510 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007511else
Michael W. Hudson54241132001-12-07 15:38:26 +00007512 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007513#line 7514 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007514#include "confdefs.h"
7515#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007516int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007517
7518 int rtn;
7519 rtn = mvwdelch(0,0,0);
7520
Michael W. Hudson54241132001-12-07 15:38:26 +00007521; return 0; }
7522EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007523if { (eval echo configure:7524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007524 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007525 ac_cv_mvwdelch_is_expression=yes
7526else
Michael W. Hudson54241132001-12-07 15:38:26 +00007527 echo "configure: failed program was:" >&5
7528 cat conftest.$ac_ext >&5
7529 rm -rf conftest*
7530 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007531fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007532rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007533fi
7534
Michael W. Hudson54241132001-12-07 15:38:26 +00007535echo "$ac_t""$ac_cv_mvwdelch_is_expression" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007536
7537if test "$ac_cv_mvwdelch_is_expression" = yes
7538then
Michael W. Hudson54241132001-12-07 15:38:26 +00007539 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007540#define MVWDELCH_IS_EXPRESSION 1
7541EOF
7542
7543fi
7544
Michael W. Hudson54241132001-12-07 15:38:26 +00007545echo $ac_n "checking whether WINDOW has _flags""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007546echo "configure:7547: checking whether WINDOW has _flags" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007547if eval "test \"`echo '$''{'ac_cv_window_has_flags'+set}'`\" = set"; then
7548 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007549else
Michael W. Hudson54241132001-12-07 15:38:26 +00007550 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007551#line 7552 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007552#include "confdefs.h"
7553#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007554int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007555
7556 WINDOW *w;
7557 w->_flags = 0;
7558
Michael W. Hudson54241132001-12-07 15:38:26 +00007559; return 0; }
7560EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007561if { (eval echo configure:7562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007562 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007563 ac_cv_window_has_flags=yes
7564else
Michael W. Hudson54241132001-12-07 15:38:26 +00007565 echo "configure: failed program was:" >&5
7566 cat conftest.$ac_ext >&5
7567 rm -rf conftest*
7568 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007569fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007570rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007571fi
7572
Michael W. Hudson54241132001-12-07 15:38:26 +00007573echo "$ac_t""$ac_cv_window_has_flags" 1>&6
7574
Jack Jansen666b1e72001-10-31 12:11:48 +00007575
7576if test "$ac_cv_window_has_flags" = yes
7577then
Michael W. Hudson54241132001-12-07 15:38:26 +00007578 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007579#define WINDOW_HAS_FLAGS 1
7580EOF
7581
7582fi
7583
Guido van Rossum95713eb2000-05-18 20:53:31 +00007584# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7585# Add sys/socket.h to confdefs.h
7586cat >> confdefs.h <<\EOF
7587#ifdef HAVE_SYS_SOCKET_H
7588#include <sys/socket.h>
7589#endif
7590EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007591echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007592echo "configure:7593: checking for socklen_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007593if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
7594 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum95713eb2000-05-18 20:53:31 +00007595else
Michael W. Hudson54241132001-12-07 15:38:26 +00007596 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007597#line 7598 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007598#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007599#include <sys/types.h>
7600#if STDC_HEADERS
7601#include <stdlib.h>
7602#include <stddef.h>
7603#endif
7604EOF
7605if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7606 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7607 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007608 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007609else
Michael W. Hudson54241132001-12-07 15:38:26 +00007610 rm -rf conftest*
7611 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007612fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007613rm -f conftest*
Guido van Rossum95713eb2000-05-18 20:53:31 +00007614
Michael W. Hudson54241132001-12-07 15:38:26 +00007615fi
7616echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7617if test $ac_cv_type_socklen_t = no; then
7618 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007619#define socklen_t int
7620EOF
7621
7622fi
7623
Michael W. Hudson54241132001-12-07 15:38:26 +00007624
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007625# Add Python/ prefix to LIBOBJS
7626libobjs=$LIBOBJS
7627LIBOBJS=
7628for obj in $libobjs; do
7629 LIBOBJS="$LIBOBJS Python/$obj"
7630done
7631
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007632#AC_MSG_CHECKING(for Modules/Setup)
7633#if test ! -f Modules/Setup ; then
7634# if test ! -d Modules ; then
7635# mkdir Modules
7636# fi
7637# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7638# AC_MSG_RESULT(creating)
7639#else
7640# AC_MSG_RESULT(already exists)
7641#fi
7642
Michael W. Hudson54241132001-12-07 15:38:26 +00007643
7644
Martin v. Löwis06f15bb2001-12-02 13:02:32 +00007645for h in `(cd $srcdir;echo Python/thread_*.h)`
7646do
7647 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
7648done
7649
Michael W. Hudson54241132001-12-07 15:38:26 +00007650
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007651SRCDIRS="Parser Grammar Objects Python Modules"
Michael W. Hudson54241132001-12-07 15:38:26 +00007652echo $ac_n "checking for build directories""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00007653echo "configure:7654: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007654for dir in $SRCDIRS; do
7655 if test ! -d $dir; then
7656 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007657 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007658done
Michael W. Hudson54241132001-12-07 15:38:26 +00007659echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007660
Guido van Rossum627b2d71993-12-24 10:39:16 +00007661# generate output files
Michael W. Hudson54241132001-12-07 15:38:26 +00007662trap '' 1 2 15
7663cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007664# This file is a shell script that caches the results of configure
7665# tests run on this system so they can be shared between configure
Michael W. Hudson54241132001-12-07 15:38:26 +00007666# scripts and configure runs. It is not useful on other systems.
7667# If it contains results you don't want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007668#
Michael W. Hudson54241132001-12-07 15:38:26 +00007669# By default, configure uses ./config.cache as the cache file,
7670# creating it if it does not exist already. You can give configure
7671# the --cache-file=FILE option to use a different cache file; that is
7672# what configure does when it calls configure scripts in
7673# subdirectories, so they share the cache.
7674# Giving --cache-file=/dev/null disables caching, for debugging configure.
7675# config.status only pays attention to the cache file if you give it the
7676# --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007677#
Michael W. Hudson54241132001-12-07 15:38:26 +00007678EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007679# The following way of writing the cache mishandles newlines in values,
7680# but we know of no workaround that is simple, portable, and efficient.
7681# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007682# Ultrix sh set writes to stderr and can't be redirected directly,
7683# and sets the high bit in the cache file unless we assign to the vars.
Michael W. Hudson54241132001-12-07 15:38:26 +00007684(set) 2>&1 |
7685 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7686 *ac_space=\ *)
7687 # `set' does not quote correctly, so add quotes (double-quote substitution
7688 # turns \\\\ into \\, and sed turns \\ into \).
7689 sed -n \
7690 -e "s/'/'\\\\''/g" \
7691 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7692 ;;
7693 *)
7694 # `set' quotes correctly as required by POSIX, so do not add quotes.
7695 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7696 ;;
7697 esac >> confcache
7698if cmp -s $cache_file confcache; then
7699 :
7700else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007701 if test -w $cache_file; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007702 echo "updating cache $cache_file"
7703 cat confcache > $cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007704 else
7705 echo "not updating unwritable cache $cache_file"
7706 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007707fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007708rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007709
Michael W. Hudson54241132001-12-07 15:38:26 +00007710trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7711
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007712test "x$prefix" = xNONE && prefix=$ac_default_prefix
7713# Let make expand exec_prefix.
7714test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007715
Michael W. Hudson54241132001-12-07 15:38:26 +00007716# Any assignment to VPATH causes Sun make to only execute
7717# the first set of double-colon rules, so remove it if not needed.
7718# If there is a colon in the path, we need to keep it.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007719if test "x$srcdir" = x.; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007720 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007721fi
7722
Michael W. Hudson54241132001-12-07 15:38:26 +00007723trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7724
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007725DEFS=-DHAVE_CONFIG_H
7726
Michael W. Hudson54241132001-12-07 15:38:26 +00007727# Without the "./", some shells look in PATH for config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007728: ${CONFIG_STATUS=./config.status}
Michael W. Hudson54241132001-12-07 15:38:26 +00007729
7730echo creating $CONFIG_STATUS
7731rm -f $CONFIG_STATUS
7732cat > $CONFIG_STATUS <<EOF
7733#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007734# Generated automatically by configure.
7735# Run this file to recreate the current configuration.
Michael W. Hudson54241132001-12-07 15:38:26 +00007736# This directory was configured as follows,
7737# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7738#
7739# $0 $ac_configure_args
7740#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007741# Compiler output produced by configure, useful for debugging
Michael W. Hudson54241132001-12-07 15:38:26 +00007742# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007743
Michael W. Hudson54241132001-12-07 15:38:26 +00007744ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7745for ac_option
Jack Jansendd19cf82001-12-06 22:36:17 +00007746do
Michael W. Hudson54241132001-12-07 15:38:26 +00007747 case "\$ac_option" in
Jack Jansendd19cf82001-12-06 22:36:17 +00007748 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Michael W. Hudson54241132001-12-07 15:38:26 +00007749 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7750 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7751 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7752 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7753 exit 0 ;;
7754 -help | --help | --hel | --he | --h)
7755 echo "\$ac_cs_usage"; exit 0 ;;
7756 *) echo "\$ac_cs_usage"; exit 1 ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007757 esac
7758done
7759
Michael W. Hudson54241132001-12-07 15:38:26 +00007760ac_given_srcdir=$srcdir
7761ac_given_INSTALL="$INSTALL"
Jack Jansendd19cf82001-12-06 22:36:17 +00007762
Michael W. Hudson54241132001-12-07 15:38:26 +00007763trap '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 +00007764EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007765cat >> $CONFIG_STATUS <<EOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007766
Michael W. Hudson54241132001-12-07 15:38:26 +00007767# Protect against being on the right side of a sed subst in config.status.
7768sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7769 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7770$ac_vpsub
7771$extrasub
7772s%@SHELL@%$SHELL%g
7773s%@CFLAGS@%$CFLAGS%g
7774s%@CPPFLAGS@%$CPPFLAGS%g
7775s%@CXXFLAGS@%$CXXFLAGS%g
7776s%@FFLAGS@%$FFLAGS%g
7777s%@DEFS@%$DEFS%g
7778s%@LDFLAGS@%$LDFLAGS%g
7779s%@LIBS@%$LIBS%g
7780s%@exec_prefix@%$exec_prefix%g
7781s%@prefix@%$prefix%g
7782s%@program_transform_name@%$program_transform_name%g
7783s%@bindir@%$bindir%g
7784s%@sbindir@%$sbindir%g
7785s%@libexecdir@%$libexecdir%g
7786s%@datadir@%$datadir%g
7787s%@sysconfdir@%$sysconfdir%g
7788s%@sharedstatedir@%$sharedstatedir%g
7789s%@localstatedir@%$localstatedir%g
7790s%@libdir@%$libdir%g
7791s%@includedir@%$includedir%g
7792s%@oldincludedir@%$oldincludedir%g
7793s%@infodir@%$infodir%g
7794s%@mandir@%$mandir%g
7795s%@VERSION@%$VERSION%g
7796s%@CONFIG_ARGS@%$CONFIG_ARGS%g
7797s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7798s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7799s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7800s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
7801s%@MACHDEP@%$MACHDEP%g
7802s%@SGI_ABI@%$SGI_ABI%g
7803s%@CXX@%$CXX%g
7804s%@MAINOBJ@%$MAINOBJ%g
7805s%@CC@%$CC%g
7806s%@CPP@%$CPP%g
7807s%@EXEEXT@%$EXEEXT%g
7808s%@BUILDEXEEXT@%$BUILDEXEEXT%g
7809s%@LIBRARY@%$LIBRARY%g
7810s%@LDLIBRARY@%$LDLIBRARY%g
7811s%@DLLLIBRARY@%$DLLLIBRARY%g
7812s%@BLDLIBRARY@%$BLDLIBRARY%g
7813s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
7814s%@LINKCC@%$LINKCC%g
7815s%@RANLIB@%$RANLIB%g
7816s%@AR@%$AR%g
7817s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7818s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7819s%@INSTALL_DATA@%$INSTALL_DATA%g
7820s%@LN@%$LN%g
7821s%@OPT@%$OPT%g
7822s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
7823s%@SO@%$SO%g
7824s%@LDSHARED@%$LDSHARED%g
7825s%@BLDSHARED@%$BLDSHARED%g
7826s%@CCSHARED@%$CCSHARED%g
7827s%@LINKFORSHARED@%$LINKFORSHARED%g
7828s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
7829s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7830s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
7831s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
7832s%@LDLAST@%$LDLAST%g
7833s%@DLINCLDIR@%$DLINCLDIR%g
7834s%@DYNLOADFILE@%$DYNLOADFILE%g
7835s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
7836s%@LIBOBJS@%$LIBOBJS%g
7837s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7838s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7839s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
7840s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
7841s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
7842s%@LIBM@%$LIBM%g
7843s%@LIBC@%$LIBC%g
7844s%@UNICODE_OBJS@%$UNICODE_OBJS%g
7845s%@THREADHEADERS@%$THREADHEADERS%g
7846s%@SRCDIRS@%$SRCDIRS%g
Jack Jansendd19cf82001-12-06 22:36:17 +00007847
Jack Jansendd19cf82001-12-06 22:36:17 +00007848CEOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007849EOF
7850
Michael W. Hudson54241132001-12-07 15:38:26 +00007851cat >> $CONFIG_STATUS <<\EOF
7852
7853# Split the substitutions into bite-sized pieces for seds with
7854# small command number limits, like on Digital OSF/1 and HP-UX.
7855ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7856ac_file=1 # Number of current file.
7857ac_beg=1 # First line for current file.
7858ac_end=$ac_max_sed_cmds # Line after last line for current file.
7859ac_more_lines=:
7860ac_sed_cmds=""
7861while $ac_more_lines; do
7862 if test $ac_beg -gt 1; then
7863 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7864 else
7865 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00007866 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007867 if test ! -s conftest.s$ac_file; then
7868 ac_more_lines=false
7869 rm -f conftest.s$ac_file
7870 else
7871 if test -z "$ac_sed_cmds"; then
7872 ac_sed_cmds="sed -f conftest.s$ac_file"
7873 else
7874 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7875 fi
7876 ac_file=`expr $ac_file + 1`
7877 ac_beg=$ac_end
7878 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7879 fi
7880done
7881if test -z "$ac_sed_cmds"; then
7882 ac_sed_cmds=cat
7883fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007884EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007885
7886cat >> $CONFIG_STATUS <<EOF
7887
7888CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
7889EOF
7890cat >> $CONFIG_STATUS <<\EOF
7891for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Jack Jansendd19cf82001-12-06 22:36:17 +00007892 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00007893 case "$ac_file" in
7894 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7895 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7896 *) ac_file_in="${ac_file}.in" ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007897 esac
7898
Michael W. Hudson54241132001-12-07 15:38:26 +00007899 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7900
7901 # Remove last slash and all that follows it. Not all systems have dirname.
7902 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007903 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007904 # The file is in a subdirectory.
7905 test ! -d "$ac_dir" && mkdir "$ac_dir"
7906 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007907 # A "../" for each directory in $ac_dir_suffix.
Michael W. Hudson54241132001-12-07 15:38:26 +00007908 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007909 else
7910 ac_dir_suffix= ac_dots=
7911 fi
7912
Michael W. Hudson54241132001-12-07 15:38:26 +00007913 case "$ac_given_srcdir" in
7914 .) srcdir=.
7915 if test -z "$ac_dots"; then top_srcdir=.
7916 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7917 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007918 *) # Relative path.
Michael W. Hudson54241132001-12-07 15:38:26 +00007919 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7920 top_srcdir="$ac_dots$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007921 esac
7922
Michael W. Hudson54241132001-12-07 15:38:26 +00007923 case "$ac_given_INSTALL" in
7924 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7925 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007926 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007927
Michael W. Hudson54241132001-12-07 15:38:26 +00007928 echo creating "$ac_file"
7929 rm -f "$ac_file"
7930 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7931 case "$ac_file" in
7932 *Makefile*) ac_comsub="1i\\
7933# $configure_input" ;;
7934 *) ac_comsub= ;;
7935 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007936
Michael W. Hudson54241132001-12-07 15:38:26 +00007937 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7938 sed -e "$ac_comsub
7939s%@configure_input@%$configure_input%g
7940s%@srcdir@%$srcdir%g
7941s%@top_srcdir@%$top_srcdir%g
7942s%@INSTALL@%$INSTALL%g
7943" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7944fi; done
7945rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007946
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007947# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7948# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007949#
7950# ac_d sets the value in "#define NAME VALUE" lines.
Michael W. Hudson54241132001-12-07 15:38:26 +00007951ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7952ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7953ac_dC='\3'
7954ac_dD='%g'
7955# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7956ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7957ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007958ac_uC=' '
Michael W. Hudson54241132001-12-07 15:38:26 +00007959ac_uD='\4%g'
7960# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7961ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7962ac_eB='$%\1#\2define\3'
7963ac_eC=' '
7964ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007965
Michael W. Hudson54241132001-12-07 15:38:26 +00007966if test "${CONFIG_HEADERS+set}" != set; then
7967EOF
7968cat >> $CONFIG_STATUS <<EOF
7969 CONFIG_HEADERS="pyconfig.h"
7970EOF
7971cat >> $CONFIG_STATUS <<\EOF
7972fi
7973for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007974 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00007975 case "$ac_file" in
7976 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7977 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7978 *) ac_file_in="${ac_file}.in" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007979 esac
7980
Michael W. Hudson54241132001-12-07 15:38:26 +00007981 echo creating $ac_file
Guido van Rossum7f43da71994-08-01 12:15:30 +00007982
Michael W. Hudson54241132001-12-07 15:38:26 +00007983 rm -f conftest.frag conftest.in conftest.out
7984 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7985 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007986
7987EOF
7988
Michael W. Hudson54241132001-12-07 15:38:26 +00007989# Transform confdefs.h into a sed script conftest.vals that substitutes
7990# the proper values into config.h.in to produce config.h. And first:
7991# Protect against being on the right side of a sed subst in config.status.
7992# Protect against being in an unquoted here document in config.status.
7993rm -f conftest.vals
7994cat > conftest.hdr <<\EOF
7995s/[\\&%]/\\&/g
7996s%[\\$`]%\\&%g
7997s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7998s%ac_d%ac_u%gp
7999s%ac_u%ac_e%gp
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008000EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008001sed -n -f conftest.hdr confdefs.h > conftest.vals
8002rm -f conftest.hdr
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008003
8004# This sed command replaces #undef with comments. This is necessary, for
8005# example, in the case of _POSIX_SOURCE, which is predefined and required
8006# on some systems where configure will not decide to define it.
Michael W. Hudson54241132001-12-07 15:38:26 +00008007cat >> conftest.vals <<\EOF
8008s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008009EOF
8010
Michael W. Hudson54241132001-12-07 15:38:26 +00008011# Break up conftest.vals because some shells have a limit on
8012# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008013
Jack Jansendd19cf82001-12-06 22:36:17 +00008014rm -f conftest.tail
Michael W. Hudson54241132001-12-07 15:38:26 +00008015while :
Jack Jansendd19cf82001-12-06 22:36:17 +00008016do
Michael W. Hudson54241132001-12-07 15:38:26 +00008017 ac_lines=`grep -c . conftest.vals`
8018 # grep -c gives empty output for an empty file on some AIX systems.
8019 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8020 # Write a limited-size here document to conftest.frag.
8021 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8022 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +00008023 echo 'CEOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008024 sed -f conftest.frag conftest.in > conftest.out
8025 rm -f conftest.in
8026 mv conftest.out conftest.in
8027' >> $CONFIG_STATUS
8028 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8029 rm -f conftest.vals
8030 mv conftest.tail conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00008031done
Michael W. Hudson54241132001-12-07 15:38:26 +00008032rm -f conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00008033
Michael W. Hudson54241132001-12-07 15:38:26 +00008034cat >> $CONFIG_STATUS <<\EOF
8035 rm -f conftest.frag conftest.h
8036 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8037 cat conftest.in >> conftest.h
8038 rm -f conftest.in
8039 if cmp -s $ac_file conftest.h 2>/dev/null; then
8040 echo "$ac_file is unchanged"
8041 rm -f conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00008042 else
Michael W. Hudson54241132001-12-07 15:38:26 +00008043 # Remove last slash and all that follows it. Not all systems have dirname.
8044 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Jack Jansendd19cf82001-12-06 22:36:17 +00008045 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00008046 # The file is in a subdirectory.
8047 test ! -d "$ac_dir" && mkdir "$ac_dir"
Jack Jansendd19cf82001-12-06 22:36:17 +00008048 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008049 rm -f $ac_file
8050 mv conftest.h $ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00008051 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008052fi; done
8053
Guido van Rossumf78abae1997-01-21 22:02:36 +00008054EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008055cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00008056
Michael W. Hudson54241132001-12-07 15:38:26 +00008057EOF
8058cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008059
Michael W. Hudson54241132001-12-07 15:38:26 +00008060exit 0
Guido van Rossum627b2d71993-12-24 10:39:16 +00008061EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008062chmod +x $CONFIG_STATUS
Michael W. Hudson54241132001-12-07 15:38:26 +00008063rm -fr confdefs* $ac_clean_files
8064test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00008065
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008066
8067echo "creating Setup"
8068if test ! -f Modules/Setup
8069then
8070 cp $srcdir/Modules/Setup.dist Modules/Setup
8071fi
8072
8073echo "creating Setup.local"
8074if test ! -f Modules/Setup.local
8075then
8076 echo "# Edit this file for local setup changes" >Modules/Setup.local
8077fi
8078
8079echo "creating Makefile"
8080$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
8081 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00008082 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008083mv config.c Modules