blob: e741c55eb3e0a8c056180af37a4cca5c0b453da2 [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öwis2d7e2642002-04-05 16:50:53 +00003# From configure.in Revision: 1.302
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
Martin v. Löwis1142de32002-03-29 16:28:31 +000025 --enable-shared disable/enable building shared python library"
26ac_help="$ac_help
Michael W. Hudson54241132001-12-07 15:38:26 +000027 --with-pydebug build with Py_DEBUG defined"
28ac_help="$ac_help
29 --enable-toolbox-glue disable/enable MacOSX glue code for extensions"
30ac_help="$ac_help
31 --with-libs='lib1 ...' link against additional libs"
32ac_help="$ac_help
33 --with-signal-module disable/enable signal module"
34ac_help="$ac_help
35 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
36ac_help="$ac_help
37 --with(out)-threads[=DIRECTORY] disable/enable thread support"
38ac_help="$ac_help
39 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
40ac_help="$ac_help
41 --with-pth use GNU pth threading libraries"
42ac_help="$ac_help
43 --enable-ipv6 Enable ipv6 (with ipv4) support
44 --disable-ipv6 Disable ipv6 support"
45ac_help="$ac_help
46 --with(out)-cycle-gc disable/enable garbage collection"
47ac_help="$ac_help
48 --with(out)-pymalloc disable/enable specialized mallocs"
49ac_help="$ac_help
50 --with-wctype-functions use wctype.h functions"
51ac_help="$ac_help
52 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
53ac_help="$ac_help
54 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
55ac_help="$ac_help
56 --with-fpectl enable SIGFPE catching"
57ac_help="$ac_help
58 --with-libm=STRING math library"
59ac_help="$ac_help
60 --with-libc=STRING C library"
61ac_help="$ac_help
62 --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)"
Guido van Rossum627b2d71993-12-24 10:39:16 +000063
Guido van Rossum7f43da71994-08-01 12:15:30 +000064# Initialize some variables set by options.
65# The variables have the same names as the options, with
66# dashes changed to underlines.
Michael W. Hudson54241132001-12-07 15:38:26 +000067build=NONE
68cache_file=./config.cache
Guido van Rossum76be6ed1995-01-02 18:33:54 +000069exec_prefix=NONE
Michael W. Hudson54241132001-12-07 15:38:26 +000070host=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000071no_create=
Michael W. Hudson54241132001-12-07 15:38:26 +000072nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000073no_recursion=
74prefix=NONE
75program_prefix=NONE
76program_suffix=NONE
77program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000078silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000079site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000080srcdir=
Michael W. Hudson54241132001-12-07 15:38:26 +000081target=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000082verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000083x_includes=NONE
84x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000085bindir='${exec_prefix}/bin'
86sbindir='${exec_prefix}/sbin'
87libexecdir='${exec_prefix}/libexec'
88datadir='${prefix}/share'
89sysconfdir='${prefix}/etc'
90sharedstatedir='${prefix}/com'
91localstatedir='${prefix}/var'
92libdir='${exec_prefix}/lib'
93includedir='${prefix}/include'
94oldincludedir='/usr/include'
95infodir='${prefix}/info'
96mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000097
Michael W. Hudson54241132001-12-07 15:38:26 +000098# Initialize some other variables.
99subdirs=
100MFLAGS= MAKEFLAGS=
101SHELL=${CONFIG_SHELL-/bin/sh}
102# Maximum number of lines to put in a shell here document.
103ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +0000104
105ac_prev=
106for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000107do
Michael W. Hudson54241132001-12-07 15:38:26 +0000108
Guido van Rossum7f43da71994-08-01 12:15:30 +0000109 # If the previous option needs an argument, assign it.
110 if test -n "$ac_prev"; then
111 eval "$ac_prev=\$ac_option"
112 ac_prev=
113 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000114 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000115
Michael W. Hudson54241132001-12-07 15:38:26 +0000116 case "$ac_option" in
117 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
118 *) ac_optarg= ;;
119 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000120
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000121 # Accept the important Cygnus configure options, so we can diagnose typos.
122
Michael W. Hudson54241132001-12-07 15:38:26 +0000123 case "$ac_option" in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000124
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000125 -bindir | --bindir | --bindi | --bind | --bin | --bi)
126 ac_prev=bindir ;;
127 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000128 bindir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000129
130 -build | --build | --buil | --bui | --bu)
Michael W. Hudson54241132001-12-07 15:38:26 +0000131 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000132 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000133 build="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000134
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000135 -cache-file | --cache-file | --cache-fil | --cache-fi \
136 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
137 ac_prev=cache_file ;;
138 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
139 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000140 cache_file="$ac_optarg" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000141
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000142 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
143 ac_prev=datadir ;;
144 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
145 | --da=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000146 datadir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000147
Guido van Rossum7f43da71994-08-01 12:15:30 +0000148 -disable-* | --disable-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000149 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000150 # Reject names that are not valid shell variable names.
Michael W. Hudson54241132001-12-07 15:38:26 +0000151 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
152 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
153 fi
154 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
155 eval "enable_${ac_feature}=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000156
157 -enable-* | --enable-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000158 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000159 # Reject names that are not valid shell variable names.
Michael W. Hudson54241132001-12-07 15:38:26 +0000160 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
161 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
162 fi
163 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
164 case "$ac_option" in
165 *=*) ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000166 *) ac_optarg=yes ;;
167 esac
Michael W. Hudson54241132001-12-07 15:38:26 +0000168 eval "enable_${ac_feature}='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000169
Guido van Rossum7f43da71994-08-01 12:15:30 +0000170 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
171 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
172 | --exec | --exe | --ex)
173 ac_prev=exec_prefix ;;
174 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
175 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
176 | --exec=* | --exe=* | --ex=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000177 exec_prefix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000178
179 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000180 # Obsolete; use --with-gas.
181 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000182
Michael W. Hudson54241132001-12-07 15:38:26 +0000183 -help | --help | --hel | --he)
184 # Omit some internal or obsolete options to make the list less imposing.
185 # This message is too long to be a string in the A/UX 3.1 sh.
186 cat << EOF
187Usage: configure [options] [host]
188Options: [defaults in brackets after descriptions]
189Configuration:
190 --cache-file=FILE cache test results in FILE
191 --help print this message
192 --no-create do not create output files
193 --quiet, --silent do not print \`checking...' messages
194 --version print the version of autoconf that created configure
195Directory and file names:
196 --prefix=PREFIX install architecture-independent files in PREFIX
197 [$ac_default_prefix]
198 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
199 [same as prefix]
200 --bindir=DIR user executables in DIR [EPREFIX/bin]
201 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
202 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
203 --datadir=DIR read-only architecture-independent data in DIR
204 [PREFIX/share]
205 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
206 --sharedstatedir=DIR modifiable architecture-independent data in DIR
207 [PREFIX/com]
208 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
209 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
210 --includedir=DIR C header files in DIR [PREFIX/include]
211 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
212 --infodir=DIR info documentation in DIR [PREFIX/info]
213 --mandir=DIR man documentation in DIR [PREFIX/man]
214 --srcdir=DIR find the sources in DIR [configure dir or ..]
215 --program-prefix=PREFIX prepend PREFIX to installed program names
216 --program-suffix=SUFFIX append SUFFIX to installed program names
217 --program-transform-name=PROGRAM
218 run sed PROGRAM on installed program names
219EOF
220 cat << EOF
221Host type:
222 --build=BUILD configure for building on BUILD [BUILD=HOST]
223 --host=HOST configure for HOST [guessed]
224 --target=TARGET configure for TARGET [TARGET=HOST]
225Features and packages:
226 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
227 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
228 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
229 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
230 --x-includes=DIR X include files are in DIR
231 --x-libraries=DIR X library files are in DIR
232EOF
233 if test -n "$ac_help"; then
234 echo "--enable and --with options recognized:$ac_help"
235 fi
236 exit 0 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000237
238 -host | --host | --hos | --ho)
Michael W. Hudson54241132001-12-07 15:38:26 +0000239 ac_prev=host ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000240 -host=* | --host=* | --hos=* | --ho=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000241 host="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000242
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000243 -includedir | --includedir | --includedi | --included | --include \
244 | --includ | --inclu | --incl | --inc)
245 ac_prev=includedir ;;
246 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247 | --includ=* | --inclu=* | --incl=* | --inc=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000248 includedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000249
250 -infodir | --infodir | --infodi | --infod | --info | --inf)
251 ac_prev=infodir ;;
252 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000253 infodir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000254
255 -libdir | --libdir | --libdi | --libd)
256 ac_prev=libdir ;;
257 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000258 libdir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000259
260 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261 | --libexe | --libex | --libe)
262 ac_prev=libexecdir ;;
263 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264 | --libexe=* | --libex=* | --libe=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000265 libexecdir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000266
267 -localstatedir | --localstatedir | --localstatedi | --localstated \
268 | --localstate | --localstat | --localsta | --localst \
269 | --locals | --local | --loca | --loc | --lo)
270 ac_prev=localstatedir ;;
271 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000274 localstatedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000275
276 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
277 ac_prev=mandir ;;
278 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000279 mandir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000280
Guido van Rossum7f43da71994-08-01 12:15:30 +0000281 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000282 # Obsolete; use --without-fp.
283 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000284
285 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
286 | --no-cr | --no-c)
287 no_create=yes ;;
288
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000289 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
291 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000292
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000293 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295 | --oldin | --oldi | --old | --ol | --o)
296 ac_prev=oldincludedir ;;
297 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000300 oldincludedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000301
Guido van Rossum7f43da71994-08-01 12:15:30 +0000302 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
303 ac_prev=prefix ;;
304 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000305 prefix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000306
307 -program-prefix | --program-prefix | --program-prefi | --program-pref \
308 | --program-pre | --program-pr | --program-p)
309 ac_prev=program_prefix ;;
310 -program-prefix=* | --program-prefix=* | --program-prefi=* \
311 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000312 program_prefix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000313
314 -program-suffix | --program-suffix | --program-suffi | --program-suff \
315 | --program-suf | --program-su | --program-s)
316 ac_prev=program_suffix ;;
317 -program-suffix=* | --program-suffix=* | --program-suffi=* \
318 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000319 program_suffix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000320
321 -program-transform-name | --program-transform-name \
322 | --program-transform-nam | --program-transform-na \
323 | --program-transform-n | --program-transform- \
324 | --program-transform | --program-transfor \
325 | --program-transfo | --program-transf \
326 | --program-trans | --program-tran \
327 | --progr-tra | --program-tr | --program-t)
328 ac_prev=program_transform_name ;;
329 -program-transform-name=* | --program-transform-name=* \
330 | --program-transform-nam=* | --program-transform-na=* \
331 | --program-transform-n=* | --program-transform-=* \
332 | --program-transform=* | --program-transfor=* \
333 | --program-transfo=* | --program-transf=* \
334 | --program-trans=* | --program-tran=* \
335 | --progr-tra=* | --program-tr=* | --program-t=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000336 program_transform_name="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000337
338 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339 | -silent | --silent | --silen | --sile | --sil)
340 silent=yes ;;
341
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000342 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
343 ac_prev=sbindir ;;
344 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
345 | --sbi=* | --sb=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000346 sbindir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000347
348 -sharedstatedir | --sharedstatedir | --sharedstatedi \
349 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350 | --sharedst | --shareds | --shared | --share | --shar \
351 | --sha | --sh)
352 ac_prev=sharedstatedir ;;
353 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
356 | --sha=* | --sh=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000357 sharedstatedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000358
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000359 -site | --site | --sit)
360 ac_prev=site ;;
361 -site=* | --site=* | --sit=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000362 site="$ac_optarg" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000363
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
365 ac_prev=srcdir ;;
366 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000367 srcdir="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000368
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000369 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
370 | --syscon | --sysco | --sysc | --sys | --sy)
371 ac_prev=sysconfdir ;;
372 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
373 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000374 sysconfdir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375
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 ac_prev=target ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000378 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000379 target="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000380
381 -v | -verbose | --verbose | --verbos | --verbo | --verb)
382 verbose=yes ;;
383
Michael W. Hudson54241132001-12-07 15:38:26 +0000384 -version | --version | --versio | --versi | --vers)
385 echo "configure generated by autoconf version 2.13"
386 exit 0 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000387
388 -with-* | --with-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000389 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000390 # Reject names that are not valid shell variable names.
Michael W. Hudson54241132001-12-07 15:38:26 +0000391 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
392 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
393 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000394 ac_package=`echo $ac_package| sed 's/-/_/g'`
Michael W. Hudson54241132001-12-07 15:38:26 +0000395 case "$ac_option" in
396 *=*) ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000397 *) ac_optarg=yes ;;
398 esac
Michael W. Hudson54241132001-12-07 15:38:26 +0000399 eval "with_${ac_package}='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000400
401 -without-* | --without-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000402 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000403 # Reject names that are not valid shell variable names.
Michael W. Hudson54241132001-12-07 15:38:26 +0000404 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
405 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
406 fi
407 ac_package=`echo $ac_package| sed 's/-/_/g'`
408 eval "with_${ac_package}=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000409
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000410 --x)
411 # Obsolete; use --with-x.
412 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000413
414 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
415 | --x-incl | --x-inc | --x-in | --x-i)
416 ac_prev=x_includes ;;
417 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
418 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000419 x_includes="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000420
421 -x-libraries | --x-libraries | --x-librarie | --x-librari \
422 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
423 ac_prev=x_libraries ;;
424 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
425 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000426 x_libraries="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Michael W. Hudson54241132001-12-07 15:38:26 +0000428 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000429 ;;
430
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000431 *)
Michael W. Hudson54241132001-12-07 15:38:26 +0000432 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
433 echo "configure: warning: $ac_option: invalid host type" 1>&2
434 fi
435 if test "x$nonopt" != xNONE; then
436 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
437 fi
438 nonopt="$ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439 ;;
440
441 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000442done
443
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444if test -n "$ac_prev"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000445 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000446fi
447
Michael W. Hudson54241132001-12-07 15:38:26 +0000448trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
449
450# File descriptor usage:
451# 0 standard input
452# 1 file creation
453# 2 errors and warnings
454# 3 some systems may open it to /dev/tty
455# 4 used on the Kubota Titan
456# 6 checking for... messages and results
457# 5 compiler messages saved in config.log
458if test "$silent" = yes; then
459 exec 6>/dev/null
460else
461 exec 6>&1
462fi
463exec 5>./config.log
464
465echo "\
466This file contains any messages produced by compilers while
467running configure, to aid debugging if configure makes a mistake.
468" 1>&5
469
470# Strip out --no-create and --no-recursion so they do not pile up.
471# Also quote any args containing shell metacharacters.
472ac_configure_args=
473for ac_arg
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474do
Michael W. Hudson54241132001-12-07 15:38:26 +0000475 case "$ac_arg" in
476 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
477 | --no-cr | --no-c) ;;
478 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
479 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
480 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
481 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
482 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483 esac
484done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000485
Michael W. Hudson54241132001-12-07 15:38:26 +0000486# NLS nuisances.
487# Only set these to C if already set. These must not be set unconditionally
488# because not all systems understand e.g. LANG=C (notably SCO).
489# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
490# Non-C LC_CTYPE values break the ctype check.
491if test "${LANG+set}" = set; then LANG=C; export LANG; fi
492if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
493if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
494if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000495
Michael W. Hudson54241132001-12-07 15:38:26 +0000496# confdefs.h avoids OS command line length limits that DEFS can exceed.
497rm -rf conftest* confdefs.h
498# AIX cpp loses on an empty file, so make sure it contains at least a newline.
499echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000500
Michael W. Hudson54241132001-12-07 15:38:26 +0000501# A filename unique to this package, relative to the directory that
502# configure is in, which we can look for to find out if srcdir is correct.
503ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000504
505# Find the source files, if location was not specified.
506if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000507 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000508 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000509 ac_prog=$0
Michael W. Hudson54241132001-12-07 15:38:26 +0000510 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000511 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512 srcdir=$ac_confdir
513 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000514 srcdir=..
515 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000516else
517 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000518fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000519if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000520 if test "$ac_srcdir_defaulted" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000521 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000522 else
Michael W. Hudson54241132001-12-07 15:38:26 +0000523 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000524 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000525fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000526srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000527
528# Prefer explicitly selected file to automatically selected ones.
529if test -z "$CONFIG_SITE"; then
530 if test "x$prefix" != xNONE; then
531 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
532 else
533 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
534 fi
535fi
536for ac_site_file in $CONFIG_SITE; do
537 if test -r "$ac_site_file"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000538 echo "loading site script $ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000539 . "$ac_site_file"
540 fi
541done
542
543if test -r "$cache_file"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000544 echo "loading cache $cache_file"
545 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000546else
Michael W. Hudson54241132001-12-07 15:38:26 +0000547 echo "creating cache $cache_file"
548 > $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000549fi
550
Guido van Rossum7f43da71994-08-01 12:15:30 +0000551ac_ext=c
Michael W. Hudson54241132001-12-07 15:38:26 +0000552# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000553ac_cpp='$CPP $CPPFLAGS'
Michael W. Hudson54241132001-12-07 15:38:26 +0000554ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
555ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
556cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000557
Michael W. Hudson54241132001-12-07 15:38:26 +0000558ac_exeext=
559ac_objext=o
560if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
561 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
562 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
563 ac_n= ac_c='
564' ac_t=' '
565 else
566 ac_n=-n ac_c= ac_t=
567 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000568else
Michael W. Hudson54241132001-12-07 15:38:26 +0000569 ac_n= ac_c='\c' ac_t=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000570fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000571
Michael W. Hudson54241132001-12-07 15:38:26 +0000572
573
Guido van Rossum627b2d71993-12-24 10:39:16 +0000574
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000575# Set VERSION so we only need to edit in one place (i.e., here)
576
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +0000577VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000578
Martin v. Löwis1142de32002-03-29 16:28:31 +0000579
580SOVERSION=1.0
581
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +0000582# Arguments passed to configure.
583
584CONFIG_ARGS="$ac_configure_args"
585
Michael W. Hudson54241132001-12-07 15:38:26 +0000586
Jack Jansene578a632001-08-15 01:27:14 +0000587# Check whether --enable-framework or --disable-framework was given.
588if test "${enable_framework+set}" = set; then
589 enableval="$enable_framework"
Michael W. Hudson54241132001-12-07 15:38:26 +0000590
Jack Jansene578a632001-08-15 01:27:14 +0000591 case $enableval in
Michael W. Hudson54241132001-12-07 15:38:26 +0000592 yes)
Jack Jansene578a632001-08-15 01:27:14 +0000593 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +0000594 esac
595 case $enableval in
596 no)
597 PYTHONFRAMEWORK=
598 PYTHONFRAMEWORKDIR=no-framework
599 PYTHONFRAMEWORKPREFIX=
600 PYTHONFRAMEWORKINSTALLDIR=
601 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +0000602 ;;
603 *)
Jack Jansen127e56e2001-09-11 14:41:54 +0000604 PYTHONFRAMEWORK=Python
605 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +0000606 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +0000607 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
608 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +0000609 esac
Michael W. Hudson54241132001-12-07 15:38:26 +0000610
Guido van Rossum563e7081996-09-10 18:20:48 +0000611else
Michael W. Hudson54241132001-12-07 15:38:26 +0000612
Jack Jansene578a632001-08-15 01:27:14 +0000613 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +0000614 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +0000615 PYTHONFRAMEWORKPREFIX=
616 PYTHONFRAMEWORKINSTALLDIR=
617 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000618
Michael W. Hudson54241132001-12-07 15:38:26 +0000619fi
620
621
622
623
624
Jack Jansene578a632001-08-15 01:27:14 +0000625
626##AC_ARG_WITH(dyld,
627##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
628##
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000629# Set name for machine-dependent library files
630
Michael W. Hudson54241132001-12-07 15:38:26 +0000631echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000632echo "configure:633: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000633if test -z "$MACHDEP"
634then
Guido van Rossum563e7081996-09-10 18:20:48 +0000635 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +0000636 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000637 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000638 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000639 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000640 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000641 ac_md_system=`echo $ac_sys_system |
642 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
643 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +0000644 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000645 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000646
Guido van Rossum07397971997-04-29 21:49:50 +0000647 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000648 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000649 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +0000650 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000651 esac
652fi
Guido van Rossum91922671997-10-09 20:24:13 +0000653
654#
655# SGI compilers allow the specification of the both the ABI and the
656# ISA on the command line. Depending on the values of these switches,
657# different and often incompatable code will be generated.
658#
659# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
660# thus supply support for various ABI/ISA combinations. The MACHDEP
661# variable is also adjusted.
662#
663
664if test ! -z "$SGI_ABI"
665then
666 CC="cc $SGI_ABI"
667 LDFLAGS="$SGI_ABI $LDFLAGS"
668 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
669fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000670echo "$ac_t""$MACHDEP" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000671
Guido van Rossum627b2d71993-12-24 10:39:16 +0000672# checks for alternative programs
Michael W. Hudson54241132001-12-07 15:38:26 +0000673echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000674echo "configure:675: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000675# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000676if test "${with_gcc+set}" = set; then
677 withval="$with_gcc"
Michael W. Hudson54241132001-12-07 15:38:26 +0000678
Guido van Rossum7f43da71994-08-01 12:15:30 +0000679 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000680 no) CC=cc
681 without_gcc=yes;;
682 yes) CC=gcc
683 without_gcc=no;;
684 *) CC=$withval
685 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000686 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000687else
Michael W. Hudson54241132001-12-07 15:38:26 +0000688
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000689 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000690 AIX*) CC=cc_r
691 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000692 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000693 case $BE_HOST_CPU in
694 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000695 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000696 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000697 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 +0000698 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000699 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000700 ;;
701 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000702 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000703 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000704 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000705 ;;
706 *)
Michael W. Hudson54241132001-12-07 15:38:26 +0000707 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000708 ;;
709 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000710 AR="\$(srcdir)/Modules/ar_beos"
711 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000712 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000713 Monterey*)
714 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +0000715 without_gcc=;;
716 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000717 esac
Michael W. Hudson54241132001-12-07 15:38:26 +0000718fi
719
720echo "$ac_t""$without_gcc" 1>&6
721
722
Guido van Rossum95012191999-12-16 17:50:52 +0000723
Fred Drakea1a84e72001-03-06 05:52:16 +0000724MAINOBJ=python.o
Michael W. Hudson54241132001-12-07 15:38:26 +0000725echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000726echo "configure:727: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000727# Check whether --with-cxx or --without-cxx was given.
728if test "${with_cxx+set}" = set; then
729 withval="$with_cxx"
Michael W. Hudson54241132001-12-07 15:38:26 +0000730
Martin v. Löwis22352952000-12-13 17:37:02 +0000731 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000732 case $withval in
733 no) CXX=
734 with_cxx=no;;
735 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000736 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000737 with_cxx=$withval;;
738 esac
739else
Michael W. Hudson54241132001-12-07 15:38:26 +0000740
Guido van Rossum95012191999-12-16 17:50:52 +0000741 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000742 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000743
Michael W. Hudson54241132001-12-07 15:38:26 +0000744fi
Guido van Rossum95012191999-12-16 17:50:52 +0000745
Michael W. Hudson54241132001-12-07 15:38:26 +0000746echo "$ac_t""$with_cxx" 1>&6
747
748if test "$with_cxx" = "yes"
749then
750 { echo "configure: error: must supply a compiler when using --with-cxx" 1>&2; exit 1; }
751fi
752
753
754
755
756if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +0000757then
758 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
759do
Michael W. Hudson54241132001-12-07 15:38:26 +0000760# 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 +0000761set dummy $ac_prog; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +0000762echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000763echo "configure:764: checking for $ac_word" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +0000764if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
765 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000766else
767 if test -n "$CXX"; then
768 ac_cv_prog_CXX="$CXX" # Let the user override the test.
769else
Michael W. Hudson54241132001-12-07 15:38:26 +0000770 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
771 ac_dummy="$PATH"
772 for ac_dir in $ac_dummy; do
773 test -z "$ac_dir" && ac_dir=.
774 if test -f $ac_dir/$ac_word; then
775 ac_cv_prog_CXX="$ac_prog"
776 break
777 fi
778 done
779 IFS="$ac_save_ifs"
Martin v. Löwis22352952000-12-13 17:37:02 +0000780fi
781fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000782CXX="$ac_cv_prog_CXX"
Martin v. Löwis22352952000-12-13 17:37:02 +0000783if test -n "$CXX"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000784 echo "$ac_t""$CXX" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000785else
Michael W. Hudson54241132001-12-07 15:38:26 +0000786 echo "$ac_t""no" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000787fi
788
Michael W. Hudson54241132001-12-07 15:38:26 +0000789test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +0000790done
791test -n "$CXX" || CXX="notfound"
792
793 if test "$CXX" = "notfound"
794 then
795 CXX=
796 else
Michael W. Hudson54241132001-12-07 15:38:26 +0000797 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000798echo "configure:799: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +0000799
800ac_ext=C
801# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Martin v. Löwis22352952000-12-13 17:37:02 +0000802ac_cpp='$CXXCPP $CPPFLAGS'
Michael W. Hudson54241132001-12-07 15:38:26 +0000803ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
804ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
805cross_compiling=$ac_cv_prog_cxx_cross
806
807cat > conftest.$ac_ext << EOF
808
Martin v. Löwis1142de32002-03-29 16:28:31 +0000809#line 810 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000810#include "confdefs.h"
811
Michael W. Hudson54241132001-12-07 15:38:26 +0000812int main(){return(0);}
813EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +0000814if { (eval echo configure:815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000815 ac_cv_prog_cxx_works=yes
816 # If we can't run a trivial program, we are probably using a cross compiler.
817 if (./conftest; exit) 2>/dev/null; then
818 ac_cv_prog_cxx_cross=no
Jack Jansendd19cf82001-12-06 22:36:17 +0000819 else
Michael W. Hudson54241132001-12-07 15:38:26 +0000820 ac_cv_prog_cxx_cross=yes
Jack Jansendd19cf82001-12-06 22:36:17 +0000821 fi
Jack Jansendd19cf82001-12-06 22:36:17 +0000822else
Michael W. Hudson54241132001-12-07 15:38:26 +0000823 echo "configure: failed program was:" >&5
824 cat conftest.$ac_ext >&5
825 ac_cv_prog_cxx_works=no
Jack Jansendd19cf82001-12-06 22:36:17 +0000826fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000827rm -fr conftest*
828ac_ext=c
829# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Jack Jansendd19cf82001-12-06 22:36:17 +0000830ac_cpp='$CPP $CPPFLAGS'
Michael W. Hudson54241132001-12-07 15:38:26 +0000831ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
832ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
833cross_compiling=$ac_cv_prog_cc_cross
834
835echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
836if test $ac_cv_prog_cxx_works = no; then
837 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
838fi
839echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000840echo "configure:841: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +0000841echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
842cross_compiling=$ac_cv_prog_cxx_cross
Martin v. Löwis22352952000-12-13 17:37:02 +0000843
844 fi
845fi
846
Guido van Rossum8b131c51995-03-09 14:10:13 +0000847# If the user switches compilers, we can't believe the cache
848if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
849then
Michael W. Hudson54241132001-12-07 15:38:26 +0000850 { echo "configure: error: cached CC is different -- throw away $cache_file
851(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
Guido van Rossum8b131c51995-03-09 14:10:13 +0000852fi
853
Michael W. Hudson54241132001-12-07 15:38:26 +0000854# Extract the first word of "gcc", so it can be a program name with args.
Jack Jansendd19cf82001-12-06 22:36:17 +0000855set dummy gcc; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +0000856echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000857echo "configure:858: checking for $ac_word" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +0000858if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
859 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000860else
861 if test -n "$CC"; then
862 ac_cv_prog_CC="$CC" # Let the user override the test.
863else
Michael W. Hudson54241132001-12-07 15:38:26 +0000864 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
865 ac_dummy="$PATH"
866 for ac_dir in $ac_dummy; do
867 test -z "$ac_dir" && ac_dir=.
868 if test -f $ac_dir/$ac_word; then
869 ac_cv_prog_CC="gcc"
870 break
871 fi
872 done
873 IFS="$ac_save_ifs"
Jack Jansendd19cf82001-12-06 22:36:17 +0000874fi
875fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000876CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +0000877if test -n "$CC"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000878 echo "$ac_t""$CC" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +0000879else
Michael W. Hudson54241132001-12-07 15:38:26 +0000880 echo "$ac_t""no" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +0000881fi
882
Jack Jansendd19cf82001-12-06 22:36:17 +0000883if test -z "$CC"; then
884 # Extract the first word of "cc", so it can be a program name with args.
885set dummy cc; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +0000886echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000887echo "configure:888: checking for $ac_word" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +0000888if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
889 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +0000890else
891 if test -n "$CC"; then
892 ac_cv_prog_CC="$CC" # Let the user override the test.
893else
Michael W. Hudson54241132001-12-07 15:38:26 +0000894 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895 ac_prog_rejected=no
Michael W. Hudson54241132001-12-07 15:38:26 +0000896 ac_dummy="$PATH"
897 for ac_dir in $ac_dummy; do
898 test -z "$ac_dir" && ac_dir=.
899 if test -f $ac_dir/$ac_word; then
900 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
901 ac_prog_rejected=yes
902 continue
903 fi
904 ac_cv_prog_CC="cc"
905 break
906 fi
907 done
908 IFS="$ac_save_ifs"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909if test $ac_prog_rejected = yes; then
910 # We found a bogon in the path, so make sure we never use it.
911 set dummy $ac_cv_prog_CC
912 shift
Michael W. Hudson54241132001-12-07 15:38:26 +0000913 if test $# -gt 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 # We chose a different compiler from the bogus one.
915 # However, it has the same basename, so the bogon will be chosen
916 # first if we set CC to just the basename; use the full file name.
917 shift
Michael W. Hudson54241132001-12-07 15:38:26 +0000918 set dummy "$ac_dir/$ac_word" "$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919 shift
920 ac_cv_prog_CC="$@"
921 fi
922fi
923fi
924fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000925CC="$ac_cv_prog_CC"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926if test -n "$CC"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000927 echo "$ac_t""$CC" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928else
Michael W. Hudson54241132001-12-07 15:38:26 +0000929 echo "$ac_t""no" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930fi
931
Michael W. Hudson54241132001-12-07 15:38:26 +0000932 if test -z "$CC"; then
933 case "`uname -s`" in
934 *win32* | *WIN32*)
935 # Extract the first word of "cl", so it can be a program name with args.
936set dummy cl; ac_word=$2
937echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000938echo "configure:939: checking for $ac_word" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +0000939if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
940 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000941else
942 if test -n "$CC"; then
943 ac_cv_prog_CC="$CC" # Let the user override the test.
944else
Michael W. Hudson54241132001-12-07 15:38:26 +0000945 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
946 ac_dummy="$PATH"
947 for ac_dir in $ac_dummy; do
948 test -z "$ac_dir" && ac_dir=.
949 if test -f $ac_dir/$ac_word; then
950 ac_cv_prog_CC="cl"
951 break
Jack Jansendd19cf82001-12-06 22:36:17 +0000952 fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000953 done
954 IFS="$ac_save_ifs"
955fi
956fi
957CC="$ac_cv_prog_CC"
958if test -n "$CC"; then
959 echo "$ac_t""$CC" 1>&6
960else
961 echo "$ac_t""no" 1>&6
962fi
963 ;;
964 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +0000965 fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000966 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
Jack Jansendd19cf82001-12-06 22:36:17 +0000967fi
968
Michael W. Hudson54241132001-12-07 15:38:26 +0000969echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000970echo "configure:971: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Jack Jansendd19cf82001-12-06 22:36:17 +0000971
Michael W. Hudson54241132001-12-07 15:38:26 +0000972ac_ext=c
973# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
974ac_cpp='$CPP $CPPFLAGS'
975ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
976ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
977cross_compiling=$ac_cv_prog_cc_cross
978
979cat > conftest.$ac_ext << EOF
980
Martin v. Löwis1142de32002-03-29 16:28:31 +0000981#line 982 "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +0000982#include "confdefs.h"
983
Michael W. Hudson54241132001-12-07 15:38:26 +0000984main(){return(0);}
985EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +0000986if { (eval echo configure:987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000987 ac_cv_prog_cc_works=yes
988 # If we can't run a trivial program, we are probably using a cross compiler.
989 if (./conftest; exit) 2>/dev/null; then
990 ac_cv_prog_cc_cross=no
991 else
992 ac_cv_prog_cc_cross=yes
993 fi
Jack Jansendd19cf82001-12-06 22:36:17 +0000994else
Michael W. Hudson54241132001-12-07 15:38:26 +0000995 echo "configure: failed program was:" >&5
996 cat conftest.$ac_ext >&5
997 ac_cv_prog_cc_works=no
Jack Jansendd19cf82001-12-06 22:36:17 +0000998fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000999rm -fr conftest*
1000ac_ext=c
1001# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1002ac_cpp='$CPP $CPPFLAGS'
1003ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1004ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1005cross_compiling=$ac_cv_prog_cc_cross
Jack Jansendd19cf82001-12-06 22:36:17 +00001006
Michael W. Hudson54241132001-12-07 15:38:26 +00001007echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1008if test $ac_cv_prog_cc_works = no; then
1009 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
Jack Jansendd19cf82001-12-06 22:36:17 +00001010fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001011echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001012echo "configure:1013: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001013echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1014cross_compiling=$ac_cv_prog_cc_cross
1015
1016echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001017echo "configure:1018: checking whether we are using GNU C" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001018if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1019 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001020else
Michael W. Hudson54241132001-12-07 15:38:26 +00001021 cat > conftest.c <<EOF
1022#ifdef __GNUC__
1023 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001024#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00001025EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001026if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001027 ac_cv_prog_gcc=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001028else
Michael W. Hudson54241132001-12-07 15:38:26 +00001029 ac_cv_prog_gcc=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001030fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001031fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001032
Michael W. Hudson54241132001-12-07 15:38:26 +00001033echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1034
1035if test $ac_cv_prog_gcc = yes; then
1036 GCC=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037else
Michael W. Hudson54241132001-12-07 15:38:26 +00001038 GCC=
1039fi
Jack Jansendd19cf82001-12-06 22:36:17 +00001040
Michael W. Hudson54241132001-12-07 15:38:26 +00001041ac_test_CFLAGS="${CFLAGS+set}"
1042ac_save_CFLAGS="$CFLAGS"
1043CFLAGS=
1044echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001045echo "configure:1046: checking whether ${CC-cc} accepts -g" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001046if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1047 echo $ac_n "(cached) $ac_c" 1>&6
1048else
1049 echo 'void f(){}' > conftest.c
1050if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001051 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001052else
Michael W. Hudson54241132001-12-07 15:38:26 +00001053 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001054fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001055rm -f conftest*
1056
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001057fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001058
1059echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001060if test "$ac_test_CFLAGS" = set; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001061 CFLAGS="$ac_save_CFLAGS"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001062elif test $ac_cv_prog_cc_g = yes; then
1063 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001064 CFLAGS="-g -O2"
1065 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001066 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 fi
1068else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001069 if test "$GCC" = yes; then
1070 CFLAGS="-O2"
1071 else
1072 CFLAGS=
1073 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074fi
1075
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001076
1077# checks for UNIX variants that set C preprocessor variables
Michael W. Hudson54241132001-12-07 15:38:26 +00001078echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001079echo "configure:1080: checking how to run the C preprocessor" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001080# On Suns, sometimes $CPP names a directory.
1081if test -n "$CPP" && test -d "$CPP"; then
1082 CPP=
1083fi
1084if test -z "$CPP"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001085if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1086 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001087else
Michael W. Hudson54241132001-12-07 15:38:26 +00001088 # This must be in double quotes, not single quotes, because CPP may get
1089 # substituted into the Makefile and "${CC-cc}" will confuse make.
1090 CPP="${CC-cc} -E"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001091 # On the NeXT, cc -E runs the code through the compiler's parser,
Michael W. Hudson54241132001-12-07 15:38:26 +00001092 # not just through cpp.
1093 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001094#line 1095 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001095#include "confdefs.h"
1096#include <assert.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001097Syntax Error
1098EOF
1099ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00001100{ (eval echo configure:1101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001101ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1102if test -z "$ac_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001103 :
1104else
Michael W. Hudson54241132001-12-07 15:38:26 +00001105 echo "$ac_err" >&5
1106 echo "configure: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001107 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001108 rm -rf conftest*
1109 CPP="${CC-cc} -E -traditional-cpp"
1110 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001111#line 1112 "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001112#include "confdefs.h"
1113#include <assert.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001114Syntax Error
1115EOF
1116ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00001117{ (eval echo configure:1118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001118ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1119if test -z "$ac_err"; then
Jack Jansendd19cf82001-12-06 22:36:17 +00001120 :
1121else
Michael W. Hudson54241132001-12-07 15:38:26 +00001122 echo "$ac_err" >&5
1123 echo "configure: failed program was:" >&5
Jack Jansendd19cf82001-12-06 22:36:17 +00001124 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001125 rm -rf conftest*
1126 CPP="${CC-cc} -nologo -E"
1127 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001128#line 1129 "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001129#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00001130#include <assert.h>
1131Syntax Error
1132EOF
1133ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00001134{ (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001135ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1136if test -z "$ac_err"; then
Jack Jansendd19cf82001-12-06 22:36:17 +00001137 :
1138else
Michael W. Hudson54241132001-12-07 15:38:26 +00001139 echo "$ac_err" >&5
1140 echo "configure: failed program was:" >&5
1141 cat conftest.$ac_ext >&5
1142 rm -rf conftest*
1143 CPP=/lib/cpp
Jack Jansendd19cf82001-12-06 22:36:17 +00001144fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001145rm -f conftest*
1146fi
1147rm -f conftest*
1148fi
1149rm -f conftest*
1150 ac_cv_prog_CPP="$CPP"
1151fi
1152 CPP="$ac_cv_prog_CPP"
1153else
1154 ac_cv_prog_CPP="$CPP"
1155fi
1156echo "$ac_t""$CPP" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001157
Michael W. Hudson54241132001-12-07 15:38:26 +00001158echo $ac_n "checking for AIX""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001159echo "configure:1160: checking for AIX" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001160cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001161#line 1162 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001162#include "confdefs.h"
1163#ifdef _AIX
1164 yes
1165#endif
1166
Michael W. Hudson54241132001-12-07 15:38:26 +00001167EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1169 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001170 rm -rf conftest*
1171 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001172#define _ALL_SOURCE 1
1173EOF
1174
1175else
Michael W. Hudson54241132001-12-07 15:38:26 +00001176 rm -rf conftest*
1177 echo "$ac_t""no" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001178fi
1179rm -f conftest*
1180
Michael W. Hudson54241132001-12-07 15:38:26 +00001181
1182ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1183echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001184echo "configure:1185: checking for minix/config.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001185if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1186 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001187else
Michael W. Hudson54241132001-12-07 15:38:26 +00001188 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001189#line 1190 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001190#include "confdefs.h"
1191#include <minix/config.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001192EOF
1193ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00001194{ (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001195ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1196if test -z "$ac_err"; then
1197 rm -rf conftest*
1198 eval "ac_cv_header_$ac_safe=yes"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001199else
Michael W. Hudson54241132001-12-07 15:38:26 +00001200 echo "$ac_err" >&5
1201 echo "configure: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001202 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001203 rm -rf conftest*
1204 eval "ac_cv_header_$ac_safe=no"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001205fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001206rm -f conftest*
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001207fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001208if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1209 echo "$ac_t""yes" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001210 MINIX=yes
1211else
Michael W. Hudson54241132001-12-07 15:38:26 +00001212 echo "$ac_t""no" 1>&6
1213MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001214fi
1215
1216if test "$MINIX" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001217 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001218#define _POSIX_SOURCE 1
1219EOF
1220
Michael W. Hudson54241132001-12-07 15:38:26 +00001221 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001222#define _POSIX_1_SOURCE 2
1223EOF
1224
Michael W. Hudson54241132001-12-07 15:38:26 +00001225 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001226#define _MINIX 1
1227EOF
1228
1229fi
1230
1231
Michael W. Hudson54241132001-12-07 15:38:26 +00001232echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001233echo "configure:1234: checking for Cygwin environment" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001234if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1235 echo $ac_n "(cached) $ac_c" 1>&6
1236else
1237 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001238#line 1239 "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +00001239#include "confdefs.h"
1240
1241int main() {
1242
1243#ifndef __CYGWIN__
1244#define __CYGWIN__ __CYGWIN32__
1245#endif
1246return __CYGWIN__;
1247; return 0; }
1248EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001249if { (eval echo configure:1250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001250 rm -rf conftest*
1251 ac_cv_cygwin=yes
1252else
1253 echo "configure: failed program was:" >&5
1254 cat conftest.$ac_ext >&5
1255 rm -rf conftest*
1256 ac_cv_cygwin=no
1257fi
1258rm -f conftest*
1259rm -f conftest*
1260fi
1261
1262echo "$ac_t""$ac_cv_cygwin" 1>&6
1263CYGWIN=
1264test "$ac_cv_cygwin" = yes && CYGWIN=yes
1265echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001266echo "configure:1267: checking for mingw32 environment" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001267if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1268 echo $ac_n "(cached) $ac_c" 1>&6
1269else
1270 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001271#line 1272 "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +00001272#include "confdefs.h"
1273
1274int main() {
1275return __MINGW32__;
1276; return 0; }
1277EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001278if { (eval echo configure:1279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001279 rm -rf conftest*
1280 ac_cv_mingw32=yes
1281else
1282 echo "configure: failed program was:" >&5
1283 cat conftest.$ac_ext >&5
1284 rm -rf conftest*
1285 ac_cv_mingw32=no
1286fi
1287rm -f conftest*
1288rm -f conftest*
1289fi
1290
1291echo "$ac_t""$ac_cv_mingw32" 1>&6
1292MINGW32=
1293test "$ac_cv_mingw32" = yes && MINGW32=yes
1294
1295
1296echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001297echo "configure:1298: checking for executable suffix" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001298if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1299 echo $ac_n "(cached) $ac_c" 1>&6
1300else
1301 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1302 ac_cv_exeext=.exe
1303else
1304 rm -f conftest*
1305 echo 'int main () { return 0; }' > conftest.$ac_ext
1306 ac_cv_exeext=
Martin v. Löwis1142de32002-03-29 16:28:31 +00001307 if { (eval echo configure:1308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001308 for file in conftest.*; do
1309 case $file in
1310 *.c | *.o | *.obj) ;;
1311 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1312 esac
1313 done
1314 else
1315 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1316 fi
1317 rm -f conftest*
1318 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1319fi
1320fi
1321
1322EXEEXT=""
1323test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1324echo "$ac_t""${ac_cv_exeext}" 1>&6
1325ac_exeext=$EXEEXT
1326
1327echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001328echo "configure:1329: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001329# Check whether --with-suffix or --without-suffix was given.
1330if test "${with_suffix+set}" = set; then
1331 withval="$with_suffix"
Michael W. Hudson54241132001-12-07 15:38:26 +00001332
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001333 case $withval in
1334 no) EXEEXT=;;
1335 yes) EXEEXT=.exe;;
1336 *) EXEEXT=$withval;;
1337 esac
Michael W. Hudson54241132001-12-07 15:38:26 +00001338fi
1339
1340echo "$ac_t""$EXEEXT" 1>&6
Jack Jansen1999ef42001-12-06 21:47:20 +00001341
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001342# Test whether we're running on a non-case-sensitive system, in which
1343# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00001344
Michael W. Hudson54241132001-12-07 15:38:26 +00001345echo $ac_n "checking for case-insensitive build directory""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001346echo "configure:1347: checking for case-insensitive build directory" >&5
Jack Jansen1999ef42001-12-06 21:47:20 +00001347if test -d "python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001348then
Michael W. Hudson54241132001-12-07 15:38:26 +00001349 echo "$ac_t""yes" 1>&6
Jack Jansen1999ef42001-12-06 21:47:20 +00001350 BUILDEXEEXT=.exe
1351else
Michael W. Hudson54241132001-12-07 15:38:26 +00001352 echo "$ac_t""no" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001353 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001354fi
Guido van Rossumff555e32000-09-22 15:38:21 +00001355
Guido van Rossumdd997f71998-10-07 19:58:26 +00001356case $MACHDEP in
1357bsdos*)
1358 case $CC in
1359 gcc) CC="$CC -D_HAVE_BSDI";;
1360 esac;;
1361esac
1362
Guido van Rossum24b1e751997-08-21 02:29:16 +00001363case $ac_sys_system in
1364hp*|HP*)
1365 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001366 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001367 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001368Monterey*)
1369 case $CC in
1370 cc) CC="$CC -Wl,-Bexport";;
1371 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001372SunOS*)
1373 # Some functions have a prototype only with that define, e.g. confstr
Michael W. Hudson54241132001-12-07 15:38:26 +00001374 cat >> confdefs.h <<\EOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001375#define __EXTENSIONS__ 1
1376EOF
1377
1378 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001379esac
1380
Michael W. Hudson54241132001-12-07 15:38:26 +00001381
1382
1383echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001384echo "configure:1385: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001385if test -z "$LIBRARY"
1386then
1387 LIBRARY='libpython$(VERSION).a'
1388fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001389echo "$ac_t""$LIBRARY" 1>&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001390
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001391# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00001392# name of the library into which to insert object files). BLDLIBRARY is also
1393# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
1394# is blank as the main program is not linked directly against LDLIBRARY.
1395# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
1396# systems without shared libraries, LDLIBRARY is the same as LIBRARY
1397# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
1398# DLLLIBRARY is the shared (i.e., DLL) library.
Michael W. Hudson54241132001-12-07 15:38:26 +00001399#
Martin v. Löwis1142de32002-03-29 16:28:31 +00001400# RUNSHARED is used to run shared python without installed libraries
1401#
1402# INSTSONAME is the name of the shared library that will be use to install
1403# on the system - some systems like version suffix, others don't
1404
1405
Michael W. Hudson54241132001-12-07 15:38:26 +00001406
1407
1408
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001409
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001410LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00001411BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis1142de32002-03-29 16:28:31 +00001412INSTSONMAE='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00001413DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00001414LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00001415RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001416
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001417# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001418# If CXX is set, and if it is needed to link a main function that was
1419# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
1420# python might then depend on the C++ runtime
Michael W. Hudson54241132001-12-07 15:38:26 +00001421# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001422# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001423
Michael W. Hudson54241132001-12-07 15:38:26 +00001424echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001425echo "configure:1426: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001426if test -z "$LINKCC"
1427then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001428 if test -z "$CXX"; then
1429 LINKCC="\$(PURIFY) \$(CC)"
1430 else
1431 echo 'int main(){return 0;}' > conftest.$ac_ext
1432 $CXX -c conftest.$ac_ext 2>&5
1433 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
1434 && test -s conftest$ac_exeext && ./conftest$ac_exeext
1435 then
1436 LINKCC="\$(PURIFY) \$(CC)"
1437 else
1438 LINKCC="\$(PURIFY) \$(CXX)"
1439 fi
1440 rm -fr conftest*
1441 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001442 case $ac_sys_system in
1443 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00001444 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001445 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00001446 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001447 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00001448 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001449 esac
1450fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001451echo "$ac_t""$LINKCC" 1>&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001452
Martin v. Löwis1142de32002-03-29 16:28:31 +00001453echo $ac_n "checking for --enable-shared""... $ac_c" 1>&6
1454echo "configure:1455: checking for --enable-shared" >&5
1455# Check whether --enable-shared or --disable-shared was given.
1456if test "${enable_shared+set}" = set; then
1457 enableval="$enable_shared"
1458 :
1459fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001460
Martin v. Löwis1142de32002-03-29 16:28:31 +00001461
1462if test -z "$enable_shared"
1463then
1464 enable_shared="no"
1465fi
1466echo "$ac_t""$enable_shared" 1>&6
1467
1468
1469echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
1470echo "configure:1471: checking LDLIBRARY" >&5
Jack Jansene578a632001-08-15 01:27:14 +00001471
Guido van Rossumb8552162001-09-05 14:58:11 +00001472# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
1473# library that we build, but we do not want to link against it (we
1474# will find it with a -framework option). For this reason there is an
1475# extra variable BLDLIBRARY against which Python and the extension
1476# modules are linked, BLDLIBRARY. This is normally the same as
1477# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00001478if test "$enable_framework"
1479then
1480 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
1481 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
1482 BLDLIBRARY=''
1483else
1484 BLDLIBRARY='$(LDLIBRARY)'
Michael W. Hudson54241132001-12-07 15:38:26 +00001485fi
Jack Jansene578a632001-08-15 01:27:14 +00001486
Martin v. Löwis1142de32002-03-29 16:28:31 +00001487# Other platforms follow
1488if test $enable_shared = "yes"; then
1489 case $ac_sys_system in
1490 BeOS*)
1491 LDLIBRARY='libpython$(VERSION).so'
1492 ;;
1493 CYGWIN*)
1494 LDLIBRARY='libpython$(VERSION).dll.a'
1495 DLLLIBRARY='libpython$(VERSION).dll'
1496 ;;
1497 SunOS*)
1498 LDLIBRARY='libpython$(VERSION).so'
1499 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
1500 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
1501 ;;
1502 Linux*)
1503 LDLIBRARY='libpython$(VERSION).so'
1504 BLDLIBRARY='-L. -lpython$(VERSION)'
1505 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
1506 INSTSONAME="$LDLIBRARY".$SOVERSION
1507 ;;
1508 hp*|HP*)
1509 LDLIBRARY='libpython$(VERSION).sl'
1510 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
1511 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
1512 ;;
1513 OSF*)
1514 LDLIBRARY='libpython$(VERSION).so'
1515 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
1516 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
1517 ;;
1518 esac
1519 # DG/UX requires some fancy ld contortions to produce a .so from an .a
1520 case $MACHDEP in
1521 dguxR4)
1522 LDLIBRARY='libpython$(VERSION).so'
1523 OPT="$OPT -pic"
1524 ;;
1525 esac
1526fi
1527
Michael W. Hudson54241132001-12-07 15:38:26 +00001528echo "$ac_t""$LDLIBRARY" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001529
Michael W. Hudson54241132001-12-07 15:38:26 +00001530# Extract the first word of "ranlib", so it can be a program name with args.
1531set dummy ranlib; ac_word=$2
1532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001533echo "configure:1534: checking for $ac_word" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001534if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1535 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001536else
1537 if test -n "$RANLIB"; then
1538 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1539else
Michael W. Hudson54241132001-12-07 15:38:26 +00001540 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1541 ac_dummy="$PATH"
1542 for ac_dir in $ac_dummy; do
1543 test -z "$ac_dir" && ac_dir=.
1544 if test -f $ac_dir/$ac_word; then
1545 ac_cv_prog_RANLIB="ranlib"
1546 break
1547 fi
1548 done
1549 IFS="$ac_save_ifs"
1550 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001551fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001552fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001553RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001554if test -n "$RANLIB"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001555 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001556else
Michael W. Hudson54241132001-12-07 15:38:26 +00001557 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001558fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001559
1560
Guido van Rossum7f43da71994-08-01 12:15:30 +00001561for ac_prog in ar aal
1562do
Michael W. Hudson54241132001-12-07 15:38:26 +00001563# Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001564set dummy $ac_prog; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +00001565echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001566echo "configure:1567: checking for $ac_word" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001567if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1568 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001569else
1570 if test -n "$AR"; then
1571 ac_cv_prog_AR="$AR" # Let the user override the test.
1572else
Michael W. Hudson54241132001-12-07 15:38:26 +00001573 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1574 ac_dummy="$PATH"
1575 for ac_dir in $ac_dummy; do
1576 test -z "$ac_dir" && ac_dir=.
1577 if test -f $ac_dir/$ac_word; then
1578 ac_cv_prog_AR="$ac_prog"
1579 break
1580 fi
1581 done
1582 IFS="$ac_save_ifs"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001583fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001584fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001585AR="$ac_cv_prog_AR"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001586if test -n "$AR"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001587 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001588else
Michael W. Hudson54241132001-12-07 15:38:26 +00001589 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001590fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001591
Michael W. Hudson54241132001-12-07 15:38:26 +00001592test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00001593done
1594test -n "$AR" || AR="ar"
1595
Michael W. Hudson54241132001-12-07 15:38:26 +00001596
Neil Schemenauera42c8272001-03-31 00:01:55 +00001597case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00001598bsdos*|hp*|HP*)
1599 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00001600 if test -z "$INSTALL"
1601 then
1602 INSTALL="${srcdir}/install-sh -c"
1603 fi
1604esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001605ac_aux_dir=
1606for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1607 if test -f $ac_dir/install-sh; then
1608 ac_aux_dir=$ac_dir
1609 ac_install_sh="$ac_aux_dir/install-sh -c"
1610 break
1611 elif test -f $ac_dir/install.sh; then
1612 ac_aux_dir=$ac_dir
1613 ac_install_sh="$ac_aux_dir/install.sh -c"
1614 break
1615 fi
1616done
1617if test -z "$ac_aux_dir"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001618 { 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 +00001619fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001620ac_config_guess=$ac_aux_dir/config.guess
1621ac_config_sub=$ac_aux_dir/config.sub
1622ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001623
1624# Find a good install program. We prefer a C program (faster),
1625# so one script is as good as another. But avoid the broken or
1626# incompatible versions:
1627# SysV /etc/install, /usr/sbin/install
1628# SunOS /usr/etc/install
1629# IRIX /sbin/install
1630# AIX /bin/install
1631# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1632# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1633# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1634# ./install, which can be erroneously created by make from ./install.sh.
Michael W. Hudson54241132001-12-07 15:38:26 +00001635echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001636echo "configure:1637: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001637if test -z "$INSTALL"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001638if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1639 echo $ac_n "(cached) $ac_c" 1>&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001640else
Michael W. Hudson54241132001-12-07 15:38:26 +00001641 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001642 for ac_dir in $PATH; do
1643 # Account for people who put trailing slashes in PATH elements.
Michael W. Hudson54241132001-12-07 15:38:26 +00001644 case "$ac_dir/" in
1645 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001646 *)
1647 # OSF1 and SCO ODT 3.0 have their own names for install.
1648 # Don't use installbsd from OSF since it installs stuff as root
1649 # by default.
1650 for ac_prog in ginstall scoinst install; do
Michael W. Hudson54241132001-12-07 15:38:26 +00001651 if test -f $ac_dir/$ac_prog; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001652 if test $ac_prog = install &&
Michael W. Hudson54241132001-12-07 15:38:26 +00001653 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001654 # AIX install. It has an incompatible calling convention.
1655 :
1656 else
1657 ac_cv_path_install="$ac_dir/$ac_prog -c"
1658 break 2
1659 fi
1660 fi
1661 done
1662 ;;
1663 esac
1664 done
Michael W. Hudson54241132001-12-07 15:38:26 +00001665 IFS="$ac_save_IFS"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001666
1667fi
1668 if test "${ac_cv_path_install+set}" = set; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001669 INSTALL="$ac_cv_path_install"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001670 else
1671 # As a last resort, use the slow shell script. We don't cache a
1672 # path for INSTALL within a source directory, because that will
1673 # break other packages using the cache if that directory is
1674 # removed, or if the path is relative.
Michael W. Hudson54241132001-12-07 15:38:26 +00001675 INSTALL="$ac_install_sh"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001676 fi
1677fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001678echo "$ac_t""$INSTALL" 1>&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001679
1680# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1681# It thinks the first close brace ends the variable substitution.
1682test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1683
Michael W. Hudson54241132001-12-07 15:38:26 +00001684test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001685
1686test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1687
Michael W. Hudson54241132001-12-07 15:38:26 +00001688
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001689# Not every filesystem supports hard links
1690
1691if test -z "$LN" ; then
1692 case $ac_sys_system in
1693 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001694 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001695 *) LN=ln;;
1696 esac
1697fi
1698
Fred Drake109d9862001-07-11 06:27:56 +00001699# Check for --with-pydebug
Michael W. Hudson54241132001-12-07 15:38:26 +00001700echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001701echo "configure:1702: checking for --with-pydebug" >&5
Fred Drake109d9862001-07-11 06:27:56 +00001702# Check whether --with-pydebug or --without-pydebug was given.
1703if test "${with_pydebug+set}" = set; then
1704 withval="$with_pydebug"
Michael W. Hudson54241132001-12-07 15:38:26 +00001705
Fred Drake109d9862001-07-11 06:27:56 +00001706if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00001707then cat >> confdefs.h <<\EOF
Fred Drake109d9862001-07-11 06:27:56 +00001708#define Py_DEBUG 1
1709EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00001710 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1711else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00001712fi
1713else
Michael W. Hudson54241132001-12-07 15:38:26 +00001714 echo "$ac_t""no" 1>&6
1715fi
1716
Fred Drake109d9862001-07-11 06:27:56 +00001717
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001718# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001719
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001720if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001721then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001722 case $GCC in
1723 yes)
1724 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001725 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001726 if test "$Py_DEBUG" = 'true' ; then
1727 # Optimization messes up debuggers, so turn it off for
1728 # debug builds.
1729 OPT="-g -Wall -Wstrict-prototypes"
1730 else
1731 OPT="-g -O3 -Wall -Wstrict-prototypes"
1732 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001733 *)
Fred Drake109d9862001-07-11 06:27:56 +00001734 OPT="-O3 -Wall -Wstrict-prototypes";;
1735 esac
1736 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001737 *)
1738 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00001739 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001740 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1741 *)
1742 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001743 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001744 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00001745 case $ac_sys_system in
1746 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00001747 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00001748 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001749fi
1750
Fred Drakee1ceaa02001-12-04 20:55:47 +00001751if test "$Py_DEBUG" = 'true'; then
1752 :
1753else
1754 OPT="-DNDEBUG $OPT"
1755fi
1756
Trent Mick635f6fb2000-08-23 21:33:05 +00001757# The current (beta) Monterey compiler dies with optimizations
1758case $ac_sys_system in
1759Monterey*) OPT="";;
1760esac
1761
Guido van Rossum563e7081996-09-10 18:20:48 +00001762if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001763then
1764 OPT="$OPT $ac_arch_flags"
1765fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00001766
Michael W. Hudson54241132001-12-07 15:38:26 +00001767echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001768echo "configure:1769: checking whether $CC accepts -OPT:Olimit=0" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001769if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
1770 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +00001771else
1772 ac_save_cc="$CC"
1773CC="$CC -OPT:Olimit=0"
1774if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001775 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00001776else
Michael W. Hudson54241132001-12-07 15:38:26 +00001777 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001778#line 1779 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001779#include "confdefs.h"
1780int main() { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001781EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001782if { (eval echo configure:1783: \"$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 +00001783then
Guido van Rossum91922671997-10-09 20:24:13 +00001784 ac_cv_opt_olimit_ok=yes
1785else
Michael W. Hudson54241132001-12-07 15:38:26 +00001786 echo "configure: failed program was:" >&5
1787 cat conftest.$ac_ext >&5
1788 rm -fr conftest*
1789 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00001790fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001791rm -fr conftest*
Guido van Rossum91922671997-10-09 20:24:13 +00001792fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001793
Guido van Rossum91922671997-10-09 20:24:13 +00001794CC="$ac_save_cc"
1795fi
1796
Michael W. Hudson54241132001-12-07 15:38:26 +00001797echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001798if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001799 case $ac_sys_system in
1800 Darwin*) OPT="$OPT" ;;
1801 *) OPT="$OPT -OPT:Olimit=0";;
1802 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001803else
Michael W. Hudson54241132001-12-07 15:38:26 +00001804 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001805echo "configure:1806: checking whether $CC accepts -Olimit 1500" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001806 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1807 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001808else
1809 ac_save_cc="$CC"
1810 CC="$CC -Olimit 1500"
1811 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001812 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001813else
Michael W. Hudson54241132001-12-07 15:38:26 +00001814 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001815#line 1816 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001816#include "confdefs.h"
1817int main() { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001818EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001819if { (eval echo configure:1820: \"$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 +00001820then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001821 ac_cv_olimit_ok=yes
1822else
Michael W. Hudson54241132001-12-07 15:38:26 +00001823 echo "configure: failed program was:" >&5
1824 cat conftest.$ac_ext >&5
1825 rm -fr conftest*
1826 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001827fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001828rm -fr conftest*
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001829fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001830
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001831 CC="$ac_save_cc"
1832fi
1833
Michael W. Hudson54241132001-12-07 15:38:26 +00001834 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001835 if test $ac_cv_olimit_ok = yes; then
1836 OPT="$OPT -Olimit 1500"
1837 fi
1838fi
1839
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001840# On some compilers, pthreads are available without further options
1841# (e.g. MacOS X). On some of these systems, the compiler will not
1842# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
1843# So we have to see first whether pthreads are available without
1844# options before we can check whether -Kpthread improves anything.
Michael W. Hudson54241132001-12-07 15:38:26 +00001845echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001846echo "configure:1847: checking whether pthreads are available without options" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001847if eval "test \"`echo '$''{'ac_cv_pthread_is_default'+set}'`\" = set"; then
1848 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00001849else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001850 if test "$cross_compiling" = yes; then
1851 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001852else
Michael W. Hudson54241132001-12-07 15:38:26 +00001853 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001854#line 1855 "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00001855#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001856
Martin v. Löwis130fb172001-07-19 11:00:41 +00001857#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001858
1859void* routine(void* p){return NULL;}
1860
1861int main(){
1862 pthread_t p;
1863 if(pthread_create(&p,NULL,routine,NULL)!=0)
1864 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00001865 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001866 return 0;
1867}
1868
Michael W. Hudson54241132001-12-07 15:38:26 +00001869EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001870if { (eval echo configure:1871: \"$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 +00001871then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001872 ac_cv_pthread_is_default=yes
1873else
Michael W. Hudson54241132001-12-07 15:38:26 +00001874 echo "configure: failed program was:" >&5
1875 cat conftest.$ac_ext >&5
1876 rm -fr conftest*
1877 ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001878fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001879rm -fr conftest*
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001880fi
1881
Michael W. Hudson54241132001-12-07 15:38:26 +00001882
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001883fi
1884
Michael W. Hudson54241132001-12-07 15:38:26 +00001885echo "$ac_t""$ac_cv_pthread_is_default" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001886
Michael W. Hudson54241132001-12-07 15:38:26 +00001887
1888if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001889then
1890 ac_cv_kpthread=no
1891else
1892# -Kpthread, if available, provides the right #defines
1893# and linker options to make pthread_create available
1894# Some compilers won't report that they do not support -Kpthread,
1895# so we need to run a program to see whether it really made the
1896# function available.
Michael W. Hudson54241132001-12-07 15:38:26 +00001897echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001898echo "configure:1899: checking whether $CC accepts -Kpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001899if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1900 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001901else
1902 ac_save_cc="$CC"
1903CC="$CC -Kpthread"
1904if test "$cross_compiling" = yes; then
1905 ac_cv_kpthread=no
1906else
Michael W. Hudson54241132001-12-07 15:38:26 +00001907 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001908#line 1909 "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001909#include "confdefs.h"
1910
1911#include <pthread.h>
1912
1913void* routine(void* p){return NULL;}
1914
1915int main(){
1916 pthread_t p;
1917 if(pthread_create(&p,NULL,routine,NULL)!=0)
1918 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00001919 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001920 return 0;
1921}
1922
Michael W. Hudson54241132001-12-07 15:38:26 +00001923EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001924if { (eval echo configure:1925: \"$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 +00001925then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001926 ac_cv_kpthread=yes
1927else
Michael W. Hudson54241132001-12-07 15:38:26 +00001928 echo "configure: failed program was:" >&5
1929 cat conftest.$ac_ext >&5
1930 rm -fr conftest*
1931 ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00001932fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001933rm -fr conftest*
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001934fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001935
Martin v. Löwis130fb172001-07-19 11:00:41 +00001936CC="$ac_save_cc"
1937fi
1938
Michael W. Hudson54241132001-12-07 15:38:26 +00001939echo "$ac_t""$ac_cv_kpthread" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001940fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00001941
Michael W. Hudson54241132001-12-07 15:38:26 +00001942
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001943# checks for header files
Michael W. Hudson54241132001-12-07 15:38:26 +00001944echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001945echo "configure:1946: checking for ANSI C header files" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001946if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1947 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001948else
Michael W. Hudson54241132001-12-07 15:38:26 +00001949 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001950#line 1951 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001951#include "confdefs.h"
1952#include <stdlib.h>
1953#include <stdarg.h>
1954#include <string.h>
1955#include <float.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001956EOF
1957ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00001958{ (eval echo configure:1959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001959ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1960if test -z "$ac_err"; then
1961 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001962 ac_cv_header_stdc=yes
1963else
Michael W. Hudson54241132001-12-07 15:38:26 +00001964 echo "$ac_err" >&5
1965 echo "configure: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001966 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001967 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001968 ac_cv_header_stdc=no
1969fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001970rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001971
1972if test $ac_cv_header_stdc = yes; then
1973 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Michael W. Hudson54241132001-12-07 15:38:26 +00001974cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001975#line 1976 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001976#include "confdefs.h"
1977#include <string.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001978EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001979if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1980 egrep "memchr" >/dev/null 2>&1; then
1981 :
1982else
Michael W. Hudson54241132001-12-07 15:38:26 +00001983 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001984 ac_cv_header_stdc=no
1985fi
1986rm -f conftest*
1987
1988fi
1989
1990if test $ac_cv_header_stdc = yes; then
1991 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Michael W. Hudson54241132001-12-07 15:38:26 +00001992cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001993#line 1994 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001994#include "confdefs.h"
1995#include <stdlib.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001996EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1998 egrep "free" >/dev/null 2>&1; then
1999 :
2000else
Michael W. Hudson54241132001-12-07 15:38:26 +00002001 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002002 ac_cv_header_stdc=no
2003fi
2004rm -f conftest*
2005
2006fi
2007
2008if test $ac_cv_header_stdc = yes; then
2009 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Michael W. Hudson54241132001-12-07 15:38:26 +00002010if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002011 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002012else
Michael W. Hudson54241132001-12-07 15:38:26 +00002013 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002014#line 2015 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002015#include "confdefs.h"
2016#include <ctype.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002017#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2018#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Jack Jansendd19cf82001-12-06 22:36:17 +00002019#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Michael W. Hudson54241132001-12-07 15:38:26 +00002020int main () { int i; for (i = 0; i < 256; i++)
2021if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2022exit (0); }
2023
2024EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002025if { (eval echo configure:2026: \"$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 +00002026then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002027 :
2028else
Michael W. Hudson54241132001-12-07 15:38:26 +00002029 echo "configure: failed program was:" >&5
2030 cat conftest.$ac_ext >&5
2031 rm -fr conftest*
2032 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002033fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002034rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00002035fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002036
Michael W. Hudson54241132001-12-07 15:38:26 +00002037fi
2038fi
2039
2040echo "$ac_t""$ac_cv_header_stdc" 1>&6
2041if test $ac_cv_header_stdc = yes; then
2042 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002043#define STDC_HEADERS 1
2044EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002045
2046fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002047
Martin v. Löwis2e64c342002-03-27 18:49:02 +00002048for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
2049libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00002050signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00002051sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002052sys/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 +00002053sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00002054ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00002055do
Michael W. Hudson54241132001-12-07 15:38:26 +00002056ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2057echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002058echo "configure:2059: checking for $ac_hdr" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002059if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2060 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002061else
Michael W. Hudson54241132001-12-07 15:38:26 +00002062 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002063#line 2064 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002064#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002065#include <$ac_hdr>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002066EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002067ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00002068{ (eval echo configure:2069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002069ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2070if test -z "$ac_err"; then
2071 rm -rf conftest*
2072 eval "ac_cv_header_$ac_safe=yes"
2073else
2074 echo "$ac_err" >&5
2075 echo "configure: failed program was:" >&5
2076 cat conftest.$ac_ext >&5
2077 rm -rf conftest*
2078 eval "ac_cv_header_$ac_safe=no"
2079fi
2080rm -f conftest*
2081fi
2082if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2083 echo "$ac_t""yes" 1>&6
2084 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2085 cat >> confdefs.h <<EOF
2086#define $ac_tr_hdr 1
2087EOF
2088
2089else
2090 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002091fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002092done
2093
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002094ac_header_dirent=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002095for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2096do
2097ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2098echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002099echo "configure:2100: checking for $ac_hdr that defines DIR" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002100if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2101 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002102else
Michael W. Hudson54241132001-12-07 15:38:26 +00002103 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002104#line 2105 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002105#include "confdefs.h"
2106#include <sys/types.h>
2107#include <$ac_hdr>
Michael W. Hudson54241132001-12-07 15:38:26 +00002108int main() {
2109DIR *dirp = 0;
2110; return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002111EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002112if { (eval echo configure:2113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002113 rm -rf conftest*
2114 eval "ac_cv_header_dirent_$ac_safe=yes"
2115else
2116 echo "configure: failed program was:" >&5
2117 cat conftest.$ac_ext >&5
2118 rm -rf conftest*
2119 eval "ac_cv_header_dirent_$ac_safe=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002120fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002121rm -f conftest*
2122fi
2123if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2124 echo "$ac_t""yes" 1>&6
2125 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2126 cat >> confdefs.h <<EOF
2127#define $ac_tr_hdr 1
2128EOF
2129 ac_header_dirent=$ac_hdr; break
2130else
2131 echo "$ac_t""no" 1>&6
2132fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002133done
2134# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2135if test $ac_header_dirent = dirent.h; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002136echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002137echo "configure:2138: checking for opendir in -ldir" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002138ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2139if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2140 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002141else
Michael W. Hudson54241132001-12-07 15:38:26 +00002142 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002143LIBS="-ldir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00002144cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002145#line 2146 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002146#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002147/* Override any gcc2 internal prototype to avoid an error. */
2148/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00002149 builtin and then its argument prototype would still apply. */
2150char opendir();
2151
2152int main() {
2153opendir()
2154; return 0; }
2155EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002156if { (eval echo configure:2157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002157 rm -rf conftest*
2158 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002159else
Michael W. Hudson54241132001-12-07 15:38:26 +00002160 echo "configure: failed program was:" >&5
2161 cat conftest.$ac_ext >&5
2162 rm -rf conftest*
2163 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002164fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002165rm -f conftest*
2166LIBS="$ac_save_LIBS"
2167
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002168fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002169if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2170 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002171 LIBS="$LIBS -ldir"
Michael W. Hudson54241132001-12-07 15:38:26 +00002172else
2173 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002174fi
2175
2176else
Michael W. Hudson54241132001-12-07 15:38:26 +00002177echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002178echo "configure:2179: checking for opendir in -lx" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002179ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2180if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2181 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002182else
Michael W. Hudson54241132001-12-07 15:38:26 +00002183 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002184LIBS="-lx $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00002185cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002186#line 2187 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002187#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002188/* Override any gcc2 internal prototype to avoid an error. */
2189/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00002190 builtin and then its argument prototype would still apply. */
2191char opendir();
2192
2193int main() {
2194opendir()
2195; return 0; }
2196EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002197if { (eval echo configure:2198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002198 rm -rf conftest*
2199 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002200else
Michael W. Hudson54241132001-12-07 15:38:26 +00002201 echo "configure: failed program was:" >&5
2202 cat conftest.$ac_ext >&5
2203 rm -rf conftest*
2204 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002205fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002206rm -f conftest*
2207LIBS="$ac_save_LIBS"
2208
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002209fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002210if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2211 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002212 LIBS="$LIBS -lx"
Michael W. Hudson54241132001-12-07 15:38:26 +00002213else
2214 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002215fi
2216
2217fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002218
Michael W. Hudson54241132001-12-07 15:38:26 +00002219
Guido van Rossum627b2d71993-12-24 10:39:16 +00002220# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002221was_it_defined=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002222echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002223echo "configure:2224: checking for clock_t in time.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002224cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002225#line 2226 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002226#include "confdefs.h"
2227#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002228EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002229if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2230 egrep "clock_t" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002231 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00002232 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002233else
Michael W. Hudson54241132001-12-07 15:38:26 +00002234 rm -rf conftest*
2235 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002236#define clock_t long
2237EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002238
2239fi
2240rm -f conftest*
2241
Michael W. Hudson54241132001-12-07 15:38:26 +00002242echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002243
Guido van Rossum810cc512001-09-09 23:51:39 +00002244# Two defines needed to enable largefile support on various platforms
2245# These may affect some typedefs
Michael W. Hudson54241132001-12-07 15:38:26 +00002246cat >> confdefs.h <<\EOF
Guido van Rossum810cc512001-09-09 23:51:39 +00002247#define _LARGEFILE_SOURCE 1
2248EOF
2249
Michael W. Hudson54241132001-12-07 15:38:26 +00002250cat >> confdefs.h <<\EOF
Guido van Rossum810cc512001-09-09 23:51:39 +00002251#define _FILE_OFFSET_BITS 64
2252EOF
2253
Michael W. Hudson54241132001-12-07 15:38:26 +00002254
Guido van Rossum84e7b241996-08-19 21:59:00 +00002255# Add some code to confdefs.h so that the test for off_t works on SCO
2256cat >> confdefs.h <<\EOF
2257#if defined(SCO_DS)
2258#undef _OFF_T
2259#endif
2260EOF
2261
Guido van Rossumef2255b2000-03-10 22:30:29 +00002262# Type availability checks
Michael W. Hudson54241132001-12-07 15:38:26 +00002263echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002264echo "configure:2265: checking for mode_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002265if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2266 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002267else
Michael W. Hudson54241132001-12-07 15:38:26 +00002268 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002269#line 2270 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002270#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002271#include <sys/types.h>
2272#if STDC_HEADERS
2273#include <stdlib.h>
2274#include <stddef.h>
2275#endif
Jack Jansendd19cf82001-12-06 22:36:17 +00002276EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002277if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2278 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2279 rm -rf conftest*
Jack Jansendd19cf82001-12-06 22:36:17 +00002280 ac_cv_type_mode_t=yes
2281else
Michael W. Hudson54241132001-12-07 15:38:26 +00002282 rm -rf conftest*
2283 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00002284fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002285rm -f conftest*
Jack Jansendd19cf82001-12-06 22:36:17 +00002286
Michael W. Hudson54241132001-12-07 15:38:26 +00002287fi
2288echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2289if test $ac_cv_type_mode_t = no; then
2290 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002291#define mode_t int
2292EOF
2293
2294fi
2295
Michael W. Hudson54241132001-12-07 15:38:26 +00002296echo $ac_n "checking for off_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002297echo "configure:2298: checking for off_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002298if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2299 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002300else
Michael W. Hudson54241132001-12-07 15:38:26 +00002301 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002302#line 2303 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002303#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002304#include <sys/types.h>
2305#if STDC_HEADERS
2306#include <stdlib.h>
2307#include <stddef.h>
2308#endif
2309EOF
2310if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2311 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2312 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002313 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002314else
Michael W. Hudson54241132001-12-07 15:38:26 +00002315 rm -rf conftest*
2316 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002317fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002318rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002319
Michael W. Hudson54241132001-12-07 15:38:26 +00002320fi
2321echo "$ac_t""$ac_cv_type_off_t" 1>&6
2322if test $ac_cv_type_off_t = no; then
2323 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002324#define off_t long
2325EOF
2326
2327fi
2328
Michael W. Hudson54241132001-12-07 15:38:26 +00002329echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002330echo "configure:2331: checking for pid_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002331if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2332 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002333else
Michael W. Hudson54241132001-12-07 15:38:26 +00002334 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002335#line 2336 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002336#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002337#include <sys/types.h>
2338#if STDC_HEADERS
2339#include <stdlib.h>
2340#include <stddef.h>
2341#endif
2342EOF
2343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2344 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2345 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002346 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002347else
Michael W. Hudson54241132001-12-07 15:38:26 +00002348 rm -rf conftest*
2349 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002350fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002351rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002352
Michael W. Hudson54241132001-12-07 15:38:26 +00002353fi
2354echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2355if test $ac_cv_type_pid_t = no; then
2356 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002357#define pid_t int
2358EOF
2359
2360fi
2361
Michael W. Hudson54241132001-12-07 15:38:26 +00002362echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002363echo "configure:2364: checking return type of signal handlers" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002364if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2365 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002366else
Michael W. Hudson54241132001-12-07 15:38:26 +00002367 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002368#line 2369 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002369#include "confdefs.h"
2370#include <sys/types.h>
2371#include <signal.h>
2372#ifdef signal
Michael W. Hudson54241132001-12-07 15:38:26 +00002373#undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00002374#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002375#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002376extern "C" void (*signal (int, void (*)(int)))(int);
2377#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002378void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002379#endif
2380
Michael W. Hudson54241132001-12-07 15:38:26 +00002381int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002382int i;
Michael W. Hudson54241132001-12-07 15:38:26 +00002383; return 0; }
2384EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002385if { (eval echo configure:2386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002386 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002387 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002388else
Michael W. Hudson54241132001-12-07 15:38:26 +00002389 echo "configure: failed program was:" >&5
2390 cat conftest.$ac_ext >&5
2391 rm -rf conftest*
2392 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002393fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002394rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002395fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002396
Michael W. Hudson54241132001-12-07 15:38:26 +00002397echo "$ac_t""$ac_cv_type_signal" 1>&6
2398cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002399#define RETSIGTYPE $ac_cv_type_signal
2400EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002401
Michael W. Hudson54241132001-12-07 15:38:26 +00002402
2403echo $ac_n "checking for size_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002404echo "configure:2405: checking for size_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002405if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2406 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002407else
Michael W. Hudson54241132001-12-07 15:38:26 +00002408 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002409#line 2410 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002410#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002411#include <sys/types.h>
2412#if STDC_HEADERS
2413#include <stdlib.h>
2414#include <stddef.h>
2415#endif
2416EOF
2417if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2418 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2419 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002420 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002421else
Michael W. Hudson54241132001-12-07 15:38:26 +00002422 rm -rf conftest*
2423 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002424fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002425rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002426
Michael W. Hudson54241132001-12-07 15:38:26 +00002427fi
2428echo "$ac_t""$ac_cv_type_size_t" 1>&6
2429if test $ac_cv_type_size_t = no; then
2430 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002431#define size_t unsigned
2432EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002433
2434fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002435
Michael W. Hudson54241132001-12-07 15:38:26 +00002436echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002437echo "configure:2438: checking for uid_t in sys/types.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002438if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2439 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002440else
Michael W. Hudson54241132001-12-07 15:38:26 +00002441 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002442#line 2443 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002443#include "confdefs.h"
2444#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002445EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2447 egrep "uid_t" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002448 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002449 ac_cv_type_uid_t=yes
2450else
Michael W. Hudson54241132001-12-07 15:38:26 +00002451 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002452 ac_cv_type_uid_t=no
2453fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002454rm -f conftest*
2455
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002456fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002457
Michael W. Hudson54241132001-12-07 15:38:26 +00002458echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2459if test $ac_cv_type_uid_t = no; then
2460 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002461#define uid_t int
2462EOF
2463
Michael W. Hudson54241132001-12-07 15:38:26 +00002464 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002465#define gid_t int
2466EOF
2467
2468fi
2469
Jack Jansendd19cf82001-12-06 22:36:17 +00002470
Michael W. Hudson54241132001-12-07 15:38:26 +00002471# Sizes of various common basic types
2472echo $ac_n "checking size of int""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002473echo "configure:2474: checking size of int" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002474if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2475 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002476else
2477 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002478 ac_cv_sizeof_int=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002479else
Michael W. Hudson54241132001-12-07 15:38:26 +00002480 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002481#line 2482 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002482#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002483#include <stdio.h>
2484main()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002485{
Michael W. Hudson54241132001-12-07 15:38:26 +00002486 FILE *f=fopen("conftestval", "w");
2487 if (!f) exit(1);
2488 fprintf(f, "%d\n", sizeof(int));
2489 exit(0);
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002490}
Michael W. Hudson54241132001-12-07 15:38:26 +00002491EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002492if { (eval echo configure:2493: \"$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 +00002493then
2494 ac_cv_sizeof_int=`cat conftestval`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002495else
Michael W. Hudson54241132001-12-07 15:38:26 +00002496 echo "configure: failed program was:" >&5
2497 cat conftest.$ac_ext >&5
2498 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002499 ac_cv_sizeof_int=0
2500fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002501rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002502fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002503
2504fi
2505echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2506cat >> confdefs.h <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002507#define SIZEOF_INT $ac_cv_sizeof_int
2508EOF
2509
2510
Michael W. Hudson54241132001-12-07 15:38:26 +00002511echo $ac_n "checking size of long""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002512echo "configure:2513: checking size of long" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002513if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2514 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002515else
2516 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002517 ac_cv_sizeof_long=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002518else
Michael W. Hudson54241132001-12-07 15:38:26 +00002519 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002520#line 2521 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002521#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002522#include <stdio.h>
2523main()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002524{
Michael W. Hudson54241132001-12-07 15:38:26 +00002525 FILE *f=fopen("conftestval", "w");
2526 if (!f) exit(1);
2527 fprintf(f, "%d\n", sizeof(long));
2528 exit(0);
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002529}
Michael W. Hudson54241132001-12-07 15:38:26 +00002530EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002531if { (eval echo configure:2532: \"$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 +00002532then
2533 ac_cv_sizeof_long=`cat conftestval`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002534else
Michael W. Hudson54241132001-12-07 15:38:26 +00002535 echo "configure: failed program was:" >&5
2536 cat conftest.$ac_ext >&5
2537 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002538 ac_cv_sizeof_long=0
2539fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002540rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002541fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002542
2543fi
2544echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2545cat >> confdefs.h <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002546#define SIZEOF_LONG $ac_cv_sizeof_long
2547EOF
2548
2549
Michael W. Hudson54241132001-12-07 15:38:26 +00002550echo $ac_n "checking size of void *""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002551echo "configure:2552: checking size of void *" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002552if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
2553 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002554else
2555 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002556 ac_cv_sizeof_void_p=4
Guido van Rossumad678af1998-10-02 14:42:15 +00002557else
Michael W. Hudson54241132001-12-07 15:38:26 +00002558 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002559#line 2560 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002560#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002561#include <stdio.h>
2562main()
Guido van Rossumad678af1998-10-02 14:42:15 +00002563{
Michael W. Hudson54241132001-12-07 15:38:26 +00002564 FILE *f=fopen("conftestval", "w");
2565 if (!f) exit(1);
2566 fprintf(f, "%d\n", sizeof(void *));
2567 exit(0);
Guido van Rossumad678af1998-10-02 14:42:15 +00002568}
Michael W. Hudson54241132001-12-07 15:38:26 +00002569EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002570if { (eval echo configure:2571: \"$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 +00002571then
2572 ac_cv_sizeof_void_p=`cat conftestval`
Guido van Rossumad678af1998-10-02 14:42:15 +00002573else
Michael W. Hudson54241132001-12-07 15:38:26 +00002574 echo "configure: failed program was:" >&5
2575 cat conftest.$ac_ext >&5
2576 rm -fr conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00002577 ac_cv_sizeof_void_p=0
2578fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002579rm -fr conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00002580fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002581
2582fi
2583echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2584cat >> confdefs.h <<EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00002585#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2586EOF
2587
2588
Michael W. Hudson54241132001-12-07 15:38:26 +00002589echo $ac_n "checking size of char""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002590echo "configure:2591: checking size of char" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002591if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2592 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002593else
2594 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002595 ac_cv_sizeof_char=1
Guido van Rossumef2255b2000-03-10 22:30:29 +00002596else
Michael W. Hudson54241132001-12-07 15:38:26 +00002597 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002598#line 2599 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002599#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002600#include <stdio.h>
2601main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002602{
Michael W. Hudson54241132001-12-07 15:38:26 +00002603 FILE *f=fopen("conftestval", "w");
2604 if (!f) exit(1);
2605 fprintf(f, "%d\n", sizeof(char));
2606 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002607}
Michael W. Hudson54241132001-12-07 15:38:26 +00002608EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002609if { (eval echo configure:2610: \"$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 +00002610then
2611 ac_cv_sizeof_char=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002612else
Michael W. Hudson54241132001-12-07 15:38:26 +00002613 echo "configure: failed program was:" >&5
2614 cat conftest.$ac_ext >&5
2615 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002616 ac_cv_sizeof_char=0
2617fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002618rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002619fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002620
2621fi
2622echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2623cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002624#define SIZEOF_CHAR $ac_cv_sizeof_char
2625EOF
2626
2627
Michael W. Hudson54241132001-12-07 15:38:26 +00002628echo $ac_n "checking size of short""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002629echo "configure:2630: checking size of short" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002630if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2631 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002632else
2633 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002634 ac_cv_sizeof_short=2
Guido van Rossumef2255b2000-03-10 22:30:29 +00002635else
Michael W. Hudson54241132001-12-07 15:38:26 +00002636 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002637#line 2638 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002638#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002639#include <stdio.h>
2640main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002641{
Michael W. Hudson54241132001-12-07 15:38:26 +00002642 FILE *f=fopen("conftestval", "w");
2643 if (!f) exit(1);
2644 fprintf(f, "%d\n", sizeof(short));
2645 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002646}
Michael W. Hudson54241132001-12-07 15:38:26 +00002647EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002648if { (eval echo configure:2649: \"$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 +00002649then
2650 ac_cv_sizeof_short=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002651else
Michael W. Hudson54241132001-12-07 15:38:26 +00002652 echo "configure: failed program was:" >&5
2653 cat conftest.$ac_ext >&5
2654 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002655 ac_cv_sizeof_short=0
2656fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002657rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002658fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002659
2660fi
2661echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2662cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002663#define SIZEOF_SHORT $ac_cv_sizeof_short
2664EOF
2665
2666
Michael W. Hudson54241132001-12-07 15:38:26 +00002667echo $ac_n "checking size of float""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002668echo "configure:2669: checking size of float" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002669if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
2670 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002671else
2672 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002673 ac_cv_sizeof_float=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00002674else
Michael W. Hudson54241132001-12-07 15:38:26 +00002675 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002676#line 2677 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002677#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002678#include <stdio.h>
2679main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002680{
Michael W. Hudson54241132001-12-07 15:38:26 +00002681 FILE *f=fopen("conftestval", "w");
2682 if (!f) exit(1);
2683 fprintf(f, "%d\n", sizeof(float));
2684 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002685}
Michael W. Hudson54241132001-12-07 15:38:26 +00002686EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002687if { (eval echo configure:2688: \"$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 +00002688then
2689 ac_cv_sizeof_float=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002690else
Michael W. Hudson54241132001-12-07 15:38:26 +00002691 echo "configure: failed program was:" >&5
2692 cat conftest.$ac_ext >&5
2693 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002694 ac_cv_sizeof_float=0
2695fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002696rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002697fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002698
2699fi
2700echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2701cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002702#define SIZEOF_FLOAT $ac_cv_sizeof_float
2703EOF
2704
2705
Michael W. Hudson54241132001-12-07 15:38:26 +00002706echo $ac_n "checking size of double""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002707echo "configure:2708: checking size of double" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002708if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
2709 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002710else
2711 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002712 ac_cv_sizeof_double=8
Guido van Rossumef2255b2000-03-10 22:30:29 +00002713else
Michael W. Hudson54241132001-12-07 15:38:26 +00002714 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002715#line 2716 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002716#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002717#include <stdio.h>
2718main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002719{
Michael W. Hudson54241132001-12-07 15:38:26 +00002720 FILE *f=fopen("conftestval", "w");
2721 if (!f) exit(1);
2722 fprintf(f, "%d\n", sizeof(double));
2723 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002724}
Michael W. Hudson54241132001-12-07 15:38:26 +00002725EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002726if { (eval echo configure:2727: \"$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 +00002727then
2728 ac_cv_sizeof_double=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002729else
Michael W. Hudson54241132001-12-07 15:38:26 +00002730 echo "configure: failed program was:" >&5
2731 cat conftest.$ac_ext >&5
2732 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002733 ac_cv_sizeof_double=0
2734fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002735rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002736fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002737
2738fi
2739echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2740cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002741#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2742EOF
2743
2744
Michael W. Hudson54241132001-12-07 15:38:26 +00002745echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002746echo "configure:2747: checking size of fpos_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002747if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
2748 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002749else
2750 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002751 ac_cv_sizeof_fpos_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002752else
Michael W. Hudson54241132001-12-07 15:38:26 +00002753 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002754#line 2755 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002755#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002756#include <stdio.h>
2757main()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002758{
Michael W. Hudson54241132001-12-07 15:38:26 +00002759 FILE *f=fopen("conftestval", "w");
2760 if (!f) exit(1);
2761 fprintf(f, "%d\n", sizeof(fpos_t));
2762 exit(0);
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002763}
Michael W. Hudson54241132001-12-07 15:38:26 +00002764EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002765if { (eval echo configure:2766: \"$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 +00002766then
2767 ac_cv_sizeof_fpos_t=`cat conftestval`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002768else
Michael W. Hudson54241132001-12-07 15:38:26 +00002769 echo "configure: failed program was:" >&5
2770 cat conftest.$ac_ext >&5
2771 rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002772 ac_cv_sizeof_fpos_t=0
2773fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002774rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002775fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002776
2777fi
2778echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2779cat >> confdefs.h <<EOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002780#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2781EOF
2782
Michael W. Hudson54241132001-12-07 15:38:26 +00002783
2784
2785echo $ac_n "checking for long long support""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002786echo "configure:2787: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002787have_long_long=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002788cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002789#line 2790 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002790#include "confdefs.h"
2791
Michael W. Hudson54241132001-12-07 15:38:26 +00002792int main() {
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002793long long x; x = (long long)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002794; return 0; }
2795EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002796if { (eval echo configure:2797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002797 rm -rf conftest*
2798 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002799#define HAVE_LONG_LONG 1
2800EOF
2801 have_long_long=yes
2802else
Michael W. Hudson54241132001-12-07 15:38:26 +00002803 echo "configure: failed program was:" >&5
2804 cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002805fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002806rm -f conftest*
2807echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002808if test "$have_long_long" = yes ; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002809echo $ac_n "checking size of long long""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002810echo "configure:2811: checking size of long long" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002811if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2812 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002813else
2814 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002815 ac_cv_sizeof_long_long=8
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002816else
Michael W. Hudson54241132001-12-07 15:38:26 +00002817 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002818#line 2819 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002819#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002820#include <stdio.h>
2821main()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002822{
Michael W. Hudson54241132001-12-07 15:38:26 +00002823 FILE *f=fopen("conftestval", "w");
2824 if (!f) exit(1);
2825 fprintf(f, "%d\n", sizeof(long long));
2826 exit(0);
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002827}
Michael W. Hudson54241132001-12-07 15:38:26 +00002828EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002829if { (eval echo configure:2830: \"$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 +00002830then
2831 ac_cv_sizeof_long_long=`cat conftestval`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002832else
Michael W. Hudson54241132001-12-07 15:38:26 +00002833 echo "configure: failed program was:" >&5
2834 cat conftest.$ac_ext >&5
2835 rm -fr conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002836 ac_cv_sizeof_long_long=0
2837fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002838rm -fr conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002839fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002840
2841fi
2842echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2843cat >> confdefs.h <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002844#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2845EOF
2846
Michael W. Hudson54241132001-12-07 15:38:26 +00002847
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002848fi
2849
Michael W. Hudson54241132001-12-07 15:38:26 +00002850echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002851echo "configure:2852: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002852have_uintptr_t=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002853cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002854#line 2855 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002855#include "confdefs.h"
2856
Michael W. Hudson54241132001-12-07 15:38:26 +00002857int main() {
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002858uintptr_t x; x = (uintptr_t)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002859; return 0; }
2860EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002861if { (eval echo configure:2862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002862 rm -rf conftest*
2863 cat >> confdefs.h <<\EOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002864#define HAVE_UINTPTR_T 1
2865EOF
2866 have_uintptr_t=yes
2867else
Michael W. Hudson54241132001-12-07 15:38:26 +00002868 echo "configure: failed program was:" >&5
2869 cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002870fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002871rm -f conftest*
2872echo "$ac_t""$have_uintptr_t" 1>&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002873if test "$have_uintptr_t" = yes ; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002874echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002875echo "configure:2876: checking size of uintptr_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002876if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
2877 echo $ac_n "(cached) $ac_c" 1>&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002878else
2879 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002880 ac_cv_sizeof_uintptr_t=4
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002881else
Michael W. Hudson54241132001-12-07 15:38:26 +00002882 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002883#line 2884 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002884#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002885#include <stdio.h>
2886main()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002887{
Michael W. Hudson54241132001-12-07 15:38:26 +00002888 FILE *f=fopen("conftestval", "w");
2889 if (!f) exit(1);
2890 fprintf(f, "%d\n", sizeof(uintptr_t));
2891 exit(0);
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002892}
Michael W. Hudson54241132001-12-07 15:38:26 +00002893EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002894if { (eval echo configure:2895: \"$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 +00002895then
2896 ac_cv_sizeof_uintptr_t=`cat conftestval`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002897else
Michael W. Hudson54241132001-12-07 15:38:26 +00002898 echo "configure: failed program was:" >&5
2899 cat conftest.$ac_ext >&5
2900 rm -fr conftest*
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002901 ac_cv_sizeof_uintptr_t=0
2902fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002903rm -fr conftest*
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002904fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002905
2906fi
2907echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2908cat >> confdefs.h <<EOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002909#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2910EOF
2911
Michael W. Hudson54241132001-12-07 15:38:26 +00002912
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002913fi
2914
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002915# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002916echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002917echo "configure:2918: checking size of off_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002918if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
2919 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002920else
2921 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002922 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002923else
Michael W. Hudson54241132001-12-07 15:38:26 +00002924 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002925#line 2926 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002926#include "confdefs.h"
2927#include <stdio.h>
2928#include <sys/types.h>
2929main()
2930{
2931 FILE *f=fopen("conftestval", "w");
2932 if (!f) exit(1);
2933 fprintf(f, "%d\n", sizeof(off_t));
2934 exit(0);
2935}
Michael W. Hudson54241132001-12-07 15:38:26 +00002936EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002937if { (eval echo configure:2938: \"$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 +00002938then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002939 ac_cv_sizeof_off_t=`cat conftestval`
2940else
Michael W. Hudson54241132001-12-07 15:38:26 +00002941 echo "configure: failed program was:" >&5
2942 cat conftest.$ac_ext >&5
2943 rm -fr conftest*
2944 ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002945fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002946rm -fr conftest*
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002947fi
2948
Michael W. Hudson54241132001-12-07 15:38:26 +00002949
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002950fi
2951
Michael W. Hudson54241132001-12-07 15:38:26 +00002952echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2953cat >> confdefs.h <<EOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002954#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2955EOF
2956
Michael W. Hudson54241132001-12-07 15:38:26 +00002957
2958echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002959echo "configure:2960: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002960if test "$have_long_long" = yes -a \
2961 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2962 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002963 cat >> confdefs.h <<\EOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002964#define HAVE_LARGEFILE_SUPPORT 1
2965EOF
2966
Michael W. Hudson54241132001-12-07 15:38:26 +00002967 echo "$ac_t""yes" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002968else
Michael W. Hudson54241132001-12-07 15:38:26 +00002969 echo "$ac_t""no" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002970fi
2971
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002972# AC_CHECK_SIZEOF() doesn't include <time.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002973echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002974echo "configure:2975: checking size of time_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002975if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
2976 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002977else
2978 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002979 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002980else
Michael W. Hudson54241132001-12-07 15:38:26 +00002981 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002982#line 2983 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002983#include "confdefs.h"
2984#include <stdio.h>
2985#include <time.h>
2986main()
2987{
2988 FILE *f=fopen("conftestval", "w");
2989 if (!f) exit(1);
2990 fprintf(f, "%d\n", sizeof(time_t));
2991 exit(0);
2992}
Michael W. Hudson54241132001-12-07 15:38:26 +00002993EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002994if { (eval echo configure:2995: \"$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 +00002995then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002996 ac_cv_sizeof_time_t=`cat conftestval`
2997else
Michael W. Hudson54241132001-12-07 15:38:26 +00002998 echo "configure: failed program was:" >&5
2999 cat conftest.$ac_ext >&5
3000 rm -fr conftest*
3001 ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003002fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003003rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003004fi
3005
Michael W. Hudson54241132001-12-07 15:38:26 +00003006
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003007fi
3008
Michael W. Hudson54241132001-12-07 15:38:26 +00003009echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
3010cat >> confdefs.h <<EOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003011#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
3012EOF
3013
Michael W. Hudson54241132001-12-07 15:38:26 +00003014
3015
Trent Mick635f6fb2000-08-23 21:33:05 +00003016# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003017ac_save_cc="$CC"
3018if test "$ac_cv_kpthread" = "yes"
3019then CC="$CC -Kpthread"
3020fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003021echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003022echo "configure:3023: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00003023have_pthread_t=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003024cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003025#line 3026 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00003026#include "confdefs.h"
3027#include <pthread.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00003028int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00003029pthread_t x; x = *(pthread_t*)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00003030; return 0; }
3031EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003032if { (eval echo configure:3033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003033 rm -rf conftest*
Trent Mick635f6fb2000-08-23 21:33:05 +00003034 have_pthread_t=yes
3035else
Michael W. Hudson54241132001-12-07 15:38:26 +00003036 echo "configure: failed program was:" >&5
3037 cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00003038fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003039rm -f conftest*
3040echo "$ac_t""$have_pthread_t" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003041if test "$have_pthread_t" = yes ; then
3042 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00003043 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003044echo "configure:3045: checking size of pthread_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003045 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
3046 echo $ac_n "(cached) $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003047else
3048 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003049 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00003050else
Michael W. Hudson54241132001-12-07 15:38:26 +00003051 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003052#line 3053 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00003053#include "confdefs.h"
3054#include <stdio.h>
3055 #include <pthread.h>
3056 main()
3057 {
3058 FILE *f=fopen("conftestval", "w");
3059 if (!f) exit(1);
3060 fprintf(f, "%d\n", sizeof(pthread_t));
3061 exit(0);
3062 }
Michael W. Hudson54241132001-12-07 15:38:26 +00003063EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003064if { (eval echo configure:3065: \"$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 +00003065then
Trent Mick635f6fb2000-08-23 21:33:05 +00003066 ac_cv_sizeof_pthread_t=`cat conftestval`
3067else
Michael W. Hudson54241132001-12-07 15:38:26 +00003068 echo "configure: failed program was:" >&5
3069 cat conftest.$ac_ext >&5
3070 rm -fr conftest*
3071 ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00003072fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003073rm -fr conftest*
Trent Mick635f6fb2000-08-23 21:33:05 +00003074fi
3075
Michael W. Hudson54241132001-12-07 15:38:26 +00003076
Trent Mick635f6fb2000-08-23 21:33:05 +00003077fi
3078
Michael W. Hudson54241132001-12-07 15:38:26 +00003079 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
3080 cat >> confdefs.h <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003081#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
3082EOF
3083
3084fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003085CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00003086
Michael W. Hudson54241132001-12-07 15:38:26 +00003087echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003088echo "configure:3089: checking for --enable-toolbox-glue" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003089# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
3090if test "${enable_toolbox_glue+set}" = set; then
3091 enableval="$enable_toolbox_glue"
Michael W. Hudson54241132001-12-07 15:38:26 +00003092 :
3093fi
Jack Jansene578a632001-08-15 01:27:14 +00003094
3095
3096if test -z "$enable_toolbox_glue"
Michael W. Hudson54241132001-12-07 15:38:26 +00003097then
Jack Jansene578a632001-08-15 01:27:14 +00003098 case $ac_sys_system/$ac_sys_release in
3099 Darwin/*)
3100 enable_toolbox_glue="yes";;
3101 *)
3102 enable_toolbox_glue="no";;
3103 esac
3104fi
3105case "$enable_toolbox_glue" in
3106yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00003107 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00003108 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00003109 extra_undefs="-u __dummy -u _PyMac_Error"
Michael W. Hudson54241132001-12-07 15:38:26 +00003110 cat >> confdefs.h <<\EOF
Jack Jansene578a632001-08-15 01:27:14 +00003111#define USE_TOOLBOX_OBJECT_GLUE 1
3112EOF
3113
3114 ;;
3115*)
3116 extra_frameworks=""
3117 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00003118 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00003119 ;;
3120esac
Michael W. Hudson54241132001-12-07 15:38:26 +00003121echo "$ac_t""$enable_toolbox_glue" 1>&6
3122
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003123
3124case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003125 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003126 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003127 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
3128 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00003129 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3130 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00003131 Darwin/*)
3132 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003133 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
3134 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00003135 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3136 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003137esac
3138
Michael W. Hudson54241132001-12-07 15:38:26 +00003139echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003140echo "configure:3141: checking for --enable-framework" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003141if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003142then
Jack Jansenca06bc62001-08-03 15:32:23 +00003143 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003144 # -U __environ is needed since bundles don't have access
3145 # to crt0 when built but will always be linked against it
Michael W. Hudson54241132001-12-07 15:38:26 +00003146 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00003147 # in the build location.
Michael W. Hudson54241132001-12-07 15:38:26 +00003148
Jack Jansena3891ea2001-09-07 14:25:12 +00003149 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003150 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
3151 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00003152 esac
Michael W. Hudson54241132001-12-07 15:38:26 +00003153 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003154#define WITH_NEXT_FRAMEWORK 1
3155EOF
3156
Michael W. Hudson54241132001-12-07 15:38:26 +00003157 echo "$ac_t""yes" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003158else
Michael W. Hudson54241132001-12-07 15:38:26 +00003159 echo "$ac_t""no" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003160fi
3161
Michael W. Hudson54241132001-12-07 15:38:26 +00003162echo $ac_n "checking for dyld""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003163echo "configure:3164: checking for dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003164case $ac_sys_system/$ac_sys_release in
3165 Darwin/*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003166 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003167#define WITH_DYLD 1
3168EOF
3169
Michael W. Hudson54241132001-12-07 15:38:26 +00003170 echo "$ac_t""always on for Darwin" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003171 ;;
3172 *)
Michael W. Hudson54241132001-12-07 15:38:26 +00003173 echo "$ac_t""no" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00003174 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003175esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003176
Guido van Rossum0a516c91994-09-12 10:58:40 +00003177# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003178
Michael W. Hudson54241132001-12-07 15:38:26 +00003179
3180
3181
3182
Guido van Rossum0a516c91994-09-12 10:58:40 +00003183# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003184# -- usually .so, .sl on HP-UX, .dll on Cygwin
Michael W. Hudson54241132001-12-07 15:38:26 +00003185echo $ac_n "checking SO""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003186echo "configure:3187: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003187if test -z "$SO"
3188then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003189 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003190 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003191 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003192 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003193 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003194fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003195echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003196# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003197# -- "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 +00003198# (Shared libraries in this instance are shared modules to be loaded into
3199# Python, as opposed to building Python itself as a shared library.)
Michael W. Hudson54241132001-12-07 15:38:26 +00003200echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003201echo "configure:3202: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003202if test -z "$LDSHARED"
3203then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003204 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003205 AIX*)
3206 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00003207 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003208 ;;
3209 BeOS*)
3210 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00003211 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003212 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003213 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003214 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003215 SunOS/4*) LDSHARED="ld";;
Michael W. Hudson54241132001-12-07 15:38:26 +00003216 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00003217 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003218 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003219 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00003220 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003221 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003222 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3223 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00003224 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003225 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3226 if test "$enable_framework" ; then
3227 # Link against the framework. All externals should be defined.
3228 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3229 else
3230 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00003231 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00003232 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00003233 Darwin/*)
3234 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3235 if test "$enable_framework" ; then
3236 # Link against the framework. All externals should be defined.
3237 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3238 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00003239 # No framework, use the Python app as bundle-loader
3240 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
3241 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003242 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003243 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003244 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003245 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003246 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003247 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003248 then
3249 LDSHARED="cc -shared ${LDFLAGS}"
3250 else
3251 LDSHARED="ld -Bshareable ${LDFLAGS}"
3252 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003253 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003254 if test "$GCC" = "yes"
3255 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003256 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003257 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003258 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003259 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003260 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003261 *) LDSHARED="ld";;
3262 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003263fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003264echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003265BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003266# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003267# library (module) -- this is only needed for a few systems
Michael W. Hudson54241132001-12-07 15:38:26 +00003268echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003269echo "configure:3270: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003270if test -z "$CCSHARED"
3271then
Guido van Rossum07397971997-04-29 21:49:50 +00003272 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003273 SunOS*) if test "$GCC" = yes;
3274 then CCSHARED="-fPIC";
3275 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003276 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00003277 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00003278 else CCSHARED="+z";
3279 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003280 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003281 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003282 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003283 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003284 if test "$GCC" = "yes"
3285 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003286 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003287 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003288 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003289 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003290 IRIX*/6*) case $CC in
3291 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003292 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003293 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003294 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003295 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003296fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003297echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003298# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003299# the python executable -- this is only needed for a few systems
Michael W. Hudson54241132001-12-07 15:38:26 +00003300echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003301echo "configure:3302: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003302if test -z "$LINKFORSHARED"
3303then
Guido van Rossum07397971997-04-29 21:49:50 +00003304 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003305 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003306 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003307 LINKFORSHARED="-Wl,-E -Wl,+s";;
3308# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003309 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003310 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003311 # -u libsys_s pulls in all symbols in libsys
Michael W. Hudson54241132001-12-07 15:38:26 +00003312 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00003313 # -u __dummy makes the linker aware of the objc runtime
3314 # in System.framework; otherwise, __objcInit (referenced in
3315 # crt1.o) gets erroneously defined as common, which breaks dynamic
3316 # loading of any modules which reference it in System.framework.
3317 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3318 # not used by the core itself but which needs to be in the core so
3319 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00003320 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00003321 if test "$enable_framework"
3322 then
3323 LINKFORSHARED="$LINKFORSHARED -framework Python"
3324 fi
3325 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003326 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003327 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003328 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Michael W. Hudson54241132001-12-07 15:38:26 +00003329 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003330 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3331 then
3332 LINKFORSHARED="-Wl,--export-dynamic"
3333 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003334 SunOS/5*) case $CC in
3335 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003336 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003337 then
3338 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003339 fi;;
3340 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003341 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003342fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003343echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003344
Michael W. Hudson54241132001-12-07 15:38:26 +00003345
3346echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003347echo "configure:3348: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003348if test ! "$LIBRARY" = "$LDLIBRARY"
3349then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003350 case $ac_sys_system in
3351 CYGWIN*)
3352 # Cygwin needs CCSHARED when building extension DLLs
3353 # but not when building the interpreter DLL.
3354 CFLAGSFORSHARED='';;
3355 *)
3356 CFLAGSFORSHARED='$(CCSHARED)'
3357 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003358fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003359echo "$ac_t""$CFLAGSFORSHARED" 1>&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003360
Guido van Rossum627b2d71993-12-24 10:39:16 +00003361# checks for libraries
Michael W. Hudson54241132001-12-07 15:38:26 +00003362echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003363echo "configure:3364: checking for dlopen in -ldl" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003364ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3365if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3366 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003367else
Michael W. Hudson54241132001-12-07 15:38:26 +00003368 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003369LIBS="-ldl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003370cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003371#line 3372 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003372#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003373/* Override any gcc2 internal prototype to avoid an error. */
3374/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003375 builtin and then its argument prototype would still apply. */
3376char dlopen();
3377
3378int main() {
3379dlopen()
3380; return 0; }
3381EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003382if { (eval echo configure:3383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003383 rm -rf conftest*
3384 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003385else
Michael W. Hudson54241132001-12-07 15:38:26 +00003386 echo "configure: failed program was:" >&5
3387 cat conftest.$ac_ext >&5
3388 rm -rf conftest*
3389 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003390fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003391rm -f conftest*
3392LIBS="$ac_save_LIBS"
3393
Guido van Rossum627b2d71993-12-24 10:39:16 +00003394fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003395if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3396 echo "$ac_t""yes" 1>&6
3397 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3398 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3399 cat >> confdefs.h <<EOF
3400#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003401EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003402
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003403 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003404
Michael W. Hudson54241132001-12-07 15:38:26 +00003405else
3406 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003407fi
3408 # Dynamic linking for SunOS/Solaris and SYSV
Michael W. Hudson54241132001-12-07 15:38:26 +00003409echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003410echo "configure:3411: checking for shl_load in -ldld" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003411ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
3412if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3413 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003414else
Michael W. Hudson54241132001-12-07 15:38:26 +00003415 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003416LIBS="-ldld $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003417cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003418#line 3419 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003419#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003420/* Override any gcc2 internal prototype to avoid an error. */
3421/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003422 builtin and then its argument prototype would still apply. */
3423char shl_load();
3424
3425int main() {
3426shl_load()
3427; return 0; }
3428EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003429if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003430 rm -rf conftest*
3431 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003432else
Michael W. Hudson54241132001-12-07 15:38:26 +00003433 echo "configure: failed program was:" >&5
3434 cat conftest.$ac_ext >&5
3435 rm -rf conftest*
3436 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003437fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003438rm -f conftest*
3439LIBS="$ac_save_LIBS"
3440
Guido van Rossum627b2d71993-12-24 10:39:16 +00003441fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003442if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3443 echo "$ac_t""yes" 1>&6
3444 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3445 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3446 cat >> confdefs.h <<EOF
3447#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003448EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003449
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003450 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003451
Michael W. Hudson54241132001-12-07 15:38:26 +00003452else
3453 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003454fi
3455 # Dynamic linking for HP-UX
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003456echo $ac_n "checking for sem_init in -lrt""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003457echo "configure:3458: checking for sem_init in -lrt" >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003458ac_lib_var=`echo rt'_'sem_init | sed 'y%./+-%__p_%'`
3459if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3460 echo $ac_n "(cached) $ac_c" 1>&6
3461else
3462 ac_save_LIBS="$LIBS"
3463LIBS="-lrt $LIBS"
3464cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003465#line 3466 "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003466#include "confdefs.h"
3467/* Override any gcc2 internal prototype to avoid an error. */
3468/* We use char because int might match the return type of a gcc2
3469 builtin and then its argument prototype would still apply. */
3470char sem_init();
3471
3472int main() {
3473sem_init()
3474; return 0; }
3475EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003476if { (eval echo configure:3477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003477 rm -rf conftest*
3478 eval "ac_cv_lib_$ac_lib_var=yes"
3479else
3480 echo "configure: failed program was:" >&5
3481 cat conftest.$ac_ext >&5
3482 rm -rf conftest*
3483 eval "ac_cv_lib_$ac_lib_var=no"
3484fi
3485rm -f conftest*
3486LIBS="$ac_save_LIBS"
3487
3488fi
3489if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3490 echo "$ac_t""yes" 1>&6
3491 ac_tr_lib=HAVE_LIB`echo rt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3492 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3493 cat >> confdefs.h <<EOF
3494#define $ac_tr_lib 1
3495EOF
3496
3497 LIBS="-lrt $LIBS"
3498
3499else
3500 echo "$ac_t""no" 1>&6
3501fi
3502 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003503
3504# checks for system dependent C++ extensions support
3505case "$ac_sys_system" in
Michael W. Hudson54241132001-12-07 15:38:26 +00003506 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003507echo "configure:3508: checking for genuine AIX C++ extensions support" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003508 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003509#line 3510 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003510#include "confdefs.h"
3511#include "/usr/lpp/xlC/include/load.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00003512int main() {
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003513loadAndInit("", 0, "")
Michael W. Hudson54241132001-12-07 15:38:26 +00003514; return 0; }
3515EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003516if { (eval echo configure:3517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003517 rm -rf conftest*
3518 cat >> confdefs.h <<\EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003519#define AIX_GENUINE_CPLUSPLUS 1
3520EOF
3521
Michael W. Hudson54241132001-12-07 15:38:26 +00003522 echo "$ac_t""yes" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003523else
Michael W. Hudson54241132001-12-07 15:38:26 +00003524 echo "configure: failed program was:" >&5
3525 cat conftest.$ac_ext >&5
3526 rm -rf conftest*
3527 echo "$ac_t""no" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003528fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003529rm -f conftest*;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003530 *) ;;
3531esac
3532
Guido van Rossum70c7f481998-03-26 18:44:10 +00003533# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3534# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003535# BeOS' sockets are stashed in libnet.
3536case "$ac_sys_system" in
3537IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003538*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003539echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003540echo "configure:3541: checking for t_open in -lnsl" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003541ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
3542if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3543 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003544else
Michael W. Hudson54241132001-12-07 15:38:26 +00003545 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003546LIBS="-lnsl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003547cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003548#line 3549 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003549#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003550/* Override any gcc2 internal prototype to avoid an error. */
3551/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003552 builtin and then its argument prototype would still apply. */
3553char t_open();
3554
3555int main() {
3556t_open()
3557; return 0; }
3558EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003559if { (eval echo configure:3560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003560 rm -rf conftest*
3561 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003562else
Michael W. Hudson54241132001-12-07 15:38:26 +00003563 echo "configure: failed program was:" >&5
3564 cat conftest.$ac_ext >&5
3565 rm -rf conftest*
3566 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003567fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003568rm -f conftest*
3569LIBS="$ac_save_LIBS"
3570
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003571fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003572if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3573 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003574 LIBS="-lnsl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003575else
3576 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003577fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003578 # SVR4
Michael W. Hudson54241132001-12-07 15:38:26 +00003579echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003580echo "configure:3581: checking for socket in -lsocket" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003581ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3582if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3583 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003584else
Michael W. Hudson54241132001-12-07 15:38:26 +00003585 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003586LIBS="-lsocket $LIBS $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003587cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003588#line 3589 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003589#include "confdefs.h"
3590/* Override any gcc2 internal prototype to avoid an error. */
3591/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003592 builtin and then its argument prototype would still apply. */
3593char socket();
3594
3595int main() {
3596socket()
3597; return 0; }
3598EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003599if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003600 rm -rf conftest*
3601 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003602else
Michael W. Hudson54241132001-12-07 15:38:26 +00003603 echo "configure: failed program was:" >&5
3604 cat conftest.$ac_ext >&5
3605 rm -rf conftest*
3606 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003607fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003608rm -f conftest*
3609LIBS="$ac_save_LIBS"
3610
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003611fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003612if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3613 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003614 LIBS="-lsocket $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003615else
3616 echo "$ac_t""no" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003617fi
3618 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003619;;
3620esac
3621case "$ac_sys_system" in
3622BeOS*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003623echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003624echo "configure:3625: checking for socket in -lnet" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003625ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
3626if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3627 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003628else
Michael W. Hudson54241132001-12-07 15:38:26 +00003629 ac_save_LIBS="$LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00003630LIBS="-lnet $LIBS $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003631cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003632#line 3633 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003633#include "confdefs.h"
3634/* Override any gcc2 internal prototype to avoid an error. */
3635/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003636 builtin and then its argument prototype would still apply. */
3637char socket();
3638
3639int main() {
3640socket()
3641; return 0; }
3642EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003643if { (eval echo configure:3644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003644 rm -rf conftest*
3645 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003646else
Michael W. Hudson54241132001-12-07 15:38:26 +00003647 echo "configure: failed program was:" >&5
3648 cat conftest.$ac_ext >&5
3649 rm -rf conftest*
3650 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003651fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003652rm -f conftest*
3653LIBS="$ac_save_LIBS"
3654
Guido van Rossumad678af1998-10-02 14:42:15 +00003655fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003656if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3657 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003658 LIBS="-lnet $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003659else
3660 echo "$ac_t""no" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003661fi
3662 # BeOS
3663;;
3664esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003665
Michael W. Hudson54241132001-12-07 15:38:26 +00003666echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003667echo "configure:3668: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003668# Check whether --with-libs or --without-libs was given.
3669if test "${with_libs+set}" = set; then
3670 withval="$with_libs"
Michael W. Hudson54241132001-12-07 15:38:26 +00003671
3672echo "$ac_t""$withval" 1>&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00003673LIBS="$withval $LIBS"
3674
3675else
Michael W. Hudson54241132001-12-07 15:38:26 +00003676 echo "$ac_t""no" 1>&6
3677fi
3678
Guido van Rossum7f43da71994-08-01 12:15:30 +00003679
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003680# Determine if signalmodule should be used.
3681
3682
Michael W. Hudson54241132001-12-07 15:38:26 +00003683echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003684echo "configure:3685: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003685# Check whether --with-signal-module or --without-signal-module was given.
3686if test "${with_signal_module+set}" = set; then
3687 withval="$with_signal_module"
Michael W. Hudson54241132001-12-07 15:38:26 +00003688 :
3689fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003690
3691
3692if test -z "$with_signal_module"
3693then with_signal_module="yes"
3694fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003695echo "$ac_t""$with_signal_module" 1>&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003696
3697if test "${with_signal_module}" = "yes"; then
3698 USE_SIGNAL_MODULE=""
3699 SIGNAL_OBJS=""
3700else
3701 USE_SIGNAL_MODULE="#"
3702 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3703fi
3704
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003705# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003706
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003707USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003708
Michael W. Hudson54241132001-12-07 15:38:26 +00003709echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003710echo "configure:3711: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003711
3712# Check whether --with-dec-threads or --without-dec-threads was given.
3713if test "${with_dec_threads+set}" = set; then
3714 withval="$with_dec_threads"
Michael W. Hudson54241132001-12-07 15:38:26 +00003715
3716echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003717LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003718if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003719 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003720fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003721else
Michael W. Hudson54241132001-12-07 15:38:26 +00003722 echo "$ac_t""no" 1>&6
3723fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003724
3725
Michael W. Hudson54241132001-12-07 15:38:26 +00003726echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003727echo "configure:3728: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003728# Check whether --with-threads or --without-threads was given.
3729if test "${with_threads+set}" = set; then
3730 withval="$with_threads"
Michael W. Hudson54241132001-12-07 15:38:26 +00003731 :
3732fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003733
3734
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003735# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003736# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003737if test "${with_thread+set}" = set; then
3738 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003739
Jack Jansendd19cf82001-12-06 22:36:17 +00003740with_threads=$with_thread
Michael W. Hudson54241132001-12-07 15:38:26 +00003741fi
3742
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003743
3744if test -z "$with_threads"
3745then with_threads="yes"
3746fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003747echo "$ac_t""$with_threads" 1>&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003748
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003749
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003750if test "$with_threads" = "no"
3751then
3752 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003753elif test "$ac_cv_pthread_is_default" = yes
3754then
Michael W. Hudson54241132001-12-07 15:38:26 +00003755 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003756#define WITH_THREAD 1
3757EOF
3758
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003759 # Defining _REENTRANT on system with POSIX threads should not hurt.
Michael W. Hudson54241132001-12-07 15:38:26 +00003760 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003761#define _REENTRANT 1
3762EOF
3763
3764 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003765 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003766elif test "$ac_cv_kpthread" = "yes"
3767then
3768 CC="$CC -Kpthread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003769 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003770#define WITH_THREAD 1
3771EOF
3772
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003773 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003774 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003775else
3776 if test ! -z "$with_threads" -a -d "$with_threads"
3777 then LDFLAGS="$LDFLAGS -L$with_threads"
3778 fi
3779 if test ! -z "$withval" -a -d "$withval"
3780 then LDFLAGS="$LDFLAGS -L$withval"
3781 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003782
3783 # According to the POSIX spec, a pthreads implementation must
3784 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Michael W. Hudson54241132001-12-07 15:38:26 +00003785 echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003786echo "configure:3787: checking for _POSIX_THREADS in unistd.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003787 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003788#line 3789 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003789#include "confdefs.h"
3790#include <unistd.h>
3791 #ifdef _POSIX_THREADS
3792 yes
3793 #endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003794
3795EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3797 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003798 rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003799 unistd_defines_pthreads=yes
3800else
Michael W. Hudson54241132001-12-07 15:38:26 +00003801 rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003802 unistd_defines_pthreads=no
3803fi
3804rm -f conftest*
3805
Michael W. Hudson54241132001-12-07 15:38:26 +00003806 echo "$ac_t""$unistd_defines_pthreads" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003807
Michael W. Hudson54241132001-12-07 15:38:26 +00003808 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003809#define _REENTRANT 1
3810EOF
3811
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003812 ac_safe=`echo "cthreads.h" | sed 'y%./+-%__p_%'`
3813echo $ac_n "checking for cthreads.h""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003814echo "configure:3815: checking for cthreads.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003815if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3816 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003817else
Michael W. Hudson54241132001-12-07 15:38:26 +00003818 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003819#line 3820 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003820#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003821#include <cthreads.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00003822EOF
3823ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003824{ (eval echo configure:3825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003825ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3826if test -z "$ac_err"; then
3827 rm -rf conftest*
3828 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003829else
Michael W. Hudson54241132001-12-07 15:38:26 +00003830 echo "$ac_err" >&5
3831 echo "configure: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003832 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003833 rm -rf conftest*
3834 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003835fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003836rm -f conftest*
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003837fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003838if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3839 echo "$ac_t""yes" 1>&6
3840 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003841#define WITH_THREAD 1
3842EOF
3843
Michael W. Hudson54241132001-12-07 15:38:26 +00003844 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003845#define C_THREADS 1
3846EOF
3847
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003848 cat >> confdefs.h <<\EOF
3849#define HURD_C_THREADS 1
3850EOF
3851
3852 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003853 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003854else
3855 echo "$ac_t""no" 1>&6
3856
3857 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
3858echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003859echo "configure:3860: checking for mach/cthreads.h" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003860if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3861 echo $ac_n "(cached) $ac_c" 1>&6
3862else
3863 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003864#line 3865 "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003865#include "confdefs.h"
3866#include <mach/cthreads.h>
3867EOF
3868ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003869{ (eval echo configure:3870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003870ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3871if test -z "$ac_err"; then
3872 rm -rf conftest*
3873 eval "ac_cv_header_$ac_safe=yes"
3874else
3875 echo "$ac_err" >&5
3876 echo "configure: failed program was:" >&5
3877 cat conftest.$ac_ext >&5
3878 rm -rf conftest*
3879 eval "ac_cv_header_$ac_safe=no"
3880fi
3881rm -f conftest*
3882fi
3883if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3884 echo "$ac_t""yes" 1>&6
3885 cat >> confdefs.h <<\EOF
3886#define WITH_THREAD 1
3887EOF
3888
3889 cat >> confdefs.h <<\EOF
3890#define C_THREADS 1
3891EOF
3892
3893 cat >> confdefs.h <<\EOF
3894#define MACH_C_THREADS 1
3895EOF
3896
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003897 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003898else
Michael W. Hudson54241132001-12-07 15:38:26 +00003899 echo "$ac_t""no" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003900
Michael W. Hudson54241132001-12-07 15:38:26 +00003901 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003902echo "configure:3903: checking for --with-pth" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003903 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003904if test "${with_pth+set}" = set; then
3905 withval="$with_pth"
Michael W. Hudson54241132001-12-07 15:38:26 +00003906
3907 echo "$ac_t""$withval" 1>&6
3908 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003909#define WITH_THREAD 1
3910EOF
3911
Michael W. Hudson54241132001-12-07 15:38:26 +00003912 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003913#define HAVE_PTH 1
3914EOF
3915
Martin v. Löwis130fb172001-07-19 11:00:41 +00003916 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003917 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003918else
Michael W. Hudson54241132001-12-07 15:38:26 +00003919
3920 echo "$ac_t""no" 1>&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003921
3922 # Just looking for pthread_create in libpthread is not enough:
3923 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
3924 # So we really have to include pthread.h, and then link.
3925 _libs=$LIBS
3926 LIBS="$LIBS -lpthread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003927 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003928echo "configure:3929: checking for pthread_create in -lpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003929 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003930#line 3931 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003931#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003932#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00003933
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003934void * start_routine (void *arg) { exit (0); }
Michael W. Hudson54241132001-12-07 15:38:26 +00003935int main() {
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003936
3937pthread_create (NULL, NULL, start_routine, NULL)
Michael W. Hudson54241132001-12-07 15:38:26 +00003938; return 0; }
3939EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003940if { (eval echo configure:3941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003941 rm -rf conftest*
3942
3943 echo "$ac_t""yes" 1>&6
3944 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003945#define WITH_THREAD 1
3946EOF
3947
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003948 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003949 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003950else
Michael W. Hudson54241132001-12-07 15:38:26 +00003951 echo "configure: failed program was:" >&5
3952 cat conftest.$ac_ext >&5
3953 rm -rf conftest*
3954
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003955 LIBS=$_libs
Michael W. Hudson54241132001-12-07 15:38:26 +00003956 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003957echo "configure:3958: checking for pthread_detach" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003958if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
3959 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003960else
Michael W. Hudson54241132001-12-07 15:38:26 +00003961 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003962#line 3963 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003963#include "confdefs.h"
3964/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00003965 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003966#include <assert.h>
3967/* Override any gcc2 internal prototype to avoid an error. */
3968/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003969 builtin and then its argument prototype would still apply. */
3970char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003971
Michael W. Hudson54241132001-12-07 15:38:26 +00003972int main() {
3973
Guido van Rossumad678af1998-10-02 14:42:15 +00003974/* The GNU C library defines this for functions which it implements
3975 to always fail with ENOSYS. Some functions are actually named
3976 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003977#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003978choke me
3979#else
Michael W. Hudson54241132001-12-07 15:38:26 +00003980pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003981#endif
3982
Michael W. Hudson54241132001-12-07 15:38:26 +00003983; return 0; }
3984EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003985if { (eval echo configure:3986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003986 rm -rf conftest*
3987 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003988else
Michael W. Hudson54241132001-12-07 15:38:26 +00003989 echo "configure: failed program was:" >&5
3990 cat conftest.$ac_ext >&5
3991 rm -rf conftest*
3992 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003993fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003994rm -f conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00003995fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003996
3997if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
3998 echo "$ac_t""yes" 1>&6
3999 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00004000#define WITH_THREAD 1
4001EOF
4002
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004003 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004004 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00004005else
Michael W. Hudson54241132001-12-07 15:38:26 +00004006 echo "$ac_t""no" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00004007
Michael W. Hudson54241132001-12-07 15:38:26 +00004008 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
4009echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004010echo "configure:4011: checking for kernel/OS.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004011if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4012 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004013else
Michael W. Hudson54241132001-12-07 15:38:26 +00004014 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004015#line 4016 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004016#include "confdefs.h"
4017#include <kernel/OS.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00004018EOF
4019ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004020{ (eval echo configure:4021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004021ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4022if test -z "$ac_err"; then
4023 rm -rf conftest*
4024 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004025else
Michael W. Hudson54241132001-12-07 15:38:26 +00004026 echo "$ac_err" >&5
4027 echo "configure: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004028 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004029 rm -rf conftest*
4030 eval "ac_cv_header_$ac_safe=no"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004031fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004032rm -f conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004033fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004034if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4035 echo "$ac_t""yes" 1>&6
4036 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004037#define WITH_THREAD 1
4038EOF
4039
Michael W. Hudson54241132001-12-07 15:38:26 +00004040 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004041#define BEOS_THREADS 1
4042EOF
4043
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004044 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004045else
Michael W. Hudson54241132001-12-07 15:38:26 +00004046 echo "$ac_t""no" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004047
Michael W. Hudson54241132001-12-07 15:38:26 +00004048 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004049echo "configure:4050: checking for pthread_create in -lpthreads" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004050ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
4051if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4052 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004053else
Michael W. Hudson54241132001-12-07 15:38:26 +00004054 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004055LIBS="-lpthreads $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004056cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004057#line 4058 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00004058#include "confdefs.h"
4059/* Override any gcc2 internal prototype to avoid an error. */
4060/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004061 builtin and then its argument prototype would still apply. */
4062char pthread_create();
4063
4064int main() {
4065pthread_create()
4066; return 0; }
4067EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004068if { (eval echo configure:4069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004069 rm -rf conftest*
4070 eval "ac_cv_lib_$ac_lib_var=yes"
Greg Steinadf63d62000-07-05 10:38:09 +00004071else
Michael W. Hudson54241132001-12-07 15:38:26 +00004072 echo "configure: failed program was:" >&5
4073 cat conftest.$ac_ext >&5
4074 rm -rf conftest*
4075 eval "ac_cv_lib_$ac_lib_var=no"
Greg Steinadf63d62000-07-05 10:38:09 +00004076fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004077rm -f conftest*
4078LIBS="$ac_save_LIBS"
4079
Greg Steinadf63d62000-07-05 10:38:09 +00004080fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004081if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4082 echo "$ac_t""yes" 1>&6
4083 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00004084#define WITH_THREAD 1
4085EOF
4086
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004087 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004088 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004089 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00004090else
Michael W. Hudson54241132001-12-07 15:38:26 +00004091 echo "$ac_t""no" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00004092
Michael W. Hudson54241132001-12-07 15:38:26 +00004093 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004094echo "configure:4095: checking for pthread_create in -lc_r" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004095ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
4096if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4097 echo $ac_n "(cached) $ac_c" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00004098else
Michael W. Hudson54241132001-12-07 15:38:26 +00004099 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00004100LIBS="-lc_r $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004101cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004102#line 4103 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00004103#include "confdefs.h"
4104/* Override any gcc2 internal prototype to avoid an error. */
4105/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004106 builtin and then its argument prototype would still apply. */
4107char pthread_create();
4108
4109int main() {
4110pthread_create()
4111; return 0; }
4112EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004113if { (eval echo configure:4114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004114 rm -rf conftest*
4115 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum49545951997-12-02 19:28:29 +00004116else
Michael W. Hudson54241132001-12-07 15:38:26 +00004117 echo "configure: failed program was:" >&5
4118 cat conftest.$ac_ext >&5
4119 rm -rf conftest*
4120 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum49545951997-12-02 19:28:29 +00004121fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004122rm -f conftest*
4123LIBS="$ac_save_LIBS"
4124
Guido van Rossum49545951997-12-02 19:28:29 +00004125fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004126if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4127 echo "$ac_t""yes" 1>&6
4128 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00004129#define WITH_THREAD 1
4130EOF
4131
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004132 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004133 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004134 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004135else
Michael W. Hudson54241132001-12-07 15:38:26 +00004136 echo "$ac_t""no" 1>&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004137
Michael W. Hudson54241132001-12-07 15:38:26 +00004138 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004139echo "configure:4140: checking for __d6_pthread_create in -lthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004140ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
4141if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4142 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004143else
Michael W. Hudson54241132001-12-07 15:38:26 +00004144 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00004145LIBS="-lthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004146cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004147#line 4148 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004148#include "confdefs.h"
4149/* Override any gcc2 internal prototype to avoid an error. */
4150/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004151 builtin and then its argument prototype would still apply. */
4152char __d6_pthread_create();
4153
4154int main() {
4155__d6_pthread_create()
4156; return 0; }
4157EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004158if { (eval echo configure:4159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004159 rm -rf conftest*
4160 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004161else
Michael W. Hudson54241132001-12-07 15:38:26 +00004162 echo "configure: failed program was:" >&5
4163 cat conftest.$ac_ext >&5
4164 rm -rf conftest*
4165 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004166fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004167rm -f conftest*
4168LIBS="$ac_save_LIBS"
4169
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004170fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004171if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4172 echo "$ac_t""yes" 1>&6
4173 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004174#define WITH_THREAD 1
4175EOF
4176
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004177 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004178 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004179 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00004180else
Michael W. Hudson54241132001-12-07 15:38:26 +00004181 echo "$ac_t""no" 1>&6
Guido van Rossum49545951997-12-02 19:28:29 +00004182
Michael W. Hudson54241132001-12-07 15:38:26 +00004183 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004184echo "configure:4185: checking for __pthread_create_system in -lpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004185ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
4186if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4187 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004188else
Michael W. Hudson54241132001-12-07 15:38:26 +00004189 ac_save_LIBS="$LIBS"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004190LIBS="-lpthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004191cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004192#line 4193 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004193#include "confdefs.h"
4194/* Override any gcc2 internal prototype to avoid an error. */
4195/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004196 builtin and then its argument prototype would still apply. */
4197char __pthread_create_system();
4198
4199int main() {
4200__pthread_create_system()
4201; return 0; }
4202EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004203if { (eval echo configure:4204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004204 rm -rf conftest*
4205 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004206else
Michael W. Hudson54241132001-12-07 15:38:26 +00004207 echo "configure: failed program was:" >&5
4208 cat conftest.$ac_ext >&5
4209 rm -rf conftest*
4210 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004211fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004212rm -f conftest*
4213LIBS="$ac_save_LIBS"
4214
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004215fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004216if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4217 echo "$ac_t""yes" 1>&6
4218 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004219#define WITH_THREAD 1
4220EOF
4221
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004222 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004223 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004224 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004225else
Michael W. Hudson54241132001-12-07 15:38:26 +00004226 echo "$ac_t""no" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004227
Michael W. Hudson54241132001-12-07 15:38:26 +00004228 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004229echo "configure:4230: checking for pthread_create in -lcma" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004230ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
4231if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4232 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00004233else
Michael W. Hudson54241132001-12-07 15:38:26 +00004234 ac_save_LIBS="$LIBS"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004235LIBS="-lcma $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004236cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004237#line 4238 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004238#include "confdefs.h"
4239/* Override any gcc2 internal prototype to avoid an error. */
4240/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004241 builtin and then its argument prototype would still apply. */
4242char pthread_create();
4243
4244int main() {
4245pthread_create()
4246; return 0; }
4247EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004248if { (eval echo configure:4249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004249 rm -rf conftest*
4250 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004251else
Michael W. Hudson54241132001-12-07 15:38:26 +00004252 echo "configure: failed program was:" >&5
4253 cat conftest.$ac_ext >&5
4254 rm -rf conftest*
4255 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004256fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004257rm -f conftest*
4258LIBS="$ac_save_LIBS"
4259
Guido van Rossumb93a8621998-05-07 13:27:32 +00004260fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004261if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4262 echo "$ac_t""yes" 1>&6
4263 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00004264#define WITH_THREAD 1
4265EOF
4266
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004267 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004268 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004269 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004270else
Michael W. Hudson54241132001-12-07 15:38:26 +00004271 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004272
Martin v. Löwis130fb172001-07-19 11:00:41 +00004273 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004274fi
4275
Michael W. Hudson54241132001-12-07 15:38:26 +00004276
Guido van Rossum627b2d71993-12-24 10:39:16 +00004277fi
4278
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004279fi
4280
Guido van Rossum0be3e491997-05-22 20:33:33 +00004281fi
4282
Guido van Rossum49545951997-12-02 19:28:29 +00004283fi
4284
Guido van Rossumb93a8621998-05-07 13:27:32 +00004285fi
4286
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004287fi
4288
Guido van Rossumad678af1998-10-02 14:42:15 +00004289fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004290rm -f conftest*
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004291fi
4292
Michael W. Hudson54241132001-12-07 15:38:26 +00004293fi
4294
Martin v. Löwisa6e97582002-01-01 18:41:33 +00004295fi
4296
Michael W. Hudson54241132001-12-07 15:38:26 +00004297
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004298 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004299 if test "$unistd_defines_pthreads" = "no"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004300 cat >> confdefs.h <<\EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004301#define _POSIX_THREADS 1
4302EOF
4303
4304 fi
4305
Michael W. Hudson54241132001-12-07 15:38:26 +00004306 echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004307echo "configure:4308: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004308 if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then
4309 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004310else
4311 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004312 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004313else
Michael W. Hudson54241132001-12-07 15:38:26 +00004314 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004315#line 4316 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004316#include "confdefs.h"
4317#include <pthread.h>
4318 void *foo(void *parm) {
4319 return NULL;
4320 }
4321 main() {
4322 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004323 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004324 if (pthread_attr_init(&attr)) exit(-1);
4325 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004326 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004327 exit(0);
4328 }
Michael W. Hudson54241132001-12-07 15:38:26 +00004329EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004330if { (eval echo configure:4331: \"$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 +00004331then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004332 ac_cv_pthread_system_supported=yes
4333else
Michael W. Hudson54241132001-12-07 15:38:26 +00004334 echo "configure: failed program was:" >&5
4335 cat conftest.$ac_ext >&5
4336 rm -fr conftest*
4337 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004338fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004339rm -fr conftest*
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004340fi
4341
Michael W. Hudson54241132001-12-07 15:38:26 +00004342
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004343fi
4344
Michael W. Hudson54241132001-12-07 15:38:26 +00004345 echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004346 if test "$ac_cv_pthread_system_supported" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004347 cat >> confdefs.h <<\EOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004348#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
4349EOF
4350
4351 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004352 for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004353do
Michael W. Hudson54241132001-12-07 15:38:26 +00004354echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004355echo "configure:4356: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004356if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4357 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004358else
Michael W. Hudson54241132001-12-07 15:38:26 +00004359 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004360#line 4361 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004361#include "confdefs.h"
4362/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004363 which can conflict with char $ac_func(); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004364#include <assert.h>
4365/* Override any gcc2 internal prototype to avoid an error. */
4366/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004367 builtin and then its argument prototype would still apply. */
4368char $ac_func();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004369
Michael W. Hudson54241132001-12-07 15:38:26 +00004370int main() {
4371
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004372/* The GNU C library defines this for functions which it implements
4373 to always fail with ENOSYS. Some functions are actually named
4374 something starting with __ and the normal name is an alias. */
4375#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4376choke me
4377#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004378$ac_func();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004379#endif
4380
Michael W. Hudson54241132001-12-07 15:38:26 +00004381; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004382EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004383if { (eval echo configure:4384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004384 rm -rf conftest*
4385 eval "ac_cv_func_$ac_func=yes"
4386else
4387 echo "configure: failed program was:" >&5
4388 cat conftest.$ac_ext >&5
4389 rm -rf conftest*
4390 eval "ac_cv_func_$ac_func=no"
4391fi
4392rm -f conftest*
4393fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004394
Michael W. Hudson54241132001-12-07 15:38:26 +00004395if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4396 echo "$ac_t""yes" 1>&6
4397 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4398 cat >> confdefs.h <<EOF
4399#define $ac_tr_func 1
4400EOF
4401
4402else
4403 echo "$ac_t""no" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004404fi
4405done
4406
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004407 fi
4408
Michael W. Hudson54241132001-12-07 15:38:26 +00004409 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004410echo "configure:4411: checking for usconfig in -lmpc" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004411ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
4412if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4413 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004414else
Michael W. Hudson54241132001-12-07 15:38:26 +00004415 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004416LIBS="-lmpc $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004417cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004418#line 4419 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004419#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004420/* Override any gcc2 internal prototype to avoid an error. */
4421/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004422 builtin and then its argument prototype would still apply. */
4423char usconfig();
4424
4425int main() {
4426usconfig()
4427; return 0; }
4428EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004429if { (eval echo configure:4430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004430 rm -rf conftest*
4431 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004432else
Michael W. Hudson54241132001-12-07 15:38:26 +00004433 echo "configure: failed program was:" >&5
4434 cat conftest.$ac_ext >&5
4435 rm -rf conftest*
4436 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004437fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004438rm -f conftest*
4439LIBS="$ac_save_LIBS"
4440
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004441fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004442if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4443 echo "$ac_t""yes" 1>&6
4444 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004445#define WITH_THREAD 1
4446EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004447
Martin v. Löwis130fb172001-07-19 11:00:41 +00004448 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004449 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00004450 USE_THREAD_MODULE=""
Michael W. Hudson54241132001-12-07 15:38:26 +00004451else
4452 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004453fi
4454
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004455
4456 if test $posix_threads != "yes"; then
4457 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004458echo "configure:4459: checking for thr_create in -lthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004459ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
4460if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4461 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004462else
Michael W. Hudson54241132001-12-07 15:38:26 +00004463 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004464LIBS="-lthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004465cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004466#line 4467 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004467#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004468/* Override any gcc2 internal prototype to avoid an error. */
4469/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004470 builtin and then its argument prototype would still apply. */
4471char thr_create();
4472
4473int main() {
4474thr_create()
4475; return 0; }
4476EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004477if { (eval echo configure:4478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004478 rm -rf conftest*
4479 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004480else
Michael W. Hudson54241132001-12-07 15:38:26 +00004481 echo "configure: failed program was:" >&5
4482 cat conftest.$ac_ext >&5
4483 rm -rf conftest*
4484 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004485fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004486rm -f conftest*
4487LIBS="$ac_save_LIBS"
4488
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004489fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004490if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4491 echo "$ac_t""yes" 1>&6
4492 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004493#define WITH_THREAD 1
4494EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004495
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004496 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004497 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004498 USE_THREAD_MODULE=""
Michael W. Hudson54241132001-12-07 15:38:26 +00004499else
4500 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004501fi
4502
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004503 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004504
Martin v. Löwis130fb172001-07-19 11:00:41 +00004505 if test "$USE_THREAD_MODULE" != "#"
4506 then
4507 # If the above checks didn't disable threads, (at least) OSF1
4508 # needs this '-threads' argument during linking.
4509 case $ac_sys_system in
4510 OSF1) LDLAST=-threads;;
4511 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004512 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004513fi
4514
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004515# Check for enable-ipv6
Michael W. Hudson54241132001-12-07 15:38:26 +00004516echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004517echo "configure:4518: checking if --enable-ipv6 is specified" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004518# Check whether --enable-ipv6 or --disable-ipv6 was given.
4519if test "${enable_ipv6+set}" = set; then
4520 enableval="$enable_ipv6"
4521 case "$enableval" in
4522 no)
Michael W. Hudson54241132001-12-07 15:38:26 +00004523 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004524 ipv6=no
4525 ;;
Michael W. Hudson54241132001-12-07 15:38:26 +00004526 *) echo "$ac_t""yes" 1>&6
4527 cat >> confdefs.h <<\EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004528#define ENABLE_IPV6 1
4529EOF
4530
4531 ipv6=yes
4532 ;;
Michael W. Hudson54241132001-12-07 15:38:26 +00004533 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004534else
Michael W. Hudson54241132001-12-07 15:38:26 +00004535
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004536 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004537 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004538 ipv6=no
4539
4540else
Michael W. Hudson54241132001-12-07 15:38:26 +00004541 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004542#line 4543 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004543#include "confdefs.h"
4544 /* AF_INET6 available check */
4545#include <sys/types.h>
4546#include <sys/socket.h>
4547main()
4548{
4549 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4550 exit(1);
4551 else
4552 exit(0);
4553}
4554
Michael W. Hudson54241132001-12-07 15:38:26 +00004555EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004556if { (eval echo configure:4557: \"$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 +00004557then
4558 echo "$ac_t""yes" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004559 ipv6=yes
4560else
Michael W. Hudson54241132001-12-07 15:38:26 +00004561 echo "configure: failed program was:" >&5
4562 cat conftest.$ac_ext >&5
4563 rm -fr conftest*
4564 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004565 ipv6=no
4566fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004567rm -fr conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004568fi
4569
Michael W. Hudson54241132001-12-07 15:38:26 +00004570
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004571if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004572 echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004573echo "configure:4574: checking if RFC2553 API is available" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004574 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004575#line 4576 "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004576#include "confdefs.h"
4577#include <sys/types.h>
4578#include <netinet/in.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00004579int main() {
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004580struct sockaddr_in6 x;
4581x.sin6_scope_id;
Michael W. Hudson54241132001-12-07 15:38:26 +00004582; return 0; }
4583EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004584if { (eval echo configure:4585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004585 rm -rf conftest*
4586 echo "$ac_t""yes" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004587 ipv6=yes
4588else
Michael W. Hudson54241132001-12-07 15:38:26 +00004589 echo "configure: failed program was:" >&5
4590 cat conftest.$ac_ext >&5
4591 rm -rf conftest*
4592 echo "$ac_t""no" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004593 ipv6=no
4594fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004595rm -f conftest*
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004596fi
4597
4598if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004599 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004600#define ENABLE_IPV6 1
4601EOF
4602
4603fi
4604
Michael W. Hudson54241132001-12-07 15:38:26 +00004605fi
4606
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004607
4608ipv6type=unknown
4609ipv6lib=none
4610ipv6trylibc=no
4611
4612if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004613 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004614echo "configure:4615: checking ipv6 stack type" >&5
Guido van Rossumb8552162001-09-05 14:58:11 +00004615 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
4616 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004617 case $i in
4618 inria)
Michael W. Hudson54241132001-12-07 15:38:26 +00004619 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004620#line 4621 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004621#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004622
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004623#include <netinet/in.h>
4624#ifdef IPV6_INRIA_VERSION
4625yes
4626#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004627EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004628if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4629 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004630 rm -rf conftest*
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004631 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004632fi
4633rm -f conftest*
4634
4635 ;;
4636 kame)
Michael W. Hudson54241132001-12-07 15:38:26 +00004637 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004638#line 4639 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004639#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004640
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004641#include <netinet/in.h>
4642#ifdef __KAME__
4643yes
4644#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004645EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004646if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4647 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004648 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004649 ipv6type=$i;
4650 ipv6lib=inet6
4651 ipv6libdir=/usr/local/v6/lib
4652 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004653fi
4654rm -f conftest*
4655
4656 ;;
4657 linux-glibc)
Michael W. Hudson54241132001-12-07 15:38:26 +00004658 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004659#line 4660 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004660#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004661
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004662#include <features.h>
4663#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4664yes
4665#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004666EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004667if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4668 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004669 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004670 ipv6type=$i;
4671 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004672fi
4673rm -f conftest*
4674
4675 ;;
4676 linux-inet6)
4677 if test -d /usr/inet6; then
4678 ipv6type=$i
4679 ipv6lib=inet6
4680 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004681 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004682 fi
4683 ;;
4684 solaris)
4685 if test -f /etc/netconfig; then
4686 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4687 ipv6type=$i
4688 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004689 fi
4690 fi
4691 ;;
4692 toshiba)
Michael W. Hudson54241132001-12-07 15:38:26 +00004693 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004694#line 4695 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004695#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004696
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004697#include <sys/param.h>
4698#ifdef _TOSHIBA_INET6
4699yes
4700#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004701EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004702if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4703 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004704 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004705 ipv6type=$i;
4706 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004707 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004708fi
4709rm -f conftest*
4710
4711 ;;
4712 v6d)
Michael W. Hudson54241132001-12-07 15:38:26 +00004713 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004714#line 4715 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004715#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004716
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004717#include </usr/local/v6/include/sys/v6config.h>
4718#ifdef __V6D__
4719yes
4720#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004721EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004722if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4723 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004724 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004725 ipv6type=$i;
4726 ipv6lib=v6;
4727 ipv6libdir=/usr/local/v6/lib;
4728 OPT="-I/usr/local/v6/include $OPT"
4729fi
4730rm -f conftest*
4731
4732 ;;
4733 zeta)
Michael W. Hudson54241132001-12-07 15:38:26 +00004734 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004735#line 4736 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004736#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004737
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004738#include <sys/param.h>
4739#ifdef _ZETA_MINAMI_INET6
4740yes
4741#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004742EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004743if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4744 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004745 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004746 ipv6type=$i;
4747 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004748 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004749fi
4750rm -f conftest*
4751
4752 ;;
4753 esac
4754 if test "$ipv6type" != "unknown"; then
4755 break
4756 fi
4757 done
Michael W. Hudson54241132001-12-07 15:38:26 +00004758 echo "$ac_t""$ipv6type" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004759fi
4760
4761if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4762 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4763 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4764 echo "using lib$ipv6lib"
4765 else
4766 if test $ipv6trylibc = "yes"; then
4767 echo "using libc"
4768 else
4769 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4770 echo "You need to fetch lib$ipv6lib.a from appropriate"
4771 echo 'ipv6 kit and compile beforehand.'
4772 exit 1
4773 fi
4774 fi
4775fi
4776
Barry Warsawef82cd72000-06-30 16:21:01 +00004777# Check for GC support
Michael W. Hudson54241132001-12-07 15:38:26 +00004778echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004779echo "configure:4780: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004780# Check whether --with-cycle-gc or --without-cycle-gc was given.
4781if test "${with_cycle_gc+set}" = set; then
4782 withval="$with_cycle_gc"
Michael W. Hudson54241132001-12-07 15:38:26 +00004783 :
4784fi
Barry Warsawef82cd72000-06-30 16:21:01 +00004785
4786
4787if test -z "$with_cycle_gc"
4788then with_cycle_gc="yes"
4789fi
Neil Schemenauercf229462001-08-29 23:58:47 +00004790if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +00004791then
Michael W. Hudson54241132001-12-07 15:38:26 +00004792 cat >> confdefs.h <<\EOF
Barry Warsawef82cd72000-06-30 16:21:01 +00004793#define WITH_CYCLE_GC 1
4794EOF
4795
4796fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004797echo "$ac_t""$with_cycle_gc" 1>&6
Barry Warsawef82cd72000-06-30 16:21:01 +00004798
Neil Schemenauera35c6882001-02-27 04:45:05 +00004799# Check for Python-specific malloc support
Michael W. Hudson54241132001-12-07 15:38:26 +00004800echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004801echo "configure:4802: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004802# Check whether --with-pymalloc or --without-pymalloc was given.
4803if test "${with_pymalloc+set}" = set; then
4804 withval="$with_pymalloc"
Neil Schemenauer16c22972002-03-22 15:34:49 +00004805 :
Michael W. Hudson54241132001-12-07 15:38:26 +00004806fi
4807
Neil Schemenauera35c6882001-02-27 04:45:05 +00004808
Neil Schemenauer16c22972002-03-22 15:34:49 +00004809if test -z "$with_pymalloc"
4810then with_pymalloc="yes"
4811fi
4812if test "$with_pymalloc" != "no"
4813then
4814 cat >> confdefs.h <<\EOF
4815#define WITH_PYMALLOC 1
4816EOF
4817
4818fi
4819echo "$ac_t""$with_pymalloc" 1>&6
4820
Barry Warsawef82cd72000-06-30 16:21:01 +00004821# Check for --with-wctype-functions
Michael W. Hudson54241132001-12-07 15:38:26 +00004822echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004823echo "configure:4824: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004824# Check whether --with-wctype-functions or --without-wctype-functions was given.
4825if test "${with_wctype_functions+set}" = set; then
4826 withval="$with_wctype_functions"
Michael W. Hudson54241132001-12-07 15:38:26 +00004827
Barry Warsawef82cd72000-06-30 16:21:01 +00004828if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00004829then cat >> confdefs.h <<\EOF
Barry Warsawef82cd72000-06-30 16:21:01 +00004830#define WANT_WCTYPE_FUNCTIONS 1
4831EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00004832 echo "$ac_t""yes" 1>&6
4833else echo "$ac_t""no" 1>&6
Barry Warsawef82cd72000-06-30 16:21:01 +00004834fi
4835else
Michael W. Hudson54241132001-12-07 15:38:26 +00004836 echo "$ac_t""no" 1>&6
4837fi
4838
Barry Warsawef82cd72000-06-30 16:21:01 +00004839
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004840# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004841
Guido van Rossum98935bf2001-09-05 19:13:16 +00004842DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004843
Michael W. Hudson54241132001-12-07 15:38:26 +00004844echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004845echo "configure:4846: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004846# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004847if test "${with_sgi_dl+set}" = set; then
4848 withval="$with_sgi_dl"
Michael W. Hudson54241132001-12-07 15:38:26 +00004849
4850echo "$ac_t""$withval" 1>&6
4851cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004852#define WITH_SGI_DL 1
4853EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004854
Guido van Rossume97ee181999-12-20 21:27:22 +00004855DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004856dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004857if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004858then LDFLAGS="$LDFLAGS -L$dldir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004859else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004860fi
4861DLINCLDIR=${dldir}
4862LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004863else
Michael W. Hudson54241132001-12-07 15:38:26 +00004864 echo "$ac_t""no" 1>&6
4865fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004866
4867
Michael W. Hudson54241132001-12-07 15:38:26 +00004868echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004869echo "configure:4870: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004870# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004871if test "${with_dl_dld+set}" = set; then
4872 withval="$with_dl_dld"
Michael W. Hudson54241132001-12-07 15:38:26 +00004873
4874echo "$ac_t""$withval" 1>&6
4875cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004876#define WITH_DL_DLD 1
4877EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004878
Guido van Rossume97ee181999-12-20 21:27:22 +00004879DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004880dldir=`echo "$withval" | sed 's/,.*//'`
4881dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004882if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004883then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004884else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004885fi
4886DLINCLDIR=${dldir}
4887LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004888else
Michael W. Hudson54241132001-12-07 15:38:26 +00004889 echo "$ac_t""no" 1>&6
4890fi
4891
Guido van Rossum7f43da71994-08-01 12:15:30 +00004892
Guido van Rossume97ee181999-12-20 21:27:22 +00004893# the dlopen() function means we might want to use dynload_shlib.o. some
4894# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004895for ac_func in dlopen
4896do
Michael W. Hudson54241132001-12-07 15:38:26 +00004897echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004898echo "configure:4899: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004899if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4900 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004901else
Michael W. Hudson54241132001-12-07 15:38:26 +00004902 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004903#line 4904 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004904#include "confdefs.h"
4905/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004906 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004907#include <assert.h>
4908/* Override any gcc2 internal prototype to avoid an error. */
4909/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004910 builtin and then its argument prototype would still apply. */
4911char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004912
Michael W. Hudson54241132001-12-07 15:38:26 +00004913int main() {
4914
Guido van Rossume97ee181999-12-20 21:27:22 +00004915/* The GNU C library defines this for functions which it implements
4916 to always fail with ENOSYS. Some functions are actually named
4917 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004918#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004919choke me
4920#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004921$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004922#endif
4923
Michael W. Hudson54241132001-12-07 15:38:26 +00004924; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004925EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004926if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004927 rm -rf conftest*
4928 eval "ac_cv_func_$ac_func=yes"
4929else
4930 echo "configure: failed program was:" >&5
4931 cat conftest.$ac_ext >&5
4932 rm -rf conftest*
4933 eval "ac_cv_func_$ac_func=no"
4934fi
4935rm -f conftest*
4936fi
Guido van Rossume97ee181999-12-20 21:27:22 +00004937
Michael W. Hudson54241132001-12-07 15:38:26 +00004938if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4939 echo "$ac_t""yes" 1>&6
4940 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4941 cat >> confdefs.h <<EOF
4942#define $ac_tr_func 1
4943EOF
4944
4945else
4946 echo "$ac_t""no" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004947fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004948done
Guido van Rossume97ee181999-12-20 21:27:22 +00004949
Michael W. Hudson54241132001-12-07 15:38:26 +00004950
Guido van Rossume97ee181999-12-20 21:27:22 +00004951# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4952# loading of modules.
4953
Michael W. Hudson54241132001-12-07 15:38:26 +00004954echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004955echo "configure:4956: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004956if test -z "$DYNLOADFILE"
4957then
4958 case $ac_sys_system/$ac_sys_release in
4959 AIX*) DYNLOADFILE="dynload_aix.o";;
4960 BeOS*) DYNLOADFILE="dynload_beos.o";;
4961 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004962 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004963 *)
4964 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4965 # out any dynamic loading
4966 if test "$ac_cv_func_dlopen" = yes
4967 then DYNLOADFILE="dynload_shlib.o"
4968 else DYNLOADFILE="dynload_stub.o"
4969 fi
4970 ;;
4971 esac
4972fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004973echo "$ac_t""$DYNLOADFILE" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004974if test "$DYNLOADFILE" != "dynload_stub.o"
4975then
Michael W. Hudson54241132001-12-07 15:38:26 +00004976 cat >> confdefs.h <<\EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004977#define HAVE_DYNAMIC_LOADING 1
4978EOF
4979
4980fi
4981
Neil Schemenauer4e425612001-06-19 15:44:15 +00004982# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4983
Michael W. Hudson54241132001-12-07 15:38:26 +00004984
4985echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004986echo "configure:4987: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004987if test -z "$MACHDEP_OBJS"
4988then
Jack Jansene578a632001-08-15 01:27:14 +00004989 MACHDEP_OBJS=$extra_machdep_objs
4990else
4991 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004992fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004993echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004994
Guido van Rossum627b2d71993-12-24 10:39:16 +00004995# checks for library functions
Martin v. Löwis244edc82001-10-04 22:44:26 +00004996for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004997 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00004998 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004999 hstrerror inet_pton kill killpg link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00005000 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00005001 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +00005002 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00005003 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00005004 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00005005 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +00005006 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00005007do
Michael W. Hudson54241132001-12-07 15:38:26 +00005008echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005009echo "configure:5010: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005010if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5011 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005012else
Michael W. Hudson54241132001-12-07 15:38:26 +00005013 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005014#line 5015 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005015#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005016/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005017 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005018#include <assert.h>
5019/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005020/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005021 builtin and then its argument prototype would still apply. */
5022char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005023
Michael W. Hudson54241132001-12-07 15:38:26 +00005024int main() {
5025
Guido van Rossum627b2d71993-12-24 10:39:16 +00005026/* The GNU C library defines this for functions which it implements
5027 to always fail with ENOSYS. Some functions are actually named
5028 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005029#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005030choke me
5031#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005032$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005033#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005034
Michael W. Hudson54241132001-12-07 15:38:26 +00005035; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005036EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005037if { (eval echo configure:5038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005038 rm -rf conftest*
5039 eval "ac_cv_func_$ac_func=yes"
5040else
5041 echo "configure: failed program was:" >&5
5042 cat conftest.$ac_ext >&5
5043 rm -rf conftest*
5044 eval "ac_cv_func_$ac_func=no"
5045fi
5046rm -f conftest*
5047fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00005048
Michael W. Hudson54241132001-12-07 15:38:26 +00005049if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5050 echo "$ac_t""yes" 1>&6
5051 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5052 cat >> confdefs.h <<EOF
5053#define $ac_tr_func 1
5054EOF
5055
5056else
5057 echo "$ac_t""no" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005058fi
5059done
5060
Michael W. Hudson54241132001-12-07 15:38:26 +00005061
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005062# check for openpty and forkpty
5063
5064for ac_func in openpty
5065do
Michael W. Hudson54241132001-12-07 15:38:26 +00005066echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005067echo "configure:5068: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005068if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5069 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005070else
Michael W. Hudson54241132001-12-07 15:38:26 +00005071 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005072#line 5073 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005073#include "confdefs.h"
5074/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005075 which can conflict with char $ac_func(); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005076#include <assert.h>
5077/* Override any gcc2 internal prototype to avoid an error. */
5078/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005079 builtin and then its argument prototype would still apply. */
5080char $ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005081
Michael W. Hudson54241132001-12-07 15:38:26 +00005082int main() {
5083
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005084/* The GNU C library defines this for functions which it implements
5085 to always fail with ENOSYS. Some functions are actually named
5086 something starting with __ and the normal name is an alias. */
5087#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5088choke me
5089#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005090$ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005091#endif
5092
Michael W. Hudson54241132001-12-07 15:38:26 +00005093; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005094EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005095if { (eval echo configure:5096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005096 rm -rf conftest*
5097 eval "ac_cv_func_$ac_func=yes"
5098else
5099 echo "configure: failed program was:" >&5
5100 cat conftest.$ac_ext >&5
5101 rm -rf conftest*
5102 eval "ac_cv_func_$ac_func=no"
5103fi
5104rm -f conftest*
5105fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005106
Michael W. Hudson54241132001-12-07 15:38:26 +00005107if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5108 echo "$ac_t""yes" 1>&6
5109 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5110 cat >> confdefs.h <<EOF
5111#define $ac_tr_func 1
5112EOF
5113
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005114else
Michael W. Hudson54241132001-12-07 15:38:26 +00005115 echo "$ac_t""no" 1>&6
5116echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005117echo "configure:5118: checking for openpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005118ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
5119if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5120 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005121else
Michael W. Hudson54241132001-12-07 15:38:26 +00005122 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005123LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005124cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005125#line 5126 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005126#include "confdefs.h"
5127/* Override any gcc2 internal prototype to avoid an error. */
5128/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005129 builtin and then its argument prototype would still apply. */
5130char openpty();
5131
5132int main() {
5133openpty()
5134; return 0; }
5135EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005136if { (eval echo configure:5137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005137 rm -rf conftest*
5138 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005139else
Michael W. Hudson54241132001-12-07 15:38:26 +00005140 echo "configure: failed program was:" >&5
5141 cat conftest.$ac_ext >&5
5142 rm -rf conftest*
5143 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005144fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005145rm -f conftest*
5146LIBS="$ac_save_LIBS"
5147
Fred Drake8cef4cf2000-06-28 16:40:38 +00005148fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005149if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5150 echo "$ac_t""yes" 1>&6
5151 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005152#define HAVE_OPENPTY 1
5153EOF
5154 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005155else
5156 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005157fi
5158
5159fi
5160done
5161
5162for ac_func in forkpty
5163do
Michael W. Hudson54241132001-12-07 15:38:26 +00005164echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005165echo "configure:5166: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005166if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5167 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005168else
Michael W. Hudson54241132001-12-07 15:38:26 +00005169 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005170#line 5171 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005171#include "confdefs.h"
5172/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005173 which can conflict with char $ac_func(); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +00005174#include <assert.h>
5175/* Override any gcc2 internal prototype to avoid an error. */
5176/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005177 builtin and then its argument prototype would still apply. */
5178char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005179
Michael W. Hudson54241132001-12-07 15:38:26 +00005180int main() {
5181
Fred Drake8cef4cf2000-06-28 16:40:38 +00005182/* The GNU C library defines this for functions which it implements
5183 to always fail with ENOSYS. Some functions are actually named
5184 something starting with __ and the normal name is an alias. */
5185#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5186choke me
5187#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005188$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005189#endif
5190
Michael W. Hudson54241132001-12-07 15:38:26 +00005191; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005192EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005193if { (eval echo configure:5194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005194 rm -rf conftest*
5195 eval "ac_cv_func_$ac_func=yes"
5196else
5197 echo "configure: failed program was:" >&5
5198 cat conftest.$ac_ext >&5
5199 rm -rf conftest*
5200 eval "ac_cv_func_$ac_func=no"
5201fi
5202rm -f conftest*
5203fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00005204
Michael W. Hudson54241132001-12-07 15:38:26 +00005205if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5206 echo "$ac_t""yes" 1>&6
5207 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5208 cat >> confdefs.h <<EOF
5209#define $ac_tr_func 1
5210EOF
5211
Fred Drake8cef4cf2000-06-28 16:40:38 +00005212else
Michael W. Hudson54241132001-12-07 15:38:26 +00005213 echo "$ac_t""no" 1>&6
5214echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005215echo "configure:5216: checking for forkpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005216ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
5217if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5218 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005219else
Michael W. Hudson54241132001-12-07 15:38:26 +00005220 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005221LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005222cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005223#line 5224 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005224#include "confdefs.h"
5225/* Override any gcc2 internal prototype to avoid an error. */
5226/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005227 builtin and then its argument prototype would still apply. */
5228char forkpty();
5229
5230int main() {
5231forkpty()
5232; return 0; }
5233EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005234if { (eval echo configure:5235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005235 rm -rf conftest*
5236 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005237else
Michael W. Hudson54241132001-12-07 15:38:26 +00005238 echo "configure: failed program was:" >&5
5239 cat conftest.$ac_ext >&5
5240 rm -rf conftest*
5241 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005242fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005243rm -f conftest*
5244LIBS="$ac_save_LIBS"
5245
Fred Drake8cef4cf2000-06-28 16:40:38 +00005246fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005247if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5248 echo "$ac_t""yes" 1>&6
5249 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005250#define HAVE_FORKPTY 1
5251EOF
5252 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005253else
5254 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005255fi
5256
5257fi
5258done
5259
Jack Jansendd19cf82001-12-06 22:36:17 +00005260
Michael W. Hudson54241132001-12-07 15:38:26 +00005261# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +00005262for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
5263do
Michael W. Hudson54241132001-12-07 15:38:26 +00005264echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005265echo "configure:5266: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005266if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5267 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005268else
Michael W. Hudson54241132001-12-07 15:38:26 +00005269 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005270#line 5271 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005271#include "confdefs.h"
5272/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005273 which can conflict with char $ac_func(); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005274#include <assert.h>
5275/* Override any gcc2 internal prototype to avoid an error. */
5276/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005277 builtin and then its argument prototype would still apply. */
5278char $ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005279
Michael W. Hudson54241132001-12-07 15:38:26 +00005280int main() {
5281
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005282/* The GNU C library defines this for functions which it implements
5283 to always fail with ENOSYS. Some functions are actually named
5284 something starting with __ and the normal name is an alias. */
5285#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5286choke me
5287#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005288$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005289#endif
5290
Michael W. Hudson54241132001-12-07 15:38:26 +00005291; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005292EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005293if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005294 rm -rf conftest*
5295 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005296else
Michael W. Hudson54241132001-12-07 15:38:26 +00005297 echo "configure: failed program was:" >&5
5298 cat conftest.$ac_ext >&5
5299 rm -rf conftest*
5300 eval "ac_cv_func_$ac_func=no"
5301fi
5302rm -f conftest*
5303fi
5304
5305if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5306 echo "$ac_t""yes" 1>&6
5307 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5308 cat >> confdefs.h <<EOF
5309#define $ac_tr_func 1
5310EOF
5311
5312else
5313 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005314fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005315done
5316
Michael W. Hudson54241132001-12-07 15:38:26 +00005317
Martin v. Löwis1142de32002-03-29 16:28:31 +00005318for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +00005319do
Michael W. Hudson54241132001-12-07 15:38:26 +00005320echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005321echo "configure:5322: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005322if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5323 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005324else
Michael W. Hudson54241132001-12-07 15:38:26 +00005325 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005326#line 5327 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005327#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005328/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005329 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005330#include <assert.h>
5331/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005332/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005333 builtin and then its argument prototype would still apply. */
5334char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005335
Michael W. Hudson54241132001-12-07 15:38:26 +00005336int main() {
5337
Guido van Rossum627b2d71993-12-24 10:39:16 +00005338/* The GNU C library defines this for functions which it implements
5339 to always fail with ENOSYS. Some functions are actually named
5340 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005341#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005342choke me
5343#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005344$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005345#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005346
Michael W. Hudson54241132001-12-07 15:38:26 +00005347; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005348EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005349if { (eval echo configure:5350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis1142de32002-03-29 16:28:31 +00005350 rm -rf conftest*
5351 eval "ac_cv_func_$ac_func=yes"
5352else
5353 echo "configure: failed program was:" >&5
5354 cat conftest.$ac_ext >&5
5355 rm -rf conftest*
5356 eval "ac_cv_func_$ac_func=no"
5357fi
5358rm -f conftest*
5359fi
5360
5361if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5362 echo "$ac_t""yes" 1>&6
5363 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5364 cat >> confdefs.h <<EOF
5365#define $ac_tr_func 1
5366EOF
5367
5368else
5369 echo "$ac_t""no" 1>&6
5370LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
5371fi
5372done
5373
5374
5375for ac_func in getpgrp
5376do
5377echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005378echo "configure:5379: checking for $ac_func" >&5
Martin v. Löwis1142de32002-03-29 16:28:31 +00005379if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5380 echo $ac_n "(cached) $ac_c" 1>&6
5381else
5382 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005383#line 5384 "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +00005384#include "confdefs.h"
5385/* System header to define __stub macros and hopefully few prototypes,
5386 which can conflict with char $ac_func(); below. */
5387#include <assert.h>
5388/* Override any gcc2 internal prototype to avoid an error. */
5389/* We use char because int might match the return type of a gcc2
5390 builtin and then its argument prototype would still apply. */
5391char $ac_func();
5392
5393int main() {
5394
5395/* The GNU C library defines this for functions which it implements
5396 to always fail with ENOSYS. Some functions are actually named
5397 something starting with __ and the normal name is an alias. */
5398#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5399choke me
5400#else
5401$ac_func();
5402#endif
5403
5404; return 0; }
5405EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005406if { (eval echo configure:5407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005407 rm -rf conftest*
5408 eval "ac_cv_func_$ac_func=yes"
5409else
5410 echo "configure: failed program was:" >&5
5411 cat conftest.$ac_ext >&5
5412 rm -rf conftest*
5413 eval "ac_cv_func_$ac_func=no"
5414fi
5415rm -f conftest*
5416fi
5417
5418if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5419 echo "$ac_t""yes" 1>&6
5420 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5421 cat >> confdefs.h <<EOF
5422#define $ac_tr_func 1
5423EOF
5424 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005425#line 5426 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005426#include "confdefs.h"
5427#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005428int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005429getpgrp(0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005430; return 0; }
5431EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005432if { (eval echo configure:5433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005433 rm -rf conftest*
5434 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005435#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005436EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005437
Guido van Rossumf78abae1997-01-21 22:02:36 +00005438else
Michael W. Hudson54241132001-12-07 15:38:26 +00005439 echo "configure: failed program was:" >&5
5440 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005441fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005442rm -f conftest*
5443else
5444 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005445fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005446done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005447
Thomas Wouters3a584202000-08-05 23:28:51 +00005448for ac_func in setpgrp
5449do
Michael W. Hudson54241132001-12-07 15:38:26 +00005450echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005451echo "configure:5452: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005452if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5453 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005454else
Michael W. Hudson54241132001-12-07 15:38:26 +00005455 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005456#line 5457 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005457#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005458/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005459 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005460#include <assert.h>
5461/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005462/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005463 builtin and then its argument prototype would still apply. */
5464char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005465
Michael W. Hudson54241132001-12-07 15:38:26 +00005466int main() {
5467
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005468/* The GNU C library defines this for functions which it implements
5469 to always fail with ENOSYS. Some functions are actually named
5470 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005471#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005472choke me
5473#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005474$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005475#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005476
Michael W. Hudson54241132001-12-07 15:38:26 +00005477; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005478EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005479if { (eval echo configure:5480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005480 rm -rf conftest*
5481 eval "ac_cv_func_$ac_func=yes"
5482else
5483 echo "configure: failed program was:" >&5
5484 cat conftest.$ac_ext >&5
5485 rm -rf conftest*
5486 eval "ac_cv_func_$ac_func=no"
5487fi
5488rm -f conftest*
5489fi
5490
5491if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5492 echo "$ac_t""yes" 1>&6
5493 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5494 cat >> confdefs.h <<EOF
5495#define $ac_tr_func 1
5496EOF
5497 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005498#line 5499 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005499#include "confdefs.h"
5500#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005501int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005502setpgrp(0,0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005503; return 0; }
5504EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005505if { (eval echo configure:5506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005506 rm -rf conftest*
5507 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005508#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005509EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005510
Guido van Rossumf78abae1997-01-21 22:02:36 +00005511else
Michael W. Hudson54241132001-12-07 15:38:26 +00005512 echo "configure: failed program was:" >&5
5513 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005514fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005515rm -f conftest*
5516else
5517 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005518fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005519done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005520
Thomas Wouters3a584202000-08-05 23:28:51 +00005521for ac_func in gettimeofday
5522do
Michael W. Hudson54241132001-12-07 15:38:26 +00005523echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005524echo "configure:5525: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005525if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5526 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005527else
Michael W. Hudson54241132001-12-07 15:38:26 +00005528 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005529#line 5530 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005530#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005531/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005532 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005533#include <assert.h>
5534/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005535/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005536 builtin and then its argument prototype would still apply. */
5537char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005538
Michael W. Hudson54241132001-12-07 15:38:26 +00005539int main() {
5540
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005541/* The GNU C library defines this for functions which it implements
5542 to always fail with ENOSYS. Some functions are actually named
5543 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005544#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005545choke me
5546#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005547$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005548#endif
5549
Michael W. Hudson54241132001-12-07 15:38:26 +00005550; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005551EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005552if { (eval echo configure:5553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005553 rm -rf conftest*
5554 eval "ac_cv_func_$ac_func=yes"
5555else
5556 echo "configure: failed program was:" >&5
5557 cat conftest.$ac_ext >&5
5558 rm -rf conftest*
5559 eval "ac_cv_func_$ac_func=no"
5560fi
5561rm -f conftest*
5562fi
5563
5564if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5565 echo "$ac_t""yes" 1>&6
5566 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5567 cat >> confdefs.h <<EOF
5568#define $ac_tr_func 1
5569EOF
5570 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005571#line 5572 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005572#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005573#include <sys/time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005574int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005575gettimeofday((struct timeval*)0,(struct timezone*)0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005576; return 0; }
5577EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005578if { (eval echo configure:5579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005579 :
5580else
Michael W. Hudson54241132001-12-07 15:38:26 +00005581 echo "configure: failed program was:" >&5
5582 cat conftest.$ac_ext >&5
5583 rm -rf conftest*
5584 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005585#define GETTIMEOFDAY_NO_TZ 1
5586EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005587
5588fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005589rm -f conftest*
5590else
5591 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005592fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005593done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005594
Michael W. Hudson54241132001-12-07 15:38:26 +00005595
5596
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005597# On OSF/1 V5.1, getaddrinfo is available, but a define
Michael W. Hudson54241132001-12-07 15:38:26 +00005598# for [no]getaddrinfo in netdb.h.
5599echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005600echo "configure:5601: checking for getaddrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005601cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005602#line 5603 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005603#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005604
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005605#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005606#include <sys/socket.h>
5607#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005608#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005609
Michael W. Hudson54241132001-12-07 15:38:26 +00005610int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005611
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005612getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005613
Michael W. Hudson54241132001-12-07 15:38:26 +00005614; return 0; }
5615EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005616if { (eval echo configure:5617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005617 rm -rf conftest*
5618
5619echo "$ac_t""yes" 1>&6
5620echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005621echo "configure:5622: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005622if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005623 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005624buggygetaddrinfo=yes
5625else
Michael W. Hudson54241132001-12-07 15:38:26 +00005626 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005627#line 5628 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005628#include "confdefs.h"
5629
5630#include <sys/types.h>
5631#include <netdb.h>
5632#include <string.h>
5633#include <sys/socket.h>
5634#include <netinet/in.h>
5635
5636main()
5637{
5638 int passive, gaierr, inet4 = 0, inet6 = 0;
5639 struct addrinfo hints, *ai, *aitop;
5640 char straddr[INET6_ADDRSTRLEN], strport[16];
5641
5642 for (passive = 0; passive <= 1; passive++) {
5643 memset(&hints, 0, sizeof(hints));
5644 hints.ai_family = AF_UNSPEC;
5645 hints.ai_flags = passive ? AI_PASSIVE : 0;
5646 hints.ai_socktype = SOCK_STREAM;
5647 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5648 (void)gai_strerror(gaierr);
5649 goto bad;
5650 }
5651 for (ai = aitop; ai; ai = ai->ai_next) {
5652 if (ai->ai_addr == NULL ||
5653 ai->ai_addrlen == 0 ||
5654 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5655 straddr, sizeof(straddr), strport, sizeof(strport),
5656 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5657 goto bad;
5658 }
5659 switch (ai->ai_family) {
5660 case AF_INET:
5661 if (strcmp(strport, "54321") != 0) {
5662 goto bad;
5663 }
5664 if (passive) {
5665 if (strcmp(straddr, "0.0.0.0") != 0) {
5666 goto bad;
5667 }
5668 } else {
5669 if (strcmp(straddr, "127.0.0.1") != 0) {
5670 goto bad;
5671 }
5672 }
5673 inet4++;
5674 break;
5675 case AF_INET6:
5676 if (strcmp(strport, "54321") != 0) {
5677 goto bad;
5678 }
5679 if (passive) {
5680 if (strcmp(straddr, "::") != 0) {
5681 goto bad;
5682 }
5683 } else {
5684 if (strcmp(straddr, "::1") != 0) {
5685 goto bad;
5686 }
5687 }
5688 inet6++;
5689 break;
5690 case AF_UNSPEC:
5691 goto bad;
5692 break;
5693 default:
5694 /* another family support? */
5695 break;
5696 }
5697 }
5698 }
5699
5700 if (!(inet4 == 0 || inet4 == 2))
5701 goto bad;
5702 if (!(inet6 == 0 || inet6 == 2))
5703 goto bad;
5704
5705 if (aitop)
5706 freeaddrinfo(aitop);
5707 exit(0);
5708
5709 bad:
5710 if (aitop)
5711 freeaddrinfo(aitop);
5712 exit(1);
5713}
5714
Michael W. Hudson54241132001-12-07 15:38:26 +00005715EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005716if { (eval echo configure:5717: \"$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 +00005717then
5718 echo "$ac_t""good" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005719buggygetaddrinfo=no
5720else
Michael W. Hudson54241132001-12-07 15:38:26 +00005721 echo "configure: failed program was:" >&5
5722 cat conftest.$ac_ext >&5
5723 rm -fr conftest*
5724 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005725buggygetaddrinfo=yes
5726fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005727rm -fr conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005728fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005729
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005730else
Michael W. Hudson54241132001-12-07 15:38:26 +00005731 echo "configure: failed program was:" >&5
5732 cat conftest.$ac_ext >&5
5733 rm -rf conftest*
5734
5735echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005736buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005737
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005738fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005739rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005740
5741if test "$buggygetaddrinfo" = "yes"; then
5742 if test "$ipv6" = "yes"; then
5743 echo 'Fatal: You must get working getaddrinfo() function.'
5744 echo ' or you can specify "--disable-ipv6"'.
5745 exit 1
5746 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005747else
Michael W. Hudson54241132001-12-07 15:38:26 +00005748 cat >> confdefs.h <<\EOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005749#define HAVE_GETADDRINFO 1
5750EOF
5751
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005752fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005753for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005754do
Michael W. Hudson54241132001-12-07 15:38:26 +00005755echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005756echo "configure:5757: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005757if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5758 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005759else
Michael W. Hudson54241132001-12-07 15:38:26 +00005760 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005761#line 5762 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005762#include "confdefs.h"
5763/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005764 which can conflict with char $ac_func(); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005765#include <assert.h>
5766/* Override any gcc2 internal prototype to avoid an error. */
5767/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005768 builtin and then its argument prototype would still apply. */
5769char $ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005770
Michael W. Hudson54241132001-12-07 15:38:26 +00005771int main() {
5772
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005773/* The GNU C library defines this for functions which it implements
5774 to always fail with ENOSYS. Some functions are actually named
5775 something starting with __ and the normal name is an alias. */
5776#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5777choke me
5778#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005779$ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005780#endif
5781
Michael W. Hudson54241132001-12-07 15:38:26 +00005782; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005783EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005784if { (eval echo configure:5785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005785 rm -rf conftest*
5786 eval "ac_cv_func_$ac_func=yes"
5787else
5788 echo "configure: failed program was:" >&5
5789 cat conftest.$ac_ext >&5
5790 rm -rf conftest*
5791 eval "ac_cv_func_$ac_func=no"
5792fi
5793rm -f conftest*
5794fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005795
Michael W. Hudson54241132001-12-07 15:38:26 +00005796if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5797 echo "$ac_t""yes" 1>&6
5798 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5799 cat >> confdefs.h <<EOF
5800#define $ac_tr_func 1
5801EOF
5802
5803else
5804 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005805fi
5806done
5807
Michael W. Hudson54241132001-12-07 15:38:26 +00005808
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005809# checks for structures
Michael W. Hudson54241132001-12-07 15:38:26 +00005810echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005811echo "configure:5812: checking whether time.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005812if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5813 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005814else
Michael W. Hudson54241132001-12-07 15:38:26 +00005815 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005816#line 5817 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005817#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005818#include <sys/types.h>
5819#include <sys/time.h>
5820#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005821int main() {
5822struct tm *tp;
5823; return 0; }
5824EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005825if { (eval echo configure:5826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005826 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005827 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005828else
Michael W. Hudson54241132001-12-07 15:38:26 +00005829 echo "configure: failed program was:" >&5
5830 cat conftest.$ac_ext >&5
5831 rm -rf conftest*
5832 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005833fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005834rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005835fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005836
Michael W. Hudson54241132001-12-07 15:38:26 +00005837echo "$ac_t""$ac_cv_header_time" 1>&6
5838if test $ac_cv_header_time = yes; then
5839 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005840#define TIME_WITH_SYS_TIME 1
5841EOF
5842
5843fi
5844
Michael W. Hudson54241132001-12-07 15:38:26 +00005845echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005846echo "configure:5847: checking whether struct tm is in sys/time.h or time.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005847if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5848 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005849else
Michael W. Hudson54241132001-12-07 15:38:26 +00005850 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005851#line 5852 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005852#include "confdefs.h"
5853#include <sys/types.h>
5854#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005855int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005856struct tm *tp; tp->tm_sec;
Michael W. Hudson54241132001-12-07 15:38:26 +00005857; return 0; }
5858EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005859if { (eval echo configure:5860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005860 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005861 ac_cv_struct_tm=time.h
5862else
Michael W. Hudson54241132001-12-07 15:38:26 +00005863 echo "configure: failed program was:" >&5
5864 cat conftest.$ac_ext >&5
5865 rm -rf conftest*
5866 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005867fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005868rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005869fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005870
Michael W. Hudson54241132001-12-07 15:38:26 +00005871echo "$ac_t""$ac_cv_struct_tm" 1>&6
5872if test $ac_cv_struct_tm = sys/time.h; then
5873 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005874#define TM_IN_SYS_TIME 1
5875EOF
5876
5877fi
5878
Michael W. Hudson54241132001-12-07 15:38:26 +00005879echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005880echo "configure:5881: checking for tm_zone in struct tm" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005881if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5882 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005883else
Michael W. Hudson54241132001-12-07 15:38:26 +00005884 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005885#line 5886 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005886#include "confdefs.h"
5887#include <sys/types.h>
5888#include <$ac_cv_struct_tm>
Michael W. Hudson54241132001-12-07 15:38:26 +00005889int main() {
5890struct tm tm; tm.tm_zone;
5891; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005892EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005893if { (eval echo configure:5894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005894 rm -rf conftest*
5895 ac_cv_struct_tm_zone=yes
5896else
5897 echo "configure: failed program was:" >&5
5898 cat conftest.$ac_ext >&5
5899 rm -rf conftest*
5900 ac_cv_struct_tm_zone=no
5901fi
5902rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005903fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005904
Michael W. Hudson54241132001-12-07 15:38:26 +00005905echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5906if test "$ac_cv_struct_tm_zone" = yes; then
5907 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005908#define HAVE_TM_ZONE 1
5909EOF
5910
5911else
Michael W. Hudson54241132001-12-07 15:38:26 +00005912 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005913echo "configure:5914: checking for tzname" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005914if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5915 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005916else
Michael W. Hudson54241132001-12-07 15:38:26 +00005917 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005918#line 5919 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005919#include "confdefs.h"
5920#include <time.h>
5921#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005922extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005923#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005924int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005925atoi(*tzname);
Michael W. Hudson54241132001-12-07 15:38:26 +00005926; return 0; }
5927EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005928if { (eval echo configure:5929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005929 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005930 ac_cv_var_tzname=yes
5931else
Michael W. Hudson54241132001-12-07 15:38:26 +00005932 echo "configure: failed program was:" >&5
5933 cat conftest.$ac_ext >&5
5934 rm -rf conftest*
5935 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005936fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005937rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005938fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005939
Michael W. Hudson54241132001-12-07 15:38:26 +00005940echo "$ac_t""$ac_cv_var_tzname" 1>&6
5941 if test $ac_cv_var_tzname = yes; then
5942 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005943#define HAVE_TZNAME 1
5944EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005945
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005946 fi
5947fi
5948
Michael W. Hudson54241132001-12-07 15:38:26 +00005949echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005950echo "configure:5951: checking for st_rdev in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005951if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
5952 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005953else
Michael W. Hudson54241132001-12-07 15:38:26 +00005954 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005955#line 5956 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005956#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005957#include <sys/types.h>
5958#include <sys/stat.h>
5959int main() {
5960struct stat s; s.st_rdev;
5961; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005962EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005963if { (eval echo configure:5964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005964 rm -rf conftest*
5965 ac_cv_struct_st_rdev=yes
5966else
5967 echo "configure: failed program was:" >&5
5968 cat conftest.$ac_ext >&5
5969 rm -rf conftest*
5970 ac_cv_struct_st_rdev=no
5971fi
5972rm -f conftest*
5973fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005974
Michael W. Hudson54241132001-12-07 15:38:26 +00005975echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
5976if test $ac_cv_struct_st_rdev = yes; then
5977 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005978#define HAVE_ST_RDEV 1
5979EOF
5980
5981fi
5982
Michael W. Hudson54241132001-12-07 15:38:26 +00005983echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005984echo "configure:5985: checking for st_blksize in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005985if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
5986 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005987else
Michael W. Hudson54241132001-12-07 15:38:26 +00005988 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005989#line 5990 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005990#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005991#include <sys/types.h>
5992#include <sys/stat.h>
5993int main() {
5994struct stat s; s.st_blksize;
5995; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005996EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00005997if { (eval echo configure:5998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005998 rm -rf conftest*
5999 ac_cv_struct_st_blksize=yes
6000else
6001 echo "configure: failed program was:" >&5
6002 cat conftest.$ac_ext >&5
6003 rm -rf conftest*
6004 ac_cv_struct_st_blksize=no
6005fi
6006rm -f conftest*
6007fi
Jack Jansendd19cf82001-12-06 22:36:17 +00006008
Michael W. Hudson54241132001-12-07 15:38:26 +00006009echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
6010if test $ac_cv_struct_st_blksize = yes; then
6011 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006012#define HAVE_ST_BLKSIZE 1
6013EOF
6014
6015fi
6016
Michael W. Hudson54241132001-12-07 15:38:26 +00006017echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006018echo "configure:6019: checking for st_blocks in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006019if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
6020 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006021else
Michael W. Hudson54241132001-12-07 15:38:26 +00006022 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006023#line 6024 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006024#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00006025#include <sys/types.h>
6026#include <sys/stat.h>
6027int main() {
6028struct stat s; s.st_blocks;
6029; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006030EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006031if { (eval echo configure:6032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006032 rm -rf conftest*
6033 ac_cv_struct_st_blocks=yes
6034else
6035 echo "configure: failed program was:" >&5
6036 cat conftest.$ac_ext >&5
6037 rm -rf conftest*
6038 ac_cv_struct_st_blocks=no
6039fi
6040rm -f conftest*
6041fi
Jack Jansendd19cf82001-12-06 22:36:17 +00006042
Michael W. Hudson54241132001-12-07 15:38:26 +00006043echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
6044if test $ac_cv_struct_st_blocks = yes; then
6045 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006046#define HAVE_ST_BLOCKS 1
6047EOF
6048
6049else
Michael W. Hudson54241132001-12-07 15:38:26 +00006050 LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006051fi
6052
Michael W. Hudson54241132001-12-07 15:38:26 +00006053
6054echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006055echo "configure:6056: checking for time.h that defines altzone" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006056if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
6057 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006058else
Michael W. Hudson54241132001-12-07 15:38:26 +00006059 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006060#line 6061 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006061#include "confdefs.h"
6062#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006063int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006064return altzone;
Michael W. Hudson54241132001-12-07 15:38:26 +00006065; return 0; }
6066EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006067if { (eval echo configure:6068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006068 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006069 ac_cv_header_time_altzone=yes
6070else
Michael W. Hudson54241132001-12-07 15:38:26 +00006071 echo "configure: failed program was:" >&5
6072 cat conftest.$ac_ext >&5
6073 rm -rf conftest*
6074 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006075fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006076rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006077fi
6078
Michael W. Hudson54241132001-12-07 15:38:26 +00006079echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006080if test $ac_cv_header_time_altzone = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006081 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006082#define HAVE_ALTZONE 1
6083EOF
6084
6085fi
6086
Guido van Rossumda88dad1995-01-26 00:46:29 +00006087was_it_defined=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006088echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006089echo "configure:6090: checking whether sys/select.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006090cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006091#line 6092 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006092#include "confdefs.h"
6093
6094#include <sys/types.h>
6095#include <sys/select.h>
6096#include <sys/time.h>
6097
Michael W. Hudson54241132001-12-07 15:38:26 +00006098int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006099;
Michael W. Hudson54241132001-12-07 15:38:26 +00006100; return 0; }
6101EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006102if { (eval echo configure:6103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006103 rm -rf conftest*
6104 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006105#define SYS_SELECT_WITH_SYS_TIME 1
6106EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006107 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006108else
Michael W. Hudson54241132001-12-07 15:38:26 +00006109 echo "configure: failed program was:" >&5
6110 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006111fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006112rm -f conftest*
6113echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006114
Michael W. Hudson54241132001-12-07 15:38:26 +00006115echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006116echo "configure:6117: checking for addrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006117if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
6118 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006119else
Michael W. Hudson54241132001-12-07 15:38:26 +00006120 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006121#line 6122 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006122#include "confdefs.h"
6123
6124# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006125int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006126struct addrinfo a
Michael W. Hudson54241132001-12-07 15:38:26 +00006127; return 0; }
6128EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006129if { (eval echo configure:6130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006130 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006131 ac_cv_struct_addrinfo=yes
6132else
Michael W. Hudson54241132001-12-07 15:38:26 +00006133 echo "configure: failed program was:" >&5
6134 cat conftest.$ac_ext >&5
6135 rm -rf conftest*
6136 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006137fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006138rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006139fi
6140
Michael W. Hudson54241132001-12-07 15:38:26 +00006141echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006142if test $ac_cv_struct_addrinfo = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006143 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006144#define HAVE_ADDRINFO 1
6145EOF
6146
6147fi
6148
Michael W. Hudson54241132001-12-07 15:38:26 +00006149echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006150echo "configure:6151: checking for sockaddr_storage" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006151if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
6152 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006153else
Michael W. Hudson54241132001-12-07 15:38:26 +00006154 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006155#line 6156 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006156#include "confdefs.h"
6157
6158# include <sys/types.h>
6159# include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006160int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006161struct sockaddr_storage s
Michael W. Hudson54241132001-12-07 15:38:26 +00006162; return 0; }
6163EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006164if { (eval echo configure:6165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006165 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006166 ac_cv_struct_sockaddr_storage=yes
6167else
Michael W. Hudson54241132001-12-07 15:38:26 +00006168 echo "configure: failed program was:" >&5
6169 cat conftest.$ac_ext >&5
6170 rm -rf conftest*
6171 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006172fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006173rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006174fi
6175
Michael W. Hudson54241132001-12-07 15:38:26 +00006176echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006177if test $ac_cv_struct_sockaddr_storage = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006178 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006179#define HAVE_SOCKADDR_STORAGE 1
6180EOF
6181
6182fi
6183
Guido van Rossum627b2d71993-12-24 10:39:16 +00006184# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00006185
Michael W. Hudson54241132001-12-07 15:38:26 +00006186echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006187echo "configure:6188: checking whether char is unsigned" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006188if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
6189 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006190else
Michael W. Hudson54241132001-12-07 15:38:26 +00006191 if test "$GCC" = yes; then
6192 # GCC predefines this symbol on systems where it applies.
6193cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006194#line 6195 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006195#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00006196#ifdef __CHAR_UNSIGNED__
6197 yes
6198#endif
6199
6200EOF
6201if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6202 egrep "yes" >/dev/null 2>&1; then
6203 rm -rf conftest*
6204 ac_cv_c_char_unsigned=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006205else
Michael W. Hudson54241132001-12-07 15:38:26 +00006206 rm -rf conftest*
6207 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006208fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006209rm -f conftest*
6210
6211else
6212if test "$cross_compiling" = yes; then
6213 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6214else
6215 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006216#line 6217 "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +00006217#include "confdefs.h"
6218/* volatile prevents gcc2 from optimizing the test away on sparcs. */
6219#if !defined(__STDC__) || __STDC__ != 1
6220#define volatile
6221#endif
6222main() {
6223 volatile char c = 255; exit(c < 0);
6224}
6225EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006226if { (eval echo configure:6227: \"$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 +00006227then
6228 ac_cv_c_char_unsigned=yes
6229else
6230 echo "configure: failed program was:" >&5
6231 cat conftest.$ac_ext >&5
6232 rm -fr conftest*
6233 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006234fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006235rm -fr conftest*
6236fi
6237
6238fi
6239fi
6240
6241echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006242if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006243 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006244#define __CHAR_UNSIGNED__ 1
6245EOF
6246
6247fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006248
Michael W. Hudson54241132001-12-07 15:38:26 +00006249echo $ac_n "checking for working const""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006250echo "configure:6251: checking for working const" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006251if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6252 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006253else
Michael W. Hudson54241132001-12-07 15:38:26 +00006254 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006255#line 6256 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006256#include "confdefs.h"
6257
Michael W. Hudson54241132001-12-07 15:38:26 +00006258int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006259
Michael W. Hudson54241132001-12-07 15:38:26 +00006260/* Ultrix mips cc rejects this. */
6261typedef int charset[2]; const charset x;
6262/* SunOS 4.1.1 cc rejects this. */
6263char const *const *ccp;
6264char **p;
6265/* NEC SVR4.0.2 mips cc rejects this. */
6266struct point {int x, y;};
6267static struct point const zero = {0,0};
6268/* AIX XL C 1.02.0.0 rejects this.
6269 It does not let you subtract one const X* pointer from another in an arm
6270 of an if-expression whose if-part is not a constant expression */
6271const char *g = "string";
6272ccp = &g + (g ? g-g : 0);
6273/* HPUX 7.0 cc rejects these. */
6274++ccp;
6275p = (char**) ccp;
6276ccp = (char const *const *) p;
6277{ /* SCO 3.2v4 cc rejects this. */
6278 char *t;
6279 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006280
Michael W. Hudson54241132001-12-07 15:38:26 +00006281 *t++ = 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006282}
Michael W. Hudson54241132001-12-07 15:38:26 +00006283{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6284 int x[] = {25, 17};
6285 const int *foo = &x[0];
6286 ++foo;
6287}
6288{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6289 typedef const int *iptr;
6290 iptr p = 0;
6291 ++p;
6292}
6293{ /* AIX XL C 1.02.0.0 rejects this saying
6294 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6295 struct s { int j; const int *ap[3]; };
6296 struct s *b; b->j = 5;
6297}
6298{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6299 const int foo = 10;
6300}
6301
6302; return 0; }
6303EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006304if { (eval echo configure:6305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006305 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006306 ac_cv_c_const=yes
6307else
Michael W. Hudson54241132001-12-07 15:38:26 +00006308 echo "configure: failed program was:" >&5
6309 cat conftest.$ac_ext >&5
6310 rm -rf conftest*
6311 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006312fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006313rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006314fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006315
6316echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006317if test $ac_cv_c_const = no; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006318 cat >> confdefs.h <<\EOF
6319#define const
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006320EOF
6321
6322fi
6323
Michael W. Hudson54241132001-12-07 15:38:26 +00006324
Guido van Rossumda88dad1995-01-26 00:46:29 +00006325works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006326echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006327echo "configure:6328: checking for working volatile" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006328cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006329#line 6330 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006330#include "confdefs.h"
6331
Michael W. Hudson54241132001-12-07 15:38:26 +00006332int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006333volatile int x; x = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006334; return 0; }
6335EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006336if { (eval echo configure:6337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006337 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006338 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006339else
Michael W. Hudson54241132001-12-07 15:38:26 +00006340 echo "configure: failed program was:" >&5
6341 cat conftest.$ac_ext >&5
6342 rm -rf conftest*
6343 cat >> confdefs.h <<\EOF
6344#define volatile
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006345EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006346
6347fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006348rm -f conftest*
6349echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006350
Guido van Rossumda88dad1995-01-26 00:46:29 +00006351works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006352echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006353echo "configure:6354: checking for working signed char" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006354cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006355#line 6356 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006356#include "confdefs.h"
6357
Michael W. Hudson54241132001-12-07 15:38:26 +00006358int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006359signed char c;
Michael W. Hudson54241132001-12-07 15:38:26 +00006360; return 0; }
6361EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +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*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006364 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006365else
Michael W. Hudson54241132001-12-07 15:38:26 +00006366 echo "configure: failed program was:" >&5
6367 cat conftest.$ac_ext >&5
6368 rm -rf conftest*
6369 cat >> confdefs.h <<\EOF
6370#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00006371EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006372
6373fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006374rm -f conftest*
6375echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006376
Guido van Rossumda88dad1995-01-26 00:46:29 +00006377have_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006378echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006379echo "configure:6380: checking for prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006380cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006381#line 6382 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006382#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006383int foo(int x) { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006384int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006385return foo(10);
Michael W. Hudson54241132001-12-07 15:38:26 +00006386; return 0; }
6387EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006388if { (eval echo configure:6389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006389 rm -rf conftest*
6390 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006391#define HAVE_PROTOTYPES 1
6392EOF
6393 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006394else
Michael W. Hudson54241132001-12-07 15:38:26 +00006395 echo "configure: failed program was:" >&5
6396 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006397fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006398rm -f conftest*
6399echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006400
Guido van Rossumda88dad1995-01-26 00:46:29 +00006401works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006402echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006403echo "configure:6404: checking for variable length prototypes and stdarg.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006404cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006405#line 6406 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006406#include "confdefs.h"
6407
6408#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00006409int foo(int x, ...) {
6410 va_list va;
6411 va_start(va, x);
6412 va_arg(va, int);
6413 va_arg(va, char *);
6414 va_arg(va, double);
6415 return 0;
6416}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006417
Michael W. Hudson54241132001-12-07 15:38:26 +00006418int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00006419return foo(10, "", 3.14);
Michael W. Hudson54241132001-12-07 15:38:26 +00006420; return 0; }
6421EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006422if { (eval echo configure:6423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006423 rm -rf conftest*
6424 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006425#define HAVE_STDARG_PROTOTYPES 1
6426EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006427 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006428else
Michael W. Hudson54241132001-12-07 15:38:26 +00006429 echo "configure: failed program was:" >&5
6430 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006431fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006432rm -f conftest*
6433echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006434
Guido van Rossumda88dad1995-01-26 00:46:29 +00006435if test "$have_prototypes" = yes; then
6436bad_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006437echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006438echo "configure:6439: checking for bad exec* prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006439cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006440#line 6441 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006441#include "confdefs.h"
6442#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006443int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006444char **t;execve("@",t,t);
Michael W. Hudson54241132001-12-07 15:38:26 +00006445; return 0; }
6446EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006447if { (eval echo configure:6448: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006448 :
6449else
Michael W. Hudson54241132001-12-07 15:38:26 +00006450 echo "configure: failed program was:" >&5
6451 cat conftest.$ac_ext >&5
6452 rm -rf conftest*
6453 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006454#define BAD_EXEC_PROTOTYPES 1
6455EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006456 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006457fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006458rm -f conftest*
6459echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006460fi
6461
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006462# check if sockaddr has sa_len member
Michael W. Hudson54241132001-12-07 15:38:26 +00006463echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006464echo "configure:6465: checking if sockaddr has sa_len member" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006465cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006466#line 6467 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006467#include "confdefs.h"
6468#include <sys/types.h>
6469#include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006470int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006471struct sockaddr x;
6472x.sa_len = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006473; return 0; }
6474EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006475if { (eval echo configure:6476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006476 rm -rf conftest*
6477 echo "$ac_t""yes" 1>&6
6478 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006479#define HAVE_SOCKADDR_SA_LEN 1
6480EOF
6481
6482else
Michael W. Hudson54241132001-12-07 15:38:26 +00006483 echo "configure: failed program was:" >&5
6484 cat conftest.$ac_ext >&5
6485 rm -rf conftest*
6486 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006487fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006488rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006489
Michael W. Hudson54241132001-12-07 15:38:26 +00006490echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006491echo "configure:6492: checking for bad static forward" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006492if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
6493 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006494else
6495 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006496 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006497else
Michael W. Hudson54241132001-12-07 15:38:26 +00006498 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006499#line 6500 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006500#include "confdefs.h"
6501
6502struct s { int a; int b; };
6503static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006504int foobar() {
6505 static int random;
6506 random = (int) &foo;
6507 return random;
6508}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006509static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006510main() {
6511 exit(!((int)&foo == foobar()));
6512}
Michael W. Hudson54241132001-12-07 15:38:26 +00006513EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006514if { (eval echo configure:6515: \"$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 +00006515then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006516 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006517else
Michael W. Hudson54241132001-12-07 15:38:26 +00006518 echo "configure: failed program was:" >&5
6519 cat conftest.$ac_ext >&5
6520 rm -fr conftest*
6521 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006522fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006523rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006524fi
6525
Michael W. Hudson54241132001-12-07 15:38:26 +00006526fi
6527
6528echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006529if test "$ac_cv_bad_static_forward" = yes
6530then
Michael W. Hudson54241132001-12-07 15:38:26 +00006531 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006532#define BAD_STATIC_FORWARD 1
6533EOF
6534
6535fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006536
Guido van Rossumda88dad1995-01-26 00:46:29 +00006537va_list_is_array=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006538echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006539echo "configure:6540: checking whether va_list is an array" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006540cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006541#line 6542 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006542#include "confdefs.h"
6543
6544#ifdef HAVE_STDARG_PROTOTYPES
6545#include <stdarg.h>
6546#else
6547#include <varargs.h>
6548#endif
6549
Michael W. Hudson54241132001-12-07 15:38:26 +00006550int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006551va_list list1, list2; list1 = list2;
Michael W. Hudson54241132001-12-07 15:38:26 +00006552; return 0; }
6553EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006554if { (eval echo configure:6555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006555 :
6556else
Michael W. Hudson54241132001-12-07 15:38:26 +00006557 echo "configure: failed program was:" >&5
6558 cat conftest.$ac_ext >&5
6559 rm -rf conftest*
6560 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006561#define VA_LIST_IS_ARRAY 1
6562EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006563 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006564fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006565rm -f conftest*
6566echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006567
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006568# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Michael W. Hudson54241132001-12-07 15:38:26 +00006569echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006570echo "configure:6571: checking for gethostbyname_r" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006571if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
6572 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006573else
Michael W. Hudson54241132001-12-07 15:38:26 +00006574 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006575#line 6576 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006576#include "confdefs.h"
6577/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006578 which can conflict with char gethostbyname_r(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006579#include <assert.h>
6580/* Override any gcc2 internal prototype to avoid an error. */
6581/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006582 builtin and then its argument prototype would still apply. */
6583char gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006584
Michael W. Hudson54241132001-12-07 15:38:26 +00006585int main() {
6586
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006587/* The GNU C library defines this for functions which it implements
6588 to always fail with ENOSYS. Some functions are actually named
6589 something starting with __ and the normal name is an alias. */
6590#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6591choke me
6592#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006593gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006594#endif
6595
Michael W. Hudson54241132001-12-07 15:38:26 +00006596; return 0; }
6597EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006598if { (eval echo configure:6599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006599 rm -rf conftest*
6600 eval "ac_cv_func_gethostbyname_r=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006601else
Michael W. Hudson54241132001-12-07 15:38:26 +00006602 echo "configure: failed program was:" >&5
6603 cat conftest.$ac_ext >&5
6604 rm -rf conftest*
6605 eval "ac_cv_func_gethostbyname_r=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006606fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006607rm -f conftest*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006608fi
6609
Michael W. Hudson54241132001-12-07 15:38:26 +00006610if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6611 echo "$ac_t""yes" 1>&6
6612
6613 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006614#define HAVE_GETHOSTBYNAME_R 1
6615EOF
6616
Michael W. Hudson54241132001-12-07 15:38:26 +00006617 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006618echo "configure:6619: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006619 OLD_CFLAGS=$CFLAGS
6620 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006621 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006622#line 6623 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006623#include "confdefs.h"
6624
6625# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006626
6627int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006628
6629 char *name;
6630 struct hostent *he, *res;
6631 char buffer[2048];
6632 int buflen = 2048;
6633 int h_errnop;
6634
6635 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006636
6637; return 0; }
6638EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006639if { (eval echo configure:6640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006640 rm -rf conftest*
6641
6642 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006643#define HAVE_GETHOSTBYNAME_R 1
6644EOF
6645
Michael W. Hudson54241132001-12-07 15:38:26 +00006646 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006647#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6648EOF
6649
Michael W. Hudson54241132001-12-07 15:38:26 +00006650 echo "$ac_t""yes" 1>&6
6651
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006652else
Michael W. Hudson54241132001-12-07 15:38:26 +00006653 echo "configure: failed program was:" >&5
6654 cat conftest.$ac_ext >&5
6655 rm -rf conftest*
6656
6657 echo "$ac_t""no" 1>&6
6658 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006659echo "configure:6660: checking gethostbyname_r with 5 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006660 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006661#line 6662 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006662#include "confdefs.h"
6663
6664# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006665
6666int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006667
6668 char *name;
6669 struct hostent *he;
6670 char buffer[2048];
6671 int buflen = 2048;
6672 int h_errnop;
6673
6674 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006675
6676; return 0; }
6677EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006678if { (eval echo configure:6679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006679 rm -rf conftest*
6680
6681 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006682#define HAVE_GETHOSTBYNAME_R 1
6683EOF
6684
Michael W. Hudson54241132001-12-07 15:38:26 +00006685 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006686#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6687EOF
6688
Michael W. Hudson54241132001-12-07 15:38:26 +00006689 echo "$ac_t""yes" 1>&6
6690
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006691else
Michael W. Hudson54241132001-12-07 15:38:26 +00006692 echo "configure: failed program was:" >&5
6693 cat conftest.$ac_ext >&5
6694 rm -rf conftest*
6695
6696 echo "$ac_t""no" 1>&6
6697 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006698echo "configure:6699: checking gethostbyname_r with 3 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006699 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006700#line 6701 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006701#include "confdefs.h"
6702
6703# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006704
6705int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006706
6707 char *name;
6708 struct hostent *he;
6709 struct hostent_data data;
6710
6711 (void) gethostbyname_r(name, he, &data);
Michael W. Hudson54241132001-12-07 15:38:26 +00006712
6713; return 0; }
6714EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006715if { (eval echo configure:6716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006716 rm -rf conftest*
6717
6718 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006719#define HAVE_GETHOSTBYNAME_R 1
6720EOF
6721
Michael W. Hudson54241132001-12-07 15:38:26 +00006722 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006723#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6724EOF
6725
Michael W. Hudson54241132001-12-07 15:38:26 +00006726 echo "$ac_t""yes" 1>&6
6727
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006728else
Michael W. Hudson54241132001-12-07 15:38:26 +00006729 echo "configure: failed program was:" >&5
6730 cat conftest.$ac_ext >&5
6731 rm -rf conftest*
6732
6733 echo "$ac_t""no" 1>&6
6734
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006735fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006736rm -f conftest*
6737
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006738fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006739rm -f conftest*
6740
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006741fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006742rm -f conftest*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006743 CFLAGS=$OLD_CFLAGS
6744
6745else
Michael W. Hudson54241132001-12-07 15:38:26 +00006746 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006747
Michael W. Hudson54241132001-12-07 15:38:26 +00006748 for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +00006749do
Michael W. Hudson54241132001-12-07 15:38:26 +00006750echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006751echo "configure:6752: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006752if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6753 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006754else
Michael W. Hudson54241132001-12-07 15:38:26 +00006755 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006756#line 6757 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006757#include "confdefs.h"
6758/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006759 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006760#include <assert.h>
6761/* Override any gcc2 internal prototype to avoid an error. */
6762/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006763 builtin and then its argument prototype would still apply. */
6764char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006765
Michael W. Hudson54241132001-12-07 15:38:26 +00006766int main() {
6767
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006768/* The GNU C library defines this for functions which it implements
6769 to always fail with ENOSYS. Some functions are actually named
6770 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006771#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006772choke me
6773#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006774$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006775#endif
6776
Michael W. Hudson54241132001-12-07 15:38:26 +00006777; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006778EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006779if { (eval echo configure:6780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006780 rm -rf conftest*
6781 eval "ac_cv_func_$ac_func=yes"
6782else
6783 echo "configure: failed program was:" >&5
6784 cat conftest.$ac_ext >&5
6785 rm -rf conftest*
6786 eval "ac_cv_func_$ac_func=no"
6787fi
6788rm -f conftest*
6789fi
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006790
Michael W. Hudson54241132001-12-07 15:38:26 +00006791if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6792 echo "$ac_t""yes" 1>&6
6793 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6794 cat >> confdefs.h <<EOF
6795#define $ac_tr_func 1
6796EOF
6797
6798else
6799 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006800fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006801done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006802
Michael W. Hudson54241132001-12-07 15:38:26 +00006803
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006804fi
6805
Michael W. Hudson54241132001-12-07 15:38:26 +00006806
6807
6808
6809
6810
6811
Guido van Rossum627b2d71993-12-24 10:39:16 +00006812# checks for system services
6813# (none yet)
6814
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006815# Linux requires this for correct f.p. operations
Michael W. Hudson54241132001-12-07 15:38:26 +00006816echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006817echo "configure:6818: checking for __fpu_control" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006818if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
6819 echo $ac_n "(cached) $ac_c" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006820else
Michael W. Hudson54241132001-12-07 15:38:26 +00006821 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006822#line 6823 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006823#include "confdefs.h"
6824/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006825 which can conflict with char __fpu_control(); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006826#include <assert.h>
6827/* Override any gcc2 internal prototype to avoid an error. */
6828/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006829 builtin and then its argument prototype would still apply. */
6830char __fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006831
Michael W. Hudson54241132001-12-07 15:38:26 +00006832int main() {
6833
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006834/* The GNU C library defines this for functions which it implements
6835 to always fail with ENOSYS. Some functions are actually named
6836 something starting with __ and the normal name is an alias. */
6837#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6838choke me
6839#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006840__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006841#endif
6842
Michael W. Hudson54241132001-12-07 15:38:26 +00006843; return 0; }
6844EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006845if { (eval echo configure:6846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006846 rm -rf conftest*
6847 eval "ac_cv_func___fpu_control=yes"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006848else
Michael W. Hudson54241132001-12-07 15:38:26 +00006849 echo "configure: failed program was:" >&5
6850 cat conftest.$ac_ext >&5
6851 rm -rf conftest*
6852 eval "ac_cv_func___fpu_control=no"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006853fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006854rm -f conftest*
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006855fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006856
6857if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6858 echo "$ac_t""yes" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006859 :
6860else
Michael W. Hudson54241132001-12-07 15:38:26 +00006861 echo "$ac_t""no" 1>&6
6862echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006863echo "configure:6864: checking for __fpu_control in -lieee" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006864ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
6865if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6866 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006867else
Michael W. Hudson54241132001-12-07 15:38:26 +00006868 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006869LIBS="-lieee $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006870cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006871#line 6872 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006872#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006873/* Override any gcc2 internal prototype to avoid an error. */
6874/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006875 builtin and then its argument prototype would still apply. */
6876char __fpu_control();
6877
6878int main() {
6879__fpu_control()
6880; return 0; }
6881EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006882if { (eval echo configure:6883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006883 rm -rf conftest*
6884 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006885else
Michael W. Hudson54241132001-12-07 15:38:26 +00006886 echo "configure: failed program was:" >&5
6887 cat conftest.$ac_ext >&5
6888 rm -rf conftest*
6889 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006890fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006891rm -f conftest*
6892LIBS="$ac_save_LIBS"
6893
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006894fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006895if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6896 echo "$ac_t""yes" 1>&6
6897 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6898 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6899 cat >> confdefs.h <<EOF
6900#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006901EOF
6902
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006903 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006904
Michael W. Hudson54241132001-12-07 15:38:26 +00006905else
6906 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006907fi
6908
Michael W. Hudson54241132001-12-07 15:38:26 +00006909
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006910fi
6911
Michael W. Hudson54241132001-12-07 15:38:26 +00006912
Guido van Rossum7f253911997-05-09 02:42:48 +00006913# Check for --with-fpectl
Michael W. Hudson54241132001-12-07 15:38:26 +00006914echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006915echo "configure:6916: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006916# Check whether --with-fpectl or --without-fpectl was given.
6917if test "${with_fpectl+set}" = set; then
6918 withval="$with_fpectl"
Michael W. Hudson54241132001-12-07 15:38:26 +00006919
Guido van Rossum7f253911997-05-09 02:42:48 +00006920if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00006921then cat >> confdefs.h <<\EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00006922#define WANT_SIGFPE_HANDLER 1
6923EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00006924 echo "$ac_t""yes" 1>&6
6925else echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006926fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006927else
Michael W. Hudson54241132001-12-07 15:38:26 +00006928 echo "$ac_t""no" 1>&6
6929fi
6930
Guido van Rossum7f253911997-05-09 02:42:48 +00006931
Guido van Rossum7f43da71994-08-01 12:15:30 +00006932# check for --with-libm=...
6933
Guido van Rossum563e7081996-09-10 18:20:48 +00006934case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006935Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006936BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006937*) LIBM=-lm
6938esac
Michael W. Hudson54241132001-12-07 15:38:26 +00006939echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006940echo "configure:6941: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006941# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006942if test "${with_libm+set}" = set; then
6943 withval="$with_libm"
Michael W. Hudson54241132001-12-07 15:38:26 +00006944
Guido van Rossum7f253911997-05-09 02:42:48 +00006945if test "$withval" = no
6946then LIBM=
Michael W. Hudson54241132001-12-07 15:38:26 +00006947 echo "$ac_t""force LIBM empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006948elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006949then LIBM=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00006950 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
6951else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006952fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006953else
Michael W. Hudson54241132001-12-07 15:38:26 +00006954 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
6955fi
6956
Guido van Rossum7f43da71994-08-01 12:15:30 +00006957
6958# check for --with-libc=...
6959
Michael W. Hudson54241132001-12-07 15:38:26 +00006960echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006961echo "configure:6962: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006962# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006963if test "${with_libc+set}" = set; then
6964 withval="$with_libc"
Michael W. Hudson54241132001-12-07 15:38:26 +00006965
Guido van Rossum7f253911997-05-09 02:42:48 +00006966if test "$withval" = no
6967then LIBC=
Michael W. Hudson54241132001-12-07 15:38:26 +00006968 echo "$ac_t""force LIBC empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006969elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006970then LIBC=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00006971 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
6972else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006973fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006974else
Michael W. Hudson54241132001-12-07 15:38:26 +00006975 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
6976fi
6977
Guido van Rossum7f43da71994-08-01 12:15:30 +00006978
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006979# check for hypot() in math library
6980LIBS_SAVE=$LIBS
6981LIBS="$LIBS $LIBM"
6982for ac_func in hypot
6983do
Michael W. Hudson54241132001-12-07 15:38:26 +00006984echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006985echo "configure:6986: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006986if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6987 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006988else
Michael W. Hudson54241132001-12-07 15:38:26 +00006989 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00006990#line 6991 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006991#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006992/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006993 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006994#include <assert.h>
6995/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006996/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006997 builtin and then its argument prototype would still apply. */
6998char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006999
Michael W. Hudson54241132001-12-07 15:38:26 +00007000int main() {
7001
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00007002/* The GNU C library defines this for functions which it implements
7003 to always fail with ENOSYS. Some functions are actually named
7004 something starting with __ and the normal name is an alias. */
7005#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7006choke me
7007#else
Michael W. Hudson54241132001-12-07 15:38:26 +00007008$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00007009#endif
7010
Michael W. Hudson54241132001-12-07 15:38:26 +00007011; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00007012EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007013if { (eval echo configure:7014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007014 rm -rf conftest*
7015 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00007016else
Michael W. Hudson54241132001-12-07 15:38:26 +00007017 echo "configure: failed program was:" >&5
7018 cat conftest.$ac_ext >&5
7019 rm -rf conftest*
7020 eval "ac_cv_func_$ac_func=no"
7021fi
7022rm -f conftest*
7023fi
7024
7025if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7026 echo "$ac_t""yes" 1>&6
7027 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7028 cat >> confdefs.h <<EOF
7029#define $ac_tr_func 1
7030EOF
7031
7032else
7033 echo "$ac_t""no" 1>&6
7034LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00007035fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00007036done
7037
Michael W. Hudson54241132001-12-07 15:38:26 +00007038
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00007039LIBS=$LIBS_SAVE
7040
Guido van Rossumad713701997-07-10 22:42:38 +00007041# check whether malloc(0) returns NULL or not
Michael W. Hudson54241132001-12-07 15:38:26 +00007042echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007043echo "configure:7044: checking what malloc(0) returns" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007044if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
7045 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00007046else
7047 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007048 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +00007049else
Michael W. Hudson54241132001-12-07 15:38:26 +00007050 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007051#line 7052 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00007052#include "confdefs.h"
7053#include <stdio.h>
7054#ifdef HAVE_STDLIB
7055#include <stdlib.h>
7056#else
7057char *malloc(), *realloc();
7058int *free();
7059#endif
7060main() {
7061 char *p;
7062 p = malloc(0);
7063 if (p == NULL) exit(1);
7064 p = realloc(p, 0);
7065 if (p == NULL) exit(1);
7066 free(p);
7067 exit(0);
7068}
Michael W. Hudson54241132001-12-07 15:38:26 +00007069EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007070if { (eval echo configure:7071: \"$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 +00007071then
Guido van Rossumad713701997-07-10 22:42:38 +00007072 ac_cv_malloc_zero=nonnull
7073else
Michael W. Hudson54241132001-12-07 15:38:26 +00007074 echo "configure: failed program was:" >&5
7075 cat conftest.$ac_ext >&5
7076 rm -fr conftest*
7077 ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +00007078fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007079rm -fr conftest*
Guido van Rossumad713701997-07-10 22:42:38 +00007080fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007081
Guido van Rossumad713701997-07-10 22:42:38 +00007082fi
Guido van Rossum3065c942001-09-17 04:03:14 +00007083 # XXX arm cross-compile?
Michael W. Hudson54241132001-12-07 15:38:26 +00007084echo "$ac_t""$ac_cv_malloc_zero" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00007085if test "$ac_cv_malloc_zero" = null
7086then
Michael W. Hudson54241132001-12-07 15:38:26 +00007087 cat >> confdefs.h <<\EOF
Guido van Rossumad713701997-07-10 22:42:38 +00007088#define MALLOC_ZERO_RETURNS_NULL 1
7089EOF
7090
7091fi
7092
Guido van Rossumef2255b2000-03-10 22:30:29 +00007093# check for wchar.h
Michael W. Hudson54241132001-12-07 15:38:26 +00007094ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
7095echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007096echo "configure:7097: checking for wchar.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007097if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7098 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00007099else
Michael W. Hudson54241132001-12-07 15:38:26 +00007100 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007101#line 7102 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007102#include "confdefs.h"
7103#include <wchar.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007104EOF
7105ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007106{ (eval echo configure:7107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007107ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7108if test -z "$ac_err"; then
7109 rm -rf conftest*
7110 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007111else
Michael W. Hudson54241132001-12-07 15:38:26 +00007112 echo "$ac_err" >&5
7113 echo "configure: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007114 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007115 rm -rf conftest*
7116 eval "ac_cv_header_$ac_safe=no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007117fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007118rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007119fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007120if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7121 echo "$ac_t""yes" 1>&6
7122 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007123#define HAVE_WCHAR_H 1
7124EOF
7125 wchar_h="yes"
7126else
Michael W. Hudson54241132001-12-07 15:38:26 +00007127 echo "$ac_t""no" 1>&6
7128wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007129
7130fi
7131
Michael W. Hudson54241132001-12-07 15:38:26 +00007132
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007133# determine wchar_t size
7134if test "$wchar_h" = yes
7135then
Michael W. Hudson54241132001-12-07 15:38:26 +00007136 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007137echo "configure:7138: checking size of wchar_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007138if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
7139 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007140else
7141 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007142 ac_cv_sizeof_wchar_t=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00007143else
Michael W. Hudson54241132001-12-07 15:38:26 +00007144 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007145#line 7146 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007146#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007147#include <stdio.h>
7148main()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007149{
Michael W. Hudson54241132001-12-07 15:38:26 +00007150 FILE *f=fopen("conftestval", "w");
7151 if (!f) exit(1);
7152 fprintf(f, "%d\n", sizeof(wchar_t));
7153 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00007154}
Michael W. Hudson54241132001-12-07 15:38:26 +00007155EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007156if { (eval echo configure:7157: \"$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 +00007157then
7158 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007159else
Michael W. Hudson54241132001-12-07 15:38:26 +00007160 echo "configure: failed program was:" >&5
7161 cat conftest.$ac_ext >&5
7162 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007163 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00007164fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007165rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007166fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007167
7168fi
7169echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
7170cat >> confdefs.h <<EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007171#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
7172EOF
7173
Michael W. Hudson54241132001-12-07 15:38:26 +00007174
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007175fi
7176
Michael W. Hudson54241132001-12-07 15:38:26 +00007177echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007178echo "configure:7179: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007179# Check whether --enable-unicode or --disable-unicode was given.
7180if test "${enable_unicode+set}" = set; then
7181 enableval="$enable_unicode"
Michael W. Hudson54241132001-12-07 15:38:26 +00007182 :
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007183else
7184 enable_unicode=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00007185fi
7186
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007187
7188if test $enable_unicode = yes
7189then
Martin v. Löwisfd917792001-06-27 20:22:04 +00007190 # Without any arguments, Py_UNICODE defaults to two-byte mode
7191 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007192fi
7193
7194case "$enable_unicode" in
7195ucs2) unicode_size="2"
Michael W. Hudson54241132001-12-07 15:38:26 +00007196 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007197#define Py_UNICODE_SIZE 2
7198EOF
7199
7200 ;;
7201ucs4) unicode_size="4"
Michael W. Hudson54241132001-12-07 15:38:26 +00007202 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007203#define Py_UNICODE_SIZE 4
7204EOF
7205
7206 ;;
7207esac
7208
Michael W. Hudson54241132001-12-07 15:38:26 +00007209
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007210if test "$enable_unicode" = "no"
7211then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007212 UNICODE_OBJS=""
Michael W. Hudson54241132001-12-07 15:38:26 +00007213 echo "$ac_t""not used" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007214else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007215 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Michael W. Hudson54241132001-12-07 15:38:26 +00007216 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007217#define Py_USING_UNICODE 1
7218EOF
7219
7220 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
7221 then
7222 PY_UNICODE_TYPE="wchar_t"
Michael W. Hudson54241132001-12-07 15:38:26 +00007223 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007224#define HAVE_USABLE_WCHAR_T 1
7225EOF
7226
Michael W. Hudson54241132001-12-07 15:38:26 +00007227 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007228#define PY_UNICODE_TYPE wchar_t
7229EOF
7230
7231 elif test "$ac_cv_sizeof_short" = "$unicode_size"
7232 then
7233 PY_UNICODE_TYPE="unsigned short"
Michael W. Hudson54241132001-12-07 15:38:26 +00007234 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007235#define PY_UNICODE_TYPE unsigned short
7236EOF
7237
7238 elif test "$ac_cv_sizeof_long" = "$unicode_size"
7239 then
7240 PY_UNICODE_TYPE="unsigned long"
Michael W. Hudson54241132001-12-07 15:38:26 +00007241 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007242#define PY_UNICODE_TYPE unsigned long
7243EOF
7244
7245 else
7246 PY_UNICODE_TYPE="no type found"
7247 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007248 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007249fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007250
7251# check for endianness
Michael W. Hudson54241132001-12-07 15:38:26 +00007252echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007253echo "configure:7254: checking whether byte ordering is bigendian" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007254if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
7255 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00007256else
7257 ac_cv_c_bigendian=unknown
7258# See if sys/param.h defines the BYTE_ORDER macro.
Michael W. Hudson54241132001-12-07 15:38:26 +00007259cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007260#line 7261 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007261#include "confdefs.h"
7262#include <sys/types.h>
7263#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007264int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007265
7266#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
7267 bogus endian macros
7268#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007269; return 0; }
7270EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007271if { (eval echo configure:7272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007272 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007273 # It does; now see whether it defined to BIG_ENDIAN or not.
Michael W. Hudson54241132001-12-07 15:38:26 +00007274cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007275#line 7276 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007276#include "confdefs.h"
7277#include <sys/types.h>
7278#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007279int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007280
7281#if BYTE_ORDER != BIG_ENDIAN
7282 not big endian
7283#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007284; return 0; }
7285EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007286if { (eval echo configure:7287: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007287 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007288 ac_cv_c_bigendian=yes
7289else
Michael W. Hudson54241132001-12-07 15:38:26 +00007290 echo "configure: failed program was:" >&5
7291 cat conftest.$ac_ext >&5
7292 rm -rf conftest*
7293 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +00007294fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007295rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007296else
Michael W. Hudson54241132001-12-07 15:38:26 +00007297 echo "configure: failed program was:" >&5
7298 cat conftest.$ac_ext >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007299fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007300rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007301if test $ac_cv_c_bigendian = unknown; then
7302if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007303 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007304else
Michael W. Hudson54241132001-12-07 15:38:26 +00007305 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007306#line 7307 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007307#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007308main () {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007309 /* Are we little or big endian? From Harbison&Steele. */
7310 union
7311 {
7312 long l;
7313 char c[sizeof (long)];
7314 } u;
7315 u.l = 1;
7316 exit (u.c[sizeof (long) - 1] == 1);
7317}
Michael W. Hudson54241132001-12-07 15:38:26 +00007318EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007319if { (eval echo configure:7320: \"$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 +00007320then
Guido van Rossumef2255b2000-03-10 22:30:29 +00007321 ac_cv_c_bigendian=no
7322else
Michael W. Hudson54241132001-12-07 15:38:26 +00007323 echo "configure: failed program was:" >&5
7324 cat conftest.$ac_ext >&5
7325 rm -fr conftest*
7326 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +00007327fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007328rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007329fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007330
Michael W. Hudson54241132001-12-07 15:38:26 +00007331fi
7332fi
7333
7334echo "$ac_t""$ac_cv_c_bigendian" 1>&6
7335if test $ac_cv_c_bigendian = yes; then
7336 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007337#define WORDS_BIGENDIAN 1
7338EOF
7339
7340fi
7341
Michael W. Hudson54241132001-12-07 15:38:26 +00007342
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007343# Check whether right shifting a negative integer extends the sign bit
7344# or fills with zeros (like the Cray J90, according to Tim Peters).
Michael W. Hudson54241132001-12-07 15:38:26 +00007345echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007346echo "configure:7347: checking whether right shift extends the sign bit" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007347if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
7348 echo $ac_n "(cached) $ac_c" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007349else
Michael W. Hudson54241132001-12-07 15:38:26 +00007350
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007351if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007352 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007353else
Michael W. Hudson54241132001-12-07 15:38:26 +00007354 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007355#line 7356 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007356#include "confdefs.h"
7357
7358int main()
7359{
Vladimir Marangozova6180282000-07-12 05:05:06 +00007360 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007361}
7362
Michael W. Hudson54241132001-12-07 15:38:26 +00007363EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007364if { (eval echo configure:7365: \"$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 +00007365then
Vladimir Marangozova6180282000-07-12 05:05:06 +00007366 ac_cv_rshift_extends_sign=yes
7367else
Michael W. Hudson54241132001-12-07 15:38:26 +00007368 echo "configure: failed program was:" >&5
7369 cat conftest.$ac_ext >&5
7370 rm -fr conftest*
7371 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +00007372fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007373rm -fr conftest*
Vladimir Marangozova6180282000-07-12 05:05:06 +00007374fi
7375
Michael W. Hudson54241132001-12-07 15:38:26 +00007376fi
7377
7378echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007379if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007380then
Michael W. Hudson54241132001-12-07 15:38:26 +00007381 cat >> confdefs.h <<\EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007382#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
7383EOF
7384
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007385fi
7386
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007387# check for getc_unlocked and related locking functions
Michael W. Hudson54241132001-12-07 15:38:26 +00007388echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007389echo "configure:7390: checking for getc_unlocked() and friends" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007390if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
7391 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007392else
Michael W. Hudson54241132001-12-07 15:38:26 +00007393
7394cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007395#line 7396 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007396#include "confdefs.h"
7397#include <stdio.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007398int main() {
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007399
7400 FILE *f = fopen("/dev/null", "r");
7401 flockfile(f);
7402 getc_unlocked(f);
7403 funlockfile(f);
7404
Michael W. Hudson54241132001-12-07 15:38:26 +00007405; return 0; }
7406EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007407if { (eval echo configure:7408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007408 rm -rf conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007409 ac_cv_have_getc_unlocked=yes
7410else
Michael W. Hudson54241132001-12-07 15:38:26 +00007411 echo "configure: failed program was:" >&5
7412 cat conftest.$ac_ext >&5
7413 rm -rf conftest*
7414 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007415fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007416rm -f conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007417fi
7418
Michael W. Hudson54241132001-12-07 15:38:26 +00007419echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007420if test "$ac_cv_have_getc_unlocked" = yes
7421then
Michael W. Hudson54241132001-12-07 15:38:26 +00007422 cat >> confdefs.h <<\EOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007423#define HAVE_GETC_UNLOCKED 1
7424EOF
7425
7426fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007427
Martin v. Löwis0daad592001-09-30 21:09:59 +00007428# check for readline 4.0
Michael W. Hudson54241132001-12-07 15:38:26 +00007429echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007430echo "configure:7431: checking for rl_pre_input_hook in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007431ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'`
7432if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7433 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007434else
Michael W. Hudson54241132001-12-07 15:38:26 +00007435 ac_save_LIBS="$LIBS"
Guido van Rossum353ae582001-07-10 16:45:32 +00007436LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007437cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007438#line 7439 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00007439#include "confdefs.h"
7440/* Override any gcc2 internal prototype to avoid an error. */
7441/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007442 builtin and then its argument prototype would still apply. */
7443char rl_pre_input_hook();
7444
7445int main() {
7446rl_pre_input_hook()
7447; return 0; }
7448EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007449if { (eval echo configure:7450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007450 rm -rf conftest*
7451 eval "ac_cv_lib_$ac_lib_var=yes"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007452else
Michael W. Hudson54241132001-12-07 15:38:26 +00007453 echo "configure: failed program was:" >&5
7454 cat conftest.$ac_ext >&5
7455 rm -rf conftest*
7456 eval "ac_cv_lib_$ac_lib_var=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007457fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007458rm -f conftest*
7459LIBS="$ac_save_LIBS"
7460
Martin v. Löwis0daad592001-09-30 21:09:59 +00007461fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007462if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7463 echo "$ac_t""yes" 1>&6
7464 cat >> confdefs.h <<\EOF
Martin v. Löwis0daad592001-09-30 21:09:59 +00007465#define HAVE_RL_PRE_INPUT_HOOK 1
7466EOF
7467
Michael W. Hudson54241132001-12-07 15:38:26 +00007468else
7469 echo "$ac_t""no" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007470fi
7471
Michael W. Hudson54241132001-12-07 15:38:26 +00007472
Martin v. Löwis0daad592001-09-30 21:09:59 +00007473# check for readline 4.2
Michael W. Hudson54241132001-12-07 15:38:26 +00007474echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007475echo "configure:7476: checking for rl_completion_matches in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007476ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
7477if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7478 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007479else
Michael W. Hudson54241132001-12-07 15:38:26 +00007480 ac_save_LIBS="$LIBS"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007481LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007482cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007483#line 7484 "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007484#include "confdefs.h"
7485/* Override any gcc2 internal prototype to avoid an error. */
7486/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007487 builtin and then its argument prototype would still apply. */
7488char rl_completion_matches();
7489
7490int main() {
7491rl_completion_matches()
7492; return 0; }
7493EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007494if { (eval echo configure:7495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007495 rm -rf conftest*
7496 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum353ae582001-07-10 16:45:32 +00007497else
Michael W. Hudson54241132001-12-07 15:38:26 +00007498 echo "configure: failed program was:" >&5
7499 cat conftest.$ac_ext >&5
7500 rm -rf conftest*
7501 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum353ae582001-07-10 16:45:32 +00007502fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007503rm -f conftest*
7504LIBS="$ac_save_LIBS"
7505
Guido van Rossum353ae582001-07-10 16:45:32 +00007506fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007507if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7508 echo "$ac_t""yes" 1>&6
7509 cat >> confdefs.h <<\EOF
Guido van Rossum353ae582001-07-10 16:45:32 +00007510#define HAVE_RL_COMPLETION_MATCHES 1
7511EOF
7512
Michael W. Hudson54241132001-12-07 15:38:26 +00007513else
7514 echo "$ac_t""no" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007515fi
7516
Jack Jansendd19cf82001-12-06 22:36:17 +00007517
Michael W. Hudson54241132001-12-07 15:38:26 +00007518echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007519echo "configure:7520: checking for broken nice()" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007520if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
7521 echo $ac_n "(cached) $ac_c" 1>&6
7522else
7523
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007524if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007525 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007526else
Michael W. Hudson54241132001-12-07 15:38:26 +00007527 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007528#line 7529 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007529#include "confdefs.h"
7530
7531int main()
7532{
7533 int val1 = nice(1);
7534 if (val1 != -1 && val1 == nice(2))
7535 exit(0);
7536 exit(1);
7537}
7538
Michael W. Hudson54241132001-12-07 15:38:26 +00007539EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007540if { (eval echo configure:7541: \"$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 +00007541then
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007542 ac_cv_broken_nice=yes
7543else
Michael W. Hudson54241132001-12-07 15:38:26 +00007544 echo "configure: failed program was:" >&5
7545 cat conftest.$ac_ext >&5
7546 rm -fr conftest*
7547 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007548fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007549rm -fr conftest*
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007550fi
7551
Michael W. Hudson54241132001-12-07 15:38:26 +00007552fi
7553
7554echo "$ac_t""$ac_cv_broken_nice" 1>&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007555if test "$ac_cv_broken_nice" = yes
7556then
Michael W. Hudson54241132001-12-07 15:38:26 +00007557 cat >> confdefs.h <<\EOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007558#define HAVE_BROKEN_NICE 1
7559EOF
7560
7561fi
7562
Jack Jansen666b1e72001-10-31 12:11:48 +00007563# On HP/UX 11.0, mvwdelch is a block with a return statement
Michael W. Hudson54241132001-12-07 15:38:26 +00007564echo $ac_n "checking whether mvwdelch is an expression""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007565echo "configure:7566: checking whether mvwdelch is an expression" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007566if eval "test \"`echo '$''{'ac_cv_mvwdelch_is_expression'+set}'`\" = set"; then
7567 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007568else
Michael W. Hudson54241132001-12-07 15:38:26 +00007569 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007570#line 7571 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007571#include "confdefs.h"
7572#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007573int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007574
7575 int rtn;
7576 rtn = mvwdelch(0,0,0);
7577
Michael W. Hudson54241132001-12-07 15:38:26 +00007578; return 0; }
7579EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007580if { (eval echo configure:7581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007581 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007582 ac_cv_mvwdelch_is_expression=yes
7583else
Michael W. Hudson54241132001-12-07 15:38:26 +00007584 echo "configure: failed program was:" >&5
7585 cat conftest.$ac_ext >&5
7586 rm -rf conftest*
7587 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007588fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007589rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007590fi
7591
Michael W. Hudson54241132001-12-07 15:38:26 +00007592echo "$ac_t""$ac_cv_mvwdelch_is_expression" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007593
7594if test "$ac_cv_mvwdelch_is_expression" = yes
7595then
Michael W. Hudson54241132001-12-07 15:38:26 +00007596 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007597#define MVWDELCH_IS_EXPRESSION 1
7598EOF
7599
7600fi
7601
Michael W. Hudson54241132001-12-07 15:38:26 +00007602echo $ac_n "checking whether WINDOW has _flags""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007603echo "configure:7604: checking whether WINDOW has _flags" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007604if eval "test \"`echo '$''{'ac_cv_window_has_flags'+set}'`\" = set"; then
7605 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007606else
Michael W. Hudson54241132001-12-07 15:38:26 +00007607 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007608#line 7609 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007609#include "confdefs.h"
7610#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007611int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007612
7613 WINDOW *w;
7614 w->_flags = 0;
7615
Michael W. Hudson54241132001-12-07 15:38:26 +00007616; return 0; }
7617EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007618if { (eval echo configure:7619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007619 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007620 ac_cv_window_has_flags=yes
7621else
Michael W. Hudson54241132001-12-07 15:38:26 +00007622 echo "configure: failed program was:" >&5
7623 cat conftest.$ac_ext >&5
7624 rm -rf conftest*
7625 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007626fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007627rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007628fi
7629
Michael W. Hudson54241132001-12-07 15:38:26 +00007630echo "$ac_t""$ac_cv_window_has_flags" 1>&6
7631
Jack Jansen666b1e72001-10-31 12:11:48 +00007632
7633if test "$ac_cv_window_has_flags" = yes
7634then
Michael W. Hudson54241132001-12-07 15:38:26 +00007635 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007636#define WINDOW_HAS_FLAGS 1
7637EOF
7638
7639fi
7640
Guido van Rossum95713eb2000-05-18 20:53:31 +00007641# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7642# Add sys/socket.h to confdefs.h
7643cat >> confdefs.h <<\EOF
7644#ifdef HAVE_SYS_SOCKET_H
7645#include <sys/socket.h>
7646#endif
7647EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007648echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007649echo "configure:7650: checking for socklen_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007650if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
7651 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum95713eb2000-05-18 20:53:31 +00007652else
Michael W. Hudson54241132001-12-07 15:38:26 +00007653 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007654#line 7655 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007655#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007656#include <sys/types.h>
7657#if STDC_HEADERS
7658#include <stdlib.h>
7659#include <stddef.h>
7660#endif
7661EOF
7662if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7663 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7664 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007665 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007666else
Michael W. Hudson54241132001-12-07 15:38:26 +00007667 rm -rf conftest*
7668 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007669fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007670rm -f conftest*
Guido van Rossum95713eb2000-05-18 20:53:31 +00007671
Michael W. Hudson54241132001-12-07 15:38:26 +00007672fi
7673echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7674if test $ac_cv_type_socklen_t = no; then
7675 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007676#define socklen_t int
7677EOF
7678
7679fi
7680
Michael W. Hudson54241132001-12-07 15:38:26 +00007681
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007682#AC_MSG_CHECKING(for Modules/Setup)
7683#if test ! -f Modules/Setup ; then
7684# if test ! -d Modules ; then
7685# mkdir Modules
7686# fi
7687# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7688# AC_MSG_RESULT(creating)
7689#else
7690# AC_MSG_RESULT(already exists)
7691#fi
7692
Michael W. Hudson54241132001-12-07 15:38:26 +00007693
7694
Martin v. Löwis06f15bb2001-12-02 13:02:32 +00007695for h in `(cd $srcdir;echo Python/thread_*.h)`
7696do
7697 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
7698done
7699
Michael W. Hudson54241132001-12-07 15:38:26 +00007700
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007701SRCDIRS="Parser Grammar Objects Python Modules"
Michael W. Hudson54241132001-12-07 15:38:26 +00007702echo $ac_n "checking for build directories""... $ac_c" 1>&6
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007703echo "configure:7704: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007704for dir in $SRCDIRS; do
7705 if test ! -d $dir; then
7706 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007707 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007708done
Michael W. Hudson54241132001-12-07 15:38:26 +00007709echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007710
Guido van Rossum627b2d71993-12-24 10:39:16 +00007711# generate output files
Michael W. Hudson54241132001-12-07 15:38:26 +00007712trap '' 1 2 15
7713cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007714# This file is a shell script that caches the results of configure
7715# tests run on this system so they can be shared between configure
Michael W. Hudson54241132001-12-07 15:38:26 +00007716# scripts and configure runs. It is not useful on other systems.
7717# If it contains results you don't want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007718#
Michael W. Hudson54241132001-12-07 15:38:26 +00007719# By default, configure uses ./config.cache as the cache file,
7720# creating it if it does not exist already. You can give configure
7721# the --cache-file=FILE option to use a different cache file; that is
7722# what configure does when it calls configure scripts in
7723# subdirectories, so they share the cache.
7724# Giving --cache-file=/dev/null disables caching, for debugging configure.
7725# config.status only pays attention to the cache file if you give it the
7726# --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007727#
Michael W. Hudson54241132001-12-07 15:38:26 +00007728EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007729# The following way of writing the cache mishandles newlines in values,
7730# but we know of no workaround that is simple, portable, and efficient.
7731# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007732# Ultrix sh set writes to stderr and can't be redirected directly,
7733# and sets the high bit in the cache file unless we assign to the vars.
Michael W. Hudson54241132001-12-07 15:38:26 +00007734(set) 2>&1 |
7735 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7736 *ac_space=\ *)
7737 # `set' does not quote correctly, so add quotes (double-quote substitution
7738 # turns \\\\ into \\, and sed turns \\ into \).
7739 sed -n \
7740 -e "s/'/'\\\\''/g" \
7741 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7742 ;;
7743 *)
7744 # `set' quotes correctly as required by POSIX, so do not add quotes.
7745 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7746 ;;
7747 esac >> confcache
7748if cmp -s $cache_file confcache; then
7749 :
7750else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007751 if test -w $cache_file; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007752 echo "updating cache $cache_file"
7753 cat confcache > $cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007754 else
7755 echo "not updating unwritable cache $cache_file"
7756 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007757fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007758rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007759
Michael W. Hudson54241132001-12-07 15:38:26 +00007760trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7761
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007762test "x$prefix" = xNONE && prefix=$ac_default_prefix
7763# Let make expand exec_prefix.
7764test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007765
Michael W. Hudson54241132001-12-07 15:38:26 +00007766# Any assignment to VPATH causes Sun make to only execute
7767# the first set of double-colon rules, so remove it if not needed.
7768# If there is a colon in the path, we need to keep it.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007769if test "x$srcdir" = x.; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007770 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007771fi
7772
Michael W. Hudson54241132001-12-07 15:38:26 +00007773trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7774
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007775DEFS=-DHAVE_CONFIG_H
7776
Michael W. Hudson54241132001-12-07 15:38:26 +00007777# Without the "./", some shells look in PATH for config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007778: ${CONFIG_STATUS=./config.status}
Michael W. Hudson54241132001-12-07 15:38:26 +00007779
7780echo creating $CONFIG_STATUS
7781rm -f $CONFIG_STATUS
7782cat > $CONFIG_STATUS <<EOF
7783#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007784# Generated automatically by configure.
7785# Run this file to recreate the current configuration.
Michael W. Hudson54241132001-12-07 15:38:26 +00007786# This directory was configured as follows,
7787# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7788#
7789# $0 $ac_configure_args
7790#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007791# Compiler output produced by configure, useful for debugging
Michael W. Hudson54241132001-12-07 15:38:26 +00007792# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007793
Michael W. Hudson54241132001-12-07 15:38:26 +00007794ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7795for ac_option
Jack Jansendd19cf82001-12-06 22:36:17 +00007796do
Michael W. Hudson54241132001-12-07 15:38:26 +00007797 case "\$ac_option" in
Jack Jansendd19cf82001-12-06 22:36:17 +00007798 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Michael W. Hudson54241132001-12-07 15:38:26 +00007799 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7800 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7801 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7802 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7803 exit 0 ;;
7804 -help | --help | --hel | --he | --h)
7805 echo "\$ac_cs_usage"; exit 0 ;;
7806 *) echo "\$ac_cs_usage"; exit 1 ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007807 esac
7808done
7809
Michael W. Hudson54241132001-12-07 15:38:26 +00007810ac_given_srcdir=$srcdir
7811ac_given_INSTALL="$INSTALL"
Jack Jansendd19cf82001-12-06 22:36:17 +00007812
Michael W. Hudson54241132001-12-07 15:38:26 +00007813trap '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 +00007814EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007815cat >> $CONFIG_STATUS <<EOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007816
Michael W. Hudson54241132001-12-07 15:38:26 +00007817# Protect against being on the right side of a sed subst in config.status.
7818sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7819 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7820$ac_vpsub
7821$extrasub
7822s%@SHELL@%$SHELL%g
7823s%@CFLAGS@%$CFLAGS%g
7824s%@CPPFLAGS@%$CPPFLAGS%g
7825s%@CXXFLAGS@%$CXXFLAGS%g
7826s%@FFLAGS@%$FFLAGS%g
7827s%@DEFS@%$DEFS%g
7828s%@LDFLAGS@%$LDFLAGS%g
7829s%@LIBS@%$LIBS%g
7830s%@exec_prefix@%$exec_prefix%g
7831s%@prefix@%$prefix%g
7832s%@program_transform_name@%$program_transform_name%g
7833s%@bindir@%$bindir%g
7834s%@sbindir@%$sbindir%g
7835s%@libexecdir@%$libexecdir%g
7836s%@datadir@%$datadir%g
7837s%@sysconfdir@%$sysconfdir%g
7838s%@sharedstatedir@%$sharedstatedir%g
7839s%@localstatedir@%$localstatedir%g
7840s%@libdir@%$libdir%g
7841s%@includedir@%$includedir%g
7842s%@oldincludedir@%$oldincludedir%g
7843s%@infodir@%$infodir%g
7844s%@mandir@%$mandir%g
7845s%@VERSION@%$VERSION%g
Martin v. Löwis1142de32002-03-29 16:28:31 +00007846s%@SOVERSION@%$SOVERSION%g
Michael W. Hudson54241132001-12-07 15:38:26 +00007847s%@CONFIG_ARGS@%$CONFIG_ARGS%g
7848s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7849s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7850s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7851s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
7852s%@MACHDEP@%$MACHDEP%g
7853s%@SGI_ABI@%$SGI_ABI%g
7854s%@CXX@%$CXX%g
7855s%@MAINOBJ@%$MAINOBJ%g
7856s%@CC@%$CC%g
7857s%@CPP@%$CPP%g
7858s%@EXEEXT@%$EXEEXT%g
7859s%@BUILDEXEEXT@%$BUILDEXEEXT%g
7860s%@LIBRARY@%$LIBRARY%g
7861s%@LDLIBRARY@%$LDLIBRARY%g
7862s%@DLLLIBRARY@%$DLLLIBRARY%g
7863s%@BLDLIBRARY@%$BLDLIBRARY%g
7864s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
Martin v. Löwis1142de32002-03-29 16:28:31 +00007865s%@INSTSONAME@%$INSTSONAME%g
7866s%@RUNSHARED@%$RUNSHARED%g
Michael W. Hudson54241132001-12-07 15:38:26 +00007867s%@LINKCC@%$LINKCC%g
7868s%@RANLIB@%$RANLIB%g
7869s%@AR@%$AR%g
7870s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7871s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7872s%@INSTALL_DATA@%$INSTALL_DATA%g
7873s%@LN@%$LN%g
7874s%@OPT@%$OPT%g
7875s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
7876s%@SO@%$SO%g
7877s%@LDSHARED@%$LDSHARED%g
7878s%@BLDSHARED@%$BLDSHARED%g
7879s%@CCSHARED@%$CCSHARED%g
7880s%@LINKFORSHARED@%$LINKFORSHARED%g
7881s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
7882s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7883s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
7884s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
7885s%@LDLAST@%$LDLAST%g
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007886s%@THREADOBJ@%$THREADOBJ%g
Michael W. Hudson54241132001-12-07 15:38:26 +00007887s%@DLINCLDIR@%$DLINCLDIR%g
7888s%@DYNLOADFILE@%$DYNLOADFILE%g
7889s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
7890s%@LIBOBJS@%$LIBOBJS%g
7891s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7892s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7893s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
7894s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
7895s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
7896s%@LIBM@%$LIBM%g
7897s%@LIBC@%$LIBC%g
7898s%@UNICODE_OBJS@%$UNICODE_OBJS%g
7899s%@THREADHEADERS@%$THREADHEADERS%g
7900s%@SRCDIRS@%$SRCDIRS%g
Jack Jansendd19cf82001-12-06 22:36:17 +00007901
Jack Jansendd19cf82001-12-06 22:36:17 +00007902CEOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007903EOF
7904
Michael W. Hudson54241132001-12-07 15:38:26 +00007905cat >> $CONFIG_STATUS <<\EOF
7906
7907# Split the substitutions into bite-sized pieces for seds with
7908# small command number limits, like on Digital OSF/1 and HP-UX.
7909ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7910ac_file=1 # Number of current file.
7911ac_beg=1 # First line for current file.
7912ac_end=$ac_max_sed_cmds # Line after last line for current file.
7913ac_more_lines=:
7914ac_sed_cmds=""
7915while $ac_more_lines; do
7916 if test $ac_beg -gt 1; then
7917 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7918 else
7919 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00007920 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007921 if test ! -s conftest.s$ac_file; then
7922 ac_more_lines=false
7923 rm -f conftest.s$ac_file
7924 else
7925 if test -z "$ac_sed_cmds"; then
7926 ac_sed_cmds="sed -f conftest.s$ac_file"
7927 else
7928 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7929 fi
7930 ac_file=`expr $ac_file + 1`
7931 ac_beg=$ac_end
7932 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7933 fi
7934done
7935if test -z "$ac_sed_cmds"; then
7936 ac_sed_cmds=cat
7937fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007938EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007939
7940cat >> $CONFIG_STATUS <<EOF
7941
7942CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
7943EOF
7944cat >> $CONFIG_STATUS <<\EOF
7945for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Jack Jansendd19cf82001-12-06 22:36:17 +00007946 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00007947 case "$ac_file" in
7948 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7949 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7950 *) ac_file_in="${ac_file}.in" ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007951 esac
7952
Michael W. Hudson54241132001-12-07 15:38:26 +00007953 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7954
7955 # Remove last slash and all that follows it. Not all systems have dirname.
7956 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007957 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007958 # The file is in a subdirectory.
7959 test ! -d "$ac_dir" && mkdir "$ac_dir"
7960 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007961 # A "../" for each directory in $ac_dir_suffix.
Michael W. Hudson54241132001-12-07 15:38:26 +00007962 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007963 else
7964 ac_dir_suffix= ac_dots=
7965 fi
7966
Michael W. Hudson54241132001-12-07 15:38:26 +00007967 case "$ac_given_srcdir" in
7968 .) srcdir=.
7969 if test -z "$ac_dots"; then top_srcdir=.
7970 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7971 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007972 *) # Relative path.
Michael W. Hudson54241132001-12-07 15:38:26 +00007973 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7974 top_srcdir="$ac_dots$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007975 esac
7976
Michael W. Hudson54241132001-12-07 15:38:26 +00007977 case "$ac_given_INSTALL" in
7978 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7979 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007980 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007981
Michael W. Hudson54241132001-12-07 15:38:26 +00007982 echo creating "$ac_file"
7983 rm -f "$ac_file"
7984 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7985 case "$ac_file" in
7986 *Makefile*) ac_comsub="1i\\
7987# $configure_input" ;;
7988 *) ac_comsub= ;;
7989 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007990
Michael W. Hudson54241132001-12-07 15:38:26 +00007991 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7992 sed -e "$ac_comsub
7993s%@configure_input@%$configure_input%g
7994s%@srcdir@%$srcdir%g
7995s%@top_srcdir@%$top_srcdir%g
7996s%@INSTALL@%$INSTALL%g
7997" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7998fi; done
7999rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008001# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8002# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00008003#
8004# ac_d sets the value in "#define NAME VALUE" lines.
Michael W. Hudson54241132001-12-07 15:38:26 +00008005ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8006ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8007ac_dC='\3'
8008ac_dD='%g'
8009# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8010ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8011ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00008012ac_uC=' '
Michael W. Hudson54241132001-12-07 15:38:26 +00008013ac_uD='\4%g'
8014# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8015ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8016ac_eB='$%\1#\2define\3'
8017ac_eC=' '
8018ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00008019
Michael W. Hudson54241132001-12-07 15:38:26 +00008020if test "${CONFIG_HEADERS+set}" != set; then
8021EOF
8022cat >> $CONFIG_STATUS <<EOF
8023 CONFIG_HEADERS="pyconfig.h"
8024EOF
8025cat >> $CONFIG_STATUS <<\EOF
8026fi
8027for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00008028 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00008029 case "$ac_file" in
8030 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8031 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8032 *) ac_file_in="${ac_file}.in" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008033 esac
8034
Michael W. Hudson54241132001-12-07 15:38:26 +00008035 echo creating $ac_file
Guido van Rossum7f43da71994-08-01 12:15:30 +00008036
Michael W. Hudson54241132001-12-07 15:38:26 +00008037 rm -f conftest.frag conftest.in conftest.out
8038 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8039 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008040
8041EOF
8042
Michael W. Hudson54241132001-12-07 15:38:26 +00008043# Transform confdefs.h into a sed script conftest.vals that substitutes
8044# the proper values into config.h.in to produce config.h. And first:
8045# Protect against being on the right side of a sed subst in config.status.
8046# Protect against being in an unquoted here document in config.status.
8047rm -f conftest.vals
8048cat > conftest.hdr <<\EOF
8049s/[\\&%]/\\&/g
8050s%[\\$`]%\\&%g
8051s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8052s%ac_d%ac_u%gp
8053s%ac_u%ac_e%gp
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008054EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008055sed -n -f conftest.hdr confdefs.h > conftest.vals
8056rm -f conftest.hdr
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008057
8058# This sed command replaces #undef with comments. This is necessary, for
8059# example, in the case of _POSIX_SOURCE, which is predefined and required
8060# on some systems where configure will not decide to define it.
Michael W. Hudson54241132001-12-07 15:38:26 +00008061cat >> conftest.vals <<\EOF
8062s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008063EOF
8064
Michael W. Hudson54241132001-12-07 15:38:26 +00008065# Break up conftest.vals because some shells have a limit on
8066# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008067
Jack Jansendd19cf82001-12-06 22:36:17 +00008068rm -f conftest.tail
Michael W. Hudson54241132001-12-07 15:38:26 +00008069while :
Jack Jansendd19cf82001-12-06 22:36:17 +00008070do
Michael W. Hudson54241132001-12-07 15:38:26 +00008071 ac_lines=`grep -c . conftest.vals`
8072 # grep -c gives empty output for an empty file on some AIX systems.
8073 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8074 # Write a limited-size here document to conftest.frag.
8075 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8076 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +00008077 echo 'CEOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008078 sed -f conftest.frag conftest.in > conftest.out
8079 rm -f conftest.in
8080 mv conftest.out conftest.in
8081' >> $CONFIG_STATUS
8082 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8083 rm -f conftest.vals
8084 mv conftest.tail conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00008085done
Michael W. Hudson54241132001-12-07 15:38:26 +00008086rm -f conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00008087
Michael W. Hudson54241132001-12-07 15:38:26 +00008088cat >> $CONFIG_STATUS <<\EOF
8089 rm -f conftest.frag conftest.h
8090 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8091 cat conftest.in >> conftest.h
8092 rm -f conftest.in
8093 if cmp -s $ac_file conftest.h 2>/dev/null; then
8094 echo "$ac_file is unchanged"
8095 rm -f conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00008096 else
Michael W. Hudson54241132001-12-07 15:38:26 +00008097 # Remove last slash and all that follows it. Not all systems have dirname.
8098 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Jack Jansendd19cf82001-12-06 22:36:17 +00008099 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00008100 # The file is in a subdirectory.
8101 test ! -d "$ac_dir" && mkdir "$ac_dir"
Jack Jansendd19cf82001-12-06 22:36:17 +00008102 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008103 rm -f $ac_file
8104 mv conftest.h $ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00008105 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008106fi; done
8107
Guido van Rossumf78abae1997-01-21 22:02:36 +00008108EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008109cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00008110
Michael W. Hudson54241132001-12-07 15:38:26 +00008111EOF
8112cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008113
Michael W. Hudson54241132001-12-07 15:38:26 +00008114exit 0
Guido van Rossum627b2d71993-12-24 10:39:16 +00008115EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008116chmod +x $CONFIG_STATUS
Michael W. Hudson54241132001-12-07 15:38:26 +00008117rm -fr confdefs* $ac_clean_files
8118test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00008119
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008120
8121echo "creating Setup"
8122if test ! -f Modules/Setup
8123then
8124 cp $srcdir/Modules/Setup.dist Modules/Setup
8125fi
8126
8127echo "creating Setup.local"
8128if test ! -f Modules/Setup.local
8129then
8130 echo "# Edit this file for local setup changes" >Modules/Setup.local
8131fi
8132
8133echo "creating Makefile"
8134$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
8135 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00008136 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008137mv config.c Modules