blob: 1c1eca868e7e15dfea23622f5477c188478d91a7 [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öwis1142de32002-03-29 16:28:31 +00003# From configure.in Revision: 1.301
Michael W. Hudson54241132001-12-07 15:38:26 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Michael W. Hudson54241132001-12-07 15:38:26 +00006# Generated automatically using autoconf version 2.13
7# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Michael W. Hudson54241132001-12-07 15:38:26 +000012# Defaults:
13ac_help=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014ac_default_prefix=/usr/local
Michael W. Hudson54241132001-12-07 15:38:26 +000015# Any additions from configure.in:
16ac_help="$ac_help
17 --enable-framework[=INSTALLDIR] Build (MacOSX|Darwin) framework"
18ac_help="$ac_help
19 --without-gcc never use gcc"
20ac_help="$ac_help
21 --with-cxx=<compiler> enable C++ support"
22ac_help="$ac_help
23 --with-suffix=.exe set executable suffix"
24ac_help="$ac_help
Martin v. Löwis1142de32002-03-29 16:28:31 +000025 --enable-shared disable/enable building shared python library"
26ac_help="$ac_help
Michael W. Hudson54241132001-12-07 15:38:26 +000027 --with-pydebug build with Py_DEBUG defined"
28ac_help="$ac_help
29 --enable-toolbox-glue disable/enable MacOSX glue code for extensions"
30ac_help="$ac_help
31 --with-libs='lib1 ...' link against additional libs"
32ac_help="$ac_help
33 --with-signal-module disable/enable signal module"
34ac_help="$ac_help
35 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
36ac_help="$ac_help
37 --with(out)-threads[=DIRECTORY] disable/enable thread support"
38ac_help="$ac_help
39 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
40ac_help="$ac_help
41 --with-pth use GNU pth threading libraries"
42ac_help="$ac_help
43 --enable-ipv6 Enable ipv6 (with ipv4) support
44 --disable-ipv6 Disable ipv6 support"
45ac_help="$ac_help
46 --with(out)-cycle-gc disable/enable garbage collection"
47ac_help="$ac_help
48 --with(out)-pymalloc disable/enable specialized mallocs"
49ac_help="$ac_help
50 --with-wctype-functions use wctype.h functions"
51ac_help="$ac_help
52 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
53ac_help="$ac_help
54 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
55ac_help="$ac_help
56 --with-fpectl enable SIGFPE catching"
57ac_help="$ac_help
58 --with-libm=STRING math library"
59ac_help="$ac_help
60 --with-libc=STRING C library"
61ac_help="$ac_help
62 --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)"
Guido van Rossum627b2d71993-12-24 10:39:16 +000063
Guido van Rossum7f43da71994-08-01 12:15:30 +000064# Initialize some variables set by options.
65# The variables have the same names as the options, with
66# dashes changed to underlines.
Michael W. Hudson54241132001-12-07 15:38:26 +000067build=NONE
68cache_file=./config.cache
Guido van Rossum76be6ed1995-01-02 18:33:54 +000069exec_prefix=NONE
Michael W. Hudson54241132001-12-07 15:38:26 +000070host=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000071no_create=
Michael W. Hudson54241132001-12-07 15:38:26 +000072nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000073no_recursion=
74prefix=NONE
75program_prefix=NONE
76program_suffix=NONE
77program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000078silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000079site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000080srcdir=
Michael W. Hudson54241132001-12-07 15:38:26 +000081target=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000082verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000083x_includes=NONE
84x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000085bindir='${exec_prefix}/bin'
86sbindir='${exec_prefix}/sbin'
87libexecdir='${exec_prefix}/libexec'
88datadir='${prefix}/share'
89sysconfdir='${prefix}/etc'
90sharedstatedir='${prefix}/com'
91localstatedir='${prefix}/var'
92libdir='${exec_prefix}/lib'
93includedir='${prefix}/include'
94oldincludedir='/usr/include'
95infodir='${prefix}/info'
96mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000097
Michael W. Hudson54241132001-12-07 15:38:26 +000098# Initialize some other variables.
99subdirs=
100MFLAGS= MAKEFLAGS=
101SHELL=${CONFIG_SHELL-/bin/sh}
102# Maximum number of lines to put in a shell here document.
103ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +0000104
105ac_prev=
106for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000107do
Michael W. Hudson54241132001-12-07 15:38:26 +0000108
Guido van Rossum7f43da71994-08-01 12:15:30 +0000109 # If the previous option needs an argument, assign it.
110 if test -n "$ac_prev"; then
111 eval "$ac_prev=\$ac_option"
112 ac_prev=
113 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000114 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000115
Michael W. Hudson54241132001-12-07 15:38:26 +0000116 case "$ac_option" in
117 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
118 *) ac_optarg= ;;
119 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000120
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000121 # Accept the important Cygnus configure options, so we can diagnose typos.
122
Michael W. Hudson54241132001-12-07 15:38:26 +0000123 case "$ac_option" in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000124
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000125 -bindir | --bindir | --bindi | --bind | --bin | --bi)
126 ac_prev=bindir ;;
127 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000128 bindir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000129
130 -build | --build | --buil | --bui | --bu)
Michael W. Hudson54241132001-12-07 15:38:26 +0000131 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000132 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000133 build="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000134
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000135 -cache-file | --cache-file | --cache-fil | --cache-fi \
136 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
137 ac_prev=cache_file ;;
138 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
139 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000140 cache_file="$ac_optarg" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000141
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000142 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
143 ac_prev=datadir ;;
144 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
145 | --da=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000146 datadir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000147
Guido van Rossum7f43da71994-08-01 12:15:30 +0000148 -disable-* | --disable-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000149 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000150 # Reject names that are not valid shell variable names.
Michael W. Hudson54241132001-12-07 15:38:26 +0000151 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
152 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
153 fi
154 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
155 eval "enable_${ac_feature}=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000156
157 -enable-* | --enable-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000158 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000159 # Reject names that are not valid shell variable names.
Michael W. Hudson54241132001-12-07 15:38:26 +0000160 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
161 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
162 fi
163 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
164 case "$ac_option" in
165 *=*) ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000166 *) ac_optarg=yes ;;
167 esac
Michael W. Hudson54241132001-12-07 15:38:26 +0000168 eval "enable_${ac_feature}='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000169
Guido van Rossum7f43da71994-08-01 12:15:30 +0000170 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
171 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
172 | --exec | --exe | --ex)
173 ac_prev=exec_prefix ;;
174 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
175 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
176 | --exec=* | --exe=* | --ex=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000177 exec_prefix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000178
179 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000180 # Obsolete; use --with-gas.
181 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000182
Michael W. Hudson54241132001-12-07 15:38:26 +0000183 -help | --help | --hel | --he)
184 # Omit some internal or obsolete options to make the list less imposing.
185 # This message is too long to be a string in the A/UX 3.1 sh.
186 cat << EOF
187Usage: configure [options] [host]
188Options: [defaults in brackets after descriptions]
189Configuration:
190 --cache-file=FILE cache test results in FILE
191 --help print this message
192 --no-create do not create output files
193 --quiet, --silent do not print \`checking...' messages
194 --version print the version of autoconf that created configure
195Directory and file names:
196 --prefix=PREFIX install architecture-independent files in PREFIX
197 [$ac_default_prefix]
198 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
199 [same as prefix]
200 --bindir=DIR user executables in DIR [EPREFIX/bin]
201 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
202 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
203 --datadir=DIR read-only architecture-independent data in DIR
204 [PREFIX/share]
205 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
206 --sharedstatedir=DIR modifiable architecture-independent data in DIR
207 [PREFIX/com]
208 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
209 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
210 --includedir=DIR C header files in DIR [PREFIX/include]
211 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
212 --infodir=DIR info documentation in DIR [PREFIX/info]
213 --mandir=DIR man documentation in DIR [PREFIX/man]
214 --srcdir=DIR find the sources in DIR [configure dir or ..]
215 --program-prefix=PREFIX prepend PREFIX to installed program names
216 --program-suffix=SUFFIX append SUFFIX to installed program names
217 --program-transform-name=PROGRAM
218 run sed PROGRAM on installed program names
219EOF
220 cat << EOF
221Host type:
222 --build=BUILD configure for building on BUILD [BUILD=HOST]
223 --host=HOST configure for HOST [guessed]
224 --target=TARGET configure for TARGET [TARGET=HOST]
225Features and packages:
226 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
227 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
228 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
229 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
230 --x-includes=DIR X include files are in DIR
231 --x-libraries=DIR X library files are in DIR
232EOF
233 if test -n "$ac_help"; then
234 echo "--enable and --with options recognized:$ac_help"
235 fi
236 exit 0 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000237
238 -host | --host | --hos | --ho)
Michael W. Hudson54241132001-12-07 15:38:26 +0000239 ac_prev=host ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000240 -host=* | --host=* | --hos=* | --ho=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000241 host="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000242
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000243 -includedir | --includedir | --includedi | --included | --include \
244 | --includ | --inclu | --incl | --inc)
245 ac_prev=includedir ;;
246 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247 | --includ=* | --inclu=* | --incl=* | --inc=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000248 includedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000249
250 -infodir | --infodir | --infodi | --infod | --info | --inf)
251 ac_prev=infodir ;;
252 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000253 infodir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000254
255 -libdir | --libdir | --libdi | --libd)
256 ac_prev=libdir ;;
257 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000258 libdir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000259
260 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261 | --libexe | --libex | --libe)
262 ac_prev=libexecdir ;;
263 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264 | --libexe=* | --libex=* | --libe=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000265 libexecdir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000266
267 -localstatedir | --localstatedir | --localstatedi | --localstated \
268 | --localstate | --localstat | --localsta | --localst \
269 | --locals | --local | --loca | --loc | --lo)
270 ac_prev=localstatedir ;;
271 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000274 localstatedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000275
276 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
277 ac_prev=mandir ;;
278 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000279 mandir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000280
Guido van Rossum7f43da71994-08-01 12:15:30 +0000281 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000282 # Obsolete; use --without-fp.
283 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000284
285 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
286 | --no-cr | --no-c)
287 no_create=yes ;;
288
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000289 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
291 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000292
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000293 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295 | --oldin | --oldi | --old | --ol | --o)
296 ac_prev=oldincludedir ;;
297 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000300 oldincludedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000301
Guido van Rossum7f43da71994-08-01 12:15:30 +0000302 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
303 ac_prev=prefix ;;
304 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000305 prefix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000306
307 -program-prefix | --program-prefix | --program-prefi | --program-pref \
308 | --program-pre | --program-pr | --program-p)
309 ac_prev=program_prefix ;;
310 -program-prefix=* | --program-prefix=* | --program-prefi=* \
311 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000312 program_prefix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000313
314 -program-suffix | --program-suffix | --program-suffi | --program-suff \
315 | --program-suf | --program-su | --program-s)
316 ac_prev=program_suffix ;;
317 -program-suffix=* | --program-suffix=* | --program-suffi=* \
318 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000319 program_suffix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000320
321 -program-transform-name | --program-transform-name \
322 | --program-transform-nam | --program-transform-na \
323 | --program-transform-n | --program-transform- \
324 | --program-transform | --program-transfor \
325 | --program-transfo | --program-transf \
326 | --program-trans | --program-tran \
327 | --progr-tra | --program-tr | --program-t)
328 ac_prev=program_transform_name ;;
329 -program-transform-name=* | --program-transform-name=* \
330 | --program-transform-nam=* | --program-transform-na=* \
331 | --program-transform-n=* | --program-transform-=* \
332 | --program-transform=* | --program-transfor=* \
333 | --program-transfo=* | --program-transf=* \
334 | --program-trans=* | --program-tran=* \
335 | --progr-tra=* | --program-tr=* | --program-t=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000336 program_transform_name="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000337
338 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339 | -silent | --silent | --silen | --sile | --sil)
340 silent=yes ;;
341
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000342 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
343 ac_prev=sbindir ;;
344 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
345 | --sbi=* | --sb=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000346 sbindir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000347
348 -sharedstatedir | --sharedstatedir | --sharedstatedi \
349 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350 | --sharedst | --shareds | --shared | --share | --shar \
351 | --sha | --sh)
352 ac_prev=sharedstatedir ;;
353 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
356 | --sha=* | --sh=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000357 sharedstatedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000358
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000359 -site | --site | --sit)
360 ac_prev=site ;;
361 -site=* | --site=* | --sit=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000362 site="$ac_optarg" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000363
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
365 ac_prev=srcdir ;;
366 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000367 srcdir="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000368
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000369 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
370 | --syscon | --sysco | --sysc | --sys | --sy)
371 ac_prev=sysconfdir ;;
372 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
373 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000374 sysconfdir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000375
Guido van Rossum7f43da71994-08-01 12:15:30 +0000376 -target | --target | --targe | --targ | --tar | --ta | --t)
Michael W. Hudson54241132001-12-07 15:38:26 +0000377 ac_prev=target ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000378 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000379 target="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000380
381 -v | -verbose | --verbose | --verbos | --verbo | --verb)
382 verbose=yes ;;
383
Michael W. Hudson54241132001-12-07 15:38:26 +0000384 -version | --version | --versio | --versi | --vers)
385 echo "configure generated by autoconf version 2.13"
386 exit 0 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000387
388 -with-* | --with-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000389 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000390 # Reject names that are not valid shell variable names.
Michael W. Hudson54241132001-12-07 15:38:26 +0000391 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
392 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
393 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000394 ac_package=`echo $ac_package| sed 's/-/_/g'`
Michael W. Hudson54241132001-12-07 15:38:26 +0000395 case "$ac_option" in
396 *=*) ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000397 *) ac_optarg=yes ;;
398 esac
Michael W. Hudson54241132001-12-07 15:38:26 +0000399 eval "with_${ac_package}='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000400
401 -without-* | --without-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000402 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000403 # Reject names that are not valid shell variable names.
Michael W. Hudson54241132001-12-07 15:38:26 +0000404 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
405 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
406 fi
407 ac_package=`echo $ac_package| sed 's/-/_/g'`
408 eval "with_${ac_package}=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000409
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000410 --x)
411 # Obsolete; use --with-x.
412 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000413
414 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
415 | --x-incl | --x-inc | --x-in | --x-i)
416 ac_prev=x_includes ;;
417 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
418 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000419 x_includes="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000420
421 -x-libraries | --x-libraries | --x-librarie | --x-librari \
422 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
423 ac_prev=x_libraries ;;
424 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
425 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000426 x_libraries="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427
Michael W. Hudson54241132001-12-07 15:38:26 +0000428 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000429 ;;
430
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000431 *)
Michael W. Hudson54241132001-12-07 15:38:26 +0000432 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
433 echo "configure: warning: $ac_option: invalid host type" 1>&2
434 fi
435 if test "x$nonopt" != xNONE; then
436 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
437 fi
438 nonopt="$ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439 ;;
440
441 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000442done
443
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444if test -n "$ac_prev"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000445 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000446fi
447
Michael W. Hudson54241132001-12-07 15:38:26 +0000448trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
449
450# File descriptor usage:
451# 0 standard input
452# 1 file creation
453# 2 errors and warnings
454# 3 some systems may open it to /dev/tty
455# 4 used on the Kubota Titan
456# 6 checking for... messages and results
457# 5 compiler messages saved in config.log
458if test "$silent" = yes; then
459 exec 6>/dev/null
460else
461 exec 6>&1
462fi
463exec 5>./config.log
464
465echo "\
466This file contains any messages produced by compilers while
467running configure, to aid debugging if configure makes a mistake.
468" 1>&5
469
470# Strip out --no-create and --no-recursion so they do not pile up.
471# Also quote any args containing shell metacharacters.
472ac_configure_args=
473for ac_arg
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000474do
Michael W. Hudson54241132001-12-07 15:38:26 +0000475 case "$ac_arg" in
476 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
477 | --no-cr | --no-c) ;;
478 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
479 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
480 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
481 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
482 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483 esac
484done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000485
Michael W. Hudson54241132001-12-07 15:38:26 +0000486# NLS nuisances.
487# Only set these to C if already set. These must not be set unconditionally
488# because not all systems understand e.g. LANG=C (notably SCO).
489# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
490# Non-C LC_CTYPE values break the ctype check.
491if test "${LANG+set}" = set; then LANG=C; export LANG; fi
492if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
493if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
494if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000495
Michael W. Hudson54241132001-12-07 15:38:26 +0000496# confdefs.h avoids OS command line length limits that DEFS can exceed.
497rm -rf conftest* confdefs.h
498# AIX cpp loses on an empty file, so make sure it contains at least a newline.
499echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000500
Michael W. Hudson54241132001-12-07 15:38:26 +0000501# A filename unique to this package, relative to the directory that
502# configure is in, which we can look for to find out if srcdir is correct.
503ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000504
505# Find the source files, if location was not specified.
506if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000507 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000508 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000509 ac_prog=$0
Michael W. Hudson54241132001-12-07 15:38:26 +0000510 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000511 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512 srcdir=$ac_confdir
513 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000514 srcdir=..
515 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000516else
517 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000518fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000519if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000520 if test "$ac_srcdir_defaulted" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000521 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000522 else
Michael W. Hudson54241132001-12-07 15:38:26 +0000523 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000524 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000525fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000526srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000527
528# Prefer explicitly selected file to automatically selected ones.
529if test -z "$CONFIG_SITE"; then
530 if test "x$prefix" != xNONE; then
531 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
532 else
533 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
534 fi
535fi
536for ac_site_file in $CONFIG_SITE; do
537 if test -r "$ac_site_file"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000538 echo "loading site script $ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000539 . "$ac_site_file"
540 fi
541done
542
543if test -r "$cache_file"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000544 echo "loading cache $cache_file"
545 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000546else
Michael W. Hudson54241132001-12-07 15:38:26 +0000547 echo "creating cache $cache_file"
548 > $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000549fi
550
Guido van Rossum7f43da71994-08-01 12:15:30 +0000551ac_ext=c
Michael W. Hudson54241132001-12-07 15:38:26 +0000552# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000553ac_cpp='$CPP $CPPFLAGS'
Michael W. Hudson54241132001-12-07 15:38:26 +0000554ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
555ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
556cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000557
Michael W. Hudson54241132001-12-07 15:38:26 +0000558ac_exeext=
559ac_objext=o
560if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
561 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
562 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
563 ac_n= ac_c='
564' ac_t=' '
565 else
566 ac_n=-n ac_c= ac_t=
567 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000568else
Michael W. Hudson54241132001-12-07 15:38:26 +0000569 ac_n= ac_c='\c' ac_t=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000570fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000571
Michael W. Hudson54241132001-12-07 15:38:26 +0000572
573
Guido van Rossum627b2d71993-12-24 10:39:16 +0000574
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000575# Set VERSION so we only need to edit in one place (i.e., here)
576
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +0000577VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000578
Martin v. Löwis1142de32002-03-29 16:28:31 +0000579
580SOVERSION=1.0
581
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +0000582# Arguments passed to configure.
583
584CONFIG_ARGS="$ac_configure_args"
585
Michael W. Hudson54241132001-12-07 15:38:26 +0000586
Jack Jansene578a632001-08-15 01:27:14 +0000587# Check whether --enable-framework or --disable-framework was given.
588if test "${enable_framework+set}" = set; then
589 enableval="$enable_framework"
Michael W. Hudson54241132001-12-07 15:38:26 +0000590
Jack Jansene578a632001-08-15 01:27:14 +0000591 case $enableval in
Michael W. Hudson54241132001-12-07 15:38:26 +0000592 yes)
Jack Jansene578a632001-08-15 01:27:14 +0000593 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +0000594 esac
595 case $enableval in
596 no)
597 PYTHONFRAMEWORK=
598 PYTHONFRAMEWORKDIR=no-framework
599 PYTHONFRAMEWORKPREFIX=
600 PYTHONFRAMEWORKINSTALLDIR=
601 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +0000602 ;;
603 *)
Jack Jansen127e56e2001-09-11 14:41:54 +0000604 PYTHONFRAMEWORK=Python
605 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +0000606 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +0000607 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
608 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +0000609 esac
Michael W. Hudson54241132001-12-07 15:38:26 +0000610
Guido van Rossum563e7081996-09-10 18:20:48 +0000611else
Michael W. Hudson54241132001-12-07 15:38:26 +0000612
Jack Jansene578a632001-08-15 01:27:14 +0000613 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +0000614 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +0000615 PYTHONFRAMEWORKPREFIX=
616 PYTHONFRAMEWORKINSTALLDIR=
617 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000618
Michael W. Hudson54241132001-12-07 15:38:26 +0000619fi
620
621
622
623
624
Jack Jansene578a632001-08-15 01:27:14 +0000625
626##AC_ARG_WITH(dyld,
627##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
628##
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000629# Set name for machine-dependent library files
630
Michael W. Hudson54241132001-12-07 15:38:26 +0000631echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000632echo "configure:633: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000633if test -z "$MACHDEP"
634then
Guido van Rossum563e7081996-09-10 18:20:48 +0000635 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +0000636 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000637 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000638 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000639 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000640 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000641 ac_md_system=`echo $ac_sys_system |
642 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
643 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +0000644 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000645 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000646
Guido van Rossum07397971997-04-29 21:49:50 +0000647 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000648 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000649 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +0000650 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000651 esac
652fi
Guido van Rossum91922671997-10-09 20:24:13 +0000653
654#
655# SGI compilers allow the specification of the both the ABI and the
656# ISA on the command line. Depending on the values of these switches,
657# different and often incompatable code will be generated.
658#
659# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
660# thus supply support for various ABI/ISA combinations. The MACHDEP
661# variable is also adjusted.
662#
663
664if test ! -z "$SGI_ABI"
665then
666 CC="cc $SGI_ABI"
667 LDFLAGS="$SGI_ABI $LDFLAGS"
668 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
669fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000670echo "$ac_t""$MACHDEP" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000671
Guido van Rossum627b2d71993-12-24 10:39:16 +0000672# checks for alternative programs
Michael W. Hudson54241132001-12-07 15:38:26 +0000673echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000674echo "configure:675: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000675# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000676if test "${with_gcc+set}" = set; then
677 withval="$with_gcc"
Michael W. Hudson54241132001-12-07 15:38:26 +0000678
Guido van Rossum7f43da71994-08-01 12:15:30 +0000679 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000680 no) CC=cc
681 without_gcc=yes;;
682 yes) CC=gcc
683 without_gcc=no;;
684 *) CC=$withval
685 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000686 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000687else
Michael W. Hudson54241132001-12-07 15:38:26 +0000688
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000689 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000690 AIX*) CC=cc_r
691 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000692 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000693 case $BE_HOST_CPU in
694 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000695 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000696 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000697 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000698 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000699 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000700 ;;
701 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000702 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000703 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000704 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000705 ;;
706 *)
Michael W. Hudson54241132001-12-07 15:38:26 +0000707 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000708 ;;
709 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000710 AR="\$(srcdir)/Modules/ar_beos"
711 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000712 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000713 Monterey*)
714 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +0000715 without_gcc=;;
716 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000717 esac
Michael W. Hudson54241132001-12-07 15:38:26 +0000718fi
719
720echo "$ac_t""$without_gcc" 1>&6
721
722
Guido van Rossum95012191999-12-16 17:50:52 +0000723
Fred Drakea1a84e72001-03-06 05:52:16 +0000724MAINOBJ=python.o
Michael W. Hudson54241132001-12-07 15:38:26 +0000725echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000726echo "configure:727: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000727# Check whether --with-cxx or --without-cxx was given.
728if test "${with_cxx+set}" = set; then
729 withval="$with_cxx"
Michael W. Hudson54241132001-12-07 15:38:26 +0000730
Martin v. Löwis22352952000-12-13 17:37:02 +0000731 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000732 case $withval in
733 no) CXX=
734 with_cxx=no;;
735 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000736 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000737 with_cxx=$withval;;
738 esac
739else
Michael W. Hudson54241132001-12-07 15:38:26 +0000740
Guido van Rossum95012191999-12-16 17:50:52 +0000741 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000742 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000743
Michael W. Hudson54241132001-12-07 15:38:26 +0000744fi
Guido van Rossum95012191999-12-16 17:50:52 +0000745
Michael W. Hudson54241132001-12-07 15:38:26 +0000746echo "$ac_t""$with_cxx" 1>&6
747
748if test "$with_cxx" = "yes"
749then
750 { echo "configure: error: must supply a compiler when using --with-cxx" 1>&2; exit 1; }
751fi
752
753
754
755
756if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +0000757then
758 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
759do
Michael W. Hudson54241132001-12-07 15:38:26 +0000760# Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +0000761set dummy $ac_prog; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +0000762echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000763echo "configure:764: checking for $ac_word" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +0000764if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
765 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000766else
767 if test -n "$CXX"; then
768 ac_cv_prog_CXX="$CXX" # Let the user override the test.
769else
Michael W. Hudson54241132001-12-07 15:38:26 +0000770 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
771 ac_dummy="$PATH"
772 for ac_dir in $ac_dummy; do
773 test -z "$ac_dir" && ac_dir=.
774 if test -f $ac_dir/$ac_word; then
775 ac_cv_prog_CXX="$ac_prog"
776 break
777 fi
778 done
779 IFS="$ac_save_ifs"
Martin v. Löwis22352952000-12-13 17:37:02 +0000780fi
781fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000782CXX="$ac_cv_prog_CXX"
Martin v. Löwis22352952000-12-13 17:37:02 +0000783if test -n "$CXX"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000784 echo "$ac_t""$CXX" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000785else
Michael W. Hudson54241132001-12-07 15:38:26 +0000786 echo "$ac_t""no" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000787fi
788
Michael W. Hudson54241132001-12-07 15:38:26 +0000789test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +0000790done
791test -n "$CXX" || CXX="notfound"
792
793 if test "$CXX" = "notfound"
794 then
795 CXX=
796 else
Michael W. Hudson54241132001-12-07 15:38:26 +0000797 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000798echo "configure:799: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +0000799
800ac_ext=C
801# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Martin v. Löwis22352952000-12-13 17:37:02 +0000802ac_cpp='$CXXCPP $CPPFLAGS'
Michael W. Hudson54241132001-12-07 15:38:26 +0000803ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
804ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
805cross_compiling=$ac_cv_prog_cxx_cross
806
807cat > conftest.$ac_ext << EOF
808
Martin v. Löwis1142de32002-03-29 16:28:31 +0000809#line 810 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000810#include "confdefs.h"
811
Michael W. Hudson54241132001-12-07 15:38:26 +0000812int main(){return(0);}
813EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +0000814if { (eval echo configure:815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000815 ac_cv_prog_cxx_works=yes
816 # If we can't run a trivial program, we are probably using a cross compiler.
817 if (./conftest; exit) 2>/dev/null; then
818 ac_cv_prog_cxx_cross=no
Jack Jansendd19cf82001-12-06 22:36:17 +0000819 else
Michael W. Hudson54241132001-12-07 15:38:26 +0000820 ac_cv_prog_cxx_cross=yes
Jack Jansendd19cf82001-12-06 22:36:17 +0000821 fi
Jack Jansendd19cf82001-12-06 22:36:17 +0000822else
Michael W. Hudson54241132001-12-07 15:38:26 +0000823 echo "configure: failed program was:" >&5
824 cat conftest.$ac_ext >&5
825 ac_cv_prog_cxx_works=no
Jack Jansendd19cf82001-12-06 22:36:17 +0000826fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000827rm -fr conftest*
828ac_ext=c
829# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Jack Jansendd19cf82001-12-06 22:36:17 +0000830ac_cpp='$CPP $CPPFLAGS'
Michael W. Hudson54241132001-12-07 15:38:26 +0000831ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
832ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
833cross_compiling=$ac_cv_prog_cc_cross
834
835echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
836if test $ac_cv_prog_cxx_works = no; then
837 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
838fi
839echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000840echo "configure:841: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +0000841echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
842cross_compiling=$ac_cv_prog_cxx_cross
Martin v. Löwis22352952000-12-13 17:37:02 +0000843
844 fi
845fi
846
Guido van Rossum8b131c51995-03-09 14:10:13 +0000847# If the user switches compilers, we can't believe the cache
848if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
849then
Michael W. Hudson54241132001-12-07 15:38:26 +0000850 { echo "configure: error: cached CC is different -- throw away $cache_file
851(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
Guido van Rossum8b131c51995-03-09 14:10:13 +0000852fi
853
Michael W. Hudson54241132001-12-07 15:38:26 +0000854# Extract the first word of "gcc", so it can be a program name with args.
Jack Jansendd19cf82001-12-06 22:36:17 +0000855set dummy gcc; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +0000856echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000857echo "configure:858: checking for $ac_word" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +0000858if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
859 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000860else
861 if test -n "$CC"; then
862 ac_cv_prog_CC="$CC" # Let the user override the test.
863else
Michael W. Hudson54241132001-12-07 15:38:26 +0000864 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
865 ac_dummy="$PATH"
866 for ac_dir in $ac_dummy; do
867 test -z "$ac_dir" && ac_dir=.
868 if test -f $ac_dir/$ac_word; then
869 ac_cv_prog_CC="gcc"
870 break
871 fi
872 done
873 IFS="$ac_save_ifs"
Jack Jansendd19cf82001-12-06 22:36:17 +0000874fi
875fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000876CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +0000877if test -n "$CC"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000878 echo "$ac_t""$CC" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +0000879else
Michael W. Hudson54241132001-12-07 15:38:26 +0000880 echo "$ac_t""no" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +0000881fi
882
Jack Jansendd19cf82001-12-06 22:36:17 +0000883if test -z "$CC"; then
884 # Extract the first word of "cc", so it can be a program name with args.
885set dummy cc; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +0000886echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000887echo "configure:888: checking for $ac_word" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +0000888if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
889 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +0000890else
891 if test -n "$CC"; then
892 ac_cv_prog_CC="$CC" # Let the user override the test.
893else
Michael W. Hudson54241132001-12-07 15:38:26 +0000894 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895 ac_prog_rejected=no
Michael W. Hudson54241132001-12-07 15:38:26 +0000896 ac_dummy="$PATH"
897 for ac_dir in $ac_dummy; do
898 test -z "$ac_dir" && ac_dir=.
899 if test -f $ac_dir/$ac_word; then
900 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
901 ac_prog_rejected=yes
902 continue
903 fi
904 ac_cv_prog_CC="cc"
905 break
906 fi
907 done
908 IFS="$ac_save_ifs"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909if test $ac_prog_rejected = yes; then
910 # We found a bogon in the path, so make sure we never use it.
911 set dummy $ac_cv_prog_CC
912 shift
Michael W. Hudson54241132001-12-07 15:38:26 +0000913 if test $# -gt 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 # We chose a different compiler from the bogus one.
915 # However, it has the same basename, so the bogon will be chosen
916 # first if we set CC to just the basename; use the full file name.
917 shift
Michael W. Hudson54241132001-12-07 15:38:26 +0000918 set dummy "$ac_dir/$ac_word" "$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919 shift
920 ac_cv_prog_CC="$@"
921 fi
922fi
923fi
924fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000925CC="$ac_cv_prog_CC"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000926if test -n "$CC"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000927 echo "$ac_t""$CC" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000928else
Michael W. Hudson54241132001-12-07 15:38:26 +0000929 echo "$ac_t""no" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000930fi
931
Michael W. Hudson54241132001-12-07 15:38:26 +0000932 if test -z "$CC"; then
933 case "`uname -s`" in
934 *win32* | *WIN32*)
935 # Extract the first word of "cl", so it can be a program name with args.
936set dummy cl; ac_word=$2
937echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000938echo "configure:939: checking for $ac_word" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +0000939if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
940 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000941else
942 if test -n "$CC"; then
943 ac_cv_prog_CC="$CC" # Let the user override the test.
944else
Michael W. Hudson54241132001-12-07 15:38:26 +0000945 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
946 ac_dummy="$PATH"
947 for ac_dir in $ac_dummy; do
948 test -z "$ac_dir" && ac_dir=.
949 if test -f $ac_dir/$ac_word; then
950 ac_cv_prog_CC="cl"
951 break
Jack Jansendd19cf82001-12-06 22:36:17 +0000952 fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000953 done
954 IFS="$ac_save_ifs"
955fi
956fi
957CC="$ac_cv_prog_CC"
958if test -n "$CC"; then
959 echo "$ac_t""$CC" 1>&6
960else
961 echo "$ac_t""no" 1>&6
962fi
963 ;;
964 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +0000965 fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000966 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
Jack Jansendd19cf82001-12-06 22:36:17 +0000967fi
968
Michael W. Hudson54241132001-12-07 15:38:26 +0000969echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +0000970echo "configure:971: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Jack Jansendd19cf82001-12-06 22:36:17 +0000971
Michael W. Hudson54241132001-12-07 15:38:26 +0000972ac_ext=c
973# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
974ac_cpp='$CPP $CPPFLAGS'
975ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
976ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
977cross_compiling=$ac_cv_prog_cc_cross
978
979cat > conftest.$ac_ext << EOF
980
Martin v. Löwis1142de32002-03-29 16:28:31 +0000981#line 982 "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +0000982#include "confdefs.h"
983
Michael W. Hudson54241132001-12-07 15:38:26 +0000984main(){return(0);}
985EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +0000986if { (eval echo configure:987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000987 ac_cv_prog_cc_works=yes
988 # If we can't run a trivial program, we are probably using a cross compiler.
989 if (./conftest; exit) 2>/dev/null; then
990 ac_cv_prog_cc_cross=no
991 else
992 ac_cv_prog_cc_cross=yes
993 fi
Jack Jansendd19cf82001-12-06 22:36:17 +0000994else
Michael W. Hudson54241132001-12-07 15:38:26 +0000995 echo "configure: failed program was:" >&5
996 cat conftest.$ac_ext >&5
997 ac_cv_prog_cc_works=no
Jack Jansendd19cf82001-12-06 22:36:17 +0000998fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000999rm -fr conftest*
1000ac_ext=c
1001# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1002ac_cpp='$CPP $CPPFLAGS'
1003ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1004ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1005cross_compiling=$ac_cv_prog_cc_cross
Jack Jansendd19cf82001-12-06 22:36:17 +00001006
Michael W. Hudson54241132001-12-07 15:38:26 +00001007echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1008if test $ac_cv_prog_cc_works = no; then
1009 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
Jack Jansendd19cf82001-12-06 22:36:17 +00001010fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001011echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001012echo "configure:1013: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001013echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1014cross_compiling=$ac_cv_prog_cc_cross
1015
1016echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001017echo "configure:1018: checking whether we are using GNU C" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001018if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1019 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001020else
Michael W. Hudson54241132001-12-07 15:38:26 +00001021 cat > conftest.c <<EOF
1022#ifdef __GNUC__
1023 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001024#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00001025EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001026if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001027 ac_cv_prog_gcc=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001028else
Michael W. Hudson54241132001-12-07 15:38:26 +00001029 ac_cv_prog_gcc=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001030fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001031fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001032
Michael W. Hudson54241132001-12-07 15:38:26 +00001033echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1034
1035if test $ac_cv_prog_gcc = yes; then
1036 GCC=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037else
Michael W. Hudson54241132001-12-07 15:38:26 +00001038 GCC=
1039fi
Jack Jansendd19cf82001-12-06 22:36:17 +00001040
Michael W. Hudson54241132001-12-07 15:38:26 +00001041ac_test_CFLAGS="${CFLAGS+set}"
1042ac_save_CFLAGS="$CFLAGS"
1043CFLAGS=
1044echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001045echo "configure:1046: checking whether ${CC-cc} accepts -g" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001046if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1047 echo $ac_n "(cached) $ac_c" 1>&6
1048else
1049 echo 'void f(){}' > conftest.c
1050if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001051 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001052else
Michael W. Hudson54241132001-12-07 15:38:26 +00001053 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001054fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001055rm -f conftest*
1056
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001057fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001058
1059echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001060if test "$ac_test_CFLAGS" = set; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001061 CFLAGS="$ac_save_CFLAGS"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001062elif test $ac_cv_prog_cc_g = yes; then
1063 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001064 CFLAGS="-g -O2"
1065 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001066 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 fi
1068else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001069 if test "$GCC" = yes; then
1070 CFLAGS="-O2"
1071 else
1072 CFLAGS=
1073 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074fi
1075
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001076
1077# checks for UNIX variants that set C preprocessor variables
Michael W. Hudson54241132001-12-07 15:38:26 +00001078echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001079echo "configure:1080: checking how to run the C preprocessor" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001080# On Suns, sometimes $CPP names a directory.
1081if test -n "$CPP" && test -d "$CPP"; then
1082 CPP=
1083fi
1084if test -z "$CPP"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001085if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1086 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001087else
Michael W. Hudson54241132001-12-07 15:38:26 +00001088 # This must be in double quotes, not single quotes, because CPP may get
1089 # substituted into the Makefile and "${CC-cc}" will confuse make.
1090 CPP="${CC-cc} -E"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001091 # On the NeXT, cc -E runs the code through the compiler's parser,
Michael W. Hudson54241132001-12-07 15:38:26 +00001092 # not just through cpp.
1093 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001094#line 1095 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001095#include "confdefs.h"
1096#include <assert.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001097Syntax Error
1098EOF
1099ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00001100{ (eval echo configure:1101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001101ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1102if test -z "$ac_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001103 :
1104else
Michael W. Hudson54241132001-12-07 15:38:26 +00001105 echo "$ac_err" >&5
1106 echo "configure: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001107 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001108 rm -rf conftest*
1109 CPP="${CC-cc} -E -traditional-cpp"
1110 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001111#line 1112 "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001112#include "confdefs.h"
1113#include <assert.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001114Syntax Error
1115EOF
1116ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00001117{ (eval echo configure:1118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001118ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1119if test -z "$ac_err"; then
Jack Jansendd19cf82001-12-06 22:36:17 +00001120 :
1121else
Michael W. Hudson54241132001-12-07 15:38:26 +00001122 echo "$ac_err" >&5
1123 echo "configure: failed program was:" >&5
Jack Jansendd19cf82001-12-06 22:36:17 +00001124 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001125 rm -rf conftest*
1126 CPP="${CC-cc} -nologo -E"
1127 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001128#line 1129 "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001129#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00001130#include <assert.h>
1131Syntax Error
1132EOF
1133ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00001134{ (eval echo configure:1135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001135ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1136if test -z "$ac_err"; then
Jack Jansendd19cf82001-12-06 22:36:17 +00001137 :
1138else
Michael W. Hudson54241132001-12-07 15:38:26 +00001139 echo "$ac_err" >&5
1140 echo "configure: failed program was:" >&5
1141 cat conftest.$ac_ext >&5
1142 rm -rf conftest*
1143 CPP=/lib/cpp
Jack Jansendd19cf82001-12-06 22:36:17 +00001144fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001145rm -f conftest*
1146fi
1147rm -f conftest*
1148fi
1149rm -f conftest*
1150 ac_cv_prog_CPP="$CPP"
1151fi
1152 CPP="$ac_cv_prog_CPP"
1153else
1154 ac_cv_prog_CPP="$CPP"
1155fi
1156echo "$ac_t""$CPP" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001157
Michael W. Hudson54241132001-12-07 15:38:26 +00001158echo $ac_n "checking for AIX""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001159echo "configure:1160: checking for AIX" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001160cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001161#line 1162 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001162#include "confdefs.h"
1163#ifdef _AIX
1164 yes
1165#endif
1166
Michael W. Hudson54241132001-12-07 15:38:26 +00001167EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1169 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001170 rm -rf conftest*
1171 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001172#define _ALL_SOURCE 1
1173EOF
1174
1175else
Michael W. Hudson54241132001-12-07 15:38:26 +00001176 rm -rf conftest*
1177 echo "$ac_t""no" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001178fi
1179rm -f conftest*
1180
Michael W. Hudson54241132001-12-07 15:38:26 +00001181
1182ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1183echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001184echo "configure:1185: checking for minix/config.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001185if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1186 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001187else
Michael W. Hudson54241132001-12-07 15:38:26 +00001188 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001189#line 1190 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001190#include "confdefs.h"
1191#include <minix/config.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001192EOF
1193ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00001194{ (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001195ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1196if test -z "$ac_err"; then
1197 rm -rf conftest*
1198 eval "ac_cv_header_$ac_safe=yes"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001199else
Michael W. Hudson54241132001-12-07 15:38:26 +00001200 echo "$ac_err" >&5
1201 echo "configure: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001202 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001203 rm -rf conftest*
1204 eval "ac_cv_header_$ac_safe=no"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001205fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001206rm -f conftest*
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001207fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001208if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1209 echo "$ac_t""yes" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001210 MINIX=yes
1211else
Michael W. Hudson54241132001-12-07 15:38:26 +00001212 echo "$ac_t""no" 1>&6
1213MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001214fi
1215
1216if test "$MINIX" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001217 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001218#define _POSIX_SOURCE 1
1219EOF
1220
Michael W. Hudson54241132001-12-07 15:38:26 +00001221 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001222#define _POSIX_1_SOURCE 2
1223EOF
1224
Michael W. Hudson54241132001-12-07 15:38:26 +00001225 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001226#define _MINIX 1
1227EOF
1228
1229fi
1230
1231
Michael W. Hudson54241132001-12-07 15:38:26 +00001232echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001233echo "configure:1234: checking for Cygwin environment" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001234if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1235 echo $ac_n "(cached) $ac_c" 1>&6
1236else
1237 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001238#line 1239 "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +00001239#include "confdefs.h"
1240
1241int main() {
1242
1243#ifndef __CYGWIN__
1244#define __CYGWIN__ __CYGWIN32__
1245#endif
1246return __CYGWIN__;
1247; return 0; }
1248EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001249if { (eval echo configure:1250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001250 rm -rf conftest*
1251 ac_cv_cygwin=yes
1252else
1253 echo "configure: failed program was:" >&5
1254 cat conftest.$ac_ext >&5
1255 rm -rf conftest*
1256 ac_cv_cygwin=no
1257fi
1258rm -f conftest*
1259rm -f conftest*
1260fi
1261
1262echo "$ac_t""$ac_cv_cygwin" 1>&6
1263CYGWIN=
1264test "$ac_cv_cygwin" = yes && CYGWIN=yes
1265echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001266echo "configure:1267: checking for mingw32 environment" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001267if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1268 echo $ac_n "(cached) $ac_c" 1>&6
1269else
1270 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001271#line 1272 "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +00001272#include "confdefs.h"
1273
1274int main() {
1275return __MINGW32__;
1276; return 0; }
1277EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001278if { (eval echo configure:1279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001279 rm -rf conftest*
1280 ac_cv_mingw32=yes
1281else
1282 echo "configure: failed program was:" >&5
1283 cat conftest.$ac_ext >&5
1284 rm -rf conftest*
1285 ac_cv_mingw32=no
1286fi
1287rm -f conftest*
1288rm -f conftest*
1289fi
1290
1291echo "$ac_t""$ac_cv_mingw32" 1>&6
1292MINGW32=
1293test "$ac_cv_mingw32" = yes && MINGW32=yes
1294
1295
1296echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001297echo "configure:1298: checking for executable suffix" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001298if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1299 echo $ac_n "(cached) $ac_c" 1>&6
1300else
1301 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1302 ac_cv_exeext=.exe
1303else
1304 rm -f conftest*
1305 echo 'int main () { return 0; }' > conftest.$ac_ext
1306 ac_cv_exeext=
Martin v. Löwis1142de32002-03-29 16:28:31 +00001307 if { (eval echo configure:1308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001308 for file in conftest.*; do
1309 case $file in
1310 *.c | *.o | *.obj) ;;
1311 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1312 esac
1313 done
1314 else
1315 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1316 fi
1317 rm -f conftest*
1318 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1319fi
1320fi
1321
1322EXEEXT=""
1323test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1324echo "$ac_t""${ac_cv_exeext}" 1>&6
1325ac_exeext=$EXEEXT
1326
1327echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001328echo "configure:1329: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001329# Check whether --with-suffix or --without-suffix was given.
1330if test "${with_suffix+set}" = set; then
1331 withval="$with_suffix"
Michael W. Hudson54241132001-12-07 15:38:26 +00001332
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001333 case $withval in
1334 no) EXEEXT=;;
1335 yes) EXEEXT=.exe;;
1336 *) EXEEXT=$withval;;
1337 esac
Michael W. Hudson54241132001-12-07 15:38:26 +00001338fi
1339
1340echo "$ac_t""$EXEEXT" 1>&6
Jack Jansen1999ef42001-12-06 21:47:20 +00001341
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001342# Test whether we're running on a non-case-sensitive system, in which
1343# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00001344
Michael W. Hudson54241132001-12-07 15:38:26 +00001345echo $ac_n "checking for case-insensitive build directory""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001346echo "configure:1347: checking for case-insensitive build directory" >&5
Jack Jansen1999ef42001-12-06 21:47:20 +00001347if test -d "python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001348then
Michael W. Hudson54241132001-12-07 15:38:26 +00001349 echo "$ac_t""yes" 1>&6
Jack Jansen1999ef42001-12-06 21:47:20 +00001350 BUILDEXEEXT=.exe
1351else
Michael W. Hudson54241132001-12-07 15:38:26 +00001352 echo "$ac_t""no" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001353 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001354fi
Guido van Rossumff555e32000-09-22 15:38:21 +00001355
Guido van Rossumdd997f71998-10-07 19:58:26 +00001356case $MACHDEP in
1357bsdos*)
1358 case $CC in
1359 gcc) CC="$CC -D_HAVE_BSDI";;
1360 esac;;
1361esac
1362
Guido van Rossum24b1e751997-08-21 02:29:16 +00001363case $ac_sys_system in
1364hp*|HP*)
1365 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001366 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001367 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001368Monterey*)
1369 case $CC in
1370 cc) CC="$CC -Wl,-Bexport";;
1371 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001372SunOS*)
1373 # Some functions have a prototype only with that define, e.g. confstr
Michael W. Hudson54241132001-12-07 15:38:26 +00001374 cat >> confdefs.h <<\EOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001375#define __EXTENSIONS__ 1
1376EOF
1377
1378 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001379esac
1380
Michael W. Hudson54241132001-12-07 15:38:26 +00001381
1382
1383echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001384echo "configure:1385: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001385if test -z "$LIBRARY"
1386then
1387 LIBRARY='libpython$(VERSION).a'
1388fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001389echo "$ac_t""$LIBRARY" 1>&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001390
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001391# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00001392# name of the library into which to insert object files). BLDLIBRARY is also
1393# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
1394# is blank as the main program is not linked directly against LDLIBRARY.
1395# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
1396# systems without shared libraries, LDLIBRARY is the same as LIBRARY
1397# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
1398# DLLLIBRARY is the shared (i.e., DLL) library.
Michael W. Hudson54241132001-12-07 15:38:26 +00001399#
Martin v. Löwis1142de32002-03-29 16:28:31 +00001400# RUNSHARED is used to run shared python without installed libraries
1401#
1402# INSTSONAME is the name of the shared library that will be use to install
1403# on the system - some systems like version suffix, others don't
1404
1405
Michael W. Hudson54241132001-12-07 15:38:26 +00001406
1407
1408
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001409
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001410LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00001411BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis1142de32002-03-29 16:28:31 +00001412INSTSONMAE='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00001413DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00001414LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00001415RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001416
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001417# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001418# If CXX is set, and if it is needed to link a main function that was
1419# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
1420# python might then depend on the C++ runtime
Michael W. Hudson54241132001-12-07 15:38:26 +00001421# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001422# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001423
Michael W. Hudson54241132001-12-07 15:38:26 +00001424echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001425echo "configure:1426: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001426if test -z "$LINKCC"
1427then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001428 if test -z "$CXX"; then
1429 LINKCC="\$(PURIFY) \$(CC)"
1430 else
1431 echo 'int main(){return 0;}' > conftest.$ac_ext
1432 $CXX -c conftest.$ac_ext 2>&5
1433 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
1434 && test -s conftest$ac_exeext && ./conftest$ac_exeext
1435 then
1436 LINKCC="\$(PURIFY) \$(CC)"
1437 else
1438 LINKCC="\$(PURIFY) \$(CXX)"
1439 fi
1440 rm -fr conftest*
1441 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001442 case $ac_sys_system in
1443 AIX*)
Jack Jansen524a0982002-03-12 15:25:52 +00001444 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $LINKCC";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001445 dgux*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00001446 LINKCC="LD_RUN_PATH=$libdir $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001447 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00001448 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001449 esac
1450fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001451echo "$ac_t""$LINKCC" 1>&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001452
Martin v. Löwis1142de32002-03-29 16:28:31 +00001453echo $ac_n "checking for --enable-shared""... $ac_c" 1>&6
1454echo "configure:1455: checking for --enable-shared" >&5
1455# Check whether --enable-shared or --disable-shared was given.
1456if test "${enable_shared+set}" = set; then
1457 enableval="$enable_shared"
1458 :
1459fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001460
Martin v. Löwis1142de32002-03-29 16:28:31 +00001461
1462if test -z "$enable_shared"
1463then
1464 enable_shared="no"
1465fi
1466echo "$ac_t""$enable_shared" 1>&6
1467
1468
1469echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
1470echo "configure:1471: checking LDLIBRARY" >&5
Jack Jansene578a632001-08-15 01:27:14 +00001471
Guido van Rossumb8552162001-09-05 14:58:11 +00001472# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
1473# library that we build, but we do not want to link against it (we
1474# will find it with a -framework option). For this reason there is an
1475# extra variable BLDLIBRARY against which Python and the extension
1476# modules are linked, BLDLIBRARY. This is normally the same as
1477# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00001478if test "$enable_framework"
1479then
1480 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
1481 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
1482 BLDLIBRARY=''
1483else
1484 BLDLIBRARY='$(LDLIBRARY)'
Michael W. Hudson54241132001-12-07 15:38:26 +00001485fi
Jack Jansene578a632001-08-15 01:27:14 +00001486
Martin v. Löwis1142de32002-03-29 16:28:31 +00001487# Other platforms follow
1488if test $enable_shared = "yes"; then
1489 case $ac_sys_system in
1490 BeOS*)
1491 LDLIBRARY='libpython$(VERSION).so'
1492 ;;
1493 CYGWIN*)
1494 LDLIBRARY='libpython$(VERSION).dll.a'
1495 DLLLIBRARY='libpython$(VERSION).dll'
1496 ;;
1497 SunOS*)
1498 LDLIBRARY='libpython$(VERSION).so'
1499 BLDLIBRARY='-Wl,-rpath,$(LIBDIR) -L. -lpython$(VERSION)'
1500 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
1501 ;;
1502 Linux*)
1503 LDLIBRARY='libpython$(VERSION).so'
1504 BLDLIBRARY='-L. -lpython$(VERSION)'
1505 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
1506 INSTSONAME="$LDLIBRARY".$SOVERSION
1507 ;;
1508 hp*|HP*)
1509 LDLIBRARY='libpython$(VERSION).sl'
1510 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
1511 RUNSHARED=SHLIB_PATH=`pwd`:$SHLIB_PATH
1512 ;;
1513 OSF*)
1514 LDLIBRARY='libpython$(VERSION).so'
1515 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
1516 RUNSHARED=LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH
1517 ;;
1518 esac
1519 # DG/UX requires some fancy ld contortions to produce a .so from an .a
1520 case $MACHDEP in
1521 dguxR4)
1522 LDLIBRARY='libpython$(VERSION).so'
1523 OPT="$OPT -pic"
1524 ;;
1525 esac
1526fi
1527
Michael W. Hudson54241132001-12-07 15:38:26 +00001528echo "$ac_t""$LDLIBRARY" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001529
Michael W. Hudson54241132001-12-07 15:38:26 +00001530# Extract the first word of "ranlib", so it can be a program name with args.
1531set dummy ranlib; ac_word=$2
1532echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001533echo "configure:1534: checking for $ac_word" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001534if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1535 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001536else
1537 if test -n "$RANLIB"; then
1538 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1539else
Michael W. Hudson54241132001-12-07 15:38:26 +00001540 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1541 ac_dummy="$PATH"
1542 for ac_dir in $ac_dummy; do
1543 test -z "$ac_dir" && ac_dir=.
1544 if test -f $ac_dir/$ac_word; then
1545 ac_cv_prog_RANLIB="ranlib"
1546 break
1547 fi
1548 done
1549 IFS="$ac_save_ifs"
1550 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001551fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001552fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001553RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001554if test -n "$RANLIB"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001555 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001556else
Michael W. Hudson54241132001-12-07 15:38:26 +00001557 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001558fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001559
1560
Guido van Rossum7f43da71994-08-01 12:15:30 +00001561for ac_prog in ar aal
1562do
Michael W. Hudson54241132001-12-07 15:38:26 +00001563# Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001564set dummy $ac_prog; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +00001565echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001566echo "configure:1567: checking for $ac_word" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001567if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1568 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001569else
1570 if test -n "$AR"; then
1571 ac_cv_prog_AR="$AR" # Let the user override the test.
1572else
Michael W. Hudson54241132001-12-07 15:38:26 +00001573 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1574 ac_dummy="$PATH"
1575 for ac_dir in $ac_dummy; do
1576 test -z "$ac_dir" && ac_dir=.
1577 if test -f $ac_dir/$ac_word; then
1578 ac_cv_prog_AR="$ac_prog"
1579 break
1580 fi
1581 done
1582 IFS="$ac_save_ifs"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001583fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001584fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001585AR="$ac_cv_prog_AR"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001586if test -n "$AR"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001587 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001588else
Michael W. Hudson54241132001-12-07 15:38:26 +00001589 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001590fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001591
Michael W. Hudson54241132001-12-07 15:38:26 +00001592test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00001593done
1594test -n "$AR" || AR="ar"
1595
Michael W. Hudson54241132001-12-07 15:38:26 +00001596
Neil Schemenauera42c8272001-03-31 00:01:55 +00001597case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00001598bsdos*|hp*|HP*)
1599 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00001600 if test -z "$INSTALL"
1601 then
1602 INSTALL="${srcdir}/install-sh -c"
1603 fi
1604esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001605ac_aux_dir=
1606for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1607 if test -f $ac_dir/install-sh; then
1608 ac_aux_dir=$ac_dir
1609 ac_install_sh="$ac_aux_dir/install-sh -c"
1610 break
1611 elif test -f $ac_dir/install.sh; then
1612 ac_aux_dir=$ac_dir
1613 ac_install_sh="$ac_aux_dir/install.sh -c"
1614 break
1615 fi
1616done
1617if test -z "$ac_aux_dir"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001618 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001619fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001620ac_config_guess=$ac_aux_dir/config.guess
1621ac_config_sub=$ac_aux_dir/config.sub
1622ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001623
1624# Find a good install program. We prefer a C program (faster),
1625# so one script is as good as another. But avoid the broken or
1626# incompatible versions:
1627# SysV /etc/install, /usr/sbin/install
1628# SunOS /usr/etc/install
1629# IRIX /sbin/install
1630# AIX /bin/install
1631# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1632# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1633# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1634# ./install, which can be erroneously created by make from ./install.sh.
Michael W. Hudson54241132001-12-07 15:38:26 +00001635echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001636echo "configure:1637: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001637if test -z "$INSTALL"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001638if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1639 echo $ac_n "(cached) $ac_c" 1>&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001640else
Michael W. Hudson54241132001-12-07 15:38:26 +00001641 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001642 for ac_dir in $PATH; do
1643 # Account for people who put trailing slashes in PATH elements.
Michael W. Hudson54241132001-12-07 15:38:26 +00001644 case "$ac_dir/" in
1645 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001646 *)
1647 # OSF1 and SCO ODT 3.0 have their own names for install.
1648 # Don't use installbsd from OSF since it installs stuff as root
1649 # by default.
1650 for ac_prog in ginstall scoinst install; do
Michael W. Hudson54241132001-12-07 15:38:26 +00001651 if test -f $ac_dir/$ac_prog; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001652 if test $ac_prog = install &&
Michael W. Hudson54241132001-12-07 15:38:26 +00001653 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001654 # AIX install. It has an incompatible calling convention.
1655 :
1656 else
1657 ac_cv_path_install="$ac_dir/$ac_prog -c"
1658 break 2
1659 fi
1660 fi
1661 done
1662 ;;
1663 esac
1664 done
Michael W. Hudson54241132001-12-07 15:38:26 +00001665 IFS="$ac_save_IFS"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001666
1667fi
1668 if test "${ac_cv_path_install+set}" = set; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001669 INSTALL="$ac_cv_path_install"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001670 else
1671 # As a last resort, use the slow shell script. We don't cache a
1672 # path for INSTALL within a source directory, because that will
1673 # break other packages using the cache if that directory is
1674 # removed, or if the path is relative.
Michael W. Hudson54241132001-12-07 15:38:26 +00001675 INSTALL="$ac_install_sh"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001676 fi
1677fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001678echo "$ac_t""$INSTALL" 1>&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001679
1680# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1681# It thinks the first close brace ends the variable substitution.
1682test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1683
Michael W. Hudson54241132001-12-07 15:38:26 +00001684test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001685
1686test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1687
Michael W. Hudson54241132001-12-07 15:38:26 +00001688
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001689# Not every filesystem supports hard links
1690
1691if test -z "$LN" ; then
1692 case $ac_sys_system in
1693 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001694 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001695 *) LN=ln;;
1696 esac
1697fi
1698
Fred Drake109d9862001-07-11 06:27:56 +00001699# Check for --with-pydebug
Michael W. Hudson54241132001-12-07 15:38:26 +00001700echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001701echo "configure:1702: checking for --with-pydebug" >&5
Fred Drake109d9862001-07-11 06:27:56 +00001702# Check whether --with-pydebug or --without-pydebug was given.
1703if test "${with_pydebug+set}" = set; then
1704 withval="$with_pydebug"
Michael W. Hudson54241132001-12-07 15:38:26 +00001705
Fred Drake109d9862001-07-11 06:27:56 +00001706if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00001707then cat >> confdefs.h <<\EOF
Fred Drake109d9862001-07-11 06:27:56 +00001708#define Py_DEBUG 1
1709EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00001710 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1711else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00001712fi
1713else
Michael W. Hudson54241132001-12-07 15:38:26 +00001714 echo "$ac_t""no" 1>&6
1715fi
1716
Fred Drake109d9862001-07-11 06:27:56 +00001717
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001718# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001719
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001720if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001721then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001722 case $GCC in
1723 yes)
1724 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001725 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001726 if test "$Py_DEBUG" = 'true' ; then
1727 # Optimization messes up debuggers, so turn it off for
1728 # debug builds.
1729 OPT="-g -Wall -Wstrict-prototypes"
1730 else
1731 OPT="-g -O3 -Wall -Wstrict-prototypes"
1732 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001733 *)
Fred Drake109d9862001-07-11 06:27:56 +00001734 OPT="-O3 -Wall -Wstrict-prototypes";;
1735 esac
1736 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001737 *)
1738 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00001739 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001740 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1741 *)
1742 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001743 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001744 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00001745 case $ac_sys_system in
1746 Darwin*)
Jack Jansen524a0982002-03-12 15:25:52 +00001747 OPT="$OPT -Wno-long-double -no-cpp-precomp";;
Jack Jansenca06bc62001-08-03 15:32:23 +00001748 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001749fi
1750
Fred Drakee1ceaa02001-12-04 20:55:47 +00001751if test "$Py_DEBUG" = 'true'; then
1752 :
1753else
1754 OPT="-DNDEBUG $OPT"
1755fi
1756
Trent Mick635f6fb2000-08-23 21:33:05 +00001757# The current (beta) Monterey compiler dies with optimizations
1758case $ac_sys_system in
1759Monterey*) OPT="";;
1760esac
1761
Guido van Rossum563e7081996-09-10 18:20:48 +00001762if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001763then
1764 OPT="$OPT $ac_arch_flags"
1765fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00001766
Michael W. Hudson54241132001-12-07 15:38:26 +00001767echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001768echo "configure:1769: checking whether $CC accepts -OPT:Olimit=0" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001769if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
1770 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +00001771else
1772 ac_save_cc="$CC"
1773CC="$CC -OPT:Olimit=0"
1774if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001775 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00001776else
Michael W. Hudson54241132001-12-07 15:38:26 +00001777 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001778#line 1779 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001779#include "confdefs.h"
1780int main() { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001781EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001782if { (eval echo configure:1783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00001783then
Guido van Rossum91922671997-10-09 20:24:13 +00001784 ac_cv_opt_olimit_ok=yes
1785else
Michael W. Hudson54241132001-12-07 15:38:26 +00001786 echo "configure: failed program was:" >&5
1787 cat conftest.$ac_ext >&5
1788 rm -fr conftest*
1789 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00001790fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001791rm -fr conftest*
Guido van Rossum91922671997-10-09 20:24:13 +00001792fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001793
Guido van Rossum91922671997-10-09 20:24:13 +00001794CC="$ac_save_cc"
1795fi
1796
Michael W. Hudson54241132001-12-07 15:38:26 +00001797echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001798if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001799 case $ac_sys_system in
1800 Darwin*) OPT="$OPT" ;;
1801 *) OPT="$OPT -OPT:Olimit=0";;
1802 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001803else
Michael W. Hudson54241132001-12-07 15:38:26 +00001804 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001805echo "configure:1806: checking whether $CC accepts -Olimit 1500" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001806 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1807 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001808else
1809 ac_save_cc="$CC"
1810 CC="$CC -Olimit 1500"
1811 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001812 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001813else
Michael W. Hudson54241132001-12-07 15:38:26 +00001814 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001815#line 1816 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001816#include "confdefs.h"
1817int main() { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001818EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001819if { (eval echo configure:1820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00001820then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001821 ac_cv_olimit_ok=yes
1822else
Michael W. Hudson54241132001-12-07 15:38:26 +00001823 echo "configure: failed program was:" >&5
1824 cat conftest.$ac_ext >&5
1825 rm -fr conftest*
1826 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001827fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001828rm -fr conftest*
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001829fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001830
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001831 CC="$ac_save_cc"
1832fi
1833
Michael W. Hudson54241132001-12-07 15:38:26 +00001834 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001835 if test $ac_cv_olimit_ok = yes; then
1836 OPT="$OPT -Olimit 1500"
1837 fi
1838fi
1839
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001840# On some compilers, pthreads are available without further options
1841# (e.g. MacOS X). On some of these systems, the compiler will not
1842# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
1843# So we have to see first whether pthreads are available without
1844# options before we can check whether -Kpthread improves anything.
Michael W. Hudson54241132001-12-07 15:38:26 +00001845echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001846echo "configure:1847: checking whether pthreads are available without options" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001847if eval "test \"`echo '$''{'ac_cv_pthread_is_default'+set}'`\" = set"; then
1848 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00001849else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001850 if test "$cross_compiling" = yes; then
1851 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001852else
Michael W. Hudson54241132001-12-07 15:38:26 +00001853 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001854#line 1855 "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00001855#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001856
Martin v. Löwis130fb172001-07-19 11:00:41 +00001857#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001858
1859void* routine(void* p){return NULL;}
1860
1861int main(){
1862 pthread_t p;
1863 if(pthread_create(&p,NULL,routine,NULL)!=0)
1864 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00001865 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001866 return 0;
1867}
1868
Michael W. Hudson54241132001-12-07 15:38:26 +00001869EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001870if { (eval echo configure:1871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00001871then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001872 ac_cv_pthread_is_default=yes
1873else
Michael W. Hudson54241132001-12-07 15:38:26 +00001874 echo "configure: failed program was:" >&5
1875 cat conftest.$ac_ext >&5
1876 rm -fr conftest*
1877 ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001878fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001879rm -fr conftest*
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001880fi
1881
Michael W. Hudson54241132001-12-07 15:38:26 +00001882
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001883fi
1884
Michael W. Hudson54241132001-12-07 15:38:26 +00001885echo "$ac_t""$ac_cv_pthread_is_default" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001886
Michael W. Hudson54241132001-12-07 15:38:26 +00001887
1888if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001889then
1890 ac_cv_kpthread=no
1891else
1892# -Kpthread, if available, provides the right #defines
1893# and linker options to make pthread_create available
1894# Some compilers won't report that they do not support -Kpthread,
1895# so we need to run a program to see whether it really made the
1896# function available.
Michael W. Hudson54241132001-12-07 15:38:26 +00001897echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001898echo "configure:1899: checking whether $CC accepts -Kpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001899if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1900 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001901else
1902 ac_save_cc="$CC"
1903CC="$CC -Kpthread"
1904if test "$cross_compiling" = yes; then
1905 ac_cv_kpthread=no
1906else
Michael W. Hudson54241132001-12-07 15:38:26 +00001907 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001908#line 1909 "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001909#include "confdefs.h"
1910
1911#include <pthread.h>
1912
1913void* routine(void* p){return NULL;}
1914
1915int main(){
1916 pthread_t p;
1917 if(pthread_create(&p,NULL,routine,NULL)!=0)
1918 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00001919 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001920 return 0;
1921}
1922
Michael W. Hudson54241132001-12-07 15:38:26 +00001923EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001924if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00001925then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001926 ac_cv_kpthread=yes
1927else
Michael W. Hudson54241132001-12-07 15:38:26 +00001928 echo "configure: failed program was:" >&5
1929 cat conftest.$ac_ext >&5
1930 rm -fr conftest*
1931 ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00001932fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001933rm -fr conftest*
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001934fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001935
Martin v. Löwis130fb172001-07-19 11:00:41 +00001936CC="$ac_save_cc"
1937fi
1938
Michael W. Hudson54241132001-12-07 15:38:26 +00001939echo "$ac_t""$ac_cv_kpthread" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001940fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00001941
Michael W. Hudson54241132001-12-07 15:38:26 +00001942
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001943# checks for header files
Michael W. Hudson54241132001-12-07 15:38:26 +00001944echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00001945echo "configure:1946: checking for ANSI C header files" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001946if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1947 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001948else
Michael W. Hudson54241132001-12-07 15:38:26 +00001949 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001950#line 1951 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001951#include "confdefs.h"
1952#include <stdlib.h>
1953#include <stdarg.h>
1954#include <string.h>
1955#include <float.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001956EOF
1957ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00001958{ (eval echo configure:1959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001959ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1960if test -z "$ac_err"; then
1961 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001962 ac_cv_header_stdc=yes
1963else
Michael W. Hudson54241132001-12-07 15:38:26 +00001964 echo "$ac_err" >&5
1965 echo "configure: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001966 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001967 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001968 ac_cv_header_stdc=no
1969fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001970rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001971
1972if test $ac_cv_header_stdc = yes; then
1973 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Michael W. Hudson54241132001-12-07 15:38:26 +00001974cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001975#line 1976 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001976#include "confdefs.h"
1977#include <string.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001978EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001979if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1980 egrep "memchr" >/dev/null 2>&1; then
1981 :
1982else
Michael W. Hudson54241132001-12-07 15:38:26 +00001983 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001984 ac_cv_header_stdc=no
1985fi
1986rm -f conftest*
1987
1988fi
1989
1990if test $ac_cv_header_stdc = yes; then
1991 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Michael W. Hudson54241132001-12-07 15:38:26 +00001992cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00001993#line 1994 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001994#include "confdefs.h"
1995#include <stdlib.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001996EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1998 egrep "free" >/dev/null 2>&1; then
1999 :
2000else
Michael W. Hudson54241132001-12-07 15:38:26 +00002001 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002002 ac_cv_header_stdc=no
2003fi
2004rm -f conftest*
2005
2006fi
2007
2008if test $ac_cv_header_stdc = yes; then
2009 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Michael W. Hudson54241132001-12-07 15:38:26 +00002010if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002011 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002012else
Michael W. Hudson54241132001-12-07 15:38:26 +00002013 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002014#line 2015 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002015#include "confdefs.h"
2016#include <ctype.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002017#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
2018#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Jack Jansendd19cf82001-12-06 22:36:17 +00002019#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Michael W. Hudson54241132001-12-07 15:38:26 +00002020int main () { int i; for (i = 0; i < 256; i++)
2021if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
2022exit (0); }
2023
2024EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002025if { (eval echo configure:2026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002026then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002027 :
2028else
Michael W. Hudson54241132001-12-07 15:38:26 +00002029 echo "configure: failed program was:" >&5
2030 cat conftest.$ac_ext >&5
2031 rm -fr conftest*
2032 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002033fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002034rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00002035fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002036
Michael W. Hudson54241132001-12-07 15:38:26 +00002037fi
2038fi
2039
2040echo "$ac_t""$ac_cv_header_stdc" 1>&6
2041if test $ac_cv_header_stdc = yes; then
2042 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002043#define STDC_HEADERS 1
2044EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002045
2046fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002047
Martin v. Löwis2e64c342002-03-27 18:49:02 +00002048for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h \
2049libintl.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00002050signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00002051sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00002052sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwis69532332001-10-13 09:12:41 +00002053sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00002054ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00002055do
Michael W. Hudson54241132001-12-07 15:38:26 +00002056ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2057echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002058echo "configure:2059: checking for $ac_hdr" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002059if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2060 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002061else
Michael W. Hudson54241132001-12-07 15:38:26 +00002062 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002063#line 2064 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002064#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002065#include <$ac_hdr>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002066EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002067ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00002068{ (eval echo configure:2069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002069ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2070if test -z "$ac_err"; then
2071 rm -rf conftest*
2072 eval "ac_cv_header_$ac_safe=yes"
2073else
2074 echo "$ac_err" >&5
2075 echo "configure: failed program was:" >&5
2076 cat conftest.$ac_ext >&5
2077 rm -rf conftest*
2078 eval "ac_cv_header_$ac_safe=no"
2079fi
2080rm -f conftest*
2081fi
2082if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2083 echo "$ac_t""yes" 1>&6
2084 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2085 cat >> confdefs.h <<EOF
2086#define $ac_tr_hdr 1
2087EOF
2088
2089else
2090 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002091fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002092done
2093
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002094ac_header_dirent=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002095for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2096do
2097ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2098echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002099echo "configure:2100: checking for $ac_hdr that defines DIR" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002100if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2101 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002102else
Michael W. Hudson54241132001-12-07 15:38:26 +00002103 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002104#line 2105 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002105#include "confdefs.h"
2106#include <sys/types.h>
2107#include <$ac_hdr>
Michael W. Hudson54241132001-12-07 15:38:26 +00002108int main() {
2109DIR *dirp = 0;
2110; return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002111EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002112if { (eval echo configure:2113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002113 rm -rf conftest*
2114 eval "ac_cv_header_dirent_$ac_safe=yes"
2115else
2116 echo "configure: failed program was:" >&5
2117 cat conftest.$ac_ext >&5
2118 rm -rf conftest*
2119 eval "ac_cv_header_dirent_$ac_safe=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002120fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002121rm -f conftest*
2122fi
2123if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2124 echo "$ac_t""yes" 1>&6
2125 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2126 cat >> confdefs.h <<EOF
2127#define $ac_tr_hdr 1
2128EOF
2129 ac_header_dirent=$ac_hdr; break
2130else
2131 echo "$ac_t""no" 1>&6
2132fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002133done
2134# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2135if test $ac_header_dirent = dirent.h; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002136echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002137echo "configure:2138: checking for opendir in -ldir" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002138ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2139if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2140 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002141else
Michael W. Hudson54241132001-12-07 15:38:26 +00002142 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002143LIBS="-ldir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00002144cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002145#line 2146 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002146#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002147/* Override any gcc2 internal prototype to avoid an error. */
2148/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00002149 builtin and then its argument prototype would still apply. */
2150char opendir();
2151
2152int main() {
2153opendir()
2154; return 0; }
2155EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002156if { (eval echo configure:2157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002157 rm -rf conftest*
2158 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002159else
Michael W. Hudson54241132001-12-07 15:38:26 +00002160 echo "configure: failed program was:" >&5
2161 cat conftest.$ac_ext >&5
2162 rm -rf conftest*
2163 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002164fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002165rm -f conftest*
2166LIBS="$ac_save_LIBS"
2167
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002168fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002169if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2170 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002171 LIBS="$LIBS -ldir"
Michael W. Hudson54241132001-12-07 15:38:26 +00002172else
2173 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002174fi
2175
2176else
Michael W. Hudson54241132001-12-07 15:38:26 +00002177echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002178echo "configure:2179: checking for opendir in -lx" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002179ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2180if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2181 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002182else
Michael W. Hudson54241132001-12-07 15:38:26 +00002183 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002184LIBS="-lx $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00002185cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002186#line 2187 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002187#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002188/* Override any gcc2 internal prototype to avoid an error. */
2189/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00002190 builtin and then its argument prototype would still apply. */
2191char opendir();
2192
2193int main() {
2194opendir()
2195; return 0; }
2196EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002197if { (eval echo configure:2198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002198 rm -rf conftest*
2199 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002200else
Michael W. Hudson54241132001-12-07 15:38:26 +00002201 echo "configure: failed program was:" >&5
2202 cat conftest.$ac_ext >&5
2203 rm -rf conftest*
2204 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002205fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002206rm -f conftest*
2207LIBS="$ac_save_LIBS"
2208
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002209fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002210if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2211 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002212 LIBS="$LIBS -lx"
Michael W. Hudson54241132001-12-07 15:38:26 +00002213else
2214 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002215fi
2216
2217fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002218
Michael W. Hudson54241132001-12-07 15:38:26 +00002219
Guido van Rossum627b2d71993-12-24 10:39:16 +00002220# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002221was_it_defined=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002222echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002223echo "configure:2224: checking for clock_t in time.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002224cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002225#line 2226 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002226#include "confdefs.h"
2227#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002228EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002229if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2230 egrep "clock_t" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002231 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00002232 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002233else
Michael W. Hudson54241132001-12-07 15:38:26 +00002234 rm -rf conftest*
2235 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002236#define clock_t long
2237EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002238
2239fi
2240rm -f conftest*
2241
Michael W. Hudson54241132001-12-07 15:38:26 +00002242echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002243
Guido van Rossum810cc512001-09-09 23:51:39 +00002244# Two defines needed to enable largefile support on various platforms
2245# These may affect some typedefs
Michael W. Hudson54241132001-12-07 15:38:26 +00002246cat >> confdefs.h <<\EOF
Guido van Rossum810cc512001-09-09 23:51:39 +00002247#define _LARGEFILE_SOURCE 1
2248EOF
2249
Michael W. Hudson54241132001-12-07 15:38:26 +00002250cat >> confdefs.h <<\EOF
Guido van Rossum810cc512001-09-09 23:51:39 +00002251#define _FILE_OFFSET_BITS 64
2252EOF
2253
Michael W. Hudson54241132001-12-07 15:38:26 +00002254
Guido van Rossum84e7b241996-08-19 21:59:00 +00002255# Add some code to confdefs.h so that the test for off_t works on SCO
2256cat >> confdefs.h <<\EOF
2257#if defined(SCO_DS)
2258#undef _OFF_T
2259#endif
2260EOF
2261
Guido van Rossumef2255b2000-03-10 22:30:29 +00002262# Type availability checks
Michael W. Hudson54241132001-12-07 15:38:26 +00002263echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002264echo "configure:2265: checking for mode_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002265if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2266 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002267else
Michael W. Hudson54241132001-12-07 15:38:26 +00002268 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002269#line 2270 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002270#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002271#include <sys/types.h>
2272#if STDC_HEADERS
2273#include <stdlib.h>
2274#include <stddef.h>
2275#endif
Jack Jansendd19cf82001-12-06 22:36:17 +00002276EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002277if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2278 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2279 rm -rf conftest*
Jack Jansendd19cf82001-12-06 22:36:17 +00002280 ac_cv_type_mode_t=yes
2281else
Michael W. Hudson54241132001-12-07 15:38:26 +00002282 rm -rf conftest*
2283 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00002284fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002285rm -f conftest*
Jack Jansendd19cf82001-12-06 22:36:17 +00002286
Michael W. Hudson54241132001-12-07 15:38:26 +00002287fi
2288echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2289if test $ac_cv_type_mode_t = no; then
2290 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002291#define mode_t int
2292EOF
2293
2294fi
2295
Michael W. Hudson54241132001-12-07 15:38:26 +00002296echo $ac_n "checking for off_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002297echo "configure:2298: checking for off_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002298if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2299 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002300else
Michael W. Hudson54241132001-12-07 15:38:26 +00002301 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002302#line 2303 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002303#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002304#include <sys/types.h>
2305#if STDC_HEADERS
2306#include <stdlib.h>
2307#include <stddef.h>
2308#endif
2309EOF
2310if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2311 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2312 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002313 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002314else
Michael W. Hudson54241132001-12-07 15:38:26 +00002315 rm -rf conftest*
2316 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002317fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002318rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002319
Michael W. Hudson54241132001-12-07 15:38:26 +00002320fi
2321echo "$ac_t""$ac_cv_type_off_t" 1>&6
2322if test $ac_cv_type_off_t = no; then
2323 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002324#define off_t long
2325EOF
2326
2327fi
2328
Michael W. Hudson54241132001-12-07 15:38:26 +00002329echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002330echo "configure:2331: checking for pid_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002331if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2332 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002333else
Michael W. Hudson54241132001-12-07 15:38:26 +00002334 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002335#line 2336 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002336#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002337#include <sys/types.h>
2338#if STDC_HEADERS
2339#include <stdlib.h>
2340#include <stddef.h>
2341#endif
2342EOF
2343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2344 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2345 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002346 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002347else
Michael W. Hudson54241132001-12-07 15:38:26 +00002348 rm -rf conftest*
2349 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002350fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002351rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002352
Michael W. Hudson54241132001-12-07 15:38:26 +00002353fi
2354echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2355if test $ac_cv_type_pid_t = no; then
2356 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002357#define pid_t int
2358EOF
2359
2360fi
2361
Michael W. Hudson54241132001-12-07 15:38:26 +00002362echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002363echo "configure:2364: checking return type of signal handlers" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002364if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2365 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002366else
Michael W. Hudson54241132001-12-07 15:38:26 +00002367 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002368#line 2369 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002369#include "confdefs.h"
2370#include <sys/types.h>
2371#include <signal.h>
2372#ifdef signal
Michael W. Hudson54241132001-12-07 15:38:26 +00002373#undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00002374#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002375#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002376extern "C" void (*signal (int, void (*)(int)))(int);
2377#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002378void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002379#endif
2380
Michael W. Hudson54241132001-12-07 15:38:26 +00002381int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002382int i;
Michael W. Hudson54241132001-12-07 15:38:26 +00002383; return 0; }
2384EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002385if { (eval echo configure:2386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002386 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002387 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002388else
Michael W. Hudson54241132001-12-07 15:38:26 +00002389 echo "configure: failed program was:" >&5
2390 cat conftest.$ac_ext >&5
2391 rm -rf conftest*
2392 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002393fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002394rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002395fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002396
Michael W. Hudson54241132001-12-07 15:38:26 +00002397echo "$ac_t""$ac_cv_type_signal" 1>&6
2398cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002399#define RETSIGTYPE $ac_cv_type_signal
2400EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002401
Michael W. Hudson54241132001-12-07 15:38:26 +00002402
2403echo $ac_n "checking for size_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002404echo "configure:2405: checking for size_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002405if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2406 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002407else
Michael W. Hudson54241132001-12-07 15:38:26 +00002408 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002409#line 2410 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002410#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002411#include <sys/types.h>
2412#if STDC_HEADERS
2413#include <stdlib.h>
2414#include <stddef.h>
2415#endif
2416EOF
2417if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2418 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2419 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002420 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002421else
Michael W. Hudson54241132001-12-07 15:38:26 +00002422 rm -rf conftest*
2423 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002424fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002425rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002426
Michael W. Hudson54241132001-12-07 15:38:26 +00002427fi
2428echo "$ac_t""$ac_cv_type_size_t" 1>&6
2429if test $ac_cv_type_size_t = no; then
2430 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002431#define size_t unsigned
2432EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002433
2434fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002435
Michael W. Hudson54241132001-12-07 15:38:26 +00002436echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002437echo "configure:2438: checking for uid_t in sys/types.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002438if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2439 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002440else
Michael W. Hudson54241132001-12-07 15:38:26 +00002441 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002442#line 2443 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002443#include "confdefs.h"
2444#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002445EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002446if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2447 egrep "uid_t" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002448 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002449 ac_cv_type_uid_t=yes
2450else
Michael W. Hudson54241132001-12-07 15:38:26 +00002451 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002452 ac_cv_type_uid_t=no
2453fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002454rm -f conftest*
2455
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002456fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002457
Michael W. Hudson54241132001-12-07 15:38:26 +00002458echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2459if test $ac_cv_type_uid_t = no; then
2460 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002461#define uid_t int
2462EOF
2463
Michael W. Hudson54241132001-12-07 15:38:26 +00002464 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002465#define gid_t int
2466EOF
2467
2468fi
2469
Jack Jansendd19cf82001-12-06 22:36:17 +00002470
Michael W. Hudson54241132001-12-07 15:38:26 +00002471# Sizes of various common basic types
2472echo $ac_n "checking size of int""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002473echo "configure:2474: checking size of int" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002474if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2475 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002476else
2477 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002478 ac_cv_sizeof_int=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002479else
Michael W. Hudson54241132001-12-07 15:38:26 +00002480 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002481#line 2482 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002482#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002483#include <stdio.h>
2484main()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002485{
Michael W. Hudson54241132001-12-07 15:38:26 +00002486 FILE *f=fopen("conftestval", "w");
2487 if (!f) exit(1);
2488 fprintf(f, "%d\n", sizeof(int));
2489 exit(0);
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002490}
Michael W. Hudson54241132001-12-07 15:38:26 +00002491EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002492if { (eval echo configure:2493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002493then
2494 ac_cv_sizeof_int=`cat conftestval`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002495else
Michael W. Hudson54241132001-12-07 15:38:26 +00002496 echo "configure: failed program was:" >&5
2497 cat conftest.$ac_ext >&5
2498 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002499 ac_cv_sizeof_int=0
2500fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002501rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002502fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002503
2504fi
2505echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2506cat >> confdefs.h <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002507#define SIZEOF_INT $ac_cv_sizeof_int
2508EOF
2509
2510
Michael W. Hudson54241132001-12-07 15:38:26 +00002511echo $ac_n "checking size of long""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002512echo "configure:2513: checking size of long" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002513if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2514 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002515else
2516 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002517 ac_cv_sizeof_long=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002518else
Michael W. Hudson54241132001-12-07 15:38:26 +00002519 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002520#line 2521 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002521#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002522#include <stdio.h>
2523main()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002524{
Michael W. Hudson54241132001-12-07 15:38:26 +00002525 FILE *f=fopen("conftestval", "w");
2526 if (!f) exit(1);
2527 fprintf(f, "%d\n", sizeof(long));
2528 exit(0);
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002529}
Michael W. Hudson54241132001-12-07 15:38:26 +00002530EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002531if { (eval echo configure:2532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002532then
2533 ac_cv_sizeof_long=`cat conftestval`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002534else
Michael W. Hudson54241132001-12-07 15:38:26 +00002535 echo "configure: failed program was:" >&5
2536 cat conftest.$ac_ext >&5
2537 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002538 ac_cv_sizeof_long=0
2539fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002540rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002541fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002542
2543fi
2544echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2545cat >> confdefs.h <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002546#define SIZEOF_LONG $ac_cv_sizeof_long
2547EOF
2548
2549
Michael W. Hudson54241132001-12-07 15:38:26 +00002550echo $ac_n "checking size of void *""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002551echo "configure:2552: checking size of void *" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002552if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
2553 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002554else
2555 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002556 ac_cv_sizeof_void_p=4
Guido van Rossumad678af1998-10-02 14:42:15 +00002557else
Michael W. Hudson54241132001-12-07 15:38:26 +00002558 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002559#line 2560 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002560#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002561#include <stdio.h>
2562main()
Guido van Rossumad678af1998-10-02 14:42:15 +00002563{
Michael W. Hudson54241132001-12-07 15:38:26 +00002564 FILE *f=fopen("conftestval", "w");
2565 if (!f) exit(1);
2566 fprintf(f, "%d\n", sizeof(void *));
2567 exit(0);
Guido van Rossumad678af1998-10-02 14:42:15 +00002568}
Michael W. Hudson54241132001-12-07 15:38:26 +00002569EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002570if { (eval echo configure:2571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002571then
2572 ac_cv_sizeof_void_p=`cat conftestval`
Guido van Rossumad678af1998-10-02 14:42:15 +00002573else
Michael W. Hudson54241132001-12-07 15:38:26 +00002574 echo "configure: failed program was:" >&5
2575 cat conftest.$ac_ext >&5
2576 rm -fr conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00002577 ac_cv_sizeof_void_p=0
2578fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002579rm -fr conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00002580fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002581
2582fi
2583echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2584cat >> confdefs.h <<EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00002585#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2586EOF
2587
2588
Michael W. Hudson54241132001-12-07 15:38:26 +00002589echo $ac_n "checking size of char""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002590echo "configure:2591: checking size of char" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002591if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2592 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002593else
2594 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002595 ac_cv_sizeof_char=1
Guido van Rossumef2255b2000-03-10 22:30:29 +00002596else
Michael W. Hudson54241132001-12-07 15:38:26 +00002597 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002598#line 2599 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002599#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002600#include <stdio.h>
2601main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002602{
Michael W. Hudson54241132001-12-07 15:38:26 +00002603 FILE *f=fopen("conftestval", "w");
2604 if (!f) exit(1);
2605 fprintf(f, "%d\n", sizeof(char));
2606 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002607}
Michael W. Hudson54241132001-12-07 15:38:26 +00002608EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002609if { (eval echo configure:2610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002610then
2611 ac_cv_sizeof_char=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002612else
Michael W. Hudson54241132001-12-07 15:38:26 +00002613 echo "configure: failed program was:" >&5
2614 cat conftest.$ac_ext >&5
2615 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002616 ac_cv_sizeof_char=0
2617fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002618rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002619fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002620
2621fi
2622echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2623cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002624#define SIZEOF_CHAR $ac_cv_sizeof_char
2625EOF
2626
2627
Michael W. Hudson54241132001-12-07 15:38:26 +00002628echo $ac_n "checking size of short""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002629echo "configure:2630: checking size of short" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002630if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2631 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002632else
2633 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002634 ac_cv_sizeof_short=2
Guido van Rossumef2255b2000-03-10 22:30:29 +00002635else
Michael W. Hudson54241132001-12-07 15:38:26 +00002636 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002637#line 2638 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002638#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002639#include <stdio.h>
2640main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002641{
Michael W. Hudson54241132001-12-07 15:38:26 +00002642 FILE *f=fopen("conftestval", "w");
2643 if (!f) exit(1);
2644 fprintf(f, "%d\n", sizeof(short));
2645 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002646}
Michael W. Hudson54241132001-12-07 15:38:26 +00002647EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002648if { (eval echo configure:2649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002649then
2650 ac_cv_sizeof_short=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002651else
Michael W. Hudson54241132001-12-07 15:38:26 +00002652 echo "configure: failed program was:" >&5
2653 cat conftest.$ac_ext >&5
2654 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002655 ac_cv_sizeof_short=0
2656fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002657rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002658fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002659
2660fi
2661echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2662cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002663#define SIZEOF_SHORT $ac_cv_sizeof_short
2664EOF
2665
2666
Michael W. Hudson54241132001-12-07 15:38:26 +00002667echo $ac_n "checking size of float""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002668echo "configure:2669: checking size of float" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002669if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
2670 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002671else
2672 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002673 ac_cv_sizeof_float=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00002674else
Michael W. Hudson54241132001-12-07 15:38:26 +00002675 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002676#line 2677 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002677#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002678#include <stdio.h>
2679main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002680{
Michael W. Hudson54241132001-12-07 15:38:26 +00002681 FILE *f=fopen("conftestval", "w");
2682 if (!f) exit(1);
2683 fprintf(f, "%d\n", sizeof(float));
2684 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002685}
Michael W. Hudson54241132001-12-07 15:38:26 +00002686EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002687if { (eval echo configure:2688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002688then
2689 ac_cv_sizeof_float=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002690else
Michael W. Hudson54241132001-12-07 15:38:26 +00002691 echo "configure: failed program was:" >&5
2692 cat conftest.$ac_ext >&5
2693 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002694 ac_cv_sizeof_float=0
2695fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002696rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002697fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002698
2699fi
2700echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2701cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002702#define SIZEOF_FLOAT $ac_cv_sizeof_float
2703EOF
2704
2705
Michael W. Hudson54241132001-12-07 15:38:26 +00002706echo $ac_n "checking size of double""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002707echo "configure:2708: checking size of double" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002708if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
2709 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002710else
2711 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002712 ac_cv_sizeof_double=8
Guido van Rossumef2255b2000-03-10 22:30:29 +00002713else
Michael W. Hudson54241132001-12-07 15:38:26 +00002714 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002715#line 2716 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002716#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002717#include <stdio.h>
2718main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002719{
Michael W. Hudson54241132001-12-07 15:38:26 +00002720 FILE *f=fopen("conftestval", "w");
2721 if (!f) exit(1);
2722 fprintf(f, "%d\n", sizeof(double));
2723 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002724}
Michael W. Hudson54241132001-12-07 15:38:26 +00002725EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002726if { (eval echo configure:2727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002727then
2728 ac_cv_sizeof_double=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002729else
Michael W. Hudson54241132001-12-07 15:38:26 +00002730 echo "configure: failed program was:" >&5
2731 cat conftest.$ac_ext >&5
2732 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002733 ac_cv_sizeof_double=0
2734fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002735rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002736fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002737
2738fi
2739echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2740cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002741#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2742EOF
2743
2744
Michael W. Hudson54241132001-12-07 15:38:26 +00002745echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002746echo "configure:2747: checking size of fpos_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002747if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
2748 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002749else
2750 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002751 ac_cv_sizeof_fpos_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002752else
Michael W. Hudson54241132001-12-07 15:38:26 +00002753 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002754#line 2755 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002755#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002756#include <stdio.h>
2757main()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002758{
Michael W. Hudson54241132001-12-07 15:38:26 +00002759 FILE *f=fopen("conftestval", "w");
2760 if (!f) exit(1);
2761 fprintf(f, "%d\n", sizeof(fpos_t));
2762 exit(0);
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002763}
Michael W. Hudson54241132001-12-07 15:38:26 +00002764EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002765if { (eval echo configure:2766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002766then
2767 ac_cv_sizeof_fpos_t=`cat conftestval`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002768else
Michael W. Hudson54241132001-12-07 15:38:26 +00002769 echo "configure: failed program was:" >&5
2770 cat conftest.$ac_ext >&5
2771 rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002772 ac_cv_sizeof_fpos_t=0
2773fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002774rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002775fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002776
2777fi
2778echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2779cat >> confdefs.h <<EOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002780#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2781EOF
2782
Michael W. Hudson54241132001-12-07 15:38:26 +00002783
2784
2785echo $ac_n "checking for long long support""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002786echo "configure:2787: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002787have_long_long=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002788cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002789#line 2790 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002790#include "confdefs.h"
2791
Michael W. Hudson54241132001-12-07 15:38:26 +00002792int main() {
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002793long long x; x = (long long)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002794; return 0; }
2795EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002796if { (eval echo configure:2797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002797 rm -rf conftest*
2798 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002799#define HAVE_LONG_LONG 1
2800EOF
2801 have_long_long=yes
2802else
Michael W. Hudson54241132001-12-07 15:38:26 +00002803 echo "configure: failed program was:" >&5
2804 cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002805fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002806rm -f conftest*
2807echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002808if test "$have_long_long" = yes ; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002809echo $ac_n "checking size of long long""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002810echo "configure:2811: checking size of long long" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002811if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2812 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002813else
2814 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002815 ac_cv_sizeof_long_long=8
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002816else
Michael W. Hudson54241132001-12-07 15:38:26 +00002817 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002818#line 2819 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002819#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002820#include <stdio.h>
2821main()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002822{
Michael W. Hudson54241132001-12-07 15:38:26 +00002823 FILE *f=fopen("conftestval", "w");
2824 if (!f) exit(1);
2825 fprintf(f, "%d\n", sizeof(long long));
2826 exit(0);
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002827}
Michael W. Hudson54241132001-12-07 15:38:26 +00002828EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002829if { (eval echo configure:2830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002830then
2831 ac_cv_sizeof_long_long=`cat conftestval`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002832else
Michael W. Hudson54241132001-12-07 15:38:26 +00002833 echo "configure: failed program was:" >&5
2834 cat conftest.$ac_ext >&5
2835 rm -fr conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002836 ac_cv_sizeof_long_long=0
2837fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002838rm -fr conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002839fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002840
2841fi
2842echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2843cat >> confdefs.h <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002844#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2845EOF
2846
Michael W. Hudson54241132001-12-07 15:38:26 +00002847
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002848fi
2849
Michael W. Hudson54241132001-12-07 15:38:26 +00002850echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002851echo "configure:2852: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002852have_uintptr_t=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002853cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002854#line 2855 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002855#include "confdefs.h"
2856
Michael W. Hudson54241132001-12-07 15:38:26 +00002857int main() {
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002858uintptr_t x; x = (uintptr_t)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002859; return 0; }
2860EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002861if { (eval echo configure:2862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002862 rm -rf conftest*
2863 cat >> confdefs.h <<\EOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002864#define HAVE_UINTPTR_T 1
2865EOF
2866 have_uintptr_t=yes
2867else
Michael W. Hudson54241132001-12-07 15:38:26 +00002868 echo "configure: failed program was:" >&5
2869 cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002870fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002871rm -f conftest*
2872echo "$ac_t""$have_uintptr_t" 1>&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002873if test "$have_uintptr_t" = yes ; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002874echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002875echo "configure:2876: checking size of uintptr_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002876if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
2877 echo $ac_n "(cached) $ac_c" 1>&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002878else
2879 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002880 ac_cv_sizeof_uintptr_t=4
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002881else
Michael W. Hudson54241132001-12-07 15:38:26 +00002882 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002883#line 2884 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002884#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002885#include <stdio.h>
2886main()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002887{
Michael W. Hudson54241132001-12-07 15:38:26 +00002888 FILE *f=fopen("conftestval", "w");
2889 if (!f) exit(1);
2890 fprintf(f, "%d\n", sizeof(uintptr_t));
2891 exit(0);
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002892}
Michael W. Hudson54241132001-12-07 15:38:26 +00002893EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002894if { (eval echo configure:2895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002895then
2896 ac_cv_sizeof_uintptr_t=`cat conftestval`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002897else
Michael W. Hudson54241132001-12-07 15:38:26 +00002898 echo "configure: failed program was:" >&5
2899 cat conftest.$ac_ext >&5
2900 rm -fr conftest*
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002901 ac_cv_sizeof_uintptr_t=0
2902fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002903rm -fr conftest*
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002904fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002905
2906fi
2907echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2908cat >> confdefs.h <<EOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002909#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2910EOF
2911
Michael W. Hudson54241132001-12-07 15:38:26 +00002912
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002913fi
2914
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002915# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002916echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002917echo "configure:2918: checking size of off_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002918if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
2919 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002920else
2921 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002922 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002923else
Michael W. Hudson54241132001-12-07 15:38:26 +00002924 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002925#line 2926 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002926#include "confdefs.h"
2927#include <stdio.h>
2928#include <sys/types.h>
2929main()
2930{
2931 FILE *f=fopen("conftestval", "w");
2932 if (!f) exit(1);
2933 fprintf(f, "%d\n", sizeof(off_t));
2934 exit(0);
2935}
Michael W. Hudson54241132001-12-07 15:38:26 +00002936EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002937if { (eval echo configure:2938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002938then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002939 ac_cv_sizeof_off_t=`cat conftestval`
2940else
Michael W. Hudson54241132001-12-07 15:38:26 +00002941 echo "configure: failed program was:" >&5
2942 cat conftest.$ac_ext >&5
2943 rm -fr conftest*
2944 ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002945fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002946rm -fr conftest*
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002947fi
2948
Michael W. Hudson54241132001-12-07 15:38:26 +00002949
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002950fi
2951
Michael W. Hudson54241132001-12-07 15:38:26 +00002952echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2953cat >> confdefs.h <<EOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002954#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2955EOF
2956
Michael W. Hudson54241132001-12-07 15:38:26 +00002957
2958echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002959echo "configure:2960: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002960if test "$have_long_long" = yes -a \
2961 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2962 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002963 cat >> confdefs.h <<\EOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002964#define HAVE_LARGEFILE_SUPPORT 1
2965EOF
2966
Michael W. Hudson54241132001-12-07 15:38:26 +00002967 echo "$ac_t""yes" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002968else
Michael W. Hudson54241132001-12-07 15:38:26 +00002969 echo "$ac_t""no" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002970fi
2971
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002972# AC_CHECK_SIZEOF() doesn't include <time.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002973echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00002974echo "configure:2975: checking size of time_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002975if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
2976 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002977else
2978 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002979 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002980else
Michael W. Hudson54241132001-12-07 15:38:26 +00002981 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002982#line 2983 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002983#include "confdefs.h"
2984#include <stdio.h>
2985#include <time.h>
2986main()
2987{
2988 FILE *f=fopen("conftestval", "w");
2989 if (!f) exit(1);
2990 fprintf(f, "%d\n", sizeof(time_t));
2991 exit(0);
2992}
Michael W. Hudson54241132001-12-07 15:38:26 +00002993EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00002994if { (eval echo configure:2995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002995then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002996 ac_cv_sizeof_time_t=`cat conftestval`
2997else
Michael W. Hudson54241132001-12-07 15:38:26 +00002998 echo "configure: failed program was:" >&5
2999 cat conftest.$ac_ext >&5
3000 rm -fr conftest*
3001 ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003002fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003003rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003004fi
3005
Michael W. Hudson54241132001-12-07 15:38:26 +00003006
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003007fi
3008
Michael W. Hudson54241132001-12-07 15:38:26 +00003009echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
3010cat >> confdefs.h <<EOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00003011#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
3012EOF
3013
Michael W. Hudson54241132001-12-07 15:38:26 +00003014
3015
Trent Mick635f6fb2000-08-23 21:33:05 +00003016# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003017ac_save_cc="$CC"
3018if test "$ac_cv_kpthread" = "yes"
3019then CC="$CC -Kpthread"
3020fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003021echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003022echo "configure:3023: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00003023have_pthread_t=no
Michael W. Hudson54241132001-12-07 15:38:26 +00003024cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003025#line 3026 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00003026#include "confdefs.h"
3027#include <pthread.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00003028int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00003029pthread_t x; x = *(pthread_t*)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00003030; return 0; }
3031EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003032if { (eval echo configure:3033: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003033 rm -rf conftest*
Trent Mick635f6fb2000-08-23 21:33:05 +00003034 have_pthread_t=yes
3035else
Michael W. Hudson54241132001-12-07 15:38:26 +00003036 echo "configure: failed program was:" >&5
3037 cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00003038fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003039rm -f conftest*
3040echo "$ac_t""$have_pthread_t" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003041if test "$have_pthread_t" = yes ; then
3042 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00003043 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003044echo "configure:3045: checking size of pthread_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003045 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
3046 echo $ac_n "(cached) $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00003047else
3048 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003049 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00003050else
Michael W. Hudson54241132001-12-07 15:38:26 +00003051 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003052#line 3053 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00003053#include "confdefs.h"
3054#include <stdio.h>
3055 #include <pthread.h>
3056 main()
3057 {
3058 FILE *f=fopen("conftestval", "w");
3059 if (!f) exit(1);
3060 fprintf(f, "%d\n", sizeof(pthread_t));
3061 exit(0);
3062 }
Michael W. Hudson54241132001-12-07 15:38:26 +00003063EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003064if { (eval echo configure:3065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00003065then
Trent Mick635f6fb2000-08-23 21:33:05 +00003066 ac_cv_sizeof_pthread_t=`cat conftestval`
3067else
Michael W. Hudson54241132001-12-07 15:38:26 +00003068 echo "configure: failed program was:" >&5
3069 cat conftest.$ac_ext >&5
3070 rm -fr conftest*
3071 ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00003072fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003073rm -fr conftest*
Trent Mick635f6fb2000-08-23 21:33:05 +00003074fi
3075
Michael W. Hudson54241132001-12-07 15:38:26 +00003076
Trent Mick635f6fb2000-08-23 21:33:05 +00003077fi
3078
Michael W. Hudson54241132001-12-07 15:38:26 +00003079 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
3080 cat >> confdefs.h <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003081#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
3082EOF
3083
3084fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003085CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00003086
Michael W. Hudson54241132001-12-07 15:38:26 +00003087echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003088echo "configure:3089: checking for --enable-toolbox-glue" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003089# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
3090if test "${enable_toolbox_glue+set}" = set; then
3091 enableval="$enable_toolbox_glue"
Michael W. Hudson54241132001-12-07 15:38:26 +00003092 :
3093fi
Jack Jansene578a632001-08-15 01:27:14 +00003094
3095
3096if test -z "$enable_toolbox_glue"
Michael W. Hudson54241132001-12-07 15:38:26 +00003097then
Jack Jansene578a632001-08-15 01:27:14 +00003098 case $ac_sys_system/$ac_sys_release in
3099 Darwin/*)
3100 enable_toolbox_glue="yes";;
3101 *)
3102 enable_toolbox_glue="no";;
3103 esac
3104fi
3105case "$enable_toolbox_glue" in
3106yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00003107 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00003108 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00003109 extra_undefs="-u __dummy -u _PyMac_Error"
Michael W. Hudson54241132001-12-07 15:38:26 +00003110 cat >> confdefs.h <<\EOF
Jack Jansene578a632001-08-15 01:27:14 +00003111#define USE_TOOLBOX_OBJECT_GLUE 1
3112EOF
3113
3114 ;;
3115*)
3116 extra_frameworks=""
3117 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00003118 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00003119 ;;
3120esac
Michael W. Hudson54241132001-12-07 15:38:26 +00003121echo "$ac_t""$enable_toolbox_glue" 1>&6
3122
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003123
3124case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003125 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003126 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003127 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
3128 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00003129 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3130 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00003131 Darwin/*)
3132 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003133 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
3134 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00003135 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3136 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003137esac
3138
Michael W. Hudson54241132001-12-07 15:38:26 +00003139echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003140echo "configure:3141: checking for --enable-framework" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003141if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003142then
Jack Jansenca06bc62001-08-03 15:32:23 +00003143 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003144 # -U __environ is needed since bundles don't have access
3145 # to crt0 when built but will always be linked against it
Michael W. Hudson54241132001-12-07 15:38:26 +00003146 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00003147 # in the build location.
Michael W. Hudson54241132001-12-07 15:38:26 +00003148
Jack Jansena3891ea2001-09-07 14:25:12 +00003149 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003150 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
3151 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00003152 esac
Michael W. Hudson54241132001-12-07 15:38:26 +00003153 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003154#define WITH_NEXT_FRAMEWORK 1
3155EOF
3156
Michael W. Hudson54241132001-12-07 15:38:26 +00003157 echo "$ac_t""yes" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003158else
Michael W. Hudson54241132001-12-07 15:38:26 +00003159 echo "$ac_t""no" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003160fi
3161
Michael W. Hudson54241132001-12-07 15:38:26 +00003162echo $ac_n "checking for dyld""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003163echo "configure:3164: checking for dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003164case $ac_sys_system/$ac_sys_release in
3165 Darwin/*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003166 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003167#define WITH_DYLD 1
3168EOF
3169
Michael W. Hudson54241132001-12-07 15:38:26 +00003170 echo "$ac_t""always on for Darwin" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003171 ;;
3172 *)
Michael W. Hudson54241132001-12-07 15:38:26 +00003173 echo "$ac_t""no" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00003174 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003175esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003176
Guido van Rossum0a516c91994-09-12 10:58:40 +00003177# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003178
Michael W. Hudson54241132001-12-07 15:38:26 +00003179
3180
3181
3182
Guido van Rossum0a516c91994-09-12 10:58:40 +00003183# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003184# -- usually .so, .sl on HP-UX, .dll on Cygwin
Michael W. Hudson54241132001-12-07 15:38:26 +00003185echo $ac_n "checking SO""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003186echo "configure:3187: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003187if test -z "$SO"
3188then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003189 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003190 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003191 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003192 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003193 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003194fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003195echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003196# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003197# -- "ld" on SunOS 4.x.x, "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003198# (Shared libraries in this instance are shared modules to be loaded into
3199# Python, as opposed to building Python itself as a shared library.)
Michael W. Hudson54241132001-12-07 15:38:26 +00003200echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003201echo "configure:3202: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003202if test -z "$LDSHARED"
3203then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003204 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003205 AIX*)
3206 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00003207 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003208 ;;
3209 BeOS*)
3210 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00003211 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003212 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003213 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003214 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003215 SunOS/4*) LDSHARED="ld";;
Michael W. Hudson54241132001-12-07 15:38:26 +00003216 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00003217 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003218 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003219 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00003220 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003221 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003222 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3223 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00003224 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003225 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3226 if test "$enable_framework" ; then
3227 # Link against the framework. All externals should be defined.
3228 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3229 else
3230 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00003231 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00003232 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00003233 Darwin/*)
3234 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3235 if test "$enable_framework" ; then
3236 # Link against the framework. All externals should be defined.
3237 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3238 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00003239 # No framework, use the Python app as bundle-loader
3240 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
3241 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/$(PYTHON)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003242 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003243 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003244 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003245 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003246 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003247 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003248 then
3249 LDSHARED="cc -shared ${LDFLAGS}"
3250 else
3251 LDSHARED="ld -Bshareable ${LDFLAGS}"
3252 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003253 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003254 if test "$GCC" = "yes"
3255 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003256 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003257 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003258 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003259 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003260 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003261 *) LDSHARED="ld";;
3262 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003263fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003264echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003265BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003266# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003267# library (module) -- this is only needed for a few systems
Michael W. Hudson54241132001-12-07 15:38:26 +00003268echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003269echo "configure:3270: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003270if test -z "$CCSHARED"
3271then
Guido van Rossum07397971997-04-29 21:49:50 +00003272 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003273 SunOS*) if test "$GCC" = yes;
3274 then CCSHARED="-fPIC";
3275 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003276 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00003277 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00003278 else CCSHARED="+z";
3279 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003280 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003281 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003282 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003283 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003284 if test "$GCC" = "yes"
3285 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003286 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003287 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003288 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003289 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003290 IRIX*/6*) case $CC in
3291 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003292 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003293 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003294 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003295 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003296fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003297echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003298# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003299# the python executable -- this is only needed for a few systems
Michael W. Hudson54241132001-12-07 15:38:26 +00003300echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003301echo "configure:3302: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003302if test -z "$LINKFORSHARED"
3303then
Guido van Rossum07397971997-04-29 21:49:50 +00003304 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003305 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003306 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003307 LINKFORSHARED="-Wl,-E -Wl,+s";;
3308# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003309 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003310 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003311 # -u libsys_s pulls in all symbols in libsys
Michael W. Hudson54241132001-12-07 15:38:26 +00003312 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00003313 # -u __dummy makes the linker aware of the objc runtime
3314 # in System.framework; otherwise, __objcInit (referenced in
3315 # crt1.o) gets erroneously defined as common, which breaks dynamic
3316 # loading of any modules which reference it in System.framework.
3317 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3318 # not used by the core itself but which needs to be in the core so
3319 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00003320 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00003321 if test "$enable_framework"
3322 then
3323 LINKFORSHARED="$LINKFORSHARED -framework Python"
3324 fi
3325 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003326 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003327 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003328 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Michael W. Hudson54241132001-12-07 15:38:26 +00003329 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003330 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3331 then
3332 LINKFORSHARED="-Wl,--export-dynamic"
3333 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003334 SunOS/5*) case $CC in
3335 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003336 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003337 then
3338 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003339 fi;;
3340 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003341 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003342fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003343echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003344
Michael W. Hudson54241132001-12-07 15:38:26 +00003345
3346echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003347echo "configure:3348: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003348if test ! "$LIBRARY" = "$LDLIBRARY"
3349then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003350 case $ac_sys_system in
3351 CYGWIN*)
3352 # Cygwin needs CCSHARED when building extension DLLs
3353 # but not when building the interpreter DLL.
3354 CFLAGSFORSHARED='';;
3355 *)
3356 CFLAGSFORSHARED='$(CCSHARED)'
3357 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003358fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003359echo "$ac_t""$CFLAGSFORSHARED" 1>&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003360
Guido van Rossum627b2d71993-12-24 10:39:16 +00003361# checks for libraries
Michael W. Hudson54241132001-12-07 15:38:26 +00003362echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003363echo "configure:3364: checking for dlopen in -ldl" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003364ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3365if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3366 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003367else
Michael W. Hudson54241132001-12-07 15:38:26 +00003368 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003369LIBS="-ldl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003370cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003371#line 3372 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003372#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003373/* Override any gcc2 internal prototype to avoid an error. */
3374/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003375 builtin and then its argument prototype would still apply. */
3376char dlopen();
3377
3378int main() {
3379dlopen()
3380; return 0; }
3381EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003382if { (eval echo configure:3383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003383 rm -rf conftest*
3384 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003385else
Michael W. Hudson54241132001-12-07 15:38:26 +00003386 echo "configure: failed program was:" >&5
3387 cat conftest.$ac_ext >&5
3388 rm -rf conftest*
3389 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003390fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003391rm -f conftest*
3392LIBS="$ac_save_LIBS"
3393
Guido van Rossum627b2d71993-12-24 10:39:16 +00003394fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003395if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3396 echo "$ac_t""yes" 1>&6
3397 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3398 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3399 cat >> confdefs.h <<EOF
3400#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003401EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003402
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003403 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003404
Michael W. Hudson54241132001-12-07 15:38:26 +00003405else
3406 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003407fi
3408 # Dynamic linking for SunOS/Solaris and SYSV
Michael W. Hudson54241132001-12-07 15:38:26 +00003409echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003410echo "configure:3411: checking for shl_load in -ldld" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003411ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
3412if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3413 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003414else
Michael W. Hudson54241132001-12-07 15:38:26 +00003415 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003416LIBS="-ldld $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003417cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003418#line 3419 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003419#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003420/* Override any gcc2 internal prototype to avoid an error. */
3421/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003422 builtin and then its argument prototype would still apply. */
3423char shl_load();
3424
3425int main() {
3426shl_load()
3427; return 0; }
3428EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003429if { (eval echo configure:3430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003430 rm -rf conftest*
3431 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003432else
Michael W. Hudson54241132001-12-07 15:38:26 +00003433 echo "configure: failed program was:" >&5
3434 cat conftest.$ac_ext >&5
3435 rm -rf conftest*
3436 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003437fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003438rm -f conftest*
3439LIBS="$ac_save_LIBS"
3440
Guido van Rossum627b2d71993-12-24 10:39:16 +00003441fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003442if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3443 echo "$ac_t""yes" 1>&6
3444 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3445 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3446 cat >> confdefs.h <<EOF
3447#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003448EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003449
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003450 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003451
Michael W. Hudson54241132001-12-07 15:38:26 +00003452else
3453 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003454fi
3455 # Dynamic linking for HP-UX
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003456echo $ac_n "checking for sem_init in -lrt""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003457echo "configure:3458: checking for sem_init in -lrt" >&5
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003458ac_lib_var=`echo rt'_'sem_init | sed 'y%./+-%__p_%'`
3459if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3460 echo $ac_n "(cached) $ac_c" 1>&6
3461else
3462 ac_save_LIBS="$LIBS"
3463LIBS="-lrt $LIBS"
3464cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003465#line 3466 "configure"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003466#include "confdefs.h"
3467/* Override any gcc2 internal prototype to avoid an error. */
3468/* We use char because int might match the return type of a gcc2
3469 builtin and then its argument prototype would still apply. */
3470char sem_init();
3471
3472int main() {
3473sem_init()
3474; return 0; }
3475EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003476if { (eval echo configure:3477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis41933dd2002-03-21 15:10:58 +00003477 rm -rf conftest*
3478 eval "ac_cv_lib_$ac_lib_var=yes"
3479else
3480 echo "configure: failed program was:" >&5
3481 cat conftest.$ac_ext >&5
3482 rm -rf conftest*
3483 eval "ac_cv_lib_$ac_lib_var=no"
3484fi
3485rm -f conftest*
3486LIBS="$ac_save_LIBS"
3487
3488fi
3489if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3490 echo "$ac_t""yes" 1>&6
3491 ac_tr_lib=HAVE_LIB`echo rt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3492 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3493 cat >> confdefs.h <<EOF
3494#define $ac_tr_lib 1
3495EOF
3496
3497 LIBS="-lrt $LIBS"
3498
3499else
3500 echo "$ac_t""no" 1>&6
3501fi
3502 # 'Real Time' functions on Solaris
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003503
3504# checks for system dependent C++ extensions support
3505case "$ac_sys_system" in
Michael W. Hudson54241132001-12-07 15:38:26 +00003506 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003507echo "configure:3508: checking for genuine AIX C++ extensions support" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003508 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003509#line 3510 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003510#include "confdefs.h"
3511#include "/usr/lpp/xlC/include/load.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00003512int main() {
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003513loadAndInit("", 0, "")
Michael W. Hudson54241132001-12-07 15:38:26 +00003514; return 0; }
3515EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003516if { (eval echo configure:3517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003517 rm -rf conftest*
3518 cat >> confdefs.h <<\EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003519#define AIX_GENUINE_CPLUSPLUS 1
3520EOF
3521
Michael W. Hudson54241132001-12-07 15:38:26 +00003522 echo "$ac_t""yes" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003523else
Michael W. Hudson54241132001-12-07 15:38:26 +00003524 echo "configure: failed program was:" >&5
3525 cat conftest.$ac_ext >&5
3526 rm -rf conftest*
3527 echo "$ac_t""no" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003528fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003529rm -f conftest*;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003530 *) ;;
3531esac
3532
Guido van Rossum70c7f481998-03-26 18:44:10 +00003533# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3534# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003535# BeOS' sockets are stashed in libnet.
3536case "$ac_sys_system" in
3537IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003538*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003539echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003540echo "configure:3541: checking for t_open in -lnsl" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003541ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
3542if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3543 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003544else
Michael W. Hudson54241132001-12-07 15:38:26 +00003545 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003546LIBS="-lnsl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003547cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003548#line 3549 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003549#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003550/* Override any gcc2 internal prototype to avoid an error. */
3551/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003552 builtin and then its argument prototype would still apply. */
3553char t_open();
3554
3555int main() {
3556t_open()
3557; return 0; }
3558EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003559if { (eval echo configure:3560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003560 rm -rf conftest*
3561 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003562else
Michael W. Hudson54241132001-12-07 15:38:26 +00003563 echo "configure: failed program was:" >&5
3564 cat conftest.$ac_ext >&5
3565 rm -rf conftest*
3566 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003567fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003568rm -f conftest*
3569LIBS="$ac_save_LIBS"
3570
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003571fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003572if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3573 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003574 LIBS="-lnsl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003575else
3576 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003577fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003578 # SVR4
Michael W. Hudson54241132001-12-07 15:38:26 +00003579echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003580echo "configure:3581: checking for socket in -lsocket" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003581ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3582if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3583 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003584else
Michael W. Hudson54241132001-12-07 15:38:26 +00003585 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003586LIBS="-lsocket $LIBS $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003587cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003588#line 3589 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003589#include "confdefs.h"
3590/* Override any gcc2 internal prototype to avoid an error. */
3591/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003592 builtin and then its argument prototype would still apply. */
3593char socket();
3594
3595int main() {
3596socket()
3597; return 0; }
3598EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003599if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003600 rm -rf conftest*
3601 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003602else
Michael W. Hudson54241132001-12-07 15:38:26 +00003603 echo "configure: failed program was:" >&5
3604 cat conftest.$ac_ext >&5
3605 rm -rf conftest*
3606 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003607fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003608rm -f conftest*
3609LIBS="$ac_save_LIBS"
3610
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003611fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003612if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3613 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003614 LIBS="-lsocket $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003615else
3616 echo "$ac_t""no" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003617fi
3618 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003619;;
3620esac
3621case "$ac_sys_system" in
3622BeOS*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003623echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003624echo "configure:3625: checking for socket in -lnet" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003625ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
3626if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3627 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003628else
Michael W. Hudson54241132001-12-07 15:38:26 +00003629 ac_save_LIBS="$LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00003630LIBS="-lnet $LIBS $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003631cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003632#line 3633 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003633#include "confdefs.h"
3634/* Override any gcc2 internal prototype to avoid an error. */
3635/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003636 builtin and then its argument prototype would still apply. */
3637char socket();
3638
3639int main() {
3640socket()
3641; return 0; }
3642EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003643if { (eval echo configure:3644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003644 rm -rf conftest*
3645 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003646else
Michael W. Hudson54241132001-12-07 15:38:26 +00003647 echo "configure: failed program was:" >&5
3648 cat conftest.$ac_ext >&5
3649 rm -rf conftest*
3650 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003651fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003652rm -f conftest*
3653LIBS="$ac_save_LIBS"
3654
Guido van Rossumad678af1998-10-02 14:42:15 +00003655fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003656if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3657 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003658 LIBS="-lnet $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003659else
3660 echo "$ac_t""no" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003661fi
3662 # BeOS
3663;;
3664esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003665
Michael W. Hudson54241132001-12-07 15:38:26 +00003666echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003667echo "configure:3668: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003668# Check whether --with-libs or --without-libs was given.
3669if test "${with_libs+set}" = set; then
3670 withval="$with_libs"
Michael W. Hudson54241132001-12-07 15:38:26 +00003671
3672echo "$ac_t""$withval" 1>&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00003673LIBS="$withval $LIBS"
3674
3675else
Michael W. Hudson54241132001-12-07 15:38:26 +00003676 echo "$ac_t""no" 1>&6
3677fi
3678
Guido van Rossum7f43da71994-08-01 12:15:30 +00003679
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003680# Determine if signalmodule should be used.
3681
3682
Michael W. Hudson54241132001-12-07 15:38:26 +00003683echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003684echo "configure:3685: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003685# Check whether --with-signal-module or --without-signal-module was given.
3686if test "${with_signal_module+set}" = set; then
3687 withval="$with_signal_module"
Michael W. Hudson54241132001-12-07 15:38:26 +00003688 :
3689fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003690
3691
3692if test -z "$with_signal_module"
3693then with_signal_module="yes"
3694fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003695echo "$ac_t""$with_signal_module" 1>&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003696
3697if test "${with_signal_module}" = "yes"; then
3698 USE_SIGNAL_MODULE=""
3699 SIGNAL_OBJS=""
3700else
3701 USE_SIGNAL_MODULE="#"
3702 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3703fi
3704
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003705# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003706
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003707USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003708
Michael W. Hudson54241132001-12-07 15:38:26 +00003709echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003710echo "configure:3711: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003711
3712# Check whether --with-dec-threads or --without-dec-threads was given.
3713if test "${with_dec_threads+set}" = set; then
3714 withval="$with_dec_threads"
Michael W. Hudson54241132001-12-07 15:38:26 +00003715
3716echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003717LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003718if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003719 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003720fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003721else
Michael W. Hudson54241132001-12-07 15:38:26 +00003722 echo "$ac_t""no" 1>&6
3723fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003724
3725
Michael W. Hudson54241132001-12-07 15:38:26 +00003726echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003727echo "configure:3728: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003728# Check whether --with-threads or --without-threads was given.
3729if test "${with_threads+set}" = set; then
3730 withval="$with_threads"
Michael W. Hudson54241132001-12-07 15:38:26 +00003731 :
3732fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003733
3734
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003735# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003736# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003737if test "${with_thread+set}" = set; then
3738 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003739
Jack Jansendd19cf82001-12-06 22:36:17 +00003740with_threads=$with_thread
Michael W. Hudson54241132001-12-07 15:38:26 +00003741fi
3742
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003743
3744if test -z "$with_threads"
3745then with_threads="yes"
3746fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003747echo "$ac_t""$with_threads" 1>&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003748
3749if test "$with_threads" = "no"
3750then
3751 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003752elif test "$ac_cv_pthread_is_default" = yes
3753then
Michael W. Hudson54241132001-12-07 15:38:26 +00003754 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003755#define WITH_THREAD 1
3756EOF
3757
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003758 # Defining _REENTRANT on system with POSIX threads should not hurt.
Michael W. Hudson54241132001-12-07 15:38:26 +00003759 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003760#define _REENTRANT 1
3761EOF
3762
3763 posix_threads=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003764 LIBOBJS="$LIBOBJS thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003765elif test "$ac_cv_kpthread" = "yes"
3766then
3767 CC="$CC -Kpthread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003768 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003769#define WITH_THREAD 1
3770EOF
3771
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003772 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003773 LIBOBJS="$LIBOBJS thread.o"
3774else
3775 if test ! -z "$with_threads" -a -d "$with_threads"
3776 then LDFLAGS="$LDFLAGS -L$with_threads"
3777 fi
3778 if test ! -z "$withval" -a -d "$withval"
3779 then LDFLAGS="$LDFLAGS -L$withval"
3780 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003781
3782 # According to the POSIX spec, a pthreads implementation must
3783 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Michael W. Hudson54241132001-12-07 15:38:26 +00003784 echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003785echo "configure:3786: checking for _POSIX_THREADS in unistd.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003786 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003787#line 3788 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003788#include "confdefs.h"
3789#include <unistd.h>
3790 #ifdef _POSIX_THREADS
3791 yes
3792 #endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003793
3794EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003795if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3796 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003797 rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003798 unistd_defines_pthreads=yes
3799else
Michael W. Hudson54241132001-12-07 15:38:26 +00003800 rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003801 unistd_defines_pthreads=no
3802fi
3803rm -f conftest*
3804
Michael W. Hudson54241132001-12-07 15:38:26 +00003805 echo "$ac_t""$unistd_defines_pthreads" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003806
Michael W. Hudson54241132001-12-07 15:38:26 +00003807 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003808#define _REENTRANT 1
3809EOF
3810
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003811 ac_safe=`echo "cthreads.h" | sed 'y%./+-%__p_%'`
3812echo $ac_n "checking for cthreads.h""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003813echo "configure:3814: checking for cthreads.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003814if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3815 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003816else
Michael W. Hudson54241132001-12-07 15:38:26 +00003817 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003818#line 3819 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003819#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003820#include <cthreads.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00003821EOF
3822ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003823{ (eval echo configure:3824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003824ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3825if test -z "$ac_err"; then
3826 rm -rf conftest*
3827 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003828else
Michael W. Hudson54241132001-12-07 15:38:26 +00003829 echo "$ac_err" >&5
3830 echo "configure: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003831 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003832 rm -rf conftest*
3833 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003834fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003835rm -f conftest*
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003836fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003837if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3838 echo "$ac_t""yes" 1>&6
3839 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003840#define WITH_THREAD 1
3841EOF
3842
Michael W. Hudson54241132001-12-07 15:38:26 +00003843 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003844#define C_THREADS 1
3845EOF
3846
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003847 cat >> confdefs.h <<\EOF
3848#define HURD_C_THREADS 1
3849EOF
3850
3851 LIBS="$LIBS -lthreads"
3852 LIBOBJS="$LIBOBJS thread.o"
3853else
3854 echo "$ac_t""no" 1>&6
3855
3856 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
3857echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003858echo "configure:3859: checking for mach/cthreads.h" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003859if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3860 echo $ac_n "(cached) $ac_c" 1>&6
3861else
3862 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003863#line 3864 "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003864#include "confdefs.h"
3865#include <mach/cthreads.h>
3866EOF
3867ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00003868{ (eval echo configure:3869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003869ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3870if test -z "$ac_err"; then
3871 rm -rf conftest*
3872 eval "ac_cv_header_$ac_safe=yes"
3873else
3874 echo "$ac_err" >&5
3875 echo "configure: failed program was:" >&5
3876 cat conftest.$ac_ext >&5
3877 rm -rf conftest*
3878 eval "ac_cv_header_$ac_safe=no"
3879fi
3880rm -f conftest*
3881fi
3882if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3883 echo "$ac_t""yes" 1>&6
3884 cat >> confdefs.h <<\EOF
3885#define WITH_THREAD 1
3886EOF
3887
3888 cat >> confdefs.h <<\EOF
3889#define C_THREADS 1
3890EOF
3891
3892 cat >> confdefs.h <<\EOF
3893#define MACH_C_THREADS 1
3894EOF
3895
Martin v. Löwis130fb172001-07-19 11:00:41 +00003896 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003897else
Michael W. Hudson54241132001-12-07 15:38:26 +00003898 echo "$ac_t""no" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003899
Michael W. Hudson54241132001-12-07 15:38:26 +00003900 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003901echo "configure:3902: checking for --with-pth" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003902 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003903if test "${with_pth+set}" = set; then
3904 withval="$with_pth"
Michael W. Hudson54241132001-12-07 15:38:26 +00003905
3906 echo "$ac_t""$withval" 1>&6
3907 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003908#define WITH_THREAD 1
3909EOF
3910
Michael W. Hudson54241132001-12-07 15:38:26 +00003911 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003912#define HAVE_PTH 1
3913EOF
3914
Martin v. Löwis130fb172001-07-19 11:00:41 +00003915 LIBS="-lpth $LIBS"
3916 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003917else
Michael W. Hudson54241132001-12-07 15:38:26 +00003918
3919 echo "$ac_t""no" 1>&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003920
3921 # Just looking for pthread_create in libpthread is not enough:
3922 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
3923 # So we really have to include pthread.h, and then link.
3924 _libs=$LIBS
3925 LIBS="$LIBS -lpthread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003926 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003927echo "configure:3928: checking for pthread_create in -lpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003928 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003929#line 3930 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003930#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003931#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00003932
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003933void * start_routine (void *arg) { exit (0); }
Michael W. Hudson54241132001-12-07 15:38:26 +00003934int main() {
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003935
3936pthread_create (NULL, NULL, start_routine, NULL)
Michael W. Hudson54241132001-12-07 15:38:26 +00003937; return 0; }
3938EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003939if { (eval echo configure:3940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003940 rm -rf conftest*
3941
3942 echo "$ac_t""yes" 1>&6
3943 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003944#define WITH_THREAD 1
3945EOF
3946
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003947 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003948 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003949else
Michael W. Hudson54241132001-12-07 15:38:26 +00003950 echo "configure: failed program was:" >&5
3951 cat conftest.$ac_ext >&5
3952 rm -rf conftest*
3953
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003954 LIBS=$_libs
Michael W. Hudson54241132001-12-07 15:38:26 +00003955 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003956echo "configure:3957: checking for pthread_detach" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003957if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
3958 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003959else
Michael W. Hudson54241132001-12-07 15:38:26 +00003960 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003961#line 3962 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003962#include "confdefs.h"
3963/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00003964 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003965#include <assert.h>
3966/* Override any gcc2 internal prototype to avoid an error. */
3967/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003968 builtin and then its argument prototype would still apply. */
3969char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003970
Michael W. Hudson54241132001-12-07 15:38:26 +00003971int main() {
3972
Guido van Rossumad678af1998-10-02 14:42:15 +00003973/* The GNU C library defines this for functions which it implements
3974 to always fail with ENOSYS. Some functions are actually named
3975 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003976#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003977choke me
3978#else
Michael W. Hudson54241132001-12-07 15:38:26 +00003979pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003980#endif
3981
Michael W. Hudson54241132001-12-07 15:38:26 +00003982; return 0; }
3983EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00003984if { (eval echo configure:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003985 rm -rf conftest*
3986 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003987else
Michael W. Hudson54241132001-12-07 15:38:26 +00003988 echo "configure: failed program was:" >&5
3989 cat conftest.$ac_ext >&5
3990 rm -rf conftest*
3991 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003992fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003993rm -f conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00003994fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003995
3996if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
3997 echo "$ac_t""yes" 1>&6
3998 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003999#define WITH_THREAD 1
4000EOF
4001
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004002 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004003 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00004004else
Michael W. Hudson54241132001-12-07 15:38:26 +00004005 echo "$ac_t""no" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00004006
Michael W. Hudson54241132001-12-07 15:38:26 +00004007 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
4008echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004009echo "configure:4010: checking for kernel/OS.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004010if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4011 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004012else
Michael W. Hudson54241132001-12-07 15:38:26 +00004013 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004014#line 4015 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004015#include "confdefs.h"
4016#include <kernel/OS.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00004017EOF
4018ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00004019{ (eval echo configure:4020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004020ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4021if test -z "$ac_err"; then
4022 rm -rf conftest*
4023 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004024else
Michael W. Hudson54241132001-12-07 15:38:26 +00004025 echo "$ac_err" >&5
4026 echo "configure: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004027 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004028 rm -rf conftest*
4029 eval "ac_cv_header_$ac_safe=no"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004030fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004031rm -f conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004032fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004033if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4034 echo "$ac_t""yes" 1>&6
4035 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004036#define WITH_THREAD 1
4037EOF
4038
Michael W. Hudson54241132001-12-07 15:38:26 +00004039 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004040#define BEOS_THREADS 1
4041EOF
4042
Martin v. Löwis130fb172001-07-19 11:00:41 +00004043 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004044else
Michael W. Hudson54241132001-12-07 15:38:26 +00004045 echo "$ac_t""no" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004046
Michael W. Hudson54241132001-12-07 15:38:26 +00004047 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004048echo "configure:4049: checking for pthread_create in -lpthreads" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004049ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
4050if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4051 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004052else
Michael W. Hudson54241132001-12-07 15:38:26 +00004053 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004054LIBS="-lpthreads $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004055cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004056#line 4057 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00004057#include "confdefs.h"
4058/* Override any gcc2 internal prototype to avoid an error. */
4059/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004060 builtin and then its argument prototype would still apply. */
4061char pthread_create();
4062
4063int main() {
4064pthread_create()
4065; return 0; }
4066EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004067if { (eval echo configure:4068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004068 rm -rf conftest*
4069 eval "ac_cv_lib_$ac_lib_var=yes"
Greg Steinadf63d62000-07-05 10:38:09 +00004070else
Michael W. Hudson54241132001-12-07 15:38:26 +00004071 echo "configure: failed program was:" >&5
4072 cat conftest.$ac_ext >&5
4073 rm -rf conftest*
4074 eval "ac_cv_lib_$ac_lib_var=no"
Greg Steinadf63d62000-07-05 10:38:09 +00004075fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004076rm -f conftest*
4077LIBS="$ac_save_LIBS"
4078
Greg Steinadf63d62000-07-05 10:38:09 +00004079fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004080if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4081 echo "$ac_t""yes" 1>&6
4082 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00004083#define WITH_THREAD 1
4084EOF
4085
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004086 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004087 LIBS="$LIBS -lpthreads"
4088 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00004089else
Michael W. Hudson54241132001-12-07 15:38:26 +00004090 echo "$ac_t""no" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00004091
Michael W. Hudson54241132001-12-07 15:38:26 +00004092 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004093echo "configure:4094: checking for pthread_create in -lc_r" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004094ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
4095if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4096 echo $ac_n "(cached) $ac_c" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00004097else
Michael W. Hudson54241132001-12-07 15:38:26 +00004098 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00004099LIBS="-lc_r $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004100cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004101#line 4102 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00004102#include "confdefs.h"
4103/* Override any gcc2 internal prototype to avoid an error. */
4104/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004105 builtin and then its argument prototype would still apply. */
4106char pthread_create();
4107
4108int main() {
4109pthread_create()
4110; return 0; }
4111EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004112if { (eval echo configure:4113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004113 rm -rf conftest*
4114 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum49545951997-12-02 19:28:29 +00004115else
Michael W. Hudson54241132001-12-07 15:38:26 +00004116 echo "configure: failed program was:" >&5
4117 cat conftest.$ac_ext >&5
4118 rm -rf conftest*
4119 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum49545951997-12-02 19:28:29 +00004120fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004121rm -f conftest*
4122LIBS="$ac_save_LIBS"
4123
Guido van Rossum49545951997-12-02 19:28:29 +00004124fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004125if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4126 echo "$ac_t""yes" 1>&6
4127 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00004128#define WITH_THREAD 1
4129EOF
4130
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004131 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004132 LIBS="$LIBS -lc_r"
4133 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004134else
Michael W. Hudson54241132001-12-07 15:38:26 +00004135 echo "$ac_t""no" 1>&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004136
Michael W. Hudson54241132001-12-07 15:38:26 +00004137 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004138echo "configure:4139: checking for __d6_pthread_create in -lthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004139ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
4140if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4141 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004142else
Michael W. Hudson54241132001-12-07 15:38:26 +00004143 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00004144LIBS="-lthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004145cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004146#line 4147 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004147#include "confdefs.h"
4148/* Override any gcc2 internal prototype to avoid an error. */
4149/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004150 builtin and then its argument prototype would still apply. */
4151char __d6_pthread_create();
4152
4153int main() {
4154__d6_pthread_create()
4155; return 0; }
4156EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004157if { (eval echo configure:4158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004158 rm -rf conftest*
4159 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004160else
Michael W. Hudson54241132001-12-07 15:38:26 +00004161 echo "configure: failed program was:" >&5
4162 cat conftest.$ac_ext >&5
4163 rm -rf conftest*
4164 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004165fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004166rm -f conftest*
4167LIBS="$ac_save_LIBS"
4168
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004169fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004170if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4171 echo "$ac_t""yes" 1>&6
4172 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004173#define WITH_THREAD 1
4174EOF
4175
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004176 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004177 LIBS="$LIBS -lthread"
4178 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00004179else
Michael W. Hudson54241132001-12-07 15:38:26 +00004180 echo "$ac_t""no" 1>&6
Guido van Rossum49545951997-12-02 19:28:29 +00004181
Michael W. Hudson54241132001-12-07 15:38:26 +00004182 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004183echo "configure:4184: checking for __pthread_create_system in -lpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004184ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
4185if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4186 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004187else
Michael W. Hudson54241132001-12-07 15:38:26 +00004188 ac_save_LIBS="$LIBS"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004189LIBS="-lpthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004190cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004191#line 4192 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004192#include "confdefs.h"
4193/* Override any gcc2 internal prototype to avoid an error. */
4194/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004195 builtin and then its argument prototype would still apply. */
4196char __pthread_create_system();
4197
4198int main() {
4199__pthread_create_system()
4200; return 0; }
4201EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004202if { (eval echo configure:4203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004203 rm -rf conftest*
4204 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004205else
Michael W. Hudson54241132001-12-07 15:38:26 +00004206 echo "configure: failed program was:" >&5
4207 cat conftest.$ac_ext >&5
4208 rm -rf conftest*
4209 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004210fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004211rm -f conftest*
4212LIBS="$ac_save_LIBS"
4213
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004214fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004215if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4216 echo "$ac_t""yes" 1>&6
4217 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004218#define WITH_THREAD 1
4219EOF
4220
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004221 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004222 LIBS="$LIBS -lpthread"
4223 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004224else
Michael W. Hudson54241132001-12-07 15:38:26 +00004225 echo "$ac_t""no" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004226
Michael W. Hudson54241132001-12-07 15:38:26 +00004227 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004228echo "configure:4229: checking for pthread_create in -lcma" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004229ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
4230if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4231 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00004232else
Michael W. Hudson54241132001-12-07 15:38:26 +00004233 ac_save_LIBS="$LIBS"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004234LIBS="-lcma $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004235cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004236#line 4237 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004237#include "confdefs.h"
4238/* Override any gcc2 internal prototype to avoid an error. */
4239/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004240 builtin and then its argument prototype would still apply. */
4241char pthread_create();
4242
4243int main() {
4244pthread_create()
4245; return 0; }
4246EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004247if { (eval echo configure:4248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004248 rm -rf conftest*
4249 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004250else
Michael W. Hudson54241132001-12-07 15:38:26 +00004251 echo "configure: failed program was:" >&5
4252 cat conftest.$ac_ext >&5
4253 rm -rf conftest*
4254 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004255fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004256rm -f conftest*
4257LIBS="$ac_save_LIBS"
4258
Guido van Rossumb93a8621998-05-07 13:27:32 +00004259fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004260if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4261 echo "$ac_t""yes" 1>&6
4262 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00004263#define WITH_THREAD 1
4264EOF
4265
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004266 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004267 LIBS="$LIBS -lcma"
4268 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004269else
Michael W. Hudson54241132001-12-07 15:38:26 +00004270 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004271
Martin v. Löwis130fb172001-07-19 11:00:41 +00004272 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004273fi
4274
Michael W. Hudson54241132001-12-07 15:38:26 +00004275
Guido van Rossum627b2d71993-12-24 10:39:16 +00004276fi
4277
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004278fi
4279
Guido van Rossum0be3e491997-05-22 20:33:33 +00004280fi
4281
Guido van Rossum49545951997-12-02 19:28:29 +00004282fi
4283
Guido van Rossumb93a8621998-05-07 13:27:32 +00004284fi
4285
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004286fi
4287
Guido van Rossumad678af1998-10-02 14:42:15 +00004288fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004289rm -f conftest*
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004290fi
4291
Michael W. Hudson54241132001-12-07 15:38:26 +00004292fi
4293
Martin v. Löwisa6e97582002-01-01 18:41:33 +00004294fi
4295
Michael W. Hudson54241132001-12-07 15:38:26 +00004296
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004297 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004298 if test "$unistd_defines_pthreads" = "no"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004299 cat >> confdefs.h <<\EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004300#define _POSIX_THREADS 1
4301EOF
4302
4303 fi
4304
Michael W. Hudson54241132001-12-07 15:38:26 +00004305 echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004306echo "configure:4307: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004307 if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then
4308 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004309else
4310 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004311 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004312else
Michael W. Hudson54241132001-12-07 15:38:26 +00004313 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004314#line 4315 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004315#include "confdefs.h"
4316#include <pthread.h>
4317 void *foo(void *parm) {
4318 return NULL;
4319 }
4320 main() {
4321 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004322 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004323 if (pthread_attr_init(&attr)) exit(-1);
4324 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004325 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004326 exit(0);
4327 }
Michael W. Hudson54241132001-12-07 15:38:26 +00004328EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004329if { (eval echo configure:4330: \"$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 +00004330then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004331 ac_cv_pthread_system_supported=yes
4332else
Michael W. Hudson54241132001-12-07 15:38:26 +00004333 echo "configure: failed program was:" >&5
4334 cat conftest.$ac_ext >&5
4335 rm -fr conftest*
4336 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004337fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004338rm -fr conftest*
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004339fi
4340
Michael W. Hudson54241132001-12-07 15:38:26 +00004341
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004342fi
4343
Michael W. Hudson54241132001-12-07 15:38:26 +00004344 echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004345 if test "$ac_cv_pthread_system_supported" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004346 cat >> confdefs.h <<\EOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004347#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
4348EOF
4349
4350 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004351 for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004352do
Michael W. Hudson54241132001-12-07 15:38:26 +00004353echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004354echo "configure:4355: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004355if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4356 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004357else
Michael W. Hudson54241132001-12-07 15:38:26 +00004358 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004359#line 4360 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004360#include "confdefs.h"
4361/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004362 which can conflict with char $ac_func(); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004363#include <assert.h>
4364/* Override any gcc2 internal prototype to avoid an error. */
4365/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004366 builtin and then its argument prototype would still apply. */
4367char $ac_func();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004368
Michael W. Hudson54241132001-12-07 15:38:26 +00004369int main() {
4370
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004371/* The GNU C library defines this for functions which it implements
4372 to always fail with ENOSYS. Some functions are actually named
4373 something starting with __ and the normal name is an alias. */
4374#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4375choke me
4376#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004377$ac_func();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004378#endif
4379
Michael W. Hudson54241132001-12-07 15:38:26 +00004380; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004381EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004382if { (eval echo configure:4383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004383 rm -rf conftest*
4384 eval "ac_cv_func_$ac_func=yes"
4385else
4386 echo "configure: failed program was:" >&5
4387 cat conftest.$ac_ext >&5
4388 rm -rf conftest*
4389 eval "ac_cv_func_$ac_func=no"
4390fi
4391rm -f conftest*
4392fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004393
Michael W. Hudson54241132001-12-07 15:38:26 +00004394if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4395 echo "$ac_t""yes" 1>&6
4396 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4397 cat >> confdefs.h <<EOF
4398#define $ac_tr_func 1
4399EOF
4400
4401else
4402 echo "$ac_t""no" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004403fi
4404done
4405
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004406 fi
4407
Michael W. Hudson54241132001-12-07 15:38:26 +00004408 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004409echo "configure:4410: checking for usconfig in -lmpc" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004410ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
4411if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4412 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004413else
Michael W. Hudson54241132001-12-07 15:38:26 +00004414 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004415LIBS="-lmpc $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004416cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004417#line 4418 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004418#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004419/* Override any gcc2 internal prototype to avoid an error. */
4420/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004421 builtin and then its argument prototype would still apply. */
4422char usconfig();
4423
4424int main() {
4425usconfig()
4426; return 0; }
4427EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004428if { (eval echo configure:4429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004429 rm -rf conftest*
4430 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004431else
Michael W. Hudson54241132001-12-07 15:38:26 +00004432 echo "configure: failed program was:" >&5
4433 cat conftest.$ac_ext >&5
4434 rm -rf conftest*
4435 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004436fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004437rm -f conftest*
4438LIBS="$ac_save_LIBS"
4439
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004440fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004441if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4442 echo "$ac_t""yes" 1>&6
4443 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004444#define WITH_THREAD 1
4445EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004446
Martin v. Löwis130fb172001-07-19 11:00:41 +00004447 LIBS="$LIBS -lmpc"
4448 LIBOBJS="$LIBOBJS thread.o"
4449 USE_THREAD_MODULE=""
Michael W. Hudson54241132001-12-07 15:38:26 +00004450else
4451 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004452fi
4453
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004454
4455 if test $posix_threads != "yes"; then
4456 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004457echo "configure:4458: checking for thr_create in -lthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004458ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
4459if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4460 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004461else
Michael W. Hudson54241132001-12-07 15:38:26 +00004462 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004463LIBS="-lthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004464cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004465#line 4466 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004466#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004467/* Override any gcc2 internal prototype to avoid an error. */
4468/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004469 builtin and then its argument prototype would still apply. */
4470char thr_create();
4471
4472int main() {
4473thr_create()
4474; return 0; }
4475EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004476if { (eval echo configure:4477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004477 rm -rf conftest*
4478 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004479else
Michael W. Hudson54241132001-12-07 15:38:26 +00004480 echo "configure: failed program was:" >&5
4481 cat conftest.$ac_ext >&5
4482 rm -rf conftest*
4483 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004484fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004485rm -f conftest*
4486LIBS="$ac_save_LIBS"
4487
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004488fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004489if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4490 echo "$ac_t""yes" 1>&6
4491 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004492#define WITH_THREAD 1
4493EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004494
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004495 LIBS="$LIBS -lthread"
4496 LIBOBJS="$LIBOBJS thread.o"
4497 USE_THREAD_MODULE=""
Michael W. Hudson54241132001-12-07 15:38:26 +00004498else
4499 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004500fi
4501
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00004502 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004503
Martin v. Löwis130fb172001-07-19 11:00:41 +00004504 if test "$USE_THREAD_MODULE" != "#"
4505 then
4506 # If the above checks didn't disable threads, (at least) OSF1
4507 # needs this '-threads' argument during linking.
4508 case $ac_sys_system in
4509 OSF1) LDLAST=-threads;;
4510 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004511 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004512fi
4513
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004514# Check for enable-ipv6
Michael W. Hudson54241132001-12-07 15:38:26 +00004515echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004516echo "configure:4517: checking if --enable-ipv6 is specified" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004517# Check whether --enable-ipv6 or --disable-ipv6 was given.
4518if test "${enable_ipv6+set}" = set; then
4519 enableval="$enable_ipv6"
4520 case "$enableval" in
4521 no)
Michael W. Hudson54241132001-12-07 15:38:26 +00004522 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004523 ipv6=no
4524 ;;
Michael W. Hudson54241132001-12-07 15:38:26 +00004525 *) echo "$ac_t""yes" 1>&6
4526 cat >> confdefs.h <<\EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004527#define ENABLE_IPV6 1
4528EOF
4529
4530 ipv6=yes
4531 ;;
Michael W. Hudson54241132001-12-07 15:38:26 +00004532 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004533else
Michael W. Hudson54241132001-12-07 15:38:26 +00004534
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004535 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004536 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004537 ipv6=no
4538
4539else
Michael W. Hudson54241132001-12-07 15:38:26 +00004540 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004541#line 4542 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004542#include "confdefs.h"
4543 /* AF_INET6 available check */
4544#include <sys/types.h>
4545#include <sys/socket.h>
4546main()
4547{
4548 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4549 exit(1);
4550 else
4551 exit(0);
4552}
4553
Michael W. Hudson54241132001-12-07 15:38:26 +00004554EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004555if { (eval echo configure:4556: \"$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 +00004556then
4557 echo "$ac_t""yes" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004558 ipv6=yes
4559else
Michael W. Hudson54241132001-12-07 15:38:26 +00004560 echo "configure: failed program was:" >&5
4561 cat conftest.$ac_ext >&5
4562 rm -fr conftest*
4563 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004564 ipv6=no
4565fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004566rm -fr conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004567fi
4568
Michael W. Hudson54241132001-12-07 15:38:26 +00004569
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004570if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004571 echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004572echo "configure:4573: checking if RFC2553 API is available" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004573 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004574#line 4575 "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004575#include "confdefs.h"
4576#include <sys/types.h>
4577#include <netinet/in.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00004578int main() {
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004579struct sockaddr_in6 x;
4580x.sin6_scope_id;
Michael W. Hudson54241132001-12-07 15:38:26 +00004581; return 0; }
4582EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004583if { (eval echo configure:4584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004584 rm -rf conftest*
4585 echo "$ac_t""yes" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004586 ipv6=yes
4587else
Michael W. Hudson54241132001-12-07 15:38:26 +00004588 echo "configure: failed program was:" >&5
4589 cat conftest.$ac_ext >&5
4590 rm -rf conftest*
4591 echo "$ac_t""no" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004592 ipv6=no
4593fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004594rm -f conftest*
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004595fi
4596
4597if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004598 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004599#define ENABLE_IPV6 1
4600EOF
4601
4602fi
4603
Michael W. Hudson54241132001-12-07 15:38:26 +00004604fi
4605
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004606
4607ipv6type=unknown
4608ipv6lib=none
4609ipv6trylibc=no
4610
4611if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004612 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004613echo "configure:4614: checking ipv6 stack type" >&5
Guido van Rossumb8552162001-09-05 14:58:11 +00004614 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
4615 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004616 case $i in
4617 inria)
Michael W. Hudson54241132001-12-07 15:38:26 +00004618 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004619#line 4620 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004620#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004621
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004622#include <netinet/in.h>
4623#ifdef IPV6_INRIA_VERSION
4624yes
4625#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004626EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004627if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4628 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004629 rm -rf conftest*
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004630 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004631fi
4632rm -f conftest*
4633
4634 ;;
4635 kame)
Michael W. Hudson54241132001-12-07 15:38:26 +00004636 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004637#line 4638 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004638#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004639
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004640#include <netinet/in.h>
4641#ifdef __KAME__
4642yes
4643#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004644EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004645if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4646 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004647 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004648 ipv6type=$i;
4649 ipv6lib=inet6
4650 ipv6libdir=/usr/local/v6/lib
4651 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004652fi
4653rm -f conftest*
4654
4655 ;;
4656 linux-glibc)
Michael W. Hudson54241132001-12-07 15:38:26 +00004657 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004658#line 4659 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004659#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004660
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004661#include <features.h>
4662#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4663yes
4664#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004665EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004666if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4667 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004668 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004669 ipv6type=$i;
4670 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004671fi
4672rm -f conftest*
4673
4674 ;;
4675 linux-inet6)
4676 if test -d /usr/inet6; then
4677 ipv6type=$i
4678 ipv6lib=inet6
4679 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004680 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004681 fi
4682 ;;
4683 solaris)
4684 if test -f /etc/netconfig; then
4685 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4686 ipv6type=$i
4687 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004688 fi
4689 fi
4690 ;;
4691 toshiba)
Michael W. Hudson54241132001-12-07 15:38:26 +00004692 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004693#line 4694 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004694#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004695
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004696#include <sys/param.h>
4697#ifdef _TOSHIBA_INET6
4698yes
4699#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004700EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004701if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4702 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004703 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004704 ipv6type=$i;
4705 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004706 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004707fi
4708rm -f conftest*
4709
4710 ;;
4711 v6d)
Michael W. Hudson54241132001-12-07 15:38:26 +00004712 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004713#line 4714 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004714#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004715
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004716#include </usr/local/v6/include/sys/v6config.h>
4717#ifdef __V6D__
4718yes
4719#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004720EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004721if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4722 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004723 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004724 ipv6type=$i;
4725 ipv6lib=v6;
4726 ipv6libdir=/usr/local/v6/lib;
4727 OPT="-I/usr/local/v6/include $OPT"
4728fi
4729rm -f conftest*
4730
4731 ;;
4732 zeta)
Michael W. Hudson54241132001-12-07 15:38:26 +00004733 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004734#line 4735 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004735#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004736
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004737#include <sys/param.h>
4738#ifdef _ZETA_MINAMI_INET6
4739yes
4740#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004741EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4743 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004744 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004745 ipv6type=$i;
4746 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004747 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004748fi
4749rm -f conftest*
4750
4751 ;;
4752 esac
4753 if test "$ipv6type" != "unknown"; then
4754 break
4755 fi
4756 done
Michael W. Hudson54241132001-12-07 15:38:26 +00004757 echo "$ac_t""$ipv6type" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004758fi
4759
4760if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4761 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4762 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4763 echo "using lib$ipv6lib"
4764 else
4765 if test $ipv6trylibc = "yes"; then
4766 echo "using libc"
4767 else
4768 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4769 echo "You need to fetch lib$ipv6lib.a from appropriate"
4770 echo 'ipv6 kit and compile beforehand.'
4771 exit 1
4772 fi
4773 fi
4774fi
4775
Barry Warsawef82cd72000-06-30 16:21:01 +00004776# Check for GC support
Michael W. Hudson54241132001-12-07 15:38:26 +00004777echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004778echo "configure:4779: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004779# Check whether --with-cycle-gc or --without-cycle-gc was given.
4780if test "${with_cycle_gc+set}" = set; then
4781 withval="$with_cycle_gc"
Michael W. Hudson54241132001-12-07 15:38:26 +00004782 :
4783fi
Barry Warsawef82cd72000-06-30 16:21:01 +00004784
4785
4786if test -z "$with_cycle_gc"
4787then with_cycle_gc="yes"
4788fi
Neil Schemenauercf229462001-08-29 23:58:47 +00004789if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +00004790then
Michael W. Hudson54241132001-12-07 15:38:26 +00004791 cat >> confdefs.h <<\EOF
Barry Warsawef82cd72000-06-30 16:21:01 +00004792#define WITH_CYCLE_GC 1
4793EOF
4794
4795fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004796echo "$ac_t""$with_cycle_gc" 1>&6
Barry Warsawef82cd72000-06-30 16:21:01 +00004797
Neil Schemenauera35c6882001-02-27 04:45:05 +00004798# Check for Python-specific malloc support
Michael W. Hudson54241132001-12-07 15:38:26 +00004799echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004800echo "configure:4801: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004801# Check whether --with-pymalloc or --without-pymalloc was given.
4802if test "${with_pymalloc+set}" = set; then
4803 withval="$with_pymalloc"
Neil Schemenauer16c22972002-03-22 15:34:49 +00004804 :
Michael W. Hudson54241132001-12-07 15:38:26 +00004805fi
4806
Neil Schemenauera35c6882001-02-27 04:45:05 +00004807
Neil Schemenauer16c22972002-03-22 15:34:49 +00004808if test -z "$with_pymalloc"
4809then with_pymalloc="yes"
4810fi
4811if test "$with_pymalloc" != "no"
4812then
4813 cat >> confdefs.h <<\EOF
4814#define WITH_PYMALLOC 1
4815EOF
4816
4817fi
4818echo "$ac_t""$with_pymalloc" 1>&6
4819
Barry Warsawef82cd72000-06-30 16:21:01 +00004820# Check for --with-wctype-functions
Michael W. Hudson54241132001-12-07 15:38:26 +00004821echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004822echo "configure:4823: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004823# Check whether --with-wctype-functions or --without-wctype-functions was given.
4824if test "${with_wctype_functions+set}" = set; then
4825 withval="$with_wctype_functions"
Michael W. Hudson54241132001-12-07 15:38:26 +00004826
Barry Warsawef82cd72000-06-30 16:21:01 +00004827if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00004828then cat >> confdefs.h <<\EOF
Barry Warsawef82cd72000-06-30 16:21:01 +00004829#define WANT_WCTYPE_FUNCTIONS 1
4830EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00004831 echo "$ac_t""yes" 1>&6
4832else echo "$ac_t""no" 1>&6
Barry Warsawef82cd72000-06-30 16:21:01 +00004833fi
4834else
Michael W. Hudson54241132001-12-07 15:38:26 +00004835 echo "$ac_t""no" 1>&6
4836fi
4837
Barry Warsawef82cd72000-06-30 16:21:01 +00004838
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004839# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004840
Guido van Rossum98935bf2001-09-05 19:13:16 +00004841DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004842
Michael W. Hudson54241132001-12-07 15:38:26 +00004843echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004844echo "configure:4845: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004845# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004846if test "${with_sgi_dl+set}" = set; then
4847 withval="$with_sgi_dl"
Michael W. Hudson54241132001-12-07 15:38:26 +00004848
4849echo "$ac_t""$withval" 1>&6
4850cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004851#define WITH_SGI_DL 1
4852EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004853
Guido van Rossume97ee181999-12-20 21:27:22 +00004854DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004855dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004856if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004857then LDFLAGS="$LDFLAGS -L$dldir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004858else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004859fi
4860DLINCLDIR=${dldir}
4861LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004862else
Michael W. Hudson54241132001-12-07 15:38:26 +00004863 echo "$ac_t""no" 1>&6
4864fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004865
4866
Michael W. Hudson54241132001-12-07 15:38:26 +00004867echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004868echo "configure:4869: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004869# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004870if test "${with_dl_dld+set}" = set; then
4871 withval="$with_dl_dld"
Michael W. Hudson54241132001-12-07 15:38:26 +00004872
4873echo "$ac_t""$withval" 1>&6
4874cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004875#define WITH_DL_DLD 1
4876EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004877
Guido van Rossume97ee181999-12-20 21:27:22 +00004878DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004879dldir=`echo "$withval" | sed 's/,.*//'`
4880dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004881if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004882then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004883else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004884fi
4885DLINCLDIR=${dldir}
4886LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004887else
Michael W. Hudson54241132001-12-07 15:38:26 +00004888 echo "$ac_t""no" 1>&6
4889fi
4890
Guido van Rossum7f43da71994-08-01 12:15:30 +00004891
Guido van Rossume97ee181999-12-20 21:27:22 +00004892# the dlopen() function means we might want to use dynload_shlib.o. some
4893# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004894for ac_func in dlopen
4895do
Michael W. Hudson54241132001-12-07 15:38:26 +00004896echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004897echo "configure:4898: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004898if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4899 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004900else
Michael W. Hudson54241132001-12-07 15:38:26 +00004901 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004902#line 4903 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004903#include "confdefs.h"
4904/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004905 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004906#include <assert.h>
4907/* Override any gcc2 internal prototype to avoid an error. */
4908/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004909 builtin and then its argument prototype would still apply. */
4910char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004911
Michael W. Hudson54241132001-12-07 15:38:26 +00004912int main() {
4913
Guido van Rossume97ee181999-12-20 21:27:22 +00004914/* The GNU C library defines this for functions which it implements
4915 to always fail with ENOSYS. Some functions are actually named
4916 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004917#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004918choke me
4919#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004920$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004921#endif
4922
Michael W. Hudson54241132001-12-07 15:38:26 +00004923; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004924EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00004925if { (eval echo configure:4926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004926 rm -rf conftest*
4927 eval "ac_cv_func_$ac_func=yes"
4928else
4929 echo "configure: failed program was:" >&5
4930 cat conftest.$ac_ext >&5
4931 rm -rf conftest*
4932 eval "ac_cv_func_$ac_func=no"
4933fi
4934rm -f conftest*
4935fi
Guido van Rossume97ee181999-12-20 21:27:22 +00004936
Michael W. Hudson54241132001-12-07 15:38:26 +00004937if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4938 echo "$ac_t""yes" 1>&6
4939 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4940 cat >> confdefs.h <<EOF
4941#define $ac_tr_func 1
4942EOF
4943
4944else
4945 echo "$ac_t""no" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004946fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004947done
Guido van Rossume97ee181999-12-20 21:27:22 +00004948
Michael W. Hudson54241132001-12-07 15:38:26 +00004949
Guido van Rossume97ee181999-12-20 21:27:22 +00004950# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4951# loading of modules.
4952
Michael W. Hudson54241132001-12-07 15:38:26 +00004953echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004954echo "configure:4955: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004955if test -z "$DYNLOADFILE"
4956then
4957 case $ac_sys_system/$ac_sys_release in
4958 AIX*) DYNLOADFILE="dynload_aix.o";;
4959 BeOS*) DYNLOADFILE="dynload_beos.o";;
4960 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004961 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004962 *)
4963 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4964 # out any dynamic loading
4965 if test "$ac_cv_func_dlopen" = yes
4966 then DYNLOADFILE="dynload_shlib.o"
4967 else DYNLOADFILE="dynload_stub.o"
4968 fi
4969 ;;
4970 esac
4971fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004972echo "$ac_t""$DYNLOADFILE" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004973if test "$DYNLOADFILE" != "dynload_stub.o"
4974then
Michael W. Hudson54241132001-12-07 15:38:26 +00004975 cat >> confdefs.h <<\EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004976#define HAVE_DYNAMIC_LOADING 1
4977EOF
4978
4979fi
4980
Neil Schemenauer4e425612001-06-19 15:44:15 +00004981# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4982
Michael W. Hudson54241132001-12-07 15:38:26 +00004983
4984echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00004985echo "configure:4986: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004986if test -z "$MACHDEP_OBJS"
4987then
Jack Jansene578a632001-08-15 01:27:14 +00004988 MACHDEP_OBJS=$extra_machdep_objs
4989else
4990 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004991fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004992echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004993
Guido van Rossum627b2d71993-12-24 10:39:16 +00004994# checks for library functions
Martin v. Löwis244edc82001-10-04 22:44:26 +00004995for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004996 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00004997 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004998 hstrerror inet_pton kill killpg link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004999 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00005000 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +00005001 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00005002 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00005003 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00005004 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +00005005 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00005006do
Michael W. Hudson54241132001-12-07 15:38:26 +00005007echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005008echo "configure:5009: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005009if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5010 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005011else
Michael W. Hudson54241132001-12-07 15:38:26 +00005012 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005013#line 5014 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005014#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005015/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005016 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005017#include <assert.h>
5018/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005019/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005020 builtin and then its argument prototype would still apply. */
5021char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005022
Michael W. Hudson54241132001-12-07 15:38:26 +00005023int main() {
5024
Guido van Rossum627b2d71993-12-24 10:39:16 +00005025/* The GNU C library defines this for functions which it implements
5026 to always fail with ENOSYS. Some functions are actually named
5027 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005028#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005029choke me
5030#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005031$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005032#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005033
Michael W. Hudson54241132001-12-07 15:38:26 +00005034; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005035EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005036if { (eval echo configure:5037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005037 rm -rf conftest*
5038 eval "ac_cv_func_$ac_func=yes"
5039else
5040 echo "configure: failed program was:" >&5
5041 cat conftest.$ac_ext >&5
5042 rm -rf conftest*
5043 eval "ac_cv_func_$ac_func=no"
5044fi
5045rm -f conftest*
5046fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00005047
Michael W. Hudson54241132001-12-07 15:38:26 +00005048if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5049 echo "$ac_t""yes" 1>&6
5050 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5051 cat >> confdefs.h <<EOF
5052#define $ac_tr_func 1
5053EOF
5054
5055else
5056 echo "$ac_t""no" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005057fi
5058done
5059
Michael W. Hudson54241132001-12-07 15:38:26 +00005060
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005061# check for openpty and forkpty
5062
5063for ac_func in openpty
5064do
Michael W. Hudson54241132001-12-07 15:38:26 +00005065echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005066echo "configure:5067: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005067if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5068 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005069else
Michael W. Hudson54241132001-12-07 15:38:26 +00005070 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005071#line 5072 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005072#include "confdefs.h"
5073/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005074 which can conflict with char $ac_func(); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005075#include <assert.h>
5076/* Override any gcc2 internal prototype to avoid an error. */
5077/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005078 builtin and then its argument prototype would still apply. */
5079char $ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005080
Michael W. Hudson54241132001-12-07 15:38:26 +00005081int main() {
5082
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005083/* The GNU C library defines this for functions which it implements
5084 to always fail with ENOSYS. Some functions are actually named
5085 something starting with __ and the normal name is an alias. */
5086#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5087choke me
5088#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005089$ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005090#endif
5091
Michael W. Hudson54241132001-12-07 15:38:26 +00005092; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005093EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005094if { (eval echo configure:5095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005095 rm -rf conftest*
5096 eval "ac_cv_func_$ac_func=yes"
5097else
5098 echo "configure: failed program was:" >&5
5099 cat conftest.$ac_ext >&5
5100 rm -rf conftest*
5101 eval "ac_cv_func_$ac_func=no"
5102fi
5103rm -f conftest*
5104fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005105
Michael W. Hudson54241132001-12-07 15:38:26 +00005106if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5107 echo "$ac_t""yes" 1>&6
5108 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5109 cat >> confdefs.h <<EOF
5110#define $ac_tr_func 1
5111EOF
5112
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005113else
Michael W. Hudson54241132001-12-07 15:38:26 +00005114 echo "$ac_t""no" 1>&6
5115echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005116echo "configure:5117: checking for openpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005117ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
5118if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5119 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005120else
Michael W. Hudson54241132001-12-07 15:38:26 +00005121 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005122LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005123cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005124#line 5125 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005125#include "confdefs.h"
5126/* Override any gcc2 internal prototype to avoid an error. */
5127/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005128 builtin and then its argument prototype would still apply. */
5129char openpty();
5130
5131int main() {
5132openpty()
5133; return 0; }
5134EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005135if { (eval echo configure:5136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005136 rm -rf conftest*
5137 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005138else
Michael W. Hudson54241132001-12-07 15:38:26 +00005139 echo "configure: failed program was:" >&5
5140 cat conftest.$ac_ext >&5
5141 rm -rf conftest*
5142 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005143fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005144rm -f conftest*
5145LIBS="$ac_save_LIBS"
5146
Fred Drake8cef4cf2000-06-28 16:40:38 +00005147fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005148if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5149 echo "$ac_t""yes" 1>&6
5150 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005151#define HAVE_OPENPTY 1
5152EOF
5153 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005154else
5155 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005156fi
5157
5158fi
5159done
5160
5161for ac_func in forkpty
5162do
Michael W. Hudson54241132001-12-07 15:38:26 +00005163echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005164echo "configure:5165: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005165if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5166 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005167else
Michael W. Hudson54241132001-12-07 15:38:26 +00005168 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005169#line 5170 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005170#include "confdefs.h"
5171/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005172 which can conflict with char $ac_func(); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +00005173#include <assert.h>
5174/* Override any gcc2 internal prototype to avoid an error. */
5175/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005176 builtin and then its argument prototype would still apply. */
5177char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005178
Michael W. Hudson54241132001-12-07 15:38:26 +00005179int main() {
5180
Fred Drake8cef4cf2000-06-28 16:40:38 +00005181/* The GNU C library defines this for functions which it implements
5182 to always fail with ENOSYS. Some functions are actually named
5183 something starting with __ and the normal name is an alias. */
5184#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5185choke me
5186#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005187$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005188#endif
5189
Michael W. Hudson54241132001-12-07 15:38:26 +00005190; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005191EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005192if { (eval echo configure:5193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005193 rm -rf conftest*
5194 eval "ac_cv_func_$ac_func=yes"
5195else
5196 echo "configure: failed program was:" >&5
5197 cat conftest.$ac_ext >&5
5198 rm -rf conftest*
5199 eval "ac_cv_func_$ac_func=no"
5200fi
5201rm -f conftest*
5202fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00005203
Michael W. Hudson54241132001-12-07 15:38:26 +00005204if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5205 echo "$ac_t""yes" 1>&6
5206 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5207 cat >> confdefs.h <<EOF
5208#define $ac_tr_func 1
5209EOF
5210
Fred Drake8cef4cf2000-06-28 16:40:38 +00005211else
Michael W. Hudson54241132001-12-07 15:38:26 +00005212 echo "$ac_t""no" 1>&6
5213echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005214echo "configure:5215: checking for forkpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005215ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
5216if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5217 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005218else
Michael W. Hudson54241132001-12-07 15:38:26 +00005219 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005220LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005221cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005222#line 5223 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005223#include "confdefs.h"
5224/* Override any gcc2 internal prototype to avoid an error. */
5225/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005226 builtin and then its argument prototype would still apply. */
5227char forkpty();
5228
5229int main() {
5230forkpty()
5231; return 0; }
5232EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005233if { (eval echo configure:5234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005234 rm -rf conftest*
5235 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005236else
Michael W. Hudson54241132001-12-07 15:38:26 +00005237 echo "configure: failed program was:" >&5
5238 cat conftest.$ac_ext >&5
5239 rm -rf conftest*
5240 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005241fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005242rm -f conftest*
5243LIBS="$ac_save_LIBS"
5244
Fred Drake8cef4cf2000-06-28 16:40:38 +00005245fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005246if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5247 echo "$ac_t""yes" 1>&6
5248 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005249#define HAVE_FORKPTY 1
5250EOF
5251 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005252else
5253 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005254fi
5255
5256fi
5257done
5258
Jack Jansendd19cf82001-12-06 22:36:17 +00005259
Michael W. Hudson54241132001-12-07 15:38:26 +00005260# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +00005261for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
5262do
Michael W. Hudson54241132001-12-07 15:38:26 +00005263echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005264echo "configure:5265: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005265if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5266 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005267else
Michael W. Hudson54241132001-12-07 15:38:26 +00005268 cat > conftest.$ac_ext <<EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005269#line 5270 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005270#include "confdefs.h"
5271/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005272 which can conflict with char $ac_func(); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005273#include <assert.h>
5274/* Override any gcc2 internal prototype to avoid an error. */
5275/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005276 builtin and then its argument prototype would still apply. */
5277char $ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005278
Michael W. Hudson54241132001-12-07 15:38:26 +00005279int main() {
5280
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005281/* The GNU C library defines this for functions which it implements
5282 to always fail with ENOSYS. Some functions are actually named
5283 something starting with __ and the normal name is an alias. */
5284#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5285choke me
5286#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005287$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005288#endif
5289
Michael W. Hudson54241132001-12-07 15:38:26 +00005290; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005291EOF
Martin v. Löwis2e64c342002-03-27 18:49:02 +00005292if { (eval echo configure:5293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005293 rm -rf conftest*
5294 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005295else
Michael W. Hudson54241132001-12-07 15:38:26 +00005296 echo "configure: failed program was:" >&5
5297 cat conftest.$ac_ext >&5
5298 rm -rf conftest*
5299 eval "ac_cv_func_$ac_func=no"
5300fi
5301rm -f conftest*
5302fi
5303
5304if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5305 echo "$ac_t""yes" 1>&6
5306 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5307 cat >> confdefs.h <<EOF
5308#define $ac_tr_func 1
5309EOF
5310
5311else
5312 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005313fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005314done
5315
Michael W. Hudson54241132001-12-07 15:38:26 +00005316
Martin v. Löwis1142de32002-03-29 16:28:31 +00005317for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +00005318do
Michael W. Hudson54241132001-12-07 15:38:26 +00005319echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005320echo "configure:5321: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005321if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5322 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005323else
Michael W. Hudson54241132001-12-07 15:38:26 +00005324 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005325#line 5326 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005326#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005327/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005328 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005329#include <assert.h>
5330/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005331/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005332 builtin and then its argument prototype would still apply. */
5333char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005334
Michael W. Hudson54241132001-12-07 15:38:26 +00005335int main() {
5336
Guido van Rossum627b2d71993-12-24 10:39:16 +00005337/* The GNU C library defines this for functions which it implements
5338 to always fail with ENOSYS. Some functions are actually named
5339 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005340#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005341choke me
5342#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005343$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005344#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005345
Michael W. Hudson54241132001-12-07 15:38:26 +00005346; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005347EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005348if { (eval echo configure:5349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5349 rm -rf conftest*
5350 eval "ac_cv_func_$ac_func=yes"
5351else
5352 echo "configure: failed program was:" >&5
5353 cat conftest.$ac_ext >&5
5354 rm -rf conftest*
5355 eval "ac_cv_func_$ac_func=no"
5356fi
5357rm -f conftest*
5358fi
5359
5360if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5361 echo "$ac_t""yes" 1>&6
5362 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5363 cat >> confdefs.h <<EOF
5364#define $ac_tr_func 1
5365EOF
5366
5367else
5368 echo "$ac_t""no" 1>&6
5369LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
5370fi
5371done
5372
5373
5374for ac_func in getpgrp
5375do
5376echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5377echo "configure:5378: checking for $ac_func" >&5
5378if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5379 echo $ac_n "(cached) $ac_c" 1>&6
5380else
5381 cat > conftest.$ac_ext <<EOF
5382#line 5383 "configure"
5383#include "confdefs.h"
5384/* System header to define __stub macros and hopefully few prototypes,
5385 which can conflict with char $ac_func(); below. */
5386#include <assert.h>
5387/* Override any gcc2 internal prototype to avoid an error. */
5388/* We use char because int might match the return type of a gcc2
5389 builtin and then its argument prototype would still apply. */
5390char $ac_func();
5391
5392int main() {
5393
5394/* The GNU C library defines this for functions which it implements
5395 to always fail with ENOSYS. Some functions are actually named
5396 something starting with __ and the normal name is an alias. */
5397#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5398choke me
5399#else
5400$ac_func();
5401#endif
5402
5403; return 0; }
5404EOF
5405if { (eval echo configure:5406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005406 rm -rf conftest*
5407 eval "ac_cv_func_$ac_func=yes"
5408else
5409 echo "configure: failed program was:" >&5
5410 cat conftest.$ac_ext >&5
5411 rm -rf conftest*
5412 eval "ac_cv_func_$ac_func=no"
5413fi
5414rm -f conftest*
5415fi
5416
5417if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5418 echo "$ac_t""yes" 1>&6
5419 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5420 cat >> confdefs.h <<EOF
5421#define $ac_tr_func 1
5422EOF
5423 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005424#line 5425 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005425#include "confdefs.h"
5426#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005427int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005428getpgrp(0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005429; return 0; }
5430EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005431if { (eval echo configure:5432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005432 rm -rf conftest*
5433 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005434#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005435EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005436
Guido van Rossumf78abae1997-01-21 22:02:36 +00005437else
Michael W. Hudson54241132001-12-07 15:38:26 +00005438 echo "configure: failed program was:" >&5
5439 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005440fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005441rm -f conftest*
5442else
5443 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005444fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005445done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005446
Thomas Wouters3a584202000-08-05 23:28:51 +00005447for ac_func in setpgrp
5448do
Michael W. Hudson54241132001-12-07 15:38:26 +00005449echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005450echo "configure:5451: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005451if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5452 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005453else
Michael W. Hudson54241132001-12-07 15:38:26 +00005454 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005455#line 5456 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005456#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005457/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005458 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005459#include <assert.h>
5460/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005461/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005462 builtin and then its argument prototype would still apply. */
5463char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005464
Michael W. Hudson54241132001-12-07 15:38:26 +00005465int main() {
5466
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005467/* The GNU C library defines this for functions which it implements
5468 to always fail with ENOSYS. Some functions are actually named
5469 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005470#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005471choke me
5472#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005473$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005474#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005475
Michael W. Hudson54241132001-12-07 15:38:26 +00005476; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005477EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005478if { (eval echo configure:5479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005479 rm -rf conftest*
5480 eval "ac_cv_func_$ac_func=yes"
5481else
5482 echo "configure: failed program was:" >&5
5483 cat conftest.$ac_ext >&5
5484 rm -rf conftest*
5485 eval "ac_cv_func_$ac_func=no"
5486fi
5487rm -f conftest*
5488fi
5489
5490if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5491 echo "$ac_t""yes" 1>&6
5492 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5493 cat >> confdefs.h <<EOF
5494#define $ac_tr_func 1
5495EOF
5496 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005497#line 5498 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005498#include "confdefs.h"
5499#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005500int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005501setpgrp(0,0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005502; return 0; }
5503EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005504if { (eval echo configure:5505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005505 rm -rf conftest*
5506 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005507#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005508EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005509
Guido van Rossumf78abae1997-01-21 22:02:36 +00005510else
Michael W. Hudson54241132001-12-07 15:38:26 +00005511 echo "configure: failed program was:" >&5
5512 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005513fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005514rm -f conftest*
5515else
5516 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005517fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005518done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005519
Thomas Wouters3a584202000-08-05 23:28:51 +00005520for ac_func in gettimeofday
5521do
Michael W. Hudson54241132001-12-07 15:38:26 +00005522echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005523echo "configure:5524: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005524if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5525 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005526else
Michael W. Hudson54241132001-12-07 15:38:26 +00005527 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005528#line 5529 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005529#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005530/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005531 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005532#include <assert.h>
5533/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005534/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005535 builtin and then its argument prototype would still apply. */
5536char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005537
Michael W. Hudson54241132001-12-07 15:38:26 +00005538int main() {
5539
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005540/* The GNU C library defines this for functions which it implements
5541 to always fail with ENOSYS. Some functions are actually named
5542 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005543#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005544choke me
5545#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005546$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005547#endif
5548
Michael W. Hudson54241132001-12-07 15:38:26 +00005549; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005550EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005551if { (eval echo configure:5552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005552 rm -rf conftest*
5553 eval "ac_cv_func_$ac_func=yes"
5554else
5555 echo "configure: failed program was:" >&5
5556 cat conftest.$ac_ext >&5
5557 rm -rf conftest*
5558 eval "ac_cv_func_$ac_func=no"
5559fi
5560rm -f conftest*
5561fi
5562
5563if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5564 echo "$ac_t""yes" 1>&6
5565 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5566 cat >> confdefs.h <<EOF
5567#define $ac_tr_func 1
5568EOF
5569 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005570#line 5571 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005571#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005572#include <sys/time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005573int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005574gettimeofday((struct timeval*)0,(struct timezone*)0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005575; return 0; }
5576EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005577if { (eval echo configure:5578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005578 :
5579else
Michael W. Hudson54241132001-12-07 15:38:26 +00005580 echo "configure: failed program was:" >&5
5581 cat conftest.$ac_ext >&5
5582 rm -rf conftest*
5583 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005584#define GETTIMEOFDAY_NO_TZ 1
5585EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005586
5587fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005588rm -f conftest*
5589else
5590 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005591fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005592done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005593
Michael W. Hudson54241132001-12-07 15:38:26 +00005594
5595
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005596# On OSF/1 V5.1, getaddrinfo is available, but a define
Michael W. Hudson54241132001-12-07 15:38:26 +00005597# for [no]getaddrinfo in netdb.h.
5598echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005599echo "configure:5600: checking for getaddrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005600cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005601#line 5602 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005602#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005603
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005604#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005605#include <sys/socket.h>
5606#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005607#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005608
Michael W. Hudson54241132001-12-07 15:38:26 +00005609int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005610
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005611getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005612
Michael W. Hudson54241132001-12-07 15:38:26 +00005613; return 0; }
5614EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005615if { (eval echo configure:5616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005616 rm -rf conftest*
5617
5618echo "$ac_t""yes" 1>&6
5619echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005620echo "configure:5621: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005621if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005622 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005623buggygetaddrinfo=yes
5624else
Michael W. Hudson54241132001-12-07 15:38:26 +00005625 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005626#line 5627 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005627#include "confdefs.h"
5628
5629#include <sys/types.h>
5630#include <netdb.h>
5631#include <string.h>
5632#include <sys/socket.h>
5633#include <netinet/in.h>
5634
5635main()
5636{
5637 int passive, gaierr, inet4 = 0, inet6 = 0;
5638 struct addrinfo hints, *ai, *aitop;
5639 char straddr[INET6_ADDRSTRLEN], strport[16];
5640
5641 for (passive = 0; passive <= 1; passive++) {
5642 memset(&hints, 0, sizeof(hints));
5643 hints.ai_family = AF_UNSPEC;
5644 hints.ai_flags = passive ? AI_PASSIVE : 0;
5645 hints.ai_socktype = SOCK_STREAM;
5646 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5647 (void)gai_strerror(gaierr);
5648 goto bad;
5649 }
5650 for (ai = aitop; ai; ai = ai->ai_next) {
5651 if (ai->ai_addr == NULL ||
5652 ai->ai_addrlen == 0 ||
5653 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5654 straddr, sizeof(straddr), strport, sizeof(strport),
5655 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5656 goto bad;
5657 }
5658 switch (ai->ai_family) {
5659 case AF_INET:
5660 if (strcmp(strport, "54321") != 0) {
5661 goto bad;
5662 }
5663 if (passive) {
5664 if (strcmp(straddr, "0.0.0.0") != 0) {
5665 goto bad;
5666 }
5667 } else {
5668 if (strcmp(straddr, "127.0.0.1") != 0) {
5669 goto bad;
5670 }
5671 }
5672 inet4++;
5673 break;
5674 case AF_INET6:
5675 if (strcmp(strport, "54321") != 0) {
5676 goto bad;
5677 }
5678 if (passive) {
5679 if (strcmp(straddr, "::") != 0) {
5680 goto bad;
5681 }
5682 } else {
5683 if (strcmp(straddr, "::1") != 0) {
5684 goto bad;
5685 }
5686 }
5687 inet6++;
5688 break;
5689 case AF_UNSPEC:
5690 goto bad;
5691 break;
5692 default:
5693 /* another family support? */
5694 break;
5695 }
5696 }
5697 }
5698
5699 if (!(inet4 == 0 || inet4 == 2))
5700 goto bad;
5701 if (!(inet6 == 0 || inet6 == 2))
5702 goto bad;
5703
5704 if (aitop)
5705 freeaddrinfo(aitop);
5706 exit(0);
5707
5708 bad:
5709 if (aitop)
5710 freeaddrinfo(aitop);
5711 exit(1);
5712}
5713
Michael W. Hudson54241132001-12-07 15:38:26 +00005714EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005715if { (eval echo configure:5716: \"$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 +00005716then
5717 echo "$ac_t""good" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005718buggygetaddrinfo=no
5719else
Michael W. Hudson54241132001-12-07 15:38:26 +00005720 echo "configure: failed program was:" >&5
5721 cat conftest.$ac_ext >&5
5722 rm -fr conftest*
5723 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005724buggygetaddrinfo=yes
5725fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005726rm -fr conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005727fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005728
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005729else
Michael W. Hudson54241132001-12-07 15:38:26 +00005730 echo "configure: failed program was:" >&5
5731 cat conftest.$ac_ext >&5
5732 rm -rf conftest*
5733
5734echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005735buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005736
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005737fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005738rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005739
5740if test "$buggygetaddrinfo" = "yes"; then
5741 if test "$ipv6" = "yes"; then
5742 echo 'Fatal: You must get working getaddrinfo() function.'
5743 echo ' or you can specify "--disable-ipv6"'.
5744 exit 1
5745 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005746else
Michael W. Hudson54241132001-12-07 15:38:26 +00005747 cat >> confdefs.h <<\EOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005748#define HAVE_GETADDRINFO 1
5749EOF
5750
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005751fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005752for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005753do
Michael W. Hudson54241132001-12-07 15:38:26 +00005754echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005755echo "configure:5756: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005756if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5757 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005758else
Michael W. Hudson54241132001-12-07 15:38:26 +00005759 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005760#line 5761 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005761#include "confdefs.h"
5762/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005763 which can conflict with char $ac_func(); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005764#include <assert.h>
5765/* Override any gcc2 internal prototype to avoid an error. */
5766/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005767 builtin and then its argument prototype would still apply. */
5768char $ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005769
Michael W. Hudson54241132001-12-07 15:38:26 +00005770int main() {
5771
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005772/* The GNU C library defines this for functions which it implements
5773 to always fail with ENOSYS. Some functions are actually named
5774 something starting with __ and the normal name is an alias. */
5775#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5776choke me
5777#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005778$ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005779#endif
5780
Michael W. Hudson54241132001-12-07 15:38:26 +00005781; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005782EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005783if { (eval echo configure:5784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005784 rm -rf conftest*
5785 eval "ac_cv_func_$ac_func=yes"
5786else
5787 echo "configure: failed program was:" >&5
5788 cat conftest.$ac_ext >&5
5789 rm -rf conftest*
5790 eval "ac_cv_func_$ac_func=no"
5791fi
5792rm -f conftest*
5793fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005794
Michael W. Hudson54241132001-12-07 15:38:26 +00005795if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5796 echo "$ac_t""yes" 1>&6
5797 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5798 cat >> confdefs.h <<EOF
5799#define $ac_tr_func 1
5800EOF
5801
5802else
5803 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005804fi
5805done
5806
Michael W. Hudson54241132001-12-07 15:38:26 +00005807
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005808# checks for structures
Michael W. Hudson54241132001-12-07 15:38:26 +00005809echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005810echo "configure:5811: checking whether time.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005811if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5812 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005813else
Michael W. Hudson54241132001-12-07 15:38:26 +00005814 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005815#line 5816 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005816#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005817#include <sys/types.h>
5818#include <sys/time.h>
5819#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005820int main() {
5821struct tm *tp;
5822; return 0; }
5823EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005824if { (eval echo configure:5825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005825 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005826 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005827else
Michael W. Hudson54241132001-12-07 15:38:26 +00005828 echo "configure: failed program was:" >&5
5829 cat conftest.$ac_ext >&5
5830 rm -rf conftest*
5831 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005832fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005833rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005834fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005835
Michael W. Hudson54241132001-12-07 15:38:26 +00005836echo "$ac_t""$ac_cv_header_time" 1>&6
5837if test $ac_cv_header_time = yes; then
5838 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005839#define TIME_WITH_SYS_TIME 1
5840EOF
5841
5842fi
5843
Michael W. Hudson54241132001-12-07 15:38:26 +00005844echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005845echo "configure:5846: checking whether struct tm is in sys/time.h or time.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005846if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5847 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005848else
Michael W. Hudson54241132001-12-07 15:38:26 +00005849 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005850#line 5851 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005851#include "confdefs.h"
5852#include <sys/types.h>
5853#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005854int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005855struct tm *tp; tp->tm_sec;
Michael W. Hudson54241132001-12-07 15:38:26 +00005856; return 0; }
5857EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005858if { (eval echo configure:5859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005859 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005860 ac_cv_struct_tm=time.h
5861else
Michael W. Hudson54241132001-12-07 15:38:26 +00005862 echo "configure: failed program was:" >&5
5863 cat conftest.$ac_ext >&5
5864 rm -rf conftest*
5865 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005866fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005867rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005868fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005869
Michael W. Hudson54241132001-12-07 15:38:26 +00005870echo "$ac_t""$ac_cv_struct_tm" 1>&6
5871if test $ac_cv_struct_tm = sys/time.h; then
5872 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005873#define TM_IN_SYS_TIME 1
5874EOF
5875
5876fi
5877
Michael W. Hudson54241132001-12-07 15:38:26 +00005878echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005879echo "configure:5880: checking for tm_zone in struct tm" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005880if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5881 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005882else
Michael W. Hudson54241132001-12-07 15:38:26 +00005883 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005884#line 5885 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005885#include "confdefs.h"
5886#include <sys/types.h>
5887#include <$ac_cv_struct_tm>
Michael W. Hudson54241132001-12-07 15:38:26 +00005888int main() {
5889struct tm tm; tm.tm_zone;
5890; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005891EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005892if { (eval echo configure:5893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005893 rm -rf conftest*
5894 ac_cv_struct_tm_zone=yes
5895else
5896 echo "configure: failed program was:" >&5
5897 cat conftest.$ac_ext >&5
5898 rm -rf conftest*
5899 ac_cv_struct_tm_zone=no
5900fi
5901rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005902fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005903
Michael W. Hudson54241132001-12-07 15:38:26 +00005904echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5905if test "$ac_cv_struct_tm_zone" = yes; then
5906 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005907#define HAVE_TM_ZONE 1
5908EOF
5909
5910else
Michael W. Hudson54241132001-12-07 15:38:26 +00005911 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005912echo "configure:5913: checking for tzname" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005913if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5914 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005915else
Michael W. Hudson54241132001-12-07 15:38:26 +00005916 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005917#line 5918 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005918#include "confdefs.h"
5919#include <time.h>
5920#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005921extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005922#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005923int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005924atoi(*tzname);
Michael W. Hudson54241132001-12-07 15:38:26 +00005925; return 0; }
5926EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005927if { (eval echo configure:5928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005928 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005929 ac_cv_var_tzname=yes
5930else
Michael W. Hudson54241132001-12-07 15:38:26 +00005931 echo "configure: failed program was:" >&5
5932 cat conftest.$ac_ext >&5
5933 rm -rf conftest*
5934 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005935fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005936rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005937fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005938
Michael W. Hudson54241132001-12-07 15:38:26 +00005939echo "$ac_t""$ac_cv_var_tzname" 1>&6
5940 if test $ac_cv_var_tzname = yes; then
5941 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005942#define HAVE_TZNAME 1
5943EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005944
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005945 fi
5946fi
5947
Michael W. Hudson54241132001-12-07 15:38:26 +00005948echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005949echo "configure:5950: checking for st_rdev in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005950if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
5951 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005952else
Michael W. Hudson54241132001-12-07 15:38:26 +00005953 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005954#line 5955 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005955#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005956#include <sys/types.h>
5957#include <sys/stat.h>
5958int main() {
5959struct stat s; s.st_rdev;
5960; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005961EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005962if { (eval echo configure:5963: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005963 rm -rf conftest*
5964 ac_cv_struct_st_rdev=yes
5965else
5966 echo "configure: failed program was:" >&5
5967 cat conftest.$ac_ext >&5
5968 rm -rf conftest*
5969 ac_cv_struct_st_rdev=no
5970fi
5971rm -f conftest*
5972fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005973
Michael W. Hudson54241132001-12-07 15:38:26 +00005974echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
5975if test $ac_cv_struct_st_rdev = yes; then
5976 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005977#define HAVE_ST_RDEV 1
5978EOF
5979
5980fi
5981
Michael W. Hudson54241132001-12-07 15:38:26 +00005982echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00005983echo "configure:5984: checking for st_blksize in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005984if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
5985 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005986else
Michael W. Hudson54241132001-12-07 15:38:26 +00005987 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005988#line 5989 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005989#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005990#include <sys/types.h>
5991#include <sys/stat.h>
5992int main() {
5993struct stat s; s.st_blksize;
5994; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005995EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00005996if { (eval echo configure:5997: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005997 rm -rf conftest*
5998 ac_cv_struct_st_blksize=yes
5999else
6000 echo "configure: failed program was:" >&5
6001 cat conftest.$ac_ext >&5
6002 rm -rf conftest*
6003 ac_cv_struct_st_blksize=no
6004fi
6005rm -f conftest*
6006fi
Jack Jansendd19cf82001-12-06 22:36:17 +00006007
Michael W. Hudson54241132001-12-07 15:38:26 +00006008echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
6009if test $ac_cv_struct_st_blksize = yes; then
6010 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006011#define HAVE_ST_BLKSIZE 1
6012EOF
6013
6014fi
6015
Michael W. Hudson54241132001-12-07 15:38:26 +00006016echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006017echo "configure:6018: checking for st_blocks in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006018if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
6019 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006020else
Michael W. Hudson54241132001-12-07 15:38:26 +00006021 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006022#line 6023 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006023#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00006024#include <sys/types.h>
6025#include <sys/stat.h>
6026int main() {
6027struct stat s; s.st_blocks;
6028; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006029EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006030if { (eval echo configure:6031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006031 rm -rf conftest*
6032 ac_cv_struct_st_blocks=yes
6033else
6034 echo "configure: failed program was:" >&5
6035 cat conftest.$ac_ext >&5
6036 rm -rf conftest*
6037 ac_cv_struct_st_blocks=no
6038fi
6039rm -f conftest*
6040fi
Jack Jansendd19cf82001-12-06 22:36:17 +00006041
Michael W. Hudson54241132001-12-07 15:38:26 +00006042echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
6043if test $ac_cv_struct_st_blocks = yes; then
6044 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006045#define HAVE_ST_BLOCKS 1
6046EOF
6047
6048else
Michael W. Hudson54241132001-12-07 15:38:26 +00006049 LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00006050fi
6051
Michael W. Hudson54241132001-12-07 15:38:26 +00006052
6053echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006054echo "configure:6055: checking for time.h that defines altzone" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006055if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
6056 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006057else
Michael W. Hudson54241132001-12-07 15:38:26 +00006058 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006059#line 6060 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006060#include "confdefs.h"
6061#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006062int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006063return altzone;
Michael W. Hudson54241132001-12-07 15:38:26 +00006064; return 0; }
6065EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006066if { (eval echo configure:6067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006067 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006068 ac_cv_header_time_altzone=yes
6069else
Michael W. Hudson54241132001-12-07 15:38:26 +00006070 echo "configure: failed program was:" >&5
6071 cat conftest.$ac_ext >&5
6072 rm -rf conftest*
6073 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006074fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006075rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006076fi
6077
Michael W. Hudson54241132001-12-07 15:38:26 +00006078echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006079if test $ac_cv_header_time_altzone = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006080 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006081#define HAVE_ALTZONE 1
6082EOF
6083
6084fi
6085
Guido van Rossumda88dad1995-01-26 00:46:29 +00006086was_it_defined=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006087echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006088echo "configure:6089: checking whether sys/select.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006089cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006090#line 6091 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006091#include "confdefs.h"
6092
6093#include <sys/types.h>
6094#include <sys/select.h>
6095#include <sys/time.h>
6096
Michael W. Hudson54241132001-12-07 15:38:26 +00006097int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006098;
Michael W. Hudson54241132001-12-07 15:38:26 +00006099; return 0; }
6100EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006101if { (eval echo configure:6102: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006102 rm -rf conftest*
6103 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006104#define SYS_SELECT_WITH_SYS_TIME 1
6105EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006106 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006107else
Michael W. Hudson54241132001-12-07 15:38:26 +00006108 echo "configure: failed program was:" >&5
6109 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006110fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006111rm -f conftest*
6112echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006113
Michael W. Hudson54241132001-12-07 15:38:26 +00006114echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006115echo "configure:6116: checking for addrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006116if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
6117 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006118else
Michael W. Hudson54241132001-12-07 15:38:26 +00006119 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006120#line 6121 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006121#include "confdefs.h"
6122
6123# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006124int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006125struct addrinfo a
Michael W. Hudson54241132001-12-07 15:38:26 +00006126; return 0; }
6127EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006128if { (eval echo configure:6129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006129 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006130 ac_cv_struct_addrinfo=yes
6131else
Michael W. Hudson54241132001-12-07 15:38:26 +00006132 echo "configure: failed program was:" >&5
6133 cat conftest.$ac_ext >&5
6134 rm -rf conftest*
6135 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006136fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006137rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006138fi
6139
Michael W. Hudson54241132001-12-07 15:38:26 +00006140echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006141if test $ac_cv_struct_addrinfo = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006142 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006143#define HAVE_ADDRINFO 1
6144EOF
6145
6146fi
6147
Michael W. Hudson54241132001-12-07 15:38:26 +00006148echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006149echo "configure:6150: checking for sockaddr_storage" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006150if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
6151 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006152else
Michael W. Hudson54241132001-12-07 15:38:26 +00006153 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006154#line 6155 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006155#include "confdefs.h"
6156
6157# include <sys/types.h>
6158# include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006159int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006160struct sockaddr_storage s
Michael W. Hudson54241132001-12-07 15:38:26 +00006161; return 0; }
6162EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006163if { (eval echo configure:6164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006164 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006165 ac_cv_struct_sockaddr_storage=yes
6166else
Michael W. Hudson54241132001-12-07 15:38:26 +00006167 echo "configure: failed program was:" >&5
6168 cat conftest.$ac_ext >&5
6169 rm -rf conftest*
6170 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006171fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006172rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006173fi
6174
Michael W. Hudson54241132001-12-07 15:38:26 +00006175echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006176if test $ac_cv_struct_sockaddr_storage = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006177 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006178#define HAVE_SOCKADDR_STORAGE 1
6179EOF
6180
6181fi
6182
Guido van Rossum627b2d71993-12-24 10:39:16 +00006183# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00006184
Michael W. Hudson54241132001-12-07 15:38:26 +00006185echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006186echo "configure:6187: checking whether char is unsigned" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006187if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
6188 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006189else
Michael W. Hudson54241132001-12-07 15:38:26 +00006190 if test "$GCC" = yes; then
6191 # GCC predefines this symbol on systems where it applies.
6192cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006193#line 6194 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006194#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00006195#ifdef __CHAR_UNSIGNED__
6196 yes
6197#endif
6198
6199EOF
6200if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6201 egrep "yes" >/dev/null 2>&1; then
6202 rm -rf conftest*
6203 ac_cv_c_char_unsigned=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006204else
Michael W. Hudson54241132001-12-07 15:38:26 +00006205 rm -rf conftest*
6206 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006207fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006208rm -f conftest*
6209
6210else
6211if test "$cross_compiling" = yes; then
6212 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6213else
6214 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006215#line 6216 "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +00006216#include "confdefs.h"
6217/* volatile prevents gcc2 from optimizing the test away on sparcs. */
6218#if !defined(__STDC__) || __STDC__ != 1
6219#define volatile
6220#endif
6221main() {
6222 volatile char c = 255; exit(c < 0);
6223}
6224EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006225if { (eval echo configure:6226: \"$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 +00006226then
6227 ac_cv_c_char_unsigned=yes
6228else
6229 echo "configure: failed program was:" >&5
6230 cat conftest.$ac_ext >&5
6231 rm -fr conftest*
6232 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006233fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006234rm -fr conftest*
6235fi
6236
6237fi
6238fi
6239
6240echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006241if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006242 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006243#define __CHAR_UNSIGNED__ 1
6244EOF
6245
6246fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006247
Michael W. Hudson54241132001-12-07 15:38:26 +00006248echo $ac_n "checking for working const""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006249echo "configure:6250: checking for working const" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006250if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6251 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006252else
Michael W. Hudson54241132001-12-07 15:38:26 +00006253 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006254#line 6255 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006255#include "confdefs.h"
6256
Michael W. Hudson54241132001-12-07 15:38:26 +00006257int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006258
Michael W. Hudson54241132001-12-07 15:38:26 +00006259/* Ultrix mips cc rejects this. */
6260typedef int charset[2]; const charset x;
6261/* SunOS 4.1.1 cc rejects this. */
6262char const *const *ccp;
6263char **p;
6264/* NEC SVR4.0.2 mips cc rejects this. */
6265struct point {int x, y;};
6266static struct point const zero = {0,0};
6267/* AIX XL C 1.02.0.0 rejects this.
6268 It does not let you subtract one const X* pointer from another in an arm
6269 of an if-expression whose if-part is not a constant expression */
6270const char *g = "string";
6271ccp = &g + (g ? g-g : 0);
6272/* HPUX 7.0 cc rejects these. */
6273++ccp;
6274p = (char**) ccp;
6275ccp = (char const *const *) p;
6276{ /* SCO 3.2v4 cc rejects this. */
6277 char *t;
6278 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006279
Michael W. Hudson54241132001-12-07 15:38:26 +00006280 *t++ = 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006281}
Michael W. Hudson54241132001-12-07 15:38:26 +00006282{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6283 int x[] = {25, 17};
6284 const int *foo = &x[0];
6285 ++foo;
6286}
6287{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6288 typedef const int *iptr;
6289 iptr p = 0;
6290 ++p;
6291}
6292{ /* AIX XL C 1.02.0.0 rejects this saying
6293 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6294 struct s { int j; const int *ap[3]; };
6295 struct s *b; b->j = 5;
6296}
6297{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6298 const int foo = 10;
6299}
6300
6301; return 0; }
6302EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006303if { (eval echo configure:6304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006304 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006305 ac_cv_c_const=yes
6306else
Michael W. Hudson54241132001-12-07 15:38:26 +00006307 echo "configure: failed program was:" >&5
6308 cat conftest.$ac_ext >&5
6309 rm -rf conftest*
6310 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006311fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006312rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006313fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006314
6315echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006316if test $ac_cv_c_const = no; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006317 cat >> confdefs.h <<\EOF
6318#define const
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006319EOF
6320
6321fi
6322
Michael W. Hudson54241132001-12-07 15:38:26 +00006323
Guido van Rossumda88dad1995-01-26 00:46:29 +00006324works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006325echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006326echo "configure:6327: checking for working volatile" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006327cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006328#line 6329 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006329#include "confdefs.h"
6330
Michael W. Hudson54241132001-12-07 15:38:26 +00006331int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006332volatile int x; x = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006333; return 0; }
6334EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006335if { (eval echo configure:6336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006336 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006337 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006338else
Michael W. Hudson54241132001-12-07 15:38:26 +00006339 echo "configure: failed program was:" >&5
6340 cat conftest.$ac_ext >&5
6341 rm -rf conftest*
6342 cat >> confdefs.h <<\EOF
6343#define volatile
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006344EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006345
6346fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006347rm -f conftest*
6348echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006349
Guido van Rossumda88dad1995-01-26 00:46:29 +00006350works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006351echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006352echo "configure:6353: checking for working signed char" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006353cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006354#line 6355 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006355#include "confdefs.h"
6356
Michael W. Hudson54241132001-12-07 15:38:26 +00006357int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006358signed char c;
Michael W. Hudson54241132001-12-07 15:38:26 +00006359; return 0; }
6360EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006361if { (eval echo configure:6362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006362 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006363 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006364else
Michael W. Hudson54241132001-12-07 15:38:26 +00006365 echo "configure: failed program was:" >&5
6366 cat conftest.$ac_ext >&5
6367 rm -rf conftest*
6368 cat >> confdefs.h <<\EOF
6369#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00006370EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006371
6372fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006373rm -f conftest*
6374echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006375
Guido van Rossumda88dad1995-01-26 00:46:29 +00006376have_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006377echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006378echo "configure:6379: checking for prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006379cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006380#line 6381 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006381#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006382int foo(int x) { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006383int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006384return foo(10);
Michael W. Hudson54241132001-12-07 15:38:26 +00006385; return 0; }
6386EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006387if { (eval echo configure:6388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006388 rm -rf conftest*
6389 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006390#define HAVE_PROTOTYPES 1
6391EOF
6392 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006393else
Michael W. Hudson54241132001-12-07 15:38:26 +00006394 echo "configure: failed program was:" >&5
6395 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006396fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006397rm -f conftest*
6398echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006399
Guido van Rossumda88dad1995-01-26 00:46:29 +00006400works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006401echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006402echo "configure:6403: checking for variable length prototypes and stdarg.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006403cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006404#line 6405 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006405#include "confdefs.h"
6406
6407#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00006408int foo(int x, ...) {
6409 va_list va;
6410 va_start(va, x);
6411 va_arg(va, int);
6412 va_arg(va, char *);
6413 va_arg(va, double);
6414 return 0;
6415}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006416
Michael W. Hudson54241132001-12-07 15:38:26 +00006417int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00006418return foo(10, "", 3.14);
Michael W. Hudson54241132001-12-07 15:38:26 +00006419; return 0; }
6420EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006421if { (eval echo configure:6422: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006422 rm -rf conftest*
6423 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006424#define HAVE_STDARG_PROTOTYPES 1
6425EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006426 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006427else
Michael W. Hudson54241132001-12-07 15:38:26 +00006428 echo "configure: failed program was:" >&5
6429 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006430fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006431rm -f conftest*
6432echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006433
Guido van Rossumda88dad1995-01-26 00:46:29 +00006434if test "$have_prototypes" = yes; then
6435bad_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006436echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006437echo "configure:6438: checking for bad exec* prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006438cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006439#line 6440 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006440#include "confdefs.h"
6441#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006442int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006443char **t;execve("@",t,t);
Michael W. Hudson54241132001-12-07 15:38:26 +00006444; return 0; }
6445EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006446if { (eval echo configure:6447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006447 :
6448else
Michael W. Hudson54241132001-12-07 15:38:26 +00006449 echo "configure: failed program was:" >&5
6450 cat conftest.$ac_ext >&5
6451 rm -rf conftest*
6452 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006453#define BAD_EXEC_PROTOTYPES 1
6454EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006455 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006456fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006457rm -f conftest*
6458echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006459fi
6460
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006461# check if sockaddr has sa_len member
Michael W. Hudson54241132001-12-07 15:38:26 +00006462echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006463echo "configure:6464: checking if sockaddr has sa_len member" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006464cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006465#line 6466 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006466#include "confdefs.h"
6467#include <sys/types.h>
6468#include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006469int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006470struct sockaddr x;
6471x.sa_len = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006472; return 0; }
6473EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006474if { (eval echo configure:6475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006475 rm -rf conftest*
6476 echo "$ac_t""yes" 1>&6
6477 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006478#define HAVE_SOCKADDR_SA_LEN 1
6479EOF
6480
6481else
Michael W. Hudson54241132001-12-07 15:38:26 +00006482 echo "configure: failed program was:" >&5
6483 cat conftest.$ac_ext >&5
6484 rm -rf conftest*
6485 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006486fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006487rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006488
Michael W. Hudson54241132001-12-07 15:38:26 +00006489echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006490echo "configure:6491: checking for bad static forward" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006491if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
6492 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006493else
6494 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006495 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006496else
Michael W. Hudson54241132001-12-07 15:38:26 +00006497 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006498#line 6499 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006499#include "confdefs.h"
6500
6501struct s { int a; int b; };
6502static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006503int foobar() {
6504 static int random;
6505 random = (int) &foo;
6506 return random;
6507}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006508static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006509main() {
6510 exit(!((int)&foo == foobar()));
6511}
Michael W. Hudson54241132001-12-07 15:38:26 +00006512EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006513if { (eval echo configure:6514: \"$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 +00006514then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006515 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006516else
Michael W. Hudson54241132001-12-07 15:38:26 +00006517 echo "configure: failed program was:" >&5
6518 cat conftest.$ac_ext >&5
6519 rm -fr conftest*
6520 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006521fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006522rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006523fi
6524
Michael W. Hudson54241132001-12-07 15:38:26 +00006525fi
6526
6527echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006528if test "$ac_cv_bad_static_forward" = yes
6529then
Michael W. Hudson54241132001-12-07 15:38:26 +00006530 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006531#define BAD_STATIC_FORWARD 1
6532EOF
6533
6534fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006535
Guido van Rossumda88dad1995-01-26 00:46:29 +00006536va_list_is_array=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006537echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006538echo "configure:6539: checking whether va_list is an array" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006539cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006540#line 6541 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006541#include "confdefs.h"
6542
6543#ifdef HAVE_STDARG_PROTOTYPES
6544#include <stdarg.h>
6545#else
6546#include <varargs.h>
6547#endif
6548
Michael W. Hudson54241132001-12-07 15:38:26 +00006549int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006550va_list list1, list2; list1 = list2;
Michael W. Hudson54241132001-12-07 15:38:26 +00006551; return 0; }
6552EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006553if { (eval echo configure:6554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006554 :
6555else
Michael W. Hudson54241132001-12-07 15:38:26 +00006556 echo "configure: failed program was:" >&5
6557 cat conftest.$ac_ext >&5
6558 rm -rf conftest*
6559 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006560#define VA_LIST_IS_ARRAY 1
6561EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006562 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006563fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006564rm -f conftest*
6565echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006566
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006567# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Michael W. Hudson54241132001-12-07 15:38:26 +00006568echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006569echo "configure:6570: checking for gethostbyname_r" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006570if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
6571 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006572else
Michael W. Hudson54241132001-12-07 15:38:26 +00006573 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006574#line 6575 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006575#include "confdefs.h"
6576/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006577 which can conflict with char gethostbyname_r(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006578#include <assert.h>
6579/* Override any gcc2 internal prototype to avoid an error. */
6580/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006581 builtin and then its argument prototype would still apply. */
6582char gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006583
Michael W. Hudson54241132001-12-07 15:38:26 +00006584int main() {
6585
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006586/* The GNU C library defines this for functions which it implements
6587 to always fail with ENOSYS. Some functions are actually named
6588 something starting with __ and the normal name is an alias. */
6589#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6590choke me
6591#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006592gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006593#endif
6594
Michael W. Hudson54241132001-12-07 15:38:26 +00006595; return 0; }
6596EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006597if { (eval echo configure:6598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006598 rm -rf conftest*
6599 eval "ac_cv_func_gethostbyname_r=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006600else
Michael W. Hudson54241132001-12-07 15:38:26 +00006601 echo "configure: failed program was:" >&5
6602 cat conftest.$ac_ext >&5
6603 rm -rf conftest*
6604 eval "ac_cv_func_gethostbyname_r=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006605fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006606rm -f conftest*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006607fi
6608
Michael W. Hudson54241132001-12-07 15:38:26 +00006609if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6610 echo "$ac_t""yes" 1>&6
6611
6612 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006613#define HAVE_GETHOSTBYNAME_R 1
6614EOF
6615
Michael W. Hudson54241132001-12-07 15:38:26 +00006616 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006617echo "configure:6618: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006618 OLD_CFLAGS=$CFLAGS
6619 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006620 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006621#line 6622 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006622#include "confdefs.h"
6623
6624# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006625
6626int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006627
6628 char *name;
6629 struct hostent *he, *res;
6630 char buffer[2048];
6631 int buflen = 2048;
6632 int h_errnop;
6633
6634 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006635
6636; return 0; }
6637EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006638if { (eval echo configure:6639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006639 rm -rf conftest*
6640
6641 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006642#define HAVE_GETHOSTBYNAME_R 1
6643EOF
6644
Michael W. Hudson54241132001-12-07 15:38:26 +00006645 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006646#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6647EOF
6648
Michael W. Hudson54241132001-12-07 15:38:26 +00006649 echo "$ac_t""yes" 1>&6
6650
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006651else
Michael W. Hudson54241132001-12-07 15:38:26 +00006652 echo "configure: failed program was:" >&5
6653 cat conftest.$ac_ext >&5
6654 rm -rf conftest*
6655
6656 echo "$ac_t""no" 1>&6
6657 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006658echo "configure:6659: checking gethostbyname_r with 5 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006659 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006660#line 6661 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006661#include "confdefs.h"
6662
6663# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006664
6665int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006666
6667 char *name;
6668 struct hostent *he;
6669 char buffer[2048];
6670 int buflen = 2048;
6671 int h_errnop;
6672
6673 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006674
6675; return 0; }
6676EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006677if { (eval echo configure:6678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006678 rm -rf conftest*
6679
6680 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006681#define HAVE_GETHOSTBYNAME_R 1
6682EOF
6683
Michael W. Hudson54241132001-12-07 15:38:26 +00006684 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006685#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6686EOF
6687
Michael W. Hudson54241132001-12-07 15:38:26 +00006688 echo "$ac_t""yes" 1>&6
6689
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006690else
Michael W. Hudson54241132001-12-07 15:38:26 +00006691 echo "configure: failed program was:" >&5
6692 cat conftest.$ac_ext >&5
6693 rm -rf conftest*
6694
6695 echo "$ac_t""no" 1>&6
6696 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006697echo "configure:6698: checking gethostbyname_r with 3 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006698 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006699#line 6700 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006700#include "confdefs.h"
6701
6702# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006703
6704int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006705
6706 char *name;
6707 struct hostent *he;
6708 struct hostent_data data;
6709
6710 (void) gethostbyname_r(name, he, &data);
Michael W. Hudson54241132001-12-07 15:38:26 +00006711
6712; return 0; }
6713EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006714if { (eval echo configure:6715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006715 rm -rf conftest*
6716
6717 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006718#define HAVE_GETHOSTBYNAME_R 1
6719EOF
6720
Michael W. Hudson54241132001-12-07 15:38:26 +00006721 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006722#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6723EOF
6724
Michael W. Hudson54241132001-12-07 15:38:26 +00006725 echo "$ac_t""yes" 1>&6
6726
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006727else
Michael W. Hudson54241132001-12-07 15:38:26 +00006728 echo "configure: failed program was:" >&5
6729 cat conftest.$ac_ext >&5
6730 rm -rf conftest*
6731
6732 echo "$ac_t""no" 1>&6
6733
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006734fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006735rm -f conftest*
6736
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006737fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006738rm -f conftest*
6739
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006740fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006741rm -f conftest*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006742 CFLAGS=$OLD_CFLAGS
6743
6744else
Michael W. Hudson54241132001-12-07 15:38:26 +00006745 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006746
Michael W. Hudson54241132001-12-07 15:38:26 +00006747 for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +00006748do
Michael W. Hudson54241132001-12-07 15:38:26 +00006749echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006750echo "configure:6751: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006751if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6752 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006753else
Michael W. Hudson54241132001-12-07 15:38:26 +00006754 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006755#line 6756 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006756#include "confdefs.h"
6757/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006758 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006759#include <assert.h>
6760/* Override any gcc2 internal prototype to avoid an error. */
6761/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006762 builtin and then its argument prototype would still apply. */
6763char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006764
Michael W. Hudson54241132001-12-07 15:38:26 +00006765int main() {
6766
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006767/* The GNU C library defines this for functions which it implements
6768 to always fail with ENOSYS. Some functions are actually named
6769 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006770#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006771choke me
6772#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006773$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006774#endif
6775
Michael W. Hudson54241132001-12-07 15:38:26 +00006776; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006777EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006778if { (eval echo configure:6779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006779 rm -rf conftest*
6780 eval "ac_cv_func_$ac_func=yes"
6781else
6782 echo "configure: failed program was:" >&5
6783 cat conftest.$ac_ext >&5
6784 rm -rf conftest*
6785 eval "ac_cv_func_$ac_func=no"
6786fi
6787rm -f conftest*
6788fi
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006789
Michael W. Hudson54241132001-12-07 15:38:26 +00006790if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6791 echo "$ac_t""yes" 1>&6
6792 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6793 cat >> confdefs.h <<EOF
6794#define $ac_tr_func 1
6795EOF
6796
6797else
6798 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006799fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006800done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006801
Michael W. Hudson54241132001-12-07 15:38:26 +00006802
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006803fi
6804
Michael W. Hudson54241132001-12-07 15:38:26 +00006805
6806
6807
6808
6809
6810
Guido van Rossum627b2d71993-12-24 10:39:16 +00006811# checks for system services
6812# (none yet)
6813
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006814# Linux requires this for correct f.p. operations
Michael W. Hudson54241132001-12-07 15:38:26 +00006815echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006816echo "configure:6817: checking for __fpu_control" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006817if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
6818 echo $ac_n "(cached) $ac_c" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006819else
Michael W. Hudson54241132001-12-07 15:38:26 +00006820 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006821#line 6822 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006822#include "confdefs.h"
6823/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006824 which can conflict with char __fpu_control(); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006825#include <assert.h>
6826/* Override any gcc2 internal prototype to avoid an error. */
6827/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006828 builtin and then its argument prototype would still apply. */
6829char __fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006830
Michael W. Hudson54241132001-12-07 15:38:26 +00006831int main() {
6832
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006833/* The GNU C library defines this for functions which it implements
6834 to always fail with ENOSYS. Some functions are actually named
6835 something starting with __ and the normal name is an alias. */
6836#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6837choke me
6838#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006839__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006840#endif
6841
Michael W. Hudson54241132001-12-07 15:38:26 +00006842; return 0; }
6843EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006844if { (eval echo configure:6845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006845 rm -rf conftest*
6846 eval "ac_cv_func___fpu_control=yes"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006847else
Michael W. Hudson54241132001-12-07 15:38:26 +00006848 echo "configure: failed program was:" >&5
6849 cat conftest.$ac_ext >&5
6850 rm -rf conftest*
6851 eval "ac_cv_func___fpu_control=no"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006852fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006853rm -f conftest*
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006854fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006855
6856if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6857 echo "$ac_t""yes" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006858 :
6859else
Michael W. Hudson54241132001-12-07 15:38:26 +00006860 echo "$ac_t""no" 1>&6
6861echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006862echo "configure:6863: checking for __fpu_control in -lieee" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006863ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
6864if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6865 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006866else
Michael W. Hudson54241132001-12-07 15:38:26 +00006867 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006868LIBS="-lieee $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006869cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006870#line 6871 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006871#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006872/* Override any gcc2 internal prototype to avoid an error. */
6873/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006874 builtin and then its argument prototype would still apply. */
6875char __fpu_control();
6876
6877int main() {
6878__fpu_control()
6879; return 0; }
6880EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006881if { (eval echo configure:6882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006882 rm -rf conftest*
6883 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006884else
Michael W. Hudson54241132001-12-07 15:38:26 +00006885 echo "configure: failed program was:" >&5
6886 cat conftest.$ac_ext >&5
6887 rm -rf conftest*
6888 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006889fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006890rm -f conftest*
6891LIBS="$ac_save_LIBS"
6892
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006893fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006894if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6895 echo "$ac_t""yes" 1>&6
6896 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6897 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6898 cat >> confdefs.h <<EOF
6899#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006900EOF
6901
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006902 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006903
Michael W. Hudson54241132001-12-07 15:38:26 +00006904else
6905 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006906fi
6907
Michael W. Hudson54241132001-12-07 15:38:26 +00006908
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006909fi
6910
Michael W. Hudson54241132001-12-07 15:38:26 +00006911
Guido van Rossum7f253911997-05-09 02:42:48 +00006912# Check for --with-fpectl
Michael W. Hudson54241132001-12-07 15:38:26 +00006913echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006914echo "configure:6915: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006915# Check whether --with-fpectl or --without-fpectl was given.
6916if test "${with_fpectl+set}" = set; then
6917 withval="$with_fpectl"
Michael W. Hudson54241132001-12-07 15:38:26 +00006918
Guido van Rossum7f253911997-05-09 02:42:48 +00006919if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00006920then cat >> confdefs.h <<\EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00006921#define WANT_SIGFPE_HANDLER 1
6922EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00006923 echo "$ac_t""yes" 1>&6
6924else echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006925fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006926else
Michael W. Hudson54241132001-12-07 15:38:26 +00006927 echo "$ac_t""no" 1>&6
6928fi
6929
Guido van Rossum7f253911997-05-09 02:42:48 +00006930
Guido van Rossum7f43da71994-08-01 12:15:30 +00006931# check for --with-libm=...
6932
Guido van Rossum563e7081996-09-10 18:20:48 +00006933case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006934Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006935BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006936*) LIBM=-lm
6937esac
Michael W. Hudson54241132001-12-07 15:38:26 +00006938echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006939echo "configure:6940: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006940# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006941if test "${with_libm+set}" = set; then
6942 withval="$with_libm"
Michael W. Hudson54241132001-12-07 15:38:26 +00006943
Guido van Rossum7f253911997-05-09 02:42:48 +00006944if test "$withval" = no
6945then LIBM=
Michael W. Hudson54241132001-12-07 15:38:26 +00006946 echo "$ac_t""force LIBM empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006947elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006948then LIBM=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00006949 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
6950else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006951fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006952else
Michael W. Hudson54241132001-12-07 15:38:26 +00006953 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
6954fi
6955
Guido van Rossum7f43da71994-08-01 12:15:30 +00006956
6957# check for --with-libc=...
6958
Michael W. Hudson54241132001-12-07 15:38:26 +00006959echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006960echo "configure:6961: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006961# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006962if test "${with_libc+set}" = set; then
6963 withval="$with_libc"
Michael W. Hudson54241132001-12-07 15:38:26 +00006964
Guido van Rossum7f253911997-05-09 02:42:48 +00006965if test "$withval" = no
6966then LIBC=
Michael W. Hudson54241132001-12-07 15:38:26 +00006967 echo "$ac_t""force LIBC empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006968elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006969then LIBC=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00006970 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
6971else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006972fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006973else
Michael W. Hudson54241132001-12-07 15:38:26 +00006974 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
6975fi
6976
Guido van Rossum7f43da71994-08-01 12:15:30 +00006977
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006978# check for hypot() in math library
6979LIBS_SAVE=$LIBS
6980LIBS="$LIBS $LIBM"
6981for ac_func in hypot
6982do
Michael W. Hudson54241132001-12-07 15:38:26 +00006983echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00006984echo "configure:6985: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006985if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6986 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006987else
Michael W. Hudson54241132001-12-07 15:38:26 +00006988 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00006989#line 6990 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006990#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006991/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006992 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006993#include <assert.h>
6994/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006995/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006996 builtin and then its argument prototype would still apply. */
6997char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006998
Michael W. Hudson54241132001-12-07 15:38:26 +00006999int main() {
7000
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00007001/* The GNU C library defines this for functions which it implements
7002 to always fail with ENOSYS. Some functions are actually named
7003 something starting with __ and the normal name is an alias. */
7004#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7005choke me
7006#else
Michael W. Hudson54241132001-12-07 15:38:26 +00007007$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00007008#endif
7009
Michael W. Hudson54241132001-12-07 15:38:26 +00007010; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00007011EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007012if { (eval echo configure:7013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007013 rm -rf conftest*
7014 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00007015else
Michael W. Hudson54241132001-12-07 15:38:26 +00007016 echo "configure: failed program was:" >&5
7017 cat conftest.$ac_ext >&5
7018 rm -rf conftest*
7019 eval "ac_cv_func_$ac_func=no"
7020fi
7021rm -f conftest*
7022fi
7023
7024if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7025 echo "$ac_t""yes" 1>&6
7026 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7027 cat >> confdefs.h <<EOF
7028#define $ac_tr_func 1
7029EOF
7030
7031else
7032 echo "$ac_t""no" 1>&6
7033LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00007034fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00007035done
7036
Michael W. Hudson54241132001-12-07 15:38:26 +00007037
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00007038LIBS=$LIBS_SAVE
7039
Guido van Rossumad713701997-07-10 22:42:38 +00007040# check whether malloc(0) returns NULL or not
Michael W. Hudson54241132001-12-07 15:38:26 +00007041echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00007042echo "configure:7043: checking what malloc(0) returns" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007043if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
7044 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00007045else
7046 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007047 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +00007048else
Michael W. Hudson54241132001-12-07 15:38:26 +00007049 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007050#line 7051 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00007051#include "confdefs.h"
7052#include <stdio.h>
7053#ifdef HAVE_STDLIB
7054#include <stdlib.h>
7055#else
7056char *malloc(), *realloc();
7057int *free();
7058#endif
7059main() {
7060 char *p;
7061 p = malloc(0);
7062 if (p == NULL) exit(1);
7063 p = realloc(p, 0);
7064 if (p == NULL) exit(1);
7065 free(p);
7066 exit(0);
7067}
Michael W. Hudson54241132001-12-07 15:38:26 +00007068EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007069if { (eval echo configure:7070: \"$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 +00007070then
Guido van Rossumad713701997-07-10 22:42:38 +00007071 ac_cv_malloc_zero=nonnull
7072else
Michael W. Hudson54241132001-12-07 15:38:26 +00007073 echo "configure: failed program was:" >&5
7074 cat conftest.$ac_ext >&5
7075 rm -fr conftest*
7076 ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +00007077fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007078rm -fr conftest*
Guido van Rossumad713701997-07-10 22:42:38 +00007079fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007080
Guido van Rossumad713701997-07-10 22:42:38 +00007081fi
Guido van Rossum3065c942001-09-17 04:03:14 +00007082 # XXX arm cross-compile?
Michael W. Hudson54241132001-12-07 15:38:26 +00007083echo "$ac_t""$ac_cv_malloc_zero" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00007084if test "$ac_cv_malloc_zero" = null
7085then
Michael W. Hudson54241132001-12-07 15:38:26 +00007086 cat >> confdefs.h <<\EOF
Guido van Rossumad713701997-07-10 22:42:38 +00007087#define MALLOC_ZERO_RETURNS_NULL 1
7088EOF
7089
7090fi
7091
Guido van Rossumef2255b2000-03-10 22:30:29 +00007092# check for wchar.h
Michael W. Hudson54241132001-12-07 15:38:26 +00007093ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
7094echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00007095echo "configure:7096: checking for wchar.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007096if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7097 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00007098else
Michael W. Hudson54241132001-12-07 15:38:26 +00007099 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007100#line 7101 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007101#include "confdefs.h"
7102#include <wchar.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007103EOF
7104ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis1142de32002-03-29 16:28:31 +00007105{ (eval echo configure:7106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007106ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7107if test -z "$ac_err"; then
7108 rm -rf conftest*
7109 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007110else
Michael W. Hudson54241132001-12-07 15:38:26 +00007111 echo "$ac_err" >&5
7112 echo "configure: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007113 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007114 rm -rf conftest*
7115 eval "ac_cv_header_$ac_safe=no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007116fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007117rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007118fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007119if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7120 echo "$ac_t""yes" 1>&6
7121 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007122#define HAVE_WCHAR_H 1
7123EOF
7124 wchar_h="yes"
7125else
Michael W. Hudson54241132001-12-07 15:38:26 +00007126 echo "$ac_t""no" 1>&6
7127wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007128
7129fi
7130
Michael W. Hudson54241132001-12-07 15:38:26 +00007131
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007132# determine wchar_t size
7133if test "$wchar_h" = yes
7134then
Michael W. Hudson54241132001-12-07 15:38:26 +00007135 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00007136echo "configure:7137: checking size of wchar_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007137if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
7138 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007139else
7140 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007141 ac_cv_sizeof_wchar_t=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00007142else
Michael W. Hudson54241132001-12-07 15:38:26 +00007143 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007144#line 7145 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007145#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007146#include <stdio.h>
7147main()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007148{
Michael W. Hudson54241132001-12-07 15:38:26 +00007149 FILE *f=fopen("conftestval", "w");
7150 if (!f) exit(1);
7151 fprintf(f, "%d\n", sizeof(wchar_t));
7152 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00007153}
Michael W. Hudson54241132001-12-07 15:38:26 +00007154EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007155if { (eval echo configure:7156: \"$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 +00007156then
7157 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007158else
Michael W. Hudson54241132001-12-07 15:38:26 +00007159 echo "configure: failed program was:" >&5
7160 cat conftest.$ac_ext >&5
7161 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007162 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00007163fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007164rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007165fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007166
7167fi
7168echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
7169cat >> confdefs.h <<EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007170#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
7171EOF
7172
Michael W. Hudson54241132001-12-07 15:38:26 +00007173
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007174fi
7175
Michael W. Hudson54241132001-12-07 15:38:26 +00007176echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00007177echo "configure:7178: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007178# Check whether --enable-unicode or --disable-unicode was given.
7179if test "${enable_unicode+set}" = set; then
7180 enableval="$enable_unicode"
Michael W. Hudson54241132001-12-07 15:38:26 +00007181 :
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007182else
7183 enable_unicode=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00007184fi
7185
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007186
7187if test $enable_unicode = yes
7188then
Martin v. Löwisfd917792001-06-27 20:22:04 +00007189 # Without any arguments, Py_UNICODE defaults to two-byte mode
7190 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007191fi
7192
7193case "$enable_unicode" in
7194ucs2) unicode_size="2"
Michael W. Hudson54241132001-12-07 15:38:26 +00007195 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007196#define Py_UNICODE_SIZE 2
7197EOF
7198
7199 ;;
7200ucs4) unicode_size="4"
Michael W. Hudson54241132001-12-07 15:38:26 +00007201 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007202#define Py_UNICODE_SIZE 4
7203EOF
7204
7205 ;;
7206esac
7207
Michael W. Hudson54241132001-12-07 15:38:26 +00007208
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007209if test "$enable_unicode" = "no"
7210then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007211 UNICODE_OBJS=""
Michael W. Hudson54241132001-12-07 15:38:26 +00007212 echo "$ac_t""not used" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007213else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007214 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Michael W. Hudson54241132001-12-07 15:38:26 +00007215 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007216#define Py_USING_UNICODE 1
7217EOF
7218
7219 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
7220 then
7221 PY_UNICODE_TYPE="wchar_t"
Michael W. Hudson54241132001-12-07 15:38:26 +00007222 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007223#define HAVE_USABLE_WCHAR_T 1
7224EOF
7225
Michael W. Hudson54241132001-12-07 15:38:26 +00007226 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007227#define PY_UNICODE_TYPE wchar_t
7228EOF
7229
7230 elif test "$ac_cv_sizeof_short" = "$unicode_size"
7231 then
7232 PY_UNICODE_TYPE="unsigned short"
Michael W. Hudson54241132001-12-07 15:38:26 +00007233 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007234#define PY_UNICODE_TYPE unsigned short
7235EOF
7236
7237 elif test "$ac_cv_sizeof_long" = "$unicode_size"
7238 then
7239 PY_UNICODE_TYPE="unsigned long"
Michael W. Hudson54241132001-12-07 15:38:26 +00007240 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007241#define PY_UNICODE_TYPE unsigned long
7242EOF
7243
7244 else
7245 PY_UNICODE_TYPE="no type found"
7246 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007247 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007248fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007249
7250# check for endianness
Michael W. Hudson54241132001-12-07 15:38:26 +00007251echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00007252echo "configure:7253: checking whether byte ordering is bigendian" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007253if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
7254 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00007255else
7256 ac_cv_c_bigendian=unknown
7257# See if sys/param.h defines the BYTE_ORDER macro.
Michael W. Hudson54241132001-12-07 15:38:26 +00007258cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007259#line 7260 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007260#include "confdefs.h"
7261#include <sys/types.h>
7262#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007263int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007264
7265#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
7266 bogus endian macros
7267#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007268; return 0; }
7269EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007270if { (eval echo configure:7271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007271 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007272 # It does; now see whether it defined to BIG_ENDIAN or not.
Michael W. Hudson54241132001-12-07 15:38:26 +00007273cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007274#line 7275 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007275#include "confdefs.h"
7276#include <sys/types.h>
7277#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007278int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007279
7280#if BYTE_ORDER != BIG_ENDIAN
7281 not big endian
7282#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007283; return 0; }
7284EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007285if { (eval echo configure:7286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007286 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007287 ac_cv_c_bigendian=yes
7288else
Michael W. Hudson54241132001-12-07 15:38:26 +00007289 echo "configure: failed program was:" >&5
7290 cat conftest.$ac_ext >&5
7291 rm -rf conftest*
7292 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +00007293fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007294rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007295else
Michael W. Hudson54241132001-12-07 15:38:26 +00007296 echo "configure: failed program was:" >&5
7297 cat conftest.$ac_ext >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007298fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007299rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007300if test $ac_cv_c_bigendian = unknown; then
7301if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007302 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007303else
Michael W. Hudson54241132001-12-07 15:38:26 +00007304 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007305#line 7306 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007306#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007307main () {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007308 /* Are we little or big endian? From Harbison&Steele. */
7309 union
7310 {
7311 long l;
7312 char c[sizeof (long)];
7313 } u;
7314 u.l = 1;
7315 exit (u.c[sizeof (long) - 1] == 1);
7316}
Michael W. Hudson54241132001-12-07 15:38:26 +00007317EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007318if { (eval echo configure:7319: \"$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 +00007319then
Guido van Rossumef2255b2000-03-10 22:30:29 +00007320 ac_cv_c_bigendian=no
7321else
Michael W. Hudson54241132001-12-07 15:38:26 +00007322 echo "configure: failed program was:" >&5
7323 cat conftest.$ac_ext >&5
7324 rm -fr conftest*
7325 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +00007326fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007327rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007328fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007329
Michael W. Hudson54241132001-12-07 15:38:26 +00007330fi
7331fi
7332
7333echo "$ac_t""$ac_cv_c_bigendian" 1>&6
7334if test $ac_cv_c_bigendian = yes; then
7335 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007336#define WORDS_BIGENDIAN 1
7337EOF
7338
7339fi
7340
Michael W. Hudson54241132001-12-07 15:38:26 +00007341
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007342# Check whether right shifting a negative integer extends the sign bit
7343# or fills with zeros (like the Cray J90, according to Tim Peters).
Michael W. Hudson54241132001-12-07 15:38:26 +00007344echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00007345echo "configure:7346: checking whether right shift extends the sign bit" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007346if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
7347 echo $ac_n "(cached) $ac_c" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007348else
Michael W. Hudson54241132001-12-07 15:38:26 +00007349
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007350if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007351 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007352else
Michael W. Hudson54241132001-12-07 15:38:26 +00007353 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007354#line 7355 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007355#include "confdefs.h"
7356
7357int main()
7358{
Vladimir Marangozova6180282000-07-12 05:05:06 +00007359 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007360}
7361
Michael W. Hudson54241132001-12-07 15:38:26 +00007362EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007363if { (eval echo configure:7364: \"$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 +00007364then
Vladimir Marangozova6180282000-07-12 05:05:06 +00007365 ac_cv_rshift_extends_sign=yes
7366else
Michael W. Hudson54241132001-12-07 15:38:26 +00007367 echo "configure: failed program was:" >&5
7368 cat conftest.$ac_ext >&5
7369 rm -fr conftest*
7370 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +00007371fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007372rm -fr conftest*
Vladimir Marangozova6180282000-07-12 05:05:06 +00007373fi
7374
Michael W. Hudson54241132001-12-07 15:38:26 +00007375fi
7376
7377echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007378if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007379then
Michael W. Hudson54241132001-12-07 15:38:26 +00007380 cat >> confdefs.h <<\EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007381#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
7382EOF
7383
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007384fi
7385
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007386# check for getc_unlocked and related locking functions
Michael W. Hudson54241132001-12-07 15:38:26 +00007387echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00007388echo "configure:7389: checking for getc_unlocked() and friends" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007389if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
7390 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007391else
Michael W. Hudson54241132001-12-07 15:38:26 +00007392
7393cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007394#line 7395 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007395#include "confdefs.h"
7396#include <stdio.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007397int main() {
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007398
7399 FILE *f = fopen("/dev/null", "r");
7400 flockfile(f);
7401 getc_unlocked(f);
7402 funlockfile(f);
7403
Michael W. Hudson54241132001-12-07 15:38:26 +00007404; return 0; }
7405EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007406if { (eval echo configure:7407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007407 rm -rf conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007408 ac_cv_have_getc_unlocked=yes
7409else
Michael W. Hudson54241132001-12-07 15:38:26 +00007410 echo "configure: failed program was:" >&5
7411 cat conftest.$ac_ext >&5
7412 rm -rf conftest*
7413 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007414fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007415rm -f conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007416fi
7417
Michael W. Hudson54241132001-12-07 15:38:26 +00007418echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007419if test "$ac_cv_have_getc_unlocked" = yes
7420then
Michael W. Hudson54241132001-12-07 15:38:26 +00007421 cat >> confdefs.h <<\EOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007422#define HAVE_GETC_UNLOCKED 1
7423EOF
7424
7425fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007426
Martin v. Löwis0daad592001-09-30 21:09:59 +00007427# check for readline 4.0
Michael W. Hudson54241132001-12-07 15:38:26 +00007428echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00007429echo "configure:7430: checking for rl_pre_input_hook in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007430ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'`
7431if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7432 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007433else
Michael W. Hudson54241132001-12-07 15:38:26 +00007434 ac_save_LIBS="$LIBS"
Guido van Rossum353ae582001-07-10 16:45:32 +00007435LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007436cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007437#line 7438 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00007438#include "confdefs.h"
7439/* Override any gcc2 internal prototype to avoid an error. */
7440/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007441 builtin and then its argument prototype would still apply. */
7442char rl_pre_input_hook();
7443
7444int main() {
7445rl_pre_input_hook()
7446; return 0; }
7447EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007448if { (eval echo configure:7449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007449 rm -rf conftest*
7450 eval "ac_cv_lib_$ac_lib_var=yes"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007451else
Michael W. Hudson54241132001-12-07 15:38:26 +00007452 echo "configure: failed program was:" >&5
7453 cat conftest.$ac_ext >&5
7454 rm -rf conftest*
7455 eval "ac_cv_lib_$ac_lib_var=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007456fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007457rm -f conftest*
7458LIBS="$ac_save_LIBS"
7459
Martin v. Löwis0daad592001-09-30 21:09:59 +00007460fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007461if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7462 echo "$ac_t""yes" 1>&6
7463 cat >> confdefs.h <<\EOF
Martin v. Löwis0daad592001-09-30 21:09:59 +00007464#define HAVE_RL_PRE_INPUT_HOOK 1
7465EOF
7466
Michael W. Hudson54241132001-12-07 15:38:26 +00007467else
7468 echo "$ac_t""no" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007469fi
7470
Michael W. Hudson54241132001-12-07 15:38:26 +00007471
Martin v. Löwis0daad592001-09-30 21:09:59 +00007472# check for readline 4.2
Michael W. Hudson54241132001-12-07 15:38:26 +00007473echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00007474echo "configure:7475: checking for rl_completion_matches in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007475ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
7476if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7477 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007478else
Michael W. Hudson54241132001-12-07 15:38:26 +00007479 ac_save_LIBS="$LIBS"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007480LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007481cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007482#line 7483 "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007483#include "confdefs.h"
7484/* Override any gcc2 internal prototype to avoid an error. */
7485/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007486 builtin and then its argument prototype would still apply. */
7487char rl_completion_matches();
7488
7489int main() {
7490rl_completion_matches()
7491; return 0; }
7492EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007493if { (eval echo configure:7494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007494 rm -rf conftest*
7495 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum353ae582001-07-10 16:45:32 +00007496else
Michael W. Hudson54241132001-12-07 15:38:26 +00007497 echo "configure: failed program was:" >&5
7498 cat conftest.$ac_ext >&5
7499 rm -rf conftest*
7500 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum353ae582001-07-10 16:45:32 +00007501fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007502rm -f conftest*
7503LIBS="$ac_save_LIBS"
7504
Guido van Rossum353ae582001-07-10 16:45:32 +00007505fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007506if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7507 echo "$ac_t""yes" 1>&6
7508 cat >> confdefs.h <<\EOF
Guido van Rossum353ae582001-07-10 16:45:32 +00007509#define HAVE_RL_COMPLETION_MATCHES 1
7510EOF
7511
Michael W. Hudson54241132001-12-07 15:38:26 +00007512else
7513 echo "$ac_t""no" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007514fi
7515
Jack Jansendd19cf82001-12-06 22:36:17 +00007516
Michael W. Hudson54241132001-12-07 15:38:26 +00007517echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00007518echo "configure:7519: checking for broken nice()" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007519if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
7520 echo $ac_n "(cached) $ac_c" 1>&6
7521else
7522
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007523if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007524 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007525else
Michael W. Hudson54241132001-12-07 15:38:26 +00007526 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007527#line 7528 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007528#include "confdefs.h"
7529
7530int main()
7531{
7532 int val1 = nice(1);
7533 if (val1 != -1 && val1 == nice(2))
7534 exit(0);
7535 exit(1);
7536}
7537
Michael W. Hudson54241132001-12-07 15:38:26 +00007538EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007539if { (eval echo configure:7540: \"$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 +00007540then
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007541 ac_cv_broken_nice=yes
7542else
Michael W. Hudson54241132001-12-07 15:38:26 +00007543 echo "configure: failed program was:" >&5
7544 cat conftest.$ac_ext >&5
7545 rm -fr conftest*
7546 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007547fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007548rm -fr conftest*
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007549fi
7550
Michael W. Hudson54241132001-12-07 15:38:26 +00007551fi
7552
7553echo "$ac_t""$ac_cv_broken_nice" 1>&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007554if test "$ac_cv_broken_nice" = yes
7555then
Michael W. Hudson54241132001-12-07 15:38:26 +00007556 cat >> confdefs.h <<\EOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007557#define HAVE_BROKEN_NICE 1
7558EOF
7559
7560fi
7561
Jack Jansen666b1e72001-10-31 12:11:48 +00007562# On HP/UX 11.0, mvwdelch is a block with a return statement
Michael W. Hudson54241132001-12-07 15:38:26 +00007563echo $ac_n "checking whether mvwdelch is an expression""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00007564echo "configure:7565: checking whether mvwdelch is an expression" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007565if eval "test \"`echo '$''{'ac_cv_mvwdelch_is_expression'+set}'`\" = set"; then
7566 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007567else
Michael W. Hudson54241132001-12-07 15:38:26 +00007568 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007569#line 7570 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007570#include "confdefs.h"
7571#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007572int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007573
7574 int rtn;
7575 rtn = mvwdelch(0,0,0);
7576
Michael W. Hudson54241132001-12-07 15:38:26 +00007577; return 0; }
7578EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007579if { (eval echo configure:7580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007580 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007581 ac_cv_mvwdelch_is_expression=yes
7582else
Michael W. Hudson54241132001-12-07 15:38:26 +00007583 echo "configure: failed program was:" >&5
7584 cat conftest.$ac_ext >&5
7585 rm -rf conftest*
7586 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007587fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007588rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007589fi
7590
Michael W. Hudson54241132001-12-07 15:38:26 +00007591echo "$ac_t""$ac_cv_mvwdelch_is_expression" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007592
7593if test "$ac_cv_mvwdelch_is_expression" = yes
7594then
Michael W. Hudson54241132001-12-07 15:38:26 +00007595 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007596#define MVWDELCH_IS_EXPRESSION 1
7597EOF
7598
7599fi
7600
Michael W. Hudson54241132001-12-07 15:38:26 +00007601echo $ac_n "checking whether WINDOW has _flags""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00007602echo "configure:7603: checking whether WINDOW has _flags" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007603if eval "test \"`echo '$''{'ac_cv_window_has_flags'+set}'`\" = set"; then
7604 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007605else
Michael W. Hudson54241132001-12-07 15:38:26 +00007606 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007607#line 7608 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007608#include "confdefs.h"
7609#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007610int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007611
7612 WINDOW *w;
7613 w->_flags = 0;
7614
Michael W. Hudson54241132001-12-07 15:38:26 +00007615; return 0; }
7616EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007617if { (eval echo configure:7618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007618 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007619 ac_cv_window_has_flags=yes
7620else
Michael W. Hudson54241132001-12-07 15:38:26 +00007621 echo "configure: failed program was:" >&5
7622 cat conftest.$ac_ext >&5
7623 rm -rf conftest*
7624 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007625fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007626rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007627fi
7628
Michael W. Hudson54241132001-12-07 15:38:26 +00007629echo "$ac_t""$ac_cv_window_has_flags" 1>&6
7630
Jack Jansen666b1e72001-10-31 12:11:48 +00007631
7632if test "$ac_cv_window_has_flags" = yes
7633then
Michael W. Hudson54241132001-12-07 15:38:26 +00007634 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007635#define WINDOW_HAS_FLAGS 1
7636EOF
7637
7638fi
7639
Guido van Rossum95713eb2000-05-18 20:53:31 +00007640# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7641# Add sys/socket.h to confdefs.h
7642cat >> confdefs.h <<\EOF
7643#ifdef HAVE_SYS_SOCKET_H
7644#include <sys/socket.h>
7645#endif
7646EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007647echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00007648echo "configure:7649: checking for socklen_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007649if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
7650 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum95713eb2000-05-18 20:53:31 +00007651else
Michael W. Hudson54241132001-12-07 15:38:26 +00007652 cat > conftest.$ac_ext <<EOF
Martin v. Löwis1142de32002-03-29 16:28:31 +00007653#line 7654 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007654#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007655#include <sys/types.h>
7656#if STDC_HEADERS
7657#include <stdlib.h>
7658#include <stddef.h>
7659#endif
7660EOF
7661if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7662 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7663 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007664 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007665else
Michael W. Hudson54241132001-12-07 15:38:26 +00007666 rm -rf conftest*
7667 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007668fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007669rm -f conftest*
Guido van Rossum95713eb2000-05-18 20:53:31 +00007670
Michael W. Hudson54241132001-12-07 15:38:26 +00007671fi
7672echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7673if test $ac_cv_type_socklen_t = no; then
7674 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007675#define socklen_t int
7676EOF
7677
7678fi
7679
Michael W. Hudson54241132001-12-07 15:38:26 +00007680
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007681# Add Python/ prefix to LIBOBJS
7682libobjs=$LIBOBJS
7683LIBOBJS=
7684for obj in $libobjs; do
7685 LIBOBJS="$LIBOBJS Python/$obj"
7686done
7687
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007688#AC_MSG_CHECKING(for Modules/Setup)
7689#if test ! -f Modules/Setup ; then
7690# if test ! -d Modules ; then
7691# mkdir Modules
7692# fi
7693# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7694# AC_MSG_RESULT(creating)
7695#else
7696# AC_MSG_RESULT(already exists)
7697#fi
7698
Michael W. Hudson54241132001-12-07 15:38:26 +00007699
7700
Martin v. Löwis06f15bb2001-12-02 13:02:32 +00007701for h in `(cd $srcdir;echo Python/thread_*.h)`
7702do
7703 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
7704done
7705
Michael W. Hudson54241132001-12-07 15:38:26 +00007706
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007707SRCDIRS="Parser Grammar Objects Python Modules"
Michael W. Hudson54241132001-12-07 15:38:26 +00007708echo $ac_n "checking for build directories""... $ac_c" 1>&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00007709echo "configure:7710: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007710for dir in $SRCDIRS; do
7711 if test ! -d $dir; then
7712 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007713 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007714done
Michael W. Hudson54241132001-12-07 15:38:26 +00007715echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007716
Guido van Rossum627b2d71993-12-24 10:39:16 +00007717# generate output files
Michael W. Hudson54241132001-12-07 15:38:26 +00007718trap '' 1 2 15
7719cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007720# This file is a shell script that caches the results of configure
7721# tests run on this system so they can be shared between configure
Michael W. Hudson54241132001-12-07 15:38:26 +00007722# scripts and configure runs. It is not useful on other systems.
7723# If it contains results you don't want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007724#
Michael W. Hudson54241132001-12-07 15:38:26 +00007725# By default, configure uses ./config.cache as the cache file,
7726# creating it if it does not exist already. You can give configure
7727# the --cache-file=FILE option to use a different cache file; that is
7728# what configure does when it calls configure scripts in
7729# subdirectories, so they share the cache.
7730# Giving --cache-file=/dev/null disables caching, for debugging configure.
7731# config.status only pays attention to the cache file if you give it the
7732# --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007733#
Michael W. Hudson54241132001-12-07 15:38:26 +00007734EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007735# The following way of writing the cache mishandles newlines in values,
7736# but we know of no workaround that is simple, portable, and efficient.
7737# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007738# Ultrix sh set writes to stderr and can't be redirected directly,
7739# and sets the high bit in the cache file unless we assign to the vars.
Michael W. Hudson54241132001-12-07 15:38:26 +00007740(set) 2>&1 |
7741 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7742 *ac_space=\ *)
7743 # `set' does not quote correctly, so add quotes (double-quote substitution
7744 # turns \\\\ into \\, and sed turns \\ into \).
7745 sed -n \
7746 -e "s/'/'\\\\''/g" \
7747 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7748 ;;
7749 *)
7750 # `set' quotes correctly as required by POSIX, so do not add quotes.
7751 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7752 ;;
7753 esac >> confcache
7754if cmp -s $cache_file confcache; then
7755 :
7756else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007757 if test -w $cache_file; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007758 echo "updating cache $cache_file"
7759 cat confcache > $cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007760 else
7761 echo "not updating unwritable cache $cache_file"
7762 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007763fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007764rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007765
Michael W. Hudson54241132001-12-07 15:38:26 +00007766trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7767
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007768test "x$prefix" = xNONE && prefix=$ac_default_prefix
7769# Let make expand exec_prefix.
7770test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007771
Michael W. Hudson54241132001-12-07 15:38:26 +00007772# Any assignment to VPATH causes Sun make to only execute
7773# the first set of double-colon rules, so remove it if not needed.
7774# If there is a colon in the path, we need to keep it.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007775if test "x$srcdir" = x.; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007776 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007777fi
7778
Michael W. Hudson54241132001-12-07 15:38:26 +00007779trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7780
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007781DEFS=-DHAVE_CONFIG_H
7782
Michael W. Hudson54241132001-12-07 15:38:26 +00007783# Without the "./", some shells look in PATH for config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007784: ${CONFIG_STATUS=./config.status}
Michael W. Hudson54241132001-12-07 15:38:26 +00007785
7786echo creating $CONFIG_STATUS
7787rm -f $CONFIG_STATUS
7788cat > $CONFIG_STATUS <<EOF
7789#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007790# Generated automatically by configure.
7791# Run this file to recreate the current configuration.
Michael W. Hudson54241132001-12-07 15:38:26 +00007792# This directory was configured as follows,
7793# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7794#
7795# $0 $ac_configure_args
7796#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007797# Compiler output produced by configure, useful for debugging
Michael W. Hudson54241132001-12-07 15:38:26 +00007798# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007799
Michael W. Hudson54241132001-12-07 15:38:26 +00007800ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7801for ac_option
Jack Jansendd19cf82001-12-06 22:36:17 +00007802do
Michael W. Hudson54241132001-12-07 15:38:26 +00007803 case "\$ac_option" in
Jack Jansendd19cf82001-12-06 22:36:17 +00007804 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Michael W. Hudson54241132001-12-07 15:38:26 +00007805 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7806 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7807 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7808 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7809 exit 0 ;;
7810 -help | --help | --hel | --he | --h)
7811 echo "\$ac_cs_usage"; exit 0 ;;
7812 *) echo "\$ac_cs_usage"; exit 1 ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007813 esac
7814done
7815
Michael W. Hudson54241132001-12-07 15:38:26 +00007816ac_given_srcdir=$srcdir
7817ac_given_INSTALL="$INSTALL"
Jack Jansendd19cf82001-12-06 22:36:17 +00007818
Michael W. Hudson54241132001-12-07 15:38:26 +00007819trap '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 +00007820EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007821cat >> $CONFIG_STATUS <<EOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007822
Michael W. Hudson54241132001-12-07 15:38:26 +00007823# Protect against being on the right side of a sed subst in config.status.
7824sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7825 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7826$ac_vpsub
7827$extrasub
7828s%@SHELL@%$SHELL%g
7829s%@CFLAGS@%$CFLAGS%g
7830s%@CPPFLAGS@%$CPPFLAGS%g
7831s%@CXXFLAGS@%$CXXFLAGS%g
7832s%@FFLAGS@%$FFLAGS%g
7833s%@DEFS@%$DEFS%g
7834s%@LDFLAGS@%$LDFLAGS%g
7835s%@LIBS@%$LIBS%g
7836s%@exec_prefix@%$exec_prefix%g
7837s%@prefix@%$prefix%g
7838s%@program_transform_name@%$program_transform_name%g
7839s%@bindir@%$bindir%g
7840s%@sbindir@%$sbindir%g
7841s%@libexecdir@%$libexecdir%g
7842s%@datadir@%$datadir%g
7843s%@sysconfdir@%$sysconfdir%g
7844s%@sharedstatedir@%$sharedstatedir%g
7845s%@localstatedir@%$localstatedir%g
7846s%@libdir@%$libdir%g
7847s%@includedir@%$includedir%g
7848s%@oldincludedir@%$oldincludedir%g
7849s%@infodir@%$infodir%g
7850s%@mandir@%$mandir%g
7851s%@VERSION@%$VERSION%g
Martin v. Löwis1142de32002-03-29 16:28:31 +00007852s%@SOVERSION@%$SOVERSION%g
Michael W. Hudson54241132001-12-07 15:38:26 +00007853s%@CONFIG_ARGS@%$CONFIG_ARGS%g
7854s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7855s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7856s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7857s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
7858s%@MACHDEP@%$MACHDEP%g
7859s%@SGI_ABI@%$SGI_ABI%g
7860s%@CXX@%$CXX%g
7861s%@MAINOBJ@%$MAINOBJ%g
7862s%@CC@%$CC%g
7863s%@CPP@%$CPP%g
7864s%@EXEEXT@%$EXEEXT%g
7865s%@BUILDEXEEXT@%$BUILDEXEEXT%g
7866s%@LIBRARY@%$LIBRARY%g
7867s%@LDLIBRARY@%$LDLIBRARY%g
7868s%@DLLLIBRARY@%$DLLLIBRARY%g
7869s%@BLDLIBRARY@%$BLDLIBRARY%g
7870s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
Martin v. Löwis1142de32002-03-29 16:28:31 +00007871s%@INSTSONAME@%$INSTSONAME%g
7872s%@RUNSHARED@%$RUNSHARED%g
Michael W. Hudson54241132001-12-07 15:38:26 +00007873s%@LINKCC@%$LINKCC%g
7874s%@RANLIB@%$RANLIB%g
7875s%@AR@%$AR%g
7876s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7877s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7878s%@INSTALL_DATA@%$INSTALL_DATA%g
7879s%@LN@%$LN%g
7880s%@OPT@%$OPT%g
7881s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
7882s%@SO@%$SO%g
7883s%@LDSHARED@%$LDSHARED%g
7884s%@BLDSHARED@%$BLDSHARED%g
7885s%@CCSHARED@%$CCSHARED%g
7886s%@LINKFORSHARED@%$LINKFORSHARED%g
7887s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
7888s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7889s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
7890s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
7891s%@LDLAST@%$LDLAST%g
7892s%@DLINCLDIR@%$DLINCLDIR%g
7893s%@DYNLOADFILE@%$DYNLOADFILE%g
7894s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
7895s%@LIBOBJS@%$LIBOBJS%g
7896s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7897s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7898s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
7899s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
7900s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
7901s%@LIBM@%$LIBM%g
7902s%@LIBC@%$LIBC%g
7903s%@UNICODE_OBJS@%$UNICODE_OBJS%g
7904s%@THREADHEADERS@%$THREADHEADERS%g
7905s%@SRCDIRS@%$SRCDIRS%g
Jack Jansendd19cf82001-12-06 22:36:17 +00007906
Jack Jansendd19cf82001-12-06 22:36:17 +00007907CEOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007908EOF
7909
Michael W. Hudson54241132001-12-07 15:38:26 +00007910cat >> $CONFIG_STATUS <<\EOF
7911
7912# Split the substitutions into bite-sized pieces for seds with
7913# small command number limits, like on Digital OSF/1 and HP-UX.
7914ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7915ac_file=1 # Number of current file.
7916ac_beg=1 # First line for current file.
7917ac_end=$ac_max_sed_cmds # Line after last line for current file.
7918ac_more_lines=:
7919ac_sed_cmds=""
7920while $ac_more_lines; do
7921 if test $ac_beg -gt 1; then
7922 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7923 else
7924 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00007925 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007926 if test ! -s conftest.s$ac_file; then
7927 ac_more_lines=false
7928 rm -f conftest.s$ac_file
7929 else
7930 if test -z "$ac_sed_cmds"; then
7931 ac_sed_cmds="sed -f conftest.s$ac_file"
7932 else
7933 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7934 fi
7935 ac_file=`expr $ac_file + 1`
7936 ac_beg=$ac_end
7937 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7938 fi
7939done
7940if test -z "$ac_sed_cmds"; then
7941 ac_sed_cmds=cat
7942fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007943EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007944
7945cat >> $CONFIG_STATUS <<EOF
7946
7947CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
7948EOF
7949cat >> $CONFIG_STATUS <<\EOF
7950for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Jack Jansendd19cf82001-12-06 22:36:17 +00007951 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00007952 case "$ac_file" in
7953 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7954 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7955 *) ac_file_in="${ac_file}.in" ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007956 esac
7957
Michael W. Hudson54241132001-12-07 15:38:26 +00007958 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7959
7960 # Remove last slash and all that follows it. Not all systems have dirname.
7961 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007962 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007963 # The file is in a subdirectory.
7964 test ! -d "$ac_dir" && mkdir "$ac_dir"
7965 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007966 # A "../" for each directory in $ac_dir_suffix.
Michael W. Hudson54241132001-12-07 15:38:26 +00007967 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007968 else
7969 ac_dir_suffix= ac_dots=
7970 fi
7971
Michael W. Hudson54241132001-12-07 15:38:26 +00007972 case "$ac_given_srcdir" in
7973 .) srcdir=.
7974 if test -z "$ac_dots"; then top_srcdir=.
7975 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7976 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007977 *) # Relative path.
Michael W. Hudson54241132001-12-07 15:38:26 +00007978 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7979 top_srcdir="$ac_dots$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007980 esac
7981
Michael W. Hudson54241132001-12-07 15:38:26 +00007982 case "$ac_given_INSTALL" in
7983 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7984 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007985 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007986
Michael W. Hudson54241132001-12-07 15:38:26 +00007987 echo creating "$ac_file"
7988 rm -f "$ac_file"
7989 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7990 case "$ac_file" in
7991 *Makefile*) ac_comsub="1i\\
7992# $configure_input" ;;
7993 *) ac_comsub= ;;
7994 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007995
Michael W. Hudson54241132001-12-07 15:38:26 +00007996 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7997 sed -e "$ac_comsub
7998s%@configure_input@%$configure_input%g
7999s%@srcdir@%$srcdir%g
8000s%@top_srcdir@%$top_srcdir%g
8001s%@INSTALL@%$INSTALL%g
8002" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8003fi; done
8004rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00008005
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008006# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8007# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00008008#
8009# ac_d sets the value in "#define NAME VALUE" lines.
Michael W. Hudson54241132001-12-07 15:38:26 +00008010ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8011ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8012ac_dC='\3'
8013ac_dD='%g'
8014# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8015ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8016ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00008017ac_uC=' '
Michael W. Hudson54241132001-12-07 15:38:26 +00008018ac_uD='\4%g'
8019# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8020ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8021ac_eB='$%\1#\2define\3'
8022ac_eC=' '
8023ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00008024
Michael W. Hudson54241132001-12-07 15:38:26 +00008025if test "${CONFIG_HEADERS+set}" != set; then
8026EOF
8027cat >> $CONFIG_STATUS <<EOF
8028 CONFIG_HEADERS="pyconfig.h"
8029EOF
8030cat >> $CONFIG_STATUS <<\EOF
8031fi
8032for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00008033 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00008034 case "$ac_file" in
8035 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8036 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8037 *) ac_file_in="${ac_file}.in" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008038 esac
8039
Michael W. Hudson54241132001-12-07 15:38:26 +00008040 echo creating $ac_file
Guido van Rossum7f43da71994-08-01 12:15:30 +00008041
Michael W. Hudson54241132001-12-07 15:38:26 +00008042 rm -f conftest.frag conftest.in conftest.out
8043 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8044 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008045
8046EOF
8047
Michael W. Hudson54241132001-12-07 15:38:26 +00008048# Transform confdefs.h into a sed script conftest.vals that substitutes
8049# the proper values into config.h.in to produce config.h. And first:
8050# Protect against being on the right side of a sed subst in config.status.
8051# Protect against being in an unquoted here document in config.status.
8052rm -f conftest.vals
8053cat > conftest.hdr <<\EOF
8054s/[\\&%]/\\&/g
8055s%[\\$`]%\\&%g
8056s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
8057s%ac_d%ac_u%gp
8058s%ac_u%ac_e%gp
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008059EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008060sed -n -f conftest.hdr confdefs.h > conftest.vals
8061rm -f conftest.hdr
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008062
8063# This sed command replaces #undef with comments. This is necessary, for
8064# example, in the case of _POSIX_SOURCE, which is predefined and required
8065# on some systems where configure will not decide to define it.
Michael W. Hudson54241132001-12-07 15:38:26 +00008066cat >> conftest.vals <<\EOF
8067s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008068EOF
8069
Michael W. Hudson54241132001-12-07 15:38:26 +00008070# Break up conftest.vals because some shells have a limit on
8071# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008072
Jack Jansendd19cf82001-12-06 22:36:17 +00008073rm -f conftest.tail
Michael W. Hudson54241132001-12-07 15:38:26 +00008074while :
Jack Jansendd19cf82001-12-06 22:36:17 +00008075do
Michael W. Hudson54241132001-12-07 15:38:26 +00008076 ac_lines=`grep -c . conftest.vals`
8077 # grep -c gives empty output for an empty file on some AIX systems.
8078 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8079 # Write a limited-size here document to conftest.frag.
8080 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
8081 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +00008082 echo 'CEOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008083 sed -f conftest.frag conftest.in > conftest.out
8084 rm -f conftest.in
8085 mv conftest.out conftest.in
8086' >> $CONFIG_STATUS
8087 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8088 rm -f conftest.vals
8089 mv conftest.tail conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00008090done
Michael W. Hudson54241132001-12-07 15:38:26 +00008091rm -f conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00008092
Michael W. Hudson54241132001-12-07 15:38:26 +00008093cat >> $CONFIG_STATUS <<\EOF
8094 rm -f conftest.frag conftest.h
8095 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8096 cat conftest.in >> conftest.h
8097 rm -f conftest.in
8098 if cmp -s $ac_file conftest.h 2>/dev/null; then
8099 echo "$ac_file is unchanged"
8100 rm -f conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00008101 else
Michael W. Hudson54241132001-12-07 15:38:26 +00008102 # Remove last slash and all that follows it. Not all systems have dirname.
8103 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Jack Jansendd19cf82001-12-06 22:36:17 +00008104 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00008105 # The file is in a subdirectory.
8106 test ! -d "$ac_dir" && mkdir "$ac_dir"
Jack Jansendd19cf82001-12-06 22:36:17 +00008107 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008108 rm -f $ac_file
8109 mv conftest.h $ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00008110 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00008111fi; done
8112
Guido van Rossumf78abae1997-01-21 22:02:36 +00008113EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00008114cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00008115
Michael W. Hudson54241132001-12-07 15:38:26 +00008116EOF
8117cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008118
Michael W. Hudson54241132001-12-07 15:38:26 +00008119exit 0
Guido van Rossum627b2d71993-12-24 10:39:16 +00008120EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008121chmod +x $CONFIG_STATUS
Michael W. Hudson54241132001-12-07 15:38:26 +00008122rm -fr confdefs* $ac_clean_files
8123test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00008124
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008125
8126echo "creating Setup"
8127if test ! -f Modules/Setup
8128then
8129 cp $srcdir/Modules/Setup.dist Modules/Setup
8130fi
8131
8132echo "creating Setup.local"
8133if test ! -f Modules/Setup.local
8134then
8135 echo "# Edit this file for local setup changes" >Modules/Setup.local
8136fi
8137
8138echo "creating Makefile"
8139$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
8140 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00008141 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008142mv config.c Modules