blob: d9d3801ba0bf7d18b9205e46acc71858a30632da [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Michael W. Hudson54241132001-12-07 15:38:26 +00002
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003# From configure.in Revision: 1.298
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
Michael W. Hudson54241132001-12-07 15:38:26 +00001993for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h locale.h \
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001994ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00001995signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00001996sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00001997sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwis69532332001-10-13 09:12:41 +00001998sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00001999ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00002000do
Michael W. Hudson54241132001-12-07 15:38:26 +00002001ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2002echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002003echo "configure:2004: checking for $ac_hdr" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002004if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2005 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002006else
Michael W. Hudson54241132001-12-07 15:38:26 +00002007 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002008#line 2009 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002009#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002010#include <$ac_hdr>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002011EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002012ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen4f8d0542002-03-08 13:43:01 +00002013{ (eval echo configure:2014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002014ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2015if test -z "$ac_err"; then
2016 rm -rf conftest*
2017 eval "ac_cv_header_$ac_safe=yes"
2018else
2019 echo "$ac_err" >&5
2020 echo "configure: failed program was:" >&5
2021 cat conftest.$ac_ext >&5
2022 rm -rf conftest*
2023 eval "ac_cv_header_$ac_safe=no"
2024fi
2025rm -f conftest*
2026fi
2027if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2028 echo "$ac_t""yes" 1>&6
2029 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2030 cat >> confdefs.h <<EOF
2031#define $ac_tr_hdr 1
2032EOF
2033
2034else
2035 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002036fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002037done
2038
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002039ac_header_dirent=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002040for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2041do
2042ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2043echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002044echo "configure:2045: checking for $ac_hdr that defines DIR" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002045if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2046 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002047else
Michael W. Hudson54241132001-12-07 15:38:26 +00002048 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002049#line 2050 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002050#include "confdefs.h"
2051#include <sys/types.h>
2052#include <$ac_hdr>
Michael W. Hudson54241132001-12-07 15:38:26 +00002053int main() {
2054DIR *dirp = 0;
2055; return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002056EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002057if { (eval echo configure:2058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002058 rm -rf conftest*
2059 eval "ac_cv_header_dirent_$ac_safe=yes"
2060else
2061 echo "configure: failed program was:" >&5
2062 cat conftest.$ac_ext >&5
2063 rm -rf conftest*
2064 eval "ac_cv_header_dirent_$ac_safe=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002065fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002066rm -f conftest*
2067fi
2068if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2069 echo "$ac_t""yes" 1>&6
2070 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2071 cat >> confdefs.h <<EOF
2072#define $ac_tr_hdr 1
2073EOF
2074 ac_header_dirent=$ac_hdr; break
2075else
2076 echo "$ac_t""no" 1>&6
2077fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002078done
2079# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2080if test $ac_header_dirent = dirent.h; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002081echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002082echo "configure:2083: checking for opendir in -ldir" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002083ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2084if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2085 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002086else
Michael W. Hudson54241132001-12-07 15:38:26 +00002087 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002088LIBS="-ldir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00002089cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002090#line 2091 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002091#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002092/* Override any gcc2 internal prototype to avoid an error. */
2093/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00002094 builtin and then its argument prototype would still apply. */
2095char opendir();
2096
2097int main() {
2098opendir()
2099; return 0; }
2100EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002101if { (eval echo configure:2102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002102 rm -rf conftest*
2103 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002104else
Michael W. Hudson54241132001-12-07 15:38:26 +00002105 echo "configure: failed program was:" >&5
2106 cat conftest.$ac_ext >&5
2107 rm -rf conftest*
2108 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002109fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002110rm -f conftest*
2111LIBS="$ac_save_LIBS"
2112
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002113fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002114if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2115 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002116 LIBS="$LIBS -ldir"
Michael W. Hudson54241132001-12-07 15:38:26 +00002117else
2118 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002119fi
2120
2121else
Michael W. Hudson54241132001-12-07 15:38:26 +00002122echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002123echo "configure:2124: checking for opendir in -lx" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002124ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2125if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2126 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002127else
Michael W. Hudson54241132001-12-07 15:38:26 +00002128 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002129LIBS="-lx $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00002130cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002131#line 2132 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002132#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002133/* Override any gcc2 internal prototype to avoid an error. */
2134/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00002135 builtin and then its argument prototype would still apply. */
2136char opendir();
2137
2138int main() {
2139opendir()
2140; return 0; }
2141EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002142if { (eval echo configure:2143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002143 rm -rf conftest*
2144 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002145else
Michael W. Hudson54241132001-12-07 15:38:26 +00002146 echo "configure: failed program was:" >&5
2147 cat conftest.$ac_ext >&5
2148 rm -rf conftest*
2149 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002150fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002151rm -f conftest*
2152LIBS="$ac_save_LIBS"
2153
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002154fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002155if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2156 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002157 LIBS="$LIBS -lx"
Michael W. Hudson54241132001-12-07 15:38:26 +00002158else
2159 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002160fi
2161
2162fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002163
Michael W. Hudson54241132001-12-07 15:38:26 +00002164
Guido van Rossum627b2d71993-12-24 10:39:16 +00002165# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002166was_it_defined=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002167echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002168echo "configure:2169: checking for clock_t in time.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002169cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002170#line 2171 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002171#include "confdefs.h"
2172#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002173EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2175 egrep "clock_t" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002176 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00002177 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002178else
Michael W. Hudson54241132001-12-07 15:38:26 +00002179 rm -rf conftest*
2180 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002181#define clock_t long
2182EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002183
2184fi
2185rm -f conftest*
2186
Michael W. Hudson54241132001-12-07 15:38:26 +00002187echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002188
Guido van Rossum810cc512001-09-09 23:51:39 +00002189# Two defines needed to enable largefile support on various platforms
2190# These may affect some typedefs
Michael W. Hudson54241132001-12-07 15:38:26 +00002191cat >> confdefs.h <<\EOF
Guido van Rossum810cc512001-09-09 23:51:39 +00002192#define _LARGEFILE_SOURCE 1
2193EOF
2194
Michael W. Hudson54241132001-12-07 15:38:26 +00002195cat >> confdefs.h <<\EOF
Guido van Rossum810cc512001-09-09 23:51:39 +00002196#define _FILE_OFFSET_BITS 64
2197EOF
2198
Michael W. Hudson54241132001-12-07 15:38:26 +00002199
Guido van Rossum84e7b241996-08-19 21:59:00 +00002200# Add some code to confdefs.h so that the test for off_t works on SCO
2201cat >> confdefs.h <<\EOF
2202#if defined(SCO_DS)
2203#undef _OFF_T
2204#endif
2205EOF
2206
Guido van Rossumef2255b2000-03-10 22:30:29 +00002207# Type availability checks
Michael W. Hudson54241132001-12-07 15:38:26 +00002208echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002209echo "configure:2210: checking for mode_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002210if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2211 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002212else
Michael W. Hudson54241132001-12-07 15:38:26 +00002213 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002214#line 2215 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002215#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002216#include <sys/types.h>
2217#if STDC_HEADERS
2218#include <stdlib.h>
2219#include <stddef.h>
2220#endif
Jack Jansendd19cf82001-12-06 22:36:17 +00002221EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002222if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2223 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2224 rm -rf conftest*
Jack Jansendd19cf82001-12-06 22:36:17 +00002225 ac_cv_type_mode_t=yes
2226else
Michael W. Hudson54241132001-12-07 15:38:26 +00002227 rm -rf conftest*
2228 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00002229fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002230rm -f conftest*
Jack Jansendd19cf82001-12-06 22:36:17 +00002231
Michael W. Hudson54241132001-12-07 15:38:26 +00002232fi
2233echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2234if test $ac_cv_type_mode_t = no; then
2235 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002236#define mode_t int
2237EOF
2238
2239fi
2240
Michael W. Hudson54241132001-12-07 15:38:26 +00002241echo $ac_n "checking for off_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002242echo "configure:2243: checking for off_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002243if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2244 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002245else
Michael W. Hudson54241132001-12-07 15:38:26 +00002246 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002247#line 2248 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002248#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002249#include <sys/types.h>
2250#if STDC_HEADERS
2251#include <stdlib.h>
2252#include <stddef.h>
2253#endif
2254EOF
2255if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2256 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2257 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002258 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002259else
Michael W. Hudson54241132001-12-07 15:38:26 +00002260 rm -rf conftest*
2261 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002262fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002263rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002264
Michael W. Hudson54241132001-12-07 15:38:26 +00002265fi
2266echo "$ac_t""$ac_cv_type_off_t" 1>&6
2267if test $ac_cv_type_off_t = no; then
2268 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002269#define off_t long
2270EOF
2271
2272fi
2273
Michael W. Hudson54241132001-12-07 15:38:26 +00002274echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002275echo "configure:2276: checking for pid_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002276if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2277 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002278else
Michael W. Hudson54241132001-12-07 15:38:26 +00002279 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002280#line 2281 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002281#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002282#include <sys/types.h>
2283#if STDC_HEADERS
2284#include <stdlib.h>
2285#include <stddef.h>
2286#endif
2287EOF
2288if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2289 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2290 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002291 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002292else
Michael W. Hudson54241132001-12-07 15:38:26 +00002293 rm -rf conftest*
2294 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002295fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002296rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002297
Michael W. Hudson54241132001-12-07 15:38:26 +00002298fi
2299echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2300if test $ac_cv_type_pid_t = no; then
2301 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002302#define pid_t int
2303EOF
2304
2305fi
2306
Michael W. Hudson54241132001-12-07 15:38:26 +00002307echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002308echo "configure:2309: checking return type of signal handlers" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002309if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2310 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002311else
Michael W. Hudson54241132001-12-07 15:38:26 +00002312 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002313#line 2314 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002314#include "confdefs.h"
2315#include <sys/types.h>
2316#include <signal.h>
2317#ifdef signal
Michael W. Hudson54241132001-12-07 15:38:26 +00002318#undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00002319#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002320#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002321extern "C" void (*signal (int, void (*)(int)))(int);
2322#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002323void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002324#endif
2325
Michael W. Hudson54241132001-12-07 15:38:26 +00002326int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002327int i;
Michael W. Hudson54241132001-12-07 15:38:26 +00002328; return 0; }
2329EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002330if { (eval echo configure:2331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002331 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002332 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002333else
Michael W. Hudson54241132001-12-07 15:38:26 +00002334 echo "configure: failed program was:" >&5
2335 cat conftest.$ac_ext >&5
2336 rm -rf conftest*
2337 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002338fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002339rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002340fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002341
Michael W. Hudson54241132001-12-07 15:38:26 +00002342echo "$ac_t""$ac_cv_type_signal" 1>&6
2343cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002344#define RETSIGTYPE $ac_cv_type_signal
2345EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002346
Michael W. Hudson54241132001-12-07 15:38:26 +00002347
2348echo $ac_n "checking for size_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002349echo "configure:2350: checking for size_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002350if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2351 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002352else
Michael W. Hudson54241132001-12-07 15:38:26 +00002353 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002354#line 2355 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002355#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002356#include <sys/types.h>
2357#if STDC_HEADERS
2358#include <stdlib.h>
2359#include <stddef.h>
2360#endif
2361EOF
2362if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2363 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2364 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002365 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002366else
Michael W. Hudson54241132001-12-07 15:38:26 +00002367 rm -rf conftest*
2368 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002369fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002370rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002371
Michael W. Hudson54241132001-12-07 15:38:26 +00002372fi
2373echo "$ac_t""$ac_cv_type_size_t" 1>&6
2374if test $ac_cv_type_size_t = no; then
2375 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002376#define size_t unsigned
2377EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002378
2379fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002380
Michael W. Hudson54241132001-12-07 15:38:26 +00002381echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002382echo "configure:2383: checking for uid_t in sys/types.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002383if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2384 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002385else
Michael W. Hudson54241132001-12-07 15:38:26 +00002386 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002387#line 2388 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002388#include "confdefs.h"
2389#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002390EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2392 egrep "uid_t" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002393 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002394 ac_cv_type_uid_t=yes
2395else
Michael W. Hudson54241132001-12-07 15:38:26 +00002396 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002397 ac_cv_type_uid_t=no
2398fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002399rm -f conftest*
2400
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002401fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002402
Michael W. Hudson54241132001-12-07 15:38:26 +00002403echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2404if test $ac_cv_type_uid_t = no; then
2405 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002406#define uid_t int
2407EOF
2408
Michael W. Hudson54241132001-12-07 15:38:26 +00002409 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002410#define gid_t int
2411EOF
2412
2413fi
2414
Jack Jansendd19cf82001-12-06 22:36:17 +00002415
Michael W. Hudson54241132001-12-07 15:38:26 +00002416# Sizes of various common basic types
2417echo $ac_n "checking size of int""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002418echo "configure:2419: checking size of int" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002419if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2420 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002421else
2422 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002423 ac_cv_sizeof_int=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002424else
Michael W. Hudson54241132001-12-07 15:38:26 +00002425 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002426#line 2427 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002427#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002428#include <stdio.h>
2429main()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002430{
Michael W. Hudson54241132001-12-07 15:38:26 +00002431 FILE *f=fopen("conftestval", "w");
2432 if (!f) exit(1);
2433 fprintf(f, "%d\n", sizeof(int));
2434 exit(0);
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002435}
Michael W. Hudson54241132001-12-07 15:38:26 +00002436EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002437if { (eval echo configure:2438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002438then
2439 ac_cv_sizeof_int=`cat conftestval`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002440else
Michael W. Hudson54241132001-12-07 15:38:26 +00002441 echo "configure: failed program was:" >&5
2442 cat conftest.$ac_ext >&5
2443 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002444 ac_cv_sizeof_int=0
2445fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002446rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002447fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002448
2449fi
2450echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2451cat >> confdefs.h <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002452#define SIZEOF_INT $ac_cv_sizeof_int
2453EOF
2454
2455
Michael W. Hudson54241132001-12-07 15:38:26 +00002456echo $ac_n "checking size of long""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002457echo "configure:2458: checking size of long" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002458if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2459 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002460else
2461 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002462 ac_cv_sizeof_long=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002463else
Michael W. Hudson54241132001-12-07 15:38:26 +00002464 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002465#line 2466 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002466#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002467#include <stdio.h>
2468main()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002469{
Michael W. Hudson54241132001-12-07 15:38:26 +00002470 FILE *f=fopen("conftestval", "w");
2471 if (!f) exit(1);
2472 fprintf(f, "%d\n", sizeof(long));
2473 exit(0);
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002474}
Michael W. Hudson54241132001-12-07 15:38:26 +00002475EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002476if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002477then
2478 ac_cv_sizeof_long=`cat conftestval`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002479else
Michael W. Hudson54241132001-12-07 15:38:26 +00002480 echo "configure: failed program was:" >&5
2481 cat conftest.$ac_ext >&5
2482 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002483 ac_cv_sizeof_long=0
2484fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002485rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002486fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002487
2488fi
2489echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2490cat >> confdefs.h <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002491#define SIZEOF_LONG $ac_cv_sizeof_long
2492EOF
2493
2494
Michael W. Hudson54241132001-12-07 15:38:26 +00002495echo $ac_n "checking size of void *""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002496echo "configure:2497: checking size of void *" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002497if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
2498 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002499else
2500 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002501 ac_cv_sizeof_void_p=4
Guido van Rossumad678af1998-10-02 14:42:15 +00002502else
Michael W. Hudson54241132001-12-07 15:38:26 +00002503 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002504#line 2505 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002505#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002506#include <stdio.h>
2507main()
Guido van Rossumad678af1998-10-02 14:42:15 +00002508{
Michael W. Hudson54241132001-12-07 15:38:26 +00002509 FILE *f=fopen("conftestval", "w");
2510 if (!f) exit(1);
2511 fprintf(f, "%d\n", sizeof(void *));
2512 exit(0);
Guido van Rossumad678af1998-10-02 14:42:15 +00002513}
Michael W. Hudson54241132001-12-07 15:38:26 +00002514EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002515if { (eval echo configure:2516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002516then
2517 ac_cv_sizeof_void_p=`cat conftestval`
Guido van Rossumad678af1998-10-02 14:42:15 +00002518else
Michael W. Hudson54241132001-12-07 15:38:26 +00002519 echo "configure: failed program was:" >&5
2520 cat conftest.$ac_ext >&5
2521 rm -fr conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00002522 ac_cv_sizeof_void_p=0
2523fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002524rm -fr conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00002525fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002526
2527fi
2528echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2529cat >> confdefs.h <<EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00002530#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2531EOF
2532
2533
Michael W. Hudson54241132001-12-07 15:38:26 +00002534echo $ac_n "checking size of char""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002535echo "configure:2536: checking size of char" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002536if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2537 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002538else
2539 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002540 ac_cv_sizeof_char=1
Guido van Rossumef2255b2000-03-10 22:30:29 +00002541else
Michael W. Hudson54241132001-12-07 15:38:26 +00002542 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002543#line 2544 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002544#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002545#include <stdio.h>
2546main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002547{
Michael W. Hudson54241132001-12-07 15:38:26 +00002548 FILE *f=fopen("conftestval", "w");
2549 if (!f) exit(1);
2550 fprintf(f, "%d\n", sizeof(char));
2551 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002552}
Michael W. Hudson54241132001-12-07 15:38:26 +00002553EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002554if { (eval echo configure:2555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002555then
2556 ac_cv_sizeof_char=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002557else
Michael W. Hudson54241132001-12-07 15:38:26 +00002558 echo "configure: failed program was:" >&5
2559 cat conftest.$ac_ext >&5
2560 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002561 ac_cv_sizeof_char=0
2562fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002563rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002564fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002565
2566fi
2567echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2568cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002569#define SIZEOF_CHAR $ac_cv_sizeof_char
2570EOF
2571
2572
Michael W. Hudson54241132001-12-07 15:38:26 +00002573echo $ac_n "checking size of short""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002574echo "configure:2575: checking size of short" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002575if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2576 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002577else
2578 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002579 ac_cv_sizeof_short=2
Guido van Rossumef2255b2000-03-10 22:30:29 +00002580else
Michael W. Hudson54241132001-12-07 15:38:26 +00002581 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002582#line 2583 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002583#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002584#include <stdio.h>
2585main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002586{
Michael W. Hudson54241132001-12-07 15:38:26 +00002587 FILE *f=fopen("conftestval", "w");
2588 if (!f) exit(1);
2589 fprintf(f, "%d\n", sizeof(short));
2590 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002591}
Michael W. Hudson54241132001-12-07 15:38:26 +00002592EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002593if { (eval echo configure:2594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002594then
2595 ac_cv_sizeof_short=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002596else
Michael W. Hudson54241132001-12-07 15:38:26 +00002597 echo "configure: failed program was:" >&5
2598 cat conftest.$ac_ext >&5
2599 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002600 ac_cv_sizeof_short=0
2601fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002602rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002603fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002604
2605fi
2606echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2607cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002608#define SIZEOF_SHORT $ac_cv_sizeof_short
2609EOF
2610
2611
Michael W. Hudson54241132001-12-07 15:38:26 +00002612echo $ac_n "checking size of float""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002613echo "configure:2614: checking size of float" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002614if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
2615 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002616else
2617 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002618 ac_cv_sizeof_float=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00002619else
Michael W. Hudson54241132001-12-07 15:38:26 +00002620 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002621#line 2622 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002622#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002623#include <stdio.h>
2624main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002625{
Michael W. Hudson54241132001-12-07 15:38:26 +00002626 FILE *f=fopen("conftestval", "w");
2627 if (!f) exit(1);
2628 fprintf(f, "%d\n", sizeof(float));
2629 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002630}
Michael W. Hudson54241132001-12-07 15:38:26 +00002631EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002632if { (eval echo configure:2633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002633then
2634 ac_cv_sizeof_float=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002635else
Michael W. Hudson54241132001-12-07 15:38:26 +00002636 echo "configure: failed program was:" >&5
2637 cat conftest.$ac_ext >&5
2638 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002639 ac_cv_sizeof_float=0
2640fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002641rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002642fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002643
2644fi
2645echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2646cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002647#define SIZEOF_FLOAT $ac_cv_sizeof_float
2648EOF
2649
2650
Michael W. Hudson54241132001-12-07 15:38:26 +00002651echo $ac_n "checking size of double""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002652echo "configure:2653: checking size of double" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002653if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
2654 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002655else
2656 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002657 ac_cv_sizeof_double=8
Guido van Rossumef2255b2000-03-10 22:30:29 +00002658else
Michael W. Hudson54241132001-12-07 15:38:26 +00002659 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002660#line 2661 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002661#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002662#include <stdio.h>
2663main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002664{
Michael W. Hudson54241132001-12-07 15:38:26 +00002665 FILE *f=fopen("conftestval", "w");
2666 if (!f) exit(1);
2667 fprintf(f, "%d\n", sizeof(double));
2668 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002669}
Michael W. Hudson54241132001-12-07 15:38:26 +00002670EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002671if { (eval echo configure:2672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002672then
2673 ac_cv_sizeof_double=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002674else
Michael W. Hudson54241132001-12-07 15:38:26 +00002675 echo "configure: failed program was:" >&5
2676 cat conftest.$ac_ext >&5
2677 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002678 ac_cv_sizeof_double=0
2679fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002680rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002681fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002682
2683fi
2684echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2685cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002686#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2687EOF
2688
2689
Michael W. Hudson54241132001-12-07 15:38:26 +00002690echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002691echo "configure:2692: checking size of fpos_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002692if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
2693 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002694else
2695 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002696 ac_cv_sizeof_fpos_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002697else
Michael W. Hudson54241132001-12-07 15:38:26 +00002698 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002699#line 2700 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002700#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002701#include <stdio.h>
2702main()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002703{
Michael W. Hudson54241132001-12-07 15:38:26 +00002704 FILE *f=fopen("conftestval", "w");
2705 if (!f) exit(1);
2706 fprintf(f, "%d\n", sizeof(fpos_t));
2707 exit(0);
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002708}
Michael W. Hudson54241132001-12-07 15:38:26 +00002709EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002710if { (eval echo configure:2711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002711then
2712 ac_cv_sizeof_fpos_t=`cat conftestval`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002713else
Michael W. Hudson54241132001-12-07 15:38:26 +00002714 echo "configure: failed program was:" >&5
2715 cat conftest.$ac_ext >&5
2716 rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002717 ac_cv_sizeof_fpos_t=0
2718fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002719rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002720fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002721
2722fi
2723echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2724cat >> confdefs.h <<EOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002725#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2726EOF
2727
Michael W. Hudson54241132001-12-07 15:38:26 +00002728
2729
2730echo $ac_n "checking for long long support""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002731echo "configure:2732: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002732have_long_long=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002733cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002734#line 2735 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002735#include "confdefs.h"
2736
Michael W. Hudson54241132001-12-07 15:38:26 +00002737int main() {
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002738long long x; x = (long long)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002739; return 0; }
2740EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002741if { (eval echo configure:2742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002742 rm -rf conftest*
2743 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002744#define HAVE_LONG_LONG 1
2745EOF
2746 have_long_long=yes
2747else
Michael W. Hudson54241132001-12-07 15:38:26 +00002748 echo "configure: failed program was:" >&5
2749 cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002750fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002751rm -f conftest*
2752echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002753if test "$have_long_long" = yes ; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002754echo $ac_n "checking size of long long""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002755echo "configure:2756: checking size of long long" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002756if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2757 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002758else
2759 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002760 ac_cv_sizeof_long_long=8
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002761else
Michael W. Hudson54241132001-12-07 15:38:26 +00002762 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002763#line 2764 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002764#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002765#include <stdio.h>
2766main()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002767{
Michael W. Hudson54241132001-12-07 15:38:26 +00002768 FILE *f=fopen("conftestval", "w");
2769 if (!f) exit(1);
2770 fprintf(f, "%d\n", sizeof(long long));
2771 exit(0);
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002772}
Michael W. Hudson54241132001-12-07 15:38:26 +00002773EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002774if { (eval echo configure:2775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002775then
2776 ac_cv_sizeof_long_long=`cat conftestval`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002777else
Michael W. Hudson54241132001-12-07 15:38:26 +00002778 echo "configure: failed program was:" >&5
2779 cat conftest.$ac_ext >&5
2780 rm -fr conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002781 ac_cv_sizeof_long_long=0
2782fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002783rm -fr conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002784fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002785
2786fi
2787echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2788cat >> confdefs.h <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002789#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2790EOF
2791
Michael W. Hudson54241132001-12-07 15:38:26 +00002792
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002793fi
2794
Michael W. Hudson54241132001-12-07 15:38:26 +00002795echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002796echo "configure:2797: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002797have_uintptr_t=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002798cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002799#line 2800 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002800#include "confdefs.h"
2801
Michael W. Hudson54241132001-12-07 15:38:26 +00002802int main() {
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002803uintptr_t x; x = (uintptr_t)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002804; return 0; }
2805EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002806if { (eval echo configure:2807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002807 rm -rf conftest*
2808 cat >> confdefs.h <<\EOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002809#define HAVE_UINTPTR_T 1
2810EOF
2811 have_uintptr_t=yes
2812else
Michael W. Hudson54241132001-12-07 15:38:26 +00002813 echo "configure: failed program was:" >&5
2814 cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002815fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002816rm -f conftest*
2817echo "$ac_t""$have_uintptr_t" 1>&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002818if test "$have_uintptr_t" = yes ; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002819echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002820echo "configure:2821: checking size of uintptr_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002821if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
2822 echo $ac_n "(cached) $ac_c" 1>&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002823else
2824 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002825 ac_cv_sizeof_uintptr_t=4
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002826else
Michael W. Hudson54241132001-12-07 15:38:26 +00002827 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002828#line 2829 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002829#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002830#include <stdio.h>
2831main()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002832{
Michael W. Hudson54241132001-12-07 15:38:26 +00002833 FILE *f=fopen("conftestval", "w");
2834 if (!f) exit(1);
2835 fprintf(f, "%d\n", sizeof(uintptr_t));
2836 exit(0);
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002837}
Michael W. Hudson54241132001-12-07 15:38:26 +00002838EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002839if { (eval echo configure:2840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002840then
2841 ac_cv_sizeof_uintptr_t=`cat conftestval`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002842else
Michael W. Hudson54241132001-12-07 15:38:26 +00002843 echo "configure: failed program was:" >&5
2844 cat conftest.$ac_ext >&5
2845 rm -fr conftest*
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002846 ac_cv_sizeof_uintptr_t=0
2847fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002848rm -fr conftest*
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002849fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002850
2851fi
2852echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2853cat >> confdefs.h <<EOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002854#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2855EOF
2856
Michael W. Hudson54241132001-12-07 15:38:26 +00002857
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002858fi
2859
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002860# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002861echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002862echo "configure:2863: checking size of off_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002863if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
2864 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002865else
2866 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002867 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002868else
Michael W. Hudson54241132001-12-07 15:38:26 +00002869 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002870#line 2871 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002871#include "confdefs.h"
2872#include <stdio.h>
2873#include <sys/types.h>
2874main()
2875{
2876 FILE *f=fopen("conftestval", "w");
2877 if (!f) exit(1);
2878 fprintf(f, "%d\n", sizeof(off_t));
2879 exit(0);
2880}
Michael W. Hudson54241132001-12-07 15:38:26 +00002881EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002882if { (eval echo configure:2883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002883then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002884 ac_cv_sizeof_off_t=`cat conftestval`
2885else
Michael W. Hudson54241132001-12-07 15:38:26 +00002886 echo "configure: failed program was:" >&5
2887 cat conftest.$ac_ext >&5
2888 rm -fr conftest*
2889 ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002890fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002891rm -fr conftest*
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002892fi
2893
Michael W. Hudson54241132001-12-07 15:38:26 +00002894
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002895fi
2896
Michael W. Hudson54241132001-12-07 15:38:26 +00002897echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2898cat >> confdefs.h <<EOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002899#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2900EOF
2901
Michael W. Hudson54241132001-12-07 15:38:26 +00002902
2903echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002904echo "configure:2905: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002905if test "$have_long_long" = yes -a \
2906 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2907 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002908 cat >> confdefs.h <<\EOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002909#define HAVE_LARGEFILE_SUPPORT 1
2910EOF
2911
Michael W. Hudson54241132001-12-07 15:38:26 +00002912 echo "$ac_t""yes" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002913else
Michael W. Hudson54241132001-12-07 15:38:26 +00002914 echo "$ac_t""no" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002915fi
2916
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002917# AC_CHECK_SIZEOF() doesn't include <time.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002918echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002919echo "configure:2920: checking size of time_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002920if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
2921 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002922else
2923 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002924 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002925else
Michael W. Hudson54241132001-12-07 15:38:26 +00002926 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002927#line 2928 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002928#include "confdefs.h"
2929#include <stdio.h>
2930#include <time.h>
2931main()
2932{
2933 FILE *f=fopen("conftestval", "w");
2934 if (!f) exit(1);
2935 fprintf(f, "%d\n", sizeof(time_t));
2936 exit(0);
2937}
Michael W. Hudson54241132001-12-07 15:38:26 +00002938EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002939if { (eval echo configure:2940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002940then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002941 ac_cv_sizeof_time_t=`cat conftestval`
2942else
Michael W. Hudson54241132001-12-07 15:38:26 +00002943 echo "configure: failed program was:" >&5
2944 cat conftest.$ac_ext >&5
2945 rm -fr conftest*
2946 ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002947fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002948rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002949fi
2950
Michael W. Hudson54241132001-12-07 15:38:26 +00002951
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002952fi
2953
Michael W. Hudson54241132001-12-07 15:38:26 +00002954echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2955cat >> confdefs.h <<EOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002956#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2957EOF
2958
Michael W. Hudson54241132001-12-07 15:38:26 +00002959
2960
Trent Mick635f6fb2000-08-23 21:33:05 +00002961# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002962ac_save_cc="$CC"
2963if test "$ac_cv_kpthread" = "yes"
2964then CC="$CC -Kpthread"
2965fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002966echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002967echo "configure:2968: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002968have_pthread_t=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002969cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002970#line 2971 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002971#include "confdefs.h"
2972#include <pthread.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002973int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002974pthread_t x; x = *(pthread_t*)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002975; return 0; }
2976EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002977if { (eval echo configure:2978: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002978 rm -rf conftest*
Trent Mick635f6fb2000-08-23 21:33:05 +00002979 have_pthread_t=yes
2980else
Michael W. Hudson54241132001-12-07 15:38:26 +00002981 echo "configure: failed program was:" >&5
2982 cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002983fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002984rm -f conftest*
2985echo "$ac_t""$have_pthread_t" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002986if test "$have_pthread_t" = yes ; then
2987 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002988 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00002989echo "configure:2990: checking size of pthread_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002990 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
2991 echo $ac_n "(cached) $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002992else
2993 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002994 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00002995else
Michael W. Hudson54241132001-12-07 15:38:26 +00002996 cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00002997#line 2998 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002998#include "confdefs.h"
2999#include <stdio.h>
3000 #include <pthread.h>
3001 main()
3002 {
3003 FILE *f=fopen("conftestval", "w");
3004 if (!f) exit(1);
3005 fprintf(f, "%d\n", sizeof(pthread_t));
3006 exit(0);
3007 }
Michael W. Hudson54241132001-12-07 15:38:26 +00003008EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003009if { (eval echo configure:3010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00003010then
Trent Mick635f6fb2000-08-23 21:33:05 +00003011 ac_cv_sizeof_pthread_t=`cat conftestval`
3012else
Michael W. Hudson54241132001-12-07 15:38:26 +00003013 echo "configure: failed program was:" >&5
3014 cat conftest.$ac_ext >&5
3015 rm -fr conftest*
3016 ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00003017fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003018rm -fr conftest*
Trent Mick635f6fb2000-08-23 21:33:05 +00003019fi
3020
Michael W. Hudson54241132001-12-07 15:38:26 +00003021
Trent Mick635f6fb2000-08-23 21:33:05 +00003022fi
3023
Michael W. Hudson54241132001-12-07 15:38:26 +00003024 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
3025 cat >> confdefs.h <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003026#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
3027EOF
3028
3029fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003030CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00003031
Michael W. Hudson54241132001-12-07 15:38:26 +00003032echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003033echo "configure:3034: checking for --enable-toolbox-glue" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003034# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
3035if test "${enable_toolbox_glue+set}" = set; then
3036 enableval="$enable_toolbox_glue"
Michael W. Hudson54241132001-12-07 15:38:26 +00003037 :
3038fi
Jack Jansene578a632001-08-15 01:27:14 +00003039
3040
3041if test -z "$enable_toolbox_glue"
Michael W. Hudson54241132001-12-07 15:38:26 +00003042then
Jack Jansene578a632001-08-15 01:27:14 +00003043 case $ac_sys_system/$ac_sys_release in
3044 Darwin/*)
3045 enable_toolbox_glue="yes";;
3046 *)
3047 enable_toolbox_glue="no";;
3048 esac
3049fi
3050case "$enable_toolbox_glue" in
3051yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00003052 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00003053 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00003054 extra_undefs="-u __dummy -u _PyMac_Error"
Michael W. Hudson54241132001-12-07 15:38:26 +00003055 cat >> confdefs.h <<\EOF
Jack Jansene578a632001-08-15 01:27:14 +00003056#define USE_TOOLBOX_OBJECT_GLUE 1
3057EOF
3058
3059 ;;
3060*)
3061 extra_frameworks=""
3062 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00003063 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00003064 ;;
3065esac
Michael W. Hudson54241132001-12-07 15:38:26 +00003066echo "$ac_t""$enable_toolbox_glue" 1>&6
3067
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003068
3069case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003070 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003071 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003072 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
3073 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00003074 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3075 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00003076 Darwin/*)
3077 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003078 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
3079 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00003080 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3081 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003082esac
3083
Michael W. Hudson54241132001-12-07 15:38:26 +00003084echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003085echo "configure:3086: checking for --enable-framework" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003086if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003087then
Jack Jansenca06bc62001-08-03 15:32:23 +00003088 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003089 # -U __environ is needed since bundles don't have access
3090 # to crt0 when built but will always be linked against it
Michael W. Hudson54241132001-12-07 15:38:26 +00003091 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00003092 # in the build location.
Michael W. Hudson54241132001-12-07 15:38:26 +00003093
Jack Jansena3891ea2001-09-07 14:25:12 +00003094 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003095 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
3096 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00003097 esac
Michael W. Hudson54241132001-12-07 15:38:26 +00003098 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003099#define WITH_NEXT_FRAMEWORK 1
3100EOF
3101
Michael W. Hudson54241132001-12-07 15:38:26 +00003102 echo "$ac_t""yes" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003103else
Michael W. Hudson54241132001-12-07 15:38:26 +00003104 echo "$ac_t""no" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003105fi
3106
Michael W. Hudson54241132001-12-07 15:38:26 +00003107echo $ac_n "checking for dyld""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003108echo "configure:3109: checking for dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003109case $ac_sys_system/$ac_sys_release in
3110 Darwin/*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003111 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003112#define WITH_DYLD 1
3113EOF
3114
Michael W. Hudson54241132001-12-07 15:38:26 +00003115 echo "$ac_t""always on for Darwin" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003116 ;;
3117 *)
Michael W. Hudson54241132001-12-07 15:38:26 +00003118 echo "$ac_t""no" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00003119 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003120esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003121
Guido van Rossum0a516c91994-09-12 10:58:40 +00003122# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003123
Michael W. Hudson54241132001-12-07 15:38:26 +00003124
3125
3126
3127
Guido van Rossum0a516c91994-09-12 10:58:40 +00003128# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003129# -- usually .so, .sl on HP-UX, .dll on Cygwin
Michael W. Hudson54241132001-12-07 15:38:26 +00003130echo $ac_n "checking SO""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003131echo "configure:3132: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003132if test -z "$SO"
3133then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003134 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003135 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003136 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003137 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003138 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003139fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003140echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003141# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003142# -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003143# (Shared libraries in this instance are shared modules to be loaded into
3144# Python, as opposed to building Python itself as a shared library.)
Michael W. Hudson54241132001-12-07 15:38:26 +00003145echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003146echo "configure:3147: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003147if test -z "$LDSHARED"
3148then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003149 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003150 AIX*)
3151 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00003152 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003153 ;;
3154 BeOS*)
3155 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00003156 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003157 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003158 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003159 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003160 SunOS/4*) LDSHARED="ld";;
Michael W. Hudson54241132001-12-07 15:38:26 +00003161 SunOS/5*)
Greg Ward57c9a662000-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 Ward57c9a662000-05-26 12:22:54 +00003165 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003166 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003167 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3168 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00003169 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003170 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3171 if test "$enable_framework" ; then
3172 # Link against the framework. All externals should be defined.
3173 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3174 else
3175 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00003176 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00003177 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00003178 Darwin/*)
3179 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3180 if test "$enable_framework" ; then
3181 # Link against the framework. All externals should be defined.
3182 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3183 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00003184 # No framework, use the Python app as bundle-loader
3185 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
3186 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003187 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003188 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003189 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003190 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003191 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003192 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003193 then
3194 LDSHARED="cc -shared ${LDFLAGS}"
3195 else
3196 LDSHARED="ld -Bshareable ${LDFLAGS}"
3197 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003198 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003199 if test "$GCC" = "yes"
3200 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003201 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003202 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003203 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003204 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003205 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003206 *) LDSHARED="ld";;
3207 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003208fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003209echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003210BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003211# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003212# library (module) -- this is only needed for a few systems
Michael W. Hudson54241132001-12-07 15:38:26 +00003213echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003214echo "configure:3215: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003215if test -z "$CCSHARED"
3216then
Guido van Rossum07397971997-04-29 21:49:50 +00003217 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003218 SunOS*) if test "$GCC" = yes;
3219 then CCSHARED="-fPIC";
3220 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003221 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00003222 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00003223 else CCSHARED="+z";
3224 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003225 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003226 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003227 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003228 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003229 if test "$GCC" = "yes"
3230 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003231 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003232 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003233 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003234 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003235 IRIX*/6*) case $CC in
3236 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003237 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003238 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003239 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003240 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003241fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003242echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003243# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003244# the python executable -- this is only needed for a few systems
Michael W. Hudson54241132001-12-07 15:38:26 +00003245echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003246echo "configure:3247: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003247if test -z "$LINKFORSHARED"
3248then
Guido van Rossum07397971997-04-29 21:49:50 +00003249 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003250 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003251 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003252 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003253 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003254 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003255 # -u libsys_s pulls in all symbols in libsys
Michael W. Hudson54241132001-12-07 15:38:26 +00003256 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00003257 # -u __dummy makes the linker aware of the objc runtime
3258 # in System.framework; otherwise, __objcInit (referenced in
3259 # crt1.o) gets erroneously defined as common, which breaks dynamic
3260 # loading of any modules which reference it in System.framework.
3261 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3262 # not used by the core itself but which needs to be in the core so
3263 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00003264 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00003265 if test "$enable_framework"
3266 then
3267 LINKFORSHARED="$LINKFORSHARED -framework Python"
3268 fi
3269 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003270 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003271 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003272 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Michael W. Hudson54241132001-12-07 15:38:26 +00003273 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003274 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3275 then
3276 LINKFORSHARED="-Wl,--export-dynamic"
3277 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003278 SunOS/5*) case $CC in
3279 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003280 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003281 then
3282 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003283 fi;;
3284 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003285 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003286fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003287echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003288
Michael W. Hudson54241132001-12-07 15:38:26 +00003289
3290echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003291echo "configure:3292: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003292if test ! "$LIBRARY" = "$LDLIBRARY"
3293then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003294 case $ac_sys_system in
3295 CYGWIN*)
3296 # Cygwin needs CCSHARED when building extension DLLs
3297 # but not when building the interpreter DLL.
3298 CFLAGSFORSHARED='';;
3299 *)
3300 CFLAGSFORSHARED='$(CCSHARED)'
3301 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003302fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003303echo "$ac_t""$CFLAGSFORSHARED" 1>&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003304
Guido van Rossum627b2d71993-12-24 10:39:16 +00003305# checks for libraries
Michael W. Hudson54241132001-12-07 15:38:26 +00003306echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003307echo "configure:3308: checking for dlopen in -ldl" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003308ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3309if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3310 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003311else
Michael W. Hudson54241132001-12-07 15:38:26 +00003312 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003313LIBS="-ldl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003314cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003315#line 3316 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003316#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003317/* Override any gcc2 internal prototype to avoid an error. */
3318/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003319 builtin and then its argument prototype would still apply. */
3320char dlopen();
3321
3322int main() {
3323dlopen()
3324; return 0; }
3325EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003326if { (eval echo configure:3327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003327 rm -rf conftest*
3328 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003329else
Michael W. Hudson54241132001-12-07 15:38:26 +00003330 echo "configure: failed program was:" >&5
3331 cat conftest.$ac_ext >&5
3332 rm -rf conftest*
3333 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003334fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003335rm -f conftest*
3336LIBS="$ac_save_LIBS"
3337
Guido van Rossum627b2d71993-12-24 10:39:16 +00003338fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003339if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3340 echo "$ac_t""yes" 1>&6
3341 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3342 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3343 cat >> confdefs.h <<EOF
3344#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003345EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003346
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003347 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003348
Michael W. Hudson54241132001-12-07 15:38:26 +00003349else
3350 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003351fi
3352 # Dynamic linking for SunOS/Solaris and SYSV
Michael W. Hudson54241132001-12-07 15:38:26 +00003353echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Jack Jansen4f8d0542002-03-08 13:43:01 +00003354echo "configure:3355: checking for shl_load in -ldld" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003355ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
3356if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3357 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003358else
Michael W. Hudson54241132001-12-07 15:38:26 +00003359 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003360LIBS="-ldld $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003361cat > conftest.$ac_ext <<EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003362#line 3363 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003363#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003364/* Override any gcc2 internal prototype to avoid an error. */
3365/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003366 builtin and then its argument prototype would still apply. */
3367char shl_load();
3368
3369int main() {
3370shl_load()
3371; return 0; }
3372EOF
Jack Jansen4f8d0542002-03-08 13:43:01 +00003373if { (eval echo configure:3374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003374 rm -rf conftest*
3375 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003376else
Michael W. Hudson54241132001-12-07 15:38:26 +00003377 echo "configure: failed program was:" >&5
3378 cat conftest.$ac_ext >&5
3379 rm -rf conftest*
3380 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003381fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003382rm -f conftest*
3383LIBS="$ac_save_LIBS"
3384
Guido van Rossum627b2d71993-12-24 10:39:16 +00003385fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003386if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3387 echo "$ac_t""yes" 1>&6
3388 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3389 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3390 cat >> confdefs.h <<EOF
3391#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003392EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003393
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003394 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003395
Michael W. Hudson54241132001-12-07 15:38:26 +00003396else
3397 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003398fi
3399 # Dynamic linking for HP-UX
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003400echo $ac_n "checking for sem_init in -lrt""... $ac_c" 1>&6
3401echo "configure:3402: checking for sem_init in -lrt" >&5
3402ac_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
3409#line 3410 "configure"
3410#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
3420if { (eval echo configure:3421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3421 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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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 Warsawc0d24d82000-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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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 Warsawc0d24d82000-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 Warsawc0d24d82000-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 Warsawc0d24d82000-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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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öwis41933dd2002-03-21 15:10:58 +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"
Michael W. Hudson54241132001-12-07 15:38:26 +00004748
Neil Schemenauera35c6882001-02-27 04:45:05 +00004749if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00004750then cat >> confdefs.h <<\EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004751#define WITH_PYMALLOC 1
4752EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00004753 echo "$ac_t""yes" 1>&6
4754else echo "$ac_t""no" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004755fi
4756else
Michael W. Hudson54241132001-12-07 15:38:26 +00004757 echo "$ac_t""no" 1>&6
4758fi
4759
Neil Schemenauera35c6882001-02-27 04:45:05 +00004760
Barry Warsawef82cd72000-06-30 16:21:01 +00004761# Check for --with-wctype-functions
Michael W. Hudson54241132001-12-07 15:38:26 +00004762echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00004763echo "configure:4764: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004764# Check whether --with-wctype-functions or --without-wctype-functions was given.
4765if test "${with_wctype_functions+set}" = set; then
4766 withval="$with_wctype_functions"
Michael W. Hudson54241132001-12-07 15:38:26 +00004767
Barry Warsawef82cd72000-06-30 16:21:01 +00004768if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00004769then cat >> confdefs.h <<\EOF
Barry Warsawef82cd72000-06-30 16:21:01 +00004770#define WANT_WCTYPE_FUNCTIONS 1
4771EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00004772 echo "$ac_t""yes" 1>&6
4773else echo "$ac_t""no" 1>&6
Barry Warsawef82cd72000-06-30 16:21:01 +00004774fi
4775else
Michael W. Hudson54241132001-12-07 15:38:26 +00004776 echo "$ac_t""no" 1>&6
4777fi
4778
Barry Warsawef82cd72000-06-30 16:21:01 +00004779
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004780# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004781
Guido van Rossum98935bf2001-09-05 19:13:16 +00004782DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004783
Michael W. Hudson54241132001-12-07 15:38:26 +00004784echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00004785echo "configure:4786: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004786# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004787if test "${with_sgi_dl+set}" = set; then
4788 withval="$with_sgi_dl"
Michael W. Hudson54241132001-12-07 15:38:26 +00004789
4790echo "$ac_t""$withval" 1>&6
4791cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004792#define WITH_SGI_DL 1
4793EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004794
Guido van Rossume97ee181999-12-20 21:27:22 +00004795DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004796dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004797if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004798then LDFLAGS="$LDFLAGS -L$dldir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004799else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004800fi
4801DLINCLDIR=${dldir}
4802LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004803else
Michael W. Hudson54241132001-12-07 15:38:26 +00004804 echo "$ac_t""no" 1>&6
4805fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004806
4807
Michael W. Hudson54241132001-12-07 15:38:26 +00004808echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00004809echo "configure:4810: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004810# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004811if test "${with_dl_dld+set}" = set; then
4812 withval="$with_dl_dld"
Michael W. Hudson54241132001-12-07 15:38:26 +00004813
4814echo "$ac_t""$withval" 1>&6
4815cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004816#define WITH_DL_DLD 1
4817EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004818
Guido van Rossume97ee181999-12-20 21:27:22 +00004819DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004820dldir=`echo "$withval" | sed 's/,.*//'`
4821dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004822if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004823then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004824else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004825fi
4826DLINCLDIR=${dldir}
4827LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004828else
Michael W. Hudson54241132001-12-07 15:38:26 +00004829 echo "$ac_t""no" 1>&6
4830fi
4831
Guido van Rossum7f43da71994-08-01 12:15:30 +00004832
Guido van Rossume97ee181999-12-20 21:27:22 +00004833# the dlopen() function means we might want to use dynload_shlib.o. some
4834# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004835for ac_func in dlopen
4836do
Michael W. Hudson54241132001-12-07 15:38:26 +00004837echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00004838echo "configure:4839: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004839if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4840 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004841else
Michael W. Hudson54241132001-12-07 15:38:26 +00004842 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00004843#line 4844 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004844#include "confdefs.h"
4845/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004846 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004847#include <assert.h>
4848/* Override any gcc2 internal prototype to avoid an error. */
4849/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004850 builtin and then its argument prototype would still apply. */
4851char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004852
Michael W. Hudson54241132001-12-07 15:38:26 +00004853int main() {
4854
Guido van Rossume97ee181999-12-20 21:27:22 +00004855/* The GNU C library defines this for functions which it implements
4856 to always fail with ENOSYS. Some functions are actually named
4857 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004858#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004859choke me
4860#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004861$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004862#endif
4863
Michael W. Hudson54241132001-12-07 15:38:26 +00004864; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004865EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00004866if { (eval echo configure:4867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004867 rm -rf conftest*
4868 eval "ac_cv_func_$ac_func=yes"
4869else
4870 echo "configure: failed program was:" >&5
4871 cat conftest.$ac_ext >&5
4872 rm -rf conftest*
4873 eval "ac_cv_func_$ac_func=no"
4874fi
4875rm -f conftest*
4876fi
Guido van Rossume97ee181999-12-20 21:27:22 +00004877
Michael W. Hudson54241132001-12-07 15:38:26 +00004878if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4879 echo "$ac_t""yes" 1>&6
4880 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4881 cat >> confdefs.h <<EOF
4882#define $ac_tr_func 1
4883EOF
4884
4885else
4886 echo "$ac_t""no" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004887fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004888done
Guido van Rossume97ee181999-12-20 21:27:22 +00004889
Michael W. Hudson54241132001-12-07 15:38:26 +00004890
Guido van Rossume97ee181999-12-20 21:27:22 +00004891# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4892# loading of modules.
4893
Michael W. Hudson54241132001-12-07 15:38:26 +00004894echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00004895echo "configure:4896: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004896if test -z "$DYNLOADFILE"
4897then
4898 case $ac_sys_system/$ac_sys_release in
4899 AIX*) DYNLOADFILE="dynload_aix.o";;
4900 BeOS*) DYNLOADFILE="dynload_beos.o";;
4901 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004902 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004903 *)
4904 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4905 # out any dynamic loading
4906 if test "$ac_cv_func_dlopen" = yes
4907 then DYNLOADFILE="dynload_shlib.o"
4908 else DYNLOADFILE="dynload_stub.o"
4909 fi
4910 ;;
4911 esac
4912fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004913echo "$ac_t""$DYNLOADFILE" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004914if test "$DYNLOADFILE" != "dynload_stub.o"
4915then
Michael W. Hudson54241132001-12-07 15:38:26 +00004916 cat >> confdefs.h <<\EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004917#define HAVE_DYNAMIC_LOADING 1
4918EOF
4919
4920fi
4921
Neil Schemenauer4e425612001-06-19 15:44:15 +00004922# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4923
Michael W. Hudson54241132001-12-07 15:38:26 +00004924
4925echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00004926echo "configure:4927: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004927if test -z "$MACHDEP_OBJS"
4928then
Jack Jansene578a632001-08-15 01:27:14 +00004929 MACHDEP_OBJS=$extra_machdep_objs
4930else
4931 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004932fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004933echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004934
Guido van Rossum627b2d71993-12-24 10:39:16 +00004935# checks for library functions
Martin v. Löwis244edc82001-10-04 22:44:26 +00004936for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004937 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00004938 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004939 hstrerror inet_pton kill killpg link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004940 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004941 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +00004942 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004943 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004944 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004945 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +00004946 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004947do
Michael W. Hudson54241132001-12-07 15:38:26 +00004948echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00004949echo "configure:4950: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004950if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4951 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004952else
Michael W. Hudson54241132001-12-07 15:38:26 +00004953 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00004954#line 4955 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004955#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004956/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004957 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004958#include <assert.h>
4959/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004960/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004961 builtin and then its argument prototype would still apply. */
4962char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004963
Michael W. Hudson54241132001-12-07 15:38:26 +00004964int main() {
4965
Guido van Rossum627b2d71993-12-24 10:39:16 +00004966/* The GNU C library defines this for functions which it implements
4967 to always fail with ENOSYS. Some functions are actually named
4968 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004969#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004970choke me
4971#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004972$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004973#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004974
Michael W. Hudson54241132001-12-07 15:38:26 +00004975; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004976EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00004977if { (eval echo configure:4978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004978 rm -rf conftest*
4979 eval "ac_cv_func_$ac_func=yes"
4980else
4981 echo "configure: failed program was:" >&5
4982 cat conftest.$ac_ext >&5
4983 rm -rf conftest*
4984 eval "ac_cv_func_$ac_func=no"
4985fi
4986rm -f conftest*
4987fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00004988
Michael W. Hudson54241132001-12-07 15:38:26 +00004989if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4990 echo "$ac_t""yes" 1>&6
4991 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4992 cat >> confdefs.h <<EOF
4993#define $ac_tr_func 1
4994EOF
4995
4996else
4997 echo "$ac_t""no" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004998fi
4999done
5000
Michael W. Hudson54241132001-12-07 15:38:26 +00005001
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005002# check for openpty and forkpty
5003
5004for ac_func in openpty
5005do
Michael W. Hudson54241132001-12-07 15:38:26 +00005006echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005007echo "configure:5008: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005008if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5009 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005010else
Michael W. Hudson54241132001-12-07 15:38:26 +00005011 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005012#line 5013 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005013#include "confdefs.h"
5014/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005015 which can conflict with char $ac_func(); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005016#include <assert.h>
5017/* Override any gcc2 internal prototype to avoid an error. */
5018/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005019 builtin and then its argument prototype would still apply. */
5020char $ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005021
Michael W. Hudson54241132001-12-07 15:38:26 +00005022int main() {
5023
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005024/* The GNU C library defines this for functions which it implements
5025 to always fail with ENOSYS. Some functions are actually named
5026 something starting with __ and the normal name is an alias. */
5027#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5028choke me
5029#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005030$ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005031#endif
5032
Michael W. Hudson54241132001-12-07 15:38:26 +00005033; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005034EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005035if { (eval echo configure:5036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005036 rm -rf conftest*
5037 eval "ac_cv_func_$ac_func=yes"
5038else
5039 echo "configure: failed program was:" >&5
5040 cat conftest.$ac_ext >&5
5041 rm -rf conftest*
5042 eval "ac_cv_func_$ac_func=no"
5043fi
5044rm -f conftest*
5045fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005046
Michael W. Hudson54241132001-12-07 15:38:26 +00005047if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5048 echo "$ac_t""yes" 1>&6
5049 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5050 cat >> confdefs.h <<EOF
5051#define $ac_tr_func 1
5052EOF
5053
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005054else
Michael W. Hudson54241132001-12-07 15:38:26 +00005055 echo "$ac_t""no" 1>&6
5056echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005057echo "configure:5058: checking for openpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005058ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
5059if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5060 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005061else
Michael W. Hudson54241132001-12-07 15:38:26 +00005062 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005063LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005064cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005065#line 5066 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005066#include "confdefs.h"
5067/* Override any gcc2 internal prototype to avoid an error. */
5068/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005069 builtin and then its argument prototype would still apply. */
5070char openpty();
5071
5072int main() {
5073openpty()
5074; return 0; }
5075EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005076if { (eval echo configure:5077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005077 rm -rf conftest*
5078 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005079else
Michael W. Hudson54241132001-12-07 15:38:26 +00005080 echo "configure: failed program was:" >&5
5081 cat conftest.$ac_ext >&5
5082 rm -rf conftest*
5083 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005084fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005085rm -f conftest*
5086LIBS="$ac_save_LIBS"
5087
Fred Drake8cef4cf2000-06-28 16:40:38 +00005088fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005089if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5090 echo "$ac_t""yes" 1>&6
5091 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005092#define HAVE_OPENPTY 1
5093EOF
5094 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005095else
5096 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005097fi
5098
5099fi
5100done
5101
5102for ac_func in forkpty
5103do
Michael W. Hudson54241132001-12-07 15:38:26 +00005104echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005105echo "configure:5106: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005106if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5107 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005108else
Michael W. Hudson54241132001-12-07 15:38:26 +00005109 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005110#line 5111 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005111#include "confdefs.h"
5112/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005113 which can conflict with char $ac_func(); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +00005114#include <assert.h>
5115/* Override any gcc2 internal prototype to avoid an error. */
5116/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005117 builtin and then its argument prototype would still apply. */
5118char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005119
Michael W. Hudson54241132001-12-07 15:38:26 +00005120int main() {
5121
Fred Drake8cef4cf2000-06-28 16:40:38 +00005122/* The GNU C library defines this for functions which it implements
5123 to always fail with ENOSYS. Some functions are actually named
5124 something starting with __ and the normal name is an alias. */
5125#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5126choke me
5127#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005128$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005129#endif
5130
Michael W. Hudson54241132001-12-07 15:38:26 +00005131; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005132EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005133if { (eval echo configure:5134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005134 rm -rf conftest*
5135 eval "ac_cv_func_$ac_func=yes"
5136else
5137 echo "configure: failed program was:" >&5
5138 cat conftest.$ac_ext >&5
5139 rm -rf conftest*
5140 eval "ac_cv_func_$ac_func=no"
5141fi
5142rm -f conftest*
5143fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00005144
Michael W. Hudson54241132001-12-07 15:38:26 +00005145if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5146 echo "$ac_t""yes" 1>&6
5147 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5148 cat >> confdefs.h <<EOF
5149#define $ac_tr_func 1
5150EOF
5151
Fred Drake8cef4cf2000-06-28 16:40:38 +00005152else
Michael W. Hudson54241132001-12-07 15:38:26 +00005153 echo "$ac_t""no" 1>&6
5154echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005155echo "configure:5156: checking for forkpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005156ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
5157if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5158 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005159else
Michael W. Hudson54241132001-12-07 15:38:26 +00005160 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005161LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005162cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005163#line 5164 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005164#include "confdefs.h"
5165/* Override any gcc2 internal prototype to avoid an error. */
5166/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005167 builtin and then its argument prototype would still apply. */
5168char forkpty();
5169
5170int main() {
5171forkpty()
5172; return 0; }
5173EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005174if { (eval echo configure:5175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005175 rm -rf conftest*
5176 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005177else
Michael W. Hudson54241132001-12-07 15:38:26 +00005178 echo "configure: failed program was:" >&5
5179 cat conftest.$ac_ext >&5
5180 rm -rf conftest*
5181 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005182fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005183rm -f conftest*
5184LIBS="$ac_save_LIBS"
5185
Fred Drake8cef4cf2000-06-28 16:40:38 +00005186fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005187if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5188 echo "$ac_t""yes" 1>&6
5189 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005190#define HAVE_FORKPTY 1
5191EOF
5192 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005193else
5194 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005195fi
5196
5197fi
5198done
5199
Jack Jansendd19cf82001-12-06 22:36:17 +00005200
Michael W. Hudson54241132001-12-07 15:38:26 +00005201# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +00005202for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
5203do
Michael W. Hudson54241132001-12-07 15:38:26 +00005204echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005205echo "configure:5206: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005206if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5207 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005208else
Michael W. Hudson54241132001-12-07 15:38:26 +00005209 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005210#line 5211 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005211#include "confdefs.h"
5212/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005213 which can conflict with char $ac_func(); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +00005214#include <assert.h>
5215/* Override any gcc2 internal prototype to avoid an error. */
5216/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005217 builtin and then its argument prototype would still apply. */
5218char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005219
Michael W. Hudson54241132001-12-07 15:38:26 +00005220int main() {
5221
Fred Drake8cef4cf2000-06-28 16:40:38 +00005222/* The GNU C library defines this for functions which it implements
5223 to always fail with ENOSYS. Some functions are actually named
5224 something starting with __ and the normal name is an alias. */
5225#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5226choke me
5227#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005228$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005229#endif
5230
Michael W. Hudson54241132001-12-07 15:38:26 +00005231; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005232EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005233if { (eval echo configure:5234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005234 rm -rf conftest*
5235 eval "ac_cv_func_$ac_func=yes"
5236else
5237 echo "configure: failed program was:" >&5
5238 cat conftest.$ac_ext >&5
5239 rm -rf conftest*
5240 eval "ac_cv_func_$ac_func=no"
5241fi
5242rm -f conftest*
5243fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005244
Michael W. Hudson54241132001-12-07 15:38:26 +00005245if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5246 echo "$ac_t""yes" 1>&6
5247 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5248 cat >> confdefs.h <<EOF
5249#define $ac_tr_func 1
5250EOF
5251
5252else
5253 echo "$ac_t""no" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005254fi
5255done
5256
Michael W. Hudson54241132001-12-07 15:38:26 +00005257
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005258for ac_func in dup2 getcwd strdup strerror memmove
5259do
Michael W. Hudson54241132001-12-07 15:38:26 +00005260echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005261echo "configure:5262: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005262if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5263 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005264else
Michael W. Hudson54241132001-12-07 15:38:26 +00005265 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005266#line 5267 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005267#include "confdefs.h"
5268/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005269 which can conflict with char $ac_func(); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005270#include <assert.h>
5271/* Override any gcc2 internal prototype to avoid an error. */
5272/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005273 builtin and then its argument prototype would still apply. */
5274char $ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005275
Michael W. Hudson54241132001-12-07 15:38:26 +00005276int main() {
5277
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005278/* The GNU C library defines this for functions which it implements
5279 to always fail with ENOSYS. Some functions are actually named
5280 something starting with __ and the normal name is an alias. */
5281#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5282choke me
5283#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005284$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005285#endif
5286
Michael W. Hudson54241132001-12-07 15:38:26 +00005287; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005288EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005289if { (eval echo configure:5290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005290 rm -rf conftest*
5291 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005292else
Michael W. Hudson54241132001-12-07 15:38:26 +00005293 echo "configure: failed program was:" >&5
5294 cat conftest.$ac_ext >&5
5295 rm -rf conftest*
5296 eval "ac_cv_func_$ac_func=no"
5297fi
5298rm -f conftest*
5299fi
5300
5301if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5302 echo "$ac_t""yes" 1>&6
5303 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5304 cat >> confdefs.h <<EOF
5305#define $ac_tr_func 1
5306EOF
5307
5308else
5309 echo "$ac_t""no" 1>&6
5310LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005311fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005312done
5313
Michael W. Hudson54241132001-12-07 15:38:26 +00005314
Thomas Wouters3a584202000-08-05 23:28:51 +00005315for ac_func in getpgrp
5316do
Michael W. Hudson54241132001-12-07 15:38:26 +00005317echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005318echo "configure:5319: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005319if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5320 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005321else
Michael W. Hudson54241132001-12-07 15:38:26 +00005322 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005323#line 5324 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005324#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005325/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005326 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005327#include <assert.h>
5328/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005329/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005330 builtin and then its argument prototype would still apply. */
5331char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005332
Michael W. Hudson54241132001-12-07 15:38:26 +00005333int main() {
5334
Guido van Rossum627b2d71993-12-24 10:39:16 +00005335/* The GNU C library defines this for functions which it implements
5336 to always fail with ENOSYS. Some functions are actually named
5337 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005338#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005339choke me
5340#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005341$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005342#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005343
Michael W. Hudson54241132001-12-07 15:38:26 +00005344; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005345EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005346if { (eval echo configure:5347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005347 rm -rf conftest*
5348 eval "ac_cv_func_$ac_func=yes"
5349else
5350 echo "configure: failed program was:" >&5
5351 cat conftest.$ac_ext >&5
5352 rm -rf conftest*
5353 eval "ac_cv_func_$ac_func=no"
5354fi
5355rm -f conftest*
5356fi
5357
5358if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5359 echo "$ac_t""yes" 1>&6
5360 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5361 cat >> confdefs.h <<EOF
5362#define $ac_tr_func 1
5363EOF
5364 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005365#line 5366 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005366#include "confdefs.h"
5367#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005368int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005369getpgrp(0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005370; return 0; }
5371EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005372if { (eval echo configure:5373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005373 rm -rf conftest*
5374 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005375#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005376EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005377
Guido van Rossumf78abae1997-01-21 22:02:36 +00005378else
Michael W. Hudson54241132001-12-07 15:38:26 +00005379 echo "configure: failed program was:" >&5
5380 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005381fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005382rm -f conftest*
5383else
5384 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005385fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005386done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005387
Thomas Wouters3a584202000-08-05 23:28:51 +00005388for ac_func in setpgrp
5389do
Michael W. Hudson54241132001-12-07 15:38:26 +00005390echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005391echo "configure:5392: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005392if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5393 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005394else
Michael W. Hudson54241132001-12-07 15:38:26 +00005395 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005396#line 5397 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005397#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005398/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005399 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005400#include <assert.h>
5401/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005402/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005403 builtin and then its argument prototype would still apply. */
5404char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005405
Michael W. Hudson54241132001-12-07 15:38:26 +00005406int main() {
5407
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005408/* The GNU C library defines this for functions which it implements
5409 to always fail with ENOSYS. Some functions are actually named
5410 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005411#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005412choke me
5413#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005414$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005415#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005416
Michael W. Hudson54241132001-12-07 15:38:26 +00005417; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005418EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005419if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005420 rm -rf conftest*
5421 eval "ac_cv_func_$ac_func=yes"
5422else
5423 echo "configure: failed program was:" >&5
5424 cat conftest.$ac_ext >&5
5425 rm -rf conftest*
5426 eval "ac_cv_func_$ac_func=no"
5427fi
5428rm -f conftest*
5429fi
5430
5431if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5432 echo "$ac_t""yes" 1>&6
5433 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5434 cat >> confdefs.h <<EOF
5435#define $ac_tr_func 1
5436EOF
5437 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005438#line 5439 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005439#include "confdefs.h"
5440#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005441int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005442setpgrp(0,0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005443; return 0; }
5444EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005445if { (eval echo configure:5446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005446 rm -rf conftest*
5447 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005448#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005449EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005450
Guido van Rossumf78abae1997-01-21 22:02:36 +00005451else
Michael W. Hudson54241132001-12-07 15:38:26 +00005452 echo "configure: failed program was:" >&5
5453 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005454fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005455rm -f conftest*
5456else
5457 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005458fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005459done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005460
Thomas Wouters3a584202000-08-05 23:28:51 +00005461for ac_func in gettimeofday
5462do
Michael W. Hudson54241132001-12-07 15:38:26 +00005463echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005464echo "configure:5465: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005465if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5466 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005467else
Michael W. Hudson54241132001-12-07 15:38:26 +00005468 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005469#line 5470 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005470#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005471/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005472 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005473#include <assert.h>
5474/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005475/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005476 builtin and then its argument prototype would still apply. */
5477char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005478
Michael W. Hudson54241132001-12-07 15:38:26 +00005479int main() {
5480
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005481/* The GNU C library defines this for functions which it implements
5482 to always fail with ENOSYS. Some functions are actually named
5483 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005484#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005485choke me
5486#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005487$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005488#endif
5489
Michael W. Hudson54241132001-12-07 15:38:26 +00005490; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005491EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005492if { (eval echo configure:5493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005493 rm -rf conftest*
5494 eval "ac_cv_func_$ac_func=yes"
5495else
5496 echo "configure: failed program was:" >&5
5497 cat conftest.$ac_ext >&5
5498 rm -rf conftest*
5499 eval "ac_cv_func_$ac_func=no"
5500fi
5501rm -f conftest*
5502fi
5503
5504if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5505 echo "$ac_t""yes" 1>&6
5506 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5507 cat >> confdefs.h <<EOF
5508#define $ac_tr_func 1
5509EOF
5510 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005511#line 5512 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005512#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005513#include <sys/time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005514int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005515gettimeofday((struct timeval*)0,(struct timezone*)0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005516; return 0; }
5517EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005518if { (eval echo configure:5519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005519 :
5520else
Michael W. Hudson54241132001-12-07 15:38:26 +00005521 echo "configure: failed program was:" >&5
5522 cat conftest.$ac_ext >&5
5523 rm -rf conftest*
5524 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005525#define GETTIMEOFDAY_NO_TZ 1
5526EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005527
5528fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005529rm -f conftest*
5530else
5531 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005532fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005533done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005534
Michael W. Hudson54241132001-12-07 15:38:26 +00005535
5536
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005537# On OSF/1 V5.1, getaddrinfo is available, but a define
Michael W. Hudson54241132001-12-07 15:38:26 +00005538# for [no]getaddrinfo in netdb.h.
5539echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005540echo "configure:5541: checking for getaddrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005541cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005542#line 5543 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005543#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005544
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005545#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005546#include <sys/socket.h>
5547#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005548#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005549
Michael W. Hudson54241132001-12-07 15:38:26 +00005550int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005551
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005552getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005553
Michael W. Hudson54241132001-12-07 15:38:26 +00005554; return 0; }
5555EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005556if { (eval echo configure:5557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005557 rm -rf conftest*
5558
5559echo "$ac_t""yes" 1>&6
5560echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005561echo "configure:5562: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005562if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005563 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005564buggygetaddrinfo=yes
5565else
Michael W. Hudson54241132001-12-07 15:38:26 +00005566 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005567#line 5568 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005568#include "confdefs.h"
5569
5570#include <sys/types.h>
5571#include <netdb.h>
5572#include <string.h>
5573#include <sys/socket.h>
5574#include <netinet/in.h>
5575
5576main()
5577{
5578 int passive, gaierr, inet4 = 0, inet6 = 0;
5579 struct addrinfo hints, *ai, *aitop;
5580 char straddr[INET6_ADDRSTRLEN], strport[16];
5581
5582 for (passive = 0; passive <= 1; passive++) {
5583 memset(&hints, 0, sizeof(hints));
5584 hints.ai_family = AF_UNSPEC;
5585 hints.ai_flags = passive ? AI_PASSIVE : 0;
5586 hints.ai_socktype = SOCK_STREAM;
5587 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5588 (void)gai_strerror(gaierr);
5589 goto bad;
5590 }
5591 for (ai = aitop; ai; ai = ai->ai_next) {
5592 if (ai->ai_addr == NULL ||
5593 ai->ai_addrlen == 0 ||
5594 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5595 straddr, sizeof(straddr), strport, sizeof(strport),
5596 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5597 goto bad;
5598 }
5599 switch (ai->ai_family) {
5600 case AF_INET:
5601 if (strcmp(strport, "54321") != 0) {
5602 goto bad;
5603 }
5604 if (passive) {
5605 if (strcmp(straddr, "0.0.0.0") != 0) {
5606 goto bad;
5607 }
5608 } else {
5609 if (strcmp(straddr, "127.0.0.1") != 0) {
5610 goto bad;
5611 }
5612 }
5613 inet4++;
5614 break;
5615 case AF_INET6:
5616 if (strcmp(strport, "54321") != 0) {
5617 goto bad;
5618 }
5619 if (passive) {
5620 if (strcmp(straddr, "::") != 0) {
5621 goto bad;
5622 }
5623 } else {
5624 if (strcmp(straddr, "::1") != 0) {
5625 goto bad;
5626 }
5627 }
5628 inet6++;
5629 break;
5630 case AF_UNSPEC:
5631 goto bad;
5632 break;
5633 default:
5634 /* another family support? */
5635 break;
5636 }
5637 }
5638 }
5639
5640 if (!(inet4 == 0 || inet4 == 2))
5641 goto bad;
5642 if (!(inet6 == 0 || inet6 == 2))
5643 goto bad;
5644
5645 if (aitop)
5646 freeaddrinfo(aitop);
5647 exit(0);
5648
5649 bad:
5650 if (aitop)
5651 freeaddrinfo(aitop);
5652 exit(1);
5653}
5654
Michael W. Hudson54241132001-12-07 15:38:26 +00005655EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005656if { (eval echo configure:5657: \"$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 +00005657then
5658 echo "$ac_t""good" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005659buggygetaddrinfo=no
5660else
Michael W. Hudson54241132001-12-07 15:38:26 +00005661 echo "configure: failed program was:" >&5
5662 cat conftest.$ac_ext >&5
5663 rm -fr conftest*
5664 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005665buggygetaddrinfo=yes
5666fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005667rm -fr conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005668fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005669
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005670else
Michael W. Hudson54241132001-12-07 15:38:26 +00005671 echo "configure: failed program was:" >&5
5672 cat conftest.$ac_ext >&5
5673 rm -rf conftest*
5674
5675echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005676buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005677
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005678fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005679rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005680
5681if test "$buggygetaddrinfo" = "yes"; then
5682 if test "$ipv6" = "yes"; then
5683 echo 'Fatal: You must get working getaddrinfo() function.'
5684 echo ' or you can specify "--disable-ipv6"'.
5685 exit 1
5686 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005687else
Michael W. Hudson54241132001-12-07 15:38:26 +00005688 cat >> confdefs.h <<\EOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005689#define HAVE_GETADDRINFO 1
5690EOF
5691
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005692fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005693for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005694do
Michael W. Hudson54241132001-12-07 15:38:26 +00005695echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005696echo "configure:5697: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005697if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5698 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005699else
Michael W. Hudson54241132001-12-07 15:38:26 +00005700 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005701#line 5702 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005702#include "confdefs.h"
5703/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005704 which can conflict with char $ac_func(); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005705#include <assert.h>
5706/* Override any gcc2 internal prototype to avoid an error. */
5707/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005708 builtin and then its argument prototype would still apply. */
5709char $ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005710
Michael W. Hudson54241132001-12-07 15:38:26 +00005711int main() {
5712
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005713/* The GNU C library defines this for functions which it implements
5714 to always fail with ENOSYS. Some functions are actually named
5715 something starting with __ and the normal name is an alias. */
5716#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5717choke me
5718#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005719$ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005720#endif
5721
Michael W. Hudson54241132001-12-07 15:38:26 +00005722; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005723EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005724if { (eval echo configure:5725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005725 rm -rf conftest*
5726 eval "ac_cv_func_$ac_func=yes"
5727else
5728 echo "configure: failed program was:" >&5
5729 cat conftest.$ac_ext >&5
5730 rm -rf conftest*
5731 eval "ac_cv_func_$ac_func=no"
5732fi
5733rm -f conftest*
5734fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005735
Michael W. Hudson54241132001-12-07 15:38:26 +00005736if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5737 echo "$ac_t""yes" 1>&6
5738 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5739 cat >> confdefs.h <<EOF
5740#define $ac_tr_func 1
5741EOF
5742
5743else
5744 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005745fi
5746done
5747
Michael W. Hudson54241132001-12-07 15:38:26 +00005748
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005749# checks for structures
Michael W. Hudson54241132001-12-07 15:38:26 +00005750echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005751echo "configure:5752: checking whether time.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005752if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5753 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005754else
Michael W. Hudson54241132001-12-07 15:38:26 +00005755 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005756#line 5757 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005757#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005758#include <sys/types.h>
5759#include <sys/time.h>
5760#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005761int main() {
5762struct tm *tp;
5763; return 0; }
5764EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005765if { (eval echo configure:5766: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005766 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005767 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005768else
Michael W. Hudson54241132001-12-07 15:38:26 +00005769 echo "configure: failed program was:" >&5
5770 cat conftest.$ac_ext >&5
5771 rm -rf conftest*
5772 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005773fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005774rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005775fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005776
Michael W. Hudson54241132001-12-07 15:38:26 +00005777echo "$ac_t""$ac_cv_header_time" 1>&6
5778if test $ac_cv_header_time = yes; then
5779 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005780#define TIME_WITH_SYS_TIME 1
5781EOF
5782
5783fi
5784
Michael W. Hudson54241132001-12-07 15:38:26 +00005785echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005786echo "configure:5787: checking whether struct tm is in sys/time.h or time.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005787if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5788 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005789else
Michael W. Hudson54241132001-12-07 15:38:26 +00005790 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005791#line 5792 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005792#include "confdefs.h"
5793#include <sys/types.h>
5794#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005795int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005796struct tm *tp; tp->tm_sec;
Michael W. Hudson54241132001-12-07 15:38:26 +00005797; return 0; }
5798EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005799if { (eval echo configure:5800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005800 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005801 ac_cv_struct_tm=time.h
5802else
Michael W. Hudson54241132001-12-07 15:38:26 +00005803 echo "configure: failed program was:" >&5
5804 cat conftest.$ac_ext >&5
5805 rm -rf conftest*
5806 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005807fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005808rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005809fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005810
Michael W. Hudson54241132001-12-07 15:38:26 +00005811echo "$ac_t""$ac_cv_struct_tm" 1>&6
5812if test $ac_cv_struct_tm = sys/time.h; then
5813 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005814#define TM_IN_SYS_TIME 1
5815EOF
5816
5817fi
5818
Michael W. Hudson54241132001-12-07 15:38:26 +00005819echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005820echo "configure:5821: checking for tm_zone in struct tm" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005821if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5822 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005823else
Michael W. Hudson54241132001-12-07 15:38:26 +00005824 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005825#line 5826 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005826#include "confdefs.h"
5827#include <sys/types.h>
5828#include <$ac_cv_struct_tm>
Michael W. Hudson54241132001-12-07 15:38:26 +00005829int main() {
5830struct tm tm; tm.tm_zone;
5831; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005832EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005833if { (eval echo configure:5834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005834 rm -rf conftest*
5835 ac_cv_struct_tm_zone=yes
5836else
5837 echo "configure: failed program was:" >&5
5838 cat conftest.$ac_ext >&5
5839 rm -rf conftest*
5840 ac_cv_struct_tm_zone=no
5841fi
5842rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005843fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005844
Michael W. Hudson54241132001-12-07 15:38:26 +00005845echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5846if test "$ac_cv_struct_tm_zone" = yes; then
5847 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005848#define HAVE_TM_ZONE 1
5849EOF
5850
5851else
Michael W. Hudson54241132001-12-07 15:38:26 +00005852 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005853echo "configure:5854: checking for tzname" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005854if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5855 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005856else
Michael W. Hudson54241132001-12-07 15:38:26 +00005857 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005858#line 5859 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005859#include "confdefs.h"
5860#include <time.h>
5861#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005862extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005863#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005864int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005865atoi(*tzname);
Michael W. Hudson54241132001-12-07 15:38:26 +00005866; return 0; }
5867EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005868if { (eval echo configure:5869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005869 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005870 ac_cv_var_tzname=yes
5871else
Michael W. Hudson54241132001-12-07 15:38:26 +00005872 echo "configure: failed program was:" >&5
5873 cat conftest.$ac_ext >&5
5874 rm -rf conftest*
5875 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005876fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005877rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005878fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005879
Michael W. Hudson54241132001-12-07 15:38:26 +00005880echo "$ac_t""$ac_cv_var_tzname" 1>&6
5881 if test $ac_cv_var_tzname = yes; then
5882 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005883#define HAVE_TZNAME 1
5884EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005885
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005886 fi
5887fi
5888
Michael W. Hudson54241132001-12-07 15:38:26 +00005889echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005890echo "configure:5891: checking for st_rdev in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005891if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
5892 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005893else
Michael W. Hudson54241132001-12-07 15:38:26 +00005894 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005895#line 5896 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005896#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005897#include <sys/types.h>
5898#include <sys/stat.h>
5899int main() {
5900struct stat s; s.st_rdev;
5901; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005902EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005903if { (eval echo configure:5904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005904 rm -rf conftest*
5905 ac_cv_struct_st_rdev=yes
5906else
5907 echo "configure: failed program was:" >&5
5908 cat conftest.$ac_ext >&5
5909 rm -rf conftest*
5910 ac_cv_struct_st_rdev=no
5911fi
5912rm -f conftest*
5913fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005914
Michael W. Hudson54241132001-12-07 15:38:26 +00005915echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
5916if test $ac_cv_struct_st_rdev = yes; then
5917 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005918#define HAVE_ST_RDEV 1
5919EOF
5920
5921fi
5922
Michael W. Hudson54241132001-12-07 15:38:26 +00005923echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005924echo "configure:5925: checking for st_blksize in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005925if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
5926 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005927else
Michael W. Hudson54241132001-12-07 15:38:26 +00005928 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005929#line 5930 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005930#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005931#include <sys/types.h>
5932#include <sys/stat.h>
5933int main() {
5934struct stat s; s.st_blksize;
5935; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005936EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005937if { (eval echo configure:5938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005938 rm -rf conftest*
5939 ac_cv_struct_st_blksize=yes
5940else
5941 echo "configure: failed program was:" >&5
5942 cat conftest.$ac_ext >&5
5943 rm -rf conftest*
5944 ac_cv_struct_st_blksize=no
5945fi
5946rm -f conftest*
5947fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005948
Michael W. Hudson54241132001-12-07 15:38:26 +00005949echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
5950if test $ac_cv_struct_st_blksize = yes; then
5951 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005952#define HAVE_ST_BLKSIZE 1
5953EOF
5954
5955fi
5956
Michael W. Hudson54241132001-12-07 15:38:26 +00005957echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005958echo "configure:5959: checking for st_blocks in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005959if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
5960 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005961else
Michael W. Hudson54241132001-12-07 15:38:26 +00005962 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005963#line 5964 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005964#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005965#include <sys/types.h>
5966#include <sys/stat.h>
5967int main() {
5968struct stat s; s.st_blocks;
5969; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005970EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005971if { (eval echo configure:5972: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005972 rm -rf conftest*
5973 ac_cv_struct_st_blocks=yes
5974else
5975 echo "configure: failed program was:" >&5
5976 cat conftest.$ac_ext >&5
5977 rm -rf conftest*
5978 ac_cv_struct_st_blocks=no
5979fi
5980rm -f conftest*
5981fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005982
Michael W. Hudson54241132001-12-07 15:38:26 +00005983echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
5984if test $ac_cv_struct_st_blocks = yes; then
5985 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005986#define HAVE_ST_BLOCKS 1
5987EOF
5988
5989else
Michael W. Hudson54241132001-12-07 15:38:26 +00005990 LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005991fi
5992
Michael W. Hudson54241132001-12-07 15:38:26 +00005993
5994echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00005995echo "configure:5996: checking for time.h that defines altzone" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005996if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
5997 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005998else
Michael W. Hudson54241132001-12-07 15:38:26 +00005999 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006000#line 6001 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006001#include "confdefs.h"
6002#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006003int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006004return altzone;
Michael W. Hudson54241132001-12-07 15:38:26 +00006005; return 0; }
6006EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006007if { (eval echo configure:6008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006008 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006009 ac_cv_header_time_altzone=yes
6010else
Michael W. Hudson54241132001-12-07 15:38:26 +00006011 echo "configure: failed program was:" >&5
6012 cat conftest.$ac_ext >&5
6013 rm -rf conftest*
6014 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006015fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006016rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006017fi
6018
Michael W. Hudson54241132001-12-07 15:38:26 +00006019echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006020if test $ac_cv_header_time_altzone = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006021 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006022#define HAVE_ALTZONE 1
6023EOF
6024
6025fi
6026
Guido van Rossumda88dad1995-01-26 00:46:29 +00006027was_it_defined=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006028echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006029echo "configure:6030: checking whether sys/select.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006030cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006031#line 6032 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006032#include "confdefs.h"
6033
6034#include <sys/types.h>
6035#include <sys/select.h>
6036#include <sys/time.h>
6037
Michael W. Hudson54241132001-12-07 15:38:26 +00006038int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006039;
Michael W. Hudson54241132001-12-07 15:38:26 +00006040; return 0; }
6041EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006042if { (eval echo configure:6043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006043 rm -rf conftest*
6044 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006045#define SYS_SELECT_WITH_SYS_TIME 1
6046EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006047 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006048else
Michael W. Hudson54241132001-12-07 15:38:26 +00006049 echo "configure: failed program was:" >&5
6050 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006051fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006052rm -f conftest*
6053echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006054
Michael W. Hudson54241132001-12-07 15:38:26 +00006055echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006056echo "configure:6057: checking for addrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006057if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
6058 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006059else
Michael W. Hudson54241132001-12-07 15:38:26 +00006060 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006061#line 6062 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006062#include "confdefs.h"
6063
6064# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006065int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006066struct addrinfo a
Michael W. Hudson54241132001-12-07 15:38:26 +00006067; return 0; }
6068EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006069if { (eval echo configure:6070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006070 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006071 ac_cv_struct_addrinfo=yes
6072else
Michael W. Hudson54241132001-12-07 15:38:26 +00006073 echo "configure: failed program was:" >&5
6074 cat conftest.$ac_ext >&5
6075 rm -rf conftest*
6076 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006077fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006078rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006079fi
6080
Michael W. Hudson54241132001-12-07 15:38:26 +00006081echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006082if test $ac_cv_struct_addrinfo = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006083 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006084#define HAVE_ADDRINFO 1
6085EOF
6086
6087fi
6088
Michael W. Hudson54241132001-12-07 15:38:26 +00006089echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006090echo "configure:6091: checking for sockaddr_storage" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006091if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
6092 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006093else
Michael W. Hudson54241132001-12-07 15:38:26 +00006094 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006095#line 6096 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006096#include "confdefs.h"
6097
6098# include <sys/types.h>
6099# include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006100int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006101struct sockaddr_storage s
Michael W. Hudson54241132001-12-07 15:38:26 +00006102; return 0; }
6103EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006104if { (eval echo configure:6105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006105 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006106 ac_cv_struct_sockaddr_storage=yes
6107else
Michael W. Hudson54241132001-12-07 15:38:26 +00006108 echo "configure: failed program was:" >&5
6109 cat conftest.$ac_ext >&5
6110 rm -rf conftest*
6111 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006112fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006113rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006114fi
6115
Michael W. Hudson54241132001-12-07 15:38:26 +00006116echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006117if test $ac_cv_struct_sockaddr_storage = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006118 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006119#define HAVE_SOCKADDR_STORAGE 1
6120EOF
6121
6122fi
6123
Guido van Rossum627b2d71993-12-24 10:39:16 +00006124# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00006125
Michael W. Hudson54241132001-12-07 15:38:26 +00006126echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006127echo "configure:6128: checking whether char is unsigned" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006128if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
6129 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006130else
Michael W. Hudson54241132001-12-07 15:38:26 +00006131 if test "$GCC" = yes; then
6132 # GCC predefines this symbol on systems where it applies.
6133cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006134#line 6135 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006135#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00006136#ifdef __CHAR_UNSIGNED__
6137 yes
6138#endif
6139
6140EOF
6141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6142 egrep "yes" >/dev/null 2>&1; then
6143 rm -rf conftest*
6144 ac_cv_c_char_unsigned=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006145else
Michael W. Hudson54241132001-12-07 15:38:26 +00006146 rm -rf conftest*
6147 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006148fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006149rm -f conftest*
6150
6151else
6152if test "$cross_compiling" = yes; then
6153 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6154else
6155 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006156#line 6157 "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +00006157#include "confdefs.h"
6158/* volatile prevents gcc2 from optimizing the test away on sparcs. */
6159#if !defined(__STDC__) || __STDC__ != 1
6160#define volatile
6161#endif
6162main() {
6163 volatile char c = 255; exit(c < 0);
6164}
6165EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006166if { (eval echo configure:6167: \"$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 +00006167then
6168 ac_cv_c_char_unsigned=yes
6169else
6170 echo "configure: failed program was:" >&5
6171 cat conftest.$ac_ext >&5
6172 rm -fr conftest*
6173 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006174fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006175rm -fr conftest*
6176fi
6177
6178fi
6179fi
6180
6181echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006182if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006183 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006184#define __CHAR_UNSIGNED__ 1
6185EOF
6186
6187fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006188
Michael W. Hudson54241132001-12-07 15:38:26 +00006189echo $ac_n "checking for working const""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006190echo "configure:6191: checking for working const" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006191if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6192 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006193else
Michael W. Hudson54241132001-12-07 15:38:26 +00006194 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006195#line 6196 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006196#include "confdefs.h"
6197
Michael W. Hudson54241132001-12-07 15:38:26 +00006198int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006199
Michael W. Hudson54241132001-12-07 15:38:26 +00006200/* Ultrix mips cc rejects this. */
6201typedef int charset[2]; const charset x;
6202/* SunOS 4.1.1 cc rejects this. */
6203char const *const *ccp;
6204char **p;
6205/* NEC SVR4.0.2 mips cc rejects this. */
6206struct point {int x, y;};
6207static struct point const zero = {0,0};
6208/* AIX XL C 1.02.0.0 rejects this.
6209 It does not let you subtract one const X* pointer from another in an arm
6210 of an if-expression whose if-part is not a constant expression */
6211const char *g = "string";
6212ccp = &g + (g ? g-g : 0);
6213/* HPUX 7.0 cc rejects these. */
6214++ccp;
6215p = (char**) ccp;
6216ccp = (char const *const *) p;
6217{ /* SCO 3.2v4 cc rejects this. */
6218 char *t;
6219 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006220
Michael W. Hudson54241132001-12-07 15:38:26 +00006221 *t++ = 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006222}
Michael W. Hudson54241132001-12-07 15:38:26 +00006223{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6224 int x[] = {25, 17};
6225 const int *foo = &x[0];
6226 ++foo;
6227}
6228{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6229 typedef const int *iptr;
6230 iptr p = 0;
6231 ++p;
6232}
6233{ /* AIX XL C 1.02.0.0 rejects this saying
6234 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6235 struct s { int j; const int *ap[3]; };
6236 struct s *b; b->j = 5;
6237}
6238{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6239 const int foo = 10;
6240}
6241
6242; return 0; }
6243EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006244if { (eval echo configure:6245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006245 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006246 ac_cv_c_const=yes
6247else
Michael W. Hudson54241132001-12-07 15:38:26 +00006248 echo "configure: failed program was:" >&5
6249 cat conftest.$ac_ext >&5
6250 rm -rf conftest*
6251 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006252fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006253rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006254fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006255
6256echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006257if test $ac_cv_c_const = no; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006258 cat >> confdefs.h <<\EOF
6259#define const
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006260EOF
6261
6262fi
6263
Michael W. Hudson54241132001-12-07 15:38:26 +00006264
Guido van Rossumda88dad1995-01-26 00:46:29 +00006265works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006266echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006267echo "configure:6268: checking for working volatile" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006268cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006269#line 6270 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006270#include "confdefs.h"
6271
Michael W. Hudson54241132001-12-07 15:38:26 +00006272int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006273volatile int x; x = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006274; return 0; }
6275EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006276if { (eval echo configure:6277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006277 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006278 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006279else
Michael W. Hudson54241132001-12-07 15:38:26 +00006280 echo "configure: failed program was:" >&5
6281 cat conftest.$ac_ext >&5
6282 rm -rf conftest*
6283 cat >> confdefs.h <<\EOF
6284#define volatile
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006285EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006286
6287fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006288rm -f conftest*
6289echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006290
Guido van Rossumda88dad1995-01-26 00:46:29 +00006291works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006292echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006293echo "configure:6294: checking for working signed char" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006294cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006295#line 6296 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006296#include "confdefs.h"
6297
Michael W. Hudson54241132001-12-07 15:38:26 +00006298int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006299signed char c;
Michael W. Hudson54241132001-12-07 15:38:26 +00006300; return 0; }
6301EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006302if { (eval echo configure:6303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006303 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006304 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006305else
Michael W. Hudson54241132001-12-07 15:38:26 +00006306 echo "configure: failed program was:" >&5
6307 cat conftest.$ac_ext >&5
6308 rm -rf conftest*
6309 cat >> confdefs.h <<\EOF
6310#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00006311EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006312
6313fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006314rm -f conftest*
6315echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006316
Guido van Rossumda88dad1995-01-26 00:46:29 +00006317have_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006318echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006319echo "configure:6320: checking for prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006320cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006321#line 6322 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006322#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006323int foo(int x) { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006324int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006325return foo(10);
Michael W. Hudson54241132001-12-07 15:38:26 +00006326; return 0; }
6327EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006328if { (eval echo configure:6329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006329 rm -rf conftest*
6330 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006331#define HAVE_PROTOTYPES 1
6332EOF
6333 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006334else
Michael W. Hudson54241132001-12-07 15:38:26 +00006335 echo "configure: failed program was:" >&5
6336 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006337fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006338rm -f conftest*
6339echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006340
Guido van Rossumda88dad1995-01-26 00:46:29 +00006341works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006342echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006343echo "configure:6344: checking for variable length prototypes and stdarg.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006344cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006345#line 6346 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006346#include "confdefs.h"
6347
6348#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00006349int foo(int x, ...) {
6350 va_list va;
6351 va_start(va, x);
6352 va_arg(va, int);
6353 va_arg(va, char *);
6354 va_arg(va, double);
6355 return 0;
6356}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006357
Michael W. Hudson54241132001-12-07 15:38:26 +00006358int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00006359return foo(10, "", 3.14);
Michael W. Hudson54241132001-12-07 15:38:26 +00006360; return 0; }
6361EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006362if { (eval echo configure:6363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006363 rm -rf conftest*
6364 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006365#define HAVE_STDARG_PROTOTYPES 1
6366EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006367 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006368else
Michael W. Hudson54241132001-12-07 15:38:26 +00006369 echo "configure: failed program was:" >&5
6370 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006371fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006372rm -f conftest*
6373echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006374
Guido van Rossumda88dad1995-01-26 00:46:29 +00006375if test "$have_prototypes" = yes; then
6376bad_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006377echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006378echo "configure:6379: checking for bad exec* prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006379cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006380#line 6381 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006381#include "confdefs.h"
6382#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006383int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006384char **t;execve("@",t,t);
Michael W. Hudson54241132001-12-07 15:38:26 +00006385; return 0; }
6386EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006387if { (eval echo configure:6388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006388 :
6389else
Michael W. Hudson54241132001-12-07 15:38:26 +00006390 echo "configure: failed program was:" >&5
6391 cat conftest.$ac_ext >&5
6392 rm -rf conftest*
6393 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006394#define BAD_EXEC_PROTOTYPES 1
6395EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006396 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006397fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006398rm -f conftest*
6399echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006400fi
6401
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006402# check if sockaddr has sa_len member
Michael W. Hudson54241132001-12-07 15:38:26 +00006403echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006404echo "configure:6405: checking if sockaddr has sa_len member" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006405cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006406#line 6407 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006407#include "confdefs.h"
6408#include <sys/types.h>
6409#include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006410int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006411struct sockaddr x;
6412x.sa_len = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006413; return 0; }
6414EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006415if { (eval echo configure:6416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006416 rm -rf conftest*
6417 echo "$ac_t""yes" 1>&6
6418 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006419#define HAVE_SOCKADDR_SA_LEN 1
6420EOF
6421
6422else
Michael W. Hudson54241132001-12-07 15:38:26 +00006423 echo "configure: failed program was:" >&5
6424 cat conftest.$ac_ext >&5
6425 rm -rf conftest*
6426 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006427fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006428rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006429
Michael W. Hudson54241132001-12-07 15:38:26 +00006430echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006431echo "configure:6432: checking for bad static forward" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006432if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
6433 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006434else
6435 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006436 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006437else
Michael W. Hudson54241132001-12-07 15:38:26 +00006438 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006439#line 6440 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006440#include "confdefs.h"
6441
6442struct s { int a; int b; };
6443static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006444int foobar() {
6445 static int random;
6446 random = (int) &foo;
6447 return random;
6448}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006449static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006450main() {
6451 exit(!((int)&foo == foobar()));
6452}
Michael W. Hudson54241132001-12-07 15:38:26 +00006453EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006454if { (eval echo configure:6455: \"$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 +00006455then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006456 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006457else
Michael W. Hudson54241132001-12-07 15:38:26 +00006458 echo "configure: failed program was:" >&5
6459 cat conftest.$ac_ext >&5
6460 rm -fr conftest*
6461 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006462fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006463rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006464fi
6465
Michael W. Hudson54241132001-12-07 15:38:26 +00006466fi
6467
6468echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006469if test "$ac_cv_bad_static_forward" = yes
6470then
Michael W. Hudson54241132001-12-07 15:38:26 +00006471 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006472#define BAD_STATIC_FORWARD 1
6473EOF
6474
6475fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006476
Guido van Rossumda88dad1995-01-26 00:46:29 +00006477va_list_is_array=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006478echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006479echo "configure:6480: checking whether va_list is an array" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006480cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006481#line 6482 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006482#include "confdefs.h"
6483
6484#ifdef HAVE_STDARG_PROTOTYPES
6485#include <stdarg.h>
6486#else
6487#include <varargs.h>
6488#endif
6489
Michael W. Hudson54241132001-12-07 15:38:26 +00006490int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006491va_list list1, list2; list1 = list2;
Michael W. Hudson54241132001-12-07 15:38:26 +00006492; return 0; }
6493EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006494if { (eval echo configure:6495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006495 :
6496else
Michael W. Hudson54241132001-12-07 15:38:26 +00006497 echo "configure: failed program was:" >&5
6498 cat conftest.$ac_ext >&5
6499 rm -rf conftest*
6500 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006501#define VA_LIST_IS_ARRAY 1
6502EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006503 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006504fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006505rm -f conftest*
6506echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006507
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006508# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Michael W. Hudson54241132001-12-07 15:38:26 +00006509echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006510echo "configure:6511: checking for gethostbyname_r" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006511if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
6512 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006513else
Michael W. Hudson54241132001-12-07 15:38:26 +00006514 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006515#line 6516 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006516#include "confdefs.h"
6517/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006518 which can conflict with char gethostbyname_r(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006519#include <assert.h>
6520/* Override any gcc2 internal prototype to avoid an error. */
6521/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006522 builtin and then its argument prototype would still apply. */
6523char gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006524
Michael W. Hudson54241132001-12-07 15:38:26 +00006525int main() {
6526
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006527/* The GNU C library defines this for functions which it implements
6528 to always fail with ENOSYS. Some functions are actually named
6529 something starting with __ and the normal name is an alias. */
6530#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6531choke me
6532#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006533gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006534#endif
6535
Michael W. Hudson54241132001-12-07 15:38:26 +00006536; return 0; }
6537EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006538if { (eval echo configure:6539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006539 rm -rf conftest*
6540 eval "ac_cv_func_gethostbyname_r=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006541else
Michael W. Hudson54241132001-12-07 15:38:26 +00006542 echo "configure: failed program was:" >&5
6543 cat conftest.$ac_ext >&5
6544 rm -rf conftest*
6545 eval "ac_cv_func_gethostbyname_r=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006546fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006547rm -f conftest*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006548fi
6549
Michael W. Hudson54241132001-12-07 15:38:26 +00006550if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6551 echo "$ac_t""yes" 1>&6
6552
6553 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006554#define HAVE_GETHOSTBYNAME_R 1
6555EOF
6556
Michael W. Hudson54241132001-12-07 15:38:26 +00006557 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006558echo "configure:6559: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006559 OLD_CFLAGS=$CFLAGS
6560 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006561 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006562#line 6563 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006563#include "confdefs.h"
6564
6565# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006566
6567int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006568
6569 char *name;
6570 struct hostent *he, *res;
6571 char buffer[2048];
6572 int buflen = 2048;
6573 int h_errnop;
6574
6575 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006576
6577; return 0; }
6578EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006579if { (eval echo configure:6580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006580 rm -rf conftest*
6581
6582 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006583#define HAVE_GETHOSTBYNAME_R 1
6584EOF
6585
Michael W. Hudson54241132001-12-07 15:38:26 +00006586 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006587#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6588EOF
6589
Michael W. Hudson54241132001-12-07 15:38:26 +00006590 echo "$ac_t""yes" 1>&6
6591
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006592else
Michael W. Hudson54241132001-12-07 15:38:26 +00006593 echo "configure: failed program was:" >&5
6594 cat conftest.$ac_ext >&5
6595 rm -rf conftest*
6596
6597 echo "$ac_t""no" 1>&6
6598 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006599echo "configure:6600: checking gethostbyname_r with 5 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006600 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006601#line 6602 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006602#include "confdefs.h"
6603
6604# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006605
6606int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006607
6608 char *name;
6609 struct hostent *he;
6610 char buffer[2048];
6611 int buflen = 2048;
6612 int h_errnop;
6613
6614 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006615
6616; return 0; }
6617EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006618if { (eval echo configure:6619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006619 rm -rf conftest*
6620
6621 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006622#define HAVE_GETHOSTBYNAME_R 1
6623EOF
6624
Michael W. Hudson54241132001-12-07 15:38:26 +00006625 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006626#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6627EOF
6628
Michael W. Hudson54241132001-12-07 15:38:26 +00006629 echo "$ac_t""yes" 1>&6
6630
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006631else
Michael W. Hudson54241132001-12-07 15:38:26 +00006632 echo "configure: failed program was:" >&5
6633 cat conftest.$ac_ext >&5
6634 rm -rf conftest*
6635
6636 echo "$ac_t""no" 1>&6
6637 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006638echo "configure:6639: checking gethostbyname_r with 3 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006639 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006640#line 6641 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006641#include "confdefs.h"
6642
6643# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006644
6645int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006646
6647 char *name;
6648 struct hostent *he;
6649 struct hostent_data data;
6650
6651 (void) gethostbyname_r(name, he, &data);
Michael W. Hudson54241132001-12-07 15:38:26 +00006652
6653; return 0; }
6654EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006655if { (eval echo configure:6656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006656 rm -rf conftest*
6657
6658 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006659#define HAVE_GETHOSTBYNAME_R 1
6660EOF
6661
Michael W. Hudson54241132001-12-07 15:38:26 +00006662 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006663#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6664EOF
6665
Michael W. Hudson54241132001-12-07 15:38:26 +00006666 echo "$ac_t""yes" 1>&6
6667
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006668else
Michael W. Hudson54241132001-12-07 15:38:26 +00006669 echo "configure: failed program was:" >&5
6670 cat conftest.$ac_ext >&5
6671 rm -rf conftest*
6672
6673 echo "$ac_t""no" 1>&6
6674
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006675fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006676rm -f conftest*
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*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006683 CFLAGS=$OLD_CFLAGS
6684
6685else
Michael W. Hudson54241132001-12-07 15:38:26 +00006686 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006687
Michael W. Hudson54241132001-12-07 15:38:26 +00006688 for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +00006689do
Michael W. Hudson54241132001-12-07 15:38:26 +00006690echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006691echo "configure:6692: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006692if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6693 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006694else
Michael W. Hudson54241132001-12-07 15:38:26 +00006695 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006696#line 6697 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006697#include "confdefs.h"
6698/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006699 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006700#include <assert.h>
6701/* Override any gcc2 internal prototype to avoid an error. */
6702/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006703 builtin and then its argument prototype would still apply. */
6704char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006705
Michael W. Hudson54241132001-12-07 15:38:26 +00006706int main() {
6707
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006708/* The GNU C library defines this for functions which it implements
6709 to always fail with ENOSYS. Some functions are actually named
6710 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006711#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006712choke me
6713#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006714$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006715#endif
6716
Michael W. Hudson54241132001-12-07 15:38:26 +00006717; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006718EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006719if { (eval echo configure:6720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006720 rm -rf conftest*
6721 eval "ac_cv_func_$ac_func=yes"
6722else
6723 echo "configure: failed program was:" >&5
6724 cat conftest.$ac_ext >&5
6725 rm -rf conftest*
6726 eval "ac_cv_func_$ac_func=no"
6727fi
6728rm -f conftest*
6729fi
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006730
Michael W. Hudson54241132001-12-07 15:38:26 +00006731if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6732 echo "$ac_t""yes" 1>&6
6733 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6734 cat >> confdefs.h <<EOF
6735#define $ac_tr_func 1
6736EOF
6737
6738else
6739 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006740fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006741done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006742
Michael W. Hudson54241132001-12-07 15:38:26 +00006743
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006744fi
6745
Michael W. Hudson54241132001-12-07 15:38:26 +00006746
6747
6748
6749
6750
6751
Guido van Rossum627b2d71993-12-24 10:39:16 +00006752# checks for system services
6753# (none yet)
6754
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006755# Linux requires this for correct f.p. operations
Michael W. Hudson54241132001-12-07 15:38:26 +00006756echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006757echo "configure:6758: checking for __fpu_control" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006758if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
6759 echo $ac_n "(cached) $ac_c" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006760else
Michael W. Hudson54241132001-12-07 15:38:26 +00006761 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006762#line 6763 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006763#include "confdefs.h"
6764/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006765 which can conflict with char __fpu_control(); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006766#include <assert.h>
6767/* Override any gcc2 internal prototype to avoid an error. */
6768/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006769 builtin and then its argument prototype would still apply. */
6770char __fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006771
Michael W. Hudson54241132001-12-07 15:38:26 +00006772int main() {
6773
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006774/* The GNU C library defines this for functions which it implements
6775 to always fail with ENOSYS. Some functions are actually named
6776 something starting with __ and the normal name is an alias. */
6777#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6778choke me
6779#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006780__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006781#endif
6782
Michael W. Hudson54241132001-12-07 15:38:26 +00006783; return 0; }
6784EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006785if { (eval echo configure:6786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006786 rm -rf conftest*
6787 eval "ac_cv_func___fpu_control=yes"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006788else
Michael W. Hudson54241132001-12-07 15:38:26 +00006789 echo "configure: failed program was:" >&5
6790 cat conftest.$ac_ext >&5
6791 rm -rf conftest*
6792 eval "ac_cv_func___fpu_control=no"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006793fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006794rm -f conftest*
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006795fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006796
6797if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6798 echo "$ac_t""yes" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006799 :
6800else
Michael W. Hudson54241132001-12-07 15:38:26 +00006801 echo "$ac_t""no" 1>&6
6802echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006803echo "configure:6804: checking for __fpu_control in -lieee" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006804ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
6805if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6806 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006807else
Michael W. Hudson54241132001-12-07 15:38:26 +00006808 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006809LIBS="-lieee $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006810cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006811#line 6812 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006812#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006813/* Override any gcc2 internal prototype to avoid an error. */
6814/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006815 builtin and then its argument prototype would still apply. */
6816char __fpu_control();
6817
6818int main() {
6819__fpu_control()
6820; return 0; }
6821EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006822if { (eval echo configure:6823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006823 rm -rf conftest*
6824 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006825else
Michael W. Hudson54241132001-12-07 15:38:26 +00006826 echo "configure: failed program was:" >&5
6827 cat conftest.$ac_ext >&5
6828 rm -rf conftest*
6829 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006830fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006831rm -f conftest*
6832LIBS="$ac_save_LIBS"
6833
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006834fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006835if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6836 echo "$ac_t""yes" 1>&6
6837 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6838 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6839 cat >> confdefs.h <<EOF
6840#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006841EOF
6842
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006843 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006844
Michael W. Hudson54241132001-12-07 15:38:26 +00006845else
6846 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006847fi
6848
Michael W. Hudson54241132001-12-07 15:38:26 +00006849
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006850fi
6851
Michael W. Hudson54241132001-12-07 15:38:26 +00006852
Guido van Rossum7f253911997-05-09 02:42:48 +00006853# Check for --with-fpectl
Michael W. Hudson54241132001-12-07 15:38:26 +00006854echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006855echo "configure:6856: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006856# Check whether --with-fpectl or --without-fpectl was given.
6857if test "${with_fpectl+set}" = set; then
6858 withval="$with_fpectl"
Michael W. Hudson54241132001-12-07 15:38:26 +00006859
Guido van Rossum7f253911997-05-09 02:42:48 +00006860if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00006861then cat >> confdefs.h <<\EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00006862#define WANT_SIGFPE_HANDLER 1
6863EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00006864 echo "$ac_t""yes" 1>&6
6865else echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006866fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006867else
Michael W. Hudson54241132001-12-07 15:38:26 +00006868 echo "$ac_t""no" 1>&6
6869fi
6870
Guido van Rossum7f253911997-05-09 02:42:48 +00006871
Guido van Rossum7f43da71994-08-01 12:15:30 +00006872# check for --with-libm=...
6873
Guido van Rossum563e7081996-09-10 18:20:48 +00006874case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006875Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006876BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006877*) LIBM=-lm
6878esac
Michael W. Hudson54241132001-12-07 15:38:26 +00006879echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006880echo "configure:6881: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006881# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006882if test "${with_libm+set}" = set; then
6883 withval="$with_libm"
Michael W. Hudson54241132001-12-07 15:38:26 +00006884
Guido van Rossum7f253911997-05-09 02:42:48 +00006885if test "$withval" = no
6886then LIBM=
Michael W. Hudson54241132001-12-07 15:38:26 +00006887 echo "$ac_t""force LIBM empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006888elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006889then LIBM=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00006890 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
6891else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006892fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006893else
Michael W. Hudson54241132001-12-07 15:38:26 +00006894 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
6895fi
6896
Guido van Rossum7f43da71994-08-01 12:15:30 +00006897
6898# check for --with-libc=...
6899
Michael W. Hudson54241132001-12-07 15:38:26 +00006900echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006901echo "configure:6902: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006902# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006903if test "${with_libc+set}" = set; then
6904 withval="$with_libc"
Michael W. Hudson54241132001-12-07 15:38:26 +00006905
Guido van Rossum7f253911997-05-09 02:42:48 +00006906if test "$withval" = no
6907then LIBC=
Michael W. Hudson54241132001-12-07 15:38:26 +00006908 echo "$ac_t""force LIBC empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006909elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006910then LIBC=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00006911 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
6912else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006913fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006914else
Michael W. Hudson54241132001-12-07 15:38:26 +00006915 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
6916fi
6917
Guido van Rossum7f43da71994-08-01 12:15:30 +00006918
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006919# check for hypot() in math library
6920LIBS_SAVE=$LIBS
6921LIBS="$LIBS $LIBM"
6922for ac_func in hypot
6923do
Michael W. Hudson54241132001-12-07 15:38:26 +00006924echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006925echo "configure:6926: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006926if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6927 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006928else
Michael W. Hudson54241132001-12-07 15:38:26 +00006929 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006930#line 6931 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006931#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006932/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006933 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006934#include <assert.h>
6935/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006936/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006937 builtin and then its argument prototype would still apply. */
6938char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006939
Michael W. Hudson54241132001-12-07 15:38:26 +00006940int main() {
6941
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006942/* The GNU C library defines this for functions which it implements
6943 to always fail with ENOSYS. Some functions are actually named
6944 something starting with __ and the normal name is an alias. */
6945#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6946choke me
6947#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006948$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006949#endif
6950
Michael W. Hudson54241132001-12-07 15:38:26 +00006951; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006952EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006953if { (eval echo configure:6954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006954 rm -rf conftest*
6955 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006956else
Michael W. Hudson54241132001-12-07 15:38:26 +00006957 echo "configure: failed program was:" >&5
6958 cat conftest.$ac_ext >&5
6959 rm -rf conftest*
6960 eval "ac_cv_func_$ac_func=no"
6961fi
6962rm -f conftest*
6963fi
6964
6965if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6966 echo "$ac_t""yes" 1>&6
6967 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6968 cat >> confdefs.h <<EOF
6969#define $ac_tr_func 1
6970EOF
6971
6972else
6973 echo "$ac_t""no" 1>&6
6974LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006975fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006976done
6977
Michael W. Hudson54241132001-12-07 15:38:26 +00006978
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006979LIBS=$LIBS_SAVE
6980
Guido van Rossumad713701997-07-10 22:42:38 +00006981# check whether malloc(0) returns NULL or not
Michael W. Hudson54241132001-12-07 15:38:26 +00006982echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006983echo "configure:6984: checking what malloc(0) returns" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006984if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
6985 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00006986else
6987 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006988 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +00006989else
Michael W. Hudson54241132001-12-07 15:38:26 +00006990 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00006991#line 6992 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006992#include "confdefs.h"
6993#include <stdio.h>
6994#ifdef HAVE_STDLIB
6995#include <stdlib.h>
6996#else
6997char *malloc(), *realloc();
6998int *free();
6999#endif
7000main() {
7001 char *p;
7002 p = malloc(0);
7003 if (p == NULL) exit(1);
7004 p = realloc(p, 0);
7005 if (p == NULL) exit(1);
7006 free(p);
7007 exit(0);
7008}
Michael W. Hudson54241132001-12-07 15:38:26 +00007009EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007010if { (eval echo configure:7011: \"$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 +00007011then
Guido van Rossumad713701997-07-10 22:42:38 +00007012 ac_cv_malloc_zero=nonnull
7013else
Michael W. Hudson54241132001-12-07 15:38:26 +00007014 echo "configure: failed program was:" >&5
7015 cat conftest.$ac_ext >&5
7016 rm -fr conftest*
7017 ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +00007018fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007019rm -fr conftest*
Guido van Rossumad713701997-07-10 22:42:38 +00007020fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007021
Guido van Rossumad713701997-07-10 22:42:38 +00007022fi
Guido van Rossum3065c942001-09-17 04:03:14 +00007023 # XXX arm cross-compile?
Michael W. Hudson54241132001-12-07 15:38:26 +00007024echo "$ac_t""$ac_cv_malloc_zero" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00007025if test "$ac_cv_malloc_zero" = null
7026then
Michael W. Hudson54241132001-12-07 15:38:26 +00007027 cat >> confdefs.h <<\EOF
Guido van Rossumad713701997-07-10 22:42:38 +00007028#define MALLOC_ZERO_RETURNS_NULL 1
7029EOF
7030
7031fi
7032
Guido van Rossumef2255b2000-03-10 22:30:29 +00007033# check for wchar.h
Michael W. Hudson54241132001-12-07 15:38:26 +00007034ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
7035echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007036echo "configure:7037: checking for wchar.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007037if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7038 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00007039else
Michael W. Hudson54241132001-12-07 15:38:26 +00007040 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007041#line 7042 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007042#include "confdefs.h"
7043#include <wchar.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007044EOF
7045ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007046{ (eval echo configure:7047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007047ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7048if test -z "$ac_err"; then
7049 rm -rf conftest*
7050 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007051else
Michael W. Hudson54241132001-12-07 15:38:26 +00007052 echo "$ac_err" >&5
7053 echo "configure: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007054 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007055 rm -rf conftest*
7056 eval "ac_cv_header_$ac_safe=no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007057fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007058rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007059fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007060if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7061 echo "$ac_t""yes" 1>&6
7062 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007063#define HAVE_WCHAR_H 1
7064EOF
7065 wchar_h="yes"
7066else
Michael W. Hudson54241132001-12-07 15:38:26 +00007067 echo "$ac_t""no" 1>&6
7068wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007069
7070fi
7071
Michael W. Hudson54241132001-12-07 15:38:26 +00007072
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007073# determine wchar_t size
7074if test "$wchar_h" = yes
7075then
Michael W. Hudson54241132001-12-07 15:38:26 +00007076 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007077echo "configure:7078: checking size of wchar_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007078if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
7079 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007080else
7081 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007082 ac_cv_sizeof_wchar_t=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00007083else
Michael W. Hudson54241132001-12-07 15:38:26 +00007084 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007085#line 7086 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007086#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007087#include <stdio.h>
7088main()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007089{
Michael W. Hudson54241132001-12-07 15:38:26 +00007090 FILE *f=fopen("conftestval", "w");
7091 if (!f) exit(1);
7092 fprintf(f, "%d\n", sizeof(wchar_t));
7093 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00007094}
Michael W. Hudson54241132001-12-07 15:38:26 +00007095EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007096if { (eval echo configure:7097: \"$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 +00007097then
7098 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007099else
Michael W. Hudson54241132001-12-07 15:38:26 +00007100 echo "configure: failed program was:" >&5
7101 cat conftest.$ac_ext >&5
7102 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007103 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00007104fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007105rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007106fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007107
7108fi
7109echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
7110cat >> confdefs.h <<EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007111#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
7112EOF
7113
Michael W. Hudson54241132001-12-07 15:38:26 +00007114
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007115fi
7116
Michael W. Hudson54241132001-12-07 15:38:26 +00007117echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007118echo "configure:7119: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007119# Check whether --enable-unicode or --disable-unicode was given.
7120if test "${enable_unicode+set}" = set; then
7121 enableval="$enable_unicode"
Michael W. Hudson54241132001-12-07 15:38:26 +00007122 :
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007123else
7124 enable_unicode=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00007125fi
7126
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007127
7128if test $enable_unicode = yes
7129then
Martin v. Löwisfd917792001-06-27 20:22:04 +00007130 # Without any arguments, Py_UNICODE defaults to two-byte mode
7131 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007132fi
7133
7134case "$enable_unicode" in
7135ucs2) unicode_size="2"
Michael W. Hudson54241132001-12-07 15:38:26 +00007136 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007137#define Py_UNICODE_SIZE 2
7138EOF
7139
7140 ;;
7141ucs4) unicode_size="4"
Michael W. Hudson54241132001-12-07 15:38:26 +00007142 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007143#define Py_UNICODE_SIZE 4
7144EOF
7145
7146 ;;
7147esac
7148
Michael W. Hudson54241132001-12-07 15:38:26 +00007149
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007150if test "$enable_unicode" = "no"
7151then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007152 UNICODE_OBJS=""
Michael W. Hudson54241132001-12-07 15:38:26 +00007153 echo "$ac_t""not used" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007154else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007155 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Michael W. Hudson54241132001-12-07 15:38:26 +00007156 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007157#define Py_USING_UNICODE 1
7158EOF
7159
7160 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
7161 then
7162 PY_UNICODE_TYPE="wchar_t"
Michael W. Hudson54241132001-12-07 15:38:26 +00007163 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007164#define HAVE_USABLE_WCHAR_T 1
7165EOF
7166
Michael W. Hudson54241132001-12-07 15:38:26 +00007167 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007168#define PY_UNICODE_TYPE wchar_t
7169EOF
7170
7171 elif test "$ac_cv_sizeof_short" = "$unicode_size"
7172 then
7173 PY_UNICODE_TYPE="unsigned short"
Michael W. Hudson54241132001-12-07 15:38:26 +00007174 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007175#define PY_UNICODE_TYPE unsigned short
7176EOF
7177
7178 elif test "$ac_cv_sizeof_long" = "$unicode_size"
7179 then
7180 PY_UNICODE_TYPE="unsigned long"
Michael W. Hudson54241132001-12-07 15:38:26 +00007181 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007182#define PY_UNICODE_TYPE unsigned long
7183EOF
7184
7185 else
7186 PY_UNICODE_TYPE="no type found"
7187 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007188 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007189fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007190
7191# check for endianness
Michael W. Hudson54241132001-12-07 15:38:26 +00007192echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007193echo "configure:7194: checking whether byte ordering is bigendian" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007194if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
7195 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00007196else
7197 ac_cv_c_bigendian=unknown
7198# See if sys/param.h defines the BYTE_ORDER macro.
Michael W. Hudson54241132001-12-07 15:38:26 +00007199cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007200#line 7201 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007201#include "confdefs.h"
7202#include <sys/types.h>
7203#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007204int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007205
7206#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
7207 bogus endian macros
7208#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007209; return 0; }
7210EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007211if { (eval echo configure:7212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007212 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007213 # It does; now see whether it defined to BIG_ENDIAN or not.
Michael W. Hudson54241132001-12-07 15:38:26 +00007214cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007215#line 7216 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007216#include "confdefs.h"
7217#include <sys/types.h>
7218#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007219int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007220
7221#if BYTE_ORDER != BIG_ENDIAN
7222 not big endian
7223#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007224; return 0; }
7225EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007226if { (eval echo configure:7227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007227 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007228 ac_cv_c_bigendian=yes
7229else
Michael W. Hudson54241132001-12-07 15:38:26 +00007230 echo "configure: failed program was:" >&5
7231 cat conftest.$ac_ext >&5
7232 rm -rf conftest*
7233 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +00007234fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007235rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007236else
Michael W. Hudson54241132001-12-07 15:38:26 +00007237 echo "configure: failed program was:" >&5
7238 cat conftest.$ac_ext >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007239fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007240rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007241if test $ac_cv_c_bigendian = unknown; then
7242if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007243 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007244else
Michael W. Hudson54241132001-12-07 15:38:26 +00007245 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007246#line 7247 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007247#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007248main () {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007249 /* Are we little or big endian? From Harbison&Steele. */
7250 union
7251 {
7252 long l;
7253 char c[sizeof (long)];
7254 } u;
7255 u.l = 1;
7256 exit (u.c[sizeof (long) - 1] == 1);
7257}
Michael W. Hudson54241132001-12-07 15:38:26 +00007258EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007259if { (eval echo configure:7260: \"$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 +00007260then
Guido van Rossumef2255b2000-03-10 22:30:29 +00007261 ac_cv_c_bigendian=no
7262else
Michael W. Hudson54241132001-12-07 15:38:26 +00007263 echo "configure: failed program was:" >&5
7264 cat conftest.$ac_ext >&5
7265 rm -fr conftest*
7266 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +00007267fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007268rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007269fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007270
Michael W. Hudson54241132001-12-07 15:38:26 +00007271fi
7272fi
7273
7274echo "$ac_t""$ac_cv_c_bigendian" 1>&6
7275if test $ac_cv_c_bigendian = yes; then
7276 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007277#define WORDS_BIGENDIAN 1
7278EOF
7279
7280fi
7281
Michael W. Hudson54241132001-12-07 15:38:26 +00007282
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007283# Check whether right shifting a negative integer extends the sign bit
7284# or fills with zeros (like the Cray J90, according to Tim Peters).
Michael W. Hudson54241132001-12-07 15:38:26 +00007285echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007286echo "configure:7287: checking whether right shift extends the sign bit" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007287if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
7288 echo $ac_n "(cached) $ac_c" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007289else
Michael W. Hudson54241132001-12-07 15:38:26 +00007290
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007291if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007292 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007293else
Michael W. Hudson54241132001-12-07 15:38:26 +00007294 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007295#line 7296 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007296#include "confdefs.h"
7297
7298int main()
7299{
Vladimir Marangozova6180282000-07-12 05:05:06 +00007300 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007301}
7302
Michael W. Hudson54241132001-12-07 15:38:26 +00007303EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007304if { (eval echo configure:7305: \"$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 +00007305then
Vladimir Marangozova6180282000-07-12 05:05:06 +00007306 ac_cv_rshift_extends_sign=yes
7307else
Michael W. Hudson54241132001-12-07 15:38:26 +00007308 echo "configure: failed program was:" >&5
7309 cat conftest.$ac_ext >&5
7310 rm -fr conftest*
7311 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +00007312fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007313rm -fr conftest*
Vladimir Marangozova6180282000-07-12 05:05:06 +00007314fi
7315
Michael W. Hudson54241132001-12-07 15:38:26 +00007316fi
7317
7318echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007319if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007320then
Michael W. Hudson54241132001-12-07 15:38:26 +00007321 cat >> confdefs.h <<\EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007322#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
7323EOF
7324
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007325fi
7326
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007327# check for getc_unlocked and related locking functions
Michael W. Hudson54241132001-12-07 15:38:26 +00007328echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007329echo "configure:7330: checking for getc_unlocked() and friends" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007330if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
7331 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007332else
Michael W. Hudson54241132001-12-07 15:38:26 +00007333
7334cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007335#line 7336 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007336#include "confdefs.h"
7337#include <stdio.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007338int main() {
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007339
7340 FILE *f = fopen("/dev/null", "r");
7341 flockfile(f);
7342 getc_unlocked(f);
7343 funlockfile(f);
7344
Michael W. Hudson54241132001-12-07 15:38:26 +00007345; return 0; }
7346EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007347if { (eval echo configure:7348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007348 rm -rf conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007349 ac_cv_have_getc_unlocked=yes
7350else
Michael W. Hudson54241132001-12-07 15:38:26 +00007351 echo "configure: failed program was:" >&5
7352 cat conftest.$ac_ext >&5
7353 rm -rf conftest*
7354 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007355fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007356rm -f conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007357fi
7358
Michael W. Hudson54241132001-12-07 15:38:26 +00007359echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007360if test "$ac_cv_have_getc_unlocked" = yes
7361then
Michael W. Hudson54241132001-12-07 15:38:26 +00007362 cat >> confdefs.h <<\EOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007363#define HAVE_GETC_UNLOCKED 1
7364EOF
7365
7366fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007367
Martin v. Löwis0daad592001-09-30 21:09:59 +00007368# check for readline 4.0
Michael W. Hudson54241132001-12-07 15:38:26 +00007369echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007370echo "configure:7371: checking for rl_pre_input_hook in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007371ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'`
7372if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7373 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007374else
Michael W. Hudson54241132001-12-07 15:38:26 +00007375 ac_save_LIBS="$LIBS"
Guido van Rossum353ae582001-07-10 16:45:32 +00007376LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007377cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007378#line 7379 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00007379#include "confdefs.h"
7380/* Override any gcc2 internal prototype to avoid an error. */
7381/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007382 builtin and then its argument prototype would still apply. */
7383char rl_pre_input_hook();
7384
7385int main() {
7386rl_pre_input_hook()
7387; return 0; }
7388EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007389if { (eval echo configure:7390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007390 rm -rf conftest*
7391 eval "ac_cv_lib_$ac_lib_var=yes"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007392else
Michael W. Hudson54241132001-12-07 15:38:26 +00007393 echo "configure: failed program was:" >&5
7394 cat conftest.$ac_ext >&5
7395 rm -rf conftest*
7396 eval "ac_cv_lib_$ac_lib_var=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007397fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007398rm -f conftest*
7399LIBS="$ac_save_LIBS"
7400
Martin v. Löwis0daad592001-09-30 21:09:59 +00007401fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007402if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7403 echo "$ac_t""yes" 1>&6
7404 cat >> confdefs.h <<\EOF
Martin v. Löwis0daad592001-09-30 21:09:59 +00007405#define HAVE_RL_PRE_INPUT_HOOK 1
7406EOF
7407
Michael W. Hudson54241132001-12-07 15:38:26 +00007408else
7409 echo "$ac_t""no" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007410fi
7411
Michael W. Hudson54241132001-12-07 15:38:26 +00007412
Martin v. Löwis0daad592001-09-30 21:09:59 +00007413# check for readline 4.2
Michael W. Hudson54241132001-12-07 15:38:26 +00007414echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007415echo "configure:7416: checking for rl_completion_matches in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007416ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
7417if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7418 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007419else
Michael W. Hudson54241132001-12-07 15:38:26 +00007420 ac_save_LIBS="$LIBS"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007421LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007422cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007423#line 7424 "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007424#include "confdefs.h"
7425/* Override any gcc2 internal prototype to avoid an error. */
7426/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007427 builtin and then its argument prototype would still apply. */
7428char rl_completion_matches();
7429
7430int main() {
7431rl_completion_matches()
7432; return 0; }
7433EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007434if { (eval echo configure:7435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007435 rm -rf conftest*
7436 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum353ae582001-07-10 16:45:32 +00007437else
Michael W. Hudson54241132001-12-07 15:38:26 +00007438 echo "configure: failed program was:" >&5
7439 cat conftest.$ac_ext >&5
7440 rm -rf conftest*
7441 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum353ae582001-07-10 16:45:32 +00007442fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007443rm -f conftest*
7444LIBS="$ac_save_LIBS"
7445
Guido van Rossum353ae582001-07-10 16:45:32 +00007446fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007447if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7448 echo "$ac_t""yes" 1>&6
7449 cat >> confdefs.h <<\EOF
Guido van Rossum353ae582001-07-10 16:45:32 +00007450#define HAVE_RL_COMPLETION_MATCHES 1
7451EOF
7452
Michael W. Hudson54241132001-12-07 15:38:26 +00007453else
7454 echo "$ac_t""no" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007455fi
7456
Jack Jansendd19cf82001-12-06 22:36:17 +00007457
Michael W. Hudson54241132001-12-07 15:38:26 +00007458echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007459echo "configure:7460: checking for broken nice()" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007460if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
7461 echo $ac_n "(cached) $ac_c" 1>&6
7462else
7463
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007464if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007465 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007466else
Michael W. Hudson54241132001-12-07 15:38:26 +00007467 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007468#line 7469 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007469#include "confdefs.h"
7470
7471int main()
7472{
7473 int val1 = nice(1);
7474 if (val1 != -1 && val1 == nice(2))
7475 exit(0);
7476 exit(1);
7477}
7478
Michael W. Hudson54241132001-12-07 15:38:26 +00007479EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007480if { (eval echo configure:7481: \"$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 +00007481then
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007482 ac_cv_broken_nice=yes
7483else
Michael W. Hudson54241132001-12-07 15:38:26 +00007484 echo "configure: failed program was:" >&5
7485 cat conftest.$ac_ext >&5
7486 rm -fr conftest*
7487 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007488fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007489rm -fr conftest*
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007490fi
7491
Michael W. Hudson54241132001-12-07 15:38:26 +00007492fi
7493
7494echo "$ac_t""$ac_cv_broken_nice" 1>&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007495if test "$ac_cv_broken_nice" = yes
7496then
Michael W. Hudson54241132001-12-07 15:38:26 +00007497 cat >> confdefs.h <<\EOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007498#define HAVE_BROKEN_NICE 1
7499EOF
7500
7501fi
7502
Jack Jansen666b1e72001-10-31 12:11:48 +00007503# On HP/UX 11.0, mvwdelch is a block with a return statement
Michael W. Hudson54241132001-12-07 15:38:26 +00007504echo $ac_n "checking whether mvwdelch is an expression""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007505echo "configure:7506: checking whether mvwdelch is an expression" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007506if eval "test \"`echo '$''{'ac_cv_mvwdelch_is_expression'+set}'`\" = set"; then
7507 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007508else
Michael W. Hudson54241132001-12-07 15:38:26 +00007509 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007510#line 7511 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007511#include "confdefs.h"
7512#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007513int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007514
7515 int rtn;
7516 rtn = mvwdelch(0,0,0);
7517
Michael W. Hudson54241132001-12-07 15:38:26 +00007518; return 0; }
7519EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007520if { (eval echo configure:7521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007521 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007522 ac_cv_mvwdelch_is_expression=yes
7523else
Michael W. Hudson54241132001-12-07 15:38:26 +00007524 echo "configure: failed program was:" >&5
7525 cat conftest.$ac_ext >&5
7526 rm -rf conftest*
7527 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007528fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007529rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007530fi
7531
Michael W. Hudson54241132001-12-07 15:38:26 +00007532echo "$ac_t""$ac_cv_mvwdelch_is_expression" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007533
7534if test "$ac_cv_mvwdelch_is_expression" = yes
7535then
Michael W. Hudson54241132001-12-07 15:38:26 +00007536 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007537#define MVWDELCH_IS_EXPRESSION 1
7538EOF
7539
7540fi
7541
Michael W. Hudson54241132001-12-07 15:38:26 +00007542echo $ac_n "checking whether WINDOW has _flags""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007543echo "configure:7544: checking whether WINDOW has _flags" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007544if eval "test \"`echo '$''{'ac_cv_window_has_flags'+set}'`\" = set"; then
7545 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007546else
Michael W. Hudson54241132001-12-07 15:38:26 +00007547 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007548#line 7549 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007549#include "confdefs.h"
7550#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007551int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007552
7553 WINDOW *w;
7554 w->_flags = 0;
7555
Michael W. Hudson54241132001-12-07 15:38:26 +00007556; return 0; }
7557EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007558if { (eval echo configure:7559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007559 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007560 ac_cv_window_has_flags=yes
7561else
Michael W. Hudson54241132001-12-07 15:38:26 +00007562 echo "configure: failed program was:" >&5
7563 cat conftest.$ac_ext >&5
7564 rm -rf conftest*
7565 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007566fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007567rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007568fi
7569
Michael W. Hudson54241132001-12-07 15:38:26 +00007570echo "$ac_t""$ac_cv_window_has_flags" 1>&6
7571
Jack Jansen666b1e72001-10-31 12:11:48 +00007572
7573if test "$ac_cv_window_has_flags" = yes
7574then
Michael W. Hudson54241132001-12-07 15:38:26 +00007575 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007576#define WINDOW_HAS_FLAGS 1
7577EOF
7578
7579fi
7580
Guido van Rossum95713eb2000-05-18 20:53:31 +00007581# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7582# Add sys/socket.h to confdefs.h
7583cat >> confdefs.h <<\EOF
7584#ifdef HAVE_SYS_SOCKET_H
7585#include <sys/socket.h>
7586#endif
7587EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007588echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007589echo "configure:7590: checking for socklen_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007590if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
7591 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum95713eb2000-05-18 20:53:31 +00007592else
Michael W. Hudson54241132001-12-07 15:38:26 +00007593 cat > conftest.$ac_ext <<EOF
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007594#line 7595 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007595#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007596#include <sys/types.h>
7597#if STDC_HEADERS
7598#include <stdlib.h>
7599#include <stddef.h>
7600#endif
7601EOF
7602if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7603 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7604 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007605 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007606else
Michael W. Hudson54241132001-12-07 15:38:26 +00007607 rm -rf conftest*
7608 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007609fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007610rm -f conftest*
Guido van Rossum95713eb2000-05-18 20:53:31 +00007611
Michael W. Hudson54241132001-12-07 15:38:26 +00007612fi
7613echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7614if test $ac_cv_type_socklen_t = no; then
7615 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007616#define socklen_t int
7617EOF
7618
7619fi
7620
Michael W. Hudson54241132001-12-07 15:38:26 +00007621
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007622# Add Python/ prefix to LIBOBJS
7623libobjs=$LIBOBJS
7624LIBOBJS=
7625for obj in $libobjs; do
7626 LIBOBJS="$LIBOBJS Python/$obj"
7627done
7628
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007629#AC_MSG_CHECKING(for Modules/Setup)
7630#if test ! -f Modules/Setup ; then
7631# if test ! -d Modules ; then
7632# mkdir Modules
7633# fi
7634# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7635# AC_MSG_RESULT(creating)
7636#else
7637# AC_MSG_RESULT(already exists)
7638#fi
7639
Michael W. Hudson54241132001-12-07 15:38:26 +00007640
7641
Martin v. Löwis06f15bb2001-12-02 13:02:32 +00007642for h in `(cd $srcdir;echo Python/thread_*.h)`
7643do
7644 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
7645done
7646
Michael W. Hudson54241132001-12-07 15:38:26 +00007647
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007648SRCDIRS="Parser Grammar Objects Python Modules"
Michael W. Hudson54241132001-12-07 15:38:26 +00007649echo $ac_n "checking for build directories""... $ac_c" 1>&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00007650echo "configure:7651: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007651for dir in $SRCDIRS; do
7652 if test ! -d $dir; then
7653 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007654 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007655done
Michael W. Hudson54241132001-12-07 15:38:26 +00007656echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007657
Guido van Rossum627b2d71993-12-24 10:39:16 +00007658# generate output files
Michael W. Hudson54241132001-12-07 15:38:26 +00007659trap '' 1 2 15
7660cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007661# This file is a shell script that caches the results of configure
7662# tests run on this system so they can be shared between configure
Michael W. Hudson54241132001-12-07 15:38:26 +00007663# scripts and configure runs. It is not useful on other systems.
7664# If it contains results you don't want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007665#
Michael W. Hudson54241132001-12-07 15:38:26 +00007666# By default, configure uses ./config.cache as the cache file,
7667# creating it if it does not exist already. You can give configure
7668# the --cache-file=FILE option to use a different cache file; that is
7669# what configure does when it calls configure scripts in
7670# subdirectories, so they share the cache.
7671# Giving --cache-file=/dev/null disables caching, for debugging configure.
7672# config.status only pays attention to the cache file if you give it the
7673# --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007674#
Michael W. Hudson54241132001-12-07 15:38:26 +00007675EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007676# The following way of writing the cache mishandles newlines in values,
7677# but we know of no workaround that is simple, portable, and efficient.
7678# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007679# Ultrix sh set writes to stderr and can't be redirected directly,
7680# and sets the high bit in the cache file unless we assign to the vars.
Michael W. Hudson54241132001-12-07 15:38:26 +00007681(set) 2>&1 |
7682 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7683 *ac_space=\ *)
7684 # `set' does not quote correctly, so add quotes (double-quote substitution
7685 # turns \\\\ into \\, and sed turns \\ into \).
7686 sed -n \
7687 -e "s/'/'\\\\''/g" \
7688 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7689 ;;
7690 *)
7691 # `set' quotes correctly as required by POSIX, so do not add quotes.
7692 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7693 ;;
7694 esac >> confcache
7695if cmp -s $cache_file confcache; then
7696 :
7697else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007698 if test -w $cache_file; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007699 echo "updating cache $cache_file"
7700 cat confcache > $cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007701 else
7702 echo "not updating unwritable cache $cache_file"
7703 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007704fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007705rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007706
Michael W. Hudson54241132001-12-07 15:38:26 +00007707trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7708
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007709test "x$prefix" = xNONE && prefix=$ac_default_prefix
7710# Let make expand exec_prefix.
7711test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007712
Michael W. Hudson54241132001-12-07 15:38:26 +00007713# Any assignment to VPATH causes Sun make to only execute
7714# the first set of double-colon rules, so remove it if not needed.
7715# If there is a colon in the path, we need to keep it.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007716if test "x$srcdir" = x.; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007717 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007718fi
7719
Michael W. Hudson54241132001-12-07 15:38:26 +00007720trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7721
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007722DEFS=-DHAVE_CONFIG_H
7723
Michael W. Hudson54241132001-12-07 15:38:26 +00007724# Without the "./", some shells look in PATH for config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007725: ${CONFIG_STATUS=./config.status}
Michael W. Hudson54241132001-12-07 15:38:26 +00007726
7727echo creating $CONFIG_STATUS
7728rm -f $CONFIG_STATUS
7729cat > $CONFIG_STATUS <<EOF
7730#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007731# Generated automatically by configure.
7732# Run this file to recreate the current configuration.
Michael W. Hudson54241132001-12-07 15:38:26 +00007733# This directory was configured as follows,
7734# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7735#
7736# $0 $ac_configure_args
7737#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007738# Compiler output produced by configure, useful for debugging
Michael W. Hudson54241132001-12-07 15:38:26 +00007739# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007740
Michael W. Hudson54241132001-12-07 15:38:26 +00007741ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7742for ac_option
Jack Jansendd19cf82001-12-06 22:36:17 +00007743do
Michael W. Hudson54241132001-12-07 15:38:26 +00007744 case "\$ac_option" in
Jack Jansendd19cf82001-12-06 22:36:17 +00007745 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Michael W. Hudson54241132001-12-07 15:38:26 +00007746 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7747 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7748 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7749 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7750 exit 0 ;;
7751 -help | --help | --hel | --he | --h)
7752 echo "\$ac_cs_usage"; exit 0 ;;
7753 *) echo "\$ac_cs_usage"; exit 1 ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007754 esac
7755done
7756
Michael W. Hudson54241132001-12-07 15:38:26 +00007757ac_given_srcdir=$srcdir
7758ac_given_INSTALL="$INSTALL"
Jack Jansendd19cf82001-12-06 22:36:17 +00007759
Michael W. Hudson54241132001-12-07 15:38:26 +00007760trap '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 +00007761EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007762cat >> $CONFIG_STATUS <<EOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007763
Michael W. Hudson54241132001-12-07 15:38:26 +00007764# Protect against being on the right side of a sed subst in config.status.
7765sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7766 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7767$ac_vpsub
7768$extrasub
7769s%@SHELL@%$SHELL%g
7770s%@CFLAGS@%$CFLAGS%g
7771s%@CPPFLAGS@%$CPPFLAGS%g
7772s%@CXXFLAGS@%$CXXFLAGS%g
7773s%@FFLAGS@%$FFLAGS%g
7774s%@DEFS@%$DEFS%g
7775s%@LDFLAGS@%$LDFLAGS%g
7776s%@LIBS@%$LIBS%g
7777s%@exec_prefix@%$exec_prefix%g
7778s%@prefix@%$prefix%g
7779s%@program_transform_name@%$program_transform_name%g
7780s%@bindir@%$bindir%g
7781s%@sbindir@%$sbindir%g
7782s%@libexecdir@%$libexecdir%g
7783s%@datadir@%$datadir%g
7784s%@sysconfdir@%$sysconfdir%g
7785s%@sharedstatedir@%$sharedstatedir%g
7786s%@localstatedir@%$localstatedir%g
7787s%@libdir@%$libdir%g
7788s%@includedir@%$includedir%g
7789s%@oldincludedir@%$oldincludedir%g
7790s%@infodir@%$infodir%g
7791s%@mandir@%$mandir%g
7792s%@VERSION@%$VERSION%g
7793s%@CONFIG_ARGS@%$CONFIG_ARGS%g
7794s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7795s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7796s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7797s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
7798s%@MACHDEP@%$MACHDEP%g
7799s%@SGI_ABI@%$SGI_ABI%g
7800s%@CXX@%$CXX%g
7801s%@MAINOBJ@%$MAINOBJ%g
7802s%@CC@%$CC%g
7803s%@CPP@%$CPP%g
7804s%@EXEEXT@%$EXEEXT%g
7805s%@BUILDEXEEXT@%$BUILDEXEEXT%g
7806s%@LIBRARY@%$LIBRARY%g
7807s%@LDLIBRARY@%$LDLIBRARY%g
7808s%@DLLLIBRARY@%$DLLLIBRARY%g
7809s%@BLDLIBRARY@%$BLDLIBRARY%g
7810s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
7811s%@LINKCC@%$LINKCC%g
7812s%@RANLIB@%$RANLIB%g
7813s%@AR@%$AR%g
7814s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7815s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7816s%@INSTALL_DATA@%$INSTALL_DATA%g
7817s%@LN@%$LN%g
7818s%@OPT@%$OPT%g
7819s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
7820s%@SO@%$SO%g
7821s%@LDSHARED@%$LDSHARED%g
7822s%@BLDSHARED@%$BLDSHARED%g
7823s%@CCSHARED@%$CCSHARED%g
7824s%@LINKFORSHARED@%$LINKFORSHARED%g
7825s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
7826s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7827s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
7828s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
7829s%@LDLAST@%$LDLAST%g
7830s%@DLINCLDIR@%$DLINCLDIR%g
7831s%@DYNLOADFILE@%$DYNLOADFILE%g
7832s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
7833s%@LIBOBJS@%$LIBOBJS%g
7834s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7835s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7836s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
7837s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
7838s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
7839s%@LIBM@%$LIBM%g
7840s%@LIBC@%$LIBC%g
7841s%@UNICODE_OBJS@%$UNICODE_OBJS%g
7842s%@THREADHEADERS@%$THREADHEADERS%g
7843s%@SRCDIRS@%$SRCDIRS%g
Jack Jansendd19cf82001-12-06 22:36:17 +00007844
Jack Jansendd19cf82001-12-06 22:36:17 +00007845CEOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007846EOF
7847
Michael W. Hudson54241132001-12-07 15:38:26 +00007848cat >> $CONFIG_STATUS <<\EOF
7849
7850# Split the substitutions into bite-sized pieces for seds with
7851# small command number limits, like on Digital OSF/1 and HP-UX.
7852ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7853ac_file=1 # Number of current file.
7854ac_beg=1 # First line for current file.
7855ac_end=$ac_max_sed_cmds # Line after last line for current file.
7856ac_more_lines=:
7857ac_sed_cmds=""
7858while $ac_more_lines; do
7859 if test $ac_beg -gt 1; then
7860 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7861 else
7862 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00007863 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007864 if test ! -s conftest.s$ac_file; then
7865 ac_more_lines=false
7866 rm -f conftest.s$ac_file
7867 else
7868 if test -z "$ac_sed_cmds"; then
7869 ac_sed_cmds="sed -f conftest.s$ac_file"
7870 else
7871 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7872 fi
7873 ac_file=`expr $ac_file + 1`
7874 ac_beg=$ac_end
7875 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7876 fi
7877done
7878if test -z "$ac_sed_cmds"; then
7879 ac_sed_cmds=cat
7880fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007881EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007882
7883cat >> $CONFIG_STATUS <<EOF
7884
7885CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
7886EOF
7887cat >> $CONFIG_STATUS <<\EOF
7888for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Jack Jansendd19cf82001-12-06 22:36:17 +00007889 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00007890 case "$ac_file" in
7891 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7892 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7893 *) ac_file_in="${ac_file}.in" ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007894 esac
7895
Michael W. Hudson54241132001-12-07 15:38:26 +00007896 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7897
7898 # Remove last slash and all that follows it. Not all systems have dirname.
7899 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007900 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007901 # The file is in a subdirectory.
7902 test ! -d "$ac_dir" && mkdir "$ac_dir"
7903 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007904 # A "../" for each directory in $ac_dir_suffix.
Michael W. Hudson54241132001-12-07 15:38:26 +00007905 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007906 else
7907 ac_dir_suffix= ac_dots=
7908 fi
7909
Michael W. Hudson54241132001-12-07 15:38:26 +00007910 case "$ac_given_srcdir" in
7911 .) srcdir=.
7912 if test -z "$ac_dots"; then top_srcdir=.
7913 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7914 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007915 *) # Relative path.
Michael W. Hudson54241132001-12-07 15:38:26 +00007916 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7917 top_srcdir="$ac_dots$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007918 esac
7919
Michael W. Hudson54241132001-12-07 15:38:26 +00007920 case "$ac_given_INSTALL" in
7921 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7922 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007923 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007924
Michael W. Hudson54241132001-12-07 15:38:26 +00007925 echo creating "$ac_file"
7926 rm -f "$ac_file"
7927 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7928 case "$ac_file" in
7929 *Makefile*) ac_comsub="1i\\
7930# $configure_input" ;;
7931 *) ac_comsub= ;;
7932 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007933
Michael W. Hudson54241132001-12-07 15:38:26 +00007934 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7935 sed -e "$ac_comsub
7936s%@configure_input@%$configure_input%g
7937s%@srcdir@%$srcdir%g
7938s%@top_srcdir@%$top_srcdir%g
7939s%@INSTALL@%$INSTALL%g
7940" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7941fi; done
7942rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007943
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007944# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7945# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007946#
7947# ac_d sets the value in "#define NAME VALUE" lines.
Michael W. Hudson54241132001-12-07 15:38:26 +00007948ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7949ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7950ac_dC='\3'
7951ac_dD='%g'
7952# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7953ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7954ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007955ac_uC=' '
Michael W. Hudson54241132001-12-07 15:38:26 +00007956ac_uD='\4%g'
7957# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7958ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7959ac_eB='$%\1#\2define\3'
7960ac_eC=' '
7961ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007962
Michael W. Hudson54241132001-12-07 15:38:26 +00007963if test "${CONFIG_HEADERS+set}" != set; then
7964EOF
7965cat >> $CONFIG_STATUS <<EOF
7966 CONFIG_HEADERS="pyconfig.h"
7967EOF
7968cat >> $CONFIG_STATUS <<\EOF
7969fi
7970for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007971 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00007972 case "$ac_file" in
7973 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7974 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7975 *) ac_file_in="${ac_file}.in" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007976 esac
7977
Michael W. Hudson54241132001-12-07 15:38:26 +00007978 echo creating $ac_file
Guido van Rossum7f43da71994-08-01 12:15:30 +00007979
Michael W. Hudson54241132001-12-07 15:38:26 +00007980 rm -f conftest.frag conftest.in conftest.out
7981 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7982 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007983
7984EOF
7985
Michael W. Hudson54241132001-12-07 15:38:26 +00007986# Transform confdefs.h into a sed script conftest.vals that substitutes
7987# the proper values into config.h.in to produce config.h. And first:
7988# Protect against being on the right side of a sed subst in config.status.
7989# Protect against being in an unquoted here document in config.status.
7990rm -f conftest.vals
7991cat > conftest.hdr <<\EOF
7992s/[\\&%]/\\&/g
7993s%[\\$`]%\\&%g
7994s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7995s%ac_d%ac_u%gp
7996s%ac_u%ac_e%gp
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007997EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007998sed -n -f conftest.hdr confdefs.h > conftest.vals
7999rm -f conftest.hdr
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008000
8001# This sed command replaces #undef with comments. This is necessary, for
8002# example, in the case of _POSIX_SOURCE, which is predefined and required
8003# on some systems where configure will not decide to define it.
Michael W. Hudson54241132001-12-07 15:38:26 +00008004cat >> conftest.vals <<\EOF
8005s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008006EOF
8007
Michael W. Hudson54241132001-12-07 15:38:26 +00008008# Break up conftest.vals because some shells have a limit on
8009# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008010
Jack Jansendd19cf82001-12-06 22:36:17 +00008011rm -f conftest.tail
Michael W. Hudson54241132001-12-07 15:38:26 +00008012while :
Jack Jansendd19cf82001-12-06 22:36:17 +00008013do
Michael W. Hudson54241132001-12-07 15:38:26 +00008014 ac_lines=`grep -c . conftest.vals`
8015 # grep -c gives empty output for an empty file on some AIX systems.
8016 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8017 # Write a limited-size here document to conftest.frag.
8018 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8019 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +00008020 echo 'CEOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008021 sed -f conftest.frag conftest.in > conftest.out
8022 rm -f conftest.in
8023 mv conftest.out conftest.in
8024' >> $CONFIG_STATUS
8025 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8026 rm -f conftest.vals
8027 mv conftest.tail conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00008028done
Michael W. Hudson54241132001-12-07 15:38:26 +00008029rm -f conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00008030
Michael W. Hudson54241132001-12-07 15:38:26 +00008031cat >> $CONFIG_STATUS <<\EOF
8032 rm -f conftest.frag conftest.h
8033 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8034 cat conftest.in >> conftest.h
8035 rm -f conftest.in
8036 if cmp -s $ac_file conftest.h 2>/dev/null; then
8037 echo "$ac_file is unchanged"
8038 rm -f conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00008039 else
Michael W. Hudson54241132001-12-07 15:38:26 +00008040 # Remove last slash and all that follows it. Not all systems have dirname.
8041 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Jack Jansendd19cf82001-12-06 22:36:17 +00008042 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00008043 # The file is in a subdirectory.
8044 test ! -d "$ac_dir" && mkdir "$ac_dir"
Jack Jansendd19cf82001-12-06 22:36:17 +00008045 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008046 rm -f $ac_file
8047 mv conftest.h $ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00008048 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008049fi; done
8050
Guido van Rossumf78abae1997-01-21 22:02:36 +00008051EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008052cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00008053
Michael W. Hudson54241132001-12-07 15:38:26 +00008054EOF
8055cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008056
Michael W. Hudson54241132001-12-07 15:38:26 +00008057exit 0
Guido van Rossum627b2d71993-12-24 10:39:16 +00008058EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008059chmod +x $CONFIG_STATUS
Michael W. Hudson54241132001-12-07 15:38:26 +00008060rm -fr confdefs* $ac_clean_files
8061test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00008062
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008063
8064echo "creating Setup"
8065if test ! -f Modules/Setup
8066then
8067 cp $srcdir/Modules/Setup.dist Modules/Setup
8068fi
8069
8070echo "creating Setup.local"
8071if test ! -f Modules/Setup.local
8072then
8073 echo "# Edit this file for local setup changes" >Modules/Setup.local
8074fi
8075
8076echo "creating Makefile"
8077$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
8078 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00008079 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008080mv config.c Modules