blob: acaf862a83a9079736ae9b8e8c166bb35ccd00d8 [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öwisa82d3472002-02-24 16:05:05 +00003# From configure.in Revision: 1.291
Michael W. Hudson54241132001-12-07 15:38:26 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Michael W. Hudson54241132001-12-07 15:38:26 +00006# Generated automatically using autoconf version 2.13
7# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008#
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
Guido van Rossum627b2d71993-12-24 10:39:16 +000011
Michael W. Hudson54241132001-12-07 15:38:26 +000012# Defaults:
13ac_help=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014ac_default_prefix=/usr/local
Michael W. Hudson54241132001-12-07 15:38:26 +000015# Any additions from configure.in:
16ac_help="$ac_help
17 --enable-framework[=INSTALLDIR] Build (MacOSX|Darwin) framework"
18ac_help="$ac_help
19 --without-gcc never use gcc"
20ac_help="$ac_help
21 --with-cxx=<compiler> enable C++ support"
22ac_help="$ac_help
23 --with-suffix=.exe set executable suffix"
24ac_help="$ac_help
25 --with-pydebug build with Py_DEBUG defined"
26ac_help="$ac_help
27 --enable-toolbox-glue disable/enable MacOSX glue code for extensions"
28ac_help="$ac_help
29 --with-libs='lib1 ...' link against additional libs"
30ac_help="$ac_help
31 --with-signal-module disable/enable signal module"
32ac_help="$ac_help
33 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
34ac_help="$ac_help
35 --with(out)-threads[=DIRECTORY] disable/enable thread support"
36ac_help="$ac_help
37 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
38ac_help="$ac_help
39 --with-pth use GNU pth threading libraries"
40ac_help="$ac_help
41 --enable-ipv6 Enable ipv6 (with ipv4) support
42 --disable-ipv6 Disable ipv6 support"
43ac_help="$ac_help
44 --with(out)-cycle-gc disable/enable garbage collection"
45ac_help="$ac_help
46 --with(out)-pymalloc disable/enable specialized mallocs"
47ac_help="$ac_help
48 --with-wctype-functions use wctype.h functions"
49ac_help="$ac_help
50 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
51ac_help="$ac_help
52 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
53ac_help="$ac_help
54 --with-fpectl enable SIGFPE catching"
55ac_help="$ac_help
56 --with-libm=STRING math library"
57ac_help="$ac_help
58 --with-libc=STRING C library"
59ac_help="$ac_help
60 --enable-unicode[=ucs2,ucs4] Enable Unicode strings (default is yes)"
Guido van Rossum627b2d71993-12-24 10:39:16 +000061
Guido van Rossum7f43da71994-08-01 12:15:30 +000062# Initialize some variables set by options.
63# The variables have the same names as the options, with
64# dashes changed to underlines.
Michael W. Hudson54241132001-12-07 15:38:26 +000065build=NONE
66cache_file=./config.cache
Guido van Rossum76be6ed1995-01-02 18:33:54 +000067exec_prefix=NONE
Michael W. Hudson54241132001-12-07 15:38:26 +000068host=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000069no_create=
Michael W. Hudson54241132001-12-07 15:38:26 +000070nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000071no_recursion=
72prefix=NONE
73program_prefix=NONE
74program_suffix=NONE
75program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000076silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000077site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000078srcdir=
Michael W. Hudson54241132001-12-07 15:38:26 +000079target=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000080verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000081x_includes=NONE
82x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000083bindir='${exec_prefix}/bin'
84sbindir='${exec_prefix}/sbin'
85libexecdir='${exec_prefix}/libexec'
86datadir='${prefix}/share'
87sysconfdir='${prefix}/etc'
88sharedstatedir='${prefix}/com'
89localstatedir='${prefix}/var'
90libdir='${exec_prefix}/lib'
91includedir='${prefix}/include'
92oldincludedir='/usr/include'
93infodir='${prefix}/info'
94mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000095
Michael W. Hudson54241132001-12-07 15:38:26 +000096# Initialize some other variables.
97subdirs=
98MFLAGS= MAKEFLAGS=
99SHELL=${CONFIG_SHELL-/bin/sh}
100# Maximum number of lines to put in a shell here document.
101ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +0000102
103ac_prev=
104for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000105do
Michael W. Hudson54241132001-12-07 15:38:26 +0000106
Guido van Rossum7f43da71994-08-01 12:15:30 +0000107 # If the previous option needs an argument, assign it.
108 if test -n "$ac_prev"; then
109 eval "$ac_prev=\$ac_option"
110 ac_prev=
111 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000112 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000113
Michael W. Hudson54241132001-12-07 15:38:26 +0000114 case "$ac_option" in
115 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
116 *) ac_optarg= ;;
117 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000118
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000119 # Accept the important Cygnus configure options, so we can diagnose typos.
120
Michael W. Hudson54241132001-12-07 15:38:26 +0000121 case "$ac_option" in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000122
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000123 -bindir | --bindir | --bindi | --bind | --bin | --bi)
124 ac_prev=bindir ;;
125 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000126 bindir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000127
128 -build | --build | --buil | --bui | --bu)
Michael W. Hudson54241132001-12-07 15:38:26 +0000129 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000130 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000131 build="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000132
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000133 -cache-file | --cache-file | --cache-fil | --cache-fi \
134 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
135 ac_prev=cache_file ;;
136 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
137 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000138 cache_file="$ac_optarg" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000139
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000140 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
141 ac_prev=datadir ;;
142 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
143 | --da=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000144 datadir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000145
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 -disable-* | --disable-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000147 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000148 # Reject names that are not valid shell variable names.
Michael W. Hudson54241132001-12-07 15:38:26 +0000149 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
150 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
151 fi
152 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
153 eval "enable_${ac_feature}=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000154
155 -enable-* | --enable-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000156 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000157 # Reject names that are not valid shell variable names.
Michael W. Hudson54241132001-12-07 15:38:26 +0000158 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
159 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
160 fi
161 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
162 case "$ac_option" in
163 *=*) ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000164 *) ac_optarg=yes ;;
165 esac
Michael W. Hudson54241132001-12-07 15:38:26 +0000166 eval "enable_${ac_feature}='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000167
Guido van Rossum7f43da71994-08-01 12:15:30 +0000168 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
169 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
170 | --exec | --exe | --ex)
171 ac_prev=exec_prefix ;;
172 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
173 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
174 | --exec=* | --exe=* | --ex=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000175 exec_prefix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000176
177 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000178 # Obsolete; use --with-gas.
179 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000180
Michael W. Hudson54241132001-12-07 15:38:26 +0000181 -help | --help | --hel | --he)
182 # Omit some internal or obsolete options to make the list less imposing.
183 # This message is too long to be a string in the A/UX 3.1 sh.
184 cat << EOF
185Usage: configure [options] [host]
186Options: [defaults in brackets after descriptions]
187Configuration:
188 --cache-file=FILE cache test results in FILE
189 --help print this message
190 --no-create do not create output files
191 --quiet, --silent do not print \`checking...' messages
192 --version print the version of autoconf that created configure
193Directory and file names:
194 --prefix=PREFIX install architecture-independent files in PREFIX
195 [$ac_default_prefix]
196 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
197 [same as prefix]
198 --bindir=DIR user executables in DIR [EPREFIX/bin]
199 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
200 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
201 --datadir=DIR read-only architecture-independent data in DIR
202 [PREFIX/share]
203 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
204 --sharedstatedir=DIR modifiable architecture-independent data in DIR
205 [PREFIX/com]
206 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
207 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
208 --includedir=DIR C header files in DIR [PREFIX/include]
209 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
210 --infodir=DIR info documentation in DIR [PREFIX/info]
211 --mandir=DIR man documentation in DIR [PREFIX/man]
212 --srcdir=DIR find the sources in DIR [configure dir or ..]
213 --program-prefix=PREFIX prepend PREFIX to installed program names
214 --program-suffix=SUFFIX append SUFFIX to installed program names
215 --program-transform-name=PROGRAM
216 run sed PROGRAM on installed program names
217EOF
218 cat << EOF
219Host type:
220 --build=BUILD configure for building on BUILD [BUILD=HOST]
221 --host=HOST configure for HOST [guessed]
222 --target=TARGET configure for TARGET [TARGET=HOST]
223Features and packages:
224 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
225 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
226 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
227 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
228 --x-includes=DIR X include files are in DIR
229 --x-libraries=DIR X library files are in DIR
230EOF
231 if test -n "$ac_help"; then
232 echo "--enable and --with options recognized:$ac_help"
233 fi
234 exit 0 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000235
236 -host | --host | --hos | --ho)
Michael W. Hudson54241132001-12-07 15:38:26 +0000237 ac_prev=host ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000238 -host=* | --host=* | --hos=* | --ho=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000239 host="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000240
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000241 -includedir | --includedir | --includedi | --included | --include \
242 | --includ | --inclu | --incl | --inc)
243 ac_prev=includedir ;;
244 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
245 | --includ=* | --inclu=* | --incl=* | --inc=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000246 includedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000247
248 -infodir | --infodir | --infodi | --infod | --info | --inf)
249 ac_prev=infodir ;;
250 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000251 infodir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000252
253 -libdir | --libdir | --libdi | --libd)
254 ac_prev=libdir ;;
255 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000256 libdir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000257
258 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
259 | --libexe | --libex | --libe)
260 ac_prev=libexecdir ;;
261 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
262 | --libexe=* | --libex=* | --libe=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000263 libexecdir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000264
265 -localstatedir | --localstatedir | --localstatedi | --localstated \
266 | --localstate | --localstat | --localsta | --localst \
267 | --locals | --local | --loca | --loc | --lo)
268 ac_prev=localstatedir ;;
269 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
270 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
271 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000272 localstatedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000273
274 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
275 ac_prev=mandir ;;
276 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000277 mandir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000278
Guido van Rossum7f43da71994-08-01 12:15:30 +0000279 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000280 # Obsolete; use --without-fp.
281 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000282
283 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
284 | --no-cr | --no-c)
285 no_create=yes ;;
286
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000287 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
288 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
289 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000290
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000291 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
292 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
293 | --oldin | --oldi | --old | --ol | --o)
294 ac_prev=oldincludedir ;;
295 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
296 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
297 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000298 oldincludedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000299
Guido van Rossum7f43da71994-08-01 12:15:30 +0000300 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
301 ac_prev=prefix ;;
302 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000303 prefix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000304
305 -program-prefix | --program-prefix | --program-prefi | --program-pref \
306 | --program-pre | --program-pr | --program-p)
307 ac_prev=program_prefix ;;
308 -program-prefix=* | --program-prefix=* | --program-prefi=* \
309 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000310 program_prefix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000311
312 -program-suffix | --program-suffix | --program-suffi | --program-suff \
313 | --program-suf | --program-su | --program-s)
314 ac_prev=program_suffix ;;
315 -program-suffix=* | --program-suffix=* | --program-suffi=* \
316 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000317 program_suffix="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000318
319 -program-transform-name | --program-transform-name \
320 | --program-transform-nam | --program-transform-na \
321 | --program-transform-n | --program-transform- \
322 | --program-transform | --program-transfor \
323 | --program-transfo | --program-transf \
324 | --program-trans | --program-tran \
325 | --progr-tra | --program-tr | --program-t)
326 ac_prev=program_transform_name ;;
327 -program-transform-name=* | --program-transform-name=* \
328 | --program-transform-nam=* | --program-transform-na=* \
329 | --program-transform-n=* | --program-transform-=* \
330 | --program-transform=* | --program-transfor=* \
331 | --program-transfo=* | --program-transf=* \
332 | --program-trans=* | --program-tran=* \
333 | --progr-tra=* | --program-tr=* | --program-t=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000334 program_transform_name="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000335
336 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
337 | -silent | --silent | --silen | --sile | --sil)
338 silent=yes ;;
339
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000340 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
341 ac_prev=sbindir ;;
342 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
343 | --sbi=* | --sb=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000344 sbindir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000345
346 -sharedstatedir | --sharedstatedir | --sharedstatedi \
347 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
348 | --sharedst | --shareds | --shared | --share | --shar \
349 | --sha | --sh)
350 ac_prev=sharedstatedir ;;
351 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
352 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
353 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
354 | --sha=* | --sh=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000355 sharedstatedir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000356
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000357 -site | --site | --sit)
358 ac_prev=site ;;
359 -site=* | --site=* | --sit=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000360 site="$ac_optarg" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000361
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
363 ac_prev=srcdir ;;
364 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000365 srcdir="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000366
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000367 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
368 | --syscon | --sysco | --sysc | --sys | --sy)
369 ac_prev=sysconfdir ;;
370 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
371 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000372 sysconfdir="$ac_optarg" ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000373
Guido van Rossum7f43da71994-08-01 12:15:30 +0000374 -target | --target | --targe | --targ | --tar | --ta | --t)
Michael W. Hudson54241132001-12-07 15:38:26 +0000375 ac_prev=target ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000376 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000377 target="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000378
379 -v | -verbose | --verbose | --verbos | --verbo | --verb)
380 verbose=yes ;;
381
Michael W. Hudson54241132001-12-07 15:38:26 +0000382 -version | --version | --versio | --versi | --vers)
383 echo "configure generated by autoconf version 2.13"
384 exit 0 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000385
386 -with-* | --with-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000387 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000388 # Reject names that are not valid shell variable names.
Michael W. Hudson54241132001-12-07 15:38:26 +0000389 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
390 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
391 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000392 ac_package=`echo $ac_package| sed 's/-/_/g'`
Michael W. Hudson54241132001-12-07 15:38:26 +0000393 case "$ac_option" in
394 *=*) ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000395 *) ac_optarg=yes ;;
396 esac
Michael W. Hudson54241132001-12-07 15:38:26 +0000397 eval "with_${ac_package}='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000398
399 -without-* | --without-*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000400 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000401 # Reject names that are not valid shell variable names.
Michael W. Hudson54241132001-12-07 15:38:26 +0000402 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
403 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
404 fi
405 ac_package=`echo $ac_package| sed 's/-/_/g'`
406 eval "with_${ac_package}=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000407
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000408 --x)
409 # Obsolete; use --with-x.
410 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000411
412 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
413 | --x-incl | --x-inc | --x-in | --x-i)
414 ac_prev=x_includes ;;
415 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
416 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000417 x_includes="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000418
419 -x-libraries | --x-libraries | --x-librarie | --x-librari \
420 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
421 ac_prev=x_libraries ;;
422 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
423 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Michael W. Hudson54241132001-12-07 15:38:26 +0000424 x_libraries="$ac_optarg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425
Michael W. Hudson54241132001-12-07 15:38:26 +0000426 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427 ;;
428
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000429 *)
Michael W. Hudson54241132001-12-07 15:38:26 +0000430 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
431 echo "configure: warning: $ac_option: invalid host type" 1>&2
432 fi
433 if test "x$nonopt" != xNONE; then
434 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
435 fi
436 nonopt="$ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000437 ;;
438
439 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000440done
441
Guido van Rossum7f43da71994-08-01 12:15:30 +0000442if test -n "$ac_prev"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000443 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444fi
445
Michael W. Hudson54241132001-12-07 15:38:26 +0000446trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
447
448# File descriptor usage:
449# 0 standard input
450# 1 file creation
451# 2 errors and warnings
452# 3 some systems may open it to /dev/tty
453# 4 used on the Kubota Titan
454# 6 checking for... messages and results
455# 5 compiler messages saved in config.log
456if test "$silent" = yes; then
457 exec 6>/dev/null
458else
459 exec 6>&1
460fi
461exec 5>./config.log
462
463echo "\
464This file contains any messages produced by compilers while
465running configure, to aid debugging if configure makes a mistake.
466" 1>&5
467
468# Strip out --no-create and --no-recursion so they do not pile up.
469# Also quote any args containing shell metacharacters.
470ac_configure_args=
471for ac_arg
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000472do
Michael W. Hudson54241132001-12-07 15:38:26 +0000473 case "$ac_arg" in
474 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
475 | --no-cr | --no-c) ;;
476 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
477 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
478 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
479 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
480 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000481 esac
482done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000483
Michael W. Hudson54241132001-12-07 15:38:26 +0000484# NLS nuisances.
485# Only set these to C if already set. These must not be set unconditionally
486# because not all systems understand e.g. LANG=C (notably SCO).
487# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
488# Non-C LC_CTYPE values break the ctype check.
489if test "${LANG+set}" = set; then LANG=C; export LANG; fi
490if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
491if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
492if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000493
Michael W. Hudson54241132001-12-07 15:38:26 +0000494# confdefs.h avoids OS command line length limits that DEFS can exceed.
495rm -rf conftest* confdefs.h
496# AIX cpp loses on an empty file, so make sure it contains at least a newline.
497echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000498
Michael W. Hudson54241132001-12-07 15:38:26 +0000499# A filename unique to this package, relative to the directory that
500# configure is in, which we can look for to find out if srcdir is correct.
501ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000502
503# Find the source files, if location was not specified.
504if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000506 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000507 ac_prog=$0
Michael W. Hudson54241132001-12-07 15:38:26 +0000508 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000509 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
510 srcdir=$ac_confdir
511 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000512 srcdir=..
513 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000514else
515 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000516fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000517if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000518 if test "$ac_srcdir_defaulted" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000519 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000520 else
Michael W. Hudson54241132001-12-07 15:38:26 +0000521 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000522 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000523fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000524srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000525
526# Prefer explicitly selected file to automatically selected ones.
527if test -z "$CONFIG_SITE"; then
528 if test "x$prefix" != xNONE; then
529 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
530 else
531 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
532 fi
533fi
534for ac_site_file in $CONFIG_SITE; do
535 if test -r "$ac_site_file"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000536 echo "loading site script $ac_site_file"
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000537 . "$ac_site_file"
538 fi
539done
540
541if test -r "$cache_file"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000542 echo "loading cache $cache_file"
543 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544else
Michael W. Hudson54241132001-12-07 15:38:26 +0000545 echo "creating cache $cache_file"
546 > $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000547fi
548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549ac_ext=c
Michael W. Hudson54241132001-12-07 15:38:26 +0000550# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000551ac_cpp='$CPP $CPPFLAGS'
Michael W. Hudson54241132001-12-07 15:38:26 +0000552ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
553ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
554cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000555
Michael W. Hudson54241132001-12-07 15:38:26 +0000556ac_exeext=
557ac_objext=o
558if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
559 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
560 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
561 ac_n= ac_c='
562' ac_t=' '
563 else
564 ac_n=-n ac_c= ac_t=
565 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000566else
Michael W. Hudson54241132001-12-07 15:38:26 +0000567 ac_n= ac_c='\c' ac_t=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000568fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000569
Michael W. Hudson54241132001-12-07 15:38:26 +0000570
571
Guido van Rossum627b2d71993-12-24 10:39:16 +0000572
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000573# Set VERSION so we only need to edit in one place (i.e., here)
574
Andrew M. Kuchlingf2f219d2002-02-11 16:31:10 +0000575VERSION=2.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000576
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +0000577# Arguments passed to configure.
578
579CONFIG_ARGS="$ac_configure_args"
580
Michael W. Hudson54241132001-12-07 15:38:26 +0000581
Jack Jansene578a632001-08-15 01:27:14 +0000582# Check whether --enable-framework or --disable-framework was given.
583if test "${enable_framework+set}" = set; then
584 enableval="$enable_framework"
Michael W. Hudson54241132001-12-07 15:38:26 +0000585
Jack Jansene578a632001-08-15 01:27:14 +0000586 case $enableval in
Michael W. Hudson54241132001-12-07 15:38:26 +0000587 yes)
Jack Jansene578a632001-08-15 01:27:14 +0000588 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +0000589 esac
590 case $enableval in
591 no)
592 PYTHONFRAMEWORK=
593 PYTHONFRAMEWORKDIR=no-framework
594 PYTHONFRAMEWORKPREFIX=
595 PYTHONFRAMEWORKINSTALLDIR=
596 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +0000597 ;;
598 *)
Jack Jansen127e56e2001-09-11 14:41:54 +0000599 PYTHONFRAMEWORK=Python
600 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +0000601 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +0000602 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
603 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +0000604 esac
Michael W. Hudson54241132001-12-07 15:38:26 +0000605
Guido van Rossum563e7081996-09-10 18:20:48 +0000606else
Michael W. Hudson54241132001-12-07 15:38:26 +0000607
Jack Jansene578a632001-08-15 01:27:14 +0000608 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +0000609 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +0000610 PYTHONFRAMEWORKPREFIX=
611 PYTHONFRAMEWORKINSTALLDIR=
612 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000613
Michael W. Hudson54241132001-12-07 15:38:26 +0000614fi
615
616
617
618
619
Jack Jansene578a632001-08-15 01:27:14 +0000620
621##AC_ARG_WITH(dyld,
622##[ --with-dyld Use (OpenStep|Rhapsody) dynamic linker],,)
623##
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000624# Set name for machine-dependent library files
625
Michael W. Hudson54241132001-12-07 15:38:26 +0000626echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
627echo "configure:628: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000628if test -z "$MACHDEP"
629then
Guido van Rossum563e7081996-09-10 18:20:48 +0000630 ac_sys_system=`uname -s`
Martin v. Löwis130fb172001-07-19 11:00:41 +0000631 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000632 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000633 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000634 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000635 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000636 ac_md_system=`echo $ac_sys_system |
637 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
638 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +0000639 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000640 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000641
Guido van Rossum07397971997-04-29 21:49:50 +0000642 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +0000643 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +0000644 darwin*) MACHDEP="darwin";;
Guido van Rossumb97ef171997-09-28 05:44:03 +0000645 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000646 esac
647fi
Guido van Rossum91922671997-10-09 20:24:13 +0000648
649#
650# SGI compilers allow the specification of the both the ABI and the
651# ISA on the command line. Depending on the values of these switches,
652# different and often incompatable code will be generated.
653#
654# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
655# thus supply support for various ABI/ISA combinations. The MACHDEP
656# variable is also adjusted.
657#
658
659if test ! -z "$SGI_ABI"
660then
661 CC="cc $SGI_ABI"
662 LDFLAGS="$SGI_ABI $LDFLAGS"
663 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
664fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000665echo "$ac_t""$MACHDEP" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000666
Guido van Rossum627b2d71993-12-24 10:39:16 +0000667# checks for alternative programs
Michael W. Hudson54241132001-12-07 15:38:26 +0000668echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
669echo "configure:670: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000670# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000671if test "${with_gcc+set}" = set; then
672 withval="$with_gcc"
Michael W. Hudson54241132001-12-07 15:38:26 +0000673
Guido van Rossum7f43da71994-08-01 12:15:30 +0000674 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000675 no) CC=cc
676 without_gcc=yes;;
677 yes) CC=gcc
678 without_gcc=no;;
679 *) CC=$withval
680 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000681 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000682else
Michael W. Hudson54241132001-12-07 15:38:26 +0000683
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000684 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000685 AIX*) CC=cc_r
686 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000687 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000688 case $BE_HOST_CPU in
689 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000690 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000691 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000692 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000693 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000694 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000695 ;;
696 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000697 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000698 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000699 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000700 ;;
701 *)
Michael W. Hudson54241132001-12-07 15:38:26 +0000702 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000703 ;;
704 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000705 AR="\$(srcdir)/Modules/ar_beos"
706 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000707 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000708 Monterey*)
709 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +0000710 without_gcc=;;
711 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000712 esac
Michael W. Hudson54241132001-12-07 15:38:26 +0000713fi
714
715echo "$ac_t""$without_gcc" 1>&6
716
717
Guido van Rossum95012191999-12-16 17:50:52 +0000718
Fred Drakea1a84e72001-03-06 05:52:16 +0000719MAINOBJ=python.o
Michael W. Hudson54241132001-12-07 15:38:26 +0000720echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
721echo "configure:722: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000722# Check whether --with-cxx or --without-cxx was given.
723if test "${with_cxx+set}" = set; then
724 withval="$with_cxx"
Michael W. Hudson54241132001-12-07 15:38:26 +0000725
Martin v. Löwis22352952000-12-13 17:37:02 +0000726 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000727 case $withval in
728 no) CXX=
729 with_cxx=no;;
730 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000731 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000732 with_cxx=$withval;;
733 esac
734else
Michael W. Hudson54241132001-12-07 15:38:26 +0000735
Guido van Rossum95012191999-12-16 17:50:52 +0000736 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000737 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000738
Michael W. Hudson54241132001-12-07 15:38:26 +0000739fi
Guido van Rossum95012191999-12-16 17:50:52 +0000740
Michael W. Hudson54241132001-12-07 15:38:26 +0000741echo "$ac_t""$with_cxx" 1>&6
742
743if test "$with_cxx" = "yes"
744then
745 { echo "configure: error: must supply a compiler when using --with-cxx" 1>&2; exit 1; }
746fi
747
748
749
750
751if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +0000752then
753 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
754do
Michael W. Hudson54241132001-12-07 15:38:26 +0000755# Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +0000756set dummy $ac_prog; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +0000757echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
758echo "configure:759: checking for $ac_word" >&5
759if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
760 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000761else
762 if test -n "$CXX"; then
763 ac_cv_prog_CXX="$CXX" # Let the user override the test.
764else
Michael W. Hudson54241132001-12-07 15:38:26 +0000765 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
766 ac_dummy="$PATH"
767 for ac_dir in $ac_dummy; do
768 test -z "$ac_dir" && ac_dir=.
769 if test -f $ac_dir/$ac_word; then
770 ac_cv_prog_CXX="$ac_prog"
771 break
772 fi
773 done
774 IFS="$ac_save_ifs"
Martin v. Löwis22352952000-12-13 17:37:02 +0000775fi
776fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000777CXX="$ac_cv_prog_CXX"
Martin v. Löwis22352952000-12-13 17:37:02 +0000778if test -n "$CXX"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000779 echo "$ac_t""$CXX" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000780else
Michael W. Hudson54241132001-12-07 15:38:26 +0000781 echo "$ac_t""no" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000782fi
783
Michael W. Hudson54241132001-12-07 15:38:26 +0000784test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +0000785done
786test -n "$CXX" || CXX="notfound"
787
788 if test "$CXX" = "notfound"
789 then
790 CXX=
791 else
Michael W. Hudson54241132001-12-07 15:38:26 +0000792 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
793echo "configure:794: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
794
795ac_ext=C
796# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Martin v. Löwis22352952000-12-13 17:37:02 +0000797ac_cpp='$CXXCPP $CPPFLAGS'
Michael W. Hudson54241132001-12-07 15:38:26 +0000798ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
799ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
800cross_compiling=$ac_cv_prog_cxx_cross
801
802cat > conftest.$ac_ext << EOF
803
804#line 805 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000805#include "confdefs.h"
806
Michael W. Hudson54241132001-12-07 15:38:26 +0000807int main(){return(0);}
808EOF
809if { (eval echo configure:810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
810 ac_cv_prog_cxx_works=yes
811 # If we can't run a trivial program, we are probably using a cross compiler.
812 if (./conftest; exit) 2>/dev/null; then
813 ac_cv_prog_cxx_cross=no
Jack Jansendd19cf82001-12-06 22:36:17 +0000814 else
Michael W. Hudson54241132001-12-07 15:38:26 +0000815 ac_cv_prog_cxx_cross=yes
Jack Jansendd19cf82001-12-06 22:36:17 +0000816 fi
Jack Jansendd19cf82001-12-06 22:36:17 +0000817else
Michael W. Hudson54241132001-12-07 15:38:26 +0000818 echo "configure: failed program was:" >&5
819 cat conftest.$ac_ext >&5
820 ac_cv_prog_cxx_works=no
Jack Jansendd19cf82001-12-06 22:36:17 +0000821fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000822rm -fr conftest*
823ac_ext=c
824# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Jack Jansendd19cf82001-12-06 22:36:17 +0000825ac_cpp='$CPP $CPPFLAGS'
Michael W. Hudson54241132001-12-07 15:38:26 +0000826ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
827ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
828cross_compiling=$ac_cv_prog_cc_cross
829
830echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
831if test $ac_cv_prog_cxx_works = no; then
832 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
833fi
834echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
835echo "configure:836: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
836echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
837cross_compiling=$ac_cv_prog_cxx_cross
Martin v. Löwis22352952000-12-13 17:37:02 +0000838
839 fi
840fi
841
Guido van Rossum8b131c51995-03-09 14:10:13 +0000842# If the user switches compilers, we can't believe the cache
843if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
844then
Michael W. Hudson54241132001-12-07 15:38:26 +0000845 { echo "configure: error: cached CC is different -- throw away $cache_file
846(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
Guido van Rossum8b131c51995-03-09 14:10:13 +0000847fi
848
Michael W. Hudson54241132001-12-07 15:38:26 +0000849# Extract the first word of "gcc", so it can be a program name with args.
Jack Jansendd19cf82001-12-06 22:36:17 +0000850set dummy gcc; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +0000851echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
852echo "configure:853: checking for $ac_word" >&5
853if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
854 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855else
856 if test -n "$CC"; then
857 ac_cv_prog_CC="$CC" # Let the user override the test.
858else
Michael W. Hudson54241132001-12-07 15:38:26 +0000859 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
860 ac_dummy="$PATH"
861 for ac_dir in $ac_dummy; do
862 test -z "$ac_dir" && ac_dir=.
863 if test -f $ac_dir/$ac_word; then
864 ac_cv_prog_CC="gcc"
865 break
866 fi
867 done
868 IFS="$ac_save_ifs"
Jack Jansendd19cf82001-12-06 22:36:17 +0000869fi
870fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000871CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +0000872if test -n "$CC"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000873 echo "$ac_t""$CC" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +0000874else
Michael W. Hudson54241132001-12-07 15:38:26 +0000875 echo "$ac_t""no" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +0000876fi
877
Jack Jansendd19cf82001-12-06 22:36:17 +0000878if test -z "$CC"; then
879 # Extract the first word of "cc", so it can be a program name with args.
880set dummy cc; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +0000881echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
882echo "configure:883: checking for $ac_word" >&5
883if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
884 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +0000885else
886 if test -n "$CC"; then
887 ac_cv_prog_CC="$CC" # Let the user override the test.
888else
Michael W. Hudson54241132001-12-07 15:38:26 +0000889 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890 ac_prog_rejected=no
Michael W. Hudson54241132001-12-07 15:38:26 +0000891 ac_dummy="$PATH"
892 for ac_dir in $ac_dummy; do
893 test -z "$ac_dir" && ac_dir=.
894 if test -f $ac_dir/$ac_word; then
895 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
896 ac_prog_rejected=yes
897 continue
898 fi
899 ac_cv_prog_CC="cc"
900 break
901 fi
902 done
903 IFS="$ac_save_ifs"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904if test $ac_prog_rejected = yes; then
905 # We found a bogon in the path, so make sure we never use it.
906 set dummy $ac_cv_prog_CC
907 shift
Michael W. Hudson54241132001-12-07 15:38:26 +0000908 if test $# -gt 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000909 # We chose a different compiler from the bogus one.
910 # However, it has the same basename, so the bogon will be chosen
911 # first if we set CC to just the basename; use the full file name.
912 shift
Michael W. Hudson54241132001-12-07 15:38:26 +0000913 set dummy "$ac_dir/$ac_word" "$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914 shift
915 ac_cv_prog_CC="$@"
916 fi
917fi
918fi
919fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000920CC="$ac_cv_prog_CC"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921if test -n "$CC"; then
Michael W. Hudson54241132001-12-07 15:38:26 +0000922 echo "$ac_t""$CC" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000923else
Michael W. Hudson54241132001-12-07 15:38:26 +0000924 echo "$ac_t""no" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000925fi
926
Michael W. Hudson54241132001-12-07 15:38:26 +0000927 if test -z "$CC"; then
928 case "`uname -s`" in
929 *win32* | *WIN32*)
930 # Extract the first word of "cl", so it can be a program name with args.
931set dummy cl; ac_word=$2
932echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
933echo "configure:934: checking for $ac_word" >&5
934if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
935 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000936else
937 if test -n "$CC"; then
938 ac_cv_prog_CC="$CC" # Let the user override the test.
939else
Michael W. Hudson54241132001-12-07 15:38:26 +0000940 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
941 ac_dummy="$PATH"
942 for ac_dir in $ac_dummy; do
943 test -z "$ac_dir" && ac_dir=.
944 if test -f $ac_dir/$ac_word; then
945 ac_cv_prog_CC="cl"
946 break
Jack Jansendd19cf82001-12-06 22:36:17 +0000947 fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000948 done
949 IFS="$ac_save_ifs"
950fi
951fi
952CC="$ac_cv_prog_CC"
953if test -n "$CC"; then
954 echo "$ac_t""$CC" 1>&6
955else
956 echo "$ac_t""no" 1>&6
957fi
958 ;;
959 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +0000960 fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000961 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
Jack Jansendd19cf82001-12-06 22:36:17 +0000962fi
963
Michael W. Hudson54241132001-12-07 15:38:26 +0000964echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
965echo "configure:966: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Jack Jansendd19cf82001-12-06 22:36:17 +0000966
Michael W. Hudson54241132001-12-07 15:38:26 +0000967ac_ext=c
968# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
969ac_cpp='$CPP $CPPFLAGS'
970ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
971ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
972cross_compiling=$ac_cv_prog_cc_cross
973
974cat > conftest.$ac_ext << EOF
975
976#line 977 "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +0000977#include "confdefs.h"
978
Michael W. Hudson54241132001-12-07 15:38:26 +0000979main(){return(0);}
980EOF
981if { (eval echo configure:982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
982 ac_cv_prog_cc_works=yes
983 # If we can't run a trivial program, we are probably using a cross compiler.
984 if (./conftest; exit) 2>/dev/null; then
985 ac_cv_prog_cc_cross=no
986 else
987 ac_cv_prog_cc_cross=yes
988 fi
Jack Jansendd19cf82001-12-06 22:36:17 +0000989else
Michael W. Hudson54241132001-12-07 15:38:26 +0000990 echo "configure: failed program was:" >&5
991 cat conftest.$ac_ext >&5
992 ac_cv_prog_cc_works=no
Jack Jansendd19cf82001-12-06 22:36:17 +0000993fi
Michael W. Hudson54241132001-12-07 15:38:26 +0000994rm -fr conftest*
995ac_ext=c
996# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
997ac_cpp='$CPP $CPPFLAGS'
998ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
999ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1000cross_compiling=$ac_cv_prog_cc_cross
Jack Jansendd19cf82001-12-06 22:36:17 +00001001
Michael W. Hudson54241132001-12-07 15:38:26 +00001002echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1003if test $ac_cv_prog_cc_works = no; then
1004 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
Jack Jansendd19cf82001-12-06 22:36:17 +00001005fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001006echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1007echo "configure:1008: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1008echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1009cross_compiling=$ac_cv_prog_cc_cross
1010
1011echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1012echo "configure:1013: checking whether we are using GNU C" >&5
1013if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1014 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001015else
Michael W. Hudson54241132001-12-07 15:38:26 +00001016 cat > conftest.c <<EOF
1017#ifdef __GNUC__
1018 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001019#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00001020EOF
1021if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1022 ac_cv_prog_gcc=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001023else
Michael W. Hudson54241132001-12-07 15:38:26 +00001024 ac_cv_prog_gcc=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001025fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001026fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001027
Michael W. Hudson54241132001-12-07 15:38:26 +00001028echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1029
1030if test $ac_cv_prog_gcc = yes; then
1031 GCC=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001032else
Michael W. Hudson54241132001-12-07 15:38:26 +00001033 GCC=
1034fi
Jack Jansendd19cf82001-12-06 22:36:17 +00001035
Michael W. Hudson54241132001-12-07 15:38:26 +00001036ac_test_CFLAGS="${CFLAGS+set}"
1037ac_save_CFLAGS="$CFLAGS"
1038CFLAGS=
1039echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1040echo "configure:1041: checking whether ${CC-cc} accepts -g" >&5
1041if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1042 echo $ac_n "(cached) $ac_c" 1>&6
1043else
1044 echo 'void f(){}' > conftest.c
1045if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001046 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047else
Michael W. Hudson54241132001-12-07 15:38:26 +00001048 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001049fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001050rm -f conftest*
1051
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001052fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001053
1054echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001055if test "$ac_test_CFLAGS" = set; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001056 CFLAGS="$ac_save_CFLAGS"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001057elif test $ac_cv_prog_cc_g = yes; then
1058 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001059 CFLAGS="-g -O2"
1060 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001061 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001062 fi
1063else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001064 if test "$GCC" = yes; then
1065 CFLAGS="-O2"
1066 else
1067 CFLAGS=
1068 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001069fi
1070
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001071
1072# checks for UNIX variants that set C preprocessor variables
Michael W. Hudson54241132001-12-07 15:38:26 +00001073echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1074echo "configure:1075: checking how to run the C preprocessor" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001075# On Suns, sometimes $CPP names a directory.
1076if test -n "$CPP" && test -d "$CPP"; then
1077 CPP=
1078fi
1079if test -z "$CPP"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001080if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1081 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001082else
Michael W. Hudson54241132001-12-07 15:38:26 +00001083 # This must be in double quotes, not single quotes, because CPP may get
1084 # substituted into the Makefile and "${CC-cc}" will confuse make.
1085 CPP="${CC-cc} -E"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001086 # On the NeXT, cc -E runs the code through the compiler's parser,
Michael W. Hudson54241132001-12-07 15:38:26 +00001087 # not just through cpp.
1088 cat > conftest.$ac_ext <<EOF
1089#line 1090 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001090#include "confdefs.h"
1091#include <assert.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001092Syntax Error
1093EOF
1094ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1095{ (eval echo configure:1096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1096ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1097if test -z "$ac_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001098 :
1099else
Michael W. Hudson54241132001-12-07 15:38:26 +00001100 echo "$ac_err" >&5
1101 echo "configure: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001102 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001103 rm -rf conftest*
1104 CPP="${CC-cc} -E -traditional-cpp"
1105 cat > conftest.$ac_ext <<EOF
1106#line 1107 "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001107#include "confdefs.h"
1108#include <assert.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001109Syntax Error
1110EOF
1111ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1112{ (eval echo configure:1113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1113ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1114if test -z "$ac_err"; then
Jack Jansendd19cf82001-12-06 22:36:17 +00001115 :
1116else
Michael W. Hudson54241132001-12-07 15:38:26 +00001117 echo "$ac_err" >&5
1118 echo "configure: failed program was:" >&5
Jack Jansendd19cf82001-12-06 22:36:17 +00001119 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001120 rm -rf conftest*
1121 CPP="${CC-cc} -nologo -E"
1122 cat > conftest.$ac_ext <<EOF
1123#line 1124 "configure"
Jack Jansendd19cf82001-12-06 22:36:17 +00001124#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00001125#include <assert.h>
1126Syntax Error
1127EOF
1128ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1129{ (eval echo configure:1130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1130ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1131if test -z "$ac_err"; then
Jack Jansendd19cf82001-12-06 22:36:17 +00001132 :
1133else
Michael W. Hudson54241132001-12-07 15:38:26 +00001134 echo "$ac_err" >&5
1135 echo "configure: failed program was:" >&5
1136 cat conftest.$ac_ext >&5
1137 rm -rf conftest*
1138 CPP=/lib/cpp
Jack Jansendd19cf82001-12-06 22:36:17 +00001139fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001140rm -f conftest*
1141fi
1142rm -f conftest*
1143fi
1144rm -f conftest*
1145 ac_cv_prog_CPP="$CPP"
1146fi
1147 CPP="$ac_cv_prog_CPP"
1148else
1149 ac_cv_prog_CPP="$CPP"
1150fi
1151echo "$ac_t""$CPP" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001152
Michael W. Hudson54241132001-12-07 15:38:26 +00001153echo $ac_n "checking for AIX""... $ac_c" 1>&6
1154echo "configure:1155: checking for AIX" >&5
1155cat > conftest.$ac_ext <<EOF
1156#line 1157 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001157#include "confdefs.h"
1158#ifdef _AIX
1159 yes
1160#endif
1161
Michael W. Hudson54241132001-12-07 15:38:26 +00001162EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001163if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1164 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001165 rm -rf conftest*
1166 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001167#define _ALL_SOURCE 1
1168EOF
1169
1170else
Michael W. Hudson54241132001-12-07 15:38:26 +00001171 rm -rf conftest*
1172 echo "$ac_t""no" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001173fi
1174rm -f conftest*
1175
Michael W. Hudson54241132001-12-07 15:38:26 +00001176
1177ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1178echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
1179echo "configure:1180: checking for minix/config.h" >&5
1180if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1181 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001182else
Michael W. Hudson54241132001-12-07 15:38:26 +00001183 cat > conftest.$ac_ext <<EOF
1184#line 1185 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001185#include "confdefs.h"
1186#include <minix/config.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001187EOF
1188ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1189{ (eval echo configure:1190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1190ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1191if test -z "$ac_err"; then
1192 rm -rf conftest*
1193 eval "ac_cv_header_$ac_safe=yes"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001194else
Michael W. Hudson54241132001-12-07 15:38:26 +00001195 echo "$ac_err" >&5
1196 echo "configure: failed program was:" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001197 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001198 rm -rf conftest*
1199 eval "ac_cv_header_$ac_safe=no"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001200fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001201rm -f conftest*
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001202fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001203if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1204 echo "$ac_t""yes" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001205 MINIX=yes
1206else
Michael W. Hudson54241132001-12-07 15:38:26 +00001207 echo "$ac_t""no" 1>&6
1208MINIX=
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001209fi
1210
1211if test "$MINIX" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001212 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001213#define _POSIX_SOURCE 1
1214EOF
1215
Michael W. Hudson54241132001-12-07 15:38:26 +00001216 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001217#define _POSIX_1_SOURCE 2
1218EOF
1219
Michael W. Hudson54241132001-12-07 15:38:26 +00001220 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001221#define _MINIX 1
1222EOF
1223
1224fi
1225
1226
Michael W. Hudson54241132001-12-07 15:38:26 +00001227echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1228echo "configure:1229: checking for Cygwin environment" >&5
1229if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1230 echo $ac_n "(cached) $ac_c" 1>&6
1231else
1232 cat > conftest.$ac_ext <<EOF
1233#line 1234 "configure"
1234#include "confdefs.h"
1235
1236int main() {
1237
1238#ifndef __CYGWIN__
1239#define __CYGWIN__ __CYGWIN32__
1240#endif
1241return __CYGWIN__;
1242; return 0; }
1243EOF
1244if { (eval echo configure:1245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1245 rm -rf conftest*
1246 ac_cv_cygwin=yes
1247else
1248 echo "configure: failed program was:" >&5
1249 cat conftest.$ac_ext >&5
1250 rm -rf conftest*
1251 ac_cv_cygwin=no
1252fi
1253rm -f conftest*
1254rm -f conftest*
1255fi
1256
1257echo "$ac_t""$ac_cv_cygwin" 1>&6
1258CYGWIN=
1259test "$ac_cv_cygwin" = yes && CYGWIN=yes
1260echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1261echo "configure:1262: checking for mingw32 environment" >&5
1262if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1263 echo $ac_n "(cached) $ac_c" 1>&6
1264else
1265 cat > conftest.$ac_ext <<EOF
1266#line 1267 "configure"
1267#include "confdefs.h"
1268
1269int main() {
1270return __MINGW32__;
1271; return 0; }
1272EOF
1273if { (eval echo configure:1274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1274 rm -rf conftest*
1275 ac_cv_mingw32=yes
1276else
1277 echo "configure: failed program was:" >&5
1278 cat conftest.$ac_ext >&5
1279 rm -rf conftest*
1280 ac_cv_mingw32=no
1281fi
1282rm -f conftest*
1283rm -f conftest*
1284fi
1285
1286echo "$ac_t""$ac_cv_mingw32" 1>&6
1287MINGW32=
1288test "$ac_cv_mingw32" = yes && MINGW32=yes
1289
1290
1291echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1292echo "configure:1293: checking for executable suffix" >&5
1293if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1294 echo $ac_n "(cached) $ac_c" 1>&6
1295else
1296 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1297 ac_cv_exeext=.exe
1298else
1299 rm -f conftest*
1300 echo 'int main () { return 0; }' > conftest.$ac_ext
1301 ac_cv_exeext=
1302 if { (eval echo configure:1303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1303 for file in conftest.*; do
1304 case $file in
1305 *.c | *.o | *.obj) ;;
1306 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1307 esac
1308 done
1309 else
1310 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1311 fi
1312 rm -f conftest*
1313 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1314fi
1315fi
1316
1317EXEEXT=""
1318test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1319echo "$ac_t""${ac_cv_exeext}" 1>&6
1320ac_exeext=$EXEEXT
1321
1322echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
1323echo "configure:1324: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001324# Check whether --with-suffix or --without-suffix was given.
1325if test "${with_suffix+set}" = set; then
1326 withval="$with_suffix"
Michael W. Hudson54241132001-12-07 15:38:26 +00001327
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001328 case $withval in
1329 no) EXEEXT=;;
1330 yes) EXEEXT=.exe;;
1331 *) EXEEXT=$withval;;
1332 esac
Michael W. Hudson54241132001-12-07 15:38:26 +00001333fi
1334
1335echo "$ac_t""$EXEEXT" 1>&6
Jack Jansen1999ef42001-12-06 21:47:20 +00001336
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001337# Test whether we're running on a non-case-sensitive system, in which
1338# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00001339
Michael W. Hudson54241132001-12-07 15:38:26 +00001340echo $ac_n "checking for case-insensitive build directory""... $ac_c" 1>&6
1341echo "configure:1342: checking for case-insensitive build directory" >&5
Jack Jansen1999ef42001-12-06 21:47:20 +00001342if test -d "python"
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001343then
Michael W. Hudson54241132001-12-07 15:38:26 +00001344 echo "$ac_t""yes" 1>&6
Jack Jansen1999ef42001-12-06 21:47:20 +00001345 BUILDEXEEXT=.exe
1346else
Michael W. Hudson54241132001-12-07 15:38:26 +00001347 echo "$ac_t""no" 1>&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001348 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001349fi
Guido van Rossumff555e32000-09-22 15:38:21 +00001350
Guido van Rossumdd997f71998-10-07 19:58:26 +00001351case $MACHDEP in
1352bsdos*)
1353 case $CC in
1354 gcc) CC="$CC -D_HAVE_BSDI";;
1355 esac;;
1356esac
1357
Guido van Rossum24b1e751997-08-21 02:29:16 +00001358case $ac_sys_system in
1359hp*|HP*)
1360 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001361 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001362 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001363Monterey*)
1364 case $CC in
1365 cc) CC="$CC -Wl,-Bexport";;
1366 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001367SunOS*)
1368 # Some functions have a prototype only with that define, e.g. confstr
Michael W. Hudson54241132001-12-07 15:38:26 +00001369 cat >> confdefs.h <<\EOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001370#define __EXTENSIONS__ 1
1371EOF
1372
1373 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001374esac
1375
Michael W. Hudson54241132001-12-07 15:38:26 +00001376
1377
1378echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
1379echo "configure:1380: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001380if test -z "$LIBRARY"
1381then
1382 LIBRARY='libpython$(VERSION).a'
1383fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001384echo "$ac_t""$LIBRARY" 1>&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001385
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001386# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00001387# name of the library into which to insert object files). BLDLIBRARY is also
1388# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
1389# is blank as the main program is not linked directly against LDLIBRARY.
1390# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
1391# systems without shared libraries, LDLIBRARY is the same as LIBRARY
1392# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
1393# DLLLIBRARY is the shared (i.e., DLL) library.
Michael W. Hudson54241132001-12-07 15:38:26 +00001394#
1395
1396
1397
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001398
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001399LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00001400BLDLIBRARY='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00001401DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00001402LDLIBRARYDIR=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001403
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001404# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001405# If CXX is set, and if it is needed to link a main function that was
1406# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
1407# python might then depend on the C++ runtime
Michael W. Hudson54241132001-12-07 15:38:26 +00001408# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001409# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001410
Michael W. Hudson54241132001-12-07 15:38:26 +00001411echo $ac_n "checking LINKCC""... $ac_c" 1>&6
1412echo "configure:1413: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001413if test -z "$LINKCC"
1414then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001415 if test -z "$CXX"; then
1416 LINKCC="\$(PURIFY) \$(CC)"
1417 else
1418 echo 'int main(){return 0;}' > conftest.$ac_ext
1419 $CXX -c conftest.$ac_ext 2>&5
1420 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
1421 && test -s conftest$ac_exeext && ./conftest$ac_exeext
1422 then
1423 LINKCC="\$(PURIFY) \$(CC)"
1424 else
1425 LINKCC="\$(PURIFY) \$(CXX)"
1426 fi
1427 rm -fr conftest*
1428 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001429 case $ac_sys_system in
1430 AIX*)
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001431 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); $(LINKCC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001432 dgux*)
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001433 LINKCC="LD_RUN_PATH=$libdir $(LINKCC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001434 Monterey64*)
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00001435 LINKCC="$(LINKCC) -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001436 esac
1437fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001438echo "$ac_t""$LINKCC" 1>&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001439
Michael W. Hudson54241132001-12-07 15:38:26 +00001440echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
1441echo "configure:1442: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001442
1443# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001444case $MACHDEP in
1445dguxR4)
1446 LDLIBRARY='libpython$(VERSION).so'
1447 OPT="$OPT -pic"
1448 ;;
1449beos*)
1450 LDLIBRARY='libpython$(VERSION).so'
1451 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001452cygwin*)
1453 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001454 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001455 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001456esac
Jack Jansene578a632001-08-15 01:27:14 +00001457
Guido van Rossumb8552162001-09-05 14:58:11 +00001458# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
1459# library that we build, but we do not want to link against it (we
1460# will find it with a -framework option). For this reason there is an
1461# extra variable BLDLIBRARY against which Python and the extension
1462# modules are linked, BLDLIBRARY. This is normally the same as
1463# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00001464if test "$enable_framework"
1465then
1466 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
1467 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
1468 BLDLIBRARY=''
1469else
1470 BLDLIBRARY='$(LDLIBRARY)'
Michael W. Hudson54241132001-12-07 15:38:26 +00001471fi
Jack Jansene578a632001-08-15 01:27:14 +00001472
Michael W. Hudson54241132001-12-07 15:38:26 +00001473echo "$ac_t""$LDLIBRARY" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001474
Michael W. Hudson54241132001-12-07 15:38:26 +00001475# Extract the first word of "ranlib", so it can be a program name with args.
1476set dummy ranlib; ac_word=$2
1477echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1478echo "configure:1479: checking for $ac_word" >&5
1479if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1480 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001481else
1482 if test -n "$RANLIB"; then
1483 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1484else
Michael W. Hudson54241132001-12-07 15:38:26 +00001485 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1486 ac_dummy="$PATH"
1487 for ac_dir in $ac_dummy; do
1488 test -z "$ac_dir" && ac_dir=.
1489 if test -f $ac_dir/$ac_word; then
1490 ac_cv_prog_RANLIB="ranlib"
1491 break
1492 fi
1493 done
1494 IFS="$ac_save_ifs"
1495 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001496fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001497fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001498RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001499if test -n "$RANLIB"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001500 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001501else
Michael W. Hudson54241132001-12-07 15:38:26 +00001502 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001503fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001504
1505
Guido van Rossum7f43da71994-08-01 12:15:30 +00001506for ac_prog in ar aal
1507do
Michael W. Hudson54241132001-12-07 15:38:26 +00001508# Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001509set dummy $ac_prog; ac_word=$2
Michael W. Hudson54241132001-12-07 15:38:26 +00001510echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1511echo "configure:1512: checking for $ac_word" >&5
1512if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
1513 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001514else
1515 if test -n "$AR"; then
1516 ac_cv_prog_AR="$AR" # Let the user override the test.
1517else
Michael W. Hudson54241132001-12-07 15:38:26 +00001518 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1519 ac_dummy="$PATH"
1520 for ac_dir in $ac_dummy; do
1521 test -z "$ac_dir" && ac_dir=.
1522 if test -f $ac_dir/$ac_word; then
1523 ac_cv_prog_AR="$ac_prog"
1524 break
1525 fi
1526 done
1527 IFS="$ac_save_ifs"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001528fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001529fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001530AR="$ac_cv_prog_AR"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531if test -n "$AR"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001532 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001533else
Michael W. Hudson54241132001-12-07 15:38:26 +00001534 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001535fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001536
Michael W. Hudson54241132001-12-07 15:38:26 +00001537test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00001538done
1539test -n "$AR" || AR="ar"
1540
Michael W. Hudson54241132001-12-07 15:38:26 +00001541
Neil Schemenauera42c8272001-03-31 00:01:55 +00001542case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00001543bsdos*|hp*|HP*)
1544 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00001545 if test -z "$INSTALL"
1546 then
1547 INSTALL="${srcdir}/install-sh -c"
1548 fi
1549esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001550ac_aux_dir=
1551for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1552 if test -f $ac_dir/install-sh; then
1553 ac_aux_dir=$ac_dir
1554 ac_install_sh="$ac_aux_dir/install-sh -c"
1555 break
1556 elif test -f $ac_dir/install.sh; then
1557 ac_aux_dir=$ac_dir
1558 ac_install_sh="$ac_aux_dir/install.sh -c"
1559 break
1560 fi
1561done
1562if test -z "$ac_aux_dir"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001563 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001564fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001565ac_config_guess=$ac_aux_dir/config.guess
1566ac_config_sub=$ac_aux_dir/config.sub
1567ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001568
1569# Find a good install program. We prefer a C program (faster),
1570# so one script is as good as another. But avoid the broken or
1571# incompatible versions:
1572# SysV /etc/install, /usr/sbin/install
1573# SunOS /usr/etc/install
1574# IRIX /sbin/install
1575# AIX /bin/install
1576# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1577# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1578# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1579# ./install, which can be erroneously created by make from ./install.sh.
Michael W. Hudson54241132001-12-07 15:38:26 +00001580echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1581echo "configure:1582: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001582if test -z "$INSTALL"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001583if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1584 echo $ac_n "(cached) $ac_c" 1>&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001585else
Michael W. Hudson54241132001-12-07 15:38:26 +00001586 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001587 for ac_dir in $PATH; do
1588 # Account for people who put trailing slashes in PATH elements.
Michael W. Hudson54241132001-12-07 15:38:26 +00001589 case "$ac_dir/" in
1590 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001591 *)
1592 # OSF1 and SCO ODT 3.0 have their own names for install.
1593 # Don't use installbsd from OSF since it installs stuff as root
1594 # by default.
1595 for ac_prog in ginstall scoinst install; do
Michael W. Hudson54241132001-12-07 15:38:26 +00001596 if test -f $ac_dir/$ac_prog; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001597 if test $ac_prog = install &&
Michael W. Hudson54241132001-12-07 15:38:26 +00001598 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001599 # AIX install. It has an incompatible calling convention.
1600 :
1601 else
1602 ac_cv_path_install="$ac_dir/$ac_prog -c"
1603 break 2
1604 fi
1605 fi
1606 done
1607 ;;
1608 esac
1609 done
Michael W. Hudson54241132001-12-07 15:38:26 +00001610 IFS="$ac_save_IFS"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001611
1612fi
1613 if test "${ac_cv_path_install+set}" = set; then
Michael W. Hudson54241132001-12-07 15:38:26 +00001614 INSTALL="$ac_cv_path_install"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001615 else
1616 # As a last resort, use the slow shell script. We don't cache a
1617 # path for INSTALL within a source directory, because that will
1618 # break other packages using the cache if that directory is
1619 # removed, or if the path is relative.
Michael W. Hudson54241132001-12-07 15:38:26 +00001620 INSTALL="$ac_install_sh"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001621 fi
1622fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001623echo "$ac_t""$INSTALL" 1>&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001624
1625# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1626# It thinks the first close brace ends the variable substitution.
1627test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1628
Michael W. Hudson54241132001-12-07 15:38:26 +00001629test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001630
1631test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1632
Michael W. Hudson54241132001-12-07 15:38:26 +00001633
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001634# Not every filesystem supports hard links
1635
1636if test -z "$LN" ; then
1637 case $ac_sys_system in
1638 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001639 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001640 *) LN=ln;;
1641 esac
1642fi
1643
Fred Drake109d9862001-07-11 06:27:56 +00001644# Check for --with-pydebug
Michael W. Hudson54241132001-12-07 15:38:26 +00001645echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
1646echo "configure:1647: checking for --with-pydebug" >&5
Fred Drake109d9862001-07-11 06:27:56 +00001647# Check whether --with-pydebug or --without-pydebug was given.
1648if test "${with_pydebug+set}" = set; then
1649 withval="$with_pydebug"
Michael W. Hudson54241132001-12-07 15:38:26 +00001650
Fred Drake109d9862001-07-11 06:27:56 +00001651if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00001652then cat >> confdefs.h <<\EOF
Fred Drake109d9862001-07-11 06:27:56 +00001653#define Py_DEBUG 1
1654EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00001655 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1656else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00001657fi
1658else
Michael W. Hudson54241132001-12-07 15:38:26 +00001659 echo "$ac_t""no" 1>&6
1660fi
1661
Fred Drake109d9862001-07-11 06:27:56 +00001662
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001663# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001664
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001665if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001666then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001667 case $GCC in
1668 yes)
1669 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001670 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001671 if test "$Py_DEBUG" = 'true' ; then
1672 # Optimization messes up debuggers, so turn it off for
1673 # debug builds.
1674 OPT="-g -Wall -Wstrict-prototypes"
1675 else
1676 OPT="-g -O3 -Wall -Wstrict-prototypes"
1677 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001678 *)
Fred Drake109d9862001-07-11 06:27:56 +00001679 OPT="-O3 -Wall -Wstrict-prototypes";;
1680 esac
1681 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001682 *)
1683 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00001684 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001685 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1686 *)
1687 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001688 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001689 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00001690 case $ac_sys_system in
1691 Darwin*)
1692 OPT="$OPT -no-cpp-precomp";;
1693 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001694fi
1695
Fred Drakee1ceaa02001-12-04 20:55:47 +00001696if test "$Py_DEBUG" = 'true'; then
1697 :
1698else
1699 OPT="-DNDEBUG $OPT"
1700fi
1701
Trent Mick635f6fb2000-08-23 21:33:05 +00001702# The current (beta) Monterey compiler dies with optimizations
1703case $ac_sys_system in
1704Monterey*) OPT="";;
1705esac
1706
Guido van Rossum563e7081996-09-10 18:20:48 +00001707if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001708then
1709 OPT="$OPT $ac_arch_flags"
1710fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00001711
Michael W. Hudson54241132001-12-07 15:38:26 +00001712echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
1713echo "configure:1714: checking whether $CC accepts -OPT:Olimit=0" >&5
1714if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
1715 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum91922671997-10-09 20:24:13 +00001716else
1717 ac_save_cc="$CC"
1718CC="$CC -OPT:Olimit=0"
1719if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001720 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00001721else
Michael W. Hudson54241132001-12-07 15:38:26 +00001722 cat > conftest.$ac_ext <<EOF
1723#line 1724 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001724#include "confdefs.h"
1725int main() { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001726EOF
1727if { (eval echo configure:1728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1728then
Guido van Rossum91922671997-10-09 20:24:13 +00001729 ac_cv_opt_olimit_ok=yes
1730else
Michael W. Hudson54241132001-12-07 15:38:26 +00001731 echo "configure: failed program was:" >&5
1732 cat conftest.$ac_ext >&5
1733 rm -fr conftest*
1734 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00001735fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001736rm -fr conftest*
Guido van Rossum91922671997-10-09 20:24:13 +00001737fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001738
Guido van Rossum91922671997-10-09 20:24:13 +00001739CC="$ac_save_cc"
1740fi
1741
Michael W. Hudson54241132001-12-07 15:38:26 +00001742echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001743if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001744 case $ac_sys_system in
1745 Darwin*) OPT="$OPT" ;;
1746 *) OPT="$OPT -OPT:Olimit=0";;
1747 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001748else
Michael W. Hudson54241132001-12-07 15:38:26 +00001749 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
1750echo "configure:1751: checking whether $CC accepts -Olimit 1500" >&5
1751 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
1752 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001753else
1754 ac_save_cc="$CC"
1755 CC="$CC -Olimit 1500"
1756 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001757 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001758else
Michael W. Hudson54241132001-12-07 15:38:26 +00001759 cat > conftest.$ac_ext <<EOF
1760#line 1761 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001761#include "confdefs.h"
1762int main() { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001763EOF
1764if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1765then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001766 ac_cv_olimit_ok=yes
1767else
Michael W. Hudson54241132001-12-07 15:38:26 +00001768 echo "configure: failed program was:" >&5
1769 cat conftest.$ac_ext >&5
1770 rm -fr conftest*
1771 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001772fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001773rm -fr conftest*
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001774fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001775
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001776 CC="$ac_save_cc"
1777fi
1778
Michael W. Hudson54241132001-12-07 15:38:26 +00001779 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001780 if test $ac_cv_olimit_ok = yes; then
1781 OPT="$OPT -Olimit 1500"
1782 fi
1783fi
1784
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001785# On some compilers, pthreads are available without further options
1786# (e.g. MacOS X). On some of these systems, the compiler will not
1787# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
1788# So we have to see first whether pthreads are available without
1789# options before we can check whether -Kpthread improves anything.
Michael W. Hudson54241132001-12-07 15:38:26 +00001790echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6
1791echo "configure:1792: checking whether pthreads are available without options" >&5
1792if eval "test \"`echo '$''{'ac_cv_pthread_is_default'+set}'`\" = set"; then
1793 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00001794else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001795 if test "$cross_compiling" = yes; then
1796 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001797else
Michael W. Hudson54241132001-12-07 15:38:26 +00001798 cat > conftest.$ac_ext <<EOF
1799#line 1800 "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00001800#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001801
Martin v. Löwis130fb172001-07-19 11:00:41 +00001802#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001803
1804void* routine(void* p){return NULL;}
1805
1806int main(){
1807 pthread_t p;
1808 if(pthread_create(&p,NULL,routine,NULL)!=0)
1809 return 1;
1810 return 0;
1811}
1812
Michael W. Hudson54241132001-12-07 15:38:26 +00001813EOF
1814if { (eval echo configure:1815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1815then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001816 ac_cv_pthread_is_default=yes
1817else
Michael W. Hudson54241132001-12-07 15:38:26 +00001818 echo "configure: failed program was:" >&5
1819 cat conftest.$ac_ext >&5
1820 rm -fr conftest*
1821 ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001822fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001823rm -fr conftest*
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001824fi
1825
Michael W. Hudson54241132001-12-07 15:38:26 +00001826
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001827fi
1828
Michael W. Hudson54241132001-12-07 15:38:26 +00001829echo "$ac_t""$ac_cv_pthread_is_default" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001830
Michael W. Hudson54241132001-12-07 15:38:26 +00001831
1832if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001833then
1834 ac_cv_kpthread=no
1835else
1836# -Kpthread, if available, provides the right #defines
1837# and linker options to make pthread_create available
1838# Some compilers won't report that they do not support -Kpthread,
1839# so we need to run a program to see whether it really made the
1840# function available.
Michael W. Hudson54241132001-12-07 15:38:26 +00001841echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
1842echo "configure:1843: checking whether $CC accepts -Kpthread" >&5
1843if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1844 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001845else
1846 ac_save_cc="$CC"
1847CC="$CC -Kpthread"
1848if test "$cross_compiling" = yes; then
1849 ac_cv_kpthread=no
1850else
Michael W. Hudson54241132001-12-07 15:38:26 +00001851 cat > conftest.$ac_ext <<EOF
1852#line 1853 "configure"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001853#include "confdefs.h"
1854
1855#include <pthread.h>
1856
1857void* routine(void* p){return NULL;}
1858
1859int main(){
1860 pthread_t p;
1861 if(pthread_create(&p,NULL,routine,NULL)!=0)
1862 return 1;
1863 return 0;
1864}
1865
Michael W. Hudson54241132001-12-07 15:38:26 +00001866EOF
1867if { (eval echo configure:1868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1868then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001869 ac_cv_kpthread=yes
1870else
Michael W. Hudson54241132001-12-07 15:38:26 +00001871 echo "configure: failed program was:" >&5
1872 cat conftest.$ac_ext >&5
1873 rm -fr conftest*
1874 ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00001875fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001876rm -fr conftest*
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001877fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001878
Martin v. Löwis130fb172001-07-19 11:00:41 +00001879CC="$ac_save_cc"
1880fi
1881
Michael W. Hudson54241132001-12-07 15:38:26 +00001882echo "$ac_t""$ac_cv_kpthread" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001883fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00001884
Michael W. Hudson54241132001-12-07 15:38:26 +00001885
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001886# checks for header files
Michael W. Hudson54241132001-12-07 15:38:26 +00001887echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
1888echo "configure:1889: checking for ANSI C header files" >&5
1889if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
1890 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001891else
Michael W. Hudson54241132001-12-07 15:38:26 +00001892 cat > conftest.$ac_ext <<EOF
1893#line 1894 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001894#include "confdefs.h"
1895#include <stdlib.h>
1896#include <stdarg.h>
1897#include <string.h>
1898#include <float.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001899EOF
1900ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1901{ (eval echo configure:1902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1902ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1903if test -z "$ac_err"; then
1904 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001905 ac_cv_header_stdc=yes
1906else
Michael W. Hudson54241132001-12-07 15:38:26 +00001907 echo "$ac_err" >&5
1908 echo "configure: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001909 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00001910 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001911 ac_cv_header_stdc=no
1912fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001913rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001914
1915if test $ac_cv_header_stdc = yes; then
1916 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Michael W. Hudson54241132001-12-07 15:38:26 +00001917cat > conftest.$ac_ext <<EOF
1918#line 1919 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001919#include "confdefs.h"
1920#include <string.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001921EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1923 egrep "memchr" >/dev/null 2>&1; then
1924 :
1925else
Michael W. Hudson54241132001-12-07 15:38:26 +00001926 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001927 ac_cv_header_stdc=no
1928fi
1929rm -f conftest*
1930
1931fi
1932
1933if test $ac_cv_header_stdc = yes; then
1934 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Michael W. Hudson54241132001-12-07 15:38:26 +00001935cat > conftest.$ac_ext <<EOF
1936#line 1937 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001937#include "confdefs.h"
1938#include <stdlib.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001939EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001940if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1941 egrep "free" >/dev/null 2>&1; then
1942 :
1943else
Michael W. Hudson54241132001-12-07 15:38:26 +00001944 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001945 ac_cv_header_stdc=no
1946fi
1947rm -f conftest*
1948
1949fi
1950
1951if test $ac_cv_header_stdc = yes; then
1952 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Michael W. Hudson54241132001-12-07 15:38:26 +00001953if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001954 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001955else
Michael W. Hudson54241132001-12-07 15:38:26 +00001956 cat > conftest.$ac_ext <<EOF
1957#line 1958 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001958#include "confdefs.h"
1959#include <ctype.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00001960#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1961#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Jack Jansendd19cf82001-12-06 22:36:17 +00001962#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Michael W. Hudson54241132001-12-07 15:38:26 +00001963int main () { int i; for (i = 0; i < 256; i++)
1964if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1965exit (0); }
1966
1967EOF
1968if { (eval echo configure:1969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1969then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001970 :
1971else
Michael W. Hudson54241132001-12-07 15:38:26 +00001972 echo "configure: failed program was:" >&5
1973 cat conftest.$ac_ext >&5
1974 rm -fr conftest*
1975 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001976fi
Michael W. Hudson54241132001-12-07 15:38:26 +00001977rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00001978fi
Jack Jansendd19cf82001-12-06 22:36:17 +00001979
Michael W. Hudson54241132001-12-07 15:38:26 +00001980fi
1981fi
1982
1983echo "$ac_t""$ac_cv_header_stdc" 1>&6
1984if test $ac_cv_header_stdc = yes; then
1985 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001986#define STDC_HEADERS 1
1987EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001988
1989fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001990
Michael W. Hudson54241132001-12-07 15:38:26 +00001991for ac_hdr in dlfcn.h fcntl.h grp.h limits.h langinfo.h locale.h \
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001992ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00001993signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00001994sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00001995sys/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 +00001996sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00001997ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001998do
Michael W. Hudson54241132001-12-07 15:38:26 +00001999ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2000echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2001echo "configure:2002: checking for $ac_hdr" >&5
2002if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2003 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002004else
Michael W. Hudson54241132001-12-07 15:38:26 +00002005 cat > conftest.$ac_ext <<EOF
2006#line 2007 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002007#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002008#include <$ac_hdr>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002009EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002010ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2011{ (eval echo configure:2012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2012ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2013if test -z "$ac_err"; then
2014 rm -rf conftest*
2015 eval "ac_cv_header_$ac_safe=yes"
2016else
2017 echo "$ac_err" >&5
2018 echo "configure: failed program was:" >&5
2019 cat conftest.$ac_ext >&5
2020 rm -rf conftest*
2021 eval "ac_cv_header_$ac_safe=no"
2022fi
2023rm -f conftest*
2024fi
2025if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2026 echo "$ac_t""yes" 1>&6
2027 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2028 cat >> confdefs.h <<EOF
2029#define $ac_tr_hdr 1
2030EOF
2031
2032else
2033 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002034fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002035done
2036
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002037ac_header_dirent=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002038for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2039do
2040ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2041echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
2042echo "configure:2043: checking for $ac_hdr that defines DIR" >&5
2043if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
2044 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002045else
Michael W. Hudson54241132001-12-07 15:38:26 +00002046 cat > conftest.$ac_ext <<EOF
2047#line 2048 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002048#include "confdefs.h"
2049#include <sys/types.h>
2050#include <$ac_hdr>
Michael W. Hudson54241132001-12-07 15:38:26 +00002051int main() {
2052DIR *dirp = 0;
2053; return 0; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002054EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002055if { (eval echo configure:2056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2056 rm -rf conftest*
2057 eval "ac_cv_header_dirent_$ac_safe=yes"
2058else
2059 echo "configure: failed program was:" >&5
2060 cat conftest.$ac_ext >&5
2061 rm -rf conftest*
2062 eval "ac_cv_header_dirent_$ac_safe=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002063fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002064rm -f conftest*
2065fi
2066if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
2067 echo "$ac_t""yes" 1>&6
2068 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2069 cat >> confdefs.h <<EOF
2070#define $ac_tr_hdr 1
2071EOF
2072 ac_header_dirent=$ac_hdr; break
2073else
2074 echo "$ac_t""no" 1>&6
2075fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002076done
2077# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2078if test $ac_header_dirent = dirent.h; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002079echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
2080echo "configure:2081: checking for opendir in -ldir" >&5
2081ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
2082if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2083 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002084else
Michael W. Hudson54241132001-12-07 15:38:26 +00002085 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002086LIBS="-ldir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00002087cat > conftest.$ac_ext <<EOF
2088#line 2089 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002089#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002090/* Override any gcc2 internal prototype to avoid an error. */
2091/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00002092 builtin and then its argument prototype would still apply. */
2093char opendir();
2094
2095int main() {
2096opendir()
2097; return 0; }
2098EOF
2099if { (eval echo configure:2100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2100 rm -rf conftest*
2101 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002102else
Michael W. Hudson54241132001-12-07 15:38:26 +00002103 echo "configure: failed program was:" >&5
2104 cat conftest.$ac_ext >&5
2105 rm -rf conftest*
2106 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002107fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002108rm -f conftest*
2109LIBS="$ac_save_LIBS"
2110
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002111fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002112if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2113 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002114 LIBS="$LIBS -ldir"
Michael W. Hudson54241132001-12-07 15:38:26 +00002115else
2116 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002117fi
2118
2119else
Michael W. Hudson54241132001-12-07 15:38:26 +00002120echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
2121echo "configure:2122: checking for opendir in -lx" >&5
2122ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
2123if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2124 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002125else
Michael W. Hudson54241132001-12-07 15:38:26 +00002126 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002127LIBS="-lx $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00002128cat > conftest.$ac_ext <<EOF
2129#line 2130 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002130#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002131/* Override any gcc2 internal prototype to avoid an error. */
2132/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00002133 builtin and then its argument prototype would still apply. */
2134char opendir();
2135
2136int main() {
2137opendir()
2138; return 0; }
2139EOF
2140if { (eval echo configure:2141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2141 rm -rf conftest*
2142 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002143else
Michael W. Hudson54241132001-12-07 15:38:26 +00002144 echo "configure: failed program was:" >&5
2145 cat conftest.$ac_ext >&5
2146 rm -rf conftest*
2147 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002148fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002149rm -f conftest*
2150LIBS="$ac_save_LIBS"
2151
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002152fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002153if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2154 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002155 LIBS="$LIBS -lx"
Michael W. Hudson54241132001-12-07 15:38:26 +00002156else
2157 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002158fi
2159
2160fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002161
Michael W. Hudson54241132001-12-07 15:38:26 +00002162
Guido van Rossum627b2d71993-12-24 10:39:16 +00002163# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002164was_it_defined=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002165echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
2166echo "configure:2167: checking for clock_t in time.h" >&5
2167cat > conftest.$ac_ext <<EOF
2168#line 2169 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002169#include "confdefs.h"
2170#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002171EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002172if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2173 egrep "clock_t" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002174 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00002175 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002176else
Michael W. Hudson54241132001-12-07 15:38:26 +00002177 rm -rf conftest*
2178 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002179#define clock_t long
2180EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002181
2182fi
2183rm -f conftest*
2184
Michael W. Hudson54241132001-12-07 15:38:26 +00002185echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002186
Guido van Rossum810cc512001-09-09 23:51:39 +00002187# Two defines needed to enable largefile support on various platforms
2188# These may affect some typedefs
Michael W. Hudson54241132001-12-07 15:38:26 +00002189cat >> confdefs.h <<\EOF
Guido van Rossum810cc512001-09-09 23:51:39 +00002190#define _LARGEFILE_SOURCE 1
2191EOF
2192
Michael W. Hudson54241132001-12-07 15:38:26 +00002193cat >> confdefs.h <<\EOF
Guido van Rossum810cc512001-09-09 23:51:39 +00002194#define _FILE_OFFSET_BITS 64
2195EOF
2196
Michael W. Hudson54241132001-12-07 15:38:26 +00002197
Guido van Rossum84e7b241996-08-19 21:59:00 +00002198# Add some code to confdefs.h so that the test for off_t works on SCO
2199cat >> confdefs.h <<\EOF
2200#if defined(SCO_DS)
2201#undef _OFF_T
2202#endif
2203EOF
2204
Guido van Rossumef2255b2000-03-10 22:30:29 +00002205# Type availability checks
Michael W. Hudson54241132001-12-07 15:38:26 +00002206echo $ac_n "checking for mode_t""... $ac_c" 1>&6
2207echo "configure:2208: checking for mode_t" >&5
2208if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
2209 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002210else
Michael W. Hudson54241132001-12-07 15:38:26 +00002211 cat > conftest.$ac_ext <<EOF
2212#line 2213 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002213#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002214#include <sys/types.h>
2215#if STDC_HEADERS
2216#include <stdlib.h>
2217#include <stddef.h>
2218#endif
Jack Jansendd19cf82001-12-06 22:36:17 +00002219EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00002220if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2221 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2222 rm -rf conftest*
Jack Jansendd19cf82001-12-06 22:36:17 +00002223 ac_cv_type_mode_t=yes
2224else
Michael W. Hudson54241132001-12-07 15:38:26 +00002225 rm -rf conftest*
2226 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00002227fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002228rm -f conftest*
Jack Jansendd19cf82001-12-06 22:36:17 +00002229
Michael W. Hudson54241132001-12-07 15:38:26 +00002230fi
2231echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2232if test $ac_cv_type_mode_t = no; then
2233 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002234#define mode_t int
2235EOF
2236
2237fi
2238
Michael W. Hudson54241132001-12-07 15:38:26 +00002239echo $ac_n "checking for off_t""... $ac_c" 1>&6
2240echo "configure:2241: checking for off_t" >&5
2241if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
2242 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002243else
Michael W. Hudson54241132001-12-07 15:38:26 +00002244 cat > conftest.$ac_ext <<EOF
2245#line 2246 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002246#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002247#include <sys/types.h>
2248#if STDC_HEADERS
2249#include <stdlib.h>
2250#include <stddef.h>
2251#endif
2252EOF
2253if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2254 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2255 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002256 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002257else
Michael W. Hudson54241132001-12-07 15:38:26 +00002258 rm -rf conftest*
2259 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002260fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002261rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002262
Michael W. Hudson54241132001-12-07 15:38:26 +00002263fi
2264echo "$ac_t""$ac_cv_type_off_t" 1>&6
2265if test $ac_cv_type_off_t = no; then
2266 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002267#define off_t long
2268EOF
2269
2270fi
2271
Michael W. Hudson54241132001-12-07 15:38:26 +00002272echo $ac_n "checking for pid_t""... $ac_c" 1>&6
2273echo "configure:2274: checking for pid_t" >&5
2274if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
2275 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002276else
Michael W. Hudson54241132001-12-07 15:38:26 +00002277 cat > conftest.$ac_ext <<EOF
2278#line 2279 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002279#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002280#include <sys/types.h>
2281#if STDC_HEADERS
2282#include <stdlib.h>
2283#include <stddef.h>
2284#endif
2285EOF
2286if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2287 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2288 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002289 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002290else
Michael W. Hudson54241132001-12-07 15:38:26 +00002291 rm -rf conftest*
2292 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002293fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002294rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002295
Michael W. Hudson54241132001-12-07 15:38:26 +00002296fi
2297echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2298if test $ac_cv_type_pid_t = no; then
2299 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002300#define pid_t int
2301EOF
2302
2303fi
2304
Michael W. Hudson54241132001-12-07 15:38:26 +00002305echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
2306echo "configure:2307: checking return type of signal handlers" >&5
2307if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
2308 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002309else
Michael W. Hudson54241132001-12-07 15:38:26 +00002310 cat > conftest.$ac_ext <<EOF
2311#line 2312 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002312#include "confdefs.h"
2313#include <sys/types.h>
2314#include <signal.h>
2315#ifdef signal
Michael W. Hudson54241132001-12-07 15:38:26 +00002316#undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00002317#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002318#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002319extern "C" void (*signal (int, void (*)(int)))(int);
2320#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002321void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002322#endif
2323
Michael W. Hudson54241132001-12-07 15:38:26 +00002324int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002325int i;
Michael W. Hudson54241132001-12-07 15:38:26 +00002326; return 0; }
2327EOF
2328if { (eval echo configure:2329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2329 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002330 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002331else
Michael W. Hudson54241132001-12-07 15:38:26 +00002332 echo "configure: failed program was:" >&5
2333 cat conftest.$ac_ext >&5
2334 rm -rf conftest*
2335 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002336fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002337rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002338fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002339
Michael W. Hudson54241132001-12-07 15:38:26 +00002340echo "$ac_t""$ac_cv_type_signal" 1>&6
2341cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002342#define RETSIGTYPE $ac_cv_type_signal
2343EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002344
Michael W. Hudson54241132001-12-07 15:38:26 +00002345
2346echo $ac_n "checking for size_t""... $ac_c" 1>&6
2347echo "configure:2348: checking for size_t" >&5
2348if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
2349 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002350else
Michael W. Hudson54241132001-12-07 15:38:26 +00002351 cat > conftest.$ac_ext <<EOF
2352#line 2353 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002353#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002354#include <sys/types.h>
2355#if STDC_HEADERS
2356#include <stdlib.h>
2357#include <stddef.h>
2358#endif
2359EOF
2360if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2361 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
2362 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002363 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002364else
Michael W. Hudson54241132001-12-07 15:38:26 +00002365 rm -rf conftest*
2366 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002367fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002368rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002369
Michael W. Hudson54241132001-12-07 15:38:26 +00002370fi
2371echo "$ac_t""$ac_cv_type_size_t" 1>&6
2372if test $ac_cv_type_size_t = no; then
2373 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002374#define size_t unsigned
2375EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002376
2377fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002378
Michael W. Hudson54241132001-12-07 15:38:26 +00002379echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
2380echo "configure:2381: checking for uid_t in sys/types.h" >&5
2381if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
2382 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002383else
Michael W. Hudson54241132001-12-07 15:38:26 +00002384 cat > conftest.$ac_ext <<EOF
2385#line 2386 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002386#include "confdefs.h"
2387#include <sys/types.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002388EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002389if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2390 egrep "uid_t" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002391 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002392 ac_cv_type_uid_t=yes
2393else
Michael W. Hudson54241132001-12-07 15:38:26 +00002394 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002395 ac_cv_type_uid_t=no
2396fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002397rm -f conftest*
2398
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002399fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002400
Michael W. Hudson54241132001-12-07 15:38:26 +00002401echo "$ac_t""$ac_cv_type_uid_t" 1>&6
2402if test $ac_cv_type_uid_t = no; then
2403 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002404#define uid_t int
2405EOF
2406
Michael W. Hudson54241132001-12-07 15:38:26 +00002407 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002408#define gid_t int
2409EOF
2410
2411fi
2412
Jack Jansendd19cf82001-12-06 22:36:17 +00002413
Michael W. Hudson54241132001-12-07 15:38:26 +00002414# Sizes of various common basic types
2415echo $ac_n "checking size of int""... $ac_c" 1>&6
2416echo "configure:2417: checking size of int" >&5
2417if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
2418 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002419else
2420 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002421 ac_cv_sizeof_int=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002422else
Michael W. Hudson54241132001-12-07 15:38:26 +00002423 cat > conftest.$ac_ext <<EOF
2424#line 2425 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002425#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002426#include <stdio.h>
2427main()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002428{
Michael W. Hudson54241132001-12-07 15:38:26 +00002429 FILE *f=fopen("conftestval", "w");
2430 if (!f) exit(1);
2431 fprintf(f, "%d\n", sizeof(int));
2432 exit(0);
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002433}
Michael W. Hudson54241132001-12-07 15:38:26 +00002434EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002435if { (eval echo configure:2436: \"$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 +00002436then
2437 ac_cv_sizeof_int=`cat conftestval`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002438else
Michael W. Hudson54241132001-12-07 15:38:26 +00002439 echo "configure: failed program was:" >&5
2440 cat conftest.$ac_ext >&5
2441 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002442 ac_cv_sizeof_int=0
2443fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002444rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002445fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002446
2447fi
2448echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2449cat >> confdefs.h <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002450#define SIZEOF_INT $ac_cv_sizeof_int
2451EOF
2452
2453
Michael W. Hudson54241132001-12-07 15:38:26 +00002454echo $ac_n "checking size of long""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002455echo "configure:2456: checking size of long" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002456if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
2457 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002458else
2459 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002460 ac_cv_sizeof_long=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002461else
Michael W. Hudson54241132001-12-07 15:38:26 +00002462 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002463#line 2464 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002464#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002465#include <stdio.h>
2466main()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002467{
Michael W. Hudson54241132001-12-07 15:38:26 +00002468 FILE *f=fopen("conftestval", "w");
2469 if (!f) exit(1);
2470 fprintf(f, "%d\n", sizeof(long));
2471 exit(0);
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002472}
Michael W. Hudson54241132001-12-07 15:38:26 +00002473EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002474if { (eval echo configure:2475: \"$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 +00002475then
2476 ac_cv_sizeof_long=`cat conftestval`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002477else
Michael W. Hudson54241132001-12-07 15:38:26 +00002478 echo "configure: failed program was:" >&5
2479 cat conftest.$ac_ext >&5
2480 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002481 ac_cv_sizeof_long=0
2482fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002483rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002484fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002485
2486fi
2487echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2488cat >> confdefs.h <<EOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002489#define SIZEOF_LONG $ac_cv_sizeof_long
2490EOF
2491
2492
Michael W. Hudson54241132001-12-07 15:38:26 +00002493echo $ac_n "checking size of void *""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002494echo "configure:2495: checking size of void *" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002495if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
2496 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002497else
2498 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002499 ac_cv_sizeof_void_p=4
Guido van Rossumad678af1998-10-02 14:42:15 +00002500else
Michael W. Hudson54241132001-12-07 15:38:26 +00002501 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002502#line 2503 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002503#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002504#include <stdio.h>
2505main()
Guido van Rossumad678af1998-10-02 14:42:15 +00002506{
Michael W. Hudson54241132001-12-07 15:38:26 +00002507 FILE *f=fopen("conftestval", "w");
2508 if (!f) exit(1);
2509 fprintf(f, "%d\n", sizeof(void *));
2510 exit(0);
Guido van Rossumad678af1998-10-02 14:42:15 +00002511}
Michael W. Hudson54241132001-12-07 15:38:26 +00002512EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002513if { (eval echo configure:2514: \"$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 +00002514then
2515 ac_cv_sizeof_void_p=`cat conftestval`
Guido van Rossumad678af1998-10-02 14:42:15 +00002516else
Michael W. Hudson54241132001-12-07 15:38:26 +00002517 echo "configure: failed program was:" >&5
2518 cat conftest.$ac_ext >&5
2519 rm -fr conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00002520 ac_cv_sizeof_void_p=0
2521fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002522rm -fr conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00002523fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002524
2525fi
2526echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2527cat >> confdefs.h <<EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00002528#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2529EOF
2530
2531
Michael W. Hudson54241132001-12-07 15:38:26 +00002532echo $ac_n "checking size of char""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002533echo "configure:2534: checking size of char" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002534if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
2535 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002536else
2537 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002538 ac_cv_sizeof_char=1
Guido van Rossumef2255b2000-03-10 22:30:29 +00002539else
Michael W. Hudson54241132001-12-07 15:38:26 +00002540 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002541#line 2542 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002542#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002543#include <stdio.h>
2544main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002545{
Michael W. Hudson54241132001-12-07 15:38:26 +00002546 FILE *f=fopen("conftestval", "w");
2547 if (!f) exit(1);
2548 fprintf(f, "%d\n", sizeof(char));
2549 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002550}
Michael W. Hudson54241132001-12-07 15:38:26 +00002551EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002552if { (eval echo configure:2553: \"$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 +00002553then
2554 ac_cv_sizeof_char=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002555else
Michael W. Hudson54241132001-12-07 15:38:26 +00002556 echo "configure: failed program was:" >&5
2557 cat conftest.$ac_ext >&5
2558 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002559 ac_cv_sizeof_char=0
2560fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002561rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002562fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002563
2564fi
2565echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2566cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002567#define SIZEOF_CHAR $ac_cv_sizeof_char
2568EOF
2569
2570
Michael W. Hudson54241132001-12-07 15:38:26 +00002571echo $ac_n "checking size of short""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002572echo "configure:2573: checking size of short" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002573if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
2574 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002575else
2576 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002577 ac_cv_sizeof_short=2
Guido van Rossumef2255b2000-03-10 22:30:29 +00002578else
Michael W. Hudson54241132001-12-07 15:38:26 +00002579 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002580#line 2581 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002581#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002582#include <stdio.h>
2583main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002584{
Michael W. Hudson54241132001-12-07 15:38:26 +00002585 FILE *f=fopen("conftestval", "w");
2586 if (!f) exit(1);
2587 fprintf(f, "%d\n", sizeof(short));
2588 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002589}
Michael W. Hudson54241132001-12-07 15:38:26 +00002590EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002591if { (eval echo configure:2592: \"$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 +00002592then
2593 ac_cv_sizeof_short=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002594else
Michael W. Hudson54241132001-12-07 15:38:26 +00002595 echo "configure: failed program was:" >&5
2596 cat conftest.$ac_ext >&5
2597 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002598 ac_cv_sizeof_short=0
2599fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002600rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002601fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002602
2603fi
2604echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2605cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002606#define SIZEOF_SHORT $ac_cv_sizeof_short
2607EOF
2608
2609
Michael W. Hudson54241132001-12-07 15:38:26 +00002610echo $ac_n "checking size of float""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002611echo "configure:2612: checking size of float" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002612if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
2613 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002614else
2615 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002616 ac_cv_sizeof_float=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00002617else
Michael W. Hudson54241132001-12-07 15:38:26 +00002618 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002619#line 2620 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002620#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002621#include <stdio.h>
2622main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002623{
Michael W. Hudson54241132001-12-07 15:38:26 +00002624 FILE *f=fopen("conftestval", "w");
2625 if (!f) exit(1);
2626 fprintf(f, "%d\n", sizeof(float));
2627 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002628}
Michael W. Hudson54241132001-12-07 15:38:26 +00002629EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002630if { (eval echo configure:2631: \"$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 +00002631then
2632 ac_cv_sizeof_float=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002633else
Michael W. Hudson54241132001-12-07 15:38:26 +00002634 echo "configure: failed program was:" >&5
2635 cat conftest.$ac_ext >&5
2636 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002637 ac_cv_sizeof_float=0
2638fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002639rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002640fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002641
2642fi
2643echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2644cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002645#define SIZEOF_FLOAT $ac_cv_sizeof_float
2646EOF
2647
2648
Michael W. Hudson54241132001-12-07 15:38:26 +00002649echo $ac_n "checking size of double""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002650echo "configure:2651: checking size of double" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002651if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
2652 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00002653else
2654 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002655 ac_cv_sizeof_double=8
Guido van Rossumef2255b2000-03-10 22:30:29 +00002656else
Michael W. Hudson54241132001-12-07 15:38:26 +00002657 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002658#line 2659 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002659#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002660#include <stdio.h>
2661main()
Guido van Rossumef2255b2000-03-10 22:30:29 +00002662{
Michael W. Hudson54241132001-12-07 15:38:26 +00002663 FILE *f=fopen("conftestval", "w");
2664 if (!f) exit(1);
2665 fprintf(f, "%d\n", sizeof(double));
2666 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00002667}
Michael W. Hudson54241132001-12-07 15:38:26 +00002668EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002669if { (eval echo configure:2670: \"$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 +00002670then
2671 ac_cv_sizeof_double=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00002672else
Michael W. Hudson54241132001-12-07 15:38:26 +00002673 echo "configure: failed program was:" >&5
2674 cat conftest.$ac_ext >&5
2675 rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002676 ac_cv_sizeof_double=0
2677fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002678rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00002679fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002680
2681fi
2682echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2683cat >> confdefs.h <<EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00002684#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2685EOF
2686
2687
Michael W. Hudson54241132001-12-07 15:38:26 +00002688echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002689echo "configure:2690: checking size of fpos_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002690if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
2691 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002692else
2693 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002694 ac_cv_sizeof_fpos_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002695else
Michael W. Hudson54241132001-12-07 15:38:26 +00002696 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002697#line 2698 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002698#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002699#include <stdio.h>
2700main()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002701{
Michael W. Hudson54241132001-12-07 15:38:26 +00002702 FILE *f=fopen("conftestval", "w");
2703 if (!f) exit(1);
2704 fprintf(f, "%d\n", sizeof(fpos_t));
2705 exit(0);
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002706}
Michael W. Hudson54241132001-12-07 15:38:26 +00002707EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002708if { (eval echo configure:2709: \"$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 +00002709then
2710 ac_cv_sizeof_fpos_t=`cat conftestval`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002711else
Michael W. Hudson54241132001-12-07 15:38:26 +00002712 echo "configure: failed program was:" >&5
2713 cat conftest.$ac_ext >&5
2714 rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002715 ac_cv_sizeof_fpos_t=0
2716fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002717rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002718fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002719
2720fi
2721echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2722cat >> confdefs.h <<EOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002723#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2724EOF
2725
Michael W. Hudson54241132001-12-07 15:38:26 +00002726
2727
2728echo $ac_n "checking for long long support""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002729echo "configure:2730: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002730have_long_long=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002731cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002732#line 2733 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002733#include "confdefs.h"
2734
Michael W. Hudson54241132001-12-07 15:38:26 +00002735int main() {
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002736long long x; x = (long long)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002737; return 0; }
2738EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002739if { (eval echo configure:2740: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002740 rm -rf conftest*
2741 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002742#define HAVE_LONG_LONG 1
2743EOF
2744 have_long_long=yes
2745else
Michael W. Hudson54241132001-12-07 15:38:26 +00002746 echo "configure: failed program was:" >&5
2747 cat conftest.$ac_ext >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002748fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002749rm -f conftest*
2750echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002751if test "$have_long_long" = yes ; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002752echo $ac_n "checking size of long long""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002753echo "configure:2754: checking size of long long" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002754if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
2755 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002756else
2757 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002758 ac_cv_sizeof_long_long=8
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002759else
Michael W. Hudson54241132001-12-07 15:38:26 +00002760 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002761#line 2762 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002762#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002763#include <stdio.h>
2764main()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002765{
Michael W. Hudson54241132001-12-07 15:38:26 +00002766 FILE *f=fopen("conftestval", "w");
2767 if (!f) exit(1);
2768 fprintf(f, "%d\n", sizeof(long long));
2769 exit(0);
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002770}
Michael W. Hudson54241132001-12-07 15:38:26 +00002771EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002772if { (eval echo configure:2773: \"$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 +00002773then
2774 ac_cv_sizeof_long_long=`cat conftestval`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002775else
Michael W. Hudson54241132001-12-07 15:38:26 +00002776 echo "configure: failed program was:" >&5
2777 cat conftest.$ac_ext >&5
2778 rm -fr conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002779 ac_cv_sizeof_long_long=0
2780fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002781rm -fr conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002782fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002783
2784fi
2785echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2786cat >> confdefs.h <<EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002787#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2788EOF
2789
Michael W. Hudson54241132001-12-07 15:38:26 +00002790
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002791fi
2792
Michael W. Hudson54241132001-12-07 15:38:26 +00002793echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002794echo "configure:2795: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002795have_uintptr_t=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002796cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002797#line 2798 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002798#include "confdefs.h"
2799
Michael W. Hudson54241132001-12-07 15:38:26 +00002800int main() {
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002801uintptr_t x; x = (uintptr_t)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002802; return 0; }
2803EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002804if { (eval echo configure:2805: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002805 rm -rf conftest*
2806 cat >> confdefs.h <<\EOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002807#define HAVE_UINTPTR_T 1
2808EOF
2809 have_uintptr_t=yes
2810else
Michael W. Hudson54241132001-12-07 15:38:26 +00002811 echo "configure: failed program was:" >&5
2812 cat conftest.$ac_ext >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002813fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002814rm -f conftest*
2815echo "$ac_t""$have_uintptr_t" 1>&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002816if test "$have_uintptr_t" = yes ; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002817echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002818echo "configure:2819: checking size of uintptr_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002819if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
2820 echo $ac_n "(cached) $ac_c" 1>&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002821else
2822 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002823 ac_cv_sizeof_uintptr_t=4
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002824else
Michael W. Hudson54241132001-12-07 15:38:26 +00002825 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002826#line 2827 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002827#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00002828#include <stdio.h>
2829main()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002830{
Michael W. Hudson54241132001-12-07 15:38:26 +00002831 FILE *f=fopen("conftestval", "w");
2832 if (!f) exit(1);
2833 fprintf(f, "%d\n", sizeof(uintptr_t));
2834 exit(0);
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002835}
Michael W. Hudson54241132001-12-07 15:38:26 +00002836EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002837if { (eval echo configure:2838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Michael W. Hudson54241132001-12-07 15:38:26 +00002838then
2839 ac_cv_sizeof_uintptr_t=`cat conftestval`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002840else
Michael W. Hudson54241132001-12-07 15:38:26 +00002841 echo "configure: failed program was:" >&5
2842 cat conftest.$ac_ext >&5
2843 rm -fr conftest*
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002844 ac_cv_sizeof_uintptr_t=0
2845fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002846rm -fr conftest*
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002847fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002848
2849fi
2850echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2851cat >> confdefs.h <<EOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002852#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2853EOF
2854
Michael W. Hudson54241132001-12-07 15:38:26 +00002855
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002856fi
2857
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002858# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002859echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002860echo "configure:2861: checking size of off_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002861if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
2862 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002863else
2864 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002865 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002866else
Michael W. Hudson54241132001-12-07 15:38:26 +00002867 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002868#line 2869 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002869#include "confdefs.h"
2870#include <stdio.h>
2871#include <sys/types.h>
2872main()
2873{
2874 FILE *f=fopen("conftestval", "w");
2875 if (!f) exit(1);
2876 fprintf(f, "%d\n", sizeof(off_t));
2877 exit(0);
2878}
Michael W. Hudson54241132001-12-07 15:38:26 +00002879EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002880if { (eval echo configure:2881: \"$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 +00002881then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002882 ac_cv_sizeof_off_t=`cat conftestval`
2883else
Michael W. Hudson54241132001-12-07 15:38:26 +00002884 echo "configure: failed program was:" >&5
2885 cat conftest.$ac_ext >&5
2886 rm -fr conftest*
2887 ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002888fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002889rm -fr conftest*
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002890fi
2891
Michael W. Hudson54241132001-12-07 15:38:26 +00002892
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002893fi
2894
Michael W. Hudson54241132001-12-07 15:38:26 +00002895echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2896cat >> confdefs.h <<EOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002897#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2898EOF
2899
Michael W. Hudson54241132001-12-07 15:38:26 +00002900
2901echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002902echo "configure:2903: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002903if test "$have_long_long" = yes -a \
2904 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2905 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002906 cat >> confdefs.h <<\EOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002907#define HAVE_LARGEFILE_SUPPORT 1
2908EOF
2909
Michael W. Hudson54241132001-12-07 15:38:26 +00002910 echo "$ac_t""yes" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002911else
Michael W. Hudson54241132001-12-07 15:38:26 +00002912 echo "$ac_t""no" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002913fi
2914
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002915# AC_CHECK_SIZEOF() doesn't include <time.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002916echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002917echo "configure:2918: checking size of time_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002918if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
2919 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002920else
2921 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002922 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002923else
Michael W. Hudson54241132001-12-07 15:38:26 +00002924 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002925#line 2926 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002926#include "confdefs.h"
2927#include <stdio.h>
2928#include <time.h>
2929main()
2930{
2931 FILE *f=fopen("conftestval", "w");
2932 if (!f) exit(1);
2933 fprintf(f, "%d\n", sizeof(time_t));
2934 exit(0);
2935}
Michael W. Hudson54241132001-12-07 15:38:26 +00002936EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +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 Rossumb9a22a12000-06-30 02:48:53 +00002939 ac_cv_sizeof_time_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_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002945fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002946rm -fr conftest*
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002947fi
2948
Michael W. Hudson54241132001-12-07 15:38:26 +00002949
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002950fi
2951
Michael W. Hudson54241132001-12-07 15:38:26 +00002952echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2953cat >> confdefs.h <<EOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002954#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2955EOF
2956
Michael W. Hudson54241132001-12-07 15:38:26 +00002957
2958
Trent Mick635f6fb2000-08-23 21:33:05 +00002959# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002960ac_save_cc="$CC"
2961if test "$ac_cv_kpthread" = "yes"
2962then CC="$CC -Kpthread"
2963fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002964echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002965echo "configure:2966: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002966have_pthread_t=no
Michael W. Hudson54241132001-12-07 15:38:26 +00002967cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002968#line 2969 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002969#include "confdefs.h"
2970#include <pthread.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00002971int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002972pthread_t x; x = *(pthread_t*)0;
Michael W. Hudson54241132001-12-07 15:38:26 +00002973; return 0; }
2974EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002975if { (eval echo configure:2976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00002976 rm -rf conftest*
Trent Mick635f6fb2000-08-23 21:33:05 +00002977 have_pthread_t=yes
2978else
Michael W. Hudson54241132001-12-07 15:38:26 +00002979 echo "configure: failed program was:" >&5
2980 cat conftest.$ac_ext >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002981fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002982rm -f conftest*
2983echo "$ac_t""$have_pthread_t" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002984if test "$have_pthread_t" = yes ; then
2985 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Michael W. Hudson54241132001-12-07 15:38:26 +00002986 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002987echo "configure:2988: checking size of pthread_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00002988 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
2989 echo $ac_n "(cached) $ac_c" 1>&6
Trent Mick635f6fb2000-08-23 21:33:05 +00002990else
2991 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002992 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00002993else
Michael W. Hudson54241132001-12-07 15:38:26 +00002994 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00002995#line 2996 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002996#include "confdefs.h"
2997#include <stdio.h>
2998 #include <pthread.h>
2999 main()
3000 {
3001 FILE *f=fopen("conftestval", "w");
3002 if (!f) exit(1);
3003 fprintf(f, "%d\n", sizeof(pthread_t));
3004 exit(0);
3005 }
Michael W. Hudson54241132001-12-07 15:38:26 +00003006EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003007if { (eval echo configure:3008: \"$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 +00003008then
Trent Mick635f6fb2000-08-23 21:33:05 +00003009 ac_cv_sizeof_pthread_t=`cat conftestval`
3010else
Michael W. Hudson54241132001-12-07 15:38:26 +00003011 echo "configure: failed program was:" >&5
3012 cat conftest.$ac_ext >&5
3013 rm -fr conftest*
3014 ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00003015fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003016rm -fr conftest*
Trent Mick635f6fb2000-08-23 21:33:05 +00003017fi
3018
Michael W. Hudson54241132001-12-07 15:38:26 +00003019
Trent Mick635f6fb2000-08-23 21:33:05 +00003020fi
3021
Michael W. Hudson54241132001-12-07 15:38:26 +00003022 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
3023 cat >> confdefs.h <<EOF
Trent Mick635f6fb2000-08-23 21:33:05 +00003024#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
3025EOF
3026
3027fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00003028CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00003029
Michael W. Hudson54241132001-12-07 15:38:26 +00003030echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003031echo "configure:3032: checking for --enable-toolbox-glue" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003032# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
3033if test "${enable_toolbox_glue+set}" = set; then
3034 enableval="$enable_toolbox_glue"
Michael W. Hudson54241132001-12-07 15:38:26 +00003035 :
3036fi
Jack Jansene578a632001-08-15 01:27:14 +00003037
3038
3039if test -z "$enable_toolbox_glue"
Michael W. Hudson54241132001-12-07 15:38:26 +00003040then
Jack Jansene578a632001-08-15 01:27:14 +00003041 case $ac_sys_system/$ac_sys_release in
3042 Darwin/*)
3043 enable_toolbox_glue="yes";;
3044 *)
3045 enable_toolbox_glue="no";;
3046 esac
3047fi
3048case "$enable_toolbox_glue" in
3049yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00003050 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00003051 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00003052 extra_undefs="-u __dummy -u _PyMac_Error"
Michael W. Hudson54241132001-12-07 15:38:26 +00003053 cat >> confdefs.h <<\EOF
Jack Jansene578a632001-08-15 01:27:14 +00003054#define USE_TOOLBOX_OBJECT_GLUE 1
3055EOF
3056
3057 ;;
3058*)
3059 extra_frameworks=""
3060 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00003061 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00003062 ;;
3063esac
Michael W. Hudson54241132001-12-07 15:38:26 +00003064echo "$ac_t""$enable_toolbox_glue" 1>&6
3065
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003066
3067case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003068 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003069 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003070 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
3071 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansena3891ea2001-09-07 14:25:12 +00003072 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3073 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00003074 Darwin/*)
3075 ns_undef_sym='_environ'
Jack Jansen418c3b12001-11-14 10:59:57 +00003076 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
3077 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansene578a632001-08-15 01:27:14 +00003078 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3079 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003080esac
3081
Michael W. Hudson54241132001-12-07 15:38:26 +00003082echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003083echo "configure:3084: checking for --enable-framework" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003084if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003085then
Jack Jansenca06bc62001-08-03 15:32:23 +00003086 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003087 # -U __environ is needed since bundles don't have access
3088 # to crt0 when built but will always be linked against it
Michael W. Hudson54241132001-12-07 15:38:26 +00003089 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00003090 # in the build location.
Michael W. Hudson54241132001-12-07 15:38:26 +00003091
Jack Jansena3891ea2001-09-07 14:25:12 +00003092 case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00003093 Darwin/1.3*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
3094 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
Jack Jansena3891ea2001-09-07 14:25:12 +00003095 esac
Michael W. Hudson54241132001-12-07 15:38:26 +00003096 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003097#define WITH_NEXT_FRAMEWORK 1
3098EOF
3099
Michael W. Hudson54241132001-12-07 15:38:26 +00003100 echo "$ac_t""yes" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003101else
Michael W. Hudson54241132001-12-07 15:38:26 +00003102 echo "$ac_t""no" 1>&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003103fi
3104
Michael W. Hudson54241132001-12-07 15:38:26 +00003105echo $ac_n "checking for dyld""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003106echo "configure:3107: checking for dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003107case $ac_sys_system/$ac_sys_release in
3108 Darwin/*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003109 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003110#define WITH_DYLD 1
3111EOF
3112
Michael W. Hudson54241132001-12-07 15:38:26 +00003113 echo "$ac_t""always on for Darwin" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003114 ;;
3115 *)
Michael W. Hudson54241132001-12-07 15:38:26 +00003116 echo "$ac_t""no" 1>&6
Jack Jansene578a632001-08-15 01:27:14 +00003117 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003118esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003119
Guido van Rossum0a516c91994-09-12 10:58:40 +00003120# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003121
Michael W. Hudson54241132001-12-07 15:38:26 +00003122
3123
3124
3125
Guido van Rossum0a516c91994-09-12 10:58:40 +00003126# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003127# -- usually .so, .sl on HP-UX, .dll on Cygwin
Michael W. Hudson54241132001-12-07 15:38:26 +00003128echo $ac_n "checking SO""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003129echo "configure:3130: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003130if test -z "$SO"
3131then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003132 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003133 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003134 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003135 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003136 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003137fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003138echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003139# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003140# -- "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 +00003141# (Shared libraries in this instance are shared modules to be loaded into
3142# Python, as opposed to building Python itself as a shared library.)
Michael W. Hudson54241132001-12-07 15:38:26 +00003143echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003144echo "configure:3145: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003145if test -z "$LDSHARED"
3146then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003147 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003148 AIX*)
3149 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00003150 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003151 ;;
3152 BeOS*)
3153 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00003154 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003155 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003156 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003157 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003158 SunOS/4*) LDSHARED="ld";;
Michael W. Hudson54241132001-12-07 15:38:26 +00003159 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +00003160 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003161 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003162 else LDSHARED="$(CC) -G";
Greg Ward57c9a662000-05-26 12:22:54 +00003163 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003164 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003165 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3166 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansen418c3b12001-11-14 10:59:57 +00003167 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00003168 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3169 if test "$enable_framework" ; then
3170 # Link against the framework. All externals should be defined.
3171 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3172 else
3173 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00003174 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00003175 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00003176 Darwin/*)
3177 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3178 if test "$enable_framework" ; then
3179 # Link against the framework. All externals should be defined.
3180 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3181 else
3182 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00003183 LDSHARED="$LDSHARED -flat_namespace -undefined suppress"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003184 fi ;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003185 Linux*|GNU*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003186 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003187 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003188 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003189 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003190 then
3191 LDSHARED="cc -shared ${LDFLAGS}"
3192 else
3193 LDSHARED="ld -Bshareable ${LDFLAGS}"
3194 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003195 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003196 if test "$GCC" = "yes"
3197 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003198 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003199 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003200 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003201 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003202 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003203 *) LDSHARED="ld";;
3204 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003205fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003206echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003207BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003208# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003209# library (module) -- this is only needed for a few systems
Michael W. Hudson54241132001-12-07 15:38:26 +00003210echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003211echo "configure:3212: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003212if test -z "$CCSHARED"
3213then
Guido van Rossum07397971997-04-29 21:49:50 +00003214 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003215 SunOS*) if test "$GCC" = yes;
3216 then CCSHARED="-fPIC";
3217 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003218 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00003219 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00003220 else CCSHARED="+z";
3221 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003222 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003223 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003224 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003225 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003226 if test "$GCC" = "yes"
3227 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003228 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003229 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003230 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003231 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003232 IRIX*/6*) case $CC in
3233 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003234 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003235 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003236 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003237 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003238fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003239echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003240# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003241# the python executable -- this is only needed for a few systems
Michael W. Hudson54241132001-12-07 15:38:26 +00003242echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003243echo "configure:3244: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003244if test -z "$LINKFORSHARED"
3245then
Guido van Rossum07397971997-04-29 21:49:50 +00003246 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003247 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003248 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003249 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003250 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003251 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003252 # -u libsys_s pulls in all symbols in libsys
Michael W. Hudson54241132001-12-07 15:38:26 +00003253 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00003254 # -u __dummy makes the linker aware of the objc runtime
3255 # in System.framework; otherwise, __objcInit (referenced in
3256 # crt1.o) gets erroneously defined as common, which breaks dynamic
3257 # loading of any modules which reference it in System.framework.
3258 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3259 # not used by the core itself but which needs to be in the core so
3260 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00003261 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00003262 if test "$enable_framework"
3263 then
3264 LINKFORSHARED="$LINKFORSHARED -framework Python"
3265 fi
3266 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003267 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003268 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003269 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Michael W. Hudson54241132001-12-07 15:38:26 +00003270 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003271 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3272 then
3273 LINKFORSHARED="-Wl,--export-dynamic"
3274 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003275 SunOS/5*) case $CC in
3276 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003277 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003278 then
3279 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003280 fi;;
3281 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003282 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003283fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003284echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003285
Michael W. Hudson54241132001-12-07 15:38:26 +00003286
3287echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003288echo "configure:3289: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003289if test ! "$LIBRARY" = "$LDLIBRARY"
3290then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003291 case $ac_sys_system in
3292 CYGWIN*)
3293 # Cygwin needs CCSHARED when building extension DLLs
3294 # but not when building the interpreter DLL.
3295 CFLAGSFORSHARED='';;
3296 *)
3297 CFLAGSFORSHARED='$(CCSHARED)'
3298 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003299fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003300echo "$ac_t""$CFLAGSFORSHARED" 1>&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003301
Guido van Rossum627b2d71993-12-24 10:39:16 +00003302# checks for libraries
Michael W. Hudson54241132001-12-07 15:38:26 +00003303echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003304echo "configure:3305: checking for dlopen in -ldl" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003305ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
3306if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3307 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003308else
Michael W. Hudson54241132001-12-07 15:38:26 +00003309 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003310LIBS="-ldl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003311cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003312#line 3313 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003313#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003314/* Override any gcc2 internal prototype to avoid an error. */
3315/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003316 builtin and then its argument prototype would still apply. */
3317char dlopen();
3318
3319int main() {
3320dlopen()
3321; return 0; }
3322EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003323if { (eval echo configure:3324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003324 rm -rf conftest*
3325 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003326else
Michael W. Hudson54241132001-12-07 15:38:26 +00003327 echo "configure: failed program was:" >&5
3328 cat conftest.$ac_ext >&5
3329 rm -rf conftest*
3330 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003331fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003332rm -f conftest*
3333LIBS="$ac_save_LIBS"
3334
Guido van Rossum627b2d71993-12-24 10:39:16 +00003335fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003336if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3337 echo "$ac_t""yes" 1>&6
3338 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3339 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3340 cat >> confdefs.h <<EOF
3341#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003342EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003343
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003344 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003345
Michael W. Hudson54241132001-12-07 15:38:26 +00003346else
3347 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003348fi
3349 # Dynamic linking for SunOS/Solaris and SYSV
Michael W. Hudson54241132001-12-07 15:38:26 +00003350echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003351echo "configure:3352: checking for shl_load in -ldld" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003352ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
3353if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3354 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003355else
Michael W. Hudson54241132001-12-07 15:38:26 +00003356 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003357LIBS="-ldld $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003358cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003359#line 3360 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003360#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003361/* Override any gcc2 internal prototype to avoid an error. */
3362/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003363 builtin and then its argument prototype would still apply. */
3364char shl_load();
3365
3366int main() {
3367shl_load()
3368; return 0; }
3369EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003370if { (eval echo configure:3371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003371 rm -rf conftest*
3372 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003373else
Michael W. Hudson54241132001-12-07 15:38:26 +00003374 echo "configure: failed program was:" >&5
3375 cat conftest.$ac_ext >&5
3376 rm -rf conftest*
3377 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003378fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003379rm -f conftest*
3380LIBS="$ac_save_LIBS"
3381
Guido van Rossum627b2d71993-12-24 10:39:16 +00003382fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003383if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3384 echo "$ac_t""yes" 1>&6
3385 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3386 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3387 cat >> confdefs.h <<EOF
3388#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003389EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003390
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003391 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003392
Michael W. Hudson54241132001-12-07 15:38:26 +00003393else
3394 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003395fi
3396 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003397
3398# checks for system dependent C++ extensions support
3399case "$ac_sys_system" in
Michael W. Hudson54241132001-12-07 15:38:26 +00003400 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003401echo "configure:3402: checking for genuine AIX C++ extensions support" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003402 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003403#line 3404 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003404#include "confdefs.h"
3405#include "/usr/lpp/xlC/include/load.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00003406int main() {
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003407loadAndInit("", 0, "")
Michael W. Hudson54241132001-12-07 15:38:26 +00003408; return 0; }
3409EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003410if { (eval echo configure:3411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003411 rm -rf conftest*
3412 cat >> confdefs.h <<\EOF
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003413#define AIX_GENUINE_CPLUSPLUS 1
3414EOF
3415
Michael W. Hudson54241132001-12-07 15:38:26 +00003416 echo "$ac_t""yes" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003417else
Michael W. Hudson54241132001-12-07 15:38:26 +00003418 echo "configure: failed program was:" >&5
3419 cat conftest.$ac_ext >&5
3420 rm -rf conftest*
3421 echo "$ac_t""no" 1>&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003422fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003423rm -f conftest*;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003424 *) ;;
3425esac
3426
Guido van Rossum70c7f481998-03-26 18:44:10 +00003427# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3428# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003429# BeOS' sockets are stashed in libnet.
3430case "$ac_sys_system" in
3431IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003432*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003433echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003434echo "configure:3435: checking for t_open in -lnsl" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003435ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
3436if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3437 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003438else
Michael W. Hudson54241132001-12-07 15:38:26 +00003439 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003440LIBS="-lnsl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003441cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003442#line 3443 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003443#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003444/* Override any gcc2 internal prototype to avoid an error. */
3445/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003446 builtin and then its argument prototype would still apply. */
3447char t_open();
3448
3449int main() {
3450t_open()
3451; return 0; }
3452EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003453if { (eval echo configure:3454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003454 rm -rf conftest*
3455 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003456else
Michael W. Hudson54241132001-12-07 15:38:26 +00003457 echo "configure: failed program was:" >&5
3458 cat conftest.$ac_ext >&5
3459 rm -rf conftest*
3460 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003461fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003462rm -f conftest*
3463LIBS="$ac_save_LIBS"
3464
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003465fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003466if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3467 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003468 LIBS="-lnsl $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003469else
3470 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003471fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003472 # SVR4
Michael W. Hudson54241132001-12-07 15:38:26 +00003473echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003474echo "configure:3475: checking for socket in -lsocket" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003475ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
3476if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3477 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003478else
Michael W. Hudson54241132001-12-07 15:38:26 +00003479 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003480LIBS="-lsocket $LIBS $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003481cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003482#line 3483 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003483#include "confdefs.h"
3484/* Override any gcc2 internal prototype to avoid an error. */
3485/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003486 builtin and then its argument prototype would still apply. */
3487char socket();
3488
3489int main() {
3490socket()
3491; return 0; }
3492EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003493if { (eval echo configure:3494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003494 rm -rf conftest*
3495 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003496else
Michael W. Hudson54241132001-12-07 15:38:26 +00003497 echo "configure: failed program was:" >&5
3498 cat conftest.$ac_ext >&5
3499 rm -rf conftest*
3500 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003501fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003502rm -f conftest*
3503LIBS="$ac_save_LIBS"
3504
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003505fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003506if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3507 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003508 LIBS="-lsocket $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003509else
3510 echo "$ac_t""no" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003511fi
3512 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003513;;
3514esac
3515case "$ac_sys_system" in
3516BeOS*)
Michael W. Hudson54241132001-12-07 15:38:26 +00003517echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003518echo "configure:3519: checking for socket in -lnet" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003519ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
3520if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3521 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003522else
Michael W. Hudson54241132001-12-07 15:38:26 +00003523 ac_save_LIBS="$LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00003524LIBS="-lnet $LIBS $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003525cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003526#line 3527 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003527#include "confdefs.h"
3528/* Override any gcc2 internal prototype to avoid an error. */
3529/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003530 builtin and then its argument prototype would still apply. */
3531char socket();
3532
3533int main() {
3534socket()
3535; return 0; }
3536EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003537if { (eval echo configure:3538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003538 rm -rf conftest*
3539 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003540else
Michael W. Hudson54241132001-12-07 15:38:26 +00003541 echo "configure: failed program was:" >&5
3542 cat conftest.$ac_ext >&5
3543 rm -rf conftest*
3544 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003545fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003546rm -f conftest*
3547LIBS="$ac_save_LIBS"
3548
Guido van Rossumad678af1998-10-02 14:42:15 +00003549fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003550if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3551 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003552 LIBS="-lnet $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003553else
3554 echo "$ac_t""no" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003555fi
3556 # BeOS
3557;;
3558esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003559
Michael W. Hudson54241132001-12-07 15:38:26 +00003560echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003561echo "configure:3562: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003562# Check whether --with-libs or --without-libs was given.
3563if test "${with_libs+set}" = set; then
3564 withval="$with_libs"
Michael W. Hudson54241132001-12-07 15:38:26 +00003565
3566echo "$ac_t""$withval" 1>&6
Guido van Rossuma68acba1996-07-31 17:36:39 +00003567LIBS="$withval $LIBS"
3568
3569else
Michael W. Hudson54241132001-12-07 15:38:26 +00003570 echo "$ac_t""no" 1>&6
3571fi
3572
Guido van Rossum7f43da71994-08-01 12:15:30 +00003573
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003574# Determine if signalmodule should be used.
3575
3576
Michael W. Hudson54241132001-12-07 15:38:26 +00003577echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003578echo "configure:3579: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003579# Check whether --with-signal-module or --without-signal-module was given.
3580if test "${with_signal_module+set}" = set; then
3581 withval="$with_signal_module"
Michael W. Hudson54241132001-12-07 15:38:26 +00003582 :
3583fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003584
3585
3586if test -z "$with_signal_module"
3587then with_signal_module="yes"
3588fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003589echo "$ac_t""$with_signal_module" 1>&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003590
3591if test "${with_signal_module}" = "yes"; then
3592 USE_SIGNAL_MODULE=""
3593 SIGNAL_OBJS=""
3594else
3595 USE_SIGNAL_MODULE="#"
3596 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3597fi
3598
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003599# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003600
Barry Warsawc0d24d82000-06-29 16:12:00 +00003601USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003602
Michael W. Hudson54241132001-12-07 15:38:26 +00003603echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003604echo "configure:3605: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003605
3606# Check whether --with-dec-threads or --without-dec-threads was given.
3607if test "${with_dec_threads+set}" = set; then
3608 withval="$with_dec_threads"
Michael W. Hudson54241132001-12-07 15:38:26 +00003609
3610echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003611LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003612if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003613 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003614fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003615else
Michael W. Hudson54241132001-12-07 15:38:26 +00003616 echo "$ac_t""no" 1>&6
3617fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003618
3619
Michael W. Hudson54241132001-12-07 15:38:26 +00003620echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003621echo "configure:3622: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003622# Check whether --with-threads or --without-threads was given.
3623if test "${with_threads+set}" = set; then
3624 withval="$with_threads"
Michael W. Hudson54241132001-12-07 15:38:26 +00003625 :
3626fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003627
3628
Barry Warsawc0d24d82000-06-29 16:12:00 +00003629# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003630# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003631if test "${with_thread+set}" = set; then
3632 withval="$with_thread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003633
Jack Jansendd19cf82001-12-06 22:36:17 +00003634with_threads=$with_thread
Michael W. Hudson54241132001-12-07 15:38:26 +00003635fi
3636
Barry Warsawc0d24d82000-06-29 16:12:00 +00003637
3638if test -z "$with_threads"
3639then with_threads="yes"
3640fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003641echo "$ac_t""$with_threads" 1>&6
Barry Warsawc0d24d82000-06-29 16:12:00 +00003642
3643if test "$with_threads" = "no"
3644then
3645 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003646elif test "$ac_cv_pthread_is_default" = yes
3647then
Michael W. Hudson54241132001-12-07 15:38:26 +00003648 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003649#define WITH_THREAD 1
3650EOF
3651
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003652 # Defining _REENTRANT on system with POSIX threads should not hurt.
Michael W. Hudson54241132001-12-07 15:38:26 +00003653 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003654#define _REENTRANT 1
3655EOF
3656
3657 posix_threads=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00003658 LIBOBJS="$LIBOBJS thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003659elif test "$ac_cv_kpthread" = "yes"
3660then
3661 CC="$CC -Kpthread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003662 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003663#define WITH_THREAD 1
3664EOF
3665
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003666 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003667 LIBOBJS="$LIBOBJS thread.o"
3668else
3669 if test ! -z "$with_threads" -a -d "$with_threads"
3670 then LDFLAGS="$LDFLAGS -L$with_threads"
3671 fi
3672 if test ! -z "$withval" -a -d "$withval"
3673 then LDFLAGS="$LDFLAGS -L$withval"
3674 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003675
3676 # According to the POSIX spec, a pthreads implementation must
3677 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Michael W. Hudson54241132001-12-07 15:38:26 +00003678 echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003679echo "configure:3680: checking for _POSIX_THREADS in unistd.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003680 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003681#line 3682 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003682#include "confdefs.h"
3683#include <unistd.h>
3684 #ifdef _POSIX_THREADS
3685 yes
3686 #endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003687
3688EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3690 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003691 rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003692 unistd_defines_pthreads=yes
3693else
Michael W. Hudson54241132001-12-07 15:38:26 +00003694 rm -rf conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003695 unistd_defines_pthreads=no
3696fi
3697rm -f conftest*
3698
Michael W. Hudson54241132001-12-07 15:38:26 +00003699 echo "$ac_t""$unistd_defines_pthreads" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003700
Michael W. Hudson54241132001-12-07 15:38:26 +00003701 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003702#define _REENTRANT 1
3703EOF
3704
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003705 ac_safe=`echo "cthreads.h" | sed 'y%./+-%__p_%'`
3706echo $ac_n "checking for cthreads.h""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003707echo "configure:3708: checking for cthreads.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003708if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3709 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003710else
Michael W. Hudson54241132001-12-07 15:38:26 +00003711 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003712#line 3713 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003713#include "confdefs.h"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003714#include <cthreads.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00003715EOF
3716ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003717{ (eval echo configure:3718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003718ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3719if test -z "$ac_err"; then
3720 rm -rf conftest*
3721 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003722else
Michael W. Hudson54241132001-12-07 15:38:26 +00003723 echo "$ac_err" >&5
3724 echo "configure: failed program was:" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003725 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003726 rm -rf conftest*
3727 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003728fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003729rm -f conftest*
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003730fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003731if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3732 echo "$ac_t""yes" 1>&6
3733 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003734#define WITH_THREAD 1
3735EOF
3736
Michael W. Hudson54241132001-12-07 15:38:26 +00003737 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003738#define C_THREADS 1
3739EOF
3740
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003741 cat >> confdefs.h <<\EOF
3742#define HURD_C_THREADS 1
3743EOF
3744
3745 LIBS="$LIBS -lthreads"
3746 LIBOBJS="$LIBOBJS thread.o"
3747else
3748 echo "$ac_t""no" 1>&6
3749
3750 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
3751echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003752echo "configure:3753: checking for mach/cthreads.h" >&5
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003753if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3754 echo $ac_n "(cached) $ac_c" 1>&6
3755else
3756 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003757#line 3758 "configure"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003758#include "confdefs.h"
3759#include <mach/cthreads.h>
3760EOF
3761ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003762{ (eval echo configure:3763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +00003763ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3764if test -z "$ac_err"; then
3765 rm -rf conftest*
3766 eval "ac_cv_header_$ac_safe=yes"
3767else
3768 echo "$ac_err" >&5
3769 echo "configure: failed program was:" >&5
3770 cat conftest.$ac_ext >&5
3771 rm -rf conftest*
3772 eval "ac_cv_header_$ac_safe=no"
3773fi
3774rm -f conftest*
3775fi
3776if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3777 echo "$ac_t""yes" 1>&6
3778 cat >> confdefs.h <<\EOF
3779#define WITH_THREAD 1
3780EOF
3781
3782 cat >> confdefs.h <<\EOF
3783#define C_THREADS 1
3784EOF
3785
3786 cat >> confdefs.h <<\EOF
3787#define MACH_C_THREADS 1
3788EOF
3789
Martin v. Löwis130fb172001-07-19 11:00:41 +00003790 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003791else
Michael W. Hudson54241132001-12-07 15:38:26 +00003792 echo "$ac_t""no" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003793
Michael W. Hudson54241132001-12-07 15:38:26 +00003794 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003795echo "configure:3796: checking for --with-pth" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003796 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003797if test "${with_pth+set}" = set; then
3798 withval="$with_pth"
Michael W. Hudson54241132001-12-07 15:38:26 +00003799
3800 echo "$ac_t""$withval" 1>&6
3801 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003802#define WITH_THREAD 1
3803EOF
3804
Michael W. Hudson54241132001-12-07 15:38:26 +00003805 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003806#define HAVE_PTH 1
3807EOF
3808
Martin v. Löwis130fb172001-07-19 11:00:41 +00003809 LIBS="-lpth $LIBS"
3810 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003811else
Michael W. Hudson54241132001-12-07 15:38:26 +00003812
3813 echo "$ac_t""no" 1>&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003814
3815 # Just looking for pthread_create in libpthread is not enough:
3816 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
3817 # So we really have to include pthread.h, and then link.
3818 _libs=$LIBS
3819 LIBS="$LIBS -lpthread"
Michael W. Hudson54241132001-12-07 15:38:26 +00003820 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003821echo "configure:3822: checking for pthread_create in -lpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003822 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003823#line 3824 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003824#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003825#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00003826
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003827void * start_routine (void *arg) { exit (0); }
Michael W. Hudson54241132001-12-07 15:38:26 +00003828int main() {
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003829
3830pthread_create (NULL, NULL, start_routine, NULL)
Michael W. Hudson54241132001-12-07 15:38:26 +00003831; return 0; }
3832EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003833if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003834 rm -rf conftest*
3835
3836 echo "$ac_t""yes" 1>&6
3837 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003838#define WITH_THREAD 1
3839EOF
3840
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003841 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003842 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003843else
Michael W. Hudson54241132001-12-07 15:38:26 +00003844 echo "configure: failed program was:" >&5
3845 cat conftest.$ac_ext >&5
3846 rm -rf conftest*
3847
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003848 LIBS=$_libs
Michael W. Hudson54241132001-12-07 15:38:26 +00003849 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003850echo "configure:3851: checking for pthread_detach" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003851if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
3852 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003853else
Michael W. Hudson54241132001-12-07 15:38:26 +00003854 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003855#line 3856 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003856#include "confdefs.h"
3857/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00003858 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003859#include <assert.h>
3860/* Override any gcc2 internal prototype to avoid an error. */
3861/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003862 builtin and then its argument prototype would still apply. */
3863char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003864
Michael W. Hudson54241132001-12-07 15:38:26 +00003865int main() {
3866
Guido van Rossumad678af1998-10-02 14:42:15 +00003867/* The GNU C library defines this for functions which it implements
3868 to always fail with ENOSYS. Some functions are actually named
3869 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003870#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003871choke me
3872#else
Michael W. Hudson54241132001-12-07 15:38:26 +00003873pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003874#endif
3875
Michael W. Hudson54241132001-12-07 15:38:26 +00003876; return 0; }
3877EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003878if { (eval echo configure:3879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003879 rm -rf conftest*
3880 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003881else
Michael W. Hudson54241132001-12-07 15:38:26 +00003882 echo "configure: failed program was:" >&5
3883 cat conftest.$ac_ext >&5
3884 rm -rf conftest*
3885 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003886fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003887rm -f conftest*
Guido van Rossumad678af1998-10-02 14:42:15 +00003888fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003889
3890if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
3891 echo "$ac_t""yes" 1>&6
3892 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003893#define WITH_THREAD 1
3894EOF
3895
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003896 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003897 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003898else
Michael W. Hudson54241132001-12-07 15:38:26 +00003899 echo "$ac_t""no" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003900
Michael W. Hudson54241132001-12-07 15:38:26 +00003901 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
3902echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003903echo "configure:3904: checking for kernel/OS.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003904if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3905 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003906else
Michael W. Hudson54241132001-12-07 15:38:26 +00003907 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003908#line 3909 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003909#include "confdefs.h"
3910#include <kernel/OS.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00003911EOF
3912ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003913{ (eval echo configure:3914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003914ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3915if test -z "$ac_err"; then
3916 rm -rf conftest*
3917 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003918else
Michael W. Hudson54241132001-12-07 15:38:26 +00003919 echo "$ac_err" >&5
3920 echo "configure: failed program was:" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003921 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003922 rm -rf conftest*
3923 eval "ac_cv_header_$ac_safe=no"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003924fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003925rm -f conftest*
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003926fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003927if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3928 echo "$ac_t""yes" 1>&6
3929 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003930#define WITH_THREAD 1
3931EOF
3932
Michael W. Hudson54241132001-12-07 15:38:26 +00003933 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003934#define BEOS_THREADS 1
3935EOF
3936
Martin v. Löwis130fb172001-07-19 11:00:41 +00003937 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003938else
Michael W. Hudson54241132001-12-07 15:38:26 +00003939 echo "$ac_t""no" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003940
Michael W. Hudson54241132001-12-07 15:38:26 +00003941 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003942echo "configure:3943: checking for pthread_create in -lpthreads" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003943ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
3944if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3945 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003946else
Michael W. Hudson54241132001-12-07 15:38:26 +00003947 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003948LIBS="-lpthreads $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003949cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003950#line 3951 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003951#include "confdefs.h"
3952/* Override any gcc2 internal prototype to avoid an error. */
3953/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003954 builtin and then its argument prototype would still apply. */
3955char pthread_create();
3956
3957int main() {
3958pthread_create()
3959; return 0; }
3960EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003961if { (eval echo configure:3962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00003962 rm -rf conftest*
3963 eval "ac_cv_lib_$ac_lib_var=yes"
Greg Steinadf63d62000-07-05 10:38:09 +00003964else
Michael W. Hudson54241132001-12-07 15:38:26 +00003965 echo "configure: failed program was:" >&5
3966 cat conftest.$ac_ext >&5
3967 rm -rf conftest*
3968 eval "ac_cv_lib_$ac_lib_var=no"
Greg Steinadf63d62000-07-05 10:38:09 +00003969fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003970rm -f conftest*
3971LIBS="$ac_save_LIBS"
3972
Greg Steinadf63d62000-07-05 10:38:09 +00003973fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003974if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3975 echo "$ac_t""yes" 1>&6
3976 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003977#define WITH_THREAD 1
3978EOF
3979
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003980 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003981 LIBS="$LIBS -lpthreads"
3982 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003983else
Michael W. Hudson54241132001-12-07 15:38:26 +00003984 echo "$ac_t""no" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00003985
Michael W. Hudson54241132001-12-07 15:38:26 +00003986 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003987echo "configure:3988: checking for pthread_create in -lc_r" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00003988ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
3989if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3990 echo $ac_n "(cached) $ac_c" 1>&6
Greg Steinadf63d62000-07-05 10:38:09 +00003991else
Michael W. Hudson54241132001-12-07 15:38:26 +00003992 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003993LIBS="-lc_r $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00003994cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00003995#line 3996 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003996#include "confdefs.h"
3997/* Override any gcc2 internal prototype to avoid an error. */
3998/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00003999 builtin and then its argument prototype would still apply. */
4000char pthread_create();
4001
4002int main() {
4003pthread_create()
4004; return 0; }
4005EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004006if { (eval echo configure:4007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004007 rm -rf conftest*
4008 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum49545951997-12-02 19:28:29 +00004009else
Michael W. Hudson54241132001-12-07 15:38:26 +00004010 echo "configure: failed program was:" >&5
4011 cat conftest.$ac_ext >&5
4012 rm -rf conftest*
4013 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum49545951997-12-02 19:28:29 +00004014fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004015rm -f conftest*
4016LIBS="$ac_save_LIBS"
4017
Guido van Rossum49545951997-12-02 19:28:29 +00004018fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004019if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4020 echo "$ac_t""yes" 1>&6
4021 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00004022#define WITH_THREAD 1
4023EOF
4024
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004025 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004026 LIBS="$LIBS -lc_r"
4027 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004028else
Michael W. Hudson54241132001-12-07 15:38:26 +00004029 echo "$ac_t""no" 1>&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004030
Michael W. Hudson54241132001-12-07 15:38:26 +00004031 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004032echo "configure:4033: checking for __d6_pthread_create in -lthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004033ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
4034if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4035 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004036else
Michael W. Hudson54241132001-12-07 15:38:26 +00004037 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00004038LIBS="-lthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004039cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004040#line 4041 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004041#include "confdefs.h"
4042/* Override any gcc2 internal prototype to avoid an error. */
4043/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004044 builtin and then its argument prototype would still apply. */
4045char __d6_pthread_create();
4046
4047int main() {
4048__d6_pthread_create()
4049; return 0; }
4050EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004051if { (eval echo configure:4052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004052 rm -rf conftest*
4053 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004054else
Michael W. Hudson54241132001-12-07 15:38:26 +00004055 echo "configure: failed program was:" >&5
4056 cat conftest.$ac_ext >&5
4057 rm -rf conftest*
4058 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004059fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004060rm -f conftest*
4061LIBS="$ac_save_LIBS"
4062
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004063fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004064if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4065 echo "$ac_t""yes" 1>&6
4066 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004067#define WITH_THREAD 1
4068EOF
4069
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004070 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004071 LIBS="$LIBS -lthread"
4072 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00004073else
Michael W. Hudson54241132001-12-07 15:38:26 +00004074 echo "$ac_t""no" 1>&6
Guido van Rossum49545951997-12-02 19:28:29 +00004075
Michael W. Hudson54241132001-12-07 15:38:26 +00004076 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004077echo "configure:4078: checking for __pthread_create_system in -lpthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004078ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
4079if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4080 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004081else
Michael W. Hudson54241132001-12-07 15:38:26 +00004082 ac_save_LIBS="$LIBS"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004083LIBS="-lpthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004084cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004085#line 4086 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004086#include "confdefs.h"
4087/* Override any gcc2 internal prototype to avoid an error. */
4088/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004089 builtin and then its argument prototype would still apply. */
4090char __pthread_create_system();
4091
4092int main() {
4093__pthread_create_system()
4094; return 0; }
4095EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004096if { (eval echo configure:4097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004097 rm -rf conftest*
4098 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004099else
Michael W. Hudson54241132001-12-07 15:38:26 +00004100 echo "configure: failed program was:" >&5
4101 cat conftest.$ac_ext >&5
4102 rm -rf conftest*
4103 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004104fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004105rm -f conftest*
4106LIBS="$ac_save_LIBS"
4107
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004108fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004109if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4110 echo "$ac_t""yes" 1>&6
4111 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004112#define WITH_THREAD 1
4113EOF
4114
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004115 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004116 LIBS="$LIBS -lpthread"
4117 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004118else
Michael W. Hudson54241132001-12-07 15:38:26 +00004119 echo "$ac_t""no" 1>&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004120
Michael W. Hudson54241132001-12-07 15:38:26 +00004121 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004122echo "configure:4123: checking for pthread_create in -lcma" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004123ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
4124if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4125 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00004126else
Michael W. Hudson54241132001-12-07 15:38:26 +00004127 ac_save_LIBS="$LIBS"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004128LIBS="-lcma $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004129cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004130#line 4131 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004131#include "confdefs.h"
4132/* Override any gcc2 internal prototype to avoid an error. */
4133/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004134 builtin and then its argument prototype would still apply. */
4135char pthread_create();
4136
4137int main() {
4138pthread_create()
4139; return 0; }
4140EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004141if { (eval echo configure:4142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004142 rm -rf conftest*
4143 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004144else
Michael W. Hudson54241132001-12-07 15:38:26 +00004145 echo "configure: failed program was:" >&5
4146 cat conftest.$ac_ext >&5
4147 rm -rf conftest*
4148 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004149fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004150rm -f conftest*
4151LIBS="$ac_save_LIBS"
4152
Guido van Rossumb93a8621998-05-07 13:27:32 +00004153fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004154if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4155 echo "$ac_t""yes" 1>&6
4156 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00004157#define WITH_THREAD 1
4158EOF
4159
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004160 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004161 LIBS="$LIBS -lcma"
4162 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004163else
Michael W. Hudson54241132001-12-07 15:38:26 +00004164 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004165
Martin v. Löwis130fb172001-07-19 11:00:41 +00004166 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004167fi
4168
Michael W. Hudson54241132001-12-07 15:38:26 +00004169
Guido van Rossum627b2d71993-12-24 10:39:16 +00004170fi
4171
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004172fi
4173
Guido van Rossum0be3e491997-05-22 20:33:33 +00004174fi
4175
Guido van Rossum49545951997-12-02 19:28:29 +00004176fi
4177
Guido van Rossumb93a8621998-05-07 13:27:32 +00004178fi
4179
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004180fi
4181
Guido van Rossumad678af1998-10-02 14:42:15 +00004182fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004183rm -f conftest*
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004184fi
4185
Michael W. Hudson54241132001-12-07 15:38:26 +00004186fi
4187
Martin v. Löwisa6e97582002-01-01 18:41:33 +00004188fi
4189
Michael W. Hudson54241132001-12-07 15:38:26 +00004190
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004191 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004192 if test "$unistd_defines_pthreads" = "no"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004193 cat >> confdefs.h <<\EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004194#define _POSIX_THREADS 1
4195EOF
4196
4197 fi
4198
Michael W. Hudson54241132001-12-07 15:38:26 +00004199 echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004200echo "configure:4201: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004201 if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then
4202 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004203else
4204 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004205 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004206else
Michael W. Hudson54241132001-12-07 15:38:26 +00004207 cat > conftest.$ac_ext <<EOF
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004208#line 4209 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004209#include "confdefs.h"
4210#include <pthread.h>
4211 void *foo(void *parm) {
4212 return NULL;
4213 }
4214 main() {
4215 pthread_attr_t attr;
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004216 pthread_t id;
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004217 if (pthread_attr_init(&attr)) exit(-1);
4218 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004219 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004220 exit(0);
4221 }
Michael W. Hudson54241132001-12-07 15:38:26 +00004222EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004223if { (eval echo configure:4224: \"$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 +00004224then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004225 ac_cv_pthread_system_supported=yes
4226else
Michael W. Hudson54241132001-12-07 15:38:26 +00004227 echo "configure: failed program was:" >&5
4228 cat conftest.$ac_ext >&5
4229 rm -fr conftest*
4230 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004231fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004232rm -fr conftest*
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004233fi
4234
Michael W. Hudson54241132001-12-07 15:38:26 +00004235
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004236fi
4237
Michael W. Hudson54241132001-12-07 15:38:26 +00004238 echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004239 if test "$ac_cv_pthread_system_supported" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004240 cat >> confdefs.h <<\EOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004241#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
4242EOF
4243
4244 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004245 for ac_func in pthread_sigmask
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004246do
Michael W. Hudson54241132001-12-07 15:38:26 +00004247echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004248echo "configure:4249: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004249if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4250 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004251else
Michael W. Hudson54241132001-12-07 15:38:26 +00004252 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004253#line 4254 "configure"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004254#include "confdefs.h"
4255/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004256 which can conflict with char $ac_func(); below. */
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004257#include <assert.h>
4258/* Override any gcc2 internal prototype to avoid an error. */
4259/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004260 builtin and then its argument prototype would still apply. */
4261char $ac_func();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004262
Michael W. Hudson54241132001-12-07 15:38:26 +00004263int main() {
4264
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004265/* The GNU C library defines this for functions which it implements
4266 to always fail with ENOSYS. Some functions are actually named
4267 something starting with __ and the normal name is an alias. */
4268#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4269choke me
4270#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004271$ac_func();
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004272#endif
4273
Michael W. Hudson54241132001-12-07 15:38:26 +00004274; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004275EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004276if { (eval echo configure:4277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004277 rm -rf conftest*
4278 eval "ac_cv_func_$ac_func=yes"
4279else
4280 echo "configure: failed program was:" >&5
4281 cat conftest.$ac_ext >&5
4282 rm -rf conftest*
4283 eval "ac_cv_func_$ac_func=no"
4284fi
4285rm -f conftest*
4286fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004287
Michael W. Hudson54241132001-12-07 15:38:26 +00004288if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4289 echo "$ac_t""yes" 1>&6
4290 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4291 cat >> confdefs.h <<EOF
4292#define $ac_tr_func 1
4293EOF
4294
4295else
4296 echo "$ac_t""no" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004297fi
4298done
4299
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004300 fi
4301
Michael W. Hudson54241132001-12-07 15:38:26 +00004302 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004303echo "configure:4304: checking for usconfig in -lmpc" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004304ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
4305if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4306 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004307else
Michael W. Hudson54241132001-12-07 15:38:26 +00004308 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004309LIBS="-lmpc $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004310cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004311#line 4312 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004312#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004313/* Override any gcc2 internal prototype to avoid an error. */
4314/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004315 builtin and then its argument prototype would still apply. */
4316char usconfig();
4317
4318int main() {
4319usconfig()
4320; return 0; }
4321EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004322if { (eval echo configure:4323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004323 rm -rf conftest*
4324 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004325else
Michael W. Hudson54241132001-12-07 15:38:26 +00004326 echo "configure: failed program was:" >&5
4327 cat conftest.$ac_ext >&5
4328 rm -rf conftest*
4329 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004330fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004331rm -f conftest*
4332LIBS="$ac_save_LIBS"
4333
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004334fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004335if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4336 echo "$ac_t""yes" 1>&6
4337 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004338#define WITH_THREAD 1
4339EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004340
Martin v. Löwis130fb172001-07-19 11:00:41 +00004341 LIBS="$LIBS -lmpc"
4342 LIBOBJS="$LIBOBJS thread.o"
4343 USE_THREAD_MODULE=""
Michael W. Hudson54241132001-12-07 15:38:26 +00004344else
4345 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004346fi
4347
Michael W. Hudson54241132001-12-07 15:38:26 +00004348 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004349echo "configure:4350: checking for thr_create in -lthread" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004350ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
4351if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4352 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004353else
Michael W. Hudson54241132001-12-07 15:38:26 +00004354 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004355LIBS="-lthread $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004356cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004357#line 4358 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004358#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004359/* Override any gcc2 internal prototype to avoid an error. */
4360/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004361 builtin and then its argument prototype would still apply. */
4362char thr_create();
4363
4364int main() {
4365thr_create()
4366; return 0; }
4367EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004368if { (eval echo configure:4369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004369 rm -rf conftest*
4370 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004371else
Michael W. Hudson54241132001-12-07 15:38:26 +00004372 echo "configure: failed program was:" >&5
4373 cat conftest.$ac_ext >&5
4374 rm -rf conftest*
4375 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004376fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004377rm -f conftest*
4378LIBS="$ac_save_LIBS"
4379
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004380fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004381if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4382 echo "$ac_t""yes" 1>&6
4383 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004384#define WITH_THREAD 1
4385EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004386
Martin v. Löwis130fb172001-07-19 11:00:41 +00004387 LIBS="$LIBS -lthread"
4388 LIBOBJS="$LIBOBJS thread.o"
4389 USE_THREAD_MODULE=""
Michael W. Hudson54241132001-12-07 15:38:26 +00004390else
4391 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004392fi
4393
Michael W. Hudson54241132001-12-07 15:38:26 +00004394
Martin v. Löwis130fb172001-07-19 11:00:41 +00004395 if test "$USE_THREAD_MODULE" != "#"
4396 then
4397 # If the above checks didn't disable threads, (at least) OSF1
4398 # needs this '-threads' argument during linking.
4399 case $ac_sys_system in
4400 OSF1) LDLAST=-threads;;
4401 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004402 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004403fi
4404
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004405# Check for enable-ipv6
Michael W. Hudson54241132001-12-07 15:38:26 +00004406echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004407echo "configure:4408: checking if --enable-ipv6 is specified" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004408# Check whether --enable-ipv6 or --disable-ipv6 was given.
4409if test "${enable_ipv6+set}" = set; then
4410 enableval="$enable_ipv6"
4411 case "$enableval" in
4412 no)
Michael W. Hudson54241132001-12-07 15:38:26 +00004413 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004414 ipv6=no
4415 ;;
Michael W. Hudson54241132001-12-07 15:38:26 +00004416 *) echo "$ac_t""yes" 1>&6
4417 cat >> confdefs.h <<\EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004418#define ENABLE_IPV6 1
4419EOF
4420
4421 ipv6=yes
4422 ;;
Michael W. Hudson54241132001-12-07 15:38:26 +00004423 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004424else
Michael W. Hudson54241132001-12-07 15:38:26 +00004425
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004426 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004427 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004428 ipv6=no
4429
4430else
Michael W. Hudson54241132001-12-07 15:38:26 +00004431 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004432#line 4433 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004433#include "confdefs.h"
4434 /* AF_INET6 available check */
4435#include <sys/types.h>
4436#include <sys/socket.h>
4437main()
4438{
4439 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4440 exit(1);
4441 else
4442 exit(0);
4443}
4444
Michael W. Hudson54241132001-12-07 15:38:26 +00004445EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004446if { (eval echo configure:4447: \"$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 +00004447then
4448 echo "$ac_t""yes" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004449 ipv6=yes
4450else
Michael W. Hudson54241132001-12-07 15:38:26 +00004451 echo "configure: failed program was:" >&5
4452 cat conftest.$ac_ext >&5
4453 rm -fr conftest*
4454 echo "$ac_t""no" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004455 ipv6=no
4456fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004457rm -fr conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004458fi
4459
Michael W. Hudson54241132001-12-07 15:38:26 +00004460
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004461if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004462 echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004463echo "configure:4464: checking if RFC2553 API is available" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004464 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004465#line 4466 "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004466#include "confdefs.h"
4467#include <sys/types.h>
4468#include <netinet/in.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00004469int main() {
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004470struct sockaddr_in6 x;
4471x.sin6_scope_id;
Michael W. Hudson54241132001-12-07 15:38:26 +00004472; return 0; }
4473EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004474if { (eval echo configure:4475: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004475 rm -rf conftest*
4476 echo "$ac_t""yes" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004477 ipv6=yes
4478else
Michael W. Hudson54241132001-12-07 15:38:26 +00004479 echo "configure: failed program was:" >&5
4480 cat conftest.$ac_ext >&5
4481 rm -rf conftest*
4482 echo "$ac_t""no" 1>&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004483 ipv6=no
4484fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004485rm -f conftest*
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004486fi
4487
4488if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004489 cat >> confdefs.h <<\EOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004490#define ENABLE_IPV6 1
4491EOF
4492
4493fi
4494
Michael W. Hudson54241132001-12-07 15:38:26 +00004495fi
4496
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004497
4498ipv6type=unknown
4499ipv6lib=none
4500ipv6trylibc=no
4501
4502if test "$ipv6" = "yes"; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004503 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004504echo "configure:4505: checking ipv6 stack type" >&5
Guido van Rossumb8552162001-09-05 14:58:11 +00004505 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
4506 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004507 case $i in
4508 inria)
Michael W. Hudson54241132001-12-07 15:38:26 +00004509 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004510#line 4511 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004511#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004512
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004513#include <netinet/in.h>
4514#ifdef IPV6_INRIA_VERSION
4515yes
4516#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004517EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004518if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4519 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004520 rm -rf conftest*
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004521 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004522fi
4523rm -f conftest*
4524
4525 ;;
4526 kame)
Michael W. Hudson54241132001-12-07 15:38:26 +00004527 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004528#line 4529 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004529#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004530
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004531#include <netinet/in.h>
4532#ifdef __KAME__
4533yes
4534#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004535EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004536if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4537 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004538 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004539 ipv6type=$i;
4540 ipv6lib=inet6
4541 ipv6libdir=/usr/local/v6/lib
4542 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004543fi
4544rm -f conftest*
4545
4546 ;;
4547 linux-glibc)
Michael W. Hudson54241132001-12-07 15:38:26 +00004548 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004549#line 4550 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004550#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004551
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004552#include <features.h>
4553#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4554yes
4555#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004556EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004557if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4558 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004559 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004560 ipv6type=$i;
4561 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004562fi
4563rm -f conftest*
4564
4565 ;;
4566 linux-inet6)
4567 if test -d /usr/inet6; then
4568 ipv6type=$i
4569 ipv6lib=inet6
4570 ipv6libdir=/usr/inet6/lib
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004571 OPT="-I/usr/inet6/include $OPT"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004572 fi
4573 ;;
4574 solaris)
4575 if test -f /etc/netconfig; then
4576 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4577 ipv6type=$i
4578 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004579 fi
4580 fi
4581 ;;
4582 toshiba)
Michael W. Hudson54241132001-12-07 15:38:26 +00004583 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004584#line 4585 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004585#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004586
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004587#include <sys/param.h>
4588#ifdef _TOSHIBA_INET6
4589yes
4590#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004591EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4593 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004594 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004595 ipv6type=$i;
4596 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004597 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004598fi
4599rm -f conftest*
4600
4601 ;;
4602 v6d)
Michael W. Hudson54241132001-12-07 15:38:26 +00004603 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004604#line 4605 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004605#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004606
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004607#include </usr/local/v6/include/sys/v6config.h>
4608#ifdef __V6D__
4609yes
4610#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004611EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004612if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4613 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004614 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004615 ipv6type=$i;
4616 ipv6lib=v6;
4617 ipv6libdir=/usr/local/v6/lib;
4618 OPT="-I/usr/local/v6/include $OPT"
4619fi
4620rm -f conftest*
4621
4622 ;;
4623 zeta)
Michael W. Hudson54241132001-12-07 15:38:26 +00004624 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004625#line 4626 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004626#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004627
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004628#include <sys/param.h>
4629#ifdef _ZETA_MINAMI_INET6
4630yes
4631#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004632EOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004633if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4634 egrep "yes" >/dev/null 2>&1; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004635 rm -rf conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004636 ipv6type=$i;
4637 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00004638 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004639fi
4640rm -f conftest*
4641
4642 ;;
4643 esac
4644 if test "$ipv6type" != "unknown"; then
4645 break
4646 fi
4647 done
Michael W. Hudson54241132001-12-07 15:38:26 +00004648 echo "$ac_t""$ipv6type" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004649fi
4650
4651if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4652 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4653 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4654 echo "using lib$ipv6lib"
4655 else
4656 if test $ipv6trylibc = "yes"; then
4657 echo "using libc"
4658 else
4659 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4660 echo "You need to fetch lib$ipv6lib.a from appropriate"
4661 echo 'ipv6 kit and compile beforehand.'
4662 exit 1
4663 fi
4664 fi
4665fi
4666
Barry Warsawef82cd72000-06-30 16:21:01 +00004667# Check for GC support
Michael W. Hudson54241132001-12-07 15:38:26 +00004668echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004669echo "configure:4670: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004670# Check whether --with-cycle-gc or --without-cycle-gc was given.
4671if test "${with_cycle_gc+set}" = set; then
4672 withval="$with_cycle_gc"
Michael W. Hudson54241132001-12-07 15:38:26 +00004673 :
4674fi
Barry Warsawef82cd72000-06-30 16:21:01 +00004675
4676
4677if test -z "$with_cycle_gc"
4678then with_cycle_gc="yes"
4679fi
Neil Schemenauercf229462001-08-29 23:58:47 +00004680if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +00004681then
Michael W. Hudson54241132001-12-07 15:38:26 +00004682 cat >> confdefs.h <<\EOF
Barry Warsawef82cd72000-06-30 16:21:01 +00004683#define WITH_CYCLE_GC 1
4684EOF
4685
4686fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004687echo "$ac_t""$with_cycle_gc" 1>&6
Barry Warsawef82cd72000-06-30 16:21:01 +00004688
Neil Schemenauera35c6882001-02-27 04:45:05 +00004689# Check for Python-specific malloc support
Michael W. Hudson54241132001-12-07 15:38:26 +00004690echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004691echo "configure:4692: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004692# Check whether --with-pymalloc or --without-pymalloc was given.
4693if test "${with_pymalloc+set}" = set; then
4694 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +00004695
Neil Schemenauera35c6882001-02-27 04:45:05 +00004696if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00004697then cat >> confdefs.h <<\EOF
Neil Schemenauera35c6882001-02-27 04:45:05 +00004698#define WITH_PYMALLOC 1
4699EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00004700 echo "$ac_t""yes" 1>&6
4701else echo "$ac_t""no" 1>&6
Neil Schemenauera35c6882001-02-27 04:45:05 +00004702fi
4703else
Michael W. Hudson54241132001-12-07 15:38:26 +00004704 echo "$ac_t""no" 1>&6
4705fi
4706
Neil Schemenauera35c6882001-02-27 04:45:05 +00004707
Barry Warsawef82cd72000-06-30 16:21:01 +00004708# Check for --with-wctype-functions
Michael W. Hudson54241132001-12-07 15:38:26 +00004709echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004710echo "configure:4711: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004711# Check whether --with-wctype-functions or --without-wctype-functions was given.
4712if test "${with_wctype_functions+set}" = set; then
4713 withval="$with_wctype_functions"
Michael W. Hudson54241132001-12-07 15:38:26 +00004714
Barry Warsawef82cd72000-06-30 16:21:01 +00004715if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00004716then cat >> confdefs.h <<\EOF
Barry Warsawef82cd72000-06-30 16:21:01 +00004717#define WANT_WCTYPE_FUNCTIONS 1
4718EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00004719 echo "$ac_t""yes" 1>&6
4720else echo "$ac_t""no" 1>&6
Barry Warsawef82cd72000-06-30 16:21:01 +00004721fi
4722else
Michael W. Hudson54241132001-12-07 15:38:26 +00004723 echo "$ac_t""no" 1>&6
4724fi
4725
Barry Warsawef82cd72000-06-30 16:21:01 +00004726
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004727# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004728
Guido van Rossum98935bf2001-09-05 19:13:16 +00004729DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004730
Michael W. Hudson54241132001-12-07 15:38:26 +00004731echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004732echo "configure:4733: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004733# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004734if test "${with_sgi_dl+set}" = set; then
4735 withval="$with_sgi_dl"
Michael W. Hudson54241132001-12-07 15:38:26 +00004736
4737echo "$ac_t""$withval" 1>&6
4738cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004739#define WITH_SGI_DL 1
4740EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004741
Guido van Rossume97ee181999-12-20 21:27:22 +00004742DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004743dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004744if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004745then LDFLAGS="$LDFLAGS -L$dldir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004746else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004747fi
4748DLINCLDIR=${dldir}
4749LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004750else
Michael W. Hudson54241132001-12-07 15:38:26 +00004751 echo "$ac_t""no" 1>&6
4752fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004753
4754
Michael W. Hudson54241132001-12-07 15:38:26 +00004755echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004756echo "configure:4757: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004757# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004758if test "${with_dl_dld+set}" = set; then
4759 withval="$with_dl_dld"
Michael W. Hudson54241132001-12-07 15:38:26 +00004760
4761echo "$ac_t""$withval" 1>&6
4762cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004763#define WITH_DL_DLD 1
4764EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004765
Guido van Rossume97ee181999-12-20 21:27:22 +00004766DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004767dldir=`echo "$withval" | sed 's/,.*//'`
4768dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004769if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004770then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Michael W. Hudson54241132001-12-07 15:38:26 +00004771else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004772fi
4773DLINCLDIR=${dldir}
4774LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004775else
Michael W. Hudson54241132001-12-07 15:38:26 +00004776 echo "$ac_t""no" 1>&6
4777fi
4778
Guido van Rossum7f43da71994-08-01 12:15:30 +00004779
Guido van Rossume97ee181999-12-20 21:27:22 +00004780# the dlopen() function means we might want to use dynload_shlib.o. some
4781# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004782for ac_func in dlopen
4783do
Michael W. Hudson54241132001-12-07 15:38:26 +00004784echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004785echo "configure:4786: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004786if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4787 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004788else
Michael W. Hudson54241132001-12-07 15:38:26 +00004789 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004790#line 4791 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004791#include "confdefs.h"
4792/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004793 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004794#include <assert.h>
4795/* Override any gcc2 internal prototype to avoid an error. */
4796/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004797 builtin and then its argument prototype would still apply. */
4798char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004799
Michael W. Hudson54241132001-12-07 15:38:26 +00004800int main() {
4801
Guido van Rossume97ee181999-12-20 21:27:22 +00004802/* The GNU C library defines this for functions which it implements
4803 to always fail with ENOSYS. Some functions are actually named
4804 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004805#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004806choke me
4807#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004808$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004809#endif
4810
Michael W. Hudson54241132001-12-07 15:38:26 +00004811; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004812EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004813if { (eval echo configure:4814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004814 rm -rf conftest*
4815 eval "ac_cv_func_$ac_func=yes"
4816else
4817 echo "configure: failed program was:" >&5
4818 cat conftest.$ac_ext >&5
4819 rm -rf conftest*
4820 eval "ac_cv_func_$ac_func=no"
4821fi
4822rm -f conftest*
4823fi
Guido van Rossume97ee181999-12-20 21:27:22 +00004824
Michael W. Hudson54241132001-12-07 15:38:26 +00004825if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4826 echo "$ac_t""yes" 1>&6
4827 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4828 cat >> confdefs.h <<EOF
4829#define $ac_tr_func 1
4830EOF
4831
4832else
4833 echo "$ac_t""no" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004834fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004835done
Guido van Rossume97ee181999-12-20 21:27:22 +00004836
Michael W. Hudson54241132001-12-07 15:38:26 +00004837
Guido van Rossume97ee181999-12-20 21:27:22 +00004838# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4839# loading of modules.
4840
Michael W. Hudson54241132001-12-07 15:38:26 +00004841echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004842echo "configure:4843: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004843if test -z "$DYNLOADFILE"
4844then
4845 case $ac_sys_system/$ac_sys_release in
4846 AIX*) DYNLOADFILE="dynload_aix.o";;
4847 BeOS*) DYNLOADFILE="dynload_beos.o";;
4848 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004849 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004850 *)
4851 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4852 # out any dynamic loading
4853 if test "$ac_cv_func_dlopen" = yes
4854 then DYNLOADFILE="dynload_shlib.o"
4855 else DYNLOADFILE="dynload_stub.o"
4856 fi
4857 ;;
4858 esac
4859fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004860echo "$ac_t""$DYNLOADFILE" 1>&6
Guido van Rossume97ee181999-12-20 21:27:22 +00004861if test "$DYNLOADFILE" != "dynload_stub.o"
4862then
Michael W. Hudson54241132001-12-07 15:38:26 +00004863 cat >> confdefs.h <<\EOF
Guido van Rossume97ee181999-12-20 21:27:22 +00004864#define HAVE_DYNAMIC_LOADING 1
4865EOF
4866
4867fi
4868
Neil Schemenauer4e425612001-06-19 15:44:15 +00004869# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4870
Michael W. Hudson54241132001-12-07 15:38:26 +00004871
4872echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004873echo "configure:4874: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004874if test -z "$MACHDEP_OBJS"
4875then
Jack Jansene578a632001-08-15 01:27:14 +00004876 MACHDEP_OBJS=$extra_machdep_objs
4877else
4878 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004879fi
Michael W. Hudson54241132001-12-07 15:38:26 +00004880echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004881
Guido van Rossum627b2d71993-12-24 10:39:16 +00004882# checks for library functions
Martin v. Löwis244edc82001-10-04 22:44:26 +00004883for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004884 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00004885 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwisb2c92f42002-02-16 23:35:41 +00004886 hstrerror inet_pton kill killpg link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004887 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004888 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +00004889 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004890 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004891 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004892 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Guido van Rossumc524d952001-10-19 01:31:59 +00004893 truncate uname unsetenv waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004894do
Michael W. Hudson54241132001-12-07 15:38:26 +00004895echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004896echo "configure:4897: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004897if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4898 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004899else
Michael W. Hudson54241132001-12-07 15:38:26 +00004900 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004901#line 4902 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004902#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004903/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004904 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004905#include <assert.h>
4906/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004907/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004908 builtin and then its argument prototype would still apply. */
4909char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004910
Michael W. Hudson54241132001-12-07 15:38:26 +00004911int main() {
4912
Guido van Rossum627b2d71993-12-24 10:39:16 +00004913/* The GNU C library defines this for functions which it implements
4914 to always fail with ENOSYS. Some functions are actually named
4915 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004916#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004917choke me
4918#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004919$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004920#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004921
Michael W. Hudson54241132001-12-07 15:38:26 +00004922; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004923EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004924if { (eval echo configure:4925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004925 rm -rf conftest*
4926 eval "ac_cv_func_$ac_func=yes"
4927else
4928 echo "configure: failed program was:" >&5
4929 cat conftest.$ac_ext >&5
4930 rm -rf conftest*
4931 eval "ac_cv_func_$ac_func=no"
4932fi
4933rm -f conftest*
4934fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00004935
Michael W. Hudson54241132001-12-07 15:38:26 +00004936if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4937 echo "$ac_t""yes" 1>&6
4938 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4939 cat >> confdefs.h <<EOF
4940#define $ac_tr_func 1
4941EOF
4942
4943else
4944 echo "$ac_t""no" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004945fi
4946done
4947
Michael W. Hudson54241132001-12-07 15:38:26 +00004948
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004949# check for openpty and forkpty
4950
4951for ac_func in openpty
4952do
Michael W. Hudson54241132001-12-07 15:38:26 +00004953echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004954echo "configure:4955: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00004955if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4956 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004957else
Michael W. Hudson54241132001-12-07 15:38:26 +00004958 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004959#line 4960 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004960#include "confdefs.h"
4961/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00004962 which can conflict with char $ac_func(); below. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004963#include <assert.h>
4964/* Override any gcc2 internal prototype to avoid an error. */
4965/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00004966 builtin and then its argument prototype would still apply. */
4967char $ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004968
Michael W. Hudson54241132001-12-07 15:38:26 +00004969int main() {
4970
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004971/* The GNU C library defines this for functions which it implements
4972 to always fail with ENOSYS. Some functions are actually named
4973 something starting with __ and the normal name is an alias. */
4974#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4975choke me
4976#else
Michael W. Hudson54241132001-12-07 15:38:26 +00004977$ac_func();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004978#endif
4979
Michael W. Hudson54241132001-12-07 15:38:26 +00004980; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004981EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00004982if { (eval echo configure:4983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00004983 rm -rf conftest*
4984 eval "ac_cv_func_$ac_func=yes"
4985else
4986 echo "configure: failed program was:" >&5
4987 cat conftest.$ac_ext >&5
4988 rm -rf conftest*
4989 eval "ac_cv_func_$ac_func=no"
4990fi
4991rm -f conftest*
4992fi
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004993
Michael W. Hudson54241132001-12-07 15:38:26 +00004994if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4995 echo "$ac_t""yes" 1>&6
4996 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4997 cat >> confdefs.h <<EOF
4998#define $ac_tr_func 1
4999EOF
5000
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00005001else
Michael W. Hudson54241132001-12-07 15:38:26 +00005002 echo "$ac_t""no" 1>&6
5003echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005004echo "configure:5005: checking for openpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005005ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
5006if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5007 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005008else
Michael W. Hudson54241132001-12-07 15:38:26 +00005009 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005010LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005011cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005012#line 5013 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005013#include "confdefs.h"
5014/* Override any gcc2 internal prototype to avoid an error. */
5015/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005016 builtin and then its argument prototype would still apply. */
5017char openpty();
5018
5019int main() {
5020openpty()
5021; return 0; }
5022EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005023if { (eval echo configure:5024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005024 rm -rf conftest*
5025 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005026else
Michael W. Hudson54241132001-12-07 15:38:26 +00005027 echo "configure: failed program was:" >&5
5028 cat conftest.$ac_ext >&5
5029 rm -rf conftest*
5030 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005031fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005032rm -f conftest*
5033LIBS="$ac_save_LIBS"
5034
Fred Drake8cef4cf2000-06-28 16:40:38 +00005035fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005036if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5037 echo "$ac_t""yes" 1>&6
5038 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005039#define HAVE_OPENPTY 1
5040EOF
5041 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005042else
5043 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005044fi
5045
5046fi
5047done
5048
5049for ac_func in forkpty
5050do
Michael W. Hudson54241132001-12-07 15:38:26 +00005051echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005052echo "configure:5053: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005053if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5054 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005055else
Michael W. Hudson54241132001-12-07 15:38:26 +00005056 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005057#line 5058 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005058#include "confdefs.h"
5059/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005060 which can conflict with char $ac_func(); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +00005061#include <assert.h>
5062/* Override any gcc2 internal prototype to avoid an error. */
5063/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005064 builtin and then its argument prototype would still apply. */
5065char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005066
Michael W. Hudson54241132001-12-07 15:38:26 +00005067int main() {
5068
Fred Drake8cef4cf2000-06-28 16:40:38 +00005069/* The GNU C library defines this for functions which it implements
5070 to always fail with ENOSYS. Some functions are actually named
5071 something starting with __ and the normal name is an alias. */
5072#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5073choke me
5074#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005075$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005076#endif
5077
Michael W. Hudson54241132001-12-07 15:38:26 +00005078; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005079EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005080if { (eval echo configure:5081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005081 rm -rf conftest*
5082 eval "ac_cv_func_$ac_func=yes"
5083else
5084 echo "configure: failed program was:" >&5
5085 cat conftest.$ac_ext >&5
5086 rm -rf conftest*
5087 eval "ac_cv_func_$ac_func=no"
5088fi
5089rm -f conftest*
5090fi
Fred Drake8cef4cf2000-06-28 16:40:38 +00005091
Michael W. Hudson54241132001-12-07 15:38:26 +00005092if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5093 echo "$ac_t""yes" 1>&6
5094 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5095 cat >> confdefs.h <<EOF
5096#define $ac_tr_func 1
5097EOF
5098
Fred Drake8cef4cf2000-06-28 16:40:38 +00005099else
Michael W. Hudson54241132001-12-07 15:38:26 +00005100 echo "$ac_t""no" 1>&6
5101echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005102echo "configure:5103: checking for forkpty in -lutil" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005103ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
5104if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5105 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005106else
Michael W. Hudson54241132001-12-07 15:38:26 +00005107 ac_save_LIBS="$LIBS"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005108LIBS="-lutil $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005109cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005110#line 5111 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005111#include "confdefs.h"
5112/* Override any gcc2 internal prototype to avoid an error. */
5113/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005114 builtin and then its argument prototype would still apply. */
5115char forkpty();
5116
5117int main() {
5118forkpty()
5119; return 0; }
5120EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005121if { (eval echo configure:5122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005122 rm -rf conftest*
5123 eval "ac_cv_lib_$ac_lib_var=yes"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005124else
Michael W. Hudson54241132001-12-07 15:38:26 +00005125 echo "configure: failed program was:" >&5
5126 cat conftest.$ac_ext >&5
5127 rm -rf conftest*
5128 eval "ac_cv_lib_$ac_lib_var=no"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005129fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005130rm -f conftest*
5131LIBS="$ac_save_LIBS"
5132
Fred Drake8cef4cf2000-06-28 16:40:38 +00005133fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005134if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5135 echo "$ac_t""yes" 1>&6
5136 cat >> confdefs.h <<\EOF
Fred Drake8cef4cf2000-06-28 16:40:38 +00005137#define HAVE_FORKPTY 1
5138EOF
5139 LIBS="$LIBS -lutil"
Michael W. Hudson54241132001-12-07 15:38:26 +00005140else
5141 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005142fi
5143
5144fi
5145done
5146
Jack Jansendd19cf82001-12-06 22:36:17 +00005147
Michael W. Hudson54241132001-12-07 15:38:26 +00005148# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +00005149for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
5150do
Michael W. Hudson54241132001-12-07 15:38:26 +00005151echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005152echo "configure:5153: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005153if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5154 echo $ac_n "(cached) $ac_c" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00005155else
Michael W. Hudson54241132001-12-07 15:38:26 +00005156 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005157#line 5158 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005158#include "confdefs.h"
5159/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005160 which can conflict with char $ac_func(); below. */
Fred Drake8cef4cf2000-06-28 16:40:38 +00005161#include <assert.h>
5162/* Override any gcc2 internal prototype to avoid an error. */
5163/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005164 builtin and then its argument prototype would still apply. */
5165char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005166
Michael W. Hudson54241132001-12-07 15:38:26 +00005167int main() {
5168
Fred Drake8cef4cf2000-06-28 16:40:38 +00005169/* The GNU C library defines this for functions which it implements
5170 to always fail with ENOSYS. Some functions are actually named
5171 something starting with __ and the normal name is an alias. */
5172#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5173choke me
5174#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005175$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005176#endif
5177
Michael W. Hudson54241132001-12-07 15:38:26 +00005178; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005179EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005180if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005181 rm -rf conftest*
5182 eval "ac_cv_func_$ac_func=yes"
5183else
5184 echo "configure: failed program was:" >&5
5185 cat conftest.$ac_ext >&5
5186 rm -rf conftest*
5187 eval "ac_cv_func_$ac_func=no"
5188fi
5189rm -f conftest*
5190fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005191
Michael W. Hudson54241132001-12-07 15:38:26 +00005192if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5193 echo "$ac_t""yes" 1>&6
5194 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5195 cat >> confdefs.h <<EOF
5196#define $ac_tr_func 1
5197EOF
5198
5199else
5200 echo "$ac_t""no" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005201fi
5202done
5203
Michael W. Hudson54241132001-12-07 15:38:26 +00005204
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005205for ac_func in dup2 getcwd strdup strerror memmove
5206do
Michael W. Hudson54241132001-12-07 15:38:26 +00005207echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005208echo "configure:5209: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005209if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5210 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005211else
Michael W. Hudson54241132001-12-07 15:38:26 +00005212 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005213#line 5214 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005214#include "confdefs.h"
5215/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005216 which can conflict with char $ac_func(); below. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005217#include <assert.h>
5218/* Override any gcc2 internal prototype to avoid an error. */
5219/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005220 builtin and then its argument prototype would still apply. */
5221char $ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005222
Michael W. Hudson54241132001-12-07 15:38:26 +00005223int main() {
5224
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005225/* The GNU C library defines this for functions which it implements
5226 to always fail with ENOSYS. Some functions are actually named
5227 something starting with __ and the normal name is an alias. */
5228#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5229choke me
5230#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005231$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005232#endif
5233
Michael W. Hudson54241132001-12-07 15:38:26 +00005234; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005235EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005236if { (eval echo configure:5237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005237 rm -rf conftest*
5238 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005239else
Michael W. Hudson54241132001-12-07 15:38:26 +00005240 echo "configure: failed program was:" >&5
5241 cat conftest.$ac_ext >&5
5242 rm -rf conftest*
5243 eval "ac_cv_func_$ac_func=no"
5244fi
5245rm -f conftest*
5246fi
5247
5248if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5249 echo "$ac_t""yes" 1>&6
5250 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5251 cat >> confdefs.h <<EOF
5252#define $ac_tr_func 1
5253EOF
5254
5255else
5256 echo "$ac_t""no" 1>&6
5257LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005258fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005259done
5260
Michael W. Hudson54241132001-12-07 15:38:26 +00005261
Thomas Wouters3a584202000-08-05 23:28:51 +00005262for ac_func in getpgrp
5263do
Michael W. Hudson54241132001-12-07 15:38:26 +00005264echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005265echo "configure:5266: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005266if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5267 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005268else
Michael W. Hudson54241132001-12-07 15:38:26 +00005269 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005270#line 5271 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005271#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005272/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005273 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005274#include <assert.h>
5275/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005276/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005277 builtin and then its argument prototype would still apply. */
5278char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005279
Michael W. Hudson54241132001-12-07 15:38:26 +00005280int main() {
5281
Guido van Rossum627b2d71993-12-24 10:39:16 +00005282/* The GNU C library defines this for functions which it implements
5283 to always fail with ENOSYS. Some functions are actually named
5284 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005285#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005286choke me
5287#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005288$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005289#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005290
Michael W. Hudson54241132001-12-07 15:38:26 +00005291; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005292EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005293if { (eval echo configure:5294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005294 rm -rf conftest*
5295 eval "ac_cv_func_$ac_func=yes"
5296else
5297 echo "configure: failed program was:" >&5
5298 cat conftest.$ac_ext >&5
5299 rm -rf conftest*
5300 eval "ac_cv_func_$ac_func=no"
5301fi
5302rm -f conftest*
5303fi
5304
5305if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5306 echo "$ac_t""yes" 1>&6
5307 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5308 cat >> confdefs.h <<EOF
5309#define $ac_tr_func 1
5310EOF
5311 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005312#line 5313 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005313#include "confdefs.h"
5314#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005315int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005316getpgrp(0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005317; return 0; }
5318EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005319if { (eval echo configure:5320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005320 rm -rf conftest*
5321 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005322#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005323EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005324
Guido van Rossumf78abae1997-01-21 22:02:36 +00005325else
Michael W. Hudson54241132001-12-07 15:38:26 +00005326 echo "configure: failed program was:" >&5
5327 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005328fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005329rm -f conftest*
5330else
5331 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005332fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005333done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005334
Thomas Wouters3a584202000-08-05 23:28:51 +00005335for ac_func in setpgrp
5336do
Michael W. Hudson54241132001-12-07 15:38:26 +00005337echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005338echo "configure:5339: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005339if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5340 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005341else
Michael W. Hudson54241132001-12-07 15:38:26 +00005342 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005343#line 5344 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005344#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005345/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005346 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005347#include <assert.h>
5348/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005349/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005350 builtin and then its argument prototype would still apply. */
5351char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005352
Michael W. Hudson54241132001-12-07 15:38:26 +00005353int main() {
5354
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005355/* The GNU C library defines this for functions which it implements
5356 to always fail with ENOSYS. Some functions are actually named
5357 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005358#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005359choke me
5360#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005361$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005362#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005363
Michael W. Hudson54241132001-12-07 15:38:26 +00005364; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005365EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005366if { (eval echo configure:5367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005367 rm -rf conftest*
5368 eval "ac_cv_func_$ac_func=yes"
5369else
5370 echo "configure: failed program was:" >&5
5371 cat conftest.$ac_ext >&5
5372 rm -rf conftest*
5373 eval "ac_cv_func_$ac_func=no"
5374fi
5375rm -f conftest*
5376fi
5377
5378if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5379 echo "$ac_t""yes" 1>&6
5380 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5381 cat >> confdefs.h <<EOF
5382#define $ac_tr_func 1
5383EOF
5384 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005385#line 5386 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005386#include "confdefs.h"
5387#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005388int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005389setpgrp(0,0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005390; return 0; }
5391EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005392if { (eval echo configure:5393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005393 rm -rf conftest*
5394 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005395#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005396EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005397
Guido van Rossumf78abae1997-01-21 22:02:36 +00005398else
Michael W. Hudson54241132001-12-07 15:38:26 +00005399 echo "configure: failed program was:" >&5
5400 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005401fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005402rm -f conftest*
5403else
5404 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005405fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005406done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005407
Thomas Wouters3a584202000-08-05 23:28:51 +00005408for ac_func in gettimeofday
5409do
Michael W. Hudson54241132001-12-07 15:38:26 +00005410echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005411echo "configure:5412: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005412if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5413 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005414else
Michael W. Hudson54241132001-12-07 15:38:26 +00005415 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005416#line 5417 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005417#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005418/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005419 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005420#include <assert.h>
5421/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005422/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005423 builtin and then its argument prototype would still apply. */
5424char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005425
Michael W. Hudson54241132001-12-07 15:38:26 +00005426int main() {
5427
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005428/* The GNU C library defines this for functions which it implements
5429 to always fail with ENOSYS. Some functions are actually named
5430 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005431#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005432choke me
5433#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005434$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005435#endif
5436
Michael W. Hudson54241132001-12-07 15:38:26 +00005437; return 0; }
Thomas Wouters3a584202000-08-05 23:28:51 +00005438EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005439if { (eval echo configure:5440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005440 rm -rf conftest*
5441 eval "ac_cv_func_$ac_func=yes"
5442else
5443 echo "configure: failed program was:" >&5
5444 cat conftest.$ac_ext >&5
5445 rm -rf conftest*
5446 eval "ac_cv_func_$ac_func=no"
5447fi
5448rm -f conftest*
5449fi
5450
5451if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5452 echo "$ac_t""yes" 1>&6
5453 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5454 cat >> confdefs.h <<EOF
5455#define $ac_tr_func 1
5456EOF
5457 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005458#line 5459 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005459#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005460#include <sys/time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005461int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005462gettimeofday((struct timeval*)0,(struct timezone*)0);
Michael W. Hudson54241132001-12-07 15:38:26 +00005463; return 0; }
5464EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005465if { (eval echo configure:5466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005466 :
5467else
Michael W. Hudson54241132001-12-07 15:38:26 +00005468 echo "configure: failed program was:" >&5
5469 cat conftest.$ac_ext >&5
5470 rm -rf conftest*
5471 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005472#define GETTIMEOFDAY_NO_TZ 1
5473EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005474
5475fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005476rm -f conftest*
5477else
5478 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005479fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005480done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005481
Michael W. Hudson54241132001-12-07 15:38:26 +00005482
5483
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005484# On OSF/1 V5.1, getaddrinfo is available, but a define
Michael W. Hudson54241132001-12-07 15:38:26 +00005485# for [no]getaddrinfo in netdb.h.
5486echo $ac_n "checking for getaddrinfo""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005487echo "configure:5488: checking for getaddrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005488cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005489#line 5490 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005490#include "confdefs.h"
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005491
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005492#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005493#include <sys/socket.h>
5494#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +00005495#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005496
Michael W. Hudson54241132001-12-07 15:38:26 +00005497int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005498
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005499getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005500
Michael W. Hudson54241132001-12-07 15:38:26 +00005501; return 0; }
5502EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005503if { (eval echo configure:5504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005504 rm -rf conftest*
5505
5506echo "$ac_t""yes" 1>&6
5507echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005508echo "configure:5509: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005509if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005510 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005511buggygetaddrinfo=yes
5512else
Michael W. Hudson54241132001-12-07 15:38:26 +00005513 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005514#line 5515 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005515#include "confdefs.h"
5516
5517#include <sys/types.h>
5518#include <netdb.h>
5519#include <string.h>
5520#include <sys/socket.h>
5521#include <netinet/in.h>
5522
5523main()
5524{
5525 int passive, gaierr, inet4 = 0, inet6 = 0;
5526 struct addrinfo hints, *ai, *aitop;
5527 char straddr[INET6_ADDRSTRLEN], strport[16];
5528
5529 for (passive = 0; passive <= 1; passive++) {
5530 memset(&hints, 0, sizeof(hints));
5531 hints.ai_family = AF_UNSPEC;
5532 hints.ai_flags = passive ? AI_PASSIVE : 0;
5533 hints.ai_socktype = SOCK_STREAM;
5534 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5535 (void)gai_strerror(gaierr);
5536 goto bad;
5537 }
5538 for (ai = aitop; ai; ai = ai->ai_next) {
5539 if (ai->ai_addr == NULL ||
5540 ai->ai_addrlen == 0 ||
5541 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5542 straddr, sizeof(straddr), strport, sizeof(strport),
5543 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5544 goto bad;
5545 }
5546 switch (ai->ai_family) {
5547 case AF_INET:
5548 if (strcmp(strport, "54321") != 0) {
5549 goto bad;
5550 }
5551 if (passive) {
5552 if (strcmp(straddr, "0.0.0.0") != 0) {
5553 goto bad;
5554 }
5555 } else {
5556 if (strcmp(straddr, "127.0.0.1") != 0) {
5557 goto bad;
5558 }
5559 }
5560 inet4++;
5561 break;
5562 case AF_INET6:
5563 if (strcmp(strport, "54321") != 0) {
5564 goto bad;
5565 }
5566 if (passive) {
5567 if (strcmp(straddr, "::") != 0) {
5568 goto bad;
5569 }
5570 } else {
5571 if (strcmp(straddr, "::1") != 0) {
5572 goto bad;
5573 }
5574 }
5575 inet6++;
5576 break;
5577 case AF_UNSPEC:
5578 goto bad;
5579 break;
5580 default:
5581 /* another family support? */
5582 break;
5583 }
5584 }
5585 }
5586
5587 if (!(inet4 == 0 || inet4 == 2))
5588 goto bad;
5589 if (!(inet6 == 0 || inet6 == 2))
5590 goto bad;
5591
5592 if (aitop)
5593 freeaddrinfo(aitop);
5594 exit(0);
5595
5596 bad:
5597 if (aitop)
5598 freeaddrinfo(aitop);
5599 exit(1);
5600}
5601
Michael W. Hudson54241132001-12-07 15:38:26 +00005602EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005603if { (eval echo configure:5604: \"$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 +00005604then
5605 echo "$ac_t""good" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005606buggygetaddrinfo=no
5607else
Michael W. Hudson54241132001-12-07 15:38:26 +00005608 echo "configure: failed program was:" >&5
5609 cat conftest.$ac_ext >&5
5610 rm -fr conftest*
5611 echo "$ac_t""buggy" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005612buggygetaddrinfo=yes
5613fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005614rm -fr conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005615fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005616
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005617else
Michael W. Hudson54241132001-12-07 15:38:26 +00005618 echo "configure: failed program was:" >&5
5619 cat conftest.$ac_ext >&5
5620 rm -rf conftest*
5621
5622echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005623buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005624
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005625fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005626rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005627
5628if test "$buggygetaddrinfo" = "yes"; then
5629 if test "$ipv6" = "yes"; then
5630 echo 'Fatal: You must get working getaddrinfo() function.'
5631 echo ' or you can specify "--disable-ipv6"'.
5632 exit 1
5633 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005634else
Michael W. Hudson54241132001-12-07 15:38:26 +00005635 cat >> confdefs.h <<\EOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +00005636#define HAVE_GETADDRINFO 1
5637EOF
5638
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005639fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005640for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005641do
Michael W. Hudson54241132001-12-07 15:38:26 +00005642echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005643echo "configure:5644: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005644if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5645 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005646else
Michael W. Hudson54241132001-12-07 15:38:26 +00005647 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005648#line 5649 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005649#include "confdefs.h"
5650/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00005651 which can conflict with char $ac_func(); below. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005652#include <assert.h>
5653/* Override any gcc2 internal prototype to avoid an error. */
5654/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00005655 builtin and then its argument prototype would still apply. */
5656char $ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005657
Michael W. Hudson54241132001-12-07 15:38:26 +00005658int main() {
5659
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005660/* The GNU C library defines this for functions which it implements
5661 to always fail with ENOSYS. Some functions are actually named
5662 something starting with __ and the normal name is an alias. */
5663#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5664choke me
5665#else
Michael W. Hudson54241132001-12-07 15:38:26 +00005666$ac_func();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005667#endif
5668
Michael W. Hudson54241132001-12-07 15:38:26 +00005669; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005670EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005671if { (eval echo configure:5672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005672 rm -rf conftest*
5673 eval "ac_cv_func_$ac_func=yes"
5674else
5675 echo "configure: failed program was:" >&5
5676 cat conftest.$ac_ext >&5
5677 rm -rf conftest*
5678 eval "ac_cv_func_$ac_func=no"
5679fi
5680rm -f conftest*
5681fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005682
Michael W. Hudson54241132001-12-07 15:38:26 +00005683if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5684 echo "$ac_t""yes" 1>&6
5685 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5686 cat >> confdefs.h <<EOF
5687#define $ac_tr_func 1
5688EOF
5689
5690else
5691 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005692fi
5693done
5694
Michael W. Hudson54241132001-12-07 15:38:26 +00005695
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005696# checks for structures
Michael W. Hudson54241132001-12-07 15:38:26 +00005697echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005698echo "configure:5699: checking whether time.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005699if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5700 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005701else
Michael W. Hudson54241132001-12-07 15:38:26 +00005702 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005703#line 5704 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005704#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005705#include <sys/types.h>
5706#include <sys/time.h>
5707#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005708int main() {
5709struct tm *tp;
5710; return 0; }
5711EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005712if { (eval echo configure:5713: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005713 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005714 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005715else
Michael W. Hudson54241132001-12-07 15:38:26 +00005716 echo "configure: failed program was:" >&5
5717 cat conftest.$ac_ext >&5
5718 rm -rf conftest*
5719 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005720fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005721rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005722fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005723
Michael W. Hudson54241132001-12-07 15:38:26 +00005724echo "$ac_t""$ac_cv_header_time" 1>&6
5725if test $ac_cv_header_time = yes; then
5726 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005727#define TIME_WITH_SYS_TIME 1
5728EOF
5729
5730fi
5731
Michael W. Hudson54241132001-12-07 15:38:26 +00005732echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005733echo "configure:5734: checking whether struct tm is in sys/time.h or time.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005734if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
5735 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005736else
Michael W. Hudson54241132001-12-07 15:38:26 +00005737 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005738#line 5739 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005739#include "confdefs.h"
5740#include <sys/types.h>
5741#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005742int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005743struct tm *tp; tp->tm_sec;
Michael W. Hudson54241132001-12-07 15:38:26 +00005744; return 0; }
5745EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005746if { (eval echo configure:5747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005747 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005748 ac_cv_struct_tm=time.h
5749else
Michael W. Hudson54241132001-12-07 15:38:26 +00005750 echo "configure: failed program was:" >&5
5751 cat conftest.$ac_ext >&5
5752 rm -rf conftest*
5753 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005754fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005755rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005756fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005757
Michael W. Hudson54241132001-12-07 15:38:26 +00005758echo "$ac_t""$ac_cv_struct_tm" 1>&6
5759if test $ac_cv_struct_tm = sys/time.h; then
5760 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005761#define TM_IN_SYS_TIME 1
5762EOF
5763
5764fi
5765
Michael W. Hudson54241132001-12-07 15:38:26 +00005766echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005767echo "configure:5768: checking for tm_zone in struct tm" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005768if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
5769 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005770else
Michael W. Hudson54241132001-12-07 15:38:26 +00005771 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005772#line 5773 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005773#include "confdefs.h"
5774#include <sys/types.h>
5775#include <$ac_cv_struct_tm>
Michael W. Hudson54241132001-12-07 15:38:26 +00005776int main() {
5777struct tm tm; tm.tm_zone;
5778; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005779EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005780if { (eval echo configure:5781: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005781 rm -rf conftest*
5782 ac_cv_struct_tm_zone=yes
5783else
5784 echo "configure: failed program was:" >&5
5785 cat conftest.$ac_ext >&5
5786 rm -rf conftest*
5787 ac_cv_struct_tm_zone=no
5788fi
5789rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005790fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005791
Michael W. Hudson54241132001-12-07 15:38:26 +00005792echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5793if test "$ac_cv_struct_tm_zone" = yes; then
5794 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005795#define HAVE_TM_ZONE 1
5796EOF
5797
5798else
Michael W. Hudson54241132001-12-07 15:38:26 +00005799 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005800echo "configure:5801: checking for tzname" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005801if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
5802 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005803else
Michael W. Hudson54241132001-12-07 15:38:26 +00005804 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005805#line 5806 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005806#include "confdefs.h"
5807#include <time.h>
5808#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005809extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005810#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00005811int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005812atoi(*tzname);
Michael W. Hudson54241132001-12-07 15:38:26 +00005813; return 0; }
5814EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005815if { (eval echo configure:5816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005816 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005817 ac_cv_var_tzname=yes
5818else
Michael W. Hudson54241132001-12-07 15:38:26 +00005819 echo "configure: failed program was:" >&5
5820 cat conftest.$ac_ext >&5
5821 rm -rf conftest*
5822 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005823fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005824rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005825fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005826
Michael W. Hudson54241132001-12-07 15:38:26 +00005827echo "$ac_t""$ac_cv_var_tzname" 1>&6
5828 if test $ac_cv_var_tzname = yes; then
5829 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005830#define HAVE_TZNAME 1
5831EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005832
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005833 fi
5834fi
5835
Michael W. Hudson54241132001-12-07 15:38:26 +00005836echo $ac_n "checking for st_rdev in struct stat""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005837echo "configure:5838: checking for st_rdev in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005838if eval "test \"`echo '$''{'ac_cv_struct_st_rdev'+set}'`\" = set"; then
5839 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005840else
Michael W. Hudson54241132001-12-07 15:38:26 +00005841 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005842#line 5843 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005843#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005844#include <sys/types.h>
5845#include <sys/stat.h>
5846int main() {
5847struct stat s; s.st_rdev;
5848; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005849EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005850if { (eval echo configure:5851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005851 rm -rf conftest*
5852 ac_cv_struct_st_rdev=yes
5853else
5854 echo "configure: failed program was:" >&5
5855 cat conftest.$ac_ext >&5
5856 rm -rf conftest*
5857 ac_cv_struct_st_rdev=no
5858fi
5859rm -f conftest*
5860fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005861
Michael W. Hudson54241132001-12-07 15:38:26 +00005862echo "$ac_t""$ac_cv_struct_st_rdev" 1>&6
5863if test $ac_cv_struct_st_rdev = yes; then
5864 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005865#define HAVE_ST_RDEV 1
5866EOF
5867
5868fi
5869
Michael W. Hudson54241132001-12-07 15:38:26 +00005870echo $ac_n "checking for st_blksize in struct stat""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005871echo "configure:5872: checking for st_blksize in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005872if eval "test \"`echo '$''{'ac_cv_struct_st_blksize'+set}'`\" = set"; then
5873 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005874else
Michael W. Hudson54241132001-12-07 15:38:26 +00005875 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005876#line 5877 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005877#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005878#include <sys/types.h>
5879#include <sys/stat.h>
5880int main() {
5881struct stat s; s.st_blksize;
5882; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005883EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005884if { (eval echo configure:5885: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005885 rm -rf conftest*
5886 ac_cv_struct_st_blksize=yes
5887else
5888 echo "configure: failed program was:" >&5
5889 cat conftest.$ac_ext >&5
5890 rm -rf conftest*
5891 ac_cv_struct_st_blksize=no
5892fi
5893rm -f conftest*
5894fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005895
Michael W. Hudson54241132001-12-07 15:38:26 +00005896echo "$ac_t""$ac_cv_struct_st_blksize" 1>&6
5897if test $ac_cv_struct_st_blksize = yes; then
5898 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005899#define HAVE_ST_BLKSIZE 1
5900EOF
5901
5902fi
5903
Michael W. Hudson54241132001-12-07 15:38:26 +00005904echo $ac_n "checking for st_blocks in struct stat""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005905echo "configure:5906: checking for st_blocks in struct stat" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005906if eval "test \"`echo '$''{'ac_cv_struct_st_blocks'+set}'`\" = set"; then
5907 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005908else
Michael W. Hudson54241132001-12-07 15:38:26 +00005909 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005910#line 5911 "configure"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005911#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00005912#include <sys/types.h>
5913#include <sys/stat.h>
5914int main() {
5915struct stat s; s.st_blocks;
5916; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00005917EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005918if { (eval echo configure:5919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005919 rm -rf conftest*
5920 ac_cv_struct_st_blocks=yes
5921else
5922 echo "configure: failed program was:" >&5
5923 cat conftest.$ac_ext >&5
5924 rm -rf conftest*
5925 ac_cv_struct_st_blocks=no
5926fi
5927rm -f conftest*
5928fi
Jack Jansendd19cf82001-12-06 22:36:17 +00005929
Michael W. Hudson54241132001-12-07 15:38:26 +00005930echo "$ac_t""$ac_cv_struct_st_blocks" 1>&6
5931if test $ac_cv_struct_st_blocks = yes; then
5932 cat >> confdefs.h <<\EOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005933#define HAVE_ST_BLOCKS 1
5934EOF
5935
5936else
Michael W. Hudson54241132001-12-07 15:38:26 +00005937 LIBOBJS="$LIBOBJS fileblocks.${ac_objext}"
Guido van Rossum98bf58f2001-10-18 20:34:25 +00005938fi
5939
Michael W. Hudson54241132001-12-07 15:38:26 +00005940
5941echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005942echo "configure:5943: checking for time.h that defines altzone" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005943if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
5944 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005945else
Michael W. Hudson54241132001-12-07 15:38:26 +00005946 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005947#line 5948 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005948#include "confdefs.h"
5949#include <time.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00005950int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005951return altzone;
Michael W. Hudson54241132001-12-07 15:38:26 +00005952; return 0; }
5953EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005954if { (eval echo configure:5955: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005955 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005956 ac_cv_header_time_altzone=yes
5957else
Michael W. Hudson54241132001-12-07 15:38:26 +00005958 echo "configure: failed program was:" >&5
5959 cat conftest.$ac_ext >&5
5960 rm -rf conftest*
5961 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005962fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005963rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005964fi
5965
Michael W. Hudson54241132001-12-07 15:38:26 +00005966echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005967if test $ac_cv_header_time_altzone = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005968 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005969#define HAVE_ALTZONE 1
5970EOF
5971
5972fi
5973
Guido van Rossumda88dad1995-01-26 00:46:29 +00005974was_it_defined=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005975echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005976echo "configure:5977: checking whether sys/select.h and sys/time.h may both be included" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00005977cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005978#line 5979 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005979#include "confdefs.h"
5980
5981#include <sys/types.h>
5982#include <sys/select.h>
5983#include <sys/time.h>
5984
Michael W. Hudson54241132001-12-07 15:38:26 +00005985int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005986;
Michael W. Hudson54241132001-12-07 15:38:26 +00005987; return 0; }
5988EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00005989if { (eval echo configure:5990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00005990 rm -rf conftest*
5991 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005992#define SYS_SELECT_WITH_SYS_TIME 1
5993EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005994 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005995else
Michael W. Hudson54241132001-12-07 15:38:26 +00005996 echo "configure: failed program was:" >&5
5997 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005998fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005999rm -f conftest*
6000echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006001
Michael W. Hudson54241132001-12-07 15:38:26 +00006002echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006003echo "configure:6004: checking for addrinfo" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006004if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
6005 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006006else
Michael W. Hudson54241132001-12-07 15:38:26 +00006007 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006008#line 6009 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006009#include "confdefs.h"
6010
6011# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006012int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006013struct addrinfo a
Michael W. Hudson54241132001-12-07 15:38:26 +00006014; return 0; }
6015EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006016if { (eval echo configure:6017: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006017 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006018 ac_cv_struct_addrinfo=yes
6019else
Michael W. Hudson54241132001-12-07 15:38:26 +00006020 echo "configure: failed program was:" >&5
6021 cat conftest.$ac_ext >&5
6022 rm -rf conftest*
6023 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006024fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006025rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006026fi
6027
Michael W. Hudson54241132001-12-07 15:38:26 +00006028echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006029if test $ac_cv_struct_addrinfo = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006030 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006031#define HAVE_ADDRINFO 1
6032EOF
6033
6034fi
6035
Michael W. Hudson54241132001-12-07 15:38:26 +00006036echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006037echo "configure:6038: checking for sockaddr_storage" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006038if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
6039 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006040else
Michael W. Hudson54241132001-12-07 15:38:26 +00006041 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006042#line 6043 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006043#include "confdefs.h"
6044
6045# include <sys/types.h>
6046# include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006047int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006048struct sockaddr_storage s
Michael W. Hudson54241132001-12-07 15:38:26 +00006049; return 0; }
6050EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006051if { (eval echo configure:6052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006052 rm -rf conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006053 ac_cv_struct_sockaddr_storage=yes
6054else
Michael W. Hudson54241132001-12-07 15:38:26 +00006055 echo "configure: failed program was:" >&5
6056 cat conftest.$ac_ext >&5
6057 rm -rf conftest*
6058 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006059fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006060rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006061fi
6062
Michael W. Hudson54241132001-12-07 15:38:26 +00006063echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006064if test $ac_cv_struct_sockaddr_storage = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006065 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006066#define HAVE_SOCKADDR_STORAGE 1
6067EOF
6068
6069fi
6070
Guido van Rossum627b2d71993-12-24 10:39:16 +00006071# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00006072
Michael W. Hudson54241132001-12-07 15:38:26 +00006073echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006074echo "configure:6075: checking whether char is unsigned" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006075if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
6076 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006077else
Michael W. Hudson54241132001-12-07 15:38:26 +00006078 if test "$GCC" = yes; then
6079 # GCC predefines this symbol on systems where it applies.
6080cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006081#line 6082 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006082#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00006083#ifdef __CHAR_UNSIGNED__
6084 yes
6085#endif
6086
6087EOF
6088if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6089 egrep "yes" >/dev/null 2>&1; then
6090 rm -rf conftest*
6091 ac_cv_c_char_unsigned=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006092else
Michael W. Hudson54241132001-12-07 15:38:26 +00006093 rm -rf conftest*
6094 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006095fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006096rm -f conftest*
6097
6098else
6099if test "$cross_compiling" = yes; then
6100 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6101else
6102 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006103#line 6104 "configure"
Michael W. Hudson54241132001-12-07 15:38:26 +00006104#include "confdefs.h"
6105/* volatile prevents gcc2 from optimizing the test away on sparcs. */
6106#if !defined(__STDC__) || __STDC__ != 1
6107#define volatile
6108#endif
6109main() {
6110 volatile char c = 255; exit(c < 0);
6111}
6112EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006113if { (eval echo configure:6114: \"$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 +00006114then
6115 ac_cv_c_char_unsigned=yes
6116else
6117 echo "configure: failed program was:" >&5
6118 cat conftest.$ac_ext >&5
6119 rm -fr conftest*
6120 ac_cv_c_char_unsigned=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006121fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006122rm -fr conftest*
6123fi
6124
6125fi
6126fi
6127
6128echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006129if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006130 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006131#define __CHAR_UNSIGNED__ 1
6132EOF
6133
6134fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006135
Michael W. Hudson54241132001-12-07 15:38:26 +00006136echo $ac_n "checking for working const""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006137echo "configure:6138: checking for working const" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006138if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
6139 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006140else
Michael W. Hudson54241132001-12-07 15:38:26 +00006141 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006142#line 6143 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006143#include "confdefs.h"
6144
Michael W. Hudson54241132001-12-07 15:38:26 +00006145int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006146
Michael W. Hudson54241132001-12-07 15:38:26 +00006147/* Ultrix mips cc rejects this. */
6148typedef int charset[2]; const charset x;
6149/* SunOS 4.1.1 cc rejects this. */
6150char const *const *ccp;
6151char **p;
6152/* NEC SVR4.0.2 mips cc rejects this. */
6153struct point {int x, y;};
6154static struct point const zero = {0,0};
6155/* AIX XL C 1.02.0.0 rejects this.
6156 It does not let you subtract one const X* pointer from another in an arm
6157 of an if-expression whose if-part is not a constant expression */
6158const char *g = "string";
6159ccp = &g + (g ? g-g : 0);
6160/* HPUX 7.0 cc rejects these. */
6161++ccp;
6162p = (char**) ccp;
6163ccp = (char const *const *) p;
6164{ /* SCO 3.2v4 cc rejects this. */
6165 char *t;
6166 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006167
Michael W. Hudson54241132001-12-07 15:38:26 +00006168 *t++ = 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006169}
Michael W. Hudson54241132001-12-07 15:38:26 +00006170{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
6171 int x[] = {25, 17};
6172 const int *foo = &x[0];
6173 ++foo;
6174}
6175{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6176 typedef const int *iptr;
6177 iptr p = 0;
6178 ++p;
6179}
6180{ /* AIX XL C 1.02.0.0 rejects this saying
6181 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6182 struct s { int j; const int *ap[3]; };
6183 struct s *b; b->j = 5;
6184}
6185{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6186 const int foo = 10;
6187}
6188
6189; return 0; }
6190EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006191if { (eval echo configure:6192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006192 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006193 ac_cv_c_const=yes
6194else
Michael W. Hudson54241132001-12-07 15:38:26 +00006195 echo "configure: failed program was:" >&5
6196 cat conftest.$ac_ext >&5
6197 rm -rf conftest*
6198 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006199fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006200rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006201fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006202
6203echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006204if test $ac_cv_c_const = no; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006205 cat >> confdefs.h <<\EOF
6206#define const
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006207EOF
6208
6209fi
6210
Michael W. Hudson54241132001-12-07 15:38:26 +00006211
Guido van Rossumda88dad1995-01-26 00:46:29 +00006212works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006213echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006214echo "configure:6215: checking for working volatile" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006215cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006216#line 6217 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006217#include "confdefs.h"
6218
Michael W. Hudson54241132001-12-07 15:38:26 +00006219int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006220volatile int x; x = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006221; return 0; }
6222EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006223if { (eval echo configure:6224: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006224 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006225 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006226else
Michael W. Hudson54241132001-12-07 15:38:26 +00006227 echo "configure: failed program was:" >&5
6228 cat conftest.$ac_ext >&5
6229 rm -rf conftest*
6230 cat >> confdefs.h <<\EOF
6231#define volatile
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006232EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006233
6234fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006235rm -f conftest*
6236echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006237
Guido van Rossumda88dad1995-01-26 00:46:29 +00006238works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006239echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006240echo "configure:6241: checking for working signed char" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006241cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006242#line 6243 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006243#include "confdefs.h"
6244
Michael W. Hudson54241132001-12-07 15:38:26 +00006245int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006246signed char c;
Michael W. Hudson54241132001-12-07 15:38:26 +00006247; return 0; }
6248EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006249if { (eval echo configure:6250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006250 rm -rf conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00006251 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006252else
Michael W. Hudson54241132001-12-07 15:38:26 +00006253 echo "configure: failed program was:" >&5
6254 cat conftest.$ac_ext >&5
6255 rm -rf conftest*
6256 cat >> confdefs.h <<\EOF
6257#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00006258EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006259
6260fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006261rm -f conftest*
6262echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006263
Guido van Rossumda88dad1995-01-26 00:46:29 +00006264have_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006265echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006266echo "configure:6267: checking for prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006267cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006268#line 6269 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006269#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006270int foo(int x) { return 0; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006271int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006272return foo(10);
Michael W. Hudson54241132001-12-07 15:38:26 +00006273; return 0; }
6274EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006275if { (eval echo configure:6276: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006276 rm -rf conftest*
6277 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006278#define HAVE_PROTOTYPES 1
6279EOF
6280 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006281else
Michael W. Hudson54241132001-12-07 15:38:26 +00006282 echo "configure: failed program was:" >&5
6283 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006284fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006285rm -f conftest*
6286echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006287
Guido van Rossumda88dad1995-01-26 00:46:29 +00006288works=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006289echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006290echo "configure:6291: checking for variable length prototypes and stdarg.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006291cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006292#line 6293 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006293#include "confdefs.h"
6294
6295#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00006296int foo(int x, ...) {
6297 va_list va;
6298 va_start(va, x);
6299 va_arg(va, int);
6300 va_arg(va, char *);
6301 va_arg(va, double);
6302 return 0;
6303}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006304
Michael W. Hudson54241132001-12-07 15:38:26 +00006305int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00006306return foo(10, "", 3.14);
Michael W. Hudson54241132001-12-07 15:38:26 +00006307; return 0; }
6308EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006309if { (eval echo configure:6310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006310 rm -rf conftest*
6311 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006312#define HAVE_STDARG_PROTOTYPES 1
6313EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006314 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006315else
Michael W. Hudson54241132001-12-07 15:38:26 +00006316 echo "configure: failed program was:" >&5
6317 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006318fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006319rm -f conftest*
6320echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006321
Guido van Rossumda88dad1995-01-26 00:46:29 +00006322if test "$have_prototypes" = yes; then
6323bad_prototypes=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006324echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006325echo "configure:6326: checking for bad exec* prototypes" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006326cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006327#line 6328 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006328#include "confdefs.h"
6329#include <unistd.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006330int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006331char **t;execve("@",t,t);
Michael W. Hudson54241132001-12-07 15:38:26 +00006332; return 0; }
6333EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006334if { (eval echo configure:6335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006335 :
6336else
Michael W. Hudson54241132001-12-07 15:38:26 +00006337 echo "configure: failed program was:" >&5
6338 cat conftest.$ac_ext >&5
6339 rm -rf conftest*
6340 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006341#define BAD_EXEC_PROTOTYPES 1
6342EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006343 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006344fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006345rm -f conftest*
6346echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006347fi
6348
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006349# check if sockaddr has sa_len member
Michael W. Hudson54241132001-12-07 15:38:26 +00006350echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006351echo "configure:6352: checking if sockaddr has sa_len member" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006352cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006353#line 6354 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006354#include "confdefs.h"
6355#include <sys/types.h>
6356#include <sys/socket.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006357int main() {
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006358struct sockaddr x;
6359x.sa_len = 0;
Michael W. Hudson54241132001-12-07 15:38:26 +00006360; return 0; }
6361EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006362if { (eval echo configure:6363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006363 rm -rf conftest*
6364 echo "$ac_t""yes" 1>&6
6365 cat >> confdefs.h <<\EOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006366#define HAVE_SOCKADDR_SA_LEN 1
6367EOF
6368
6369else
Michael W. Hudson54241132001-12-07 15:38:26 +00006370 echo "configure: failed program was:" >&5
6371 cat conftest.$ac_ext >&5
6372 rm -rf conftest*
6373 echo "$ac_t""no" 1>&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006374fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006375rm -f conftest*
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006376
Michael W. Hudson54241132001-12-07 15:38:26 +00006377echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006378echo "configure:6379: checking for bad static forward" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006379if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
6380 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006381else
6382 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006383 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006384else
Michael W. Hudson54241132001-12-07 15:38:26 +00006385 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006386#line 6387 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006387#include "confdefs.h"
6388
6389struct s { int a; int b; };
6390static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006391int foobar() {
6392 static int random;
6393 random = (int) &foo;
6394 return random;
6395}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006396static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006397main() {
6398 exit(!((int)&foo == foobar()));
6399}
Michael W. Hudson54241132001-12-07 15:38:26 +00006400EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006401if { (eval echo configure:6402: \"$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 +00006402then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006403 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006404else
Michael W. Hudson54241132001-12-07 15:38:26 +00006405 echo "configure: failed program was:" >&5
6406 cat conftest.$ac_ext >&5
6407 rm -fr conftest*
6408 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006409fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006410rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006411fi
6412
Michael W. Hudson54241132001-12-07 15:38:26 +00006413fi
6414
6415echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006416if test "$ac_cv_bad_static_forward" = yes
6417then
Michael W. Hudson54241132001-12-07 15:38:26 +00006418 cat >> confdefs.h <<\EOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006419#define BAD_STATIC_FORWARD 1
6420EOF
6421
6422fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006423
Guido van Rossumda88dad1995-01-26 00:46:29 +00006424va_list_is_array=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006425echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006426echo "configure:6427: checking whether va_list is an array" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006427cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006428#line 6429 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006429#include "confdefs.h"
6430
6431#ifdef HAVE_STDARG_PROTOTYPES
6432#include <stdarg.h>
6433#else
6434#include <varargs.h>
6435#endif
6436
Michael W. Hudson54241132001-12-07 15:38:26 +00006437int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006438va_list list1, list2; list1 = list2;
Michael W. Hudson54241132001-12-07 15:38:26 +00006439; return 0; }
6440EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006441if { (eval echo configure:6442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006442 :
6443else
Michael W. Hudson54241132001-12-07 15:38:26 +00006444 echo "configure: failed program was:" >&5
6445 cat conftest.$ac_ext >&5
6446 rm -rf conftest*
6447 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006448#define VA_LIST_IS_ARRAY 1
6449EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006450 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006451fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006452rm -f conftest*
6453echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006454
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006455# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Michael W. Hudson54241132001-12-07 15:38:26 +00006456echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006457echo "configure:6458: checking for gethostbyname_r" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006458if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
6459 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006460else
Michael W. Hudson54241132001-12-07 15:38:26 +00006461 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006462#line 6463 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006463#include "confdefs.h"
6464/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006465 which can conflict with char gethostbyname_r(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006466#include <assert.h>
6467/* Override any gcc2 internal prototype to avoid an error. */
6468/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006469 builtin and then its argument prototype would still apply. */
6470char gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006471
Michael W. Hudson54241132001-12-07 15:38:26 +00006472int main() {
6473
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006474/* The GNU C library defines this for functions which it implements
6475 to always fail with ENOSYS. Some functions are actually named
6476 something starting with __ and the normal name is an alias. */
6477#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6478choke me
6479#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006480gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006481#endif
6482
Michael W. Hudson54241132001-12-07 15:38:26 +00006483; return 0; }
6484EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006485if { (eval echo configure:6486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006486 rm -rf conftest*
6487 eval "ac_cv_func_gethostbyname_r=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006488else
Michael W. Hudson54241132001-12-07 15:38:26 +00006489 echo "configure: failed program was:" >&5
6490 cat conftest.$ac_ext >&5
6491 rm -rf conftest*
6492 eval "ac_cv_func_gethostbyname_r=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006493fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006494rm -f conftest*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006495fi
6496
Michael W. Hudson54241132001-12-07 15:38:26 +00006497if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6498 echo "$ac_t""yes" 1>&6
6499
6500 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006501#define HAVE_GETHOSTBYNAME_R 1
6502EOF
6503
Michael W. Hudson54241132001-12-07 15:38:26 +00006504 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006505echo "configure:6506: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006506 OLD_CFLAGS=$CFLAGS
6507 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006508 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006509#line 6510 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006510#include "confdefs.h"
6511
6512# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006513
6514int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006515
6516 char *name;
6517 struct hostent *he, *res;
6518 char buffer[2048];
6519 int buflen = 2048;
6520 int h_errnop;
6521
6522 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006523
6524; return 0; }
6525EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006526if { (eval echo configure:6527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006527 rm -rf conftest*
6528
6529 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006530#define HAVE_GETHOSTBYNAME_R 1
6531EOF
6532
Michael W. Hudson54241132001-12-07 15:38:26 +00006533 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006534#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6535EOF
6536
Michael W. Hudson54241132001-12-07 15:38:26 +00006537 echo "$ac_t""yes" 1>&6
6538
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006539else
Michael W. Hudson54241132001-12-07 15:38:26 +00006540 echo "configure: failed program was:" >&5
6541 cat conftest.$ac_ext >&5
6542 rm -rf conftest*
6543
6544 echo "$ac_t""no" 1>&6
6545 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006546echo "configure:6547: checking gethostbyname_r with 5 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006547 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006548#line 6549 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006549#include "confdefs.h"
6550
6551# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006552
6553int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006554
6555 char *name;
6556 struct hostent *he;
6557 char buffer[2048];
6558 int buflen = 2048;
6559 int h_errnop;
6560
6561 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Michael W. Hudson54241132001-12-07 15:38:26 +00006562
6563; return 0; }
6564EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006565if { (eval echo configure:6566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006566 rm -rf conftest*
6567
6568 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006569#define HAVE_GETHOSTBYNAME_R 1
6570EOF
6571
Michael W. Hudson54241132001-12-07 15:38:26 +00006572 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006573#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6574EOF
6575
Michael W. Hudson54241132001-12-07 15:38:26 +00006576 echo "$ac_t""yes" 1>&6
6577
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006578else
Michael W. Hudson54241132001-12-07 15:38:26 +00006579 echo "configure: failed program was:" >&5
6580 cat conftest.$ac_ext >&5
6581 rm -rf conftest*
6582
6583 echo "$ac_t""no" 1>&6
6584 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006585echo "configure:6586: checking gethostbyname_r with 3 args" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006586 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006587#line 6588 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006588#include "confdefs.h"
6589
6590# include <netdb.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006591
6592int main() {
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006593
6594 char *name;
6595 struct hostent *he;
6596 struct hostent_data data;
6597
6598 (void) gethostbyname_r(name, he, &data);
Michael W. Hudson54241132001-12-07 15:38:26 +00006599
6600; return 0; }
6601EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006602if { (eval echo configure:6603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006603 rm -rf conftest*
6604
6605 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006606#define HAVE_GETHOSTBYNAME_R 1
6607EOF
6608
Michael W. Hudson54241132001-12-07 15:38:26 +00006609 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006610#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6611EOF
6612
Michael W. Hudson54241132001-12-07 15:38:26 +00006613 echo "$ac_t""yes" 1>&6
6614
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006615else
Michael W. Hudson54241132001-12-07 15:38:26 +00006616 echo "configure: failed program was:" >&5
6617 cat conftest.$ac_ext >&5
6618 rm -rf conftest*
6619
6620 echo "$ac_t""no" 1>&6
6621
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006622fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006623rm -f conftest*
6624
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006625fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006626rm -f conftest*
6627
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006628fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006629rm -f conftest*
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006630 CFLAGS=$OLD_CFLAGS
6631
6632else
Michael W. Hudson54241132001-12-07 15:38:26 +00006633 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006634
Michael W. Hudson54241132001-12-07 15:38:26 +00006635 for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +00006636do
Michael W. Hudson54241132001-12-07 15:38:26 +00006637echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006638echo "configure:6639: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006639if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6640 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006641else
Michael W. Hudson54241132001-12-07 15:38:26 +00006642 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006643#line 6644 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006644#include "confdefs.h"
6645/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006646 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006647#include <assert.h>
6648/* Override any gcc2 internal prototype to avoid an error. */
6649/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006650 builtin and then its argument prototype would still apply. */
6651char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006652
Michael W. Hudson54241132001-12-07 15:38:26 +00006653int main() {
6654
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006655/* The GNU C library defines this for functions which it implements
6656 to always fail with ENOSYS. Some functions are actually named
6657 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006658#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006659choke me
6660#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006661$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006662#endif
6663
Michael W. Hudson54241132001-12-07 15:38:26 +00006664; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006665EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006666if { (eval echo configure:6667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006667 rm -rf conftest*
6668 eval "ac_cv_func_$ac_func=yes"
6669else
6670 echo "configure: failed program was:" >&5
6671 cat conftest.$ac_ext >&5
6672 rm -rf conftest*
6673 eval "ac_cv_func_$ac_func=no"
6674fi
6675rm -f conftest*
6676fi
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006677
Michael W. Hudson54241132001-12-07 15:38:26 +00006678if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6679 echo "$ac_t""yes" 1>&6
6680 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6681 cat >> confdefs.h <<EOF
6682#define $ac_tr_func 1
6683EOF
6684
6685else
6686 echo "$ac_t""no" 1>&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006687fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006688done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006689
Michael W. Hudson54241132001-12-07 15:38:26 +00006690
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006691fi
6692
Michael W. Hudson54241132001-12-07 15:38:26 +00006693
6694
6695
6696
6697
6698
Guido van Rossum627b2d71993-12-24 10:39:16 +00006699# checks for system services
6700# (none yet)
6701
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006702# Linux requires this for correct f.p. operations
Michael W. Hudson54241132001-12-07 15:38:26 +00006703echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006704echo "configure:6705: checking for __fpu_control" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006705if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
6706 echo $ac_n "(cached) $ac_c" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006707else
Michael W. Hudson54241132001-12-07 15:38:26 +00006708 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006709#line 6710 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006710#include "confdefs.h"
6711/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006712 which can conflict with char __fpu_control(); below. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006713#include <assert.h>
6714/* Override any gcc2 internal prototype to avoid an error. */
6715/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006716 builtin and then its argument prototype would still apply. */
6717char __fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006718
Michael W. Hudson54241132001-12-07 15:38:26 +00006719int main() {
6720
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006721/* The GNU C library defines this for functions which it implements
6722 to always fail with ENOSYS. Some functions are actually named
6723 something starting with __ and the normal name is an alias. */
6724#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6725choke me
6726#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006727__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006728#endif
6729
Michael W. Hudson54241132001-12-07 15:38:26 +00006730; return 0; }
6731EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006732if { (eval echo configure:6733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006733 rm -rf conftest*
6734 eval "ac_cv_func___fpu_control=yes"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006735else
Michael W. Hudson54241132001-12-07 15:38:26 +00006736 echo "configure: failed program was:" >&5
6737 cat conftest.$ac_ext >&5
6738 rm -rf conftest*
6739 eval "ac_cv_func___fpu_control=no"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006740fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006741rm -f conftest*
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006742fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006743
6744if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6745 echo "$ac_t""yes" 1>&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006746 :
6747else
Michael W. Hudson54241132001-12-07 15:38:26 +00006748 echo "$ac_t""no" 1>&6
6749echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006750echo "configure:6751: checking for __fpu_control in -lieee" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006751ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
6752if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6753 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006754else
Michael W. Hudson54241132001-12-07 15:38:26 +00006755 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006756LIBS="-lieee $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006757cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006758#line 6759 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006759#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006760/* 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 __fpu_control();
6764
6765int main() {
6766__fpu_control()
6767; return 0; }
6768EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006769if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006770 rm -rf conftest*
6771 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006772else
Michael W. Hudson54241132001-12-07 15:38:26 +00006773 echo "configure: failed program was:" >&5
6774 cat conftest.$ac_ext >&5
6775 rm -rf conftest*
6776 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006777fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006778rm -f conftest*
6779LIBS="$ac_save_LIBS"
6780
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006781fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006782if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6783 echo "$ac_t""yes" 1>&6
6784 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6785 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6786 cat >> confdefs.h <<EOF
6787#define $ac_tr_lib 1
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006788EOF
6789
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006790 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006791
Michael W. Hudson54241132001-12-07 15:38:26 +00006792else
6793 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006794fi
6795
Michael W. Hudson54241132001-12-07 15:38:26 +00006796
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006797fi
6798
Michael W. Hudson54241132001-12-07 15:38:26 +00006799
Guido van Rossum7f253911997-05-09 02:42:48 +00006800# Check for --with-fpectl
Michael W. Hudson54241132001-12-07 15:38:26 +00006801echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006802echo "configure:6803: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006803# Check whether --with-fpectl or --without-fpectl was given.
6804if test "${with_fpectl+set}" = set; then
6805 withval="$with_fpectl"
Michael W. Hudson54241132001-12-07 15:38:26 +00006806
Guido van Rossum7f253911997-05-09 02:42:48 +00006807if test "$withval" != no
Michael W. Hudson54241132001-12-07 15:38:26 +00006808then cat >> confdefs.h <<\EOF
Guido van Rossum7f253911997-05-09 02:42:48 +00006809#define WANT_SIGFPE_HANDLER 1
6810EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00006811 echo "$ac_t""yes" 1>&6
6812else echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006813fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006814else
Michael W. Hudson54241132001-12-07 15:38:26 +00006815 echo "$ac_t""no" 1>&6
6816fi
6817
Guido van Rossum7f253911997-05-09 02:42:48 +00006818
Guido van Rossum7f43da71994-08-01 12:15:30 +00006819# check for --with-libm=...
6820
Guido van Rossum563e7081996-09-10 18:20:48 +00006821case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006822Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006823BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006824*) LIBM=-lm
6825esac
Michael W. Hudson54241132001-12-07 15:38:26 +00006826echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006827echo "configure:6828: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006828# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006829if test "${with_libm+set}" = set; then
6830 withval="$with_libm"
Michael W. Hudson54241132001-12-07 15:38:26 +00006831
Guido van Rossum7f253911997-05-09 02:42:48 +00006832if test "$withval" = no
6833then LIBM=
Michael W. Hudson54241132001-12-07 15:38:26 +00006834 echo "$ac_t""force LIBM empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006835elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006836then LIBM=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00006837 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
6838else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006839fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006840else
Michael W. Hudson54241132001-12-07 15:38:26 +00006841 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
6842fi
6843
Guido van Rossum7f43da71994-08-01 12:15:30 +00006844
6845# check for --with-libc=...
6846
Michael W. Hudson54241132001-12-07 15:38:26 +00006847echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006848echo "configure:6849: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006849# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006850if test "${with_libc+set}" = set; then
6851 withval="$with_libc"
Michael W. Hudson54241132001-12-07 15:38:26 +00006852
Guido van Rossum7f253911997-05-09 02:42:48 +00006853if test "$withval" = no
6854then LIBC=
Michael W. Hudson54241132001-12-07 15:38:26 +00006855 echo "$ac_t""force LIBC empty" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006856elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006857then LIBC=$withval
Michael W. Hudson54241132001-12-07 15:38:26 +00006858 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
6859else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006860fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006861else
Michael W. Hudson54241132001-12-07 15:38:26 +00006862 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
6863fi
6864
Guido van Rossum7f43da71994-08-01 12:15:30 +00006865
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006866# check for hypot() in math library
6867LIBS_SAVE=$LIBS
6868LIBS="$LIBS $LIBM"
6869for ac_func in hypot
6870do
Michael W. Hudson54241132001-12-07 15:38:26 +00006871echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006872echo "configure:6873: checking for $ac_func" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006873if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6874 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006875else
Michael W. Hudson54241132001-12-07 15:38:26 +00006876 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006877#line 6878 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006878#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006879/* System header to define __stub macros and hopefully few prototypes,
Michael W. Hudson54241132001-12-07 15:38:26 +00006880 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006881#include <assert.h>
6882/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006883/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00006884 builtin and then its argument prototype would still apply. */
6885char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006886
Michael W. Hudson54241132001-12-07 15:38:26 +00006887int main() {
6888
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006889/* The GNU C library defines this for functions which it implements
6890 to always fail with ENOSYS. Some functions are actually named
6891 something starting with __ and the normal name is an alias. */
6892#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6893choke me
6894#else
Michael W. Hudson54241132001-12-07 15:38:26 +00006895$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006896#endif
6897
Michael W. Hudson54241132001-12-07 15:38:26 +00006898; return 0; }
Jack Jansendd19cf82001-12-06 22:36:17 +00006899EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006900if { (eval echo configure:6901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00006901 rm -rf conftest*
6902 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006903else
Michael W. Hudson54241132001-12-07 15:38:26 +00006904 echo "configure: failed program was:" >&5
6905 cat conftest.$ac_ext >&5
6906 rm -rf conftest*
6907 eval "ac_cv_func_$ac_func=no"
6908fi
6909rm -f conftest*
6910fi
6911
6912if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6913 echo "$ac_t""yes" 1>&6
6914 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6915 cat >> confdefs.h <<EOF
6916#define $ac_tr_func 1
6917EOF
6918
6919else
6920 echo "$ac_t""no" 1>&6
6921LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006922fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006923done
6924
Michael W. Hudson54241132001-12-07 15:38:26 +00006925
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006926LIBS=$LIBS_SAVE
6927
Guido van Rossumad713701997-07-10 22:42:38 +00006928# check whether malloc(0) returns NULL or not
Michael W. Hudson54241132001-12-07 15:38:26 +00006929echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006930echo "configure:6931: checking what malloc(0) returns" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006931if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
6932 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00006933else
6934 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006935 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +00006936else
Michael W. Hudson54241132001-12-07 15:38:26 +00006937 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006938#line 6939 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006939#include "confdefs.h"
6940#include <stdio.h>
6941#ifdef HAVE_STDLIB
6942#include <stdlib.h>
6943#else
6944char *malloc(), *realloc();
6945int *free();
6946#endif
6947main() {
6948 char *p;
6949 p = malloc(0);
6950 if (p == NULL) exit(1);
6951 p = realloc(p, 0);
6952 if (p == NULL) exit(1);
6953 free(p);
6954 exit(0);
6955}
Michael W. Hudson54241132001-12-07 15:38:26 +00006956EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006957if { (eval echo configure:6958: \"$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 +00006958then
Guido van Rossumad713701997-07-10 22:42:38 +00006959 ac_cv_malloc_zero=nonnull
6960else
Michael W. Hudson54241132001-12-07 15:38:26 +00006961 echo "configure: failed program was:" >&5
6962 cat conftest.$ac_ext >&5
6963 rm -fr conftest*
6964 ac_cv_malloc_zero=null
Guido van Rossumad713701997-07-10 22:42:38 +00006965fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006966rm -fr conftest*
Guido van Rossumad713701997-07-10 22:42:38 +00006967fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006968
Guido van Rossumad713701997-07-10 22:42:38 +00006969fi
Guido van Rossum3065c942001-09-17 04:03:14 +00006970 # XXX arm cross-compile?
Michael W. Hudson54241132001-12-07 15:38:26 +00006971echo "$ac_t""$ac_cv_malloc_zero" 1>&6
Guido van Rossumad713701997-07-10 22:42:38 +00006972if test "$ac_cv_malloc_zero" = null
6973then
Michael W. Hudson54241132001-12-07 15:38:26 +00006974 cat >> confdefs.h <<\EOF
Guido van Rossumad713701997-07-10 22:42:38 +00006975#define MALLOC_ZERO_RETURNS_NULL 1
6976EOF
6977
6978fi
6979
Guido van Rossumef2255b2000-03-10 22:30:29 +00006980# check for wchar.h
Michael W. Hudson54241132001-12-07 15:38:26 +00006981ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6982echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006983echo "configure:6984: checking for wchar.h" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00006984if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6985 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00006986else
Michael W. Hudson54241132001-12-07 15:38:26 +00006987 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006988#line 6989 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006989#include "confdefs.h"
6990#include <wchar.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00006991EOF
6992ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisa82d3472002-02-24 16:05:05 +00006993{ (eval echo configure:6994: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006994ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6995if test -z "$ac_err"; then
6996 rm -rf conftest*
6997 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006998else
Michael W. Hudson54241132001-12-07 15:38:26 +00006999 echo "$ac_err" >&5
7000 echo "configure: failed program was:" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007001 cat conftest.$ac_ext >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007002 rm -rf conftest*
7003 eval "ac_cv_header_$ac_safe=no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007004fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007005rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007006fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007007if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7008 echo "$ac_t""yes" 1>&6
7009 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007010#define HAVE_WCHAR_H 1
7011EOF
7012 wchar_h="yes"
7013else
Michael W. Hudson54241132001-12-07 15:38:26 +00007014 echo "$ac_t""no" 1>&6
7015wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007016
7017fi
7018
Michael W. Hudson54241132001-12-07 15:38:26 +00007019
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007020# determine wchar_t size
7021if test "$wchar_h" = yes
7022then
Michael W. Hudson54241132001-12-07 15:38:26 +00007023 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007024echo "configure:7025: checking size of wchar_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007025if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
7026 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007027else
7028 if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007029 ac_cv_sizeof_wchar_t=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00007030else
Michael W. Hudson54241132001-12-07 15:38:26 +00007031 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007032#line 7033 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007033#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007034#include <stdio.h>
7035main()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007036{
Michael W. Hudson54241132001-12-07 15:38:26 +00007037 FILE *f=fopen("conftestval", "w");
7038 if (!f) exit(1);
7039 fprintf(f, "%d\n", sizeof(wchar_t));
7040 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00007041}
Michael W. Hudson54241132001-12-07 15:38:26 +00007042EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007043if { (eval echo configure:7044: \"$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 +00007044then
7045 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007046else
Michael W. Hudson54241132001-12-07 15:38:26 +00007047 echo "configure: failed program was:" >&5
7048 cat conftest.$ac_ext >&5
7049 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007050 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00007051fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007052rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007053fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007054
7055fi
7056echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
7057cat >> confdefs.h <<EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007058#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
7059EOF
7060
Michael W. Hudson54241132001-12-07 15:38:26 +00007061
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007062fi
7063
Michael W. Hudson54241132001-12-07 15:38:26 +00007064echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007065echo "configure:7066: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007066# Check whether --enable-unicode or --disable-unicode was given.
7067if test "${enable_unicode+set}" = set; then
7068 enableval="$enable_unicode"
Michael W. Hudson54241132001-12-07 15:38:26 +00007069 :
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007070else
7071 enable_unicode=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00007072fi
7073
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007074
7075if test $enable_unicode = yes
7076then
Martin v. Löwisfd917792001-06-27 20:22:04 +00007077 # Without any arguments, Py_UNICODE defaults to two-byte mode
7078 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007079fi
7080
7081case "$enable_unicode" in
7082ucs2) unicode_size="2"
Michael W. Hudson54241132001-12-07 15:38:26 +00007083 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007084#define Py_UNICODE_SIZE 2
7085EOF
7086
7087 ;;
7088ucs4) unicode_size="4"
Michael W. Hudson54241132001-12-07 15:38:26 +00007089 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007090#define Py_UNICODE_SIZE 4
7091EOF
7092
7093 ;;
7094esac
7095
Michael W. Hudson54241132001-12-07 15:38:26 +00007096
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007097if test "$enable_unicode" = "no"
7098then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007099 UNICODE_OBJS=""
Michael W. Hudson54241132001-12-07 15:38:26 +00007100 echo "$ac_t""not used" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007101else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007102 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Michael W. Hudson54241132001-12-07 15:38:26 +00007103 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007104#define Py_USING_UNICODE 1
7105EOF
7106
7107 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
7108 then
7109 PY_UNICODE_TYPE="wchar_t"
Michael W. Hudson54241132001-12-07 15:38:26 +00007110 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007111#define HAVE_USABLE_WCHAR_T 1
7112EOF
7113
Michael W. Hudson54241132001-12-07 15:38:26 +00007114 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007115#define PY_UNICODE_TYPE wchar_t
7116EOF
7117
7118 elif test "$ac_cv_sizeof_short" = "$unicode_size"
7119 then
7120 PY_UNICODE_TYPE="unsigned short"
Michael W. Hudson54241132001-12-07 15:38:26 +00007121 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007122#define PY_UNICODE_TYPE unsigned short
7123EOF
7124
7125 elif test "$ac_cv_sizeof_long" = "$unicode_size"
7126 then
7127 PY_UNICODE_TYPE="unsigned long"
Michael W. Hudson54241132001-12-07 15:38:26 +00007128 cat >> confdefs.h <<\EOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007129#define PY_UNICODE_TYPE unsigned long
7130EOF
7131
7132 else
7133 PY_UNICODE_TYPE="no type found"
7134 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007135 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00007136fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007137
7138# check for endianness
Michael W. Hudson54241132001-12-07 15:38:26 +00007139echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007140echo "configure:7141: checking whether byte ordering is bigendian" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007141if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
7142 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumef2255b2000-03-10 22:30:29 +00007143else
7144 ac_cv_c_bigendian=unknown
7145# See if sys/param.h defines the BYTE_ORDER macro.
Michael W. Hudson54241132001-12-07 15:38:26 +00007146cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007147#line 7148 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007148#include "confdefs.h"
7149#include <sys/types.h>
7150#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007151int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007152
7153#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
7154 bogus endian macros
7155#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007156; return 0; }
7157EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007158if { (eval echo configure:7159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007159 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007160 # It does; now see whether it defined to BIG_ENDIAN or not.
Michael W. Hudson54241132001-12-07 15:38:26 +00007161cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007162#line 7163 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007163#include "confdefs.h"
7164#include <sys/types.h>
7165#include <sys/param.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007166int main() {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007167
7168#if BYTE_ORDER != BIG_ENDIAN
7169 not big endian
7170#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00007171; return 0; }
7172EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007173if { (eval echo configure:7174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007174 rm -rf conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007175 ac_cv_c_bigendian=yes
7176else
Michael W. Hudson54241132001-12-07 15:38:26 +00007177 echo "configure: failed program was:" >&5
7178 cat conftest.$ac_ext >&5
7179 rm -rf conftest*
7180 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +00007181fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007182rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007183else
Michael W. Hudson54241132001-12-07 15:38:26 +00007184 echo "configure: failed program was:" >&5
7185 cat conftest.$ac_ext >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00007186fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007187rm -f conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007188if test $ac_cv_c_bigendian = unknown; then
7189if test "$cross_compiling" = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007190 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007191else
Michael W. Hudson54241132001-12-07 15:38:26 +00007192 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007193#line 7194 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007194#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007195main () {
Guido van Rossumef2255b2000-03-10 22:30:29 +00007196 /* Are we little or big endian? From Harbison&Steele. */
7197 union
7198 {
7199 long l;
7200 char c[sizeof (long)];
7201 } u;
7202 u.l = 1;
7203 exit (u.c[sizeof (long) - 1] == 1);
7204}
Michael W. Hudson54241132001-12-07 15:38:26 +00007205EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007206if { (eval echo configure:7207: \"$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 +00007207then
Guido van Rossumef2255b2000-03-10 22:30:29 +00007208 ac_cv_c_bigendian=no
7209else
Michael W. Hudson54241132001-12-07 15:38:26 +00007210 echo "configure: failed program was:" >&5
7211 cat conftest.$ac_ext >&5
7212 rm -fr conftest*
7213 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +00007214fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007215rm -fr conftest*
Guido van Rossumef2255b2000-03-10 22:30:29 +00007216fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007217
Michael W. Hudson54241132001-12-07 15:38:26 +00007218fi
7219fi
7220
7221echo "$ac_t""$ac_cv_c_bigendian" 1>&6
7222if test $ac_cv_c_bigendian = yes; then
7223 cat >> confdefs.h <<\EOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007224#define WORDS_BIGENDIAN 1
7225EOF
7226
7227fi
7228
Michael W. Hudson54241132001-12-07 15:38:26 +00007229
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007230# Check whether right shifting a negative integer extends the sign bit
7231# or fills with zeros (like the Cray J90, according to Tim Peters).
Michael W. Hudson54241132001-12-07 15:38:26 +00007232echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007233echo "configure:7234: checking whether right shift extends the sign bit" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007234if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
7235 echo $ac_n "(cached) $ac_c" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007236else
Michael W. Hudson54241132001-12-07 15:38:26 +00007237
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007238if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007239 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007240else
Michael W. Hudson54241132001-12-07 15:38:26 +00007241 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007242#line 7243 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007243#include "confdefs.h"
7244
7245int main()
7246{
Vladimir Marangozova6180282000-07-12 05:05:06 +00007247 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007248}
7249
Michael W. Hudson54241132001-12-07 15:38:26 +00007250EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007251if { (eval echo configure:7252: \"$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 +00007252then
Vladimir Marangozova6180282000-07-12 05:05:06 +00007253 ac_cv_rshift_extends_sign=yes
7254else
Michael W. Hudson54241132001-12-07 15:38:26 +00007255 echo "configure: failed program was:" >&5
7256 cat conftest.$ac_ext >&5
7257 rm -fr conftest*
7258 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +00007259fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007260rm -fr conftest*
Vladimir Marangozova6180282000-07-12 05:05:06 +00007261fi
7262
Michael W. Hudson54241132001-12-07 15:38:26 +00007263fi
7264
7265echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
Vladimir Marangozova6180282000-07-12 05:05:06 +00007266if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007267then
Michael W. Hudson54241132001-12-07 15:38:26 +00007268 cat >> confdefs.h <<\EOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007269#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
7270EOF
7271
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007272fi
7273
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007274# check for getc_unlocked and related locking functions
Michael W. Hudson54241132001-12-07 15:38:26 +00007275echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007276echo "configure:7277: checking for getc_unlocked() and friends" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007277if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
7278 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007279else
Michael W. Hudson54241132001-12-07 15:38:26 +00007280
7281cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007282#line 7283 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007283#include "confdefs.h"
7284#include <stdio.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007285int main() {
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007286
7287 FILE *f = fopen("/dev/null", "r");
7288 flockfile(f);
7289 getc_unlocked(f);
7290 funlockfile(f);
7291
Michael W. Hudson54241132001-12-07 15:38:26 +00007292; return 0; }
7293EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007294if { (eval echo configure:7295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007295 rm -rf conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007296 ac_cv_have_getc_unlocked=yes
7297else
Michael W. Hudson54241132001-12-07 15:38:26 +00007298 echo "configure: failed program was:" >&5
7299 cat conftest.$ac_ext >&5
7300 rm -rf conftest*
7301 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007302fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007303rm -f conftest*
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007304fi
7305
Michael W. Hudson54241132001-12-07 15:38:26 +00007306echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007307if test "$ac_cv_have_getc_unlocked" = yes
7308then
Michael W. Hudson54241132001-12-07 15:38:26 +00007309 cat >> confdefs.h <<\EOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007310#define HAVE_GETC_UNLOCKED 1
7311EOF
7312
7313fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007314
Martin v. Löwis0daad592001-09-30 21:09:59 +00007315# check for readline 4.0
Michael W. Hudson54241132001-12-07 15:38:26 +00007316echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007317echo "configure:7318: checking for rl_pre_input_hook in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007318ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'`
7319if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7320 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007321else
Michael W. Hudson54241132001-12-07 15:38:26 +00007322 ac_save_LIBS="$LIBS"
Guido van Rossum353ae582001-07-10 16:45:32 +00007323LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007324cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007325#line 7326 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00007326#include "confdefs.h"
7327/* Override any gcc2 internal prototype to avoid an error. */
7328/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007329 builtin and then its argument prototype would still apply. */
7330char rl_pre_input_hook();
7331
7332int main() {
7333rl_pre_input_hook()
7334; return 0; }
7335EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007336if { (eval echo configure:7337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007337 rm -rf conftest*
7338 eval "ac_cv_lib_$ac_lib_var=yes"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007339else
Michael W. Hudson54241132001-12-07 15:38:26 +00007340 echo "configure: failed program was:" >&5
7341 cat conftest.$ac_ext >&5
7342 rm -rf conftest*
7343 eval "ac_cv_lib_$ac_lib_var=no"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007344fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007345rm -f conftest*
7346LIBS="$ac_save_LIBS"
7347
Martin v. Löwis0daad592001-09-30 21:09:59 +00007348fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007349if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7350 echo "$ac_t""yes" 1>&6
7351 cat >> confdefs.h <<\EOF
Martin v. Löwis0daad592001-09-30 21:09:59 +00007352#define HAVE_RL_PRE_INPUT_HOOK 1
7353EOF
7354
Michael W. Hudson54241132001-12-07 15:38:26 +00007355else
7356 echo "$ac_t""no" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007357fi
7358
Michael W. Hudson54241132001-12-07 15:38:26 +00007359
Martin v. Löwis0daad592001-09-30 21:09:59 +00007360# check for readline 4.2
Michael W. Hudson54241132001-12-07 15:38:26 +00007361echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007362echo "configure:7363: checking for rl_completion_matches in -lreadline" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007363ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
7364if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7365 echo $ac_n "(cached) $ac_c" 1>&6
Martin v. Löwis0daad592001-09-30 21:09:59 +00007366else
Michael W. Hudson54241132001-12-07 15:38:26 +00007367 ac_save_LIBS="$LIBS"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007368LIBS="-lreadline -ltermcap $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007369cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007370#line 7371 "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007371#include "confdefs.h"
7372/* Override any gcc2 internal prototype to avoid an error. */
7373/* We use char because int might match the return type of a gcc2
Michael W. Hudson54241132001-12-07 15:38:26 +00007374 builtin and then its argument prototype would still apply. */
7375char rl_completion_matches();
7376
7377int main() {
7378rl_completion_matches()
7379; return 0; }
7380EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007381if { (eval echo configure:7382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007382 rm -rf conftest*
7383 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum353ae582001-07-10 16:45:32 +00007384else
Michael W. Hudson54241132001-12-07 15:38:26 +00007385 echo "configure: failed program was:" >&5
7386 cat conftest.$ac_ext >&5
7387 rm -rf conftest*
7388 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum353ae582001-07-10 16:45:32 +00007389fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007390rm -f conftest*
7391LIBS="$ac_save_LIBS"
7392
Guido van Rossum353ae582001-07-10 16:45:32 +00007393fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007394if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7395 echo "$ac_t""yes" 1>&6
7396 cat >> confdefs.h <<\EOF
Guido van Rossum353ae582001-07-10 16:45:32 +00007397#define HAVE_RL_COMPLETION_MATCHES 1
7398EOF
7399
Michael W. Hudson54241132001-12-07 15:38:26 +00007400else
7401 echo "$ac_t""no" 1>&6
Guido van Rossum353ae582001-07-10 16:45:32 +00007402fi
7403
Jack Jansendd19cf82001-12-06 22:36:17 +00007404
Michael W. Hudson54241132001-12-07 15:38:26 +00007405echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007406echo "configure:7407: checking for broken nice()" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007407if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
7408 echo $ac_n "(cached) $ac_c" 1>&6
7409else
7410
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007411if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007412 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007413else
Michael W. Hudson54241132001-12-07 15:38:26 +00007414 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007415#line 7416 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007416#include "confdefs.h"
7417
7418int main()
7419{
7420 int val1 = nice(1);
7421 if (val1 != -1 && val1 == nice(2))
7422 exit(0);
7423 exit(1);
7424}
7425
Michael W. Hudson54241132001-12-07 15:38:26 +00007426EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007427if { (eval echo configure:7428: \"$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 +00007428then
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007429 ac_cv_broken_nice=yes
7430else
Michael W. Hudson54241132001-12-07 15:38:26 +00007431 echo "configure: failed program was:" >&5
7432 cat conftest.$ac_ext >&5
7433 rm -fr conftest*
7434 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007435fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007436rm -fr conftest*
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007437fi
7438
Michael W. Hudson54241132001-12-07 15:38:26 +00007439fi
7440
7441echo "$ac_t""$ac_cv_broken_nice" 1>&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007442if test "$ac_cv_broken_nice" = yes
7443then
Michael W. Hudson54241132001-12-07 15:38:26 +00007444 cat >> confdefs.h <<\EOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007445#define HAVE_BROKEN_NICE 1
7446EOF
7447
7448fi
7449
Jack Jansen666b1e72001-10-31 12:11:48 +00007450# On HP/UX 11.0, mvwdelch is a block with a return statement
Michael W. Hudson54241132001-12-07 15:38:26 +00007451echo $ac_n "checking whether mvwdelch is an expression""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007452echo "configure:7453: checking whether mvwdelch is an expression" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007453if eval "test \"`echo '$''{'ac_cv_mvwdelch_is_expression'+set}'`\" = set"; then
7454 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007455else
Michael W. Hudson54241132001-12-07 15:38:26 +00007456 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007457#line 7458 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007458#include "confdefs.h"
7459#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007460int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007461
7462 int rtn;
7463 rtn = mvwdelch(0,0,0);
7464
Michael W. Hudson54241132001-12-07 15:38:26 +00007465; return 0; }
7466EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007467if { (eval echo configure:7468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007468 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007469 ac_cv_mvwdelch_is_expression=yes
7470else
Michael W. Hudson54241132001-12-07 15:38:26 +00007471 echo "configure: failed program was:" >&5
7472 cat conftest.$ac_ext >&5
7473 rm -rf conftest*
7474 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007475fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007476rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007477fi
7478
Michael W. Hudson54241132001-12-07 15:38:26 +00007479echo "$ac_t""$ac_cv_mvwdelch_is_expression" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007480
7481if test "$ac_cv_mvwdelch_is_expression" = yes
7482then
Michael W. Hudson54241132001-12-07 15:38:26 +00007483 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007484#define MVWDELCH_IS_EXPRESSION 1
7485EOF
7486
7487fi
7488
Michael W. Hudson54241132001-12-07 15:38:26 +00007489echo $ac_n "checking whether WINDOW has _flags""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007490echo "configure:7491: checking whether WINDOW has _flags" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007491if eval "test \"`echo '$''{'ac_cv_window_has_flags'+set}'`\" = set"; then
7492 echo $ac_n "(cached) $ac_c" 1>&6
Jack Jansen666b1e72001-10-31 12:11:48 +00007493else
Michael W. Hudson54241132001-12-07 15:38:26 +00007494 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007495#line 7496 "configure"
Jack Jansen666b1e72001-10-31 12:11:48 +00007496#include "confdefs.h"
7497#include <curses.h>
Michael W. Hudson54241132001-12-07 15:38:26 +00007498int main() {
Jack Jansen666b1e72001-10-31 12:11:48 +00007499
7500 WINDOW *w;
7501 w->_flags = 0;
7502
Michael W. Hudson54241132001-12-07 15:38:26 +00007503; return 0; }
7504EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007505if { (eval echo configure:7506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007506 rm -rf conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007507 ac_cv_window_has_flags=yes
7508else
Michael W. Hudson54241132001-12-07 15:38:26 +00007509 echo "configure: failed program was:" >&5
7510 cat conftest.$ac_ext >&5
7511 rm -rf conftest*
7512 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +00007513fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007514rm -f conftest*
Jack Jansen666b1e72001-10-31 12:11:48 +00007515fi
7516
Michael W. Hudson54241132001-12-07 15:38:26 +00007517echo "$ac_t""$ac_cv_window_has_flags" 1>&6
7518
Jack Jansen666b1e72001-10-31 12:11:48 +00007519
7520if test "$ac_cv_window_has_flags" = yes
7521then
Michael W. Hudson54241132001-12-07 15:38:26 +00007522 cat >> confdefs.h <<\EOF
Jack Jansen666b1e72001-10-31 12:11:48 +00007523#define WINDOW_HAS_FLAGS 1
7524EOF
7525
7526fi
7527
Guido van Rossum95713eb2000-05-18 20:53:31 +00007528# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7529# Add sys/socket.h to confdefs.h
7530cat >> confdefs.h <<\EOF
7531#ifdef HAVE_SYS_SOCKET_H
7532#include <sys/socket.h>
7533#endif
7534EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007535echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007536echo "configure:7537: checking for socklen_t" >&5
Michael W. Hudson54241132001-12-07 15:38:26 +00007537if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
7538 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum95713eb2000-05-18 20:53:31 +00007539else
Michael W. Hudson54241132001-12-07 15:38:26 +00007540 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007541#line 7542 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007542#include "confdefs.h"
Michael W. Hudson54241132001-12-07 15:38:26 +00007543#include <sys/types.h>
7544#if STDC_HEADERS
7545#include <stdlib.h>
7546#include <stddef.h>
7547#endif
7548EOF
7549if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7550 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7551 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007552 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007553else
Michael W. Hudson54241132001-12-07 15:38:26 +00007554 rm -rf conftest*
7555 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007556fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007557rm -f conftest*
Guido van Rossum95713eb2000-05-18 20:53:31 +00007558
Michael W. Hudson54241132001-12-07 15:38:26 +00007559fi
7560echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7561if test $ac_cv_type_socklen_t = no; then
7562 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007563#define socklen_t int
7564EOF
7565
7566fi
7567
Michael W. Hudson54241132001-12-07 15:38:26 +00007568
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007569# Add Python/ prefix to LIBOBJS
7570libobjs=$LIBOBJS
7571LIBOBJS=
7572for obj in $libobjs; do
7573 LIBOBJS="$LIBOBJS Python/$obj"
7574done
7575
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007576#AC_MSG_CHECKING(for Modules/Setup)
7577#if test ! -f Modules/Setup ; then
7578# if test ! -d Modules ; then
7579# mkdir Modules
7580# fi
7581# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7582# AC_MSG_RESULT(creating)
7583#else
7584# AC_MSG_RESULT(already exists)
7585#fi
7586
Michael W. Hudson54241132001-12-07 15:38:26 +00007587
7588
Martin v. Löwis06f15bb2001-12-02 13:02:32 +00007589for h in `(cd $srcdir;echo Python/thread_*.h)`
7590do
7591 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
7592done
7593
Michael W. Hudson54241132001-12-07 15:38:26 +00007594
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007595SRCDIRS="Parser Grammar Objects Python Modules"
Michael W. Hudson54241132001-12-07 15:38:26 +00007596echo $ac_n "checking for build directories""... $ac_c" 1>&6
Martin v. Löwisa82d3472002-02-24 16:05:05 +00007597echo "configure:7598: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007598for dir in $SRCDIRS; do
7599 if test ! -d $dir; then
7600 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007601 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007602done
Michael W. Hudson54241132001-12-07 15:38:26 +00007603echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007604
Guido van Rossum627b2d71993-12-24 10:39:16 +00007605# generate output files
Michael W. Hudson54241132001-12-07 15:38:26 +00007606trap '' 1 2 15
7607cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007608# This file is a shell script that caches the results of configure
7609# tests run on this system so they can be shared between configure
Michael W. Hudson54241132001-12-07 15:38:26 +00007610# scripts and configure runs. It is not useful on other systems.
7611# If it contains results you don't want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007612#
Michael W. Hudson54241132001-12-07 15:38:26 +00007613# By default, configure uses ./config.cache as the cache file,
7614# creating it if it does not exist already. You can give configure
7615# the --cache-file=FILE option to use a different cache file; that is
7616# what configure does when it calls configure scripts in
7617# subdirectories, so they share the cache.
7618# Giving --cache-file=/dev/null disables caching, for debugging configure.
7619# config.status only pays attention to the cache file if you give it the
7620# --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007621#
Michael W. Hudson54241132001-12-07 15:38:26 +00007622EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007623# The following way of writing the cache mishandles newlines in values,
7624# but we know of no workaround that is simple, portable, and efficient.
7625# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007626# Ultrix sh set writes to stderr and can't be redirected directly,
7627# and sets the high bit in the cache file unless we assign to the vars.
Michael W. Hudson54241132001-12-07 15:38:26 +00007628(set) 2>&1 |
7629 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7630 *ac_space=\ *)
7631 # `set' does not quote correctly, so add quotes (double-quote substitution
7632 # turns \\\\ into \\, and sed turns \\ into \).
7633 sed -n \
7634 -e "s/'/'\\\\''/g" \
7635 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7636 ;;
7637 *)
7638 # `set' quotes correctly as required by POSIX, so do not add quotes.
7639 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7640 ;;
7641 esac >> confcache
7642if cmp -s $cache_file confcache; then
7643 :
7644else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007645 if test -w $cache_file; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007646 echo "updating cache $cache_file"
7647 cat confcache > $cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007648 else
7649 echo "not updating unwritable cache $cache_file"
7650 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007651fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007652rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007653
Michael W. Hudson54241132001-12-07 15:38:26 +00007654trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7655
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007656test "x$prefix" = xNONE && prefix=$ac_default_prefix
7657# Let make expand exec_prefix.
7658test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007659
Michael W. Hudson54241132001-12-07 15:38:26 +00007660# Any assignment to VPATH causes Sun make to only execute
7661# the first set of double-colon rules, so remove it if not needed.
7662# If there is a colon in the path, we need to keep it.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007663if test "x$srcdir" = x.; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007664 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007665fi
7666
Michael W. Hudson54241132001-12-07 15:38:26 +00007667trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7668
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007669DEFS=-DHAVE_CONFIG_H
7670
Michael W. Hudson54241132001-12-07 15:38:26 +00007671# Without the "./", some shells look in PATH for config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007672: ${CONFIG_STATUS=./config.status}
Michael W. Hudson54241132001-12-07 15:38:26 +00007673
7674echo creating $CONFIG_STATUS
7675rm -f $CONFIG_STATUS
7676cat > $CONFIG_STATUS <<EOF
7677#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007678# Generated automatically by configure.
7679# Run this file to recreate the current configuration.
Michael W. Hudson54241132001-12-07 15:38:26 +00007680# This directory was configured as follows,
7681# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7682#
7683# $0 $ac_configure_args
7684#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007685# Compiler output produced by configure, useful for debugging
Michael W. Hudson54241132001-12-07 15:38:26 +00007686# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007687
Michael W. Hudson54241132001-12-07 15:38:26 +00007688ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7689for ac_option
Jack Jansendd19cf82001-12-06 22:36:17 +00007690do
Michael W. Hudson54241132001-12-07 15:38:26 +00007691 case "\$ac_option" in
Jack Jansendd19cf82001-12-06 22:36:17 +00007692 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Michael W. Hudson54241132001-12-07 15:38:26 +00007693 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7694 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7695 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7696 echo "$CONFIG_STATUS generated by autoconf version 2.13"
7697 exit 0 ;;
7698 -help | --help | --hel | --he | --h)
7699 echo "\$ac_cs_usage"; exit 0 ;;
7700 *) echo "\$ac_cs_usage"; exit 1 ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007701 esac
7702done
7703
Michael W. Hudson54241132001-12-07 15:38:26 +00007704ac_given_srcdir=$srcdir
7705ac_given_INSTALL="$INSTALL"
Jack Jansendd19cf82001-12-06 22:36:17 +00007706
Michael W. Hudson54241132001-12-07 15:38:26 +00007707trap '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 +00007708EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007709cat >> $CONFIG_STATUS <<EOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007710
Michael W. Hudson54241132001-12-07 15:38:26 +00007711# Protect against being on the right side of a sed subst in config.status.
7712sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7713 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7714$ac_vpsub
7715$extrasub
7716s%@SHELL@%$SHELL%g
7717s%@CFLAGS@%$CFLAGS%g
7718s%@CPPFLAGS@%$CPPFLAGS%g
7719s%@CXXFLAGS@%$CXXFLAGS%g
7720s%@FFLAGS@%$FFLAGS%g
7721s%@DEFS@%$DEFS%g
7722s%@LDFLAGS@%$LDFLAGS%g
7723s%@LIBS@%$LIBS%g
7724s%@exec_prefix@%$exec_prefix%g
7725s%@prefix@%$prefix%g
7726s%@program_transform_name@%$program_transform_name%g
7727s%@bindir@%$bindir%g
7728s%@sbindir@%$sbindir%g
7729s%@libexecdir@%$libexecdir%g
7730s%@datadir@%$datadir%g
7731s%@sysconfdir@%$sysconfdir%g
7732s%@sharedstatedir@%$sharedstatedir%g
7733s%@localstatedir@%$localstatedir%g
7734s%@libdir@%$libdir%g
7735s%@includedir@%$includedir%g
7736s%@oldincludedir@%$oldincludedir%g
7737s%@infodir@%$infodir%g
7738s%@mandir@%$mandir%g
7739s%@VERSION@%$VERSION%g
7740s%@CONFIG_ARGS@%$CONFIG_ARGS%g
7741s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7742s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7743s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7744s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
7745s%@MACHDEP@%$MACHDEP%g
7746s%@SGI_ABI@%$SGI_ABI%g
7747s%@CXX@%$CXX%g
7748s%@MAINOBJ@%$MAINOBJ%g
7749s%@CC@%$CC%g
7750s%@CPP@%$CPP%g
7751s%@EXEEXT@%$EXEEXT%g
7752s%@BUILDEXEEXT@%$BUILDEXEEXT%g
7753s%@LIBRARY@%$LIBRARY%g
7754s%@LDLIBRARY@%$LDLIBRARY%g
7755s%@DLLLIBRARY@%$DLLLIBRARY%g
7756s%@BLDLIBRARY@%$BLDLIBRARY%g
7757s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
7758s%@LINKCC@%$LINKCC%g
7759s%@RANLIB@%$RANLIB%g
7760s%@AR@%$AR%g
7761s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7762s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7763s%@INSTALL_DATA@%$INSTALL_DATA%g
7764s%@LN@%$LN%g
7765s%@OPT@%$OPT%g
7766s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
7767s%@SO@%$SO%g
7768s%@LDSHARED@%$LDSHARED%g
7769s%@BLDSHARED@%$BLDSHARED%g
7770s%@CCSHARED@%$CCSHARED%g
7771s%@LINKFORSHARED@%$LINKFORSHARED%g
7772s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
7773s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7774s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
7775s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
7776s%@LDLAST@%$LDLAST%g
7777s%@DLINCLDIR@%$DLINCLDIR%g
7778s%@DYNLOADFILE@%$DYNLOADFILE%g
7779s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
7780s%@LIBOBJS@%$LIBOBJS%g
7781s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7782s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7783s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
7784s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
7785s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
7786s%@LIBM@%$LIBM%g
7787s%@LIBC@%$LIBC%g
7788s%@UNICODE_OBJS@%$UNICODE_OBJS%g
7789s%@THREADHEADERS@%$THREADHEADERS%g
7790s%@SRCDIRS@%$SRCDIRS%g
Jack Jansendd19cf82001-12-06 22:36:17 +00007791
Jack Jansendd19cf82001-12-06 22:36:17 +00007792CEOF
Jack Jansendd19cf82001-12-06 22:36:17 +00007793EOF
7794
Michael W. Hudson54241132001-12-07 15:38:26 +00007795cat >> $CONFIG_STATUS <<\EOF
7796
7797# Split the substitutions into bite-sized pieces for seds with
7798# small command number limits, like on Digital OSF/1 and HP-UX.
7799ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7800ac_file=1 # Number of current file.
7801ac_beg=1 # First line for current file.
7802ac_end=$ac_max_sed_cmds # Line after last line for current file.
7803ac_more_lines=:
7804ac_sed_cmds=""
7805while $ac_more_lines; do
7806 if test $ac_beg -gt 1; then
7807 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7808 else
7809 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00007810 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007811 if test ! -s conftest.s$ac_file; then
7812 ac_more_lines=false
7813 rm -f conftest.s$ac_file
7814 else
7815 if test -z "$ac_sed_cmds"; then
7816 ac_sed_cmds="sed -f conftest.s$ac_file"
7817 else
7818 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7819 fi
7820 ac_file=`expr $ac_file + 1`
7821 ac_beg=$ac_end
7822 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7823 fi
7824done
7825if test -z "$ac_sed_cmds"; then
7826 ac_sed_cmds=cat
7827fi
Jack Jansendd19cf82001-12-06 22:36:17 +00007828EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007829
7830cat >> $CONFIG_STATUS <<EOF
7831
7832CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
7833EOF
7834cat >> $CONFIG_STATUS <<\EOF
7835for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Jack Jansendd19cf82001-12-06 22:36:17 +00007836 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00007837 case "$ac_file" in
7838 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7839 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7840 *) ac_file_in="${ac_file}.in" ;;
Jack Jansendd19cf82001-12-06 22:36:17 +00007841 esac
7842
Michael W. Hudson54241132001-12-07 15:38:26 +00007843 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7844
7845 # Remove last slash and all that follows it. Not all systems have dirname.
7846 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007847 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007848 # The file is in a subdirectory.
7849 test ! -d "$ac_dir" && mkdir "$ac_dir"
7850 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007851 # A "../" for each directory in $ac_dir_suffix.
Michael W. Hudson54241132001-12-07 15:38:26 +00007852 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007853 else
7854 ac_dir_suffix= ac_dots=
7855 fi
7856
Michael W. Hudson54241132001-12-07 15:38:26 +00007857 case "$ac_given_srcdir" in
7858 .) srcdir=.
7859 if test -z "$ac_dots"; then top_srcdir=.
7860 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7861 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007862 *) # Relative path.
Michael W. Hudson54241132001-12-07 15:38:26 +00007863 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7864 top_srcdir="$ac_dots$ac_given_srcdir" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007865 esac
7866
Michael W. Hudson54241132001-12-07 15:38:26 +00007867 case "$ac_given_INSTALL" in
7868 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7869 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007870 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007871
Michael W. Hudson54241132001-12-07 15:38:26 +00007872 echo creating "$ac_file"
7873 rm -f "$ac_file"
7874 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7875 case "$ac_file" in
7876 *Makefile*) ac_comsub="1i\\
7877# $configure_input" ;;
7878 *) ac_comsub= ;;
7879 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007880
Michael W. Hudson54241132001-12-07 15:38:26 +00007881 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7882 sed -e "$ac_comsub
7883s%@configure_input@%$configure_input%g
7884s%@srcdir@%$srcdir%g
7885s%@top_srcdir@%$top_srcdir%g
7886s%@INSTALL@%$INSTALL%g
7887" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7888fi; done
7889rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007890
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007891# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7892# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007893#
7894# ac_d sets the value in "#define NAME VALUE" lines.
Michael W. Hudson54241132001-12-07 15:38:26 +00007895ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7896ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7897ac_dC='\3'
7898ac_dD='%g'
7899# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7900ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7901ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007902ac_uC=' '
Michael W. Hudson54241132001-12-07 15:38:26 +00007903ac_uD='\4%g'
7904# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7905ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7906ac_eB='$%\1#\2define\3'
7907ac_eC=' '
7908ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007909
Michael W. Hudson54241132001-12-07 15:38:26 +00007910if test "${CONFIG_HEADERS+set}" != set; then
7911EOF
7912cat >> $CONFIG_STATUS <<EOF
7913 CONFIG_HEADERS="pyconfig.h"
7914EOF
7915cat >> $CONFIG_STATUS <<\EOF
7916fi
7917for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007918 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Michael W. Hudson54241132001-12-07 15:38:26 +00007919 case "$ac_file" in
7920 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7921 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7922 *) ac_file_in="${ac_file}.in" ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007923 esac
7924
Michael W. Hudson54241132001-12-07 15:38:26 +00007925 echo creating $ac_file
Guido van Rossum7f43da71994-08-01 12:15:30 +00007926
Michael W. Hudson54241132001-12-07 15:38:26 +00007927 rm -f conftest.frag conftest.in conftest.out
7928 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7929 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007930
7931EOF
7932
Michael W. Hudson54241132001-12-07 15:38:26 +00007933# Transform confdefs.h into a sed script conftest.vals that substitutes
7934# the proper values into config.h.in to produce config.h. And first:
7935# Protect against being on the right side of a sed subst in config.status.
7936# Protect against being in an unquoted here document in config.status.
7937rm -f conftest.vals
7938cat > conftest.hdr <<\EOF
7939s/[\\&%]/\\&/g
7940s%[\\$`]%\\&%g
7941s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
7942s%ac_d%ac_u%gp
7943s%ac_u%ac_e%gp
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007944EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007945sed -n -f conftest.hdr confdefs.h > conftest.vals
7946rm -f conftest.hdr
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007947
7948# This sed command replaces #undef with comments. This is necessary, for
7949# example, in the case of _POSIX_SOURCE, which is predefined and required
7950# on some systems where configure will not decide to define it.
Michael W. Hudson54241132001-12-07 15:38:26 +00007951cat >> conftest.vals <<\EOF
7952s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007953EOF
7954
Michael W. Hudson54241132001-12-07 15:38:26 +00007955# Break up conftest.vals because some shells have a limit on
7956# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007957
Jack Jansendd19cf82001-12-06 22:36:17 +00007958rm -f conftest.tail
Michael W. Hudson54241132001-12-07 15:38:26 +00007959while :
Jack Jansendd19cf82001-12-06 22:36:17 +00007960do
Michael W. Hudson54241132001-12-07 15:38:26 +00007961 ac_lines=`grep -c . conftest.vals`
7962 # grep -c gives empty output for an empty file on some AIX systems.
7963 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7964 # Write a limited-size here document to conftest.frag.
7965 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7966 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +00007967 echo 'CEOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007968 sed -f conftest.frag conftest.in > conftest.out
7969 rm -f conftest.in
7970 mv conftest.out conftest.in
7971' >> $CONFIG_STATUS
7972 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7973 rm -f conftest.vals
7974 mv conftest.tail conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00007975done
Michael W. Hudson54241132001-12-07 15:38:26 +00007976rm -f conftest.vals
Jack Jansendd19cf82001-12-06 22:36:17 +00007977
Michael W. Hudson54241132001-12-07 15:38:26 +00007978cat >> $CONFIG_STATUS <<\EOF
7979 rm -f conftest.frag conftest.h
7980 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7981 cat conftest.in >> conftest.h
7982 rm -f conftest.in
7983 if cmp -s $ac_file conftest.h 2>/dev/null; then
7984 echo "$ac_file is unchanged"
7985 rm -f conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007986 else
Michael W. Hudson54241132001-12-07 15:38:26 +00007987 # Remove last slash and all that follows it. Not all systems have dirname.
7988 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Jack Jansendd19cf82001-12-06 22:36:17 +00007989 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Michael W. Hudson54241132001-12-07 15:38:26 +00007990 # The file is in a subdirectory.
7991 test ! -d "$ac_dir" && mkdir "$ac_dir"
Jack Jansendd19cf82001-12-06 22:36:17 +00007992 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007993 rm -f $ac_file
7994 mv conftest.h $ac_file
Jack Jansendd19cf82001-12-06 22:36:17 +00007995 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007996fi; done
7997
Guido van Rossumf78abae1997-01-21 22:02:36 +00007998EOF
Michael W. Hudson54241132001-12-07 15:38:26 +00007999cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00008000
Michael W. Hudson54241132001-12-07 15:38:26 +00008001EOF
8002cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008003
Michael W. Hudson54241132001-12-07 15:38:26 +00008004exit 0
Guido van Rossum627b2d71993-12-24 10:39:16 +00008005EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008006chmod +x $CONFIG_STATUS
Michael W. Hudson54241132001-12-07 15:38:26 +00008007rm -fr confdefs* $ac_clean_files
8008test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00008009
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008010
8011echo "creating Setup"
8012if test ! -f Modules/Setup
8013then
8014 cp $srcdir/Modules/Setup.dist Modules/Setup
8015fi
8016
8017echo "creating Setup.local"
8018if test ! -f Modules/Setup.local
8019then
8020 echo "# Edit this file for local setup changes" >Modules/Setup.local
8021fi
8022
8023echo "creating Makefile"
8024$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
8025 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00008026 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008027mv config.c Modules