blob: 76ed68e42e8df4a30daf7d46d3e6180f83979a2b [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öwisc45929e2002-04-06 10:10:49 +00003# From configure.in Revision: 1.303
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
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001707then
1708 cat >> confdefs.h <<\EOF
Fred Drake109d9862001-07-11 06:27:56 +00001709#define Py_DEBUG 1
1710EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001711
1712 echo "$ac_t""yes" 1>&6;
1713 Py_DEBUG='true'
Michael W. Hudson54241132001-12-07 15:38:26 +00001714else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00001715fi
1716else
Michael W. Hudson54241132001-12-07 15:38:26 +00001717 echo "$ac_t""no" 1>&6
1718fi
1719
Fred Drake109d9862001-07-11 06:27:56 +00001720
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001721# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001722
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001723if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001724then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001725 case $GCC in
1726 yes)
1727 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001728 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001729 if test "$Py_DEBUG" = 'true' ; then
1730 # Optimization messes up debuggers, so turn it off for
1731 # debug builds.
1732 OPT="-g -Wall -Wstrict-prototypes"
1733 else
1734 OPT="-g -O3 -Wall -Wstrict-prototypes"
1735 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001736 *)
Fred Drake109d9862001-07-11 06:27:56 +00001737 OPT="-O3 -Wall -Wstrict-prototypes";;
1738 esac
1739 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001740 *)
1741 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00001742 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001743 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1744 *)
1745 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001746 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001747 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00001748 case $ac_sys_system in
1749 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00001750 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00001751 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001752fi
1753
Fred Drakee1ceaa02001-12-04 20:55:47 +00001754if test "$Py_DEBUG" = 'true'; then
1755 :
1756else
1757 OPT="-DNDEBUG $OPT"
1758fi
1759
Trent Mick635f6fb2000-08-23 21:33:05 +00001760# The current (beta) Monterey compiler dies with optimizations
1761case $ac_sys_system in
1762Monterey*) OPT="";;
1763esac
1764
Guido van Rossum563e7081996-09-10 18:20:48 +00001765if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001766then
1767 OPT="$OPT $ac_arch_flags"
1768fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00001769
Michael W. Hudson54241132001-12-07 15:38:26 +00001770echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001771echo "configure:1772: checking whether $CC accepts -OPT:Olimit=0" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001772if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
1773 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +00001774else
1775 ac_save_cc="$CC"
1776CC="$CC -OPT:Olimit=0"
1777if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001778 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00001779else
Michael W. Hudson54241132001-12-07 15:38:26 +00001780 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001781#line 1782 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001782#include "confdefs.h"
1783int main() { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001784EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001785if { (eval echo configure:1786: \"$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 +00001786then
Guido van Rossum91922671997-10-09 20:24:13 +00001787 ac_cv_opt_olimit_ok=yes
1788else
Michael W. Hudson54241132001-12-07 15:38:26 +00001789 echo "configure: failed program was:" >&5
1790 cat conftest.$ac_ext >&5
1791 rm -fr conftest*
1792 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00001793fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001794rm -fr conftest*
Guido van Rossum91922671997-10-09 20:24:13 +00001795fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001796
Guido van Rossum91922671997-10-09 20:24:13 +00001797CC="$ac_save_cc"
1798fi
1799
Michael W. Hudson54241132001-12-07 15:38:26 +00001800echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001801if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001802 case $ac_sys_system in
1803 Darwin*) OPT="$OPT" ;;
1804 *) OPT="$OPT -OPT:Olimit=0";;
1805 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001806else
Michael W. Hudson54241132001-12-07 15:38:26 +00001807 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001808echo "configure:1809: checking whether $CC accepts -Olimit 1500" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001809 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1810 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001811else
1812 ac_save_cc="$CC"
1813 CC="$CC -Olimit 1500"
1814 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001815 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001816else
Michael W. Hudson54241132001-12-07 15:38:26 +00001817 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001818#line 1819 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001819#include "confdefs.h"
1820int main() { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001821EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001822if { (eval echo configure:1823: \"$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 +00001823then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001824 ac_cv_olimit_ok=yes
1825else
Michael W. Hudson54241132001-12-07 15:38:26 +00001826 echo "configure: failed program was:" >&5
1827 cat conftest.$ac_ext >&5
1828 rm -fr conftest*
1829 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001830fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001831rm -fr conftest*
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001832fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001833
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001834 CC="$ac_save_cc"
1835fi
1836
Michael W. Hudson54241132001-12-07 15:38:26 +00001837 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001838 if test $ac_cv_olimit_ok = yes; then
1839 OPT="$OPT -Olimit 1500"
1840 fi
1841fi
1842
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001843# On some compilers, pthreads are available without further options
1844# (e.g. MacOS X). On some of these systems, the compiler will not
1845# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
1846# So we have to see first whether pthreads are available without
1847# options before we can check whether -Kpthread improves anything.
Michael W. Hudson54241132001-12-07 15:38:26 +00001848echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001849echo "configure:1850: checking whether pthreads are available without options" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001850if eval "test \"`echo '$''{'ac_cv_pthread_is_default'+set}'`\" = set"; then
1851 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00001852else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001853 if test "$cross_compiling" = yes; then
1854 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001855else
Michael W. Hudson54241132001-12-07 15:38:26 +00001856 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001857#line 1858 "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00001858#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001859
Martin v. Löwis130fb172001-07-19 11:00:41 +00001860#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001861
1862void* routine(void* p){return NULL;}
1863
1864int main(){
1865 pthread_t p;
1866 if(pthread_create(&p,NULL,routine,NULL)!=0)
1867 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00001868 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001869 return 0;
1870}
1871
Michael W. Hudson54241132001-12-07 15:38:26 +00001872EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001873if { (eval echo configure:1874: \"$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 +00001874then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001875 ac_cv_pthread_is_default=yes
1876else
Michael W. Hudson54241132001-12-07 15:38:26 +00001877 echo "configure: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
1879 rm -fr conftest*
1880 ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001881fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001882rm -fr conftest*
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001883fi
1884
Michael W. Hudson54241132001-12-07 15:38:26 +00001885
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001886fi
1887
Michael W. Hudson54241132001-12-07 15:38:26 +00001888echo "$ac_t""$ac_cv_pthread_is_default" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001889
Michael W. Hudson54241132001-12-07 15:38:26 +00001890
1891if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001892then
1893 ac_cv_kpthread=no
1894else
1895# -Kpthread, if available, provides the right #defines
1896# and linker options to make pthread_create available
1897# Some compilers won't report that they do not support -Kpthread,
1898# so we need to run a program to see whether it really made the
1899# function available.
Michael W. Hudson54241132001-12-07 15:38:26 +00001900echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001901echo "configure:1902: checking whether $CC accepts -Kpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001902if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1903 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001904else
1905 ac_save_cc="$CC"
1906CC="$CC -Kpthread"
1907if test "$cross_compiling" = yes; then
1908 ac_cv_kpthread=no
1909else
Michael W. Hudson54241132001-12-07 15:38:26 +00001910 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001911#line 1912 "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001912#include "confdefs.h"
1913
1914#include <pthread.h>
1915
1916void* routine(void* p){return NULL;}
1917
1918int main(){
1919 pthread_t p;
1920 if(pthread_create(&p,NULL,routine,NULL)!=0)
1921 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00001922 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001923 return 0;
1924}
1925
Michael W. Hudson54241132001-12-07 15:38:26 +00001926EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001927if { (eval echo configure:1928: \"$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 +00001928then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001929 ac_cv_kpthread=yes
1930else
Michael W. Hudson54241132001-12-07 15:38:26 +00001931 echo "configure: failed program was:" >&5
1932 cat conftest.$ac_ext >&5
1933 rm -fr conftest*
1934 ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00001935fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001936rm -fr conftest*
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001937fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001938
Martin v. Löwis130fb172001-07-19 11:00:41 +00001939CC="$ac_save_cc"
1940fi
1941
Michael W. Hudson54241132001-12-07 15:38:26 +00001942echo "$ac_t""$ac_cv_kpthread" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001943fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00001944
Michael W. Hudson54241132001-12-07 15:38:26 +00001945
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001946# checks for header files
Michael W. Hudson54241132001-12-07 15:38:26 +00001947echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001948echo "configure:1949: checking for ANSI C header files" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001949if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1950 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001951else
Michael W. Hudson54241132001-12-07 15:38:26 +00001952 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001953#line 1954 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001954#include "confdefs.h"
1955#include <stdlib.h>
1956#include <stdarg.h>
1957#include <string.h>
1958#include <float.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001959EOF
1960ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001961{ (eval echo configure:1962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001962ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1963if test -z "$ac_err"; then
1964 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001965 ac_cv_header_stdc=yes
1966else
Michael W. Hudson54241132001-12-07 15:38:26 +00001967 echo "$ac_err" >&5
1968 echo "configure: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001969 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001970 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001971 ac_cv_header_stdc=no
1972fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001973rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001974
1975if test $ac_cv_header_stdc = yes; then
1976 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Michael W. Hudson54241132001-12-07 15:38:26 +00001977cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001978#line 1979 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001979#include "confdefs.h"
1980#include <string.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001981EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1983 egrep "memchr" >/dev/null 2>&1; then
1984 :
1985else
Michael W. Hudson54241132001-12-07 15:38:26 +00001986 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001987 ac_cv_header_stdc=no
1988fi
1989rm -f conftest*
1990
1991fi
1992
1993if test $ac_cv_header_stdc = yes; then
1994 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Michael W. Hudson54241132001-12-07 15:38:26 +00001995cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00001996#line 1997 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001997#include "confdefs.h"
1998#include <stdlib.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001999EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2001 egrep "free" >/dev/null 2>&1; then
2002 :
2003else
Michael W. Hudson54241132001-12-07 15:38:26 +00002004 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002005 ac_cv_header_stdc=no
2006fi
2007rm -f conftest*
2008
2009fi
2010
2011if test $ac_cv_header_stdc = yes; then
2012 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Michael W. Hudson54241132001-12-07 15:38:26 +00002013if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002014 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002015else
Michael W. Hudson54241132001-12-07 15:38:26 +00002016 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002017#line 2018 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002018#include "confdefs.h"
2019#include <ctype.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002020#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2021#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Jack Jansendd19cf82001-12-06 22:36:17 +00002022#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Michael W. Hudson54241132001-12-07 15:38:26 +00002023int main () { int i; for (i = 0; i < 256; i++)
2024if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2025exit (0); }
2026
2027EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002028if { (eval echo configure:2029: \"$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 +00002029then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002030 :
2031else
Michael W. Hudson54241132001-12-07 15:38:26 +00002032 echo "configure: failed program was:" >&5
2033 cat conftest.$ac_ext >&5
2034 rm -fr conftest*
2035 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002036fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002037rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00002038fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002039
Michael W. Hudson54241132001-12-07 15:38:26 +00002040fi
2041fi
2042
2043echo "$ac_t""$ac_cv_header_stdc" 1>&6
2044if test $ac_cv_header_stdc = yes; then
2045 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002046#define STDC_HEADERS 1
2047EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002048
2049fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002050
Martin v. Löwis2e64c342002-03-27 18:49:02 +00002051for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
2052libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00002053signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00002054sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002055sys/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 +00002056sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00002057ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00002058do
Michael W. Hudson54241132001-12-07 15:38:26 +00002059ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2060echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002061echo "configure:2062: checking for $ac_hdr" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002062if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2063 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002064else
Michael W. Hudson54241132001-12-07 15:38:26 +00002065 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002066#line 2067 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002067#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002068#include <$ac_hdr>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002069EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002070ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002071{ (eval echo configure:2072: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002072ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2073if test -z "$ac_err"; then
2074 rm -rf conftest*
2075 eval "ac_cv_header_$ac_safe=yes"
2076else
2077 echo "$ac_err" >&5
2078 echo "configure: failed program was:" >&5
2079 cat conftest.$ac_ext >&5
2080 rm -rf conftest*
2081 eval "ac_cv_header_$ac_safe=no"
2082fi
2083rm -f conftest*
2084fi
2085if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2086 echo "$ac_t""yes" 1>&6
2087 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2088 cat >> confdefs.h <<EOF
2089#define $ac_tr_hdr 1
2090EOF
2091
2092else
2093 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002094fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002095done
2096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002097ac_header_dirent=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002098for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2099do
2100ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2101echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002102echo "configure:2103: checking for $ac_hdr that defines DIR" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002103if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2104 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002105else
Michael W. Hudson54241132001-12-07 15:38:26 +00002106 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002107#line 2108 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002108#include "confdefs.h"
2109#include <sys/types.h>
2110#include <$ac_hdr>
Michael W. Hudson54241132001-12-07 15:38:26 +00002111int main() {
2112DIR *dirp = 0;
2113; return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002114EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002115if { (eval echo configure:2116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002116 rm -rf conftest*
2117 eval "ac_cv_header_dirent_$ac_safe=yes"
2118else
2119 echo "configure: failed program was:" >&5
2120 cat conftest.$ac_ext >&5
2121 rm -rf conftest*
2122 eval "ac_cv_header_dirent_$ac_safe=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002123fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002124rm -f conftest*
2125fi
2126if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2127 echo "$ac_t""yes" 1>&6
2128 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2129 cat >> confdefs.h <<EOF
2130#define $ac_tr_hdr 1
2131EOF
2132 ac_header_dirent=$ac_hdr; break
2133else
2134 echo "$ac_t""no" 1>&6
2135fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002136done
2137# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2138if test $ac_header_dirent = dirent.h; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002139echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002140echo "configure:2141: checking for opendir in -ldir" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002141ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2142if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2143 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002144else
Michael W. Hudson54241132001-12-07 15:38:26 +00002145 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002146LIBS="-ldir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00002147cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002148#line 2149 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002149#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002150/* Override any gcc2 internal prototype to avoid an error. */
2151/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00002152 builtin and then its argument prototype would still apply. */
2153char opendir();
2154
2155int main() {
2156opendir()
2157; return 0; }
2158EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002159if { (eval echo configure:2160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002160 rm -rf conftest*
2161 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002162else
Michael W. Hudson54241132001-12-07 15:38:26 +00002163 echo "configure: failed program was:" >&5
2164 cat conftest.$ac_ext >&5
2165 rm -rf conftest*
2166 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002167fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002168rm -f conftest*
2169LIBS="$ac_save_LIBS"
2170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002171fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002172if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2173 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002174 LIBS="$LIBS -ldir"
Michael W. Hudson54241132001-12-07 15:38:26 +00002175else
2176 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002177fi
2178
2179else
Michael W. Hudson54241132001-12-07 15:38:26 +00002180echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002181echo "configure:2182: checking for opendir in -lx" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002182ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2183if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2184 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002185else
Michael W. Hudson54241132001-12-07 15:38:26 +00002186 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002187LIBS="-lx $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00002188cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002189#line 2190 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002190#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002191/* Override any gcc2 internal prototype to avoid an error. */
2192/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00002193 builtin and then its argument prototype would still apply. */
2194char opendir();
2195
2196int main() {
2197opendir()
2198; return 0; }
2199EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002200if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002201 rm -rf conftest*
2202 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002203else
Michael W. Hudson54241132001-12-07 15:38:26 +00002204 echo "configure: failed program was:" >&5
2205 cat conftest.$ac_ext >&5
2206 rm -rf conftest*
2207 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002208fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002209rm -f conftest*
2210LIBS="$ac_save_LIBS"
2211
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002212fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002213if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2214 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002215 LIBS="$LIBS -lx"
Michael W. Hudson54241132001-12-07 15:38:26 +00002216else
2217 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002218fi
2219
2220fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002221
Michael W. Hudson54241132001-12-07 15:38:26 +00002222
Guido van Rossum627b2d71993-12-24 10:39:16 +00002223# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002224was_it_defined=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002225echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002226echo "configure:2227: checking for clock_t in time.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002227cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002228#line 2229 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002229#include "confdefs.h"
2230#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002231EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002232if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2233 egrep "clock_t" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002234 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00002235 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002236else
Michael W. Hudson54241132001-12-07 15:38:26 +00002237 rm -rf conftest*
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002238
2239 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002240#define clock_t long
2241EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002242
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002243
Guido van Rossum627b2d71993-12-24 10:39:16 +00002244fi
2245rm -f conftest*
2246
Michael W. Hudson54241132001-12-07 15:38:26 +00002247echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002248
Guido van Rossum810cc512001-09-09 23:51:39 +00002249# Two defines needed to enable largefile support on various platforms
2250# These may affect some typedefs
Michael W. Hudson54241132001-12-07 15:38:26 +00002251cat >> confdefs.h <<\EOF
Guido van Rossum810cc512001-09-09 23:51:39 +00002252#define _LARGEFILE_SOURCE 1
2253EOF
2254
Michael W. Hudson54241132001-12-07 15:38:26 +00002255cat >> confdefs.h <<\EOF
Guido van Rossum810cc512001-09-09 23:51:39 +00002256#define _FILE_OFFSET_BITS 64
2257EOF
2258
Michael W. Hudson54241132001-12-07 15:38:26 +00002259
Guido van Rossum84e7b241996-08-19 21:59:00 +00002260# Add some code to confdefs.h so that the test for off_t works on SCO
2261cat >> confdefs.h <<\EOF
2262#if defined(SCO_DS)
2263#undef _OFF_T
2264#endif
2265EOF
2266
Guido van Rossumef2255b2000-03-10 22:30:29 +00002267# Type availability checks
Michael W. Hudson54241132001-12-07 15:38:26 +00002268echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002269echo "configure:2270: checking for mode_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002270if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2271 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002272else
Michael W. Hudson54241132001-12-07 15:38:26 +00002273 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002274#line 2275 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002275#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002276#include <sys/types.h>
2277#if STDC_HEADERS
2278#include <stdlib.h>
2279#include <stddef.h>
2280#endif
Jack Jansendd19cf82001-12-06 22:36:17 +00002281EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002282if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2283 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2284 rm -rf conftest*
Jack Jansendd19cf82001-12-06 22:36:17 +00002285 ac_cv_type_mode_t=yes
2286else
Michael W. Hudson54241132001-12-07 15:38:26 +00002287 rm -rf conftest*
2288 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00002289fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002290rm -f conftest*
Jack Jansendd19cf82001-12-06 22:36:17 +00002291
Michael W. Hudson54241132001-12-07 15:38:26 +00002292fi
2293echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2294if test $ac_cv_type_mode_t = no; then
2295 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002296#define mode_t int
2297EOF
2298
2299fi
2300
Michael W. Hudson54241132001-12-07 15:38:26 +00002301echo $ac_n "checking for off_t""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002302echo "configure:2303: checking for off_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002303if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2304 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002305else
Michael W. Hudson54241132001-12-07 15:38:26 +00002306 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002307#line 2308 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002308#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002309#include <sys/types.h>
2310#if STDC_HEADERS
2311#include <stdlib.h>
2312#include <stddef.h>
2313#endif
2314EOF
2315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2316 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2317 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002318 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002319else
Michael W. Hudson54241132001-12-07 15:38:26 +00002320 rm -rf conftest*
2321 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002322fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002323rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002324
Michael W. Hudson54241132001-12-07 15:38:26 +00002325fi
2326echo "$ac_t""$ac_cv_type_off_t" 1>&6
2327if test $ac_cv_type_off_t = no; then
2328 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002329#define off_t long
2330EOF
2331
2332fi
2333
Michael W. Hudson54241132001-12-07 15:38:26 +00002334echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002335echo "configure:2336: checking for pid_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002336if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2337 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002338else
Michael W. Hudson54241132001-12-07 15:38:26 +00002339 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002340#line 2341 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002341#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002342#include <sys/types.h>
2343#if STDC_HEADERS
2344#include <stdlib.h>
2345#include <stddef.h>
2346#endif
2347EOF
2348if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2349 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2350 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002351 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002352else
Michael W. Hudson54241132001-12-07 15:38:26 +00002353 rm -rf conftest*
2354 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002355fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002356rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002357
Michael W. Hudson54241132001-12-07 15:38:26 +00002358fi
2359echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2360if test $ac_cv_type_pid_t = no; then
2361 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002362#define pid_t int
2363EOF
2364
2365fi
2366
Michael W. Hudson54241132001-12-07 15:38:26 +00002367echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002368echo "configure:2369: checking return type of signal handlers" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002369if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2370 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002371else
Michael W. Hudson54241132001-12-07 15:38:26 +00002372 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002373#line 2374 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002374#include "confdefs.h"
2375#include <sys/types.h>
2376#include <signal.h>
2377#ifdef signal
Michael W. Hudson54241132001-12-07 15:38:26 +00002378#undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00002379#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002380#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002381extern "C" void (*signal (int, void (*)(int)))(int);
2382#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002383void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002384#endif
2385
Michael W. Hudson54241132001-12-07 15:38:26 +00002386int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002387int i;
Michael W. Hudson54241132001-12-07 15:38:26 +00002388; return 0; }
2389EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002390if { (eval echo configure:2391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002391 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002392 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002393else
Michael W. Hudson54241132001-12-07 15:38:26 +00002394 echo "configure: failed program was:" >&5
2395 cat conftest.$ac_ext >&5
2396 rm -rf conftest*
2397 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002398fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002399rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002400fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002401
Michael W. Hudson54241132001-12-07 15:38:26 +00002402echo "$ac_t""$ac_cv_type_signal" 1>&6
2403cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002404#define RETSIGTYPE $ac_cv_type_signal
2405EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002406
Michael W. Hudson54241132001-12-07 15:38:26 +00002407
2408echo $ac_n "checking for size_t""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002409echo "configure:2410: checking for size_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002410if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2411 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002412else
Michael W. Hudson54241132001-12-07 15:38:26 +00002413 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002414#line 2415 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002415#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002416#include <sys/types.h>
2417#if STDC_HEADERS
2418#include <stdlib.h>
2419#include <stddef.h>
2420#endif
2421EOF
2422if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2423 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2424 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002425 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002426else
Michael W. Hudson54241132001-12-07 15:38:26 +00002427 rm -rf conftest*
2428 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002429fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002430rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002431
Michael W. Hudson54241132001-12-07 15:38:26 +00002432fi
2433echo "$ac_t""$ac_cv_type_size_t" 1>&6
2434if test $ac_cv_type_size_t = no; then
2435 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002436#define size_t unsigned
2437EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002438
2439fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002440
Michael W. Hudson54241132001-12-07 15:38:26 +00002441echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002442echo "configure:2443: checking for uid_t in sys/types.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002443if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2444 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002445else
Michael W. Hudson54241132001-12-07 15:38:26 +00002446 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002447#line 2448 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002448#include "confdefs.h"
2449#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002450EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2452 egrep "uid_t" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002453 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002454 ac_cv_type_uid_t=yes
2455else
Michael W. Hudson54241132001-12-07 15:38:26 +00002456 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002457 ac_cv_type_uid_t=no
2458fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002459rm -f conftest*
2460
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002461fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002462
Michael W. Hudson54241132001-12-07 15:38:26 +00002463echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2464if test $ac_cv_type_uid_t = no; then
2465 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002466#define uid_t int
2467EOF
2468
Michael W. Hudson54241132001-12-07 15:38:26 +00002469 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002470#define gid_t int
2471EOF
2472
2473fi
2474
Jack Jansendd19cf82001-12-06 22:36:17 +00002475
Michael W. Hudson54241132001-12-07 15:38:26 +00002476# Sizes of various common basic types
2477echo $ac_n "checking size of int""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002478echo "configure:2479: checking size of int" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002479if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2480 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002481else
2482 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002483 ac_cv_sizeof_int=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002484else
Michael W. Hudson54241132001-12-07 15:38:26 +00002485 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002486#line 2487 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002487#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002488#include <stdio.h>
2489main()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002490{
Michael W. Hudson54241132001-12-07 15:38:26 +00002491 FILE *f=fopen("conftestval", "w");
2492 if (!f) exit(1);
2493 fprintf(f, "%d\n", sizeof(int));
2494 exit(0);
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002495}
Michael W. Hudson54241132001-12-07 15:38:26 +00002496EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002497if { (eval echo configure:2498: \"$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 +00002498then
2499 ac_cv_sizeof_int=`cat conftestval`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002500else
Michael W. Hudson54241132001-12-07 15:38:26 +00002501 echo "configure: failed program was:" >&5
2502 cat conftest.$ac_ext >&5
2503 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002504 ac_cv_sizeof_int=0
2505fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002506rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002507fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002508
2509fi
2510echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2511cat >> confdefs.h <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002512#define SIZEOF_INT $ac_cv_sizeof_int
2513EOF
2514
2515
Michael W. Hudson54241132001-12-07 15:38:26 +00002516echo $ac_n "checking size of long""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002517echo "configure:2518: checking size of long" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002518if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2519 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002520else
2521 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002522 ac_cv_sizeof_long=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002523else
Michael W. Hudson54241132001-12-07 15:38:26 +00002524 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002525#line 2526 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002526#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002527#include <stdio.h>
2528main()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002529{
Michael W. Hudson54241132001-12-07 15:38:26 +00002530 FILE *f=fopen("conftestval", "w");
2531 if (!f) exit(1);
2532 fprintf(f, "%d\n", sizeof(long));
2533 exit(0);
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002534}
Michael W. Hudson54241132001-12-07 15:38:26 +00002535EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002536if { (eval echo configure:2537: \"$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 +00002537then
2538 ac_cv_sizeof_long=`cat conftestval`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002539else
Michael W. Hudson54241132001-12-07 15:38:26 +00002540 echo "configure: failed program was:" >&5
2541 cat conftest.$ac_ext >&5
2542 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002543 ac_cv_sizeof_long=0
2544fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002545rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002546fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002547
2548fi
2549echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2550cat >> confdefs.h <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002551#define SIZEOF_LONG $ac_cv_sizeof_long
2552EOF
2553
2554
Michael W. Hudson54241132001-12-07 15:38:26 +00002555echo $ac_n "checking size of void *""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002556echo "configure:2557: checking size of void *" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002557if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
2558 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002559else
2560 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002561 ac_cv_sizeof_void_p=4
Guido van Rossumad678af1998-10-02 14:42:15 +00002562else
Michael W. Hudson54241132001-12-07 15:38:26 +00002563 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002564#line 2565 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002565#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002566#include <stdio.h>
2567main()
Guido van Rossumad678af1998-10-02 14:42:15 +00002568{
Michael W. Hudson54241132001-12-07 15:38:26 +00002569 FILE *f=fopen("conftestval", "w");
2570 if (!f) exit(1);
2571 fprintf(f, "%d\n", sizeof(void *));
2572 exit(0);
Guido van Rossumad678af1998-10-02 14:42:15 +00002573}
Michael W. Hudson54241132001-12-07 15:38:26 +00002574EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002575if { (eval echo configure:2576: \"$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 +00002576then
2577 ac_cv_sizeof_void_p=`cat conftestval`
Guido van Rossumad678af1998-10-02 14:42:15 +00002578else
Michael W. Hudson54241132001-12-07 15:38:26 +00002579 echo "configure: failed program was:" >&5
2580 cat conftest.$ac_ext >&5
2581 rm -fr conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00002582 ac_cv_sizeof_void_p=0
2583fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002584rm -fr conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00002585fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002586
2587fi
2588echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2589cat >> confdefs.h <<EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00002590#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2591EOF
2592
2593
Michael W. Hudson54241132001-12-07 15:38:26 +00002594echo $ac_n "checking size of char""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002595echo "configure:2596: checking size of char" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002596if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2597 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002598else
2599 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002600 ac_cv_sizeof_char=1
Guido van Rossumef2255b2000-03-10 22:30:29 +00002601else
Michael W. Hudson54241132001-12-07 15:38:26 +00002602 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002603#line 2604 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002604#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002605#include <stdio.h>
2606main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002607{
Michael W. Hudson54241132001-12-07 15:38:26 +00002608 FILE *f=fopen("conftestval", "w");
2609 if (!f) exit(1);
2610 fprintf(f, "%d\n", sizeof(char));
2611 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002612}
Michael W. Hudson54241132001-12-07 15:38:26 +00002613EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002614if { (eval echo configure:2615: \"$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 +00002615then
2616 ac_cv_sizeof_char=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002617else
Michael W. Hudson54241132001-12-07 15:38:26 +00002618 echo "configure: failed program was:" >&5
2619 cat conftest.$ac_ext >&5
2620 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002621 ac_cv_sizeof_char=0
2622fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002623rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002624fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002625
2626fi
2627echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2628cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002629#define SIZEOF_CHAR $ac_cv_sizeof_char
2630EOF
2631
2632
Michael W. Hudson54241132001-12-07 15:38:26 +00002633echo $ac_n "checking size of short""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002634echo "configure:2635: checking size of short" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002635if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2636 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002637else
2638 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002639 ac_cv_sizeof_short=2
Guido van Rossumef2255b2000-03-10 22:30:29 +00002640else
Michael W. Hudson54241132001-12-07 15:38:26 +00002641 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002642#line 2643 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002643#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002644#include <stdio.h>
2645main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002646{
Michael W. Hudson54241132001-12-07 15:38:26 +00002647 FILE *f=fopen("conftestval", "w");
2648 if (!f) exit(1);
2649 fprintf(f, "%d\n", sizeof(short));
2650 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002651}
Michael W. Hudson54241132001-12-07 15:38:26 +00002652EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002653if { (eval echo configure:2654: \"$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 +00002654then
2655 ac_cv_sizeof_short=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002656else
Michael W. Hudson54241132001-12-07 15:38:26 +00002657 echo "configure: failed program was:" >&5
2658 cat conftest.$ac_ext >&5
2659 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002660 ac_cv_sizeof_short=0
2661fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002662rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002663fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002664
2665fi
2666echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2667cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002668#define SIZEOF_SHORT $ac_cv_sizeof_short
2669EOF
2670
2671
Michael W. Hudson54241132001-12-07 15:38:26 +00002672echo $ac_n "checking size of float""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002673echo "configure:2674: checking size of float" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002674if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
2675 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002676else
2677 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002678 ac_cv_sizeof_float=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00002679else
Michael W. Hudson54241132001-12-07 15:38:26 +00002680 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002681#line 2682 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002682#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002683#include <stdio.h>
2684main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002685{
Michael W. Hudson54241132001-12-07 15:38:26 +00002686 FILE *f=fopen("conftestval", "w");
2687 if (!f) exit(1);
2688 fprintf(f, "%d\n", sizeof(float));
2689 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002690}
Michael W. Hudson54241132001-12-07 15:38:26 +00002691EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002692if { (eval echo configure:2693: \"$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 +00002693then
2694 ac_cv_sizeof_float=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002695else
Michael W. Hudson54241132001-12-07 15:38:26 +00002696 echo "configure: failed program was:" >&5
2697 cat conftest.$ac_ext >&5
2698 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002699 ac_cv_sizeof_float=0
2700fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002701rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002702fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002703
2704fi
2705echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2706cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002707#define SIZEOF_FLOAT $ac_cv_sizeof_float
2708EOF
2709
2710
Michael W. Hudson54241132001-12-07 15:38:26 +00002711echo $ac_n "checking size of double""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002712echo "configure:2713: checking size of double" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002713if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
2714 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002715else
2716 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002717 ac_cv_sizeof_double=8
Guido van Rossumef2255b2000-03-10 22:30:29 +00002718else
Michael W. Hudson54241132001-12-07 15:38:26 +00002719 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002720#line 2721 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002721#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002722#include <stdio.h>
2723main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002724{
Michael W. Hudson54241132001-12-07 15:38:26 +00002725 FILE *f=fopen("conftestval", "w");
2726 if (!f) exit(1);
2727 fprintf(f, "%d\n", sizeof(double));
2728 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002729}
Michael W. Hudson54241132001-12-07 15:38:26 +00002730EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002731if { (eval echo configure:2732: \"$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 +00002732then
2733 ac_cv_sizeof_double=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002734else
Michael W. Hudson54241132001-12-07 15:38:26 +00002735 echo "configure: failed program was:" >&5
2736 cat conftest.$ac_ext >&5
2737 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002738 ac_cv_sizeof_double=0
2739fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002740rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002741fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002742
2743fi
2744echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2745cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002746#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2747EOF
2748
2749
Michael W. Hudson54241132001-12-07 15:38:26 +00002750echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002751echo "configure:2752: checking size of fpos_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002752if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
2753 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002754else
2755 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002756 ac_cv_sizeof_fpos_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002757else
Michael W. Hudson54241132001-12-07 15:38:26 +00002758 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002759#line 2760 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002760#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002761#include <stdio.h>
2762main()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002763{
Michael W. Hudson54241132001-12-07 15:38:26 +00002764 FILE *f=fopen("conftestval", "w");
2765 if (!f) exit(1);
2766 fprintf(f, "%d\n", sizeof(fpos_t));
2767 exit(0);
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002768}
Michael W. Hudson54241132001-12-07 15:38:26 +00002769EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002770if { (eval echo configure:2771: \"$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 +00002771then
2772 ac_cv_sizeof_fpos_t=`cat conftestval`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002773else
Michael W. Hudson54241132001-12-07 15:38:26 +00002774 echo "configure: failed program was:" >&5
2775 cat conftest.$ac_ext >&5
2776 rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002777 ac_cv_sizeof_fpos_t=0
2778fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002779rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002780fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002781
2782fi
2783echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2784cat >> confdefs.h <<EOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002785#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2786EOF
2787
Michael W. Hudson54241132001-12-07 15:38:26 +00002788
2789
2790echo $ac_n "checking for long long support""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002791echo "configure:2792: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002792have_long_long=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002793cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002794#line 2795 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002795#include "confdefs.h"
2796
Michael W. Hudson54241132001-12-07 15:38:26 +00002797int main() {
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002798long long x; x = (long long)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002799; return 0; }
2800EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002801if { (eval echo configure:2802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002802 rm -rf conftest*
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002803
Michael W. Hudson54241132001-12-07 15:38:26 +00002804 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002805#define HAVE_LONG_LONG 1
2806EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002807
2808 have_long_long=yes
2809
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002810else
Michael W. Hudson54241132001-12-07 15:38:26 +00002811 echo "configure: failed program was:" >&5
2812 cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002813fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002814rm -f conftest*
2815echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002816if test "$have_long_long" = yes ; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002817echo $ac_n "checking size of long long""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002818echo "configure:2819: checking size of long long" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002819if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2820 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002821else
2822 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002823 ac_cv_sizeof_long_long=8
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002824else
Michael W. Hudson54241132001-12-07 15:38:26 +00002825 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002826#line 2827 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002827#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002828#include <stdio.h>
2829main()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002830{
Michael W. Hudson54241132001-12-07 15:38:26 +00002831 FILE *f=fopen("conftestval", "w");
2832 if (!f) exit(1);
2833 fprintf(f, "%d\n", sizeof(long long));
2834 exit(0);
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002835}
Michael W. Hudson54241132001-12-07 15:38:26 +00002836EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002837if { (eval echo configure:2838: \"$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 +00002838then
2839 ac_cv_sizeof_long_long=`cat conftestval`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002840else
Michael W. Hudson54241132001-12-07 15:38:26 +00002841 echo "configure: failed program was:" >&5
2842 cat conftest.$ac_ext >&5
2843 rm -fr conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002844 ac_cv_sizeof_long_long=0
2845fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002846rm -fr conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002847fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002848
2849fi
2850echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2851cat >> confdefs.h <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002852#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2853EOF
2854
Michael W. Hudson54241132001-12-07 15:38:26 +00002855
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002856fi
2857
Michael W. Hudson54241132001-12-07 15:38:26 +00002858echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002859echo "configure:2860: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002860have_uintptr_t=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002861cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002862#line 2863 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002863#include "confdefs.h"
2864
Michael W. Hudson54241132001-12-07 15:38:26 +00002865int main() {
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002866uintptr_t x; x = (uintptr_t)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002867; return 0; }
2868EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002869if { (eval echo configure:2870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002870 rm -rf conftest*
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002871
Michael W. Hudson54241132001-12-07 15:38:26 +00002872 cat >> confdefs.h <<\EOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002873#define HAVE_UINTPTR_T 1
2874EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002875
2876 have_uintptr_t=yes
2877
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002878else
Michael W. Hudson54241132001-12-07 15:38:26 +00002879 echo "configure: failed program was:" >&5
2880 cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002881fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002882rm -f conftest*
2883echo "$ac_t""$have_uintptr_t" 1>&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002884if test "$have_uintptr_t" = yes ; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002885echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002886echo "configure:2887: checking size of uintptr_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002887if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
2888 echo $ac_n "(cached) $ac_c" 1>&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002889else
2890 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002891 ac_cv_sizeof_uintptr_t=4
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002892else
Michael W. Hudson54241132001-12-07 15:38:26 +00002893 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002894#line 2895 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002895#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002896#include <stdio.h>
2897main()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002898{
Michael W. Hudson54241132001-12-07 15:38:26 +00002899 FILE *f=fopen("conftestval", "w");
2900 if (!f) exit(1);
2901 fprintf(f, "%d\n", sizeof(uintptr_t));
2902 exit(0);
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002903}
Michael W. Hudson54241132001-12-07 15:38:26 +00002904EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002905if { (eval echo configure:2906: \"$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 +00002906then
2907 ac_cv_sizeof_uintptr_t=`cat conftestval`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002908else
Michael W. Hudson54241132001-12-07 15:38:26 +00002909 echo "configure: failed program was:" >&5
2910 cat conftest.$ac_ext >&5
2911 rm -fr conftest*
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002912 ac_cv_sizeof_uintptr_t=0
2913fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002914rm -fr conftest*
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002915fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002916
2917fi
2918echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2919cat >> confdefs.h <<EOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002920#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2921EOF
2922
Michael W. Hudson54241132001-12-07 15:38:26 +00002923
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002924fi
2925
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002926# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002927echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002928echo "configure:2929: checking size of off_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002929if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
2930 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002931else
2932 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002933 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002934else
Michael W. Hudson54241132001-12-07 15:38:26 +00002935 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002936#line 2937 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002937#include "confdefs.h"
2938#include <stdio.h>
2939#include <sys/types.h>
2940main()
2941{
2942 FILE *f=fopen("conftestval", "w");
2943 if (!f) exit(1);
2944 fprintf(f, "%d\n", sizeof(off_t));
2945 exit(0);
2946}
Michael W. Hudson54241132001-12-07 15:38:26 +00002947EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002948if { (eval echo configure:2949: \"$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 +00002949then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002950 ac_cv_sizeof_off_t=`cat conftestval`
2951else
Michael W. Hudson54241132001-12-07 15:38:26 +00002952 echo "configure: failed program was:" >&5
2953 cat conftest.$ac_ext >&5
2954 rm -fr conftest*
2955 ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002956fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002957rm -fr conftest*
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002958fi
2959
Michael W. Hudson54241132001-12-07 15:38:26 +00002960
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002961fi
2962
Michael W. Hudson54241132001-12-07 15:38:26 +00002963echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2964cat >> confdefs.h <<EOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002965#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2966EOF
2967
Michael W. Hudson54241132001-12-07 15:38:26 +00002968
2969echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002970echo "configure:2971: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002971if test "$have_long_long" = yes -a \
2972 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2973 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002974 cat >> confdefs.h <<\EOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002975#define HAVE_LARGEFILE_SUPPORT 1
2976EOF
2977
Michael W. Hudson54241132001-12-07 15:38:26 +00002978 echo "$ac_t""yes" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002979else
Michael W. Hudson54241132001-12-07 15:38:26 +00002980 echo "$ac_t""no" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002981fi
2982
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002983# AC_CHECK_SIZEOF() doesn't include <time.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002984echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002985echo "configure:2986: checking size of time_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002986if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
2987 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002988else
2989 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002990 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002991else
Michael W. Hudson54241132001-12-07 15:38:26 +00002992 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00002993#line 2994 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002994#include "confdefs.h"
2995#include <stdio.h>
2996#include <time.h>
2997main()
2998{
2999 FILE *f=fopen("conftestval", "w");
3000 if (!f) exit(1);
3001 fprintf(f, "%d\n", sizeof(time_t));
3002 exit(0);
3003}
Michael W. Hudson54241132001-12-07 15:38:26 +00003004EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003005if { (eval echo configure:3006: \"$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 +00003006then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003007 ac_cv_sizeof_time_t=`cat conftestval`
3008else
Michael W. Hudson54241132001-12-07 15:38:26 +00003009 echo "configure: failed program was:" >&5
3010 cat conftest.$ac_ext >&5
3011 rm -fr conftest*
3012 ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003013fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003014rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003015fi
3016
Michael W. Hudson54241132001-12-07 15:38:26 +00003017
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003018fi
3019
Michael W. Hudson54241132001-12-07 15:38:26 +00003020echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
3021cat >> confdefs.h <<EOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003022#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
3023EOF
3024
Michael W. Hudson54241132001-12-07 15:38:26 +00003025
3026
Trent Mick635f6fb2000-08-23 21:33:05 +00003027# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003028ac_save_cc="$CC"
3029if test "$ac_cv_kpthread" = "yes"
3030then CC="$CC -Kpthread"
3031fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003032echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003033echo "configure:3034: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00003034have_pthread_t=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003035cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003036#line 3037 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00003037#include "confdefs.h"
3038#include <pthread.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00003039int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00003040pthread_t x; x = *(pthread_t*)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00003041; return 0; }
3042EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003043if { (eval echo configure:3044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003044 rm -rf conftest*
Trent Mick635f6fb2000-08-23 21:33:05 +00003045 have_pthread_t=yes
3046else
Michael W. Hudson54241132001-12-07 15:38:26 +00003047 echo "configure: failed program was:" >&5
3048 cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00003049fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003050rm -f conftest*
3051echo "$ac_t""$have_pthread_t" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003052if test "$have_pthread_t" = yes ; then
3053 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00003054 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003055echo "configure:3056: checking size of pthread_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003056 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
3057 echo $ac_n "(cached) $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003058else
3059 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003060 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00003061else
Michael W. Hudson54241132001-12-07 15:38:26 +00003062 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003063#line 3064 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00003064#include "confdefs.h"
3065#include <stdio.h>
3066 #include <pthread.h>
3067 main()
3068 {
3069 FILE *f=fopen("conftestval", "w");
3070 if (!f) exit(1);
3071 fprintf(f, "%d\n", sizeof(pthread_t));
3072 exit(0);
3073 }
Michael W. Hudson54241132001-12-07 15:38:26 +00003074EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003075if { (eval echo configure:3076: \"$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 +00003076then
Trent Mick635f6fb2000-08-23 21:33:05 +00003077 ac_cv_sizeof_pthread_t=`cat conftestval`
3078else
Michael W. Hudson54241132001-12-07 15:38:26 +00003079 echo "configure: failed program was:" >&5
3080 cat conftest.$ac_ext >&5
3081 rm -fr conftest*
3082 ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00003083fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003084rm -fr conftest*
Trent Mick635f6fb2000-08-23 21:33:05 +00003085fi
3086
Michael W. Hudson54241132001-12-07 15:38:26 +00003087
Trent Mick635f6fb2000-08-23 21:33:05 +00003088fi
3089
Michael W. Hudson54241132001-12-07 15:38:26 +00003090 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
3091 cat >> confdefs.h <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003092#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
3093EOF
3094
3095fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003096CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00003097
Michael W. Hudson54241132001-12-07 15:38:26 +00003098echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003099echo "configure:3100: checking for --enable-toolbox-glue" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003100# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
3101if test "${enable_toolbox_glue+set}" = set; then
3102 enableval="$enable_toolbox_glue"
Michael W. Hudson54241132001-12-07 15:38:26 +00003103 :
3104fi
Jack Jansene578a632001-08-15 01:27:14 +00003105
3106
3107if test -z "$enable_toolbox_glue"
Michael W. Hudson54241132001-12-07 15:38:26 +00003108then
Jack Jansene578a632001-08-15 01:27:14 +00003109 case $ac_sys_system/$ac_sys_release in
3110 Darwin/*)
3111 enable_toolbox_glue="yes";;
3112 *)
3113 enable_toolbox_glue="no";;
3114 esac
3115fi
3116case "$enable_toolbox_glue" in
3117yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00003118 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00003119 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00003120 extra_undefs="-u __dummy -u _PyMac_Error"
Michael W. Hudson54241132001-12-07 15:38:26 +00003121 cat >> confdefs.h <<\EOF
Jack Jansene578a632001-08-15 01:27:14 +00003122#define USE_TOOLBOX_OBJECT_GLUE 1
3123EOF
3124
3125 ;;
3126*)
3127 extra_frameworks=""
3128 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00003129 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00003130 ;;
3131esac
Michael W. Hudson54241132001-12-07 15:38:26 +00003132echo "$ac_t""$enable_toolbox_glue" 1>&6
3133
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003134
3135case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003136 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003137 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003138 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
3139 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00003140 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3141 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00003142 Darwin/*)
3143 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003144 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
3145 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00003146 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3147 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003148esac
3149
Michael W. Hudson54241132001-12-07 15:38:26 +00003150echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003151echo "configure:3152: checking for --enable-framework" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003152if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003153then
Jack Jansenca06bc62001-08-03 15:32:23 +00003154 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003155 # -U __environ is needed since bundles don't have access
3156 # to crt0 when built but will always be linked against it
Michael W. Hudson54241132001-12-07 15:38:26 +00003157 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00003158 # in the build location.
Michael W. Hudson54241132001-12-07 15:38:26 +00003159
Jack Jansena3891ea2001-09-07 14:25:12 +00003160 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003161 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
3162 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00003163 esac
Michael W. Hudson54241132001-12-07 15:38:26 +00003164 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003165#define WITH_NEXT_FRAMEWORK 1
3166EOF
3167
Michael W. Hudson54241132001-12-07 15:38:26 +00003168 echo "$ac_t""yes" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003169else
Michael W. Hudson54241132001-12-07 15:38:26 +00003170 echo "$ac_t""no" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003171fi
3172
Michael W. Hudson54241132001-12-07 15:38:26 +00003173echo $ac_n "checking for dyld""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003174echo "configure:3175: checking for dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003175case $ac_sys_system/$ac_sys_release in
3176 Darwin/*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003177 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003178#define WITH_DYLD 1
3179EOF
3180
Michael W. Hudson54241132001-12-07 15:38:26 +00003181 echo "$ac_t""always on for Darwin" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003182 ;;
3183 *)
Michael W. Hudson54241132001-12-07 15:38:26 +00003184 echo "$ac_t""no" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00003185 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003186esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003187
Guido van Rossum0a516c91994-09-12 10:58:40 +00003188# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003189
Michael W. Hudson54241132001-12-07 15:38:26 +00003190
3191
3192
3193
Guido van Rossum0a516c91994-09-12 10:58:40 +00003194# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003195# -- usually .so, .sl on HP-UX, .dll on Cygwin
Michael W. Hudson54241132001-12-07 15:38:26 +00003196echo $ac_n "checking SO""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003197echo "configure:3198: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003198if test -z "$SO"
3199then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003200 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003201 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003202 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003203 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003204 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003205fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003206echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003207# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003208# -- "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 +00003209# (Shared libraries in this instance are shared modules to be loaded into
3210# Python, as opposed to building Python itself as a shared library.)
Michael W. Hudson54241132001-12-07 15:38:26 +00003211echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003212echo "configure:3213: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003213if test -z "$LDSHARED"
3214then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003215 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003216 AIX*)
3217 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00003218 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003219 ;;
3220 BeOS*)
3221 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00003222 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003223 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003224 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003225 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003226 SunOS/4*) LDSHARED="ld";;
Michael W. Hudson54241132001-12-07 15:38:26 +00003227 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00003228 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003229 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003230 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00003231 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003232 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003233 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3234 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00003235 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003236 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3237 if test "$enable_framework" ; then
3238 # Link against the framework. All externals should be defined.
3239 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3240 else
3241 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00003242 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00003243 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00003244 Darwin/*)
3245 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3246 if test "$enable_framework" ; then
3247 # Link against the framework. All externals should be defined.
3248 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3249 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00003250 # No framework, use the Python app as bundle-loader
3251 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
3252 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003253 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003254 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003255 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003256 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003257 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003258 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003259 then
3260 LDSHARED="cc -shared ${LDFLAGS}"
3261 else
3262 LDSHARED="ld -Bshareable ${LDFLAGS}"
3263 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003264 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003265 if test "$GCC" = "yes"
3266 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003267 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003268 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003269 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003270 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003271 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003272 *) LDSHARED="ld";;
3273 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003274fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003275echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003276BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003277# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003278# library (module) -- this is only needed for a few systems
Michael W. Hudson54241132001-12-07 15:38:26 +00003279echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003280echo "configure:3281: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003281if test -z "$CCSHARED"
3282then
Guido van Rossum07397971997-04-29 21:49:50 +00003283 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003284 SunOS*) if test "$GCC" = yes;
3285 then CCSHARED="-fPIC";
3286 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003287 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00003288 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00003289 else CCSHARED="+z";
3290 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003291 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003292 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003293 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003294 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003295 if test "$GCC" = "yes"
3296 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003297 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003298 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003299 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003300 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003301 IRIX*/6*) case $CC in
3302 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003303 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003304 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003305 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003306 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003307fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003308echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003309# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003310# the python executable -- this is only needed for a few systems
Michael W. Hudson54241132001-12-07 15:38:26 +00003311echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003312echo "configure:3313: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003313if test -z "$LINKFORSHARED"
3314then
Guido van Rossum07397971997-04-29 21:49:50 +00003315 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003316 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003317 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003318 LINKFORSHARED="-Wl,-E -Wl,+s";;
3319# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003320 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003321 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003322 # -u libsys_s pulls in all symbols in libsys
Michael W. Hudson54241132001-12-07 15:38:26 +00003323 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00003324 # -u __dummy makes the linker aware of the objc runtime
3325 # in System.framework; otherwise, __objcInit (referenced in
3326 # crt1.o) gets erroneously defined as common, which breaks dynamic
3327 # loading of any modules which reference it in System.framework.
3328 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3329 # not used by the core itself but which needs to be in the core so
3330 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00003331 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00003332 if test "$enable_framework"
3333 then
3334 LINKFORSHARED="$LINKFORSHARED -framework Python"
3335 fi
3336 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003337 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003338 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003339 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Michael W. Hudson54241132001-12-07 15:38:26 +00003340 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003341 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3342 then
3343 LINKFORSHARED="-Wl,--export-dynamic"
3344 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003345 SunOS/5*) case $CC in
3346 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003347 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003348 then
3349 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003350 fi;;
3351 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003352 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003353fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003354echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003355
Michael W. Hudson54241132001-12-07 15:38:26 +00003356
3357echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003358echo "configure:3359: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003359if test ! "$LIBRARY" = "$LDLIBRARY"
3360then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003361 case $ac_sys_system in
3362 CYGWIN*)
3363 # Cygwin needs CCSHARED when building extension DLLs
3364 # but not when building the interpreter DLL.
3365 CFLAGSFORSHARED='';;
3366 *)
3367 CFLAGSFORSHARED='$(CCSHARED)'
3368 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003369fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003370echo "$ac_t""$CFLAGSFORSHARED" 1>&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003371
Guido van Rossum627b2d71993-12-24 10:39:16 +00003372# checks for libraries
Michael W. Hudson54241132001-12-07 15:38:26 +00003373echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003374echo "configure:3375: checking for dlopen in -ldl" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003375ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3376if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3377 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003378else
Michael W. Hudson54241132001-12-07 15:38:26 +00003379 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003380LIBS="-ldl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003381cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003382#line 3383 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003383#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003384/* Override any gcc2 internal prototype to avoid an error. */
3385/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003386 builtin and then its argument prototype would still apply. */
3387char dlopen();
3388
3389int main() {
3390dlopen()
3391; return 0; }
3392EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003393if { (eval echo configure:3394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003394 rm -rf conftest*
3395 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003396else
Michael W. Hudson54241132001-12-07 15:38:26 +00003397 echo "configure: failed program was:" >&5
3398 cat conftest.$ac_ext >&5
3399 rm -rf conftest*
3400 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003401fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003402rm -f conftest*
3403LIBS="$ac_save_LIBS"
3404
Guido van Rossum627b2d71993-12-24 10:39:16 +00003405fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003406if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3407 echo "$ac_t""yes" 1>&6
3408 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3409 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3410 cat >> confdefs.h <<EOF
3411#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003412EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003413
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003414 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003415
Michael W. Hudson54241132001-12-07 15:38:26 +00003416else
3417 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003418fi
3419 # Dynamic linking for SunOS/Solaris and SYSV
Michael W. Hudson54241132001-12-07 15:38:26 +00003420echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003421echo "configure:3422: checking for shl_load in -ldld" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003422ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
3423if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3424 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003425else
Michael W. Hudson54241132001-12-07 15:38:26 +00003426 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003427LIBS="-ldld $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003428cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003429#line 3430 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003430#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003431/* Override any gcc2 internal prototype to avoid an error. */
3432/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003433 builtin and then its argument prototype would still apply. */
3434char shl_load();
3435
3436int main() {
3437shl_load()
3438; return 0; }
3439EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003440if { (eval echo configure:3441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003441 rm -rf conftest*
3442 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003443else
Michael W. Hudson54241132001-12-07 15:38:26 +00003444 echo "configure: failed program was:" >&5
3445 cat conftest.$ac_ext >&5
3446 rm -rf conftest*
3447 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003448fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003449rm -f conftest*
3450LIBS="$ac_save_LIBS"
3451
Guido van Rossum627b2d71993-12-24 10:39:16 +00003452fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003453if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3454 echo "$ac_t""yes" 1>&6
3455 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3456 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3457 cat >> confdefs.h <<EOF
3458#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003459EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003460
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003461 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003462
Michael W. Hudson54241132001-12-07 15:38:26 +00003463else
3464 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003465fi
3466 # Dynamic linking for HP-UX
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003467echo $ac_n "checking for sem_init in -lrt""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003468echo "configure:3469: checking for sem_init in -lrt" >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003469ac_lib_var=`echo rt'_'sem_init | sed 'y%./+-%__p_%'`
3470if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3471 echo $ac_n "(cached) $ac_c" 1>&6
3472else
3473 ac_save_LIBS="$LIBS"
3474LIBS="-lrt $LIBS"
3475cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003476#line 3477 "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003477#include "confdefs.h"
3478/* Override any gcc2 internal prototype to avoid an error. */
3479/* We use char because int might match the return type of a gcc2
3480 builtin and then its argument prototype would still apply. */
3481char sem_init();
3482
3483int main() {
3484sem_init()
3485; return 0; }
3486EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003487if { (eval echo configure:3488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003488 rm -rf conftest*
3489 eval "ac_cv_lib_$ac_lib_var=yes"
3490else
3491 echo "configure: failed program was:" >&5
3492 cat conftest.$ac_ext >&5
3493 rm -rf conftest*
3494 eval "ac_cv_lib_$ac_lib_var=no"
3495fi
3496rm -f conftest*
3497LIBS="$ac_save_LIBS"
3498
3499fi
3500if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3501 echo "$ac_t""yes" 1>&6
3502 ac_tr_lib=HAVE_LIB`echo rt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3503 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3504 cat >> confdefs.h <<EOF
3505#define $ac_tr_lib 1
3506EOF
3507
3508 LIBS="-lrt $LIBS"
3509
3510else
3511 echo "$ac_t""no" 1>&6
3512fi
3513 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003514
3515# checks for system dependent C++ extensions support
3516case "$ac_sys_system" in
Michael W. Hudson54241132001-12-07 15:38:26 +00003517 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003518echo "configure:3519: checking for genuine AIX C++ extensions support" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003519 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003520#line 3521 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003521#include "confdefs.h"
3522#include "/usr/lpp/xlC/include/load.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00003523int main() {
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003524loadAndInit("", 0, "")
Michael W. Hudson54241132001-12-07 15:38:26 +00003525; return 0; }
3526EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003527if { (eval echo configure:3528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003528 rm -rf conftest*
3529 cat >> confdefs.h <<\EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003530#define AIX_GENUINE_CPLUSPLUS 1
3531EOF
3532
Michael W. Hudson54241132001-12-07 15:38:26 +00003533 echo "$ac_t""yes" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003534else
Michael W. Hudson54241132001-12-07 15:38:26 +00003535 echo "configure: failed program was:" >&5
3536 cat conftest.$ac_ext >&5
3537 rm -rf conftest*
3538 echo "$ac_t""no" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003539fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003540rm -f conftest*;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003541 *) ;;
3542esac
3543
Guido van Rossum70c7f481998-03-26 18:44:10 +00003544# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3545# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003546# BeOS' sockets are stashed in libnet.
3547case "$ac_sys_system" in
3548IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003549*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003550echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003551echo "configure:3552: checking for t_open in -lnsl" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003552ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
3553if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3554 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003555else
Michael W. Hudson54241132001-12-07 15:38:26 +00003556 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003557LIBS="-lnsl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003558cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003559#line 3560 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003560#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003561/* Override any gcc2 internal prototype to avoid an error. */
3562/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003563 builtin and then its argument prototype would still apply. */
3564char t_open();
3565
3566int main() {
3567t_open()
3568; return 0; }
3569EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003570if { (eval echo configure:3571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003571 rm -rf conftest*
3572 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003573else
Michael W. Hudson54241132001-12-07 15:38:26 +00003574 echo "configure: failed program was:" >&5
3575 cat conftest.$ac_ext >&5
3576 rm -rf conftest*
3577 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003578fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003579rm -f conftest*
3580LIBS="$ac_save_LIBS"
3581
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003582fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003583if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3584 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003585 LIBS="-lnsl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003586else
3587 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003588fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003589 # SVR4
Michael W. Hudson54241132001-12-07 15:38:26 +00003590echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003591echo "configure:3592: checking for socket in -lsocket" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003592ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3593if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3594 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003595else
Michael W. Hudson54241132001-12-07 15:38:26 +00003596 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003597LIBS="-lsocket $LIBS $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003598cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003599#line 3600 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003600#include "confdefs.h"
3601/* Override any gcc2 internal prototype to avoid an error. */
3602/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003603 builtin and then its argument prototype would still apply. */
3604char socket();
3605
3606int main() {
3607socket()
3608; return 0; }
3609EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003610if { (eval echo configure:3611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003611 rm -rf conftest*
3612 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003613else
Michael W. Hudson54241132001-12-07 15:38:26 +00003614 echo "configure: failed program was:" >&5
3615 cat conftest.$ac_ext >&5
3616 rm -rf conftest*
3617 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003618fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003619rm -f conftest*
3620LIBS="$ac_save_LIBS"
3621
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003622fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003623if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3624 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003625 LIBS="-lsocket $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003626else
3627 echo "$ac_t""no" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003628fi
3629 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003630;;
3631esac
3632case "$ac_sys_system" in
3633BeOS*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003634echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003635echo "configure:3636: checking for socket in -lnet" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003636ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
3637if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3638 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003639else
Michael W. Hudson54241132001-12-07 15:38:26 +00003640 ac_save_LIBS="$LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00003641LIBS="-lnet $LIBS $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003642cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003643#line 3644 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003644#include "confdefs.h"
3645/* Override any gcc2 internal prototype to avoid an error. */
3646/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003647 builtin and then its argument prototype would still apply. */
3648char socket();
3649
3650int main() {
3651socket()
3652; return 0; }
3653EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003654if { (eval echo configure:3655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003655 rm -rf conftest*
3656 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003657else
Michael W. Hudson54241132001-12-07 15:38:26 +00003658 echo "configure: failed program was:" >&5
3659 cat conftest.$ac_ext >&5
3660 rm -rf conftest*
3661 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003662fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003663rm -f conftest*
3664LIBS="$ac_save_LIBS"
3665
Guido van Rossumad678af1998-10-02 14:42:15 +00003666fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003667if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3668 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003669 LIBS="-lnet $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003670else
3671 echo "$ac_t""no" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003672fi
3673 # BeOS
3674;;
3675esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003676
Michael W. Hudson54241132001-12-07 15:38:26 +00003677echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003678echo "configure:3679: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003679# Check whether --with-libs or --without-libs was given.
3680if test "${with_libs+set}" = set; then
3681 withval="$with_libs"
Michael W. Hudson54241132001-12-07 15:38:26 +00003682
3683echo "$ac_t""$withval" 1>&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00003684LIBS="$withval $LIBS"
3685
3686else
Michael W. Hudson54241132001-12-07 15:38:26 +00003687 echo "$ac_t""no" 1>&6
3688fi
3689
Guido van Rossum7f43da71994-08-01 12:15:30 +00003690
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003691# Determine if signalmodule should be used.
3692
3693
Michael W. Hudson54241132001-12-07 15:38:26 +00003694echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003695echo "configure:3696: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003696# Check whether --with-signal-module or --without-signal-module was given.
3697if test "${with_signal_module+set}" = set; then
3698 withval="$with_signal_module"
Michael W. Hudson54241132001-12-07 15:38:26 +00003699 :
3700fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003701
3702
3703if test -z "$with_signal_module"
3704then with_signal_module="yes"
3705fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003706echo "$ac_t""$with_signal_module" 1>&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003707
3708if test "${with_signal_module}" = "yes"; then
3709 USE_SIGNAL_MODULE=""
3710 SIGNAL_OBJS=""
3711else
3712 USE_SIGNAL_MODULE="#"
3713 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3714fi
3715
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003716# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003717
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003718USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003719
Michael W. Hudson54241132001-12-07 15:38:26 +00003720echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003721echo "configure:3722: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003722
3723# Check whether --with-dec-threads or --without-dec-threads was given.
3724if test "${with_dec_threads+set}" = set; then
3725 withval="$with_dec_threads"
Michael W. Hudson54241132001-12-07 15:38:26 +00003726
3727echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003728LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003729if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003730 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003731fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003732else
Michael W. Hudson54241132001-12-07 15:38:26 +00003733 echo "$ac_t""no" 1>&6
3734fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003735
3736
Michael W. Hudson54241132001-12-07 15:38:26 +00003737echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003738echo "configure:3739: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003739# Check whether --with-threads or --without-threads was given.
3740if test "${with_threads+set}" = set; then
3741 withval="$with_threads"
Michael W. Hudson54241132001-12-07 15:38:26 +00003742 :
3743fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003744
3745
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003746# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003747# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003748if test "${with_thread+set}" = set; then
3749 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003750
Jack Jansendd19cf82001-12-06 22:36:17 +00003751with_threads=$with_thread
Michael W. Hudson54241132001-12-07 15:38:26 +00003752fi
3753
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003754
3755if test -z "$with_threads"
3756then with_threads="yes"
3757fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003758echo "$ac_t""$with_threads" 1>&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003759
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003760
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003761if test "$with_threads" = "no"
3762then
3763 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003764elif test "$ac_cv_pthread_is_default" = yes
3765then
Michael W. Hudson54241132001-12-07 15:38:26 +00003766 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003767#define WITH_THREAD 1
3768EOF
3769
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003770 # Defining _REENTRANT on system with POSIX threads should not hurt.
Michael W. Hudson54241132001-12-07 15:38:26 +00003771 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003772#define _REENTRANT 1
3773EOF
3774
3775 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003776 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003777elif test "$ac_cv_kpthread" = "yes"
3778then
3779 CC="$CC -Kpthread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003780 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003781#define WITH_THREAD 1
3782EOF
3783
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003784 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003785 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003786else
3787 if test ! -z "$with_threads" -a -d "$with_threads"
3788 then LDFLAGS="$LDFLAGS -L$with_threads"
3789 fi
3790 if test ! -z "$withval" -a -d "$withval"
3791 then LDFLAGS="$LDFLAGS -L$withval"
3792 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003793
3794 # According to the POSIX spec, a pthreads implementation must
3795 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Michael W. Hudson54241132001-12-07 15:38:26 +00003796 echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003797echo "configure:3798: checking for _POSIX_THREADS in unistd.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003798 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003799#line 3800 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003800#include "confdefs.h"
3801#include <unistd.h>
3802 #ifdef _POSIX_THREADS
3803 yes
3804 #endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003805
3806EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003807if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3808 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003809 rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003810 unistd_defines_pthreads=yes
3811else
Michael W. Hudson54241132001-12-07 15:38:26 +00003812 rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003813 unistd_defines_pthreads=no
3814fi
3815rm -f conftest*
3816
Michael W. Hudson54241132001-12-07 15:38:26 +00003817 echo "$ac_t""$unistd_defines_pthreads" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003818
Michael W. Hudson54241132001-12-07 15:38:26 +00003819 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003820#define _REENTRANT 1
3821EOF
3822
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003823 ac_safe=`echo "cthreads.h" | sed 'y%./+-%__p_%'`
3824echo $ac_n "checking for cthreads.h""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003825echo "configure:3826: checking for cthreads.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003826if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3827 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003828else
Michael W. Hudson54241132001-12-07 15:38:26 +00003829 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003830#line 3831 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003831#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003832#include <cthreads.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00003833EOF
3834ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003835{ (eval echo configure:3836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003836ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3837if test -z "$ac_err"; then
3838 rm -rf conftest*
3839 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003840else
Michael W. Hudson54241132001-12-07 15:38:26 +00003841 echo "$ac_err" >&5
3842 echo "configure: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003843 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003844 rm -rf conftest*
3845 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003846fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003847rm -f conftest*
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003848fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003849if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3850 echo "$ac_t""yes" 1>&6
3851 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003852#define WITH_THREAD 1
3853EOF
3854
Michael W. Hudson54241132001-12-07 15:38:26 +00003855 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003856#define C_THREADS 1
3857EOF
3858
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003859 cat >> confdefs.h <<\EOF
3860#define HURD_C_THREADS 1
3861EOF
3862
3863 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003864 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003865else
3866 echo "$ac_t""no" 1>&6
3867
3868 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
3869echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003870echo "configure:3871: checking for mach/cthreads.h" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003871if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3872 echo $ac_n "(cached) $ac_c" 1>&6
3873else
3874 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003875#line 3876 "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003876#include "confdefs.h"
3877#include <mach/cthreads.h>
3878EOF
3879ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003880{ (eval echo configure:3881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003881ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3882if test -z "$ac_err"; then
3883 rm -rf conftest*
3884 eval "ac_cv_header_$ac_safe=yes"
3885else
3886 echo "$ac_err" >&5
3887 echo "configure: failed program was:" >&5
3888 cat conftest.$ac_ext >&5
3889 rm -rf conftest*
3890 eval "ac_cv_header_$ac_safe=no"
3891fi
3892rm -f conftest*
3893fi
3894if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3895 echo "$ac_t""yes" 1>&6
3896 cat >> confdefs.h <<\EOF
3897#define WITH_THREAD 1
3898EOF
3899
3900 cat >> confdefs.h <<\EOF
3901#define C_THREADS 1
3902EOF
3903
3904 cat >> confdefs.h <<\EOF
3905#define MACH_C_THREADS 1
3906EOF
3907
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003908 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003909else
Michael W. Hudson54241132001-12-07 15:38:26 +00003910 echo "$ac_t""no" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003911
Michael W. Hudson54241132001-12-07 15:38:26 +00003912 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003913echo "configure:3914: checking for --with-pth" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003914 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003915if test "${with_pth+set}" = set; then
3916 withval="$with_pth"
Michael W. Hudson54241132001-12-07 15:38:26 +00003917
3918 echo "$ac_t""$withval" 1>&6
3919 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003920#define WITH_THREAD 1
3921EOF
3922
Michael W. Hudson54241132001-12-07 15:38:26 +00003923 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003924#define HAVE_PTH 1
3925EOF
3926
Martin v. Löwis130fb172001-07-19 11:00:41 +00003927 LIBS="-lpth $LIBS"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003928 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003929else
Michael W. Hudson54241132001-12-07 15:38:26 +00003930
3931 echo "$ac_t""no" 1>&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003932
3933 # Just looking for pthread_create in libpthread is not enough:
3934 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
3935 # So we really have to include pthread.h, and then link.
3936 _libs=$LIBS
3937 LIBS="$LIBS -lpthread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003938 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003939echo "configure:3940: checking for pthread_create in -lpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003940 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003941#line 3942 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003942#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003943#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00003944
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003945void * start_routine (void *arg) { exit (0); }
Michael W. Hudson54241132001-12-07 15:38:26 +00003946int main() {
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003947
3948pthread_create (NULL, NULL, start_routine, NULL)
Michael W. Hudson54241132001-12-07 15:38:26 +00003949; return 0; }
3950EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003951if { (eval echo configure:3952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003952 rm -rf conftest*
3953
3954 echo "$ac_t""yes" 1>&6
3955 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003956#define WITH_THREAD 1
3957EOF
3958
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003959 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00003960 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003961else
Michael W. Hudson54241132001-12-07 15:38:26 +00003962 echo "configure: failed program was:" >&5
3963 cat conftest.$ac_ext >&5
3964 rm -rf conftest*
3965
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003966 LIBS=$_libs
Michael W. Hudson54241132001-12-07 15:38:26 +00003967 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003968echo "configure:3969: checking for pthread_detach" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003969if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
3970 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003971else
Michael W. Hudson54241132001-12-07 15:38:26 +00003972 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003973#line 3974 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003974#include "confdefs.h"
3975/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00003976 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003977#include <assert.h>
3978/* Override any gcc2 internal prototype to avoid an error. */
3979/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003980 builtin and then its argument prototype would still apply. */
3981char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003982
Michael W. Hudson54241132001-12-07 15:38:26 +00003983int main() {
3984
Guido van Rossumad678af1998-10-02 14:42:15 +00003985/* The GNU C library defines this for functions which it implements
3986 to always fail with ENOSYS. Some functions are actually named
3987 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003988#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003989choke me
3990#else
Michael W. Hudson54241132001-12-07 15:38:26 +00003991pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003992#endif
3993
Michael W. Hudson54241132001-12-07 15:38:26 +00003994; return 0; }
3995EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003996if { (eval echo configure:3997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003997 rm -rf conftest*
3998 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003999else
Michael W. Hudson54241132001-12-07 15:38:26 +00004000 echo "configure: failed program was:" >&5
4001 cat conftest.$ac_ext >&5
4002 rm -rf conftest*
4003 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00004004fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004005rm -f conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00004006fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004007
4008if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
4009 echo "$ac_t""yes" 1>&6
4010 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00004011#define WITH_THREAD 1
4012EOF
4013
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004014 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004015 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00004016else
Michael W. Hudson54241132001-12-07 15:38:26 +00004017 echo "$ac_t""no" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00004018
Michael W. Hudson54241132001-12-07 15:38:26 +00004019 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
4020echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004021echo "configure:4022: checking for kernel/OS.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004022if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4023 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004024else
Michael W. Hudson54241132001-12-07 15:38:26 +00004025 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004026#line 4027 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004027#include "confdefs.h"
4028#include <kernel/OS.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00004029EOF
4030ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004031{ (eval echo configure:4032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004032ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4033if test -z "$ac_err"; then
4034 rm -rf conftest*
4035 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004036else
Michael W. Hudson54241132001-12-07 15:38:26 +00004037 echo "$ac_err" >&5
4038 echo "configure: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004039 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004040 rm -rf conftest*
4041 eval "ac_cv_header_$ac_safe=no"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004042fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004043rm -f conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004044fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004045if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4046 echo "$ac_t""yes" 1>&6
4047 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004048#define WITH_THREAD 1
4049EOF
4050
Michael W. Hudson54241132001-12-07 15:38:26 +00004051 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004052#define BEOS_THREADS 1
4053EOF
4054
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004055 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004056else
Michael W. Hudson54241132001-12-07 15:38:26 +00004057 echo "$ac_t""no" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004058
Michael W. Hudson54241132001-12-07 15:38:26 +00004059 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004060echo "configure:4061: checking for pthread_create in -lpthreads" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004061ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
4062if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4063 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004064else
Michael W. Hudson54241132001-12-07 15:38:26 +00004065 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004066LIBS="-lpthreads $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004067cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004068#line 4069 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00004069#include "confdefs.h"
4070/* Override any gcc2 internal prototype to avoid an error. */
4071/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004072 builtin and then its argument prototype would still apply. */
4073char pthread_create();
4074
4075int main() {
4076pthread_create()
4077; return 0; }
4078EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004079if { (eval echo configure:4080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004080 rm -rf conftest*
4081 eval "ac_cv_lib_$ac_lib_var=yes"
Greg Steinadf63d62000-07-05 10:38:09 +00004082else
Michael W. Hudson54241132001-12-07 15:38:26 +00004083 echo "configure: failed program was:" >&5
4084 cat conftest.$ac_ext >&5
4085 rm -rf conftest*
4086 eval "ac_cv_lib_$ac_lib_var=no"
Greg Steinadf63d62000-07-05 10:38:09 +00004087fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004088rm -f conftest*
4089LIBS="$ac_save_LIBS"
4090
Greg Steinadf63d62000-07-05 10:38:09 +00004091fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004092if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4093 echo "$ac_t""yes" 1>&6
4094 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00004095#define WITH_THREAD 1
4096EOF
4097
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004098 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004099 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004100 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00004101else
Michael W. Hudson54241132001-12-07 15:38:26 +00004102 echo "$ac_t""no" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00004103
Michael W. Hudson54241132001-12-07 15:38:26 +00004104 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004105echo "configure:4106: checking for pthread_create in -lc_r" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004106ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
4107if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4108 echo $ac_n "(cached) $ac_c" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00004109else
Michael W. Hudson54241132001-12-07 15:38:26 +00004110 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00004111LIBS="-lc_r $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004112cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004113#line 4114 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00004114#include "confdefs.h"
4115/* Override any gcc2 internal prototype to avoid an error. */
4116/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004117 builtin and then its argument prototype would still apply. */
4118char pthread_create();
4119
4120int main() {
4121pthread_create()
4122; return 0; }
4123EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004124if { (eval echo configure:4125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004125 rm -rf conftest*
4126 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum49545951997-12-02 19:28:29 +00004127else
Michael W. Hudson54241132001-12-07 15:38:26 +00004128 echo "configure: failed program was:" >&5
4129 cat conftest.$ac_ext >&5
4130 rm -rf conftest*
4131 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum49545951997-12-02 19:28:29 +00004132fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004133rm -f conftest*
4134LIBS="$ac_save_LIBS"
4135
Guido van Rossum49545951997-12-02 19:28:29 +00004136fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004137if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4138 echo "$ac_t""yes" 1>&6
4139 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00004140#define WITH_THREAD 1
4141EOF
4142
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004143 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004144 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004145 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004146else
Michael W. Hudson54241132001-12-07 15:38:26 +00004147 echo "$ac_t""no" 1>&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004148
Michael W. Hudson54241132001-12-07 15:38:26 +00004149 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004150echo "configure:4151: checking for __d6_pthread_create in -lthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004151ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
4152if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4153 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004154else
Michael W. Hudson54241132001-12-07 15:38:26 +00004155 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00004156LIBS="-lthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004157cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004158#line 4159 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004159#include "confdefs.h"
4160/* Override any gcc2 internal prototype to avoid an error. */
4161/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004162 builtin and then its argument prototype would still apply. */
4163char __d6_pthread_create();
4164
4165int main() {
4166__d6_pthread_create()
4167; return 0; }
4168EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004169if { (eval echo configure:4170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004170 rm -rf conftest*
4171 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004172else
Michael W. Hudson54241132001-12-07 15:38:26 +00004173 echo "configure: failed program was:" >&5
4174 cat conftest.$ac_ext >&5
4175 rm -rf conftest*
4176 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004177fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004178rm -f conftest*
4179LIBS="$ac_save_LIBS"
4180
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004181fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004182if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4183 echo "$ac_t""yes" 1>&6
4184 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004185#define WITH_THREAD 1
4186EOF
4187
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004188 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004189 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004190 THREADOBJ="Python/thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00004191else
Michael W. Hudson54241132001-12-07 15:38:26 +00004192 echo "$ac_t""no" 1>&6
Guido van Rossum49545951997-12-02 19:28:29 +00004193
Michael W. Hudson54241132001-12-07 15:38:26 +00004194 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004195echo "configure:4196: checking for __pthread_create_system in -lpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004196ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
4197if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4198 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004199else
Michael W. Hudson54241132001-12-07 15:38:26 +00004200 ac_save_LIBS="$LIBS"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004201LIBS="-lpthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004202cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004203#line 4204 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004204#include "confdefs.h"
4205/* Override any gcc2 internal prototype to avoid an error. */
4206/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004207 builtin and then its argument prototype would still apply. */
4208char __pthread_create_system();
4209
4210int main() {
4211__pthread_create_system()
4212; return 0; }
4213EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004214if { (eval echo configure:4215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004215 rm -rf conftest*
4216 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004217else
Michael W. Hudson54241132001-12-07 15:38:26 +00004218 echo "configure: failed program was:" >&5
4219 cat conftest.$ac_ext >&5
4220 rm -rf conftest*
4221 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004222fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004223rm -f conftest*
4224LIBS="$ac_save_LIBS"
4225
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004226fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004227if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4228 echo "$ac_t""yes" 1>&6
4229 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004230#define WITH_THREAD 1
4231EOF
4232
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004233 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004234 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004235 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004236else
Michael W. Hudson54241132001-12-07 15:38:26 +00004237 echo "$ac_t""no" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004238
Michael W. Hudson54241132001-12-07 15:38:26 +00004239 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004240echo "configure:4241: checking for pthread_create in -lcma" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004241ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
4242if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4243 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00004244else
Michael W. Hudson54241132001-12-07 15:38:26 +00004245 ac_save_LIBS="$LIBS"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004246LIBS="-lcma $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004247cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004248#line 4249 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004249#include "confdefs.h"
4250/* Override any gcc2 internal prototype to avoid an error. */
4251/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004252 builtin and then its argument prototype would still apply. */
4253char pthread_create();
4254
4255int main() {
4256pthread_create()
4257; return 0; }
4258EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004259if { (eval echo configure:4260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004260 rm -rf conftest*
4261 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004262else
Michael W. Hudson54241132001-12-07 15:38:26 +00004263 echo "configure: failed program was:" >&5
4264 cat conftest.$ac_ext >&5
4265 rm -rf conftest*
4266 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004267fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004268rm -f conftest*
4269LIBS="$ac_save_LIBS"
4270
Guido van Rossumb93a8621998-05-07 13:27:32 +00004271fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004272if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4273 echo "$ac_t""yes" 1>&6
4274 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00004275#define WITH_THREAD 1
4276EOF
4277
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004278 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004279 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004280 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004281else
Michael W. Hudson54241132001-12-07 15:38:26 +00004282 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004283
Martin v. Löwis130fb172001-07-19 11:00:41 +00004284 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004285fi
4286
Michael W. Hudson54241132001-12-07 15:38:26 +00004287
Guido van Rossum627b2d71993-12-24 10:39:16 +00004288fi
4289
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004290fi
4291
Guido van Rossum0be3e491997-05-22 20:33:33 +00004292fi
4293
Guido van Rossum49545951997-12-02 19:28:29 +00004294fi
4295
Guido van Rossumb93a8621998-05-07 13:27:32 +00004296fi
4297
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004298fi
4299
Guido van Rossumad678af1998-10-02 14:42:15 +00004300fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004301rm -f conftest*
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004302fi
4303
Michael W. Hudson54241132001-12-07 15:38:26 +00004304fi
4305
Martin v. Löwisa6e97582002-01-01 18:41:33 +00004306fi
4307
Michael W. Hudson54241132001-12-07 15:38:26 +00004308
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004309 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004310 if test "$unistd_defines_pthreads" = "no"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004311 cat >> confdefs.h <<\EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004312#define _POSIX_THREADS 1
4313EOF
4314
4315 fi
4316
Michael W. Hudson54241132001-12-07 15:38:26 +00004317 echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004318echo "configure:4319: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004319 if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then
4320 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004321else
4322 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004323 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004324else
Michael W. Hudson54241132001-12-07 15:38:26 +00004325 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004326#line 4327 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004327#include "confdefs.h"
4328#include <pthread.h>
4329 void *foo(void *parm) {
4330 return NULL;
4331 }
4332 main() {
4333 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004334 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004335 if (pthread_attr_init(&attr)) exit(-1);
4336 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004337 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004338 exit(0);
4339 }
Michael W. Hudson54241132001-12-07 15:38:26 +00004340EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004341if { (eval echo configure:4342: \"$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 +00004342then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004343 ac_cv_pthread_system_supported=yes
4344else
Michael W. Hudson54241132001-12-07 15:38:26 +00004345 echo "configure: failed program was:" >&5
4346 cat conftest.$ac_ext >&5
4347 rm -fr conftest*
4348 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004349fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004350rm -fr conftest*
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004351fi
4352
Michael W. Hudson54241132001-12-07 15:38:26 +00004353
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004354fi
4355
Michael W. Hudson54241132001-12-07 15:38:26 +00004356 echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004357 if test "$ac_cv_pthread_system_supported" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004358 cat >> confdefs.h <<\EOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004359#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
4360EOF
4361
4362 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004363 for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004364do
Michael W. Hudson54241132001-12-07 15:38:26 +00004365echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004366echo "configure:4367: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004367if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4368 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004369else
Michael W. Hudson54241132001-12-07 15:38:26 +00004370 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004371#line 4372 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004372#include "confdefs.h"
4373/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004374 which can conflict with char $ac_func(); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004375#include <assert.h>
4376/* Override any gcc2 internal prototype to avoid an error. */
4377/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004378 builtin and then its argument prototype would still apply. */
4379char $ac_func();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004380
Michael W. Hudson54241132001-12-07 15:38:26 +00004381int main() {
4382
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004383/* The GNU C library defines this for functions which it implements
4384 to always fail with ENOSYS. Some functions are actually named
4385 something starting with __ and the normal name is an alias. */
4386#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4387choke me
4388#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004389$ac_func();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004390#endif
4391
Michael W. Hudson54241132001-12-07 15:38:26 +00004392; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004393EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004394if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004395 rm -rf conftest*
4396 eval "ac_cv_func_$ac_func=yes"
4397else
4398 echo "configure: failed program was:" >&5
4399 cat conftest.$ac_ext >&5
4400 rm -rf conftest*
4401 eval "ac_cv_func_$ac_func=no"
4402fi
4403rm -f conftest*
4404fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004405
Michael W. Hudson54241132001-12-07 15:38:26 +00004406if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4407 echo "$ac_t""yes" 1>&6
4408 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4409 cat >> confdefs.h <<EOF
4410#define $ac_tr_func 1
4411EOF
4412
4413else
4414 echo "$ac_t""no" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004415fi
4416done
4417
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004418 fi
4419
Michael W. Hudson54241132001-12-07 15:38:26 +00004420 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004421echo "configure:4422: checking for usconfig in -lmpc" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004422ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
4423if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4424 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004425else
Michael W. Hudson54241132001-12-07 15:38:26 +00004426 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004427LIBS="-lmpc $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004428cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004429#line 4430 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004430#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004431/* Override any gcc2 internal prototype to avoid an error. */
4432/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004433 builtin and then its argument prototype would still apply. */
4434char usconfig();
4435
4436int main() {
4437usconfig()
4438; return 0; }
4439EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004440if { (eval echo configure:4441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004441 rm -rf conftest*
4442 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004443else
Michael W. Hudson54241132001-12-07 15:38:26 +00004444 echo "configure: failed program was:" >&5
4445 cat conftest.$ac_ext >&5
4446 rm -rf conftest*
4447 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004448fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004449rm -f conftest*
4450LIBS="$ac_save_LIBS"
4451
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004452fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004453if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4454 echo "$ac_t""yes" 1>&6
4455 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004456#define WITH_THREAD 1
4457EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004458
Martin v. Löwis130fb172001-07-19 11:00:41 +00004459 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004460 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00004461 USE_THREAD_MODULE=""
Michael W. Hudson54241132001-12-07 15:38:26 +00004462else
4463 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004464fi
4465
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004466
4467 if test $posix_threads != "yes"; then
4468 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004469echo "configure:4470: checking for thr_create in -lthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004470ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
4471if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4472 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004473else
Michael W. Hudson54241132001-12-07 15:38:26 +00004474 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004475LIBS="-lthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004476cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004477#line 4478 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004478#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004479/* Override any gcc2 internal prototype to avoid an error. */
4480/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004481 builtin and then its argument prototype would still apply. */
4482char thr_create();
4483
4484int main() {
4485thr_create()
4486; return 0; }
4487EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004488if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004489 rm -rf conftest*
4490 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004491else
Michael W. Hudson54241132001-12-07 15:38:26 +00004492 echo "configure: failed program was:" >&5
4493 cat conftest.$ac_ext >&5
4494 rm -rf conftest*
4495 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004496fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004497rm -f conftest*
4498LIBS="$ac_save_LIBS"
4499
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004500fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004501if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4502 echo "$ac_t""yes" 1>&6
4503 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004504#define WITH_THREAD 1
4505EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004506
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004507 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00004508 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004509 USE_THREAD_MODULE=""
Michael W. Hudson54241132001-12-07 15:38:26 +00004510else
4511 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004512fi
4513
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004514 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004515
Martin v. Löwis130fb172001-07-19 11:00:41 +00004516 if test "$USE_THREAD_MODULE" != "#"
4517 then
4518 # If the above checks didn't disable threads, (at least) OSF1
4519 # needs this '-threads' argument during linking.
4520 case $ac_sys_system in
4521 OSF1) LDLAST=-threads;;
4522 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004523 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004524fi
4525
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004526# Check for enable-ipv6
Michael W. Hudson54241132001-12-07 15:38:26 +00004527echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004528echo "configure:4529: checking if --enable-ipv6 is specified" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004529# Check whether --enable-ipv6 or --disable-ipv6 was given.
4530if test "${enable_ipv6+set}" = set; then
4531 enableval="$enable_ipv6"
4532 case "$enableval" in
4533 no)
Michael W. Hudson54241132001-12-07 15:38:26 +00004534 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004535 ipv6=no
4536 ;;
Michael W. Hudson54241132001-12-07 15:38:26 +00004537 *) echo "$ac_t""yes" 1>&6
4538 cat >> confdefs.h <<\EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004539#define ENABLE_IPV6 1
4540EOF
4541
4542 ipv6=yes
4543 ;;
Michael W. Hudson54241132001-12-07 15:38:26 +00004544 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004545else
Michael W. Hudson54241132001-12-07 15:38:26 +00004546
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004547 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004548 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004549 ipv6=no
4550
4551else
Michael W. Hudson54241132001-12-07 15:38:26 +00004552 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004553#line 4554 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004554#include "confdefs.h"
4555 /* AF_INET6 available check */
4556#include <sys/types.h>
4557#include <sys/socket.h>
4558main()
4559{
4560 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4561 exit(1);
4562 else
4563 exit(0);
4564}
4565
Michael W. Hudson54241132001-12-07 15:38:26 +00004566EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004567if { (eval echo configure:4568: \"$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 +00004568then
4569 echo "$ac_t""yes" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004570 ipv6=yes
4571else
Michael W. Hudson54241132001-12-07 15:38:26 +00004572 echo "configure: failed program was:" >&5
4573 cat conftest.$ac_ext >&5
4574 rm -fr conftest*
4575 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004576 ipv6=no
4577fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004578rm -fr conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004579fi
4580
Michael W. Hudson54241132001-12-07 15:38:26 +00004581
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004582if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004583 echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004584echo "configure:4585: checking if RFC2553 API is available" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004585 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004586#line 4587 "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004587#include "confdefs.h"
4588#include <sys/types.h>
4589#include <netinet/in.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00004590int main() {
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004591struct sockaddr_in6 x;
4592x.sin6_scope_id;
Michael W. Hudson54241132001-12-07 15:38:26 +00004593; return 0; }
4594EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004595if { (eval echo configure:4596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004596 rm -rf conftest*
4597 echo "$ac_t""yes" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004598 ipv6=yes
4599else
Michael W. Hudson54241132001-12-07 15:38:26 +00004600 echo "configure: failed program was:" >&5
4601 cat conftest.$ac_ext >&5
4602 rm -rf conftest*
4603 echo "$ac_t""no" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004604 ipv6=no
4605fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004606rm -f conftest*
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004607fi
4608
4609if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004610 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004611#define ENABLE_IPV6 1
4612EOF
4613
4614fi
4615
Michael W. Hudson54241132001-12-07 15:38:26 +00004616fi
4617
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004618
4619ipv6type=unknown
4620ipv6lib=none
4621ipv6trylibc=no
4622
4623if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004624 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004625echo "configure:4626: checking ipv6 stack type" >&5
Guido van Rossumb8552162001-09-05 14:58:11 +00004626 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
4627 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004628 case $i in
4629 inria)
Michael W. Hudson54241132001-12-07 15:38:26 +00004630 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004631#line 4632 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004632#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004633
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004634#include <netinet/in.h>
4635#ifdef IPV6_INRIA_VERSION
4636yes
4637#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004638EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004639if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4640 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004641 rm -rf conftest*
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004642 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004643fi
4644rm -f conftest*
4645
4646 ;;
4647 kame)
Michael W. Hudson54241132001-12-07 15:38:26 +00004648 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004649#line 4650 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004650#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004651
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004652#include <netinet/in.h>
4653#ifdef __KAME__
4654yes
4655#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004656EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004657if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4658 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004659 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004660 ipv6type=$i;
4661 ipv6lib=inet6
4662 ipv6libdir=/usr/local/v6/lib
4663 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004664fi
4665rm -f conftest*
4666
4667 ;;
4668 linux-glibc)
Michael W. Hudson54241132001-12-07 15:38:26 +00004669 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004670#line 4671 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004671#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004672
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004673#include <features.h>
4674#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4675yes
4676#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004677EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004678if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4679 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004680 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004681 ipv6type=$i;
4682 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004683fi
4684rm -f conftest*
4685
4686 ;;
4687 linux-inet6)
4688 if test -d /usr/inet6; then
4689 ipv6type=$i
4690 ipv6lib=inet6
4691 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004692 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004693 fi
4694 ;;
4695 solaris)
4696 if test -f /etc/netconfig; then
4697 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4698 ipv6type=$i
4699 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004700 fi
4701 fi
4702 ;;
4703 toshiba)
Michael W. Hudson54241132001-12-07 15:38:26 +00004704 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004705#line 4706 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004706#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004707
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004708#include <sys/param.h>
4709#ifdef _TOSHIBA_INET6
4710yes
4711#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004712EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004713if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4714 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004715 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004716 ipv6type=$i;
4717 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004718 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004719fi
4720rm -f conftest*
4721
4722 ;;
4723 v6d)
Michael W. Hudson54241132001-12-07 15:38:26 +00004724 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004725#line 4726 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004726#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004727
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004728#include </usr/local/v6/include/sys/v6config.h>
4729#ifdef __V6D__
4730yes
4731#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004732EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004733if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4734 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004735 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004736 ipv6type=$i;
4737 ipv6lib=v6;
4738 ipv6libdir=/usr/local/v6/lib;
4739 OPT="-I/usr/local/v6/include $OPT"
4740fi
4741rm -f conftest*
4742
4743 ;;
4744 zeta)
Michael W. Hudson54241132001-12-07 15:38:26 +00004745 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004746#line 4747 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004747#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004748
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004749#include <sys/param.h>
4750#ifdef _ZETA_MINAMI_INET6
4751yes
4752#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004753EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004754if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4755 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004756 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004757 ipv6type=$i;
4758 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004759 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004760fi
4761rm -f conftest*
4762
4763 ;;
4764 esac
4765 if test "$ipv6type" != "unknown"; then
4766 break
4767 fi
4768 done
Michael W. Hudson54241132001-12-07 15:38:26 +00004769 echo "$ac_t""$ipv6type" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004770fi
4771
4772if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4773 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4774 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4775 echo "using lib$ipv6lib"
4776 else
4777 if test $ipv6trylibc = "yes"; then
4778 echo "using libc"
4779 else
4780 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4781 echo "You need to fetch lib$ipv6lib.a from appropriate"
4782 echo 'ipv6 kit and compile beforehand.'
4783 exit 1
4784 fi
4785 fi
4786fi
4787
Barry Warsawef82cd72000-06-30 16:21:01 +00004788# Check for GC support
Michael W. Hudson54241132001-12-07 15:38:26 +00004789echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004790echo "configure:4791: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004791# Check whether --with-cycle-gc or --without-cycle-gc was given.
4792if test "${with_cycle_gc+set}" = set; then
4793 withval="$with_cycle_gc"
Michael W. Hudson54241132001-12-07 15:38:26 +00004794 :
4795fi
Barry Warsawef82cd72000-06-30 16:21:01 +00004796
4797
4798if test -z "$with_cycle_gc"
4799then with_cycle_gc="yes"
4800fi
Neil Schemenauercf229462001-08-29 23:58:47 +00004801if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +00004802then
Michael W. Hudson54241132001-12-07 15:38:26 +00004803 cat >> confdefs.h <<\EOF
Barry Warsawef82cd72000-06-30 16:21:01 +00004804#define WITH_CYCLE_GC 1
4805EOF
4806
4807fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004808echo "$ac_t""$with_cycle_gc" 1>&6
Barry Warsawef82cd72000-06-30 16:21:01 +00004809
Neil Schemenauera35c6882001-02-27 04:45:05 +00004810# Check for Python-specific malloc support
Michael W. Hudson54241132001-12-07 15:38:26 +00004811echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004812echo "configure:4813: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004813# Check whether --with-pymalloc or --without-pymalloc was given.
4814if test "${with_pymalloc+set}" = set; then
4815 withval="$with_pymalloc"
Neil Schemenauer16c22972002-03-22 15:34:49 +00004816 :
Michael W. Hudson54241132001-12-07 15:38:26 +00004817fi
4818
Neil Schemenauera35c6882001-02-27 04:45:05 +00004819
Neil Schemenauer16c22972002-03-22 15:34:49 +00004820if test -z "$with_pymalloc"
4821then with_pymalloc="yes"
4822fi
4823if test "$with_pymalloc" != "no"
4824then
4825 cat >> confdefs.h <<\EOF
4826#define WITH_PYMALLOC 1
4827EOF
4828
4829fi
4830echo "$ac_t""$with_pymalloc" 1>&6
4831
Barry Warsawef82cd72000-06-30 16:21:01 +00004832# Check for --with-wctype-functions
Michael W. Hudson54241132001-12-07 15:38:26 +00004833echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004834echo "configure:4835: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004835# Check whether --with-wctype-functions or --without-wctype-functions was given.
4836if test "${with_wctype_functions+set}" = set; then
4837 withval="$with_wctype_functions"
Michael W. Hudson54241132001-12-07 15:38:26 +00004838
Barry Warsawef82cd72000-06-30 16:21:01 +00004839if test "$withval" != no
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004840then
4841 cat >> confdefs.h <<\EOF
Barry Warsawef82cd72000-06-30 16:21:01 +00004842#define WANT_WCTYPE_FUNCTIONS 1
4843EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004844
4845 echo "$ac_t""yes" 1>&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004846else echo "$ac_t""no" 1>&6
Barry Warsawef82cd72000-06-30 16:21:01 +00004847fi
4848else
Michael W. Hudson54241132001-12-07 15:38:26 +00004849 echo "$ac_t""no" 1>&6
4850fi
4851
Barry Warsawef82cd72000-06-30 16:21:01 +00004852
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004853# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004854
Guido van Rossum98935bf2001-09-05 19:13:16 +00004855DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004856
Michael W. Hudson54241132001-12-07 15:38:26 +00004857echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004858echo "configure:4859: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004859# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004860if test "${with_sgi_dl+set}" = set; then
4861 withval="$with_sgi_dl"
Michael W. Hudson54241132001-12-07 15:38:26 +00004862
4863echo "$ac_t""$withval" 1>&6
4864cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004865#define WITH_SGI_DL 1
4866EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004867
Guido van Rossume97ee181999-12-20 21:27:22 +00004868DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004869dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004870if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004871then LDFLAGS="$LDFLAGS -L$dldir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004872else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004873fi
4874DLINCLDIR=${dldir}
4875LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004876else
Michael W. Hudson54241132001-12-07 15:38:26 +00004877 echo "$ac_t""no" 1>&6
4878fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004879
4880
Michael W. Hudson54241132001-12-07 15:38:26 +00004881echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004882echo "configure:4883: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004883# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004884if test "${with_dl_dld+set}" = set; then
4885 withval="$with_dl_dld"
Michael W. Hudson54241132001-12-07 15:38:26 +00004886
4887echo "$ac_t""$withval" 1>&6
4888cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004889#define WITH_DL_DLD 1
4890EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004891
Guido van Rossume97ee181999-12-20 21:27:22 +00004892DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004893dldir=`echo "$withval" | sed 's/,.*//'`
4894dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004895if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004896then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004897else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004898fi
4899DLINCLDIR=${dldir}
4900LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004901else
Michael W. Hudson54241132001-12-07 15:38:26 +00004902 echo "$ac_t""no" 1>&6
4903fi
4904
Guido van Rossum7f43da71994-08-01 12:15:30 +00004905
Guido van Rossume97ee181999-12-20 21:27:22 +00004906# the dlopen() function means we might want to use dynload_shlib.o. some
4907# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004908for ac_func in dlopen
4909do
Michael W. Hudson54241132001-12-07 15:38:26 +00004910echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004911echo "configure:4912: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004912if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4913 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004914else
Michael W. Hudson54241132001-12-07 15:38:26 +00004915 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004916#line 4917 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004917#include "confdefs.h"
4918/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004919 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004920#include <assert.h>
4921/* Override any gcc2 internal prototype to avoid an error. */
4922/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004923 builtin and then its argument prototype would still apply. */
4924char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004925
Michael W. Hudson54241132001-12-07 15:38:26 +00004926int main() {
4927
Guido van Rossume97ee181999-12-20 21:27:22 +00004928/* The GNU C library defines this for functions which it implements
4929 to always fail with ENOSYS. Some functions are actually named
4930 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004931#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004932choke me
4933#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004934$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004935#endif
4936
Michael W. Hudson54241132001-12-07 15:38:26 +00004937; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004938EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004939if { (eval echo configure:4940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004940 rm -rf conftest*
4941 eval "ac_cv_func_$ac_func=yes"
4942else
4943 echo "configure: failed program was:" >&5
4944 cat conftest.$ac_ext >&5
4945 rm -rf conftest*
4946 eval "ac_cv_func_$ac_func=no"
4947fi
4948rm -f conftest*
4949fi
Guido van Rossume97ee181999-12-20 21:27:22 +00004950
Michael W. Hudson54241132001-12-07 15:38:26 +00004951if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4952 echo "$ac_t""yes" 1>&6
4953 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4954 cat >> confdefs.h <<EOF
4955#define $ac_tr_func 1
4956EOF
4957
4958else
4959 echo "$ac_t""no" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004960fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004961done
Guido van Rossume97ee181999-12-20 21:27:22 +00004962
Michael W. Hudson54241132001-12-07 15:38:26 +00004963
Guido van Rossume97ee181999-12-20 21:27:22 +00004964# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4965# loading of modules.
4966
Michael W. Hudson54241132001-12-07 15:38:26 +00004967echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004968echo "configure:4969: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004969if test -z "$DYNLOADFILE"
4970then
4971 case $ac_sys_system/$ac_sys_release in
4972 AIX*) DYNLOADFILE="dynload_aix.o";;
4973 BeOS*) DYNLOADFILE="dynload_beos.o";;
4974 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004975 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004976 *)
4977 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4978 # out any dynamic loading
4979 if test "$ac_cv_func_dlopen" = yes
4980 then DYNLOADFILE="dynload_shlib.o"
4981 else DYNLOADFILE="dynload_stub.o"
4982 fi
4983 ;;
4984 esac
4985fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004986echo "$ac_t""$DYNLOADFILE" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004987if test "$DYNLOADFILE" != "dynload_stub.o"
4988then
Michael W. Hudson54241132001-12-07 15:38:26 +00004989 cat >> confdefs.h <<\EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004990#define HAVE_DYNAMIC_LOADING 1
4991EOF
4992
4993fi
4994
Neil Schemenauer4e425612001-06-19 15:44:15 +00004995# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4996
Michael W. Hudson54241132001-12-07 15:38:26 +00004997
4998echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00004999echo "configure:5000: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00005000if test -z "$MACHDEP_OBJS"
5001then
Jack Jansene578a632001-08-15 01:27:14 +00005002 MACHDEP_OBJS=$extra_machdep_objs
5003else
5004 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00005005fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005006echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005007
Guido van Rossum627b2d71993-12-24 10:39:16 +00005008# checks for library functions
Martin v. Löwis244edc82001-10-04 22:44:26 +00005009for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00005010 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00005011 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00005012 hstrerror inet_pton kill killpg link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00005013 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00005014 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +00005015 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00005016 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00005017 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00005018 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +00005019 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00005020do
Michael W. Hudson54241132001-12-07 15:38:26 +00005021echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005022echo "configure:5023: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005023if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5024 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005025else
Michael W. Hudson54241132001-12-07 15:38:26 +00005026 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005027#line 5028 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005028#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005029/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005030 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005031#include <assert.h>
5032/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005033/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005034 builtin and then its argument prototype would still apply. */
5035char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005036
Michael W. Hudson54241132001-12-07 15:38:26 +00005037int main() {
5038
Guido van Rossum627b2d71993-12-24 10:39:16 +00005039/* The GNU C library defines this for functions which it implements
5040 to always fail with ENOSYS. Some functions are actually named
5041 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005042#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005043choke me
5044#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005045$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005046#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005047
Michael W. Hudson54241132001-12-07 15:38:26 +00005048; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005049EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005050if { (eval echo configure:5051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005051 rm -rf conftest*
5052 eval "ac_cv_func_$ac_func=yes"
5053else
5054 echo "configure: failed program was:" >&5
5055 cat conftest.$ac_ext >&5
5056 rm -rf conftest*
5057 eval "ac_cv_func_$ac_func=no"
5058fi
5059rm -f conftest*
5060fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00005061
Michael W. Hudson54241132001-12-07 15:38:26 +00005062if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5063 echo "$ac_t""yes" 1>&6
5064 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5065 cat >> confdefs.h <<EOF
5066#define $ac_tr_func 1
5067EOF
5068
5069else
5070 echo "$ac_t""no" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005071fi
5072done
5073
Michael W. Hudson54241132001-12-07 15:38:26 +00005074
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005075# check for openpty and forkpty
5076
5077for ac_func in openpty
5078do
Michael W. Hudson54241132001-12-07 15:38:26 +00005079echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005080echo "configure:5081: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005081if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5082 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005083else
Michael W. Hudson54241132001-12-07 15:38:26 +00005084 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005085#line 5086 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005086#include "confdefs.h"
5087/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005088 which can conflict with char $ac_func(); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005089#include <assert.h>
5090/* Override any gcc2 internal prototype to avoid an error. */
5091/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005092 builtin and then its argument prototype would still apply. */
5093char $ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005094
Michael W. Hudson54241132001-12-07 15:38:26 +00005095int main() {
5096
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005097/* The GNU C library defines this for functions which it implements
5098 to always fail with ENOSYS. Some functions are actually named
5099 something starting with __ and the normal name is an alias. */
5100#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5101choke me
5102#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005103$ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005104#endif
5105
Michael W. Hudson54241132001-12-07 15:38:26 +00005106; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005107EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005108if { (eval echo configure:5109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005109 rm -rf conftest*
5110 eval "ac_cv_func_$ac_func=yes"
5111else
5112 echo "configure: failed program was:" >&5
5113 cat conftest.$ac_ext >&5
5114 rm -rf conftest*
5115 eval "ac_cv_func_$ac_func=no"
5116fi
5117rm -f conftest*
5118fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005119
Michael W. Hudson54241132001-12-07 15:38:26 +00005120if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5121 echo "$ac_t""yes" 1>&6
5122 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5123 cat >> confdefs.h <<EOF
5124#define $ac_tr_func 1
5125EOF
5126
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005127else
Michael W. Hudson54241132001-12-07 15:38:26 +00005128 echo "$ac_t""no" 1>&6
5129echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005130echo "configure:5131: checking for openpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005131ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
5132if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5133 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005134else
Michael W. Hudson54241132001-12-07 15:38:26 +00005135 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005136LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005137cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005138#line 5139 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005139#include "confdefs.h"
5140/* Override any gcc2 internal prototype to avoid an error. */
5141/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005142 builtin and then its argument prototype would still apply. */
5143char openpty();
5144
5145int main() {
5146openpty()
5147; return 0; }
5148EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005149if { (eval echo configure:5150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005150 rm -rf conftest*
5151 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005152else
Michael W. Hudson54241132001-12-07 15:38:26 +00005153 echo "configure: failed program was:" >&5
5154 cat conftest.$ac_ext >&5
5155 rm -rf conftest*
5156 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005157fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005158rm -f conftest*
5159LIBS="$ac_save_LIBS"
5160
Fred Drake8cef4cf2000-06-28 16:40:38 +00005161fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005162if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5163 echo "$ac_t""yes" 1>&6
5164 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005165#define HAVE_OPENPTY 1
5166EOF
5167 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005168else
5169 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005170fi
5171
5172fi
5173done
5174
5175for ac_func in forkpty
5176do
Michael W. Hudson54241132001-12-07 15:38:26 +00005177echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005178echo "configure:5179: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005179if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5180 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005181else
Michael W. Hudson54241132001-12-07 15:38:26 +00005182 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005183#line 5184 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005184#include "confdefs.h"
5185/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005186 which can conflict with char $ac_func(); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +00005187#include <assert.h>
5188/* Override any gcc2 internal prototype to avoid an error. */
5189/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005190 builtin and then its argument prototype would still apply. */
5191char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005192
Michael W. Hudson54241132001-12-07 15:38:26 +00005193int main() {
5194
Fred Drake8cef4cf2000-06-28 16:40:38 +00005195/* The GNU C library defines this for functions which it implements
5196 to always fail with ENOSYS. Some functions are actually named
5197 something starting with __ and the normal name is an alias. */
5198#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5199choke me
5200#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005201$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005202#endif
5203
Michael W. Hudson54241132001-12-07 15:38:26 +00005204; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005205EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005206if { (eval echo configure:5207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005207 rm -rf conftest*
5208 eval "ac_cv_func_$ac_func=yes"
5209else
5210 echo "configure: failed program was:" >&5
5211 cat conftest.$ac_ext >&5
5212 rm -rf conftest*
5213 eval "ac_cv_func_$ac_func=no"
5214fi
5215rm -f conftest*
5216fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00005217
Michael W. Hudson54241132001-12-07 15:38:26 +00005218if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5219 echo "$ac_t""yes" 1>&6
5220 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5221 cat >> confdefs.h <<EOF
5222#define $ac_tr_func 1
5223EOF
5224
Fred Drake8cef4cf2000-06-28 16:40:38 +00005225else
Michael W. Hudson54241132001-12-07 15:38:26 +00005226 echo "$ac_t""no" 1>&6
5227echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005228echo "configure:5229: checking for forkpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005229ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
5230if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5231 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005232else
Michael W. Hudson54241132001-12-07 15:38:26 +00005233 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005234LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005235cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005236#line 5237 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005237#include "confdefs.h"
5238/* Override any gcc2 internal prototype to avoid an error. */
5239/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005240 builtin and then its argument prototype would still apply. */
5241char forkpty();
5242
5243int main() {
5244forkpty()
5245; return 0; }
5246EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005247if { (eval echo configure:5248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005248 rm -rf conftest*
5249 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005250else
Michael W. Hudson54241132001-12-07 15:38:26 +00005251 echo "configure: failed program was:" >&5
5252 cat conftest.$ac_ext >&5
5253 rm -rf conftest*
5254 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005255fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005256rm -f conftest*
5257LIBS="$ac_save_LIBS"
5258
Fred Drake8cef4cf2000-06-28 16:40:38 +00005259fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005260if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5261 echo "$ac_t""yes" 1>&6
5262 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005263#define HAVE_FORKPTY 1
5264EOF
5265 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005266else
5267 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005268fi
5269
5270fi
5271done
5272
Jack Jansendd19cf82001-12-06 22:36:17 +00005273
Michael W. Hudson54241132001-12-07 15:38:26 +00005274# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +00005275for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
5276do
Michael W. Hudson54241132001-12-07 15:38:26 +00005277echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005278echo "configure:5279: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005279if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5280 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005281else
Michael W. Hudson54241132001-12-07 15:38:26 +00005282 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005283#line 5284 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005284#include "confdefs.h"
5285/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005286 which can conflict with char $ac_func(); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005287#include <assert.h>
5288/* Override any gcc2 internal prototype to avoid an error. */
5289/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005290 builtin and then its argument prototype would still apply. */
5291char $ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005292
Michael W. Hudson54241132001-12-07 15:38:26 +00005293int main() {
5294
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005295/* The GNU C library defines this for functions which it implements
5296 to always fail with ENOSYS. Some functions are actually named
5297 something starting with __ and the normal name is an alias. */
5298#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5299choke me
5300#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005301$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005302#endif
5303
Michael W. Hudson54241132001-12-07 15:38:26 +00005304; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005305EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005306if { (eval echo configure:5307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005307 rm -rf conftest*
5308 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005309else
Michael W. Hudson54241132001-12-07 15:38:26 +00005310 echo "configure: failed program was:" >&5
5311 cat conftest.$ac_ext >&5
5312 rm -rf conftest*
5313 eval "ac_cv_func_$ac_func=no"
5314fi
5315rm -f conftest*
5316fi
5317
5318if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5319 echo "$ac_t""yes" 1>&6
5320 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5321 cat >> confdefs.h <<EOF
5322#define $ac_tr_func 1
5323EOF
5324
5325else
5326 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005327fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005328done
5329
Michael W. Hudson54241132001-12-07 15:38:26 +00005330
Martin v. Löwis1142de32002-03-29 16:28:31 +00005331for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +00005332do
Michael W. Hudson54241132001-12-07 15:38:26 +00005333echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005334echo "configure:5335: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005335if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5336 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005337else
Michael W. Hudson54241132001-12-07 15:38:26 +00005338 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005339#line 5340 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005340#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005341/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005342 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005343#include <assert.h>
5344/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005345/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005346 builtin and then its argument prototype would still apply. */
5347char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005348
Michael W. Hudson54241132001-12-07 15:38:26 +00005349int main() {
5350
Guido van Rossum627b2d71993-12-24 10:39:16 +00005351/* The GNU C library defines this for functions which it implements
5352 to always fail with ENOSYS. Some functions are actually named
5353 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005354#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005355choke me
5356#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005357$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005358#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005359
Michael W. Hudson54241132001-12-07 15:38:26 +00005360; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005361EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005362if { (eval echo configure:5363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis1142de32002-03-29 16:28:31 +00005363 rm -rf conftest*
5364 eval "ac_cv_func_$ac_func=yes"
5365else
5366 echo "configure: failed program was:" >&5
5367 cat conftest.$ac_ext >&5
5368 rm -rf conftest*
5369 eval "ac_cv_func_$ac_func=no"
5370fi
5371rm -f conftest*
5372fi
5373
5374if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5375 echo "$ac_t""yes" 1>&6
5376 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5377 cat >> confdefs.h <<EOF
5378#define $ac_tr_func 1
5379EOF
5380
5381else
5382 echo "$ac_t""no" 1>&6
5383LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
5384fi
5385done
5386
5387
5388for ac_func in getpgrp
5389do
5390echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005391echo "configure:5392: checking for $ac_func" >&5
Martin v. Löwis1142de32002-03-29 16:28:31 +00005392if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5393 echo $ac_n "(cached) $ac_c" 1>&6
5394else
5395 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005396#line 5397 "configure"
Martin v. Löwis1142de32002-03-29 16:28:31 +00005397#include "confdefs.h"
5398/* System header to define __stub macros and hopefully few prototypes,
5399 which can conflict with char $ac_func(); below. */
5400#include <assert.h>
5401/* Override any gcc2 internal prototype to avoid an error. */
5402/* We use char because int might match the return type of a gcc2
5403 builtin and then its argument prototype would still apply. */
5404char $ac_func();
5405
5406int main() {
5407
5408/* The GNU C library defines this for functions which it implements
5409 to always fail with ENOSYS. Some functions are actually named
5410 something starting with __ and the normal name is an alias. */
5411#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5412choke me
5413#else
5414$ac_func();
5415#endif
5416
5417; return 0; }
5418EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005419if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005420 rm -rf conftest*
5421 eval "ac_cv_func_$ac_func=yes"
5422else
5423 echo "configure: failed program was:" >&5
5424 cat conftest.$ac_ext >&5
5425 rm -rf conftest*
5426 eval "ac_cv_func_$ac_func=no"
5427fi
5428rm -f conftest*
5429fi
5430
5431if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5432 echo "$ac_t""yes" 1>&6
5433 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5434 cat >> confdefs.h <<EOF
5435#define $ac_tr_func 1
5436EOF
5437 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005438#line 5439 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005439#include "confdefs.h"
5440#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005441int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005442getpgrp(0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005443; return 0; }
5444EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005445if { (eval echo configure:5446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005446 rm -rf conftest*
5447 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005448#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005449EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005450
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005451
Guido van Rossumf78abae1997-01-21 22:02:36 +00005452else
Michael W. Hudson54241132001-12-07 15:38:26 +00005453 echo "configure: failed program was:" >&5
5454 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005455fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005456rm -f conftest*
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005457
Michael W. Hudson54241132001-12-07 15:38:26 +00005458else
5459 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005460fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005461done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005462
Thomas Wouters3a584202000-08-05 23:28:51 +00005463for ac_func in setpgrp
5464do
Michael W. Hudson54241132001-12-07 15:38:26 +00005465echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005466echo "configure:5467: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005467if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5468 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005469else
Michael W. Hudson54241132001-12-07 15:38:26 +00005470 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005471#line 5472 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005472#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005473/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005474 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005475#include <assert.h>
5476/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005477/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005478 builtin and then its argument prototype would still apply. */
5479char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005480
Michael W. Hudson54241132001-12-07 15:38:26 +00005481int main() {
5482
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005483/* The GNU C library defines this for functions which it implements
5484 to always fail with ENOSYS. Some functions are actually named
5485 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005486#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005487choke me
5488#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005489$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005490#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005491
Michael W. Hudson54241132001-12-07 15:38:26 +00005492; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005493EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005494if { (eval echo configure:5495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005495 rm -rf conftest*
5496 eval "ac_cv_func_$ac_func=yes"
5497else
5498 echo "configure: failed program was:" >&5
5499 cat conftest.$ac_ext >&5
5500 rm -rf conftest*
5501 eval "ac_cv_func_$ac_func=no"
5502fi
5503rm -f conftest*
5504fi
5505
5506if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5507 echo "$ac_t""yes" 1>&6
5508 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5509 cat >> confdefs.h <<EOF
5510#define $ac_tr_func 1
5511EOF
5512 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005513#line 5514 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005514#include "confdefs.h"
5515#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005516int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005517setpgrp(0,0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005518; return 0; }
5519EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005520if { (eval echo configure:5521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005521 rm -rf conftest*
5522 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005523#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005524EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005525
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005526
Guido van Rossumf78abae1997-01-21 22:02:36 +00005527else
Michael W. Hudson54241132001-12-07 15:38:26 +00005528 echo "configure: failed program was:" >&5
5529 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005530fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005531rm -f conftest*
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005532
Michael W. Hudson54241132001-12-07 15:38:26 +00005533else
5534 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005535fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005536done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005537
Thomas Wouters3a584202000-08-05 23:28:51 +00005538for ac_func in gettimeofday
5539do
Michael W. Hudson54241132001-12-07 15:38:26 +00005540echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005541echo "configure:5542: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005542if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5543 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005544else
Michael W. Hudson54241132001-12-07 15:38:26 +00005545 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005546#line 5547 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005547#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005548/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005549 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005550#include <assert.h>
5551/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005552/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005553 builtin and then its argument prototype would still apply. */
5554char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005555
Michael W. Hudson54241132001-12-07 15:38:26 +00005556int main() {
5557
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005558/* The GNU C library defines this for functions which it implements
5559 to always fail with ENOSYS. Some functions are actually named
5560 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005561#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005562choke me
5563#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005564$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005565#endif
5566
Michael W. Hudson54241132001-12-07 15:38:26 +00005567; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005568EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005569if { (eval echo configure:5570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005570 rm -rf conftest*
5571 eval "ac_cv_func_$ac_func=yes"
5572else
5573 echo "configure: failed program was:" >&5
5574 cat conftest.$ac_ext >&5
5575 rm -rf conftest*
5576 eval "ac_cv_func_$ac_func=no"
5577fi
5578rm -f conftest*
5579fi
5580
5581if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5582 echo "$ac_t""yes" 1>&6
5583 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5584 cat >> confdefs.h <<EOF
5585#define $ac_tr_func 1
5586EOF
5587 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005588#line 5589 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005589#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005590#include <sys/time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005591int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005592gettimeofday((struct timeval*)0,(struct timezone*)0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005593; return 0; }
5594EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005595if { (eval echo configure:5596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005596 :
5597else
Michael W. Hudson54241132001-12-07 15:38:26 +00005598 echo "configure: failed program was:" >&5
5599 cat conftest.$ac_ext >&5
5600 rm -rf conftest*
5601 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005602#define GETTIMEOFDAY_NO_TZ 1
5603EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005604
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005605
Guido van Rossum627b2d71993-12-24 10:39:16 +00005606fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005607rm -f conftest*
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005608
Michael W. Hudson54241132001-12-07 15:38:26 +00005609else
5610 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005611fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005612done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005613
Michael W. Hudson54241132001-12-07 15:38:26 +00005614
5615
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005616# On OSF/1 V5.1, getaddrinfo is available, but a define
Michael W. Hudson54241132001-12-07 15:38:26 +00005617# for [no]getaddrinfo in netdb.h.
5618echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005619echo "configure:5620: checking for getaddrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005620cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005621#line 5622 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005622#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005623
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005624#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005625#include <sys/socket.h>
5626#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005627#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005628
Michael W. Hudson54241132001-12-07 15:38:26 +00005629int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005630
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005631getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005632
Michael W. Hudson54241132001-12-07 15:38:26 +00005633; return 0; }
5634EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005635if { (eval echo configure:5636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005636 rm -rf conftest*
5637
5638echo "$ac_t""yes" 1>&6
5639echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005640echo "configure:5641: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005641if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005642 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005643buggygetaddrinfo=yes
5644else
Michael W. Hudson54241132001-12-07 15:38:26 +00005645 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005646#line 5647 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005647#include "confdefs.h"
5648
5649#include <sys/types.h>
5650#include <netdb.h>
5651#include <string.h>
5652#include <sys/socket.h>
5653#include <netinet/in.h>
5654
5655main()
5656{
5657 int passive, gaierr, inet4 = 0, inet6 = 0;
5658 struct addrinfo hints, *ai, *aitop;
5659 char straddr[INET6_ADDRSTRLEN], strport[16];
5660
5661 for (passive = 0; passive <= 1; passive++) {
5662 memset(&hints, 0, sizeof(hints));
5663 hints.ai_family = AF_UNSPEC;
5664 hints.ai_flags = passive ? AI_PASSIVE : 0;
5665 hints.ai_socktype = SOCK_STREAM;
5666 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5667 (void)gai_strerror(gaierr);
5668 goto bad;
5669 }
5670 for (ai = aitop; ai; ai = ai->ai_next) {
5671 if (ai->ai_addr == NULL ||
5672 ai->ai_addrlen == 0 ||
5673 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5674 straddr, sizeof(straddr), strport, sizeof(strport),
5675 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5676 goto bad;
5677 }
5678 switch (ai->ai_family) {
5679 case AF_INET:
5680 if (strcmp(strport, "54321") != 0) {
5681 goto bad;
5682 }
5683 if (passive) {
5684 if (strcmp(straddr, "0.0.0.0") != 0) {
5685 goto bad;
5686 }
5687 } else {
5688 if (strcmp(straddr, "127.0.0.1") != 0) {
5689 goto bad;
5690 }
5691 }
5692 inet4++;
5693 break;
5694 case AF_INET6:
5695 if (strcmp(strport, "54321") != 0) {
5696 goto bad;
5697 }
5698 if (passive) {
5699 if (strcmp(straddr, "::") != 0) {
5700 goto bad;
5701 }
5702 } else {
5703 if (strcmp(straddr, "::1") != 0) {
5704 goto bad;
5705 }
5706 }
5707 inet6++;
5708 break;
5709 case AF_UNSPEC:
5710 goto bad;
5711 break;
5712 default:
5713 /* another family support? */
5714 break;
5715 }
5716 }
5717 }
5718
5719 if (!(inet4 == 0 || inet4 == 2))
5720 goto bad;
5721 if (!(inet6 == 0 || inet6 == 2))
5722 goto bad;
5723
5724 if (aitop)
5725 freeaddrinfo(aitop);
5726 exit(0);
5727
5728 bad:
5729 if (aitop)
5730 freeaddrinfo(aitop);
5731 exit(1);
5732}
5733
Michael W. Hudson54241132001-12-07 15:38:26 +00005734EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005735if { (eval echo configure:5736: \"$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 +00005736then
5737 echo "$ac_t""good" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005738buggygetaddrinfo=no
5739else
Michael W. Hudson54241132001-12-07 15:38:26 +00005740 echo "configure: failed program was:" >&5
5741 cat conftest.$ac_ext >&5
5742 rm -fr conftest*
5743 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005744buggygetaddrinfo=yes
5745fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005746rm -fr conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005747fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005748
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005749else
Michael W. Hudson54241132001-12-07 15:38:26 +00005750 echo "configure: failed program was:" >&5
5751 cat conftest.$ac_ext >&5
5752 rm -rf conftest*
5753
5754echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005755buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005756
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005757fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005758rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005759
5760if test "$buggygetaddrinfo" = "yes"; then
5761 if test "$ipv6" = "yes"; then
5762 echo 'Fatal: You must get working getaddrinfo() function.'
5763 echo ' or you can specify "--disable-ipv6"'.
5764 exit 1
5765 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005766else
Michael W. Hudson54241132001-12-07 15:38:26 +00005767 cat >> confdefs.h <<\EOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005768#define HAVE_GETADDRINFO 1
5769EOF
5770
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005771fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005772for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005773do
Michael W. Hudson54241132001-12-07 15:38:26 +00005774echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005775echo "configure:5776: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005776if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5777 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005778else
Michael W. Hudson54241132001-12-07 15:38:26 +00005779 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005780#line 5781 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005781#include "confdefs.h"
5782/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005783 which can conflict with char $ac_func(); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005784#include <assert.h>
5785/* Override any gcc2 internal prototype to avoid an error. */
5786/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005787 builtin and then its argument prototype would still apply. */
5788char $ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005789
Michael W. Hudson54241132001-12-07 15:38:26 +00005790int main() {
5791
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005792/* The GNU C library defines this for functions which it implements
5793 to always fail with ENOSYS. Some functions are actually named
5794 something starting with __ and the normal name is an alias. */
5795#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5796choke me
5797#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005798$ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005799#endif
5800
Michael W. Hudson54241132001-12-07 15:38:26 +00005801; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005802EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005803if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005804 rm -rf conftest*
5805 eval "ac_cv_func_$ac_func=yes"
5806else
5807 echo "configure: failed program was:" >&5
5808 cat conftest.$ac_ext >&5
5809 rm -rf conftest*
5810 eval "ac_cv_func_$ac_func=no"
5811fi
5812rm -f conftest*
5813fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005814
Michael W. Hudson54241132001-12-07 15:38:26 +00005815if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5816 echo "$ac_t""yes" 1>&6
5817 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5818 cat >> confdefs.h <<EOF
5819#define $ac_tr_func 1
5820EOF
5821
5822else
5823 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005824fi
5825done
5826
Michael W. Hudson54241132001-12-07 15:38:26 +00005827
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005828# checks for structures
Michael W. Hudson54241132001-12-07 15:38:26 +00005829echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005830echo "configure:5831: checking whether time.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005831if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5832 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005833else
Michael W. Hudson54241132001-12-07 15:38:26 +00005834 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005835#line 5836 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005836#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005837#include <sys/types.h>
5838#include <sys/time.h>
5839#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005840int main() {
5841struct tm *tp;
5842; return 0; }
5843EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005844if { (eval echo configure:5845: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005845 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005846 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005847else
Michael W. Hudson54241132001-12-07 15:38:26 +00005848 echo "configure: failed program was:" >&5
5849 cat conftest.$ac_ext >&5
5850 rm -rf conftest*
5851 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005852fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005853rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005854fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005855
Michael W. Hudson54241132001-12-07 15:38:26 +00005856echo "$ac_t""$ac_cv_header_time" 1>&6
5857if test $ac_cv_header_time = yes; then
5858 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005859#define TIME_WITH_SYS_TIME 1
5860EOF
5861
5862fi
5863
Michael W. Hudson54241132001-12-07 15:38:26 +00005864echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005865echo "configure:5866: checking whether struct tm is in sys/time.h or time.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005866if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5867 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005868else
Michael W. Hudson54241132001-12-07 15:38:26 +00005869 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005870#line 5871 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005871#include "confdefs.h"
5872#include <sys/types.h>
5873#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005874int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005875struct tm *tp; tp->tm_sec;
Michael W. Hudson54241132001-12-07 15:38:26 +00005876; return 0; }
5877EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005878if { (eval echo configure:5879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005879 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005880 ac_cv_struct_tm=time.h
5881else
Michael W. Hudson54241132001-12-07 15:38:26 +00005882 echo "configure: failed program was:" >&5
5883 cat conftest.$ac_ext >&5
5884 rm -rf conftest*
5885 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005886fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005887rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005888fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005889
Michael W. Hudson54241132001-12-07 15:38:26 +00005890echo "$ac_t""$ac_cv_struct_tm" 1>&6
5891if test $ac_cv_struct_tm = sys/time.h; then
5892 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005893#define TM_IN_SYS_TIME 1
5894EOF
5895
5896fi
5897
Michael W. Hudson54241132001-12-07 15:38:26 +00005898echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005899echo "configure:5900: checking for tm_zone in struct tm" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005900if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5901 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005902else
Michael W. Hudson54241132001-12-07 15:38:26 +00005903 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005904#line 5905 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005905#include "confdefs.h"
5906#include <sys/types.h>
5907#include <$ac_cv_struct_tm>
Michael W. Hudson54241132001-12-07 15:38:26 +00005908int main() {
5909struct tm tm; tm.tm_zone;
5910; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005911EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005912if { (eval echo configure:5913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005913 rm -rf conftest*
5914 ac_cv_struct_tm_zone=yes
5915else
5916 echo "configure: failed program was:" >&5
5917 cat conftest.$ac_ext >&5
5918 rm -rf conftest*
5919 ac_cv_struct_tm_zone=no
5920fi
5921rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005922fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005923
Michael W. Hudson54241132001-12-07 15:38:26 +00005924echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5925if test "$ac_cv_struct_tm_zone" = yes; then
5926 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005927#define HAVE_TM_ZONE 1
5928EOF
5929
5930else
Michael W. Hudson54241132001-12-07 15:38:26 +00005931 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005932echo "configure:5933: checking for tzname" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005933if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5934 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005935else
Michael W. Hudson54241132001-12-07 15:38:26 +00005936 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005937#line 5938 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005938#include "confdefs.h"
5939#include <time.h>
5940#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005941extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005942#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005943int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005944atoi(*tzname);
Michael W. Hudson54241132001-12-07 15:38:26 +00005945; return 0; }
5946EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005947if { (eval echo configure:5948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005948 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005949 ac_cv_var_tzname=yes
5950else
Michael W. Hudson54241132001-12-07 15:38:26 +00005951 echo "configure: failed program was:" >&5
5952 cat conftest.$ac_ext >&5
5953 rm -rf conftest*
5954 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005955fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005956rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005957fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005958
Michael W. Hudson54241132001-12-07 15:38:26 +00005959echo "$ac_t""$ac_cv_var_tzname" 1>&6
5960 if test $ac_cv_var_tzname = yes; then
5961 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005962#define HAVE_TZNAME 1
5963EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005964
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005965 fi
5966fi
5967
Michael W. Hudson54241132001-12-07 15:38:26 +00005968echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005969echo "configure:5970: checking for st_rdev in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005970if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
5971 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005972else
Michael W. Hudson54241132001-12-07 15:38:26 +00005973 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005974#line 5975 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005975#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005976#include <sys/types.h>
5977#include <sys/stat.h>
5978int main() {
5979struct stat s; s.st_rdev;
5980; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005981EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005982if { (eval echo configure:5983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005983 rm -rf conftest*
5984 ac_cv_struct_st_rdev=yes
5985else
5986 echo "configure: failed program was:" >&5
5987 cat conftest.$ac_ext >&5
5988 rm -rf conftest*
5989 ac_cv_struct_st_rdev=no
5990fi
5991rm -f conftest*
5992fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005993
Michael W. Hudson54241132001-12-07 15:38:26 +00005994echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
5995if test $ac_cv_struct_st_rdev = yes; then
5996 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005997#define HAVE_ST_RDEV 1
5998EOF
5999
6000fi
6001
Michael W. Hudson54241132001-12-07 15:38:26 +00006002echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006003echo "configure:6004: checking for st_blksize in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006004if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
6005 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006006else
Michael W. Hudson54241132001-12-07 15:38:26 +00006007 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006008#line 6009 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006009#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00006010#include <sys/types.h>
6011#include <sys/stat.h>
6012int main() {
6013struct stat s; s.st_blksize;
6014; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006015EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006016if { (eval echo configure:6017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006017 rm -rf conftest*
6018 ac_cv_struct_st_blksize=yes
6019else
6020 echo "configure: failed program was:" >&5
6021 cat conftest.$ac_ext >&5
6022 rm -rf conftest*
6023 ac_cv_struct_st_blksize=no
6024fi
6025rm -f conftest*
6026fi
Jack Jansendd19cf82001-12-06 22:36:17 +00006027
Michael W. Hudson54241132001-12-07 15:38:26 +00006028echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
6029if test $ac_cv_struct_st_blksize = yes; then
6030 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006031#define HAVE_ST_BLKSIZE 1
6032EOF
6033
6034fi
6035
Michael W. Hudson54241132001-12-07 15:38:26 +00006036echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006037echo "configure:6038: checking for st_blocks in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006038if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
6039 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006040else
Michael W. Hudson54241132001-12-07 15:38:26 +00006041 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006042#line 6043 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006043#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00006044#include <sys/types.h>
6045#include <sys/stat.h>
6046int main() {
6047struct stat s; s.st_blocks;
6048; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006049EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006050if { (eval echo configure:6051: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006051 rm -rf conftest*
6052 ac_cv_struct_st_blocks=yes
6053else
6054 echo "configure: failed program was:" >&5
6055 cat conftest.$ac_ext >&5
6056 rm -rf conftest*
6057 ac_cv_struct_st_blocks=no
6058fi
6059rm -f conftest*
6060fi
Jack Jansendd19cf82001-12-06 22:36:17 +00006061
Michael W. Hudson54241132001-12-07 15:38:26 +00006062echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
6063if test $ac_cv_struct_st_blocks = yes; then
6064 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006065#define HAVE_ST_BLOCKS 1
6066EOF
6067
6068else
Michael W. Hudson54241132001-12-07 15:38:26 +00006069 LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006070fi
6071
Michael W. Hudson54241132001-12-07 15:38:26 +00006072
6073echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006074echo "configure:6075: checking for time.h that defines altzone" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006075if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
6076 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006077else
Michael W. Hudson54241132001-12-07 15:38:26 +00006078 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006079#line 6080 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006080#include "confdefs.h"
6081#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006082int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006083return altzone;
Michael W. Hudson54241132001-12-07 15:38:26 +00006084; return 0; }
6085EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006086if { (eval echo configure:6087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006087 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006088 ac_cv_header_time_altzone=yes
6089else
Michael W. Hudson54241132001-12-07 15:38:26 +00006090 echo "configure: failed program was:" >&5
6091 cat conftest.$ac_ext >&5
6092 rm -rf conftest*
6093 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006094fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006095rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006096fi
6097
Michael W. Hudson54241132001-12-07 15:38:26 +00006098echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006099if test $ac_cv_header_time_altzone = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006100 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006101#define HAVE_ALTZONE 1
6102EOF
6103
6104fi
6105
Guido van Rossumda88dad1995-01-26 00:46:29 +00006106was_it_defined=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006107echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006108echo "configure:6109: checking whether sys/select.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006109cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006110#line 6111 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006111#include "confdefs.h"
6112
6113#include <sys/types.h>
6114#include <sys/select.h>
6115#include <sys/time.h>
6116
Michael W. Hudson54241132001-12-07 15:38:26 +00006117int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006118;
Michael W. Hudson54241132001-12-07 15:38:26 +00006119; return 0; }
6120EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006121if { (eval echo configure:6122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006122 rm -rf conftest*
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006123
Michael W. Hudson54241132001-12-07 15:38:26 +00006124 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006125#define SYS_SELECT_WITH_SYS_TIME 1
6126EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006127
6128 was_it_defined=yes
6129
Guido van Rossumf78abae1997-01-21 22:02:36 +00006130else
Michael W. Hudson54241132001-12-07 15:38:26 +00006131 echo "configure: failed program was:" >&5
6132 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006133fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006134rm -f conftest*
6135echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006136
Michael W. Hudson54241132001-12-07 15:38:26 +00006137echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006138echo "configure:6139: checking for addrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006139if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
6140 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006141else
Michael W. Hudson54241132001-12-07 15:38:26 +00006142 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006143#line 6144 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006144#include "confdefs.h"
6145
6146# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006147int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006148struct addrinfo a
Michael W. Hudson54241132001-12-07 15:38:26 +00006149; return 0; }
6150EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006151if { (eval echo configure:6152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006152 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006153 ac_cv_struct_addrinfo=yes
6154else
Michael W. Hudson54241132001-12-07 15:38:26 +00006155 echo "configure: failed program was:" >&5
6156 cat conftest.$ac_ext >&5
6157 rm -rf conftest*
6158 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006159fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006160rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006161fi
6162
Michael W. Hudson54241132001-12-07 15:38:26 +00006163echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006164if test $ac_cv_struct_addrinfo = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006165 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006166#define HAVE_ADDRINFO 1
6167EOF
6168
6169fi
6170
Michael W. Hudson54241132001-12-07 15:38:26 +00006171echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006172echo "configure:6173: checking for sockaddr_storage" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006173if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
6174 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006175else
Michael W. Hudson54241132001-12-07 15:38:26 +00006176 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006177#line 6178 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006178#include "confdefs.h"
6179
6180# include <sys/types.h>
6181# include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006182int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006183struct sockaddr_storage s
Michael W. Hudson54241132001-12-07 15:38:26 +00006184; return 0; }
6185EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006186if { (eval echo configure:6187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006187 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006188 ac_cv_struct_sockaddr_storage=yes
6189else
Michael W. Hudson54241132001-12-07 15:38:26 +00006190 echo "configure: failed program was:" >&5
6191 cat conftest.$ac_ext >&5
6192 rm -rf conftest*
6193 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006194fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006195rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006196fi
6197
Michael W. Hudson54241132001-12-07 15:38:26 +00006198echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006199if test $ac_cv_struct_sockaddr_storage = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006200 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006201#define HAVE_SOCKADDR_STORAGE 1
6202EOF
6203
6204fi
6205
Guido van Rossum627b2d71993-12-24 10:39:16 +00006206# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00006207
Michael W. Hudson54241132001-12-07 15:38:26 +00006208echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006209echo "configure:6210: checking whether char is unsigned" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006210if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
6211 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006212else
Michael W. Hudson54241132001-12-07 15:38:26 +00006213 if test "$GCC" = yes; then
6214 # GCC predefines this symbol on systems where it applies.
6215cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006216#line 6217 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006217#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00006218#ifdef __CHAR_UNSIGNED__
6219 yes
6220#endif
6221
6222EOF
6223if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6224 egrep "yes" >/dev/null 2>&1; then
6225 rm -rf conftest*
6226 ac_cv_c_char_unsigned=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006227else
Michael W. Hudson54241132001-12-07 15:38:26 +00006228 rm -rf conftest*
6229 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006230fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006231rm -f conftest*
6232
6233else
6234if test "$cross_compiling" = yes; then
6235 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6236else
6237 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006238#line 6239 "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +00006239#include "confdefs.h"
6240/* volatile prevents gcc2 from optimizing the test away on sparcs. */
6241#if !defined(__STDC__) || __STDC__ != 1
6242#define volatile
6243#endif
6244main() {
6245 volatile char c = 255; exit(c < 0);
6246}
6247EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006248if { (eval echo configure:6249: \"$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 +00006249then
6250 ac_cv_c_char_unsigned=yes
6251else
6252 echo "configure: failed program was:" >&5
6253 cat conftest.$ac_ext >&5
6254 rm -fr conftest*
6255 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006256fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006257rm -fr conftest*
6258fi
6259
6260fi
6261fi
6262
6263echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006264if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006265 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006266#define __CHAR_UNSIGNED__ 1
6267EOF
6268
6269fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006270
Michael W. Hudson54241132001-12-07 15:38:26 +00006271echo $ac_n "checking for working const""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006272echo "configure:6273: checking for working const" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006273if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6274 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006275else
Michael W. Hudson54241132001-12-07 15:38:26 +00006276 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006277#line 6278 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006278#include "confdefs.h"
6279
Michael W. Hudson54241132001-12-07 15:38:26 +00006280int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006281
Michael W. Hudson54241132001-12-07 15:38:26 +00006282/* Ultrix mips cc rejects this. */
6283typedef int charset[2]; const charset x;
6284/* SunOS 4.1.1 cc rejects this. */
6285char const *const *ccp;
6286char **p;
6287/* NEC SVR4.0.2 mips cc rejects this. */
6288struct point {int x, y;};
6289static struct point const zero = {0,0};
6290/* AIX XL C 1.02.0.0 rejects this.
6291 It does not let you subtract one const X* pointer from another in an arm
6292 of an if-expression whose if-part is not a constant expression */
6293const char *g = "string";
6294ccp = &g + (g ? g-g : 0);
6295/* HPUX 7.0 cc rejects these. */
6296++ccp;
6297p = (char**) ccp;
6298ccp = (char const *const *) p;
6299{ /* SCO 3.2v4 cc rejects this. */
6300 char *t;
6301 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006302
Michael W. Hudson54241132001-12-07 15:38:26 +00006303 *t++ = 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006304}
Michael W. Hudson54241132001-12-07 15:38:26 +00006305{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6306 int x[] = {25, 17};
6307 const int *foo = &x[0];
6308 ++foo;
6309}
6310{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6311 typedef const int *iptr;
6312 iptr p = 0;
6313 ++p;
6314}
6315{ /* AIX XL C 1.02.0.0 rejects this saying
6316 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6317 struct s { int j; const int *ap[3]; };
6318 struct s *b; b->j = 5;
6319}
6320{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6321 const int foo = 10;
6322}
6323
6324; return 0; }
6325EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006326if { (eval echo configure:6327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006327 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006328 ac_cv_c_const=yes
6329else
Michael W. Hudson54241132001-12-07 15:38:26 +00006330 echo "configure: failed program was:" >&5
6331 cat conftest.$ac_ext >&5
6332 rm -rf conftest*
6333 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006334fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006335rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006336fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006337
6338echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006339if test $ac_cv_c_const = no; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006340 cat >> confdefs.h <<\EOF
6341#define const
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006342EOF
6343
6344fi
6345
Michael W. Hudson54241132001-12-07 15:38:26 +00006346
Guido van Rossumda88dad1995-01-26 00:46:29 +00006347works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006348echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006349echo "configure:6350: checking for working volatile" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006350cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006351#line 6352 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006352#include "confdefs.h"
6353
Michael W. Hudson54241132001-12-07 15:38:26 +00006354int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006355volatile int x; x = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006356; return 0; }
6357EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006358if { (eval echo configure:6359: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006359 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006360 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006361else
Michael W. Hudson54241132001-12-07 15:38:26 +00006362 echo "configure: failed program was:" >&5
6363 cat conftest.$ac_ext >&5
6364 rm -rf conftest*
6365 cat >> confdefs.h <<\EOF
6366#define volatile
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006367EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006368
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006369
Guido van Rossum627b2d71993-12-24 10:39:16 +00006370fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006371rm -f conftest*
6372echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006373
Guido van Rossumda88dad1995-01-26 00:46:29 +00006374works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006375echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006376echo "configure:6377: checking for working signed char" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006377cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006378#line 6379 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006379#include "confdefs.h"
6380
Michael W. Hudson54241132001-12-07 15:38:26 +00006381int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006382signed char c;
Michael W. Hudson54241132001-12-07 15:38:26 +00006383; return 0; }
6384EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006385if { (eval echo configure:6386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006386 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006387 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006388else
Michael W. Hudson54241132001-12-07 15:38:26 +00006389 echo "configure: failed program was:" >&5
6390 cat conftest.$ac_ext >&5
6391 rm -rf conftest*
6392 cat >> confdefs.h <<\EOF
6393#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00006394EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006395
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006396
Guido van Rossum7f43da71994-08-01 12:15:30 +00006397fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006398rm -f conftest*
6399echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006400
Guido van Rossumda88dad1995-01-26 00:46:29 +00006401have_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006402echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006403echo "configure:6404: checking for prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006404cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006405#line 6406 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006406#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006407int foo(int x) { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006408int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006409return foo(10);
Michael W. Hudson54241132001-12-07 15:38:26 +00006410; return 0; }
6411EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006412if { (eval echo configure:6413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006413 rm -rf conftest*
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006414
Michael W. Hudson54241132001-12-07 15:38:26 +00006415 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006416#define HAVE_PROTOTYPES 1
6417EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006418
6419 have_prototypes=yes
6420
Guido van Rossumf78abae1997-01-21 22:02:36 +00006421else
Michael W. Hudson54241132001-12-07 15:38:26 +00006422 echo "configure: failed program was:" >&5
6423 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006424fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006425rm -f conftest*
6426echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006427
Guido van Rossumda88dad1995-01-26 00:46:29 +00006428works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006429echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006430echo "configure:6431: checking for variable length prototypes and stdarg.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006431cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006432#line 6433 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006433#include "confdefs.h"
6434
6435#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00006436int foo(int x, ...) {
6437 va_list va;
6438 va_start(va, x);
6439 va_arg(va, int);
6440 va_arg(va, char *);
6441 va_arg(va, double);
6442 return 0;
6443}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006444
Michael W. Hudson54241132001-12-07 15:38:26 +00006445int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00006446return foo(10, "", 3.14);
Michael W. Hudson54241132001-12-07 15:38:26 +00006447; return 0; }
6448EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006449if { (eval echo configure:6450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006450 rm -rf conftest*
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006451
Michael W. Hudson54241132001-12-07 15:38:26 +00006452 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006453#define HAVE_STDARG_PROTOTYPES 1
6454EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006455
6456 works=yes
6457
Guido van Rossumf78abae1997-01-21 22:02:36 +00006458else
Michael W. Hudson54241132001-12-07 15:38:26 +00006459 echo "configure: failed program was:" >&5
6460 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006461fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006462rm -f conftest*
6463echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006464
Guido van Rossumda88dad1995-01-26 00:46:29 +00006465if test "$have_prototypes" = yes; then
6466bad_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006467echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006468echo "configure:6469: checking for bad exec* prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006469cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006470#line 6471 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006471#include "confdefs.h"
6472#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006473int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006474char **t;execve("@",t,t);
Michael W. Hudson54241132001-12-07 15:38:26 +00006475; return 0; }
6476EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006477if { (eval echo configure:6478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006478 :
6479else
Michael W. Hudson54241132001-12-07 15:38:26 +00006480 echo "configure: failed program was:" >&5
6481 cat conftest.$ac_ext >&5
6482 rm -rf conftest*
6483 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006484#define BAD_EXEC_PROTOTYPES 1
6485EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006486
6487 bad_prototypes=yes
6488
Guido van Rossum627b2d71993-12-24 10:39:16 +00006489fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006490rm -f conftest*
6491echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006492fi
6493
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006494# check if sockaddr has sa_len member
Michael W. Hudson54241132001-12-07 15:38:26 +00006495echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006496echo "configure:6497: checking if sockaddr has sa_len member" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006497cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006498#line 6499 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006499#include "confdefs.h"
6500#include <sys/types.h>
6501#include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006502int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006503struct sockaddr x;
6504x.sa_len = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006505; return 0; }
6506EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006507if { (eval echo configure:6508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006508 rm -rf conftest*
6509 echo "$ac_t""yes" 1>&6
6510 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006511#define HAVE_SOCKADDR_SA_LEN 1
6512EOF
6513
6514else
Michael W. Hudson54241132001-12-07 15:38:26 +00006515 echo "configure: failed program was:" >&5
6516 cat conftest.$ac_ext >&5
6517 rm -rf conftest*
6518 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006519fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006520rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006521
Michael W. Hudson54241132001-12-07 15:38:26 +00006522echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006523echo "configure:6524: checking for bad static forward" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006524if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
6525 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006526else
6527 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006528 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006529else
Michael W. Hudson54241132001-12-07 15:38:26 +00006530 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006531#line 6532 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006532#include "confdefs.h"
6533
6534struct s { int a; int b; };
6535static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006536int foobar() {
6537 static int random;
6538 random = (int) &foo;
6539 return random;
6540}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006541static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006542main() {
6543 exit(!((int)&foo == foobar()));
6544}
Michael W. Hudson54241132001-12-07 15:38:26 +00006545EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006546if { (eval echo configure:6547: \"$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 +00006547then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006548 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006549else
Michael W. Hudson54241132001-12-07 15:38:26 +00006550 echo "configure: failed program was:" >&5
6551 cat conftest.$ac_ext >&5
6552 rm -fr conftest*
6553 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006554fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006555rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006556fi
6557
Michael W. Hudson54241132001-12-07 15:38:26 +00006558fi
6559
6560echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006561if test "$ac_cv_bad_static_forward" = yes
6562then
Michael W. Hudson54241132001-12-07 15:38:26 +00006563 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006564#define BAD_STATIC_FORWARD 1
6565EOF
6566
6567fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006568
Guido van Rossumda88dad1995-01-26 00:46:29 +00006569va_list_is_array=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006570echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006571echo "configure:6572: checking whether va_list is an array" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006572cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006573#line 6574 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006574#include "confdefs.h"
6575
6576#ifdef HAVE_STDARG_PROTOTYPES
6577#include <stdarg.h>
6578#else
6579#include <varargs.h>
6580#endif
6581
Michael W. Hudson54241132001-12-07 15:38:26 +00006582int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006583va_list list1, list2; list1 = list2;
Michael W. Hudson54241132001-12-07 15:38:26 +00006584; return 0; }
6585EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006586if { (eval echo configure:6587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006587 :
6588else
Michael W. Hudson54241132001-12-07 15:38:26 +00006589 echo "configure: failed program was:" >&5
6590 cat conftest.$ac_ext >&5
6591 rm -rf conftest*
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006592
6593 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006594#define VA_LIST_IS_ARRAY 1
6595EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006596
Guido van Rossumda88dad1995-01-26 00:46:29 +00006597 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006598
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006599fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006600rm -f conftest*
6601echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006602
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006603# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Michael W. Hudson54241132001-12-07 15:38:26 +00006604echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006605echo "configure:6606: checking for gethostbyname_r" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006606if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
6607 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006608else
Michael W. Hudson54241132001-12-07 15:38:26 +00006609 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006610#line 6611 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006611#include "confdefs.h"
6612/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006613 which can conflict with char gethostbyname_r(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006614#include <assert.h>
6615/* Override any gcc2 internal prototype to avoid an error. */
6616/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006617 builtin and then its argument prototype would still apply. */
6618char gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006619
Michael W. Hudson54241132001-12-07 15:38:26 +00006620int main() {
6621
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006622/* The GNU C library defines this for functions which it implements
6623 to always fail with ENOSYS. Some functions are actually named
6624 something starting with __ and the normal name is an alias. */
6625#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6626choke me
6627#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006628gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006629#endif
6630
Michael W. Hudson54241132001-12-07 15:38:26 +00006631; return 0; }
6632EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006633if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006634 rm -rf conftest*
6635 eval "ac_cv_func_gethostbyname_r=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006636else
Michael W. Hudson54241132001-12-07 15:38:26 +00006637 echo "configure: failed program was:" >&5
6638 cat conftest.$ac_ext >&5
6639 rm -rf conftest*
6640 eval "ac_cv_func_gethostbyname_r=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006641fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006642rm -f conftest*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006643fi
6644
Michael W. Hudson54241132001-12-07 15:38:26 +00006645if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6646 echo "$ac_t""yes" 1>&6
6647
6648 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006649#define HAVE_GETHOSTBYNAME_R 1
6650EOF
6651
Michael W. Hudson54241132001-12-07 15:38:26 +00006652 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006653echo "configure:6654: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006654 OLD_CFLAGS=$CFLAGS
6655 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006656 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006657#line 6658 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006658#include "confdefs.h"
6659
6660# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006661
6662int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006663
6664 char *name;
6665 struct hostent *he, *res;
6666 char buffer[2048];
6667 int buflen = 2048;
6668 int h_errnop;
6669
6670 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006671
6672; return 0; }
6673EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006674if { (eval echo configure:6675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006675 rm -rf conftest*
6676
6677 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006678#define HAVE_GETHOSTBYNAME_R 1
6679EOF
6680
Michael W. Hudson54241132001-12-07 15:38:26 +00006681 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006682#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6683EOF
6684
Michael W. Hudson54241132001-12-07 15:38:26 +00006685 echo "$ac_t""yes" 1>&6
6686
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006687else
Michael W. Hudson54241132001-12-07 15:38:26 +00006688 echo "configure: failed program was:" >&5
6689 cat conftest.$ac_ext >&5
6690 rm -rf conftest*
6691
6692 echo "$ac_t""no" 1>&6
6693 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006694echo "configure:6695: checking gethostbyname_r with 5 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006695 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006696#line 6697 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006697#include "confdefs.h"
6698
6699# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006700
6701int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006702
6703 char *name;
6704 struct hostent *he;
6705 char buffer[2048];
6706 int buflen = 2048;
6707 int h_errnop;
6708
6709 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006710
6711; return 0; }
6712EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006713if { (eval echo configure:6714: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006714 rm -rf conftest*
6715
6716 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006717#define HAVE_GETHOSTBYNAME_R 1
6718EOF
6719
Michael W. Hudson54241132001-12-07 15:38:26 +00006720 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006721#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6722EOF
6723
Michael W. Hudson54241132001-12-07 15:38:26 +00006724 echo "$ac_t""yes" 1>&6
6725
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006726else
Michael W. Hudson54241132001-12-07 15:38:26 +00006727 echo "configure: failed program was:" >&5
6728 cat conftest.$ac_ext >&5
6729 rm -rf conftest*
6730
6731 echo "$ac_t""no" 1>&6
6732 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006733echo "configure:6734: checking gethostbyname_r with 3 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006734 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006735#line 6736 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006736#include "confdefs.h"
6737
6738# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006739
6740int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006741
6742 char *name;
6743 struct hostent *he;
6744 struct hostent_data data;
6745
6746 (void) gethostbyname_r(name, he, &data);
Michael W. Hudson54241132001-12-07 15:38:26 +00006747
6748; return 0; }
6749EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006750if { (eval echo configure:6751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006751 rm -rf conftest*
6752
6753 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006754#define HAVE_GETHOSTBYNAME_R 1
6755EOF
6756
Michael W. Hudson54241132001-12-07 15:38:26 +00006757 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006758#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6759EOF
6760
Michael W. Hudson54241132001-12-07 15:38:26 +00006761 echo "$ac_t""yes" 1>&6
6762
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006763else
Michael W. Hudson54241132001-12-07 15:38:26 +00006764 echo "configure: failed program was:" >&5
6765 cat conftest.$ac_ext >&5
6766 rm -rf conftest*
6767
6768 echo "$ac_t""no" 1>&6
6769
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006770fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006771rm -f conftest*
6772
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006773fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006774rm -f conftest*
6775
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006776fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006777rm -f conftest*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006778 CFLAGS=$OLD_CFLAGS
6779
6780else
Michael W. Hudson54241132001-12-07 15:38:26 +00006781 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006782
Michael W. Hudson54241132001-12-07 15:38:26 +00006783 for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +00006784do
Michael W. Hudson54241132001-12-07 15:38:26 +00006785echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006786echo "configure:6787: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006787if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6788 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006789else
Michael W. Hudson54241132001-12-07 15:38:26 +00006790 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006791#line 6792 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006792#include "confdefs.h"
6793/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006794 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006795#include <assert.h>
6796/* Override any gcc2 internal prototype to avoid an error. */
6797/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006798 builtin and then its argument prototype would still apply. */
6799char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006800
Michael W. Hudson54241132001-12-07 15:38:26 +00006801int main() {
6802
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006803/* The GNU C library defines this for functions which it implements
6804 to always fail with ENOSYS. Some functions are actually named
6805 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006806#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006807choke me
6808#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006809$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006810#endif
6811
Michael W. Hudson54241132001-12-07 15:38:26 +00006812; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006813EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006814if { (eval echo configure:6815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006815 rm -rf conftest*
6816 eval "ac_cv_func_$ac_func=yes"
6817else
6818 echo "configure: failed program was:" >&5
6819 cat conftest.$ac_ext >&5
6820 rm -rf conftest*
6821 eval "ac_cv_func_$ac_func=no"
6822fi
6823rm -f conftest*
6824fi
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006825
Michael W. Hudson54241132001-12-07 15:38:26 +00006826if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6827 echo "$ac_t""yes" 1>&6
6828 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6829 cat >> confdefs.h <<EOF
6830#define $ac_tr_func 1
6831EOF
6832
6833else
6834 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006835fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006836done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006837
Michael W. Hudson54241132001-12-07 15:38:26 +00006838
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006839fi
6840
Michael W. Hudson54241132001-12-07 15:38:26 +00006841
6842
6843
6844
6845
6846
Guido van Rossum627b2d71993-12-24 10:39:16 +00006847# checks for system services
6848# (none yet)
6849
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006850# Linux requires this for correct f.p. operations
Michael W. Hudson54241132001-12-07 15:38:26 +00006851echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006852echo "configure:6853: checking for __fpu_control" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006853if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
6854 echo $ac_n "(cached) $ac_c" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006855else
Michael W. Hudson54241132001-12-07 15:38:26 +00006856 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006857#line 6858 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006858#include "confdefs.h"
6859/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006860 which can conflict with char __fpu_control(); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006861#include <assert.h>
6862/* Override any gcc2 internal prototype to avoid an error. */
6863/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006864 builtin and then its argument prototype would still apply. */
6865char __fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006866
Michael W. Hudson54241132001-12-07 15:38:26 +00006867int main() {
6868
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006869/* The GNU C library defines this for functions which it implements
6870 to always fail with ENOSYS. Some functions are actually named
6871 something starting with __ and the normal name is an alias. */
6872#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6873choke me
6874#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006875__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006876#endif
6877
Michael W. Hudson54241132001-12-07 15:38:26 +00006878; return 0; }
6879EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006880if { (eval echo configure:6881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006881 rm -rf conftest*
6882 eval "ac_cv_func___fpu_control=yes"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006883else
Michael W. Hudson54241132001-12-07 15:38:26 +00006884 echo "configure: failed program was:" >&5
6885 cat conftest.$ac_ext >&5
6886 rm -rf conftest*
6887 eval "ac_cv_func___fpu_control=no"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006888fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006889rm -f conftest*
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006890fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006891
6892if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6893 echo "$ac_t""yes" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006894 :
6895else
Michael W. Hudson54241132001-12-07 15:38:26 +00006896 echo "$ac_t""no" 1>&6
6897echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006898echo "configure:6899: checking for __fpu_control in -lieee" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006899ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
6900if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6901 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006902else
Michael W. Hudson54241132001-12-07 15:38:26 +00006903 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006904LIBS="-lieee $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006905cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006906#line 6907 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006907#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006908/* Override any gcc2 internal prototype to avoid an error. */
6909/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006910 builtin and then its argument prototype would still apply. */
6911char __fpu_control();
6912
6913int main() {
6914__fpu_control()
6915; return 0; }
6916EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006917if { (eval echo configure:6918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006918 rm -rf conftest*
6919 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006920else
Michael W. Hudson54241132001-12-07 15:38:26 +00006921 echo "configure: failed program was:" >&5
6922 cat conftest.$ac_ext >&5
6923 rm -rf conftest*
6924 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006925fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006926rm -f conftest*
6927LIBS="$ac_save_LIBS"
6928
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006929fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006930if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6931 echo "$ac_t""yes" 1>&6
6932 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6933 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6934 cat >> confdefs.h <<EOF
6935#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006936EOF
6937
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006938 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006939
Michael W. Hudson54241132001-12-07 15:38:26 +00006940else
6941 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006942fi
6943
Michael W. Hudson54241132001-12-07 15:38:26 +00006944
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006945fi
6946
Michael W. Hudson54241132001-12-07 15:38:26 +00006947
Guido van Rossum7f253911997-05-09 02:42:48 +00006948# Check for --with-fpectl
Michael W. Hudson54241132001-12-07 15:38:26 +00006949echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006950echo "configure:6951: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006951# Check whether --with-fpectl or --without-fpectl was given.
6952if test "${with_fpectl+set}" = set; then
6953 withval="$with_fpectl"
Michael W. Hudson54241132001-12-07 15:38:26 +00006954
Guido van Rossum7f253911997-05-09 02:42:48 +00006955if test "$withval" != no
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006956then
6957 cat >> confdefs.h <<\EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00006958#define WANT_SIGFPE_HANDLER 1
6959EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006960
6961 echo "$ac_t""yes" 1>&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006962else echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006963fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006964else
Michael W. Hudson54241132001-12-07 15:38:26 +00006965 echo "$ac_t""no" 1>&6
6966fi
6967
Guido van Rossum7f253911997-05-09 02:42:48 +00006968
Guido van Rossum7f43da71994-08-01 12:15:30 +00006969# check for --with-libm=...
6970
Guido van Rossum563e7081996-09-10 18:20:48 +00006971case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006972Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006973BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006974*) LIBM=-lm
6975esac
Michael W. Hudson54241132001-12-07 15:38:26 +00006976echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006977echo "configure:6978: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006978# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006979if test "${with_libm+set}" = set; then
6980 withval="$with_libm"
Michael W. Hudson54241132001-12-07 15:38:26 +00006981
Guido van Rossum7f253911997-05-09 02:42:48 +00006982if test "$withval" = no
6983then LIBM=
Michael W. Hudson54241132001-12-07 15:38:26 +00006984 echo "$ac_t""force LIBM empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006985elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006986then LIBM=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00006987 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
6988else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006989fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006990else
Michael W. Hudson54241132001-12-07 15:38:26 +00006991 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
6992fi
6993
Guido van Rossum7f43da71994-08-01 12:15:30 +00006994
6995# check for --with-libc=...
6996
Michael W. Hudson54241132001-12-07 15:38:26 +00006997echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006998echo "configure:6999: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006999# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007000if test "${with_libc+set}" = set; then
7001 withval="$with_libc"
Michael W. Hudson54241132001-12-07 15:38:26 +00007002
Guido van Rossum7f253911997-05-09 02:42:48 +00007003if test "$withval" = no
7004then LIBC=
Michael W. Hudson54241132001-12-07 15:38:26 +00007005 echo "$ac_t""force LIBC empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00007006elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00007007then LIBC=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00007008 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
7009else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00007010fi
Guido van Rossum7f253911997-05-09 02:42:48 +00007011else
Michael W. Hudson54241132001-12-07 15:38:26 +00007012 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
7013fi
7014
Guido van Rossum7f43da71994-08-01 12:15:30 +00007015
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00007016# check for hypot() in math library
7017LIBS_SAVE=$LIBS
7018LIBS="$LIBS $LIBM"
7019for ac_func in hypot
7020do
Michael W. Hudson54241132001-12-07 15:38:26 +00007021echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007022echo "configure:7023: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007023if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7024 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00007025else
Michael W. Hudson54241132001-12-07 15:38:26 +00007026 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007027#line 7028 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00007028#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007029/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00007030 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007031#include <assert.h>
7032/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007033/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007034 builtin and then its argument prototype would still apply. */
7035char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007036
Michael W. Hudson54241132001-12-07 15:38:26 +00007037int main() {
7038
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00007039/* The GNU C library defines this for functions which it implements
7040 to always fail with ENOSYS. Some functions are actually named
7041 something starting with __ and the normal name is an alias. */
7042#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7043choke me
7044#else
Michael W. Hudson54241132001-12-07 15:38:26 +00007045$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00007046#endif
7047
Michael W. Hudson54241132001-12-07 15:38:26 +00007048; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00007049EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007050if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007051 rm -rf conftest*
7052 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00007053else
Michael W. Hudson54241132001-12-07 15:38:26 +00007054 echo "configure: failed program was:" >&5
7055 cat conftest.$ac_ext >&5
7056 rm -rf conftest*
7057 eval "ac_cv_func_$ac_func=no"
7058fi
7059rm -f conftest*
7060fi
7061
7062if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7063 echo "$ac_t""yes" 1>&6
7064 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7065 cat >> confdefs.h <<EOF
7066#define $ac_tr_func 1
7067EOF
7068
7069else
7070 echo "$ac_t""no" 1>&6
7071LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00007072fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00007073done
7074
Michael W. Hudson54241132001-12-07 15:38:26 +00007075
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00007076LIBS=$LIBS_SAVE
7077
Guido van Rossumad713701997-07-10 22:42:38 +00007078# check whether malloc(0) returns NULL or not
Michael W. Hudson54241132001-12-07 15:38:26 +00007079echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007080echo "configure:7081: checking what malloc(0) returns" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007081if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
7082 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00007083else
7084 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007085 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +00007086else
Michael W. Hudson54241132001-12-07 15:38:26 +00007087 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007088#line 7089 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00007089#include "confdefs.h"
7090#include <stdio.h>
7091#ifdef HAVE_STDLIB
7092#include <stdlib.h>
7093#else
7094char *malloc(), *realloc();
7095int *free();
7096#endif
7097main() {
7098 char *p;
7099 p = malloc(0);
7100 if (p == NULL) exit(1);
7101 p = realloc(p, 0);
7102 if (p == NULL) exit(1);
7103 free(p);
7104 exit(0);
7105}
Michael W. Hudson54241132001-12-07 15:38:26 +00007106EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007107if { (eval echo configure:7108: \"$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 +00007108then
Guido van Rossumad713701997-07-10 22:42:38 +00007109 ac_cv_malloc_zero=nonnull
7110else
Michael W. Hudson54241132001-12-07 15:38:26 +00007111 echo "configure: failed program was:" >&5
7112 cat conftest.$ac_ext >&5
7113 rm -fr conftest*
7114 ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +00007115fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007116rm -fr conftest*
Guido van Rossumad713701997-07-10 22:42:38 +00007117fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007118
Guido van Rossumad713701997-07-10 22:42:38 +00007119fi
Guido van Rossum3065c942001-09-17 04:03:14 +00007120 # XXX arm cross-compile?
Michael W. Hudson54241132001-12-07 15:38:26 +00007121echo "$ac_t""$ac_cv_malloc_zero" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00007122if test "$ac_cv_malloc_zero" = null
7123then
Michael W. Hudson54241132001-12-07 15:38:26 +00007124 cat >> confdefs.h <<\EOF
Guido van Rossumad713701997-07-10 22:42:38 +00007125#define MALLOC_ZERO_RETURNS_NULL 1
7126EOF
7127
7128fi
7129
Guido van Rossumef2255b2000-03-10 22:30:29 +00007130# check for wchar.h
Michael W. Hudson54241132001-12-07 15:38:26 +00007131ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
7132echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007133echo "configure:7134: checking for wchar.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007134if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7135 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00007136else
Michael W. Hudson54241132001-12-07 15:38:26 +00007137 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007138#line 7139 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007139#include "confdefs.h"
7140#include <wchar.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007141EOF
7142ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007143{ (eval echo configure:7144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007144ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7145if test -z "$ac_err"; then
7146 rm -rf conftest*
7147 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007148else
Michael W. Hudson54241132001-12-07 15:38:26 +00007149 echo "$ac_err" >&5
7150 echo "configure: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007151 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007152 rm -rf conftest*
7153 eval "ac_cv_header_$ac_safe=no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007154fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007155rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007156fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007157if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7158 echo "$ac_t""yes" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007159
Michael W. Hudson54241132001-12-07 15:38:26 +00007160 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007161#define HAVE_WCHAR_H 1
7162EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007163
7164 wchar_h="yes"
7165
Guido van Rossumef2255b2000-03-10 22:30:29 +00007166else
Michael W. Hudson54241132001-12-07 15:38:26 +00007167 echo "$ac_t""no" 1>&6
7168wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007169
7170fi
7171
Michael W. Hudson54241132001-12-07 15:38:26 +00007172
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007173# determine wchar_t size
7174if test "$wchar_h" = yes
7175then
Michael W. Hudson54241132001-12-07 15:38:26 +00007176 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007177echo "configure:7178: checking size of wchar_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007178if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
7179 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007180else
7181 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007182 ac_cv_sizeof_wchar_t=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00007183else
Michael W. Hudson54241132001-12-07 15:38:26 +00007184 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007185#line 7186 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007186#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007187#include <stdio.h>
7188main()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007189{
Michael W. Hudson54241132001-12-07 15:38:26 +00007190 FILE *f=fopen("conftestval", "w");
7191 if (!f) exit(1);
7192 fprintf(f, "%d\n", sizeof(wchar_t));
7193 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00007194}
Michael W. Hudson54241132001-12-07 15:38:26 +00007195EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007196if { (eval echo configure:7197: \"$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 +00007197then
7198 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007199else
Michael W. Hudson54241132001-12-07 15:38:26 +00007200 echo "configure: failed program was:" >&5
7201 cat conftest.$ac_ext >&5
7202 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007203 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00007204fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007205rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007206fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007207
7208fi
7209echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
7210cat >> confdefs.h <<EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007211#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
7212EOF
7213
Michael W. Hudson54241132001-12-07 15:38:26 +00007214
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007215fi
7216
Michael W. Hudson54241132001-12-07 15:38:26 +00007217echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007218echo "configure:7219: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007219# Check whether --enable-unicode or --disable-unicode was given.
7220if test "${enable_unicode+set}" = set; then
7221 enableval="$enable_unicode"
Michael W. Hudson54241132001-12-07 15:38:26 +00007222 :
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007223else
7224 enable_unicode=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00007225fi
7226
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007227
7228if test $enable_unicode = yes
7229then
Martin v. Löwisfd917792001-06-27 20:22:04 +00007230 # Without any arguments, Py_UNICODE defaults to two-byte mode
7231 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007232fi
7233
7234case "$enable_unicode" in
7235ucs2) unicode_size="2"
Michael W. Hudson54241132001-12-07 15:38:26 +00007236 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007237#define Py_UNICODE_SIZE 2
7238EOF
7239
7240 ;;
7241ucs4) unicode_size="4"
Michael W. Hudson54241132001-12-07 15:38:26 +00007242 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007243#define Py_UNICODE_SIZE 4
7244EOF
7245
7246 ;;
7247esac
7248
Michael W. Hudson54241132001-12-07 15:38:26 +00007249
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007250if test "$enable_unicode" = "no"
7251then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007252 UNICODE_OBJS=""
Michael W. Hudson54241132001-12-07 15:38:26 +00007253 echo "$ac_t""not used" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007254else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007255 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Michael W. Hudson54241132001-12-07 15:38:26 +00007256 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007257#define Py_USING_UNICODE 1
7258EOF
7259
7260 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
7261 then
7262 PY_UNICODE_TYPE="wchar_t"
Michael W. Hudson54241132001-12-07 15:38:26 +00007263 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007264#define HAVE_USABLE_WCHAR_T 1
7265EOF
7266
Michael W. Hudson54241132001-12-07 15:38:26 +00007267 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007268#define PY_UNICODE_TYPE wchar_t
7269EOF
7270
7271 elif test "$ac_cv_sizeof_short" = "$unicode_size"
7272 then
7273 PY_UNICODE_TYPE="unsigned short"
Michael W. Hudson54241132001-12-07 15:38:26 +00007274 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007275#define PY_UNICODE_TYPE unsigned short
7276EOF
7277
7278 elif test "$ac_cv_sizeof_long" = "$unicode_size"
7279 then
7280 PY_UNICODE_TYPE="unsigned long"
Michael W. Hudson54241132001-12-07 15:38:26 +00007281 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007282#define PY_UNICODE_TYPE unsigned long
7283EOF
7284
7285 else
7286 PY_UNICODE_TYPE="no type found"
7287 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007288 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007289fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007290
7291# check for endianness
Michael W. Hudson54241132001-12-07 15:38:26 +00007292echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007293echo "configure:7294: checking whether byte ordering is bigendian" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007294if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
7295 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00007296else
7297 ac_cv_c_bigendian=unknown
7298# See if sys/param.h defines the BYTE_ORDER macro.
Michael W. Hudson54241132001-12-07 15:38:26 +00007299cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007300#line 7301 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007301#include "confdefs.h"
7302#include <sys/types.h>
7303#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007304int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007305
7306#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
7307 bogus endian macros
7308#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007309; return 0; }
7310EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007311if { (eval echo configure:7312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007312 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007313 # It does; now see whether it defined to BIG_ENDIAN or not.
Michael W. Hudson54241132001-12-07 15:38:26 +00007314cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007315#line 7316 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007316#include "confdefs.h"
7317#include <sys/types.h>
7318#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007319int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007320
7321#if BYTE_ORDER != BIG_ENDIAN
7322 not big endian
7323#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007324; return 0; }
7325EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007326if { (eval echo configure:7327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007327 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007328 ac_cv_c_bigendian=yes
7329else
Michael W. Hudson54241132001-12-07 15:38:26 +00007330 echo "configure: failed program was:" >&5
7331 cat conftest.$ac_ext >&5
7332 rm -rf conftest*
7333 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +00007334fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007335rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007336else
Michael W. Hudson54241132001-12-07 15:38:26 +00007337 echo "configure: failed program was:" >&5
7338 cat conftest.$ac_ext >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007339fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007340rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007341if test $ac_cv_c_bigendian = unknown; then
7342if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007343 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007344else
Michael W. Hudson54241132001-12-07 15:38:26 +00007345 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007346#line 7347 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007347#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007348main () {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007349 /* Are we little or big endian? From Harbison&Steele. */
7350 union
7351 {
7352 long l;
7353 char c[sizeof (long)];
7354 } u;
7355 u.l = 1;
7356 exit (u.c[sizeof (long) - 1] == 1);
7357}
Michael W. Hudson54241132001-12-07 15:38:26 +00007358EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007359if { (eval echo configure:7360: \"$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 +00007360then
Guido van Rossumef2255b2000-03-10 22:30:29 +00007361 ac_cv_c_bigendian=no
7362else
Michael W. Hudson54241132001-12-07 15:38:26 +00007363 echo "configure: failed program was:" >&5
7364 cat conftest.$ac_ext >&5
7365 rm -fr conftest*
7366 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +00007367fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007368rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007369fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007370
Michael W. Hudson54241132001-12-07 15:38:26 +00007371fi
7372fi
7373
7374echo "$ac_t""$ac_cv_c_bigendian" 1>&6
7375if test $ac_cv_c_bigendian = yes; then
7376 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007377#define WORDS_BIGENDIAN 1
7378EOF
7379
7380fi
7381
Michael W. Hudson54241132001-12-07 15:38:26 +00007382
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007383# Check whether right shifting a negative integer extends the sign bit
7384# or fills with zeros (like the Cray J90, according to Tim Peters).
Michael W. Hudson54241132001-12-07 15:38:26 +00007385echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007386echo "configure:7387: checking whether right shift extends the sign bit" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007387if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
7388 echo $ac_n "(cached) $ac_c" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007389else
Michael W. Hudson54241132001-12-07 15:38:26 +00007390
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007391if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007392 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007393else
Michael W. Hudson54241132001-12-07 15:38:26 +00007394 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007395#line 7396 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007396#include "confdefs.h"
7397
7398int main()
7399{
Vladimir Marangozova6180282000-07-12 05:05:06 +00007400 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007401}
7402
Michael W. Hudson54241132001-12-07 15:38:26 +00007403EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007404if { (eval echo configure:7405: \"$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 +00007405then
Vladimir Marangozova6180282000-07-12 05:05:06 +00007406 ac_cv_rshift_extends_sign=yes
7407else
Michael W. Hudson54241132001-12-07 15:38:26 +00007408 echo "configure: failed program was:" >&5
7409 cat conftest.$ac_ext >&5
7410 rm -fr conftest*
7411 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +00007412fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007413rm -fr conftest*
Vladimir Marangozova6180282000-07-12 05:05:06 +00007414fi
7415
Michael W. Hudson54241132001-12-07 15:38:26 +00007416fi
7417
7418echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007419if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007420then
Michael W. Hudson54241132001-12-07 15:38:26 +00007421 cat >> confdefs.h <<\EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007422#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
7423EOF
7424
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007425fi
7426
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007427# check for getc_unlocked and related locking functions
Michael W. Hudson54241132001-12-07 15:38:26 +00007428echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007429echo "configure:7430: checking for getc_unlocked() and friends" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007430if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
7431 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007432else
Michael W. Hudson54241132001-12-07 15:38:26 +00007433
7434cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007435#line 7436 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007436#include "confdefs.h"
7437#include <stdio.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007438int main() {
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007439
7440 FILE *f = fopen("/dev/null", "r");
7441 flockfile(f);
7442 getc_unlocked(f);
7443 funlockfile(f);
7444
Michael W. Hudson54241132001-12-07 15:38:26 +00007445; return 0; }
7446EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007447if { (eval echo configure:7448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007448 rm -rf conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007449 ac_cv_have_getc_unlocked=yes
7450else
Michael W. Hudson54241132001-12-07 15:38:26 +00007451 echo "configure: failed program was:" >&5
7452 cat conftest.$ac_ext >&5
7453 rm -rf conftest*
7454 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007455fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007456rm -f conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007457fi
7458
Michael W. Hudson54241132001-12-07 15:38:26 +00007459echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007460if test "$ac_cv_have_getc_unlocked" = yes
7461then
Michael W. Hudson54241132001-12-07 15:38:26 +00007462 cat >> confdefs.h <<\EOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007463#define HAVE_GETC_UNLOCKED 1
7464EOF
7465
7466fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007467
Martin v. Löwis0daad592001-09-30 21:09:59 +00007468# check for readline 4.0
Michael W. Hudson54241132001-12-07 15:38:26 +00007469echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007470echo "configure:7471: checking for rl_pre_input_hook in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007471ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'`
7472if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7473 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007474else
Michael W. Hudson54241132001-12-07 15:38:26 +00007475 ac_save_LIBS="$LIBS"
Guido van Rossum353ae582001-07-10 16:45:32 +00007476LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007477cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007478#line 7479 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00007479#include "confdefs.h"
7480/* Override any gcc2 internal prototype to avoid an error. */
7481/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007482 builtin and then its argument prototype would still apply. */
7483char rl_pre_input_hook();
7484
7485int main() {
7486rl_pre_input_hook()
7487; return 0; }
7488EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007489if { (eval echo configure:7490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007490 rm -rf conftest*
7491 eval "ac_cv_lib_$ac_lib_var=yes"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007492else
Michael W. Hudson54241132001-12-07 15:38:26 +00007493 echo "configure: failed program was:" >&5
7494 cat conftest.$ac_ext >&5
7495 rm -rf conftest*
7496 eval "ac_cv_lib_$ac_lib_var=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007497fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007498rm -f conftest*
7499LIBS="$ac_save_LIBS"
7500
Martin v. Löwis0daad592001-09-30 21:09:59 +00007501fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007502if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7503 echo "$ac_t""yes" 1>&6
7504 cat >> confdefs.h <<\EOF
Martin v. Löwis0daad592001-09-30 21:09:59 +00007505#define HAVE_RL_PRE_INPUT_HOOK 1
7506EOF
7507
Michael W. Hudson54241132001-12-07 15:38:26 +00007508else
7509 echo "$ac_t""no" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007510fi
7511
Michael W. Hudson54241132001-12-07 15:38:26 +00007512
Martin v. Löwis0daad592001-09-30 21:09:59 +00007513# check for readline 4.2
Michael W. Hudson54241132001-12-07 15:38:26 +00007514echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007515echo "configure:7516: checking for rl_completion_matches in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007516ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
7517if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7518 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007519else
Michael W. Hudson54241132001-12-07 15:38:26 +00007520 ac_save_LIBS="$LIBS"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007521LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007522cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007523#line 7524 "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007524#include "confdefs.h"
7525/* Override any gcc2 internal prototype to avoid an error. */
7526/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007527 builtin and then its argument prototype would still apply. */
7528char rl_completion_matches();
7529
7530int main() {
7531rl_completion_matches()
7532; return 0; }
7533EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007534if { (eval echo configure:7535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007535 rm -rf conftest*
7536 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum353ae582001-07-10 16:45:32 +00007537else
Michael W. Hudson54241132001-12-07 15:38:26 +00007538 echo "configure: failed program was:" >&5
7539 cat conftest.$ac_ext >&5
7540 rm -rf conftest*
7541 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum353ae582001-07-10 16:45:32 +00007542fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007543rm -f conftest*
7544LIBS="$ac_save_LIBS"
7545
Guido van Rossum353ae582001-07-10 16:45:32 +00007546fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007547if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7548 echo "$ac_t""yes" 1>&6
7549 cat >> confdefs.h <<\EOF
Guido van Rossum353ae582001-07-10 16:45:32 +00007550#define HAVE_RL_COMPLETION_MATCHES 1
7551EOF
7552
Michael W. Hudson54241132001-12-07 15:38:26 +00007553else
7554 echo "$ac_t""no" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007555fi
7556
Jack Jansendd19cf82001-12-06 22:36:17 +00007557
Michael W. Hudson54241132001-12-07 15:38:26 +00007558echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007559echo "configure:7560: checking for broken nice()" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007560if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
7561 echo $ac_n "(cached) $ac_c" 1>&6
7562else
7563
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007564if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007565 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007566else
Michael W. Hudson54241132001-12-07 15:38:26 +00007567 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007568#line 7569 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007569#include "confdefs.h"
7570
7571int main()
7572{
7573 int val1 = nice(1);
7574 if (val1 != -1 && val1 == nice(2))
7575 exit(0);
7576 exit(1);
7577}
7578
Michael W. Hudson54241132001-12-07 15:38:26 +00007579EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007580if { (eval echo configure:7581: \"$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 +00007581then
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007582 ac_cv_broken_nice=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 -fr conftest*
7587 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007588fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007589rm -fr conftest*
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007590fi
7591
Michael W. Hudson54241132001-12-07 15:38:26 +00007592fi
7593
7594echo "$ac_t""$ac_cv_broken_nice" 1>&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007595if test "$ac_cv_broken_nice" = yes
7596then
Michael W. Hudson54241132001-12-07 15:38:26 +00007597 cat >> confdefs.h <<\EOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007598#define HAVE_BROKEN_NICE 1
7599EOF
7600
7601fi
7602
Jack Jansen666b1e72001-10-31 12:11:48 +00007603# On HP/UX 11.0, mvwdelch is a block with a return statement
Michael W. Hudson54241132001-12-07 15:38:26 +00007604echo $ac_n "checking whether mvwdelch is an expression""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007605echo "configure:7606: checking whether mvwdelch is an expression" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007606if eval "test \"`echo '$''{'ac_cv_mvwdelch_is_expression'+set}'`\" = set"; then
7607 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007608else
Michael W. Hudson54241132001-12-07 15:38:26 +00007609 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007610#line 7611 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007611#include "confdefs.h"
7612#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007613int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007614
7615 int rtn;
7616 rtn = mvwdelch(0,0,0);
7617
Michael W. Hudson54241132001-12-07 15:38:26 +00007618; return 0; }
7619EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007620if { (eval echo configure:7621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007621 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007622 ac_cv_mvwdelch_is_expression=yes
7623else
Michael W. Hudson54241132001-12-07 15:38:26 +00007624 echo "configure: failed program was:" >&5
7625 cat conftest.$ac_ext >&5
7626 rm -rf conftest*
7627 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007628fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007629rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007630fi
7631
Michael W. Hudson54241132001-12-07 15:38:26 +00007632echo "$ac_t""$ac_cv_mvwdelch_is_expression" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007633
7634if test "$ac_cv_mvwdelch_is_expression" = yes
7635then
Michael W. Hudson54241132001-12-07 15:38:26 +00007636 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007637#define MVWDELCH_IS_EXPRESSION 1
7638EOF
7639
7640fi
7641
Michael W. Hudson54241132001-12-07 15:38:26 +00007642echo $ac_n "checking whether WINDOW has _flags""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007643echo "configure:7644: checking whether WINDOW has _flags" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007644if eval "test \"`echo '$''{'ac_cv_window_has_flags'+set}'`\" = set"; then
7645 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007646else
Michael W. Hudson54241132001-12-07 15:38:26 +00007647 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007648#line 7649 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007649#include "confdefs.h"
7650#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007651int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007652
7653 WINDOW *w;
7654 w->_flags = 0;
7655
Michael W. Hudson54241132001-12-07 15:38:26 +00007656; return 0; }
7657EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007658if { (eval echo configure:7659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007659 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007660 ac_cv_window_has_flags=yes
7661else
Michael W. Hudson54241132001-12-07 15:38:26 +00007662 echo "configure: failed program was:" >&5
7663 cat conftest.$ac_ext >&5
7664 rm -rf conftest*
7665 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007666fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007667rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007668fi
7669
Michael W. Hudson54241132001-12-07 15:38:26 +00007670echo "$ac_t""$ac_cv_window_has_flags" 1>&6
7671
Jack Jansen666b1e72001-10-31 12:11:48 +00007672
7673if test "$ac_cv_window_has_flags" = yes
7674then
Michael W. Hudson54241132001-12-07 15:38:26 +00007675 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007676#define WINDOW_HAS_FLAGS 1
7677EOF
7678
7679fi
7680
Guido van Rossum95713eb2000-05-18 20:53:31 +00007681# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7682# Add sys/socket.h to confdefs.h
7683cat >> confdefs.h <<\EOF
7684#ifdef HAVE_SYS_SOCKET_H
7685#include <sys/socket.h>
7686#endif
7687EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007688echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007689echo "configure:7690: checking for socklen_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007690if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
7691 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum95713eb2000-05-18 20:53:31 +00007692else
Michael W. Hudson54241132001-12-07 15:38:26 +00007693 cat > conftest.$ac_ext <<EOF
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007694#line 7695 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007695#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007696#include <sys/types.h>
7697#if STDC_HEADERS
7698#include <stdlib.h>
7699#include <stddef.h>
7700#endif
7701EOF
7702if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7703 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7704 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007705 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007706else
Michael W. Hudson54241132001-12-07 15:38:26 +00007707 rm -rf conftest*
7708 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007709fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007710rm -f conftest*
Guido van Rossum95713eb2000-05-18 20:53:31 +00007711
Michael W. Hudson54241132001-12-07 15:38:26 +00007712fi
7713echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7714if test $ac_cv_type_socklen_t = no; then
7715 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007716#define socklen_t int
7717EOF
7718
7719fi
7720
Michael W. Hudson54241132001-12-07 15:38:26 +00007721
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007722#AC_MSG_CHECKING(for Modules/Setup)
7723#if test ! -f Modules/Setup ; then
7724# if test ! -d Modules ; then
7725# mkdir Modules
7726# fi
7727# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7728# AC_MSG_RESULT(creating)
7729#else
7730# AC_MSG_RESULT(already exists)
7731#fi
7732
Michael W. Hudson54241132001-12-07 15:38:26 +00007733
7734
Martin v. Löwis06f15bb2001-12-02 13:02:32 +00007735for h in `(cd $srcdir;echo Python/thread_*.h)`
7736do
7737 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
7738done
7739
Michael W. Hudson54241132001-12-07 15:38:26 +00007740
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007741SRCDIRS="Parser Grammar Objects Python Modules"
Michael W. Hudson54241132001-12-07 15:38:26 +00007742echo $ac_n "checking for build directories""... $ac_c" 1>&6
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007743echo "configure:7744: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007744for dir in $SRCDIRS; do
7745 if test ! -d $dir; then
7746 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007747 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007748done
Michael W. Hudson54241132001-12-07 15:38:26 +00007749echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007750
Guido van Rossum627b2d71993-12-24 10:39:16 +00007751# generate output files
Michael W. Hudson54241132001-12-07 15:38:26 +00007752trap '' 1 2 15
7753cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007754# This file is a shell script that caches the results of configure
7755# tests run on this system so they can be shared between configure
Michael W. Hudson54241132001-12-07 15:38:26 +00007756# scripts and configure runs. It is not useful on other systems.
7757# If it contains results you don't want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007758#
Michael W. Hudson54241132001-12-07 15:38:26 +00007759# By default, configure uses ./config.cache as the cache file,
7760# creating it if it does not exist already. You can give configure
7761# the --cache-file=FILE option to use a different cache file; that is
7762# what configure does when it calls configure scripts in
7763# subdirectories, so they share the cache.
7764# Giving --cache-file=/dev/null disables caching, for debugging configure.
7765# config.status only pays attention to the cache file if you give it the
7766# --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007767#
Michael W. Hudson54241132001-12-07 15:38:26 +00007768EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007769# The following way of writing the cache mishandles newlines in values,
7770# but we know of no workaround that is simple, portable, and efficient.
7771# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007772# Ultrix sh set writes to stderr and can't be redirected directly,
7773# and sets the high bit in the cache file unless we assign to the vars.
Michael W. Hudson54241132001-12-07 15:38:26 +00007774(set) 2>&1 |
7775 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7776 *ac_space=\ *)
7777 # `set' does not quote correctly, so add quotes (double-quote substitution
7778 # turns \\\\ into \\, and sed turns \\ into \).
7779 sed -n \
7780 -e "s/'/'\\\\''/g" \
7781 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7782 ;;
7783 *)
7784 # `set' quotes correctly as required by POSIX, so do not add quotes.
7785 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7786 ;;
7787 esac >> confcache
7788if cmp -s $cache_file confcache; then
7789 :
7790else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007791 if test -w $cache_file; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007792 echo "updating cache $cache_file"
7793 cat confcache > $cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007794 else
7795 echo "not updating unwritable cache $cache_file"
7796 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007797fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007798rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007799
Michael W. Hudson54241132001-12-07 15:38:26 +00007800trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7801
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007802test "x$prefix" = xNONE && prefix=$ac_default_prefix
7803# Let make expand exec_prefix.
7804test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007805
Michael W. Hudson54241132001-12-07 15:38:26 +00007806# Any assignment to VPATH causes Sun make to only execute
7807# the first set of double-colon rules, so remove it if not needed.
7808# If there is a colon in the path, we need to keep it.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007809if test "x$srcdir" = x.; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007810 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007811fi
7812
Michael W. Hudson54241132001-12-07 15:38:26 +00007813trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7814
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007815DEFS=-DHAVE_CONFIG_H
7816
Michael W. Hudson54241132001-12-07 15:38:26 +00007817# Without the "./", some shells look in PATH for config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007818: ${CONFIG_STATUS=./config.status}
Michael W. Hudson54241132001-12-07 15:38:26 +00007819
7820echo creating $CONFIG_STATUS
7821rm -f $CONFIG_STATUS
7822cat > $CONFIG_STATUS <<EOF
7823#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007824# Generated automatically by configure.
7825# Run this file to recreate the current configuration.
Michael W. Hudson54241132001-12-07 15:38:26 +00007826# This directory was configured as follows,
7827# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7828#
7829# $0 $ac_configure_args
7830#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007831# Compiler output produced by configure, useful for debugging
Michael W. Hudson54241132001-12-07 15:38:26 +00007832# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007833
Michael W. Hudson54241132001-12-07 15:38:26 +00007834ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7835for ac_option
Jack Jansendd19cf82001-12-06 22:36:17 +00007836do
Michael W. Hudson54241132001-12-07 15:38:26 +00007837 case "\$ac_option" in
Jack Jansendd19cf82001-12-06 22:36:17 +00007838 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Michael W. Hudson54241132001-12-07 15:38:26 +00007839 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7840 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7841 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7842 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7843 exit 0 ;;
7844 -help | --help | --hel | --he | --h)
7845 echo "\$ac_cs_usage"; exit 0 ;;
7846 *) echo "\$ac_cs_usage"; exit 1 ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007847 esac
7848done
7849
Michael W. Hudson54241132001-12-07 15:38:26 +00007850ac_given_srcdir=$srcdir
7851ac_given_INSTALL="$INSTALL"
Jack Jansendd19cf82001-12-06 22:36:17 +00007852
Michael W. Hudson54241132001-12-07 15:38:26 +00007853trap '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 +00007854EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007855cat >> $CONFIG_STATUS <<EOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007856
Michael W. Hudson54241132001-12-07 15:38:26 +00007857# Protect against being on the right side of a sed subst in config.status.
7858sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7859 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7860$ac_vpsub
7861$extrasub
7862s%@SHELL@%$SHELL%g
7863s%@CFLAGS@%$CFLAGS%g
7864s%@CPPFLAGS@%$CPPFLAGS%g
7865s%@CXXFLAGS@%$CXXFLAGS%g
7866s%@FFLAGS@%$FFLAGS%g
7867s%@DEFS@%$DEFS%g
7868s%@LDFLAGS@%$LDFLAGS%g
7869s%@LIBS@%$LIBS%g
7870s%@exec_prefix@%$exec_prefix%g
7871s%@prefix@%$prefix%g
7872s%@program_transform_name@%$program_transform_name%g
7873s%@bindir@%$bindir%g
7874s%@sbindir@%$sbindir%g
7875s%@libexecdir@%$libexecdir%g
7876s%@datadir@%$datadir%g
7877s%@sysconfdir@%$sysconfdir%g
7878s%@sharedstatedir@%$sharedstatedir%g
7879s%@localstatedir@%$localstatedir%g
7880s%@libdir@%$libdir%g
7881s%@includedir@%$includedir%g
7882s%@oldincludedir@%$oldincludedir%g
7883s%@infodir@%$infodir%g
7884s%@mandir@%$mandir%g
7885s%@VERSION@%$VERSION%g
Martin v. Löwis1142de32002-03-29 16:28:31 +00007886s%@SOVERSION@%$SOVERSION%g
Michael W. Hudson54241132001-12-07 15:38:26 +00007887s%@CONFIG_ARGS@%$CONFIG_ARGS%g
7888s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7889s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7890s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7891s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
7892s%@MACHDEP@%$MACHDEP%g
7893s%@SGI_ABI@%$SGI_ABI%g
7894s%@CXX@%$CXX%g
7895s%@MAINOBJ@%$MAINOBJ%g
7896s%@CC@%$CC%g
7897s%@CPP@%$CPP%g
7898s%@EXEEXT@%$EXEEXT%g
7899s%@BUILDEXEEXT@%$BUILDEXEEXT%g
7900s%@LIBRARY@%$LIBRARY%g
7901s%@LDLIBRARY@%$LDLIBRARY%g
7902s%@DLLLIBRARY@%$DLLLIBRARY%g
7903s%@BLDLIBRARY@%$BLDLIBRARY%g
7904s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
Martin v. Löwis1142de32002-03-29 16:28:31 +00007905s%@INSTSONAME@%$INSTSONAME%g
7906s%@RUNSHARED@%$RUNSHARED%g
Michael W. Hudson54241132001-12-07 15:38:26 +00007907s%@LINKCC@%$LINKCC%g
7908s%@RANLIB@%$RANLIB%g
7909s%@AR@%$AR%g
7910s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7911s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7912s%@INSTALL_DATA@%$INSTALL_DATA%g
7913s%@LN@%$LN%g
7914s%@OPT@%$OPT%g
7915s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
7916s%@SO@%$SO%g
7917s%@LDSHARED@%$LDSHARED%g
7918s%@BLDSHARED@%$BLDSHARED%g
7919s%@CCSHARED@%$CCSHARED%g
7920s%@LINKFORSHARED@%$LINKFORSHARED%g
7921s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
7922s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7923s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
7924s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
7925s%@LDLAST@%$LDLAST%g
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00007926s%@THREADOBJ@%$THREADOBJ%g
Michael W. Hudson54241132001-12-07 15:38:26 +00007927s%@DLINCLDIR@%$DLINCLDIR%g
7928s%@DYNLOADFILE@%$DYNLOADFILE%g
7929s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
7930s%@LIBOBJS@%$LIBOBJS%g
7931s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7932s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7933s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
7934s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
7935s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
7936s%@LIBM@%$LIBM%g
7937s%@LIBC@%$LIBC%g
7938s%@UNICODE_OBJS@%$UNICODE_OBJS%g
7939s%@THREADHEADERS@%$THREADHEADERS%g
7940s%@SRCDIRS@%$SRCDIRS%g
Jack Jansendd19cf82001-12-06 22:36:17 +00007941
Jack Jansendd19cf82001-12-06 22:36:17 +00007942CEOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007943EOF
7944
Michael W. Hudson54241132001-12-07 15:38:26 +00007945cat >> $CONFIG_STATUS <<\EOF
7946
7947# Split the substitutions into bite-sized pieces for seds with
7948# small command number limits, like on Digital OSF/1 and HP-UX.
7949ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7950ac_file=1 # Number of current file.
7951ac_beg=1 # First line for current file.
7952ac_end=$ac_max_sed_cmds # Line after last line for current file.
7953ac_more_lines=:
7954ac_sed_cmds=""
7955while $ac_more_lines; do
7956 if test $ac_beg -gt 1; then
7957 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7958 else
7959 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00007960 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007961 if test ! -s conftest.s$ac_file; then
7962 ac_more_lines=false
7963 rm -f conftest.s$ac_file
7964 else
7965 if test -z "$ac_sed_cmds"; then
7966 ac_sed_cmds="sed -f conftest.s$ac_file"
7967 else
7968 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7969 fi
7970 ac_file=`expr $ac_file + 1`
7971 ac_beg=$ac_end
7972 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7973 fi
7974done
7975if test -z "$ac_sed_cmds"; then
7976 ac_sed_cmds=cat
7977fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007978EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007979
7980cat >> $CONFIG_STATUS <<EOF
7981
7982CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
7983EOF
7984cat >> $CONFIG_STATUS <<\EOF
7985for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Jack Jansendd19cf82001-12-06 22:36:17 +00007986 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00007987 case "$ac_file" in
7988 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7989 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7990 *) ac_file_in="${ac_file}.in" ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007991 esac
7992
Michael W. Hudson54241132001-12-07 15:38:26 +00007993 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7994
7995 # Remove last slash and all that follows it. Not all systems have dirname.
7996 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007997 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007998 # The file is in a subdirectory.
7999 test ! -d "$ac_dir" && mkdir "$ac_dir"
8000 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008001 # A "../" for each directory in $ac_dir_suffix.
Michael W. Hudson54241132001-12-07 15:38:26 +00008002 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008003 else
8004 ac_dir_suffix= ac_dots=
8005 fi
8006
Michael W. Hudson54241132001-12-07 15:38:26 +00008007 case "$ac_given_srcdir" in
8008 .) srcdir=.
8009 if test -z "$ac_dots"; then top_srcdir=.
8010 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8011 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008012 *) # Relative path.
Michael W. Hudson54241132001-12-07 15:38:26 +00008013 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8014 top_srcdir="$ac_dots$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008015 esac
8016
Michael W. Hudson54241132001-12-07 15:38:26 +00008017 case "$ac_given_INSTALL" in
8018 [/$]*) INSTALL="$ac_given_INSTALL" ;;
8019 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00008020 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00008021
Michael W. Hudson54241132001-12-07 15:38:26 +00008022 echo creating "$ac_file"
8023 rm -f "$ac_file"
8024 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8025 case "$ac_file" in
8026 *Makefile*) ac_comsub="1i\\
8027# $configure_input" ;;
8028 *) ac_comsub= ;;
8029 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00008030
Michael W. Hudson54241132001-12-07 15:38:26 +00008031 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8032 sed -e "$ac_comsub
8033s%@configure_input@%$configure_input%g
8034s%@srcdir@%$srcdir%g
8035s%@top_srcdir@%$top_srcdir%g
8036s%@INSTALL@%$INSTALL%g
8037" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8038fi; done
8039rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008040
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008041# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8042# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00008043#
8044# ac_d sets the value in "#define NAME VALUE" lines.
Michael W. Hudson54241132001-12-07 15:38:26 +00008045ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8046ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8047ac_dC='\3'
8048ac_dD='%g'
8049# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8050ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8051ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00008052ac_uC=' '
Michael W. Hudson54241132001-12-07 15:38:26 +00008053ac_uD='\4%g'
8054# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8055ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8056ac_eB='$%\1#\2define\3'
8057ac_eC=' '
8058ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00008059
Michael W. Hudson54241132001-12-07 15:38:26 +00008060if test "${CONFIG_HEADERS+set}" != set; then
8061EOF
8062cat >> $CONFIG_STATUS <<EOF
8063 CONFIG_HEADERS="pyconfig.h"
8064EOF
8065cat >> $CONFIG_STATUS <<\EOF
8066fi
8067for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00008068 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00008069 case "$ac_file" in
8070 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8071 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8072 *) ac_file_in="${ac_file}.in" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008073 esac
8074
Michael W. Hudson54241132001-12-07 15:38:26 +00008075 echo creating $ac_file
Guido van Rossum7f43da71994-08-01 12:15:30 +00008076
Michael W. Hudson54241132001-12-07 15:38:26 +00008077 rm -f conftest.frag conftest.in conftest.out
8078 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8079 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008080
8081EOF
8082
Michael W. Hudson54241132001-12-07 15:38:26 +00008083# Transform confdefs.h into a sed script conftest.vals that substitutes
8084# the proper values into config.h.in to produce config.h. And first:
8085# Protect against being on the right side of a sed subst in config.status.
8086# Protect against being in an unquoted here document in config.status.
8087rm -f conftest.vals
8088cat > conftest.hdr <<\EOF
8089s/[\\&%]/\\&/g
8090s%[\\$`]%\\&%g
8091s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8092s%ac_d%ac_u%gp
8093s%ac_u%ac_e%gp
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008094EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008095sed -n -f conftest.hdr confdefs.h > conftest.vals
8096rm -f conftest.hdr
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008097
8098# This sed command replaces #undef with comments. This is necessary, for
8099# example, in the case of _POSIX_SOURCE, which is predefined and required
8100# on some systems where configure will not decide to define it.
Michael W. Hudson54241132001-12-07 15:38:26 +00008101cat >> conftest.vals <<\EOF
8102s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008103EOF
8104
Michael W. Hudson54241132001-12-07 15:38:26 +00008105# Break up conftest.vals because some shells have a limit on
8106# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008107
Jack Jansendd19cf82001-12-06 22:36:17 +00008108rm -f conftest.tail
Michael W. Hudson54241132001-12-07 15:38:26 +00008109while :
Jack Jansendd19cf82001-12-06 22:36:17 +00008110do
Michael W. Hudson54241132001-12-07 15:38:26 +00008111 ac_lines=`grep -c . conftest.vals`
8112 # grep -c gives empty output for an empty file on some AIX systems.
8113 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8114 # Write a limited-size here document to conftest.frag.
8115 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8116 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +00008117 echo 'CEOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008118 sed -f conftest.frag conftest.in > conftest.out
8119 rm -f conftest.in
8120 mv conftest.out conftest.in
8121' >> $CONFIG_STATUS
8122 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8123 rm -f conftest.vals
8124 mv conftest.tail conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00008125done
Michael W. Hudson54241132001-12-07 15:38:26 +00008126rm -f conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00008127
Michael W. Hudson54241132001-12-07 15:38:26 +00008128cat >> $CONFIG_STATUS <<\EOF
8129 rm -f conftest.frag conftest.h
8130 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8131 cat conftest.in >> conftest.h
8132 rm -f conftest.in
8133 if cmp -s $ac_file conftest.h 2>/dev/null; then
8134 echo "$ac_file is unchanged"
8135 rm -f conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00008136 else
Michael W. Hudson54241132001-12-07 15:38:26 +00008137 # Remove last slash and all that follows it. Not all systems have dirname.
8138 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Jack Jansendd19cf82001-12-06 22:36:17 +00008139 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00008140 # The file is in a subdirectory.
8141 test ! -d "$ac_dir" && mkdir "$ac_dir"
Jack Jansendd19cf82001-12-06 22:36:17 +00008142 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008143 rm -f $ac_file
8144 mv conftest.h $ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00008145 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008146fi; done
8147
Guido van Rossumf78abae1997-01-21 22:02:36 +00008148EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008149cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00008150
Michael W. Hudson54241132001-12-07 15:38:26 +00008151EOF
8152cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008153
Michael W. Hudson54241132001-12-07 15:38:26 +00008154exit 0
Guido van Rossum627b2d71993-12-24 10:39:16 +00008155EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008156chmod +x $CONFIG_STATUS
Michael W. Hudson54241132001-12-07 15:38:26 +00008157rm -fr confdefs* $ac_clean_files
8158test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00008159
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008160
8161echo "creating Setup"
8162if test ! -f Modules/Setup
8163then
8164 cp $srcdir/Modules/Setup.dist Modules/Setup
8165fi
8166
8167echo "creating Setup.local"
8168if test ! -f Modules/Setup.local
8169then
8170 echo "# Edit this file for local setup changes" >Modules/Setup.local
8171fi
8172
8173echo "creating Makefile"
8174$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
8175 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00008176 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008177mv config.c Modules