blob: be57265229763f96a17794bd52d8e0e7d352eb3a [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Martin v. Löwis61c5edf2001-10-18 04:06:00 +00003# From configure.in Revision: 1.269
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004
Guido van Rossum627b2d71993-12-24 10:39:16 +00005# Guess values for system-dependent variables and create Makefiles.
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006# Generated automatically using autoconf version 2.13
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007# 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
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# Defaults:
13ac_help=
14ac_default_prefix=/usr/local
15# Any additions from configure.in:
16ac_help="$ac_help
Jack Jansene578a632001-08-15 01:27:14 +000017 --enable-framework[=INSTALLDIR] Build (MacOSX|Darwin) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000018ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000019 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000021 --with-cxx=<compiler> enable C++ support"
Guido van Rossum95012191999-12-16 17:50:52 +000022ac_help="$ac_help
Neil Schemenauerdfb38e42001-01-27 06:57:08 +000023 --with-suffix=.exe set executable suffix"
24ac_help="$ac_help
Fred Drake109d9862001-07-11 06:27:56 +000025 --with-pydebug build with Py_DEBUG defined"
26ac_help="$ac_help
Jack Jansene578a632001-08-15 01:27:14 +000027 --enable-toolbox-glue disable/enable MacOSX glue code for extensions"
28ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000029 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000030ac_help="$ac_help
Neil Schemenauerd32c2492001-01-24 17:25:28 +000031 --with-signal-module disable/enable signal module"
32ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000033 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000034ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000035 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000036ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000037 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000038ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000039 --with-pth use GNU pth threading libraries"
40ac_help="$ac_help
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000041 --enable-ipv6 Enable ipv6 (with ipv4) support
42 --disable-ipv6 Disable ipv6 support"
43ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000044 --with(out)-cycle-gc disable/enable garbage collection"
45ac_help="$ac_help
Neil Schemenauera35c6882001-02-27 04:45:05 +000046 --with(out)-pymalloc disable/enable specialized mallocs"
47ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000048 --with-wctype-functions use wctype.h functions"
49ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000050 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000051ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000052 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000053ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000054 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000055ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000056 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000057ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000058 --with-libc=STRING C library"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000059ac_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.
65build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000066cache_file=./config.cache
67exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000068host=NONE
69no_create=
70nonopt=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=
79target=NONE
80verbose=
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
96# Initialize some other variables.
97subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000098MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000099SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +0000100# 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
Guido van Rossum627b2d71993-12-24 10:39:16 +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
Guido van Rossum7f43da71994-08-01 12:15:30 +0000114 case "$ac_option" in
115 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
116 *) ac_optarg= ;;
117 esac
118
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000119 # Accept the important Cygnus configure options, so we can diagnose typos.
120
Guido van Rossum7f43da71994-08-01 12:15:30 +0000121 case "$ac_option" in
122
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=*)
126 bindir="$ac_optarg" ;;
127
128 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000129 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000130 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000131 build="$ac_optarg" ;;
132
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=*)
138 cache_file="$ac_optarg" ;;
139
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=*)
144 datadir="$ac_optarg" ;;
145
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 -disable-* | --disable-*)
147 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.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000149 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000150 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000151 fi
152 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
153 eval "enable_${ac_feature}=no" ;;
154
155 -enable-* | --enable-*)
156 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.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000158 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000159 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000160 fi
161 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
162 case "$ac_option" in
163 *=*) ;;
164 *) ac_optarg=yes ;;
165 esac
166 eval "enable_${ac_feature}='$ac_optarg'" ;;
167
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=*)
175 exec_prefix="$ac_optarg" ;;
176
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
181 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000182 # 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.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000184 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000185Usage: 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]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000196 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000197 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000198 --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]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000212 --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
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000215 --program-transform-name=PROGRAM
216 run sed PROGRAM on installed program names
217EOF
218 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000219Host 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
Guido van Rossum7f43da71994-08-01 12:15:30 +0000230EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000231 if test -n "$ac_help"; then
232 echo "--enable and --with options recognized:$ac_help"
233 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000234 exit 0 ;;
235
236 -host | --host | --hos | --ho)
237 ac_prev=host ;;
238 -host=* | --host=* | --hos=* | --ho=*)
239 host="$ac_optarg" ;;
240
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=*)
246 includedir="$ac_optarg" ;;
247
248 -infodir | --infodir | --infodi | --infod | --info | --inf)
249 ac_prev=infodir ;;
250 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
251 infodir="$ac_optarg" ;;
252
253 -libdir | --libdir | --libdi | --libd)
254 ac_prev=libdir ;;
255 -libdir=* | --libdir=* | --libdi=* | --libd=*)
256 libdir="$ac_optarg" ;;
257
258 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
259 | --libexe | --libex | --libe)
260 ac_prev=libexecdir ;;
261 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
262 | --libexe=* | --libex=* | --libe=*)
263 libexecdir="$ac_optarg" ;;
264
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=*)
272 localstatedir="$ac_optarg" ;;
273
274 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
275 ac_prev=mandir ;;
276 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
277 mandir="$ac_optarg" ;;
278
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=*)
298 oldincludedir="$ac_optarg" ;;
299
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=*)
303 prefix="$ac_optarg" ;;
304
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=*)
310 program_prefix="$ac_optarg" ;;
311
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=*)
317 program_suffix="$ac_optarg" ;;
318
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=*)
334 program_transform_name="$ac_optarg" ;;
335
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=*)
344 sbindir="$ac_optarg" ;;
345
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=*)
355 sharedstatedir="$ac_optarg" ;;
356
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000357 -site | --site | --sit)
358 ac_prev=site ;;
359 -site=* | --site=* | --sit=*)
360 site="$ac_optarg" ;;
361
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=*)
365 srcdir="$ac_optarg" ;;
366
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=*)
372 sysconfdir="$ac_optarg" ;;
373
Guido van Rossum7f43da71994-08-01 12:15:30 +0000374 -target | --target | --targe | --targ | --tar | --ta | --t)
375 ac_prev=target ;;
376 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
377 target="$ac_optarg" ;;
378
379 -v | -verbose | --verbose | --verbos | --verbo | --verb)
380 verbose=yes ;;
381
382 -version | --version | --versio | --versi | --vers)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000383 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000384 exit 0 ;;
385
386 -with-* | --with-*)
387 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.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000389 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000390 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000391 fi
392 ac_package=`echo $ac_package| sed 's/-/_/g'`
393 case "$ac_option" in
394 *=*) ;;
395 *) ac_optarg=yes ;;
396 esac
397 eval "with_${ac_package}='$ac_optarg'" ;;
398
399 -without-* | --without-*)
400 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.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000403 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000404 fi
405 ac_package=`echo $ac_package| sed 's/-/_/g'`
406 eval "with_${ac_package}=no" ;;
407
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=*)
417 x_includes="$ac_optarg" ;;
418
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=*)
424 x_libraries="$ac_optarg" ;;
425
Guido van Rossum76be6ed1995-01-02 18:33:54 +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 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000430 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000431 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000432 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000433 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000434 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000435 fi
436 nonopt="$ac_option"
437 ;;
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
Guido van Rossum76be6ed1995-01-02 18:33:54 +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
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000446trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000447
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000448# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000449# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000450# 1 file creation
451# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000452# 3 some systems may open it to /dev/tty
453# 4 used on the Kubota Titan
454# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000455# 5 compiler messages saved in config.log
456if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000457 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000458else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000459 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000460fi
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
472do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000473 case "$ac_arg" in
474 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
475 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000476 -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
484# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000485# 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.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000489if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000490if 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
Guido van Rossum7f43da71994-08-01 12:15:30 +0000494# confdefs.h avoids OS command line length limits that DEFS can exceed.
495rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000496# 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
499# 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.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000501ac_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
508 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
509 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
519 { 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
Guido van Rossum76be6ed1995-01-02 18:33:54 +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
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000524srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
525
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
536 echo "loading site script $ac_site_file"
537 . "$ac_site_file"
538 fi
539done
540
541if test -r "$cache_file"; then
542 echo "loading cache $cache_file"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000543 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000544else
545 echo "creating cache $cache_file"
546 > $cache_file
547fi
548
Guido van Rossum7f43da71994-08-01 12:15:30 +0000549ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +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'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000552ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000553ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000554cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000555
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000556ac_exeext=
557ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000558if (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
566else
567 ac_n= ac_c='\c' ac_t=
568fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000569
Guido van Rossum0a516c91994-09-12 10:58:40 +0000570
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571
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
Guido van Rossum6db412b2001-04-18 04:37:57 +0000575VERSION=2.2
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
Guido van Rossum563e7081996-09-10 18:20:48 +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"
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000585
Jack Jansene578a632001-08-15 01:27:14 +0000586 case $enableval in
587 yes)
588 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
Guido van Rossum563e7081996-09-10 18:20:48 +0000605
606else
Jack Jansene578a632001-08-15 01:27:14 +0000607
608 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
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000614fi
615
Guido van Rossum91922671997-10-09 20:24:13 +0000616
Jack Jansene578a632001-08-15 01:27:14 +0000617
618
619
620
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
626echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000627echo "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 |
639 tr -d '/ ' | 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";;
Guido van Rossumb97ef171997-09-28 05:44:03 +0000644 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000645 esac
646fi
Guido van Rossum91922671997-10-09 20:24:13 +0000647
648#
649# SGI compilers allow the specification of the both the ABI and the
650# ISA on the command line. Depending on the values of these switches,
651# different and often incompatable code will be generated.
652#
653# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
654# thus supply support for various ABI/ISA combinations. The MACHDEP
655# variable is also adjusted.
656#
657
658if test ! -z "$SGI_ABI"
659then
660 CC="cc $SGI_ABI"
661 LDFLAGS="$SGI_ABI $LDFLAGS"
662 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
663fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000664echo "$ac_t""$MACHDEP" 1>&6
665
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000667echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000668echo "configure:669: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000669# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000670if test "${with_gcc+set}" = set; then
671 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000672
673 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000674 no) CC=cc
675 without_gcc=yes;;
676 yes) CC=gcc
677 without_gcc=no;;
678 *) CC=$withval
679 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000680 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000681else
Guido van Rossume77438c1995-09-13 18:59:59 +0000682
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000683 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000684 AIX*) CC=cc_r
685 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000686 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000687 case $BE_HOST_CPU in
688 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000689 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000690 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000691 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 +0000692 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000693 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000694 ;;
695 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000696 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000697 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000698 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000699 ;;
700 *)
Fred Drake5790be12000-10-09 17:06:13 +0000701 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000702 ;;
703 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000704 AR="\$(srcdir)/Modules/ar_beos"
705 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000706 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000707 Monterey*)
708 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +0000709 without_gcc=;;
710 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000711 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000712fi
713
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000714echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000715
Guido van Rossum95012191999-12-16 17:50:52 +0000716
717
Fred Drakea1a84e72001-03-06 05:52:16 +0000718MAINOBJ=python.o
Guido van Rossum95012191999-12-16 17:50:52 +0000719echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000720echo "configure:721: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000721# Check whether --with-cxx or --without-cxx was given.
722if test "${with_cxx+set}" = set; then
723 withval="$with_cxx"
724
Martin v. Löwis22352952000-12-13 17:37:02 +0000725 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000726 case $withval in
727 no) CXX=
728 with_cxx=no;;
729 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000730 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000731 with_cxx=$withval;;
732 esac
733else
734
735 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000736 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000737
738fi
739
740echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000741
742
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000743
744
Martin v. Löwis22352952000-12-13 17:37:02 +0000745if test "$check_cxx" = "yes"
746then
747 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
748do
749# Extract the first word of "$ac_prog", so it can be a program name with args.
750set dummy $ac_prog; ac_word=$2
751echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000752echo "configure:753: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000753if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
754 echo $ac_n "(cached) $ac_c" 1>&6
755else
756 if test -n "$CXX"; then
757 ac_cv_prog_CXX="$CXX" # Let the user override the test.
758else
759 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
760 ac_dummy="$PATH"
761 for ac_dir in $ac_dummy; do
762 test -z "$ac_dir" && ac_dir=.
763 if test -f $ac_dir/$ac_word; then
764 ac_cv_prog_CXX="$ac_prog"
765 break
766 fi
767 done
768 IFS="$ac_save_ifs"
769fi
770fi
771CXX="$ac_cv_prog_CXX"
772if test -n "$CXX"; then
773 echo "$ac_t""$CXX" 1>&6
774else
775 echo "$ac_t""no" 1>&6
776fi
777
778test -n "$CXX" && break
779done
780test -n "$CXX" || CXX="notfound"
781
782 if test "$CXX" = "notfound"
783 then
784 CXX=
785 else
786 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000787echo "configure:788: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000788
789ac_ext=C
790# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
791ac_cpp='$CXXCPP $CPPFLAGS'
792ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
793ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
794cross_compiling=$ac_cv_prog_cxx_cross
795
796cat > conftest.$ac_ext << EOF
797
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000798#line 799 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000799#include "confdefs.h"
800
801int main(){return(0);}
802EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000803if { (eval echo configure:804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000804 ac_cv_prog_cxx_works=yes
805 # If we can't run a trivial program, we are probably using a cross compiler.
806 if (./conftest; exit) 2>/dev/null; then
807 ac_cv_prog_cxx_cross=no
808 else
809 ac_cv_prog_cxx_cross=yes
810 fi
811else
812 echo "configure: failed program was:" >&5
813 cat conftest.$ac_ext >&5
814 ac_cv_prog_cxx_works=no
815fi
816rm -fr conftest*
817ac_ext=c
818# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
819ac_cpp='$CPP $CPPFLAGS'
820ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
821ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
822cross_compiling=$ac_cv_prog_cc_cross
823
824echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
825if test $ac_cv_prog_cxx_works = no; then
826 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
827fi
828echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000829echo "configure:830: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000830echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
831cross_compiling=$ac_cv_prog_cxx_cross
832
833 fi
834fi
835
Guido van Rossum8b131c51995-03-09 14:10:13 +0000836# If the user switches compilers, we can't believe the cache
837if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
838then
839 { echo "configure: error: cached CC is different -- throw away $cache_file
840(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
841fi
842
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843# Extract the first word of "gcc", so it can be a program name with args.
844set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000845echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000846echo "configure:847: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000847if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000848 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849else
850 if test -n "$CC"; then
851 ac_cv_prog_CC="$CC" # Let the user override the test.
852else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000853 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
854 ac_dummy="$PATH"
855 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856 test -z "$ac_dir" && ac_dir=.
857 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000859 break
860 fi
861 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000863fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864fi
865CC="$ac_cv_prog_CC"
866if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000867 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000869 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000871
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000872if test -z "$CC"; then
873 # Extract the first word of "cc", so it can be a program name with args.
874set dummy cc; ac_word=$2
875echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000876echo "configure:877: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000877if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878 echo $ac_n "(cached) $ac_c" 1>&6
879else
880 if test -n "$CC"; then
881 ac_cv_prog_CC="$CC" # Let the user override the test.
882else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000883 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000884 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000885 ac_dummy="$PATH"
886 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000887 test -z "$ac_dir" && ac_dir=.
888 if test -f $ac_dir/$ac_word; then
889 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
890 ac_prog_rejected=yes
891 continue
892 fi
893 ac_cv_prog_CC="cc"
894 break
895 fi
896 done
897 IFS="$ac_save_ifs"
898if test $ac_prog_rejected = yes; then
899 # We found a bogon in the path, so make sure we never use it.
900 set dummy $ac_cv_prog_CC
901 shift
902 if test $# -gt 0; then
903 # We chose a different compiler from the bogus one.
904 # However, it has the same basename, so the bogon will be chosen
905 # first if we set CC to just the basename; use the full file name.
906 shift
907 set dummy "$ac_dir/$ac_word" "$@"
908 shift
909 ac_cv_prog_CC="$@"
910 fi
911fi
912fi
913fi
914CC="$ac_cv_prog_CC"
915if test -n "$CC"; then
916 echo "$ac_t""$CC" 1>&6
917else
918 echo "$ac_t""no" 1>&6
919fi
920
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000921 if test -z "$CC"; then
922 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000923 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000924 # Extract the first word of "cl", so it can be a program name with args.
925set dummy cl; ac_word=$2
926echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000927echo "configure:928: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000928if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000929 echo $ac_n "(cached) $ac_c" 1>&6
930else
931 if test -n "$CC"; then
932 ac_cv_prog_CC="$CC" # Let the user override the test.
933else
934 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
935 ac_dummy="$PATH"
936 for ac_dir in $ac_dummy; do
937 test -z "$ac_dir" && ac_dir=.
938 if test -f $ac_dir/$ac_word; then
939 ac_cv_prog_CC="cl"
940 break
941 fi
942 done
943 IFS="$ac_save_ifs"
944fi
945fi
946CC="$ac_cv_prog_CC"
947if test -n "$CC"; then
948 echo "$ac_t""$CC" 1>&6
949else
950 echo "$ac_t""no" 1>&6
951fi
952 ;;
953 esac
954 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000955 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
956fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000957
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000958echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000959echo "configure:960: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000960
961ac_ext=c
962# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
963ac_cpp='$CPP $CPPFLAGS'
964ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000965ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000966cross_compiling=$ac_cv_prog_cc_cross
967
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000968cat > conftest.$ac_ext << EOF
969
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000970#line 971 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000971#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000972
Guido van Rossumf78abae1997-01-21 22:02:36 +0000973main(){return(0);}
974EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +0000975if { (eval echo configure:976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000976 ac_cv_prog_cc_works=yes
977 # If we can't run a trivial program, we are probably using a cross compiler.
978 if (./conftest; exit) 2>/dev/null; then
979 ac_cv_prog_cc_cross=no
980 else
981 ac_cv_prog_cc_cross=yes
982 fi
983else
984 echo "configure: failed program was:" >&5
985 cat conftest.$ac_ext >&5
986 ac_cv_prog_cc_works=no
987fi
988rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000989ac_ext=c
990# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
991ac_cpp='$CPP $CPPFLAGS'
992ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
993ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
994cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000995
996echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
997if test $ac_cv_prog_cc_works = no; then
998 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
999fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001000echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001001echo "configure:1002: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001002echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1003cross_compiling=$ac_cv_prog_cc_cross
1004
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001005echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001006echo "configure:1007: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001007if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001008 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001009else
1010 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001011#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001012 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001013#endif
1014EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001015if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001016 ac_cv_prog_gcc=yes
1017else
1018 ac_cv_prog_gcc=no
1019fi
1020fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001022echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001023
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001024if test $ac_cv_prog_gcc = yes; then
1025 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001026else
1027 GCC=
1028fi
1029
1030ac_test_CFLAGS="${CFLAGS+set}"
1031ac_save_CFLAGS="$CFLAGS"
1032CFLAGS=
1033echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001034echo "configure:1035: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001035if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001036 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001037else
1038 echo 'void f(){}' > conftest.c
1039if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001040 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001042 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001043fi
1044rm -f conftest*
1045
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001046fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001047
Guido van Rossumf78abae1997-01-21 22:02:36 +00001048echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001049if test "$ac_test_CFLAGS" = set; then
1050 CFLAGS="$ac_save_CFLAGS"
1051elif test $ac_cv_prog_cc_g = yes; then
1052 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001053 CFLAGS="-g -O2"
1054 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001055 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001056 fi
1057else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001058 if test "$GCC" = yes; then
1059 CFLAGS="-O2"
1060 else
1061 CFLAGS=
1062 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001063fi
1064
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001065
1066# checks for UNIX variants that set C preprocessor variables
1067echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001068echo "configure:1069: checking how to run the C preprocessor" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001069# On Suns, sometimes $CPP names a directory.
1070if test -n "$CPP" && test -d "$CPP"; then
1071 CPP=
1072fi
1073if test -z "$CPP"; then
1074if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1075 echo $ac_n "(cached) $ac_c" 1>&6
1076else
1077 # This must be in double quotes, not single quotes, because CPP may get
1078 # substituted into the Makefile and "${CC-cc}" will confuse make.
1079 CPP="${CC-cc} -E"
1080 # On the NeXT, cc -E runs the code through the compiler's parser,
1081 # not just through cpp.
1082 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001083#line 1084 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001084#include "confdefs.h"
1085#include <assert.h>
1086Syntax Error
1087EOF
1088ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001089{ (eval echo configure:1090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001090ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1091if test -z "$ac_err"; then
1092 :
1093else
1094 echo "$ac_err" >&5
1095 echo "configure: failed program was:" >&5
1096 cat conftest.$ac_ext >&5
1097 rm -rf conftest*
1098 CPP="${CC-cc} -E -traditional-cpp"
1099 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001100#line 1101 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001101#include "confdefs.h"
1102#include <assert.h>
1103Syntax Error
1104EOF
1105ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001106{ (eval echo configure:1107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001107ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1108if test -z "$ac_err"; then
1109 :
1110else
1111 echo "$ac_err" >&5
1112 echo "configure: failed program was:" >&5
1113 cat conftest.$ac_ext >&5
1114 rm -rf conftest*
1115 CPP="${CC-cc} -nologo -E"
1116 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001117#line 1118 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001118#include "confdefs.h"
1119#include <assert.h>
1120Syntax Error
1121EOF
1122ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001123{ (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001124ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1125if test -z "$ac_err"; then
1126 :
1127else
1128 echo "$ac_err" >&5
1129 echo "configure: failed program was:" >&5
1130 cat conftest.$ac_ext >&5
1131 rm -rf conftest*
1132 CPP=/lib/cpp
1133fi
1134rm -f conftest*
1135fi
1136rm -f conftest*
1137fi
1138rm -f conftest*
1139 ac_cv_prog_CPP="$CPP"
1140fi
1141 CPP="$ac_cv_prog_CPP"
1142else
1143 ac_cv_prog_CPP="$CPP"
1144fi
1145echo "$ac_t""$CPP" 1>&6
1146
1147echo $ac_n "checking for AIX""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001148echo "configure:1149: checking for AIX" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001149cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001150#line 1151 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001151#include "confdefs.h"
1152#ifdef _AIX
1153 yes
1154#endif
1155
1156EOF
1157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1158 egrep "yes" >/dev/null 2>&1; then
1159 rm -rf conftest*
1160 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1161#define _ALL_SOURCE 1
1162EOF
1163
1164else
1165 rm -rf conftest*
1166 echo "$ac_t""no" 1>&6
1167fi
1168rm -f conftest*
1169
1170
1171ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1172echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001173echo "configure:1174: checking for minix/config.h" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001174if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1175 echo $ac_n "(cached) $ac_c" 1>&6
1176else
1177 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001178#line 1179 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001179#include "confdefs.h"
1180#include <minix/config.h>
1181EOF
1182ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001183{ (eval echo configure:1184: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001184ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1185if test -z "$ac_err"; then
1186 rm -rf conftest*
1187 eval "ac_cv_header_$ac_safe=yes"
1188else
1189 echo "$ac_err" >&5
1190 echo "configure: failed program was:" >&5
1191 cat conftest.$ac_ext >&5
1192 rm -rf conftest*
1193 eval "ac_cv_header_$ac_safe=no"
1194fi
1195rm -f conftest*
1196fi
1197if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1198 echo "$ac_t""yes" 1>&6
1199 MINIX=yes
1200else
1201 echo "$ac_t""no" 1>&6
1202MINIX=
1203fi
1204
1205if test "$MINIX" = yes; then
1206 cat >> confdefs.h <<\EOF
1207#define _POSIX_SOURCE 1
1208EOF
1209
1210 cat >> confdefs.h <<\EOF
1211#define _POSIX_1_SOURCE 2
1212EOF
1213
1214 cat >> confdefs.h <<\EOF
1215#define _MINIX 1
1216EOF
1217
1218fi
1219
1220
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001221echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001222echo "configure:1223: checking for Cygwin environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001223if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1224 echo $ac_n "(cached) $ac_c" 1>&6
1225else
1226 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001227#line 1228 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001228#include "confdefs.h"
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001229
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001230int main() {
1231
1232#ifndef __CYGWIN__
1233#define __CYGWIN__ __CYGWIN32__
1234#endif
1235return __CYGWIN__;
1236; return 0; }
1237EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001238if { (eval echo configure:1239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001239 rm -rf conftest*
1240 ac_cv_cygwin=yes
1241else
1242 echo "configure: failed program was:" >&5
1243 cat conftest.$ac_ext >&5
1244 rm -rf conftest*
1245 ac_cv_cygwin=no
1246fi
1247rm -f conftest*
1248rm -f conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001249fi
1250
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001251echo "$ac_t""$ac_cv_cygwin" 1>&6
1252CYGWIN=
1253test "$ac_cv_cygwin" = yes && CYGWIN=yes
1254echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001255echo "configure:1256: checking for mingw32 environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001256if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1257 echo $ac_n "(cached) $ac_c" 1>&6
1258else
1259 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001260#line 1261 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001261#include "confdefs.h"
1262
1263int main() {
1264return __MINGW32__;
1265; return 0; }
1266EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001267if { (eval echo configure:1268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001268 rm -rf conftest*
1269 ac_cv_mingw32=yes
1270else
1271 echo "configure: failed program was:" >&5
1272 cat conftest.$ac_ext >&5
1273 rm -rf conftest*
1274 ac_cv_mingw32=no
1275fi
1276rm -f conftest*
1277rm -f conftest*
1278fi
1279
1280echo "$ac_t""$ac_cv_mingw32" 1>&6
1281MINGW32=
1282test "$ac_cv_mingw32" = yes && MINGW32=yes
1283
1284
1285echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001286echo "configure:1287: checking for executable suffix" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001287if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1288 echo $ac_n "(cached) $ac_c" 1>&6
1289else
1290 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1291 ac_cv_exeext=.exe
1292else
1293 rm -f conftest*
1294 echo 'int main () { return 0; }' > conftest.$ac_ext
1295 ac_cv_exeext=
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001296 if { (eval echo configure:1297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001297 for file in conftest.*; do
1298 case $file in
1299 *.c | *.o | *.obj) ;;
1300 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1301 esac
1302 done
1303 else
1304 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1305 fi
1306 rm -f conftest*
1307 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1308fi
1309fi
1310
1311EXEEXT=""
1312test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1313echo "$ac_t""${ac_cv_exeext}" 1>&6
1314ac_exeext=$EXEEXT
1315
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001316echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001317echo "configure:1318: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001318# Check whether --with-suffix or --without-suffix was given.
1319if test "${with_suffix+set}" = set; then
1320 withval="$with_suffix"
1321
1322 case $withval in
1323 no) EXEEXT=;;
1324 yes) EXEEXT=.exe;;
1325 *) EXEEXT=$withval;;
1326 esac
1327fi
1328
1329echo "$ac_t""$EXEEXT" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001330# Test whether we're running on a non-case-sensitive system, in which
1331# case we give a warning if no ext is given
1332if test -d "python" -a -z "$EXEEXT"
1333then
1334 echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2
1335fi
Guido van Rossumff555e32000-09-22 15:38:21 +00001336
Guido van Rossumdd997f71998-10-07 19:58:26 +00001337case $MACHDEP in
1338bsdos*)
1339 case $CC in
1340 gcc) CC="$CC -D_HAVE_BSDI";;
1341 esac;;
1342esac
1343
Guido van Rossum24b1e751997-08-21 02:29:16 +00001344case $ac_sys_system in
1345hp*|HP*)
1346 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001347 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001348 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001349Monterey*)
1350 case $CC in
1351 cc) CC="$CC -Wl,-Bexport";;
1352 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001353SunOS*)
1354 # Some functions have a prototype only with that define, e.g. confstr
1355 cat >> confdefs.h <<\EOF
1356#define __EXTENSIONS__ 1
1357EOF
1358
1359 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001360esac
1361
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001362
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001363
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001364echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001365echo "configure:1366: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001366if test -z "$LIBRARY"
1367then
1368 LIBRARY='libpython$(VERSION).a'
1369fi
1370echo "$ac_t""$LIBRARY" 1>&6
1371
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001372# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00001373# name of the library into which to insert object files). BLDLIBRARY is also
1374# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
1375# is blank as the main program is not linked directly against LDLIBRARY.
1376# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
1377# systems without shared libraries, LDLIBRARY is the same as LIBRARY
1378# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
1379# DLLLIBRARY is the shared (i.e., DLL) library.
1380#
1381
1382
Guido van Rossumaef734b2001-01-10 21:09:12 +00001383
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001384
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001385LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00001386BLDLIBRARY='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00001387DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00001388LDLIBRARYDIR=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001389
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001390# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001391# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001392# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001393
1394echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001395echo "configure:1396: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001396if test -z "$LINKCC"
1397then
1398 case $ac_sys_system in
1399 AIX*)
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001400 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001401 dgux*)
1402 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001403 Monterey64*)
1404 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001405 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001406 esac
1407fi
1408echo "$ac_t""$LINKCC" 1>&6
1409
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001410echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001411echo "configure:1412: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001412
1413# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001414case $MACHDEP in
1415dguxR4)
1416 LDLIBRARY='libpython$(VERSION).so'
1417 OPT="$OPT -pic"
1418 ;;
1419beos*)
1420 LDLIBRARY='libpython$(VERSION).so'
1421 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001422cygwin*)
1423 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001424 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001425 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001426esac
Jack Jansene578a632001-08-15 01:27:14 +00001427
Guido van Rossumb8552162001-09-05 14:58:11 +00001428# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
1429# library that we build, but we do not want to link against it (we
1430# will find it with a -framework option). For this reason there is an
1431# extra variable BLDLIBRARY against which Python and the extension
1432# modules are linked, BLDLIBRARY. This is normally the same as
1433# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00001434if test "$enable_framework"
1435then
1436 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
1437 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
1438 BLDLIBRARY=''
1439else
1440 BLDLIBRARY='$(LDLIBRARY)'
1441fi
1442
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001443echo "$ac_t""$LDLIBRARY" 1>&6
1444
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001445# Extract the first word of "ranlib", so it can be a program name with args.
1446set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001447echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001448echo "configure:1449: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001449if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001450 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001451else
1452 if test -n "$RANLIB"; then
1453 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1454else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001455 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1456 ac_dummy="$PATH"
1457 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001458 test -z "$ac_dir" && ac_dir=.
1459 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001460 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001461 break
1462 fi
1463 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001464 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001465 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001466fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001467fi
1468RANLIB="$ac_cv_prog_RANLIB"
1469if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001470 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001471else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001472 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001473fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001474
1475
Guido van Rossum7f43da71994-08-01 12:15:30 +00001476for ac_prog in ar aal
1477do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001478# Extract the first word of "$ac_prog", so it can be a program name with args.
1479set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001480echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001481echo "configure:1482: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001482if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001483 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001484else
1485 if test -n "$AR"; then
1486 ac_cv_prog_AR="$AR" # Let the user override the test.
1487else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001488 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1489 ac_dummy="$PATH"
1490 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001491 test -z "$ac_dir" && ac_dir=.
1492 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001493 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001494 break
1495 fi
1496 done
1497 IFS="$ac_save_ifs"
1498fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001499fi
1500AR="$ac_cv_prog_AR"
1501if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001502 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001503else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001504 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001505fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001506
1507test -n "$AR" && break
1508done
1509test -n "$AR" || AR="ar"
1510
Neil Schemenauera42c8272001-03-31 00:01:55 +00001511
1512case $MACHDEP in
1513bsdos*)
1514 # install -d does not work on BSDI
1515 if test -z "$INSTALL"
1516 then
1517 INSTALL="${srcdir}/install-sh -c"
1518 fi
1519esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001520ac_aux_dir=
1521for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1522 if test -f $ac_dir/install-sh; then
1523 ac_aux_dir=$ac_dir
1524 ac_install_sh="$ac_aux_dir/install-sh -c"
1525 break
1526 elif test -f $ac_dir/install.sh; then
1527 ac_aux_dir=$ac_dir
1528 ac_install_sh="$ac_aux_dir/install.sh -c"
1529 break
1530 fi
1531done
1532if test -z "$ac_aux_dir"; then
1533 { 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 +00001534fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001535ac_config_guess=$ac_aux_dir/config.guess
1536ac_config_sub=$ac_aux_dir/config.sub
1537ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1538
1539# Find a good install program. We prefer a C program (faster),
1540# so one script is as good as another. But avoid the broken or
1541# incompatible versions:
1542# SysV /etc/install, /usr/sbin/install
1543# SunOS /usr/etc/install
1544# IRIX /sbin/install
1545# AIX /bin/install
1546# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1547# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1548# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1549# ./install, which can be erroneously created by make from ./install.sh.
1550echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001551echo "configure:1552: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001552if test -z "$INSTALL"; then
1553if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1554 echo $ac_n "(cached) $ac_c" 1>&6
1555else
1556 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1557 for ac_dir in $PATH; do
1558 # Account for people who put trailing slashes in PATH elements.
1559 case "$ac_dir/" in
1560 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1561 *)
1562 # OSF1 and SCO ODT 3.0 have their own names for install.
1563 # Don't use installbsd from OSF since it installs stuff as root
1564 # by default.
1565 for ac_prog in ginstall scoinst install; do
1566 if test -f $ac_dir/$ac_prog; then
1567 if test $ac_prog = install &&
1568 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1569 # AIX install. It has an incompatible calling convention.
1570 :
1571 else
1572 ac_cv_path_install="$ac_dir/$ac_prog -c"
1573 break 2
1574 fi
1575 fi
1576 done
1577 ;;
1578 esac
1579 done
1580 IFS="$ac_save_IFS"
1581
1582fi
1583 if test "${ac_cv_path_install+set}" = set; then
1584 INSTALL="$ac_cv_path_install"
1585 else
1586 # As a last resort, use the slow shell script. We don't cache a
1587 # path for INSTALL within a source directory, because that will
1588 # break other packages using the cache if that directory is
1589 # removed, or if the path is relative.
1590 INSTALL="$ac_install_sh"
1591 fi
1592fi
1593echo "$ac_t""$INSTALL" 1>&6
1594
1595# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1596# It thinks the first close brace ends the variable substitution.
1597test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1598
1599test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1600
1601test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1602
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001603
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001604# Not every filesystem supports hard links
1605
1606if test -z "$LN" ; then
1607 case $ac_sys_system in
1608 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001609 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001610 *) LN=ln;;
1611 esac
1612fi
1613
Fred Drake109d9862001-07-11 06:27:56 +00001614# Check for --with-pydebug
1615echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001616echo "configure:1617: checking for --with-pydebug" >&5
Fred Drake109d9862001-07-11 06:27:56 +00001617# Check whether --with-pydebug or --without-pydebug was given.
1618if test "${with_pydebug+set}" = set; then
1619 withval="$with_pydebug"
1620
1621if test "$withval" != no
1622then cat >> confdefs.h <<\EOF
1623#define Py_DEBUG 1
1624EOF
1625 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1626else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
1627fi
1628else
1629 echo "$ac_t""no" 1>&6
1630fi
1631
1632
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001633# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001634
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001635if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001636then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001637 case $GCC in
1638 yes)
1639 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001640 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001641 if test "$Py_DEBUG" = 'true' ; then
1642 # Optimization messes up debuggers, so turn it off for
1643 # debug builds.
1644 OPT="-g -Wall -Wstrict-prototypes"
1645 else
1646 OPT="-g -O3 -Wall -Wstrict-prototypes"
1647 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001648 *)
Fred Drake109d9862001-07-11 06:27:56 +00001649 OPT="-O3 -Wall -Wstrict-prototypes";;
1650 esac
1651 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001652 *)
1653 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00001654 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001655 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1656 *)
1657 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001658 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001659 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00001660 case $ac_sys_system in
1661 Darwin*)
1662 OPT="$OPT -no-cpp-precomp";;
1663 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001664fi
1665
Trent Mick635f6fb2000-08-23 21:33:05 +00001666# The current (beta) Monterey compiler dies with optimizations
1667case $ac_sys_system in
1668Monterey*) OPT="";;
1669esac
1670
Guido van Rossum563e7081996-09-10 18:20:48 +00001671if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001672then
1673 OPT="$OPT $ac_arch_flags"
1674fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00001675
Guido van Rossum91922671997-10-09 20:24:13 +00001676echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001677echo "configure:1678: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001678if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001679 echo $ac_n "(cached) $ac_c" 1>&6
1680else
1681 ac_save_cc="$CC"
1682CC="$CC -OPT:Olimit=0"
1683if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001684 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00001685else
1686 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001687#line 1688 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001688#include "confdefs.h"
1689int main() { return 0; }
1690EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001691if { (eval echo configure:1692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum91922671997-10-09 20:24:13 +00001692then
1693 ac_cv_opt_olimit_ok=yes
1694else
1695 echo "configure: failed program was:" >&5
1696 cat conftest.$ac_ext >&5
1697 rm -fr conftest*
1698 ac_cv_opt_olimit_ok=no
1699fi
1700rm -fr conftest*
1701fi
1702
1703CC="$ac_save_cc"
1704fi
1705
1706echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001707if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001708 case $ac_sys_system in
1709 Darwin*) OPT="$OPT" ;;
1710 *) OPT="$OPT -OPT:Olimit=0";;
1711 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001712else
1713 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001714echo "configure:1715: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001715 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001716 echo $ac_n "(cached) $ac_c" 1>&6
1717else
1718 ac_save_cc="$CC"
1719 CC="$CC -Olimit 1500"
1720 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001721 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001722else
1723 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001724#line 1725 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001725#include "confdefs.h"
1726int main() { return 0; }
1727EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001728if { (eval echo configure:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001729then
1730 ac_cv_olimit_ok=yes
1731else
1732 echo "configure: failed program was:" >&5
1733 cat conftest.$ac_ext >&5
1734 rm -fr conftest*
1735 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001736fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001737rm -fr conftest*
1738fi
1739
1740 CC="$ac_save_cc"
1741fi
1742
1743 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1744 if test $ac_cv_olimit_ok = yes; then
1745 OPT="$OPT -Olimit 1500"
1746 fi
1747fi
1748
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001749# On some compilers, pthreads are available without further options
1750# (e.g. MacOS X). On some of these systems, the compiler will not
1751# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
1752# So we have to see first whether pthreads are available without
1753# options before we can check whether -Kpthread improves anything.
1754echo $ac_n "checking whether pthreads are available without options""... $ac_c" 1>&6
1755echo "configure:1756: checking whether pthreads are available without options" >&5
1756if eval "test \"`echo '$''{'ac_cv_pthread_is_default'+set}'`\" = set"; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001757 echo $ac_n "(cached) $ac_c" 1>&6
1758else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001759 if test "$cross_compiling" = yes; then
1760 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001761else
1762 cat > conftest.$ac_ext <<EOF
1763#line 1764 "configure"
Martin v. Löwis130fb172001-07-19 11:00:41 +00001764#include "confdefs.h"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001765
Martin v. Löwis130fb172001-07-19 11:00:41 +00001766#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001767
1768void* routine(void* p){return NULL;}
1769
1770int main(){
1771 pthread_t p;
1772 if(pthread_create(&p,NULL,routine,NULL)!=0)
1773 return 1;
1774 return 0;
1775}
1776
Martin v. Löwis130fb172001-07-19 11:00:41 +00001777EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001778if { (eval echo configure:1779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1779then
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001780 ac_cv_pthread_is_default=yes
1781else
1782 echo "configure: failed program was:" >&5
1783 cat conftest.$ac_ext >&5
1784 rm -fr conftest*
1785 ac_cv_pthread_is_default=no
1786fi
1787rm -fr conftest*
1788fi
1789
1790
1791fi
1792
1793echo "$ac_t""$ac_cv_pthread_is_default" 1>&6
1794
1795
1796if test $ac_cv_pthread_is_default = yes
1797then
1798 ac_cv_kpthread=no
1799else
1800# -Kpthread, if available, provides the right #defines
1801# and linker options to make pthread_create available
1802# Some compilers won't report that they do not support -Kpthread,
1803# so we need to run a program to see whether it really made the
1804# function available.
1805echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
1806echo "configure:1807: checking whether $CC accepts -Kpthread" >&5
1807if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1808 echo $ac_n "(cached) $ac_c" 1>&6
1809else
1810 ac_save_cc="$CC"
1811CC="$CC -Kpthread"
1812if test "$cross_compiling" = yes; then
1813 ac_cv_kpthread=no
1814else
1815 cat > conftest.$ac_ext <<EOF
1816#line 1817 "configure"
1817#include "confdefs.h"
1818
1819#include <pthread.h>
1820
1821void* routine(void* p){return NULL;}
1822
1823int main(){
1824 pthread_t p;
1825 if(pthread_create(&p,NULL,routine,NULL)!=0)
1826 return 1;
1827 return 0;
1828}
1829
1830EOF
1831if { (eval echo configure:1832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1832then
Martin v. Löwis130fb172001-07-19 11:00:41 +00001833 ac_cv_kpthread=yes
1834else
1835 echo "configure: failed program was:" >&5
1836 cat conftest.$ac_ext >&5
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001837 rm -fr conftest*
Martin v. Löwis130fb172001-07-19 11:00:41 +00001838 ac_cv_kpthread=no
1839fi
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001840rm -fr conftest*
1841fi
1842
Martin v. Löwis130fb172001-07-19 11:00:41 +00001843CC="$ac_save_cc"
1844fi
1845
Martin v. Löwis130fb172001-07-19 11:00:41 +00001846echo "$ac_t""$ac_cv_kpthread" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001847fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00001848
Guido van Rossum84e7b241996-08-19 21:59:00 +00001849
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001850# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001851echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001852echo "configure:1853: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001853if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001854 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001855else
1856 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001857#line 1858 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001858#include "confdefs.h"
1859#include <stdlib.h>
1860#include <stdarg.h>
1861#include <string.h>
1862#include <float.h>
1863EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001864ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001865{ (eval echo configure:1866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001866ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001867if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001868 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001869 ac_cv_header_stdc=yes
1870else
1871 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001872 echo "configure: failed program was:" >&5
1873 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001874 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001875 ac_cv_header_stdc=no
1876fi
1877rm -f conftest*
1878
1879if test $ac_cv_header_stdc = yes; then
1880 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1881cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001882#line 1883 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001883#include "confdefs.h"
1884#include <string.h>
1885EOF
1886if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1887 egrep "memchr" >/dev/null 2>&1; then
1888 :
1889else
1890 rm -rf conftest*
1891 ac_cv_header_stdc=no
1892fi
1893rm -f conftest*
1894
1895fi
1896
1897if test $ac_cv_header_stdc = yes; then
1898 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1899cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001900#line 1901 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001901#include "confdefs.h"
1902#include <stdlib.h>
1903EOF
1904if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1905 egrep "free" >/dev/null 2>&1; then
1906 :
1907else
1908 rm -rf conftest*
1909 ac_cv_header_stdc=no
1910fi
1911rm -f conftest*
1912
1913fi
1914
1915if test $ac_cv_header_stdc = yes; then
1916 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1917if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001918 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001919else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001920 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001921#line 1922 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001922#include "confdefs.h"
1923#include <ctype.h>
1924#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1925#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001926#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001927int main () { int i; for (i = 0; i < 256; i++)
1928if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1929exit (0); }
1930
1931EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001932if { (eval echo configure:1933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00001933then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001934 :
1935else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001936 echo "configure: failed program was:" >&5
1937 cat conftest.$ac_ext >&5
1938 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001939 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001940fi
1941rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001942fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001943
1944fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001945fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001946
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001947echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001948if test $ac_cv_header_stdc = yes; then
1949 cat >> confdefs.h <<\EOF
1950#define STDC_HEADERS 1
1951EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001952
1953fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001954
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001955for ac_hdr in dlfcn.h fcntl.h limits.h langinfo.h locale.h \
1956ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00001957signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00001958sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00001959sys/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 +00001960sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00001961ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001962do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001963ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001964echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001965echo "configure:1966: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001966if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001967 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001968else
1969 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001970#line 1971 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001971#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001972#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001973EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001974ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00001975{ (eval echo configure:1976: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001976ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001977if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001978 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001979 eval "ac_cv_header_$ac_safe=yes"
1980else
1981 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001982 echo "configure: failed program was:" >&5
1983 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001984 rm -rf conftest*
1985 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001986fi
1987rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001988fi
1989if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001990 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001991 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001992 cat >> confdefs.h <<EOF
1993#define $ac_tr_hdr 1
1994EOF
1995
1996else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001997 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001998fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001999done
2000
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002001ac_header_dirent=no
2002for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
2003do
Guido van Rossumf78abae1997-01-21 22:02:36 +00002004ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002005echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002006echo "configure:2007: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002007if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002008 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00002009else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002010 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002011#line 2012 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002012#include "confdefs.h"
2013#include <sys/types.h>
2014#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002015int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002016DIR *dirp = 0;
2017; return 0; }
2018EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002019if { (eval echo configure:2020: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002020 rm -rf conftest*
2021 eval "ac_cv_header_dirent_$ac_safe=yes"
2022else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002023 echo "configure: failed program was:" >&5
2024 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002025 rm -rf conftest*
2026 eval "ac_cv_header_dirent_$ac_safe=no"
2027fi
2028rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00002029fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002030if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002031 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002032 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002033 cat >> confdefs.h <<EOF
2034#define $ac_tr_hdr 1
2035EOF
2036 ac_header_dirent=$ac_hdr; break
2037else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002038 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002039fi
2040done
2041# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
2042if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002043echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002044echo "configure:2045: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002045ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002046if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002047 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002048else
2049 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002050LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002051cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002052#line 2053 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002053#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002054/* Override any gcc2 internal prototype to avoid an error. */
2055/* We use char because int might match the return type of a gcc2
2056 builtin and then its argument prototype would still apply. */
2057char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002058
Guido van Rossumf78abae1997-01-21 22:02:36 +00002059int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002060opendir()
2061; return 0; }
2062EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002063if { (eval echo configure:2064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002064 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002065 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002066else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002067 echo "configure: failed program was:" >&5
2068 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002069 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002070 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002071fi
2072rm -f conftest*
2073LIBS="$ac_save_LIBS"
2074
2075fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002076if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002077 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002078 LIBS="$LIBS -ldir"
2079else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002080 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002081fi
2082
2083else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002084echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002085echo "configure:2086: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002086ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002087if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002088 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002089else
2090 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002091LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002092cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002093#line 2094 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002094#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002095/* Override any gcc2 internal prototype to avoid an error. */
2096/* We use char because int might match the return type of a gcc2
2097 builtin and then its argument prototype would still apply. */
2098char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002099
Guido van Rossumf78abae1997-01-21 22:02:36 +00002100int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002101opendir()
2102; return 0; }
2103EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002104if { (eval echo configure:2105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002105 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002106 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002107else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002108 echo "configure: failed program was:" >&5
2109 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002110 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002111 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002112fi
2113rm -f conftest*
2114LIBS="$ac_save_LIBS"
2115
2116fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002117if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002118 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002119 LIBS="$LIBS -lx"
2120else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002121 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002122fi
2123
2124fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002125
2126
2127# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002128was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002129echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002130echo "configure:2131: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002131cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002132#line 2133 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002133#include "confdefs.h"
2134#include <time.h>
2135EOF
2136if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2137 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002138 rm -rf conftest*
2139 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002140else
2141 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002142 cat >> confdefs.h <<\EOF
2143#define clock_t long
2144EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002145
2146fi
2147rm -f conftest*
2148
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002149echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002150
Guido van Rossum810cc512001-09-09 23:51:39 +00002151# Two defines needed to enable largefile support on various platforms
2152# These may affect some typedefs
2153cat >> confdefs.h <<\EOF
2154#define _LARGEFILE_SOURCE 1
2155EOF
2156
2157cat >> confdefs.h <<\EOF
2158#define _FILE_OFFSET_BITS 64
2159EOF
2160
2161
Guido van Rossum84e7b241996-08-19 21:59:00 +00002162# Add some code to confdefs.h so that the test for off_t works on SCO
2163cat >> confdefs.h <<\EOF
2164#if defined(SCO_DS)
2165#undef _OFF_T
2166#endif
2167EOF
2168
Guido van Rossumef2255b2000-03-10 22:30:29 +00002169# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002170echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002171echo "configure:2172: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002172if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002173 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002174else
2175 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002176#line 2177 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002177#include "confdefs.h"
2178#include <sys/types.h>
2179#if STDC_HEADERS
2180#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002181#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002182#endif
2183EOF
2184if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002185 egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002186 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002187 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002188else
2189 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002190 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002191fi
2192rm -f conftest*
2193
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002194fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002195echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2196if test $ac_cv_type_mode_t = no; then
2197 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002198#define mode_t int
2199EOF
2200
2201fi
2202
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002203echo $ac_n "checking for off_t""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002204echo "configure:2205: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002205if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002206 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002207else
2208 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002209#line 2210 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002210#include "confdefs.h"
2211#include <sys/types.h>
2212#if STDC_HEADERS
2213#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002214#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002215#endif
2216EOF
2217if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002218 egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002219 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002220 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002221else
2222 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002223 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002224fi
2225rm -f conftest*
2226
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002227fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002228echo "$ac_t""$ac_cv_type_off_t" 1>&6
2229if test $ac_cv_type_off_t = no; then
2230 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002231#define off_t long
2232EOF
2233
2234fi
2235
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002236echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002237echo "configure:2238: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002238if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002239 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002240else
2241 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002242#line 2243 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002243#include "confdefs.h"
2244#include <sys/types.h>
2245#if STDC_HEADERS
2246#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002247#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002248#endif
2249EOF
2250if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002251 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002252 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002253 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002254else
2255 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002256 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002257fi
2258rm -f conftest*
2259
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002260fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002261echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2262if test $ac_cv_type_pid_t = no; then
2263 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002264#define pid_t int
2265EOF
2266
2267fi
2268
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002269echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002270echo "configure:2271: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002271if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002272 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002273else
2274 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002275#line 2276 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002276#include "confdefs.h"
2277#include <sys/types.h>
2278#include <signal.h>
2279#ifdef signal
2280#undef signal
2281#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002282#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002283extern "C" void (*signal (int, void (*)(int)))(int);
2284#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002285void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002286#endif
2287
Guido van Rossumf78abae1997-01-21 22:02:36 +00002288int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002289int i;
2290; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002291EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002292if { (eval echo configure:2293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002293 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002294 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002295else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002296 echo "configure: failed program was:" >&5
2297 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002298 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002299 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002300fi
2301rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002302fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002303
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002304echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002305cat >> confdefs.h <<EOF
2306#define RETSIGTYPE $ac_cv_type_signal
2307EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002308
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002309
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002310echo $ac_n "checking for size_t""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002311echo "configure:2312: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002312if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002313 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002314else
2315 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002316#line 2317 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002317#include "confdefs.h"
2318#include <sys/types.h>
2319#if STDC_HEADERS
2320#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002321#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002322#endif
2323EOF
2324if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002325 egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002326 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002327 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002328else
2329 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002330 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002331fi
2332rm -f conftest*
2333
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002334fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002335echo "$ac_t""$ac_cv_type_size_t" 1>&6
2336if test $ac_cv_type_size_t = no; then
2337 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002338#define size_t unsigned
2339EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002340
2341fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002342
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002343echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002344echo "configure:2345: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002345if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002346 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002347else
2348 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002349#line 2350 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002350#include "confdefs.h"
2351#include <sys/types.h>
2352EOF
2353if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2354 egrep "uid_t" >/dev/null 2>&1; then
2355 rm -rf conftest*
2356 ac_cv_type_uid_t=yes
2357else
2358 rm -rf conftest*
2359 ac_cv_type_uid_t=no
2360fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002361rm -f conftest*
2362
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002363fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002364
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002365echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002366if test $ac_cv_type_uid_t = no; then
2367 cat >> confdefs.h <<\EOF
2368#define uid_t int
2369EOF
2370
2371 cat >> confdefs.h <<\EOF
2372#define gid_t int
2373EOF
2374
2375fi
2376
Guido van Rossum627b2d71993-12-24 10:39:16 +00002377
Guido van Rossumef2255b2000-03-10 22:30:29 +00002378# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002379echo $ac_n "checking size of int""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002380echo "configure:2381: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002381if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002382 echo $ac_n "(cached) $ac_c" 1>&6
2383else
2384 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002385 ac_cv_sizeof_int=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002386else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002387 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002388#line 2389 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002389#include "confdefs.h"
2390#include <stdio.h>
2391main()
2392{
2393 FILE *f=fopen("conftestval", "w");
2394 if (!f) exit(1);
2395 fprintf(f, "%d\n", sizeof(int));
2396 exit(0);
2397}
2398EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002399if { (eval echo configure:2400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00002400then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002401 ac_cv_sizeof_int=`cat conftestval`
2402else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002403 echo "configure: failed program was:" >&5
2404 cat conftest.$ac_ext >&5
2405 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002406 ac_cv_sizeof_int=0
2407fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002408rm -fr conftest*
2409fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002410
2411fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002412echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2413cat >> confdefs.h <<EOF
2414#define SIZEOF_INT $ac_cv_sizeof_int
2415EOF
2416
2417
2418echo $ac_n "checking size of long""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002419echo "configure:2420: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002420if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002421 echo $ac_n "(cached) $ac_c" 1>&6
2422else
2423 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002424 ac_cv_sizeof_long=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002425else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002426 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002427#line 2428 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002428#include "confdefs.h"
2429#include <stdio.h>
2430main()
2431{
2432 FILE *f=fopen("conftestval", "w");
2433 if (!f) exit(1);
2434 fprintf(f, "%d\n", sizeof(long));
2435 exit(0);
2436}
2437EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002438if { (eval echo configure:2439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00002439then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002440 ac_cv_sizeof_long=`cat conftestval`
2441else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002442 echo "configure: failed program was:" >&5
2443 cat conftest.$ac_ext >&5
2444 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002445 ac_cv_sizeof_long=0
2446fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002447rm -fr conftest*
2448fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002449
2450fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002451echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2452cat >> confdefs.h <<EOF
2453#define SIZEOF_LONG $ac_cv_sizeof_long
2454EOF
2455
2456
Guido van Rossumad678af1998-10-02 14:42:15 +00002457echo $ac_n "checking size of void *""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002458echo "configure:2459: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002459if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002460 echo $ac_n "(cached) $ac_c" 1>&6
2461else
2462 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002463 ac_cv_sizeof_void_p=4
Guido van Rossumad678af1998-10-02 14:42:15 +00002464else
2465 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002466#line 2467 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002467#include "confdefs.h"
2468#include <stdio.h>
2469main()
2470{
2471 FILE *f=fopen("conftestval", "w");
2472 if (!f) exit(1);
2473 fprintf(f, "%d\n", sizeof(void *));
2474 exit(0);
2475}
2476EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002477if { (eval echo configure:2478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumad678af1998-10-02 14:42:15 +00002478then
2479 ac_cv_sizeof_void_p=`cat conftestval`
2480else
2481 echo "configure: failed program was:" >&5
2482 cat conftest.$ac_ext >&5
2483 rm -fr conftest*
2484 ac_cv_sizeof_void_p=0
2485fi
2486rm -fr conftest*
2487fi
2488
2489fi
2490echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2491cat >> confdefs.h <<EOF
2492#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2493EOF
2494
2495
Guido van Rossumef2255b2000-03-10 22:30:29 +00002496echo $ac_n "checking size of char""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002497echo "configure:2498: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002498if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002499 echo $ac_n "(cached) $ac_c" 1>&6
2500else
2501 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002502 ac_cv_sizeof_char=1
Guido van Rossumef2255b2000-03-10 22:30:29 +00002503else
2504 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002505#line 2506 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002506#include "confdefs.h"
2507#include <stdio.h>
2508main()
2509{
2510 FILE *f=fopen("conftestval", "w");
2511 if (!f) exit(1);
2512 fprintf(f, "%d\n", sizeof(char));
2513 exit(0);
2514}
2515EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002516if { (eval echo configure:2517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002517then
2518 ac_cv_sizeof_char=`cat conftestval`
2519else
2520 echo "configure: failed program was:" >&5
2521 cat conftest.$ac_ext >&5
2522 rm -fr conftest*
2523 ac_cv_sizeof_char=0
2524fi
2525rm -fr conftest*
2526fi
2527
2528fi
2529echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2530cat >> confdefs.h <<EOF
2531#define SIZEOF_CHAR $ac_cv_sizeof_char
2532EOF
2533
2534
2535echo $ac_n "checking size of short""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002536echo "configure:2537: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002537if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002538 echo $ac_n "(cached) $ac_c" 1>&6
2539else
2540 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002541 ac_cv_sizeof_short=2
Guido van Rossumef2255b2000-03-10 22:30:29 +00002542else
2543 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002544#line 2545 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002545#include "confdefs.h"
2546#include <stdio.h>
2547main()
2548{
2549 FILE *f=fopen("conftestval", "w");
2550 if (!f) exit(1);
2551 fprintf(f, "%d\n", sizeof(short));
2552 exit(0);
2553}
2554EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002555if { (eval echo configure:2556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002556then
2557 ac_cv_sizeof_short=`cat conftestval`
2558else
2559 echo "configure: failed program was:" >&5
2560 cat conftest.$ac_ext >&5
2561 rm -fr conftest*
2562 ac_cv_sizeof_short=0
2563fi
2564rm -fr conftest*
2565fi
2566
2567fi
2568echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2569cat >> confdefs.h <<EOF
2570#define SIZEOF_SHORT $ac_cv_sizeof_short
2571EOF
2572
2573
2574echo $ac_n "checking size of float""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002575echo "configure:2576: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002576if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002577 echo $ac_n "(cached) $ac_c" 1>&6
2578else
2579 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002580 ac_cv_sizeof_float=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00002581else
2582 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002583#line 2584 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002584#include "confdefs.h"
2585#include <stdio.h>
2586main()
2587{
2588 FILE *f=fopen("conftestval", "w");
2589 if (!f) exit(1);
2590 fprintf(f, "%d\n", sizeof(float));
2591 exit(0);
2592}
2593EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002594if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002595then
2596 ac_cv_sizeof_float=`cat conftestval`
2597else
2598 echo "configure: failed program was:" >&5
2599 cat conftest.$ac_ext >&5
2600 rm -fr conftest*
2601 ac_cv_sizeof_float=0
2602fi
2603rm -fr conftest*
2604fi
2605
2606fi
2607echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2608cat >> confdefs.h <<EOF
2609#define SIZEOF_FLOAT $ac_cv_sizeof_float
2610EOF
2611
2612
2613echo $ac_n "checking size of double""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002614echo "configure:2615: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002615if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002616 echo $ac_n "(cached) $ac_c" 1>&6
2617else
2618 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002619 ac_cv_sizeof_double=8
Guido van Rossumef2255b2000-03-10 22:30:29 +00002620else
2621 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002622#line 2623 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002623#include "confdefs.h"
2624#include <stdio.h>
2625main()
2626{
2627 FILE *f=fopen("conftestval", "w");
2628 if (!f) exit(1);
2629 fprintf(f, "%d\n", sizeof(double));
2630 exit(0);
2631}
2632EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002633if { (eval echo configure:2634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00002634then
2635 ac_cv_sizeof_double=`cat conftestval`
2636else
2637 echo "configure: failed program was:" >&5
2638 cat conftest.$ac_ext >&5
2639 rm -fr conftest*
2640 ac_cv_sizeof_double=0
2641fi
2642rm -fr conftest*
2643fi
2644
2645fi
2646echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2647cat >> confdefs.h <<EOF
2648#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2649EOF
2650
2651
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002652echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002653echo "configure:2654: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002654if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002655 echo $ac_n "(cached) $ac_c" 1>&6
2656else
2657 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002658 ac_cv_sizeof_fpos_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002659else
2660 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002661#line 2662 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002662#include "confdefs.h"
2663#include <stdio.h>
2664main()
2665{
2666 FILE *f=fopen("conftestval", "w");
2667 if (!f) exit(1);
2668 fprintf(f, "%d\n", sizeof(fpos_t));
2669 exit(0);
2670}
2671EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002672if { (eval echo configure:2673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002673then
2674 ac_cv_sizeof_fpos_t=`cat conftestval`
2675else
2676 echo "configure: failed program was:" >&5
2677 cat conftest.$ac_ext >&5
2678 rm -fr conftest*
2679 ac_cv_sizeof_fpos_t=0
2680fi
2681rm -fr conftest*
2682fi
2683
2684fi
2685echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2686cat >> confdefs.h <<EOF
2687#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2688EOF
2689
2690
Guido van Rossum0a516c91994-09-12 10:58:40 +00002691
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002692echo $ac_n "checking for long long support""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002693echo "configure:2694: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002694have_long_long=no
2695cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002696#line 2697 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002697#include "confdefs.h"
2698
2699int main() {
2700long long x; x = (long long)0;
2701; return 0; }
2702EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002703if { (eval echo configure:2704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002704 rm -rf conftest*
2705 cat >> confdefs.h <<\EOF
2706#define HAVE_LONG_LONG 1
2707EOF
2708 have_long_long=yes
2709else
2710 echo "configure: failed program was:" >&5
2711 cat conftest.$ac_ext >&5
2712fi
2713rm -f conftest*
2714echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002715if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002716echo $ac_n "checking size of long long""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002717echo "configure:2718: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002718if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002719 echo $ac_n "(cached) $ac_c" 1>&6
2720else
2721 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002722 ac_cv_sizeof_long_long=8
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002723else
2724 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002725#line 2726 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002726#include "confdefs.h"
2727#include <stdio.h>
2728main()
2729{
2730 FILE *f=fopen("conftestval", "w");
2731 if (!f) exit(1);
2732 fprintf(f, "%d\n", sizeof(long long));
2733 exit(0);
2734}
2735EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002736if { (eval echo configure:2737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002737then
2738 ac_cv_sizeof_long_long=`cat conftestval`
2739else
2740 echo "configure: failed program was:" >&5
2741 cat conftest.$ac_ext >&5
2742 rm -fr conftest*
2743 ac_cv_sizeof_long_long=0
2744fi
2745rm -fr conftest*
2746fi
2747
2748fi
2749echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2750cat >> confdefs.h <<EOF
2751#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2752EOF
2753
2754
2755fi
2756
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002757echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002758echo "configure:2759: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002759have_uintptr_t=no
2760cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002761#line 2762 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002762#include "confdefs.h"
2763
2764int main() {
2765uintptr_t x; x = (uintptr_t)0;
2766; return 0; }
2767EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002768if { (eval echo configure:2769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002769 rm -rf conftest*
2770 cat >> confdefs.h <<\EOF
2771#define HAVE_UINTPTR_T 1
2772EOF
2773 have_uintptr_t=yes
2774else
2775 echo "configure: failed program was:" >&5
2776 cat conftest.$ac_ext >&5
2777fi
2778rm -f conftest*
2779echo "$ac_t""$have_uintptr_t" 1>&6
2780if test "$have_uintptr_t" = yes ; then
2781echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002782echo "configure:2783: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002783if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002784 echo $ac_n "(cached) $ac_c" 1>&6
2785else
2786 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002787 ac_cv_sizeof_uintptr_t=4
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002788else
2789 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002790#line 2791 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002791#include "confdefs.h"
2792#include <stdio.h>
2793main()
2794{
2795 FILE *f=fopen("conftestval", "w");
2796 if (!f) exit(1);
2797 fprintf(f, "%d\n", sizeof(uintptr_t));
2798 exit(0);
2799}
2800EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002801if { (eval echo configure:2802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002802then
2803 ac_cv_sizeof_uintptr_t=`cat conftestval`
2804else
2805 echo "configure: failed program was:" >&5
2806 cat conftest.$ac_ext >&5
2807 rm -fr conftest*
2808 ac_cv_sizeof_uintptr_t=0
2809fi
2810rm -fr conftest*
2811fi
2812
2813fi
2814echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2815cat >> confdefs.h <<EOF
2816#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2817EOF
2818
2819
2820fi
2821
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002822# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2823echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002824echo "configure:2825: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002825if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002826 echo $ac_n "(cached) $ac_c" 1>&6
2827else
2828 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002829 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002830else
2831 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002832#line 2833 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002833#include "confdefs.h"
2834#include <stdio.h>
2835#include <sys/types.h>
2836main()
2837{
2838 FILE *f=fopen("conftestval", "w");
2839 if (!f) exit(1);
2840 fprintf(f, "%d\n", sizeof(off_t));
2841 exit(0);
2842}
2843EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002844if { (eval echo configure:2845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002845then
2846 ac_cv_sizeof_off_t=`cat conftestval`
2847else
2848 echo "configure: failed program was:" >&5
2849 cat conftest.$ac_ext >&5
2850 rm -fr conftest*
2851 ac_cv_sizeof_off_t=0
2852fi
2853rm -fr conftest*
2854fi
2855
2856
2857fi
2858
2859echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2860cat >> confdefs.h <<EOF
2861#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2862EOF
2863
2864
2865echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002866echo "configure:2867: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002867if test "$have_long_long" = yes -a \
2868 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2869 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002870 cat >> confdefs.h <<\EOF
2871#define HAVE_LARGEFILE_SUPPORT 1
2872EOF
2873
2874 echo "$ac_t""yes" 1>&6
2875else
2876 echo "$ac_t""no" 1>&6
2877fi
2878
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002879# AC_CHECK_SIZEOF() doesn't include <time.h>.
2880echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002881echo "configure:2882: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002882if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002883 echo $ac_n "(cached) $ac_c" 1>&6
2884else
2885 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002886 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002887else
2888 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002889#line 2890 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002890#include "confdefs.h"
2891#include <stdio.h>
2892#include <time.h>
2893main()
2894{
2895 FILE *f=fopen("conftestval", "w");
2896 if (!f) exit(1);
2897 fprintf(f, "%d\n", sizeof(time_t));
2898 exit(0);
2899}
2900EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002901if { (eval echo configure:2902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002902then
2903 ac_cv_sizeof_time_t=`cat conftestval`
2904else
2905 echo "configure: failed program was:" >&5
2906 cat conftest.$ac_ext >&5
2907 rm -fr conftest*
2908 ac_cv_sizeof_time_t=0
2909fi
2910rm -fr conftest*
2911fi
2912
2913
2914fi
2915
2916echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2917cat >> confdefs.h <<EOF
2918#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2919EOF
2920
2921
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002922
Trent Mick635f6fb2000-08-23 21:33:05 +00002923# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002924ac_save_cc="$CC"
2925if test "$ac_cv_kpthread" = "yes"
2926then CC="$CC -Kpthread"
2927fi
Trent Mick635f6fb2000-08-23 21:33:05 +00002928echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002929echo "configure:2930: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002930have_pthread_t=no
2931cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002932#line 2933 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002933#include "confdefs.h"
2934#include <pthread.h>
2935int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002936pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002937; return 0; }
2938EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002939if { (eval echo configure:2940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002940 rm -rf conftest*
2941 have_pthread_t=yes
2942else
2943 echo "configure: failed program was:" >&5
2944 cat conftest.$ac_ext >&5
2945fi
2946rm -f conftest*
2947echo "$ac_t""$have_pthread_t" 1>&6
2948if test "$have_pthread_t" = yes ; then
2949 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2950 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002951echo "configure:2952: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002952 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002953 echo $ac_n "(cached) $ac_c" 1>&6
2954else
2955 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002956 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00002957else
2958 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002959#line 2960 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002960#include "confdefs.h"
2961#include <stdio.h>
2962 #include <pthread.h>
2963 main()
2964 {
2965 FILE *f=fopen("conftestval", "w");
2966 if (!f) exit(1);
2967 fprintf(f, "%d\n", sizeof(pthread_t));
2968 exit(0);
2969 }
2970EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002971if { (eval echo configure:2972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Trent Mick635f6fb2000-08-23 21:33:05 +00002972then
2973 ac_cv_sizeof_pthread_t=`cat conftestval`
2974else
2975 echo "configure: failed program was:" >&5
2976 cat conftest.$ac_ext >&5
2977 rm -fr conftest*
2978 ac_cv_sizeof_pthread_t=0
2979fi
2980rm -fr conftest*
2981fi
2982
2983
2984fi
2985
2986 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2987 cat >> confdefs.h <<EOF
2988#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2989EOF
2990
2991fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002992CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00002993
Jack Jansene578a632001-08-15 01:27:14 +00002994echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00002995echo "configure:2996: checking for --enable-toolbox-glue" >&5
Jack Jansene578a632001-08-15 01:27:14 +00002996# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
2997if test "${enable_toolbox_glue+set}" = set; then
2998 enableval="$enable_toolbox_glue"
2999 :
3000fi
3001
3002
3003if test -z "$enable_toolbox_glue"
3004then
3005 case $ac_sys_system/$ac_sys_release in
3006 Darwin/*)
3007 enable_toolbox_glue="yes";;
3008 *)
3009 enable_toolbox_glue="no";;
3010 esac
3011fi
3012case "$enable_toolbox_glue" in
3013yes)
3014 extra_frameworks="-framework Carbon -framework Foundation"
3015 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00003016 extra_undefs="-u __dummy -u _PyMac_Error"
Jack Jansene578a632001-08-15 01:27:14 +00003017 cat >> confdefs.h <<\EOF
3018#define USE_TOOLBOX_OBJECT_GLUE 1
3019EOF
3020
3021 ;;
3022*)
3023 extra_frameworks=""
3024 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00003025 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00003026 ;;
3027esac
3028echo "$ac_t""$enable_toolbox_glue" 1>&6
3029
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003030
3031case $ac_sys_system/$ac_sys_release in
Jack Jansena3891ea2001-09-07 14:25:12 +00003032 Darwin/1.4*)
3033 ns_undef_sym='_environ'
3034 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
3035 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
3036 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3037 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00003038 Darwin/*)
3039 ns_undef_sym='_environ'
Jack Jansene578a632001-08-15 01:27:14 +00003040 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
3041 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
3042 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
3043 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003044esac
3045
Jack Jansene578a632001-08-15 01:27:14 +00003046echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003047echo "configure:3048: checking for --enable-framework" >&5
Jack Jansene578a632001-08-15 01:27:14 +00003048if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003049then
Jack Jansenca06bc62001-08-03 15:32:23 +00003050 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003051 # -U __environ is needed since bundles don't have access
3052 # to crt0 when built but will always be linked against it
Jack Jansene578a632001-08-15 01:27:14 +00003053 # -F. is needed to allow linking to the framework while
3054 # in the build location.
3055
Jack Jansena3891ea2001-09-07 14:25:12 +00003056 case $ac_sys_system/$ac_sys_release in
3057 Darwin/1.4*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
3058 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
3059 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003060 cat >> confdefs.h <<\EOF
3061#define WITH_NEXT_FRAMEWORK 1
3062EOF
3063
3064 echo "$ac_t""yes" 1>&6
3065else
3066 echo "$ac_t""no" 1>&6
3067fi
3068
Jack Jansene578a632001-08-15 01:27:14 +00003069echo $ac_n "checking for dyld""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003070echo "configure:3071: checking for dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003071case $ac_sys_system/$ac_sys_release in
3072 Darwin/*)
3073 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003074#define WITH_DYLD 1
3075EOF
3076
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003077 echo "$ac_t""always on for Darwin" 1>&6
3078 ;;
3079 *)
Jack Jansene578a632001-08-15 01:27:14 +00003080 echo "$ac_t""no" 1>&6
3081 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003082esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003083
Guido van Rossum0a516c91994-09-12 10:58:40 +00003084# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003085
3086
3087
3088
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003089
Guido van Rossum0a516c91994-09-12 10:58:40 +00003090# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003091# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003092echo $ac_n "checking SO""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003093echo "configure:3094: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003094if test -z "$SO"
3095then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003096 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003097 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003098 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003099 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003100 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003101fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003102echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003103# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003104# -- "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 +00003105# (Shared libraries in this instance are shared modules to be loaded into
3106# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003107echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003108echo "configure:3109: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003109if test -z "$LDSHARED"
3110then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003111 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003112 AIX*)
3113 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00003114 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003115 ;;
3116 BeOS*)
3117 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00003118 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003119 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003120 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003121 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003122 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00003123 SunOS/5*)
3124 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003125 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003126 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00003127 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003128 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003129 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3130 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansena3891ea2001-09-07 14:25:12 +00003131 Darwin/1.4*)
3132 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3133 if test "$enable_framework" ; then
3134 # Link against the framework. All externals should be defined.
3135 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3136 else
3137 # No framework. Ignore undefined symbols, assuming they come from Python
3138 LDSHARED="$LDSHARED -flat_namespace -undefined suppress"
3139 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00003140 Darwin/*)
3141 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3142 if test "$enable_framework" ; then
3143 # Link against the framework. All externals should be defined.
3144 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3145 else
3146 # No framework. Ignore undefined symbols, assuming they come from Python
3147 LDSHARED="$LDSHARED -undefined suppress"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003148 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00003149 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003150 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003151 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003152 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003153 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003154 then
3155 LDSHARED="cc -shared ${LDFLAGS}"
3156 else
3157 LDSHARED="ld -Bshareable ${LDFLAGS}"
3158 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003159 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003160 if test "$GCC" = "yes"
3161 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003162 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003163 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003164 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003165 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003166 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003167 *) LDSHARED="ld";;
3168 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003169fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003170echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003171BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003172# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003173# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003174echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003175echo "configure:3176: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003176if test -z "$CCSHARED"
3177then
Guido van Rossum07397971997-04-29 21:49:50 +00003178 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003179 SunOS*) if test "$GCC" = yes;
3180 then CCSHARED="-fPIC";
3181 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003182 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00003183 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00003184 else CCSHARED="+z";
3185 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003186 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003187 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003188 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003189 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003190 if test "$GCC" = "yes"
3191 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003192 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003193 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003194 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003195 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003196 IRIX*/6*) case $CC in
3197 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003198 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003199 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003200 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003201 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003202fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003203echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003204# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003205# the python executable -- this is only needed for a few systems
3206echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003207echo "configure:3208: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003208if test -z "$LINKFORSHARED"
3209then
Guido van Rossum07397971997-04-29 21:49:50 +00003210 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003211 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003212 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003213 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003214 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00003215 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003216 # -u libsys_s pulls in all symbols in libsys
Jack Jansene578a632001-08-15 01:27:14 +00003217 Darwin/*)
3218 # -u __dummy makes the linker aware of the objc runtime
3219 # in System.framework; otherwise, __objcInit (referenced in
3220 # crt1.o) gets erroneously defined as common, which breaks dynamic
3221 # loading of any modules which reference it in System.framework.
3222 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3223 # not used by the core itself but which needs to be in the core so
3224 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00003225 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00003226 if test "$enable_framework"
3227 then
3228 LINKFORSHARED="$LINKFORSHARED -framework Python"
3229 fi
3230 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003231 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003232 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003233 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003234 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003235 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3236 then
3237 LINKFORSHARED="-Wl,--export-dynamic"
3238 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003239 SunOS/5*) case $CC in
3240 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003241 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003242 then
3243 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003244 fi;;
3245 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003246 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003247fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003248echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003249
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003250
3251echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003252echo "configure:3253: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003253if test ! "$LIBRARY" = "$LDLIBRARY"
3254then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003255 case $ac_sys_system in
3256 CYGWIN*)
3257 # Cygwin needs CCSHARED when building extension DLLs
3258 # but not when building the interpreter DLL.
3259 CFLAGSFORSHARED='';;
3260 *)
3261 CFLAGSFORSHARED='$(CCSHARED)'
3262 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003263fi
3264echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3265
Guido van Rossum627b2d71993-12-24 10:39:16 +00003266# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003267echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003268echo "configure:3269: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003269ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003270if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003271 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003272else
3273 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003274LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003275cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003276#line 3277 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003277#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003278/* Override any gcc2 internal prototype to avoid an error. */
3279/* We use char because int might match the return type of a gcc2
3280 builtin and then its argument prototype would still apply. */
3281char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003282
Guido van Rossumf78abae1997-01-21 22:02:36 +00003283int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003284dlopen()
3285; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003286EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003287if { (eval echo configure:3288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003288 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003289 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003290else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003291 echo "configure: failed program was:" >&5
3292 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003293 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003294 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003295fi
3296rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003297LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003298
Guido van Rossum627b2d71993-12-24 10:39:16 +00003299fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003300if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003301 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003302 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3303 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003304 cat >> confdefs.h <<EOF
3305#define $ac_tr_lib 1
3306EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003307
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003308 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003309
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003310else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003311 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003312fi
3313 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003314echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003315echo "configure:3316: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003316ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003317if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003318 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003319else
3320 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003321LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003322cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003323#line 3324 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003324#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003325/* Override any gcc2 internal prototype to avoid an error. */
3326/* We use char because int might match the return type of a gcc2
3327 builtin and then its argument prototype would still apply. */
3328char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003329
Guido van Rossumf78abae1997-01-21 22:02:36 +00003330int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003331shl_load()
3332; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003333EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003334if { (eval echo configure:3335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003335 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003336 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003337else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003338 echo "configure: failed program was:" >&5
3339 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003340 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003341 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003342fi
3343rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003344LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003345
Guido van Rossum627b2d71993-12-24 10:39:16 +00003346fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003347if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003348 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003349 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3350 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003351 cat >> confdefs.h <<EOF
3352#define $ac_tr_lib 1
3353EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003354
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003355 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003356
3357else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003358 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003359fi
3360 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003361
3362# checks for system dependent C++ extensions support
3363case "$ac_sys_system" in
3364 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003365echo "configure:3366: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003366 cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003367#line 3368 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003368#include "confdefs.h"
3369#include "/usr/lpp/xlC/include/load.h"
3370int main() {
3371loadAndInit("", 0, "")
3372; return 0; }
3373EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003374if { (eval echo configure:3375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003375 rm -rf conftest*
3376 cat >> confdefs.h <<\EOF
3377#define AIX_GENUINE_CPLUSPLUS 1
3378EOF
3379
3380 echo "$ac_t""yes" 1>&6
3381else
3382 echo "configure: failed program was:" >&5
3383 cat conftest.$ac_ext >&5
3384 rm -rf conftest*
3385 echo "$ac_t""no" 1>&6
3386fi
3387rm -f conftest*;;
3388 *) ;;
3389esac
3390
Guido van Rossum70c7f481998-03-26 18:44:10 +00003391# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3392# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003393# BeOS' sockets are stashed in libnet.
3394case "$ac_sys_system" in
3395IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003396*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003397echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003398echo "configure:3399: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003399ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003400if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003401 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003402else
3403 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003404LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003405cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003406#line 3407 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003407#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003408/* Override any gcc2 internal prototype to avoid an error. */
3409/* We use char because int might match the return type of a gcc2
3410 builtin and then its argument prototype would still apply. */
3411char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003412
Guido van Rossumf78abae1997-01-21 22:02:36 +00003413int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003414t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003415; return 0; }
3416EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003417if { (eval echo configure:3418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003418 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003419 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003420else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003421 echo "configure: failed program was:" >&5
3422 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003423 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003424 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003425fi
3426rm -f conftest*
3427LIBS="$ac_save_LIBS"
3428
3429fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003430if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003431 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003432 LIBS="-lnsl $LIBS"
3433else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003434 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003435fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003436 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003437echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003438echo "configure:3439: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003439ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003440if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003441 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003442else
3443 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003444LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003445cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003446#line 3447 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003447#include "confdefs.h"
3448/* Override any gcc2 internal prototype to avoid an error. */
3449/* We use char because int might match the return type of a gcc2
3450 builtin and then its argument prototype would still apply. */
3451char socket();
3452
3453int main() {
3454socket()
3455; return 0; }
3456EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003457if { (eval echo configure:3458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003458 rm -rf conftest*
3459 eval "ac_cv_lib_$ac_lib_var=yes"
3460else
3461 echo "configure: failed program was:" >&5
3462 cat conftest.$ac_ext >&5
3463 rm -rf conftest*
3464 eval "ac_cv_lib_$ac_lib_var=no"
3465fi
3466rm -f conftest*
3467LIBS="$ac_save_LIBS"
3468
3469fi
3470if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3471 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003472 LIBS="-lsocket $LIBS"
3473else
3474 echo "$ac_t""no" 1>&6
3475fi
3476 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003477;;
3478esac
3479case "$ac_sys_system" in
3480BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003481echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003482echo "configure:3483: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003483ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003484if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003485 echo $ac_n "(cached) $ac_c" 1>&6
3486else
3487 ac_save_LIBS="$LIBS"
3488LIBS="-lnet $LIBS $LIBS"
3489cat > conftest.$ac_ext <<EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003490#line 3491 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003491#include "confdefs.h"
3492/* Override any gcc2 internal prototype to avoid an error. */
3493/* We use char because int might match the return type of a gcc2
3494 builtin and then its argument prototype would still apply. */
3495char socket();
3496
3497int main() {
3498socket()
3499; return 0; }
3500EOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003501if { (eval echo configure:3502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003502 rm -rf conftest*
3503 eval "ac_cv_lib_$ac_lib_var=yes"
3504else
3505 echo "configure: failed program was:" >&5
3506 cat conftest.$ac_ext >&5
3507 rm -rf conftest*
3508 eval "ac_cv_lib_$ac_lib_var=no"
3509fi
3510rm -f conftest*
3511LIBS="$ac_save_LIBS"
3512
3513fi
3514if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3515 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003516 LIBS="-lnet $LIBS"
3517else
3518 echo "$ac_t""no" 1>&6
3519fi
3520 # BeOS
3521;;
3522esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003523
Guido van Rossuma68acba1996-07-31 17:36:39 +00003524echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003525echo "configure:3526: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003526# Check whether --with-libs or --without-libs was given.
3527if test "${with_libs+set}" = set; then
3528 withval="$with_libs"
3529
3530echo "$ac_t""$withval" 1>&6
3531LIBS="$withval $LIBS"
3532
3533else
3534 echo "$ac_t""no" 1>&6
3535fi
3536
Guido van Rossum7f43da71994-08-01 12:15:30 +00003537
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003538# Determine if signalmodule should be used.
3539
3540
3541echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003542echo "configure:3543: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003543# Check whether --with-signal-module or --without-signal-module was given.
3544if test "${with_signal_module+set}" = set; then
3545 withval="$with_signal_module"
3546 :
3547fi
3548
3549
3550if test -z "$with_signal_module"
3551then with_signal_module="yes"
3552fi
3553echo "$ac_t""$with_signal_module" 1>&6
3554
3555if test "${with_signal_module}" = "yes"; then
3556 USE_SIGNAL_MODULE=""
3557 SIGNAL_OBJS=""
3558else
3559 USE_SIGNAL_MODULE="#"
3560 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3561fi
3562
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003563# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003564
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003565USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003566
Guido van Rossumec2f0731997-01-22 20:54:01 +00003567echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003568echo "configure:3569: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003569
3570# Check whether --with-dec-threads or --without-dec-threads was given.
3571if test "${with_dec_threads+set}" = set; then
3572 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003573
3574echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003575LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003576if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003577 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003578fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003579else
3580 echo "$ac_t""no" 1>&6
3581fi
3582
3583
3584echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003585echo "configure:3586: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003586# Check whether --with-threads or --without-threads was given.
3587if test "${with_threads+set}" = set; then
3588 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003589 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003590fi
3591
3592
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003593# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003594# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003595if test "${with_thread+set}" = set; then
3596 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003597
3598with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003599fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003600
3601
3602if test -z "$with_threads"
3603then with_threads="yes"
3604fi
3605echo "$ac_t""$with_threads" 1>&6
3606
3607if test "$with_threads" = "no"
3608then
3609 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003610elif test "$ac_cv_pthread_is_default" = yes
3611then
3612 cat >> confdefs.h <<\EOF
3613#define WITH_THREAD 1
3614EOF
3615
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003616 # Defining _REENTRANT on system with POSIX threads should not hurt.
3617 cat >> confdefs.h <<\EOF
3618#define _REENTRANT 1
3619EOF
3620
3621 posix_threads=yes
3622 LIBOBJS="$LIBOBJS thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003623elif test "$ac_cv_kpthread" = "yes"
3624then
3625 CC="$CC -Kpthread"
3626 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003627#define WITH_THREAD 1
3628EOF
3629
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003630 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003631 LIBOBJS="$LIBOBJS thread.o"
3632else
3633 if test ! -z "$with_threads" -a -d "$with_threads"
3634 then LDFLAGS="$LDFLAGS -L$with_threads"
3635 fi
3636 if test ! -z "$withval" -a -d "$withval"
3637 then LDFLAGS="$LDFLAGS -L$withval"
3638 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003639
3640 # According to the POSIX spec, a pthreads implementation must
3641 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
3642 echo $ac_n "checking for _POSIX_THREADS in unistd.h""... $ac_c" 1>&6
3643echo "configure:3644: checking for _POSIX_THREADS in unistd.h" >&5
3644 cat > conftest.$ac_ext <<EOF
3645#line 3646 "configure"
3646#include "confdefs.h"
3647#include <unistd.h>
3648 #ifdef _POSIX_THREADS
3649 yes
3650 #endif
3651
3652EOF
3653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3654 egrep "yes" >/dev/null 2>&1; then
3655 rm -rf conftest*
3656 unistd_defines_pthreads=yes
3657else
3658 rm -rf conftest*
3659 unistd_defines_pthreads=no
3660fi
3661rm -f conftest*
3662
3663 echo "$ac_t""$unistd_defines_pthreads" 1>&6
3664
Martin v. Löwis130fb172001-07-19 11:00:41 +00003665 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003666#define _REENTRANT 1
3667EOF
3668
Martin v. Löwis130fb172001-07-19 11:00:41 +00003669 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003670echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003671echo "configure:3672: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003672if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003673 echo $ac_n "(cached) $ac_c" 1>&6
3674else
3675 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003676#line 3677 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003677#include "confdefs.h"
3678#include <mach/cthreads.h>
3679EOF
3680ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003681{ (eval echo configure:3682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003682ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003683if test -z "$ac_err"; then
3684 rm -rf conftest*
3685 eval "ac_cv_header_$ac_safe=yes"
3686else
3687 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003688 echo "configure: failed program was:" >&5
3689 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003690 rm -rf conftest*
3691 eval "ac_cv_header_$ac_safe=no"
3692fi
3693rm -f conftest*
3694fi
3695if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3696 echo "$ac_t""yes" 1>&6
3697 cat >> confdefs.h <<\EOF
3698#define WITH_THREAD 1
3699EOF
3700
Martin v. Löwis130fb172001-07-19 11:00:41 +00003701 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003702#define C_THREADS 1
3703EOF
3704
Martin v. Löwis130fb172001-07-19 11:00:41 +00003705 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003706else
3707 echo "$ac_t""no" 1>&6
3708
Martin v. Löwis130fb172001-07-19 11:00:41 +00003709 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003710echo "configure:3711: checking for --with-pth" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00003711 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003712if test "${with_pth+set}" = set; then
3713 withval="$with_pth"
3714
Martin v. Löwis130fb172001-07-19 11:00:41 +00003715 echo "$ac_t""$withval" 1>&6
3716 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003717#define WITH_THREAD 1
3718EOF
3719
Martin v. Löwis130fb172001-07-19 11:00:41 +00003720 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003721#define HAVE_PTH 1
3722EOF
3723
Martin v. Löwis130fb172001-07-19 11:00:41 +00003724 LIBS="-lpth $LIBS"
3725 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003726else
3727
Martin v. Löwis130fb172001-07-19 11:00:41 +00003728 echo "$ac_t""no" 1>&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003729
3730 # Just looking for pthread_create in libpthread is not enough:
3731 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
3732 # So we really have to include pthread.h, and then link.
3733 _libs=$LIBS
3734 LIBS="$LIBS -lpthread"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003735 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003736echo "configure:3737: checking for pthread_create in -lpthread" >&5
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003737 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003738#line 3739 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003739#include "confdefs.h"
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003740#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00003741
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003742void * start_routine (void *arg) { exit (0); }
Guido van Rossum02a1c402000-02-25 19:26:31 +00003743int main() {
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003744
3745pthread_create (NULL, NULL, start_routine, NULL)
Guido van Rossum02a1c402000-02-25 19:26:31 +00003746; return 0; }
3747EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003748if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003749 rm -rf conftest*
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003750
3751 echo "$ac_t""yes" 1>&6
3752 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003753#define WITH_THREAD 1
3754EOF
3755
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003756 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003757 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003758else
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00003759 echo "configure: failed program was:" >&5
3760 cat conftest.$ac_ext >&5
3761 rm -rf conftest*
3762
3763 LIBS=$_libs
Martin v. Löwis130fb172001-07-19 11:00:41 +00003764 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003765echo "configure:3766: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003766if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003767 echo $ac_n "(cached) $ac_c" 1>&6
3768else
3769 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003770#line 3771 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003771#include "confdefs.h"
3772/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003773 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003774#include <assert.h>
3775/* Override any gcc2 internal prototype to avoid an error. */
3776/* We use char because int might match the return type of a gcc2
3777 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003778char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003779
3780int main() {
3781
3782/* The GNU C library defines this for functions which it implements
3783 to always fail with ENOSYS. Some functions are actually named
3784 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003785#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003786choke me
3787#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003788pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003789#endif
3790
3791; return 0; }
3792EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003793if { (eval echo configure:3794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003794 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003795 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003796else
3797 echo "configure: failed program was:" >&5
3798 cat conftest.$ac_ext >&5
3799 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003800 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003801fi
3802rm -f conftest*
3803fi
3804
Guido van Rossumea516321998-12-17 18:08:55 +00003805if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003806 echo "$ac_t""yes" 1>&6
3807 cat >> confdefs.h <<\EOF
3808#define WITH_THREAD 1
3809EOF
3810
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003811 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003812 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003813else
3814 echo "$ac_t""no" 1>&6
3815
Martin v. Löwis130fb172001-07-19 11:00:41 +00003816 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003817echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003818echo "configure:3819: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003819if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003820 echo $ac_n "(cached) $ac_c" 1>&6
3821else
3822 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003823#line 3824 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003824#include "confdefs.h"
3825#include <kernel/OS.h>
3826EOF
3827ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003828{ (eval echo configure:3829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003829ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003830if test -z "$ac_err"; then
3831 rm -rf conftest*
3832 eval "ac_cv_header_$ac_safe=yes"
3833else
3834 echo "$ac_err" >&5
3835 echo "configure: failed program was:" >&5
3836 cat conftest.$ac_ext >&5
3837 rm -rf conftest*
3838 eval "ac_cv_header_$ac_safe=no"
3839fi
3840rm -f conftest*
3841fi
3842if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3843 echo "$ac_t""yes" 1>&6
3844 cat >> confdefs.h <<\EOF
3845#define WITH_THREAD 1
3846EOF
3847
Martin v. Löwis130fb172001-07-19 11:00:41 +00003848 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003849#define BEOS_THREADS 1
3850EOF
3851
Martin v. Löwis130fb172001-07-19 11:00:41 +00003852 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003853else
3854 echo "$ac_t""no" 1>&6
3855
Martin v. Löwis130fb172001-07-19 11:00:41 +00003856 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003857echo "configure:3858: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003858ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003859if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003860 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003861else
3862 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003863LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003864cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003865#line 3866 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003866#include "confdefs.h"
3867/* Override any gcc2 internal prototype to avoid an error. */
3868/* We use char because int might match the return type of a gcc2
3869 builtin and then its argument prototype would still apply. */
3870char pthread_create();
3871
3872int main() {
3873pthread_create()
3874; return 0; }
3875EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003876if { (eval echo configure:3877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003877 rm -rf conftest*
3878 eval "ac_cv_lib_$ac_lib_var=yes"
3879else
3880 echo "configure: failed program was:" >&5
3881 cat conftest.$ac_ext >&5
3882 rm -rf conftest*
3883 eval "ac_cv_lib_$ac_lib_var=no"
3884fi
3885rm -f conftest*
3886LIBS="$ac_save_LIBS"
3887
3888fi
3889if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3890 echo "$ac_t""yes" 1>&6
3891 cat >> confdefs.h <<\EOF
3892#define WITH_THREAD 1
3893EOF
3894
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003895 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003896 LIBS="$LIBS -lpthreads"
3897 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003898else
3899 echo "$ac_t""no" 1>&6
3900
Martin v. Löwis130fb172001-07-19 11:00:41 +00003901 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003902echo "configure:3903: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003903ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003904if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003905 echo $ac_n "(cached) $ac_c" 1>&6
3906else
3907 ac_save_LIBS="$LIBS"
3908LIBS="-lc_r $LIBS"
3909cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003910#line 3911 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003911#include "confdefs.h"
3912/* Override any gcc2 internal prototype to avoid an error. */
3913/* We use char because int might match the return type of a gcc2
3914 builtin and then its argument prototype would still apply. */
3915char pthread_create();
3916
3917int main() {
3918pthread_create()
3919; return 0; }
3920EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003921if { (eval echo configure:3922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003922 rm -rf conftest*
3923 eval "ac_cv_lib_$ac_lib_var=yes"
3924else
3925 echo "configure: failed program was:" >&5
3926 cat conftest.$ac_ext >&5
3927 rm -rf conftest*
3928 eval "ac_cv_lib_$ac_lib_var=no"
3929fi
3930rm -f conftest*
3931LIBS="$ac_save_LIBS"
3932
3933fi
3934if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3935 echo "$ac_t""yes" 1>&6
3936 cat >> confdefs.h <<\EOF
3937#define WITH_THREAD 1
3938EOF
3939
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003940 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003941 LIBS="$LIBS -lc_r"
3942 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003943else
3944 echo "$ac_t""no" 1>&6
3945
Martin v. Löwis130fb172001-07-19 11:00:41 +00003946 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003947echo "configure:3948: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003948ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003949if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003950 echo $ac_n "(cached) $ac_c" 1>&6
3951else
3952 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003953LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003954cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003955#line 3956 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003956#include "confdefs.h"
3957/* Override any gcc2 internal prototype to avoid an error. */
3958/* We use char because int might match the return type of a gcc2
3959 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003960char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003961
3962int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003963__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003964; return 0; }
3965EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003966if { (eval echo configure:3967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003967 rm -rf conftest*
3968 eval "ac_cv_lib_$ac_lib_var=yes"
3969else
3970 echo "configure: failed program was:" >&5
3971 cat conftest.$ac_ext >&5
3972 rm -rf conftest*
3973 eval "ac_cv_lib_$ac_lib_var=no"
3974fi
3975rm -f conftest*
3976LIBS="$ac_save_LIBS"
3977
3978fi
3979if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3980 echo "$ac_t""yes" 1>&6
3981 cat >> confdefs.h <<\EOF
3982#define WITH_THREAD 1
3983EOF
3984
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003985 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003986 LIBS="$LIBS -lthread"
3987 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003988else
3989 echo "$ac_t""no" 1>&6
3990
Martin v. Löwis130fb172001-07-19 11:00:41 +00003991 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00003992echo "configure:3993: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003993ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3994if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3995 echo $ac_n "(cached) $ac_c" 1>&6
3996else
3997 ac_save_LIBS="$LIBS"
3998LIBS="-lpthread $LIBS"
3999cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004000#line 4001 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004001#include "confdefs.h"
4002/* Override any gcc2 internal prototype to avoid an error. */
4003/* We use char because int might match the return type of a gcc2
4004 builtin and then its argument prototype would still apply. */
4005char __pthread_create_system();
4006
4007int main() {
4008__pthread_create_system()
4009; return 0; }
4010EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004011if { (eval echo configure:4012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004012 rm -rf conftest*
4013 eval "ac_cv_lib_$ac_lib_var=yes"
4014else
4015 echo "configure: failed program was:" >&5
4016 cat conftest.$ac_ext >&5
4017 rm -rf conftest*
4018 eval "ac_cv_lib_$ac_lib_var=no"
4019fi
4020rm -f conftest*
4021LIBS="$ac_save_LIBS"
4022
4023fi
4024if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4025 echo "$ac_t""yes" 1>&6
4026 cat >> confdefs.h <<\EOF
4027#define WITH_THREAD 1
4028EOF
4029
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004030 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004031 LIBS="$LIBS -lpthread"
4032 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004033else
4034 echo "$ac_t""no" 1>&6
4035
Martin v. Löwis130fb172001-07-19 11:00:41 +00004036 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004037echo "configure:4038: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00004038ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004039if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004040 echo $ac_n "(cached) $ac_c" 1>&6
4041else
4042 ac_save_LIBS="$LIBS"
4043LIBS="-lcma $LIBS"
4044cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004045#line 4046 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004046#include "confdefs.h"
4047/* Override any gcc2 internal prototype to avoid an error. */
4048/* We use char because int might match the return type of a gcc2
4049 builtin and then its argument prototype would still apply. */
4050char pthread_create();
4051
4052int main() {
4053pthread_create()
4054; return 0; }
4055EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004056if { (eval echo configure:4057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004057 rm -rf conftest*
4058 eval "ac_cv_lib_$ac_lib_var=yes"
4059else
4060 echo "configure: failed program was:" >&5
4061 cat conftest.$ac_ext >&5
4062 rm -rf conftest*
4063 eval "ac_cv_lib_$ac_lib_var=no"
4064fi
4065rm -f conftest*
4066LIBS="$ac_save_LIBS"
4067
4068fi
4069if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4070 echo "$ac_t""yes" 1>&6
4071 cat >> confdefs.h <<\EOF
4072#define WITH_THREAD 1
4073EOF
4074
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004075 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004076 LIBS="$LIBS -lcma"
4077 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004078else
4079 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004080
Martin v. Löwis130fb172001-07-19 11:00:41 +00004081 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004082fi
4083
Martin v. Löwis130fb172001-07-19 11:00:41 +00004084
Guido van Rossum627b2d71993-12-24 10:39:16 +00004085fi
4086
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004087fi
4088
Guido van Rossum0be3e491997-05-22 20:33:33 +00004089fi
4090
Guido van Rossum49545951997-12-02 19:28:29 +00004091fi
4092
Guido van Rossumb93a8621998-05-07 13:27:32 +00004093fi
4094
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004095fi
4096
Guido van Rossumad678af1998-10-02 14:42:15 +00004097fi
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00004098rm -f conftest*
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004099fi
4100
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004101fi
4102
Guido van Rossum0be3e491997-05-22 20:33:33 +00004103
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004104 if test "$posix_threads" = "yes"; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004105 if test "$unistd_defines_pthreads" = "no"; then
4106 cat >> confdefs.h <<\EOF
4107#define _POSIX_THREADS 1
4108EOF
4109
4110 fi
4111
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004112 echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004113echo "configure:4114: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004114 if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then
4115 echo $ac_n "(cached) $ac_c" 1>&6
4116else
4117 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004118 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004119else
4120 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004121#line 4122 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004122#include "confdefs.h"
4123#include <pthread.h>
4124 void *foo(void *parm) {
4125 return NULL;
4126 }
4127 main() {
4128 pthread_attr_t attr;
4129 if (pthread_attr_init(&attr)) exit(-1);
4130 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
4131 if (pthread_create(NULL, &attr, foo, NULL)) exit(-1);
4132 exit(0);
4133 }
4134EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004135if { (eval echo configure:4136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004136then
4137 ac_cv_pthread_system_supported=yes
4138else
4139 echo "configure: failed program was:" >&5
4140 cat conftest.$ac_ext >&5
4141 rm -fr conftest*
4142 ac_cv_pthread_system_supported=no
4143fi
4144rm -fr conftest*
4145fi
4146
4147
4148fi
4149
4150 echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6
4151 if test "$ac_cv_pthread_system_supported" = "yes"; then
4152 cat >> confdefs.h <<\EOF
4153#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
4154EOF
4155
4156 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004157 for ac_func in pthread_sigmask
4158do
4159echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4160echo "configure:4161: checking for $ac_func" >&5
4161if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4162 echo $ac_n "(cached) $ac_c" 1>&6
4163else
4164 cat > conftest.$ac_ext <<EOF
4165#line 4166 "configure"
4166#include "confdefs.h"
4167/* System header to define __stub macros and hopefully few prototypes,
4168 which can conflict with char $ac_func(); below. */
4169#include <assert.h>
4170/* Override any gcc2 internal prototype to avoid an error. */
4171/* We use char because int might match the return type of a gcc2
4172 builtin and then its argument prototype would still apply. */
4173char $ac_func();
4174
4175int main() {
4176
4177/* The GNU C library defines this for functions which it implements
4178 to always fail with ENOSYS. Some functions are actually named
4179 something starting with __ and the normal name is an alias. */
4180#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4181choke me
4182#else
4183$ac_func();
4184#endif
4185
4186; return 0; }
4187EOF
4188if { (eval echo configure:4189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4189 rm -rf conftest*
4190 eval "ac_cv_func_$ac_func=yes"
4191else
4192 echo "configure: failed program was:" >&5
4193 cat conftest.$ac_ext >&5
4194 rm -rf conftest*
4195 eval "ac_cv_func_$ac_func=no"
4196fi
4197rm -f conftest*
4198fi
4199
4200if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4201 echo "$ac_t""yes" 1>&6
4202 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4203 cat >> confdefs.h <<EOF
4204#define $ac_tr_func 1
4205EOF
4206
4207else
4208 echo "$ac_t""no" 1>&6
4209fi
4210done
4211
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004212 fi
4213
Martin v. Löwis130fb172001-07-19 11:00:41 +00004214 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004215echo "configure:4216: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004216ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004217if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004218 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004219else
4220 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004221LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004222cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004223#line 4224 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004224#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004225/* Override any gcc2 internal prototype to avoid an error. */
4226/* We use char because int might match the return type of a gcc2
4227 builtin and then its argument prototype would still apply. */
4228char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004229
Guido van Rossumf78abae1997-01-21 22:02:36 +00004230int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004231usconfig()
4232; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004233EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004234if { (eval echo configure:4235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004235 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004236 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004237else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004238 echo "configure: failed program was:" >&5
4239 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004241 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004242fi
4243rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244LIBS="$ac_save_LIBS"
4245
4246fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004247if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004248 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004249 cat >> confdefs.h <<\EOF
4250#define WITH_THREAD 1
4251EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004252
Martin v. Löwis130fb172001-07-19 11:00:41 +00004253 LIBS="$LIBS -lmpc"
4254 LIBOBJS="$LIBOBJS thread.o"
4255 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004256else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004257 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004258fi
4259
Martin v. Löwis130fb172001-07-19 11:00:41 +00004260 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004261echo "configure:4262: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004262ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004263if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004264 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265else
4266 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004267LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004268cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004269#line 4270 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004270#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004271/* Override any gcc2 internal prototype to avoid an error. */
4272/* We use char because int might match the return type of a gcc2
4273 builtin and then its argument prototype would still apply. */
4274char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004275
Guido van Rossumf78abae1997-01-21 22:02:36 +00004276int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004277thr_create()
4278; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004279EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004280if { (eval echo configure:4281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004281 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004282 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004283else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004284 echo "configure: failed program was:" >&5
4285 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004286 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004287 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004288fi
4289rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004290LIBS="$ac_save_LIBS"
4291
4292fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004293if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004294 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004295 cat >> confdefs.h <<\EOF
4296#define WITH_THREAD 1
4297EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004298
Martin v. Löwis130fb172001-07-19 11:00:41 +00004299 LIBS="$LIBS -lthread"
4300 LIBOBJS="$LIBOBJS thread.o"
4301 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004302else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004303 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004304fi
4305
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004306
Martin v. Löwis130fb172001-07-19 11:00:41 +00004307 if test "$USE_THREAD_MODULE" != "#"
4308 then
4309 # If the above checks didn't disable threads, (at least) OSF1
4310 # needs this '-threads' argument during linking.
4311 case $ac_sys_system in
4312 OSF1) LDLAST=-threads;;
4313 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004314 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004315fi
4316
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004317# Check for enable-ipv6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004318echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004319echo "configure:4320: checking if --enable-ipv6 is specified" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004320# Check whether --enable-ipv6 or --disable-ipv6 was given.
4321if test "${enable_ipv6+set}" = set; then
4322 enableval="$enable_ipv6"
4323 case "$enableval" in
4324 no)
4325 echo "$ac_t""no" 1>&6
4326 ipv6=no
4327 ;;
4328 *) echo "$ac_t""yes" 1>&6
4329 cat >> confdefs.h <<\EOF
4330#define ENABLE_IPV6 1
4331EOF
4332
4333 ipv6=yes
4334 ;;
4335 esac
4336else
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004337
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004338 if test "$cross_compiling" = yes; then
4339 echo "$ac_t""no" 1>&6
4340 ipv6=no
4341
4342else
4343 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004344#line 4345 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004345#include "confdefs.h"
4346 /* AF_INET6 available check */
4347#include <sys/types.h>
4348#include <sys/socket.h>
4349main()
4350{
4351 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4352 exit(1);
4353 else
4354 exit(0);
4355}
4356
4357EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004358if { (eval echo configure:4359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004359then
4360 echo "$ac_t""yes" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004361 ipv6=yes
4362else
4363 echo "configure: failed program was:" >&5
4364 cat conftest.$ac_ext >&5
4365 rm -fr conftest*
4366 echo "$ac_t""no" 1>&6
4367 ipv6=no
4368fi
4369rm -fr conftest*
4370fi
4371
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004372
4373if test "$ipv6" = "yes"; then
4374 echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004375echo "configure:4376: checking if RFC2553 API is available" >&5
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004376 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004377#line 4378 "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004378#include "confdefs.h"
4379#include <sys/types.h>
4380#include <netinet/in.h>
4381int main() {
4382struct sockaddr_in6 x;
4383x.sin6_scope_id;
4384; return 0; }
4385EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004386if { (eval echo configure:4387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004387 rm -rf conftest*
4388 echo "$ac_t""yes" 1>&6
4389 ipv6=yes
4390else
4391 echo "configure: failed program was:" >&5
4392 cat conftest.$ac_ext >&5
4393 rm -rf conftest*
4394 echo "$ac_t""no" 1>&6
4395 ipv6=no
4396fi
4397rm -f conftest*
4398fi
4399
4400if test "$ipv6" = "yes"; then
4401 cat >> confdefs.h <<\EOF
4402#define ENABLE_IPV6 1
4403EOF
4404
4405fi
4406
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004407fi
4408
4409
4410ipv6type=unknown
4411ipv6lib=none
4412ipv6trylibc=no
4413
4414if test "$ipv6" = "yes"; then
4415 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004416echo "configure:4417: checking ipv6 stack type" >&5
Guido van Rossumb8552162001-09-05 14:58:11 +00004417 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
4418 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004419 case $i in
4420 inria)
4421 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004422#line 4423 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004423#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004424
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004425#include <netinet/in.h>
4426#ifdef IPV6_INRIA_VERSION
4427yes
4428#endif
4429EOF
4430if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4431 egrep "yes" >/dev/null 2>&1; then
4432 rm -rf conftest*
4433 ipv6type=$i;
4434 OPT="-DINET6 $OPT"
4435fi
4436rm -f conftest*
4437
4438 ;;
4439 kame)
4440 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004441#line 4442 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004442#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004443
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004444#include <netinet/in.h>
4445#ifdef __KAME__
4446yes
4447#endif
4448EOF
4449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4450 egrep "yes" >/dev/null 2>&1; then
4451 rm -rf conftest*
4452 ipv6type=$i;
4453 ipv6lib=inet6
4454 ipv6libdir=/usr/local/v6/lib
4455 ipv6trylibc=yes
4456 OPT="-DINET6 $OPT"
4457fi
4458rm -f conftest*
4459
4460 ;;
4461 linux-glibc)
4462 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004463#line 4464 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004464#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004465
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004466#include <features.h>
4467#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4468yes
4469#endif
4470EOF
4471if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4472 egrep "yes" >/dev/null 2>&1; then
4473 rm -rf conftest*
4474 ipv6type=$i;
4475 ipv6trylibc=yes
4476 OPT="-DINET6 $OPT"
4477fi
4478rm -f conftest*
4479
4480 ;;
4481 linux-inet6)
4482 if test -d /usr/inet6; then
4483 ipv6type=$i
4484 ipv6lib=inet6
4485 ipv6libdir=/usr/inet6/lib
4486 OPT="-DINET6 -I/usr/inet6/include $OPT"
4487 fi
4488 ;;
4489 solaris)
4490 if test -f /etc/netconfig; then
4491 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4492 ipv6type=$i
4493 ipv6trylibc=yes
4494 OPT="-DINET6 $OPT"
4495 fi
4496 fi
4497 ;;
4498 toshiba)
4499 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004500#line 4501 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004501#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004502
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004503#include <sys/param.h>
4504#ifdef _TOSHIBA_INET6
4505yes
4506#endif
4507EOF
4508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4509 egrep "yes" >/dev/null 2>&1; then
4510 rm -rf conftest*
4511 ipv6type=$i;
4512 ipv6lib=inet6;
4513 ipv6libdir=/usr/local/v6/lib;
4514 OPT="-DINET6 $OPT"
4515fi
4516rm -f conftest*
4517
4518 ;;
4519 v6d)
4520 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004521#line 4522 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004522#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004523
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004524#include </usr/local/v6/include/sys/v6config.h>
4525#ifdef __V6D__
4526yes
4527#endif
4528EOF
4529if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4530 egrep "yes" >/dev/null 2>&1; then
4531 rm -rf conftest*
4532 ipv6type=$i;
4533 ipv6lib=v6;
4534 ipv6libdir=/usr/local/v6/lib;
4535 OPT="-I/usr/local/v6/include $OPT"
4536fi
4537rm -f conftest*
4538
4539 ;;
4540 zeta)
4541 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004542#line 4543 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004543#include "confdefs.h"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004544
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004545#include <sys/param.h>
4546#ifdef _ZETA_MINAMI_INET6
4547yes
4548#endif
4549EOF
4550if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4551 egrep "yes" >/dev/null 2>&1; then
4552 rm -rf conftest*
4553 ipv6type=$i;
4554 ipv6lib=inet6;
4555 ipv6libdir=/usr/local/v6/lib;
4556 OPT="-DINET6 $OPT"
4557fi
4558rm -f conftest*
4559
4560 ;;
4561 esac
4562 if test "$ipv6type" != "unknown"; then
4563 break
4564 fi
4565 done
4566 echo "$ac_t""$ipv6type" 1>&6
4567fi
4568
4569if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4570 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4571 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4572 echo "using lib$ipv6lib"
4573 else
4574 if test $ipv6trylibc = "yes"; then
4575 echo "using libc"
4576 else
4577 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4578 echo "You need to fetch lib$ipv6lib.a from appropriate"
4579 echo 'ipv6 kit and compile beforehand.'
4580 exit 1
4581 fi
4582 fi
4583fi
4584
Barry Warsawef82cd72000-06-30 16:21:01 +00004585# Check for GC support
Barry Warsawef82cd72000-06-30 16:21:01 +00004586echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004587echo "configure:4588: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004588# Check whether --with-cycle-gc or --without-cycle-gc was given.
4589if test "${with_cycle_gc+set}" = set; then
4590 withval="$with_cycle_gc"
4591 :
4592fi
4593
4594
4595if test -z "$with_cycle_gc"
4596then with_cycle_gc="yes"
4597fi
Neil Schemenauercf229462001-08-29 23:58:47 +00004598if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +00004599then
Barry Warsawef82cd72000-06-30 16:21:01 +00004600 cat >> confdefs.h <<\EOF
4601#define WITH_CYCLE_GC 1
4602EOF
4603
4604fi
4605echo "$ac_t""$with_cycle_gc" 1>&6
4606
Neil Schemenauera35c6882001-02-27 04:45:05 +00004607# Check for Python-specific malloc support
4608echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004609echo "configure:4610: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004610# Check whether --with-pymalloc or --without-pymalloc was given.
4611if test "${with_pymalloc+set}" = set; then
4612 withval="$with_pymalloc"
4613
4614if test "$withval" != no
4615then cat >> confdefs.h <<\EOF
4616#define WITH_PYMALLOC 1
4617EOF
4618 echo "$ac_t""yes" 1>&6
4619else echo "$ac_t""no" 1>&6
4620fi
4621else
4622 echo "$ac_t""no" 1>&6
4623fi
4624
4625
Barry Warsawef82cd72000-06-30 16:21:01 +00004626# Check for --with-wctype-functions
4627echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004628echo "configure:4629: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004629# Check whether --with-wctype-functions or --without-wctype-functions was given.
4630if test "${with_wctype_functions+set}" = set; then
4631 withval="$with_wctype_functions"
4632
4633if test "$withval" != no
4634then cat >> confdefs.h <<\EOF
4635#define WANT_WCTYPE_FUNCTIONS 1
4636EOF
4637 echo "$ac_t""yes" 1>&6
4638else echo "$ac_t""no" 1>&6
4639fi
4640else
4641 echo "$ac_t""no" 1>&6
4642fi
4643
4644
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004645# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004646
Guido van Rossum98935bf2001-09-05 19:13:16 +00004647DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004648
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004649echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004650echo "configure:4651: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004651# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004652if test "${with_sgi_dl+set}" = set; then
4653 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004654
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004655echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004656cat >> confdefs.h <<\EOF
4657#define WITH_SGI_DL 1
4658EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004659
Guido van Rossume97ee181999-12-20 21:27:22 +00004660DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004661dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004662if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004663then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004664else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004665fi
4666DLINCLDIR=${dldir}
4667LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004668else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004669 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004670fi
4671
4672
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004673echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004674echo "configure:4675: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004675# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004676if test "${with_dl_dld+set}" = set; then
4677 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004678
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004679echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004680cat >> confdefs.h <<\EOF
4681#define WITH_DL_DLD 1
4682EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004683
Guido van Rossume97ee181999-12-20 21:27:22 +00004684DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004685dldir=`echo "$withval" | sed 's/,.*//'`
4686dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004687if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004688then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004689else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004690fi
4691DLINCLDIR=${dldir}
4692LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004693else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004694 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004695fi
4696
4697
Guido van Rossume97ee181999-12-20 21:27:22 +00004698# the dlopen() function means we might want to use dynload_shlib.o. some
4699# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004700for ac_func in dlopen
4701do
4702echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004703echo "configure:4704: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004704if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004705 echo $ac_n "(cached) $ac_c" 1>&6
4706else
4707 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004708#line 4709 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004709#include "confdefs.h"
4710/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004711 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004712#include <assert.h>
4713/* Override any gcc2 internal prototype to avoid an error. */
4714/* We use char because int might match the return type of a gcc2
4715 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004716char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004717
4718int main() {
4719
4720/* The GNU C library defines this for functions which it implements
4721 to always fail with ENOSYS. Some functions are actually named
4722 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004723#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004724choke me
4725#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004726$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004727#endif
4728
4729; return 0; }
4730EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004731if { (eval echo configure:4732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004732 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004733 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004734else
4735 echo "configure: failed program was:" >&5
4736 cat conftest.$ac_ext >&5
4737 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004738 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004739fi
4740rm -f conftest*
4741fi
4742
Thomas Wouters3a584202000-08-05 23:28:51 +00004743if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004744 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004745 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4746 cat >> confdefs.h <<EOF
4747#define $ac_tr_func 1
4748EOF
4749
Guido van Rossume97ee181999-12-20 21:27:22 +00004750else
4751 echo "$ac_t""no" 1>&6
4752fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004753done
Guido van Rossume97ee181999-12-20 21:27:22 +00004754
4755
4756# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4757# loading of modules.
4758
4759echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004760echo "configure:4761: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004761if test -z "$DYNLOADFILE"
4762then
4763 case $ac_sys_system/$ac_sys_release in
4764 AIX*) DYNLOADFILE="dynload_aix.o";;
4765 BeOS*) DYNLOADFILE="dynload_beos.o";;
4766 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004767 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004768 *)
4769 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4770 # out any dynamic loading
4771 if test "$ac_cv_func_dlopen" = yes
4772 then DYNLOADFILE="dynload_shlib.o"
4773 else DYNLOADFILE="dynload_stub.o"
4774 fi
4775 ;;
4776 esac
4777fi
4778echo "$ac_t""$DYNLOADFILE" 1>&6
4779if test "$DYNLOADFILE" != "dynload_stub.o"
4780then
4781 cat >> confdefs.h <<\EOF
4782#define HAVE_DYNAMIC_LOADING 1
4783EOF
4784
4785fi
4786
Neil Schemenauer4e425612001-06-19 15:44:15 +00004787# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4788
4789
4790echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004791echo "configure:4792: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004792if test -z "$MACHDEP_OBJS"
4793then
Jack Jansene578a632001-08-15 01:27:14 +00004794 MACHDEP_OBJS=$extra_machdep_objs
4795else
4796 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004797fi
Jack Jansene578a632001-08-15 01:27:14 +00004798echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004799
Guido van Rossum627b2d71993-12-24 10:39:16 +00004800# checks for library functions
Martin v. Löwis244edc82001-10-04 22:44:26 +00004801for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004802 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00004803 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis864e9ff2001-08-04 22:32:03 +00004804 hstrerror inet_pton kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004805 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004806 putenv readlink \
Martin v. Löwis61c5edf2001-10-18 04:06:00 +00004807 select setegid seteuid setgid setgroups \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004808 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004809 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004810 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Woutersc2c12dc2001-07-11 14:45:34 +00004811 truncate uname waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004812do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004813echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004814echo "configure:4815: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004815if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004816 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004817else
4818 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004819#line 4820 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004820#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004821/* System header to define __stub macros and hopefully few prototypes,
4822 which can conflict with char $ac_func(); below. */
4823#include <assert.h>
4824/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004825/* We use char because int might match the return type of a gcc2
4826 builtin and then its argument prototype would still apply. */
4827char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004828
Guido van Rossumf78abae1997-01-21 22:02:36 +00004829int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004830
Guido van Rossum627b2d71993-12-24 10:39:16 +00004831/* The GNU C library defines this for functions which it implements
4832 to always fail with ENOSYS. Some functions are actually named
4833 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004834#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004835choke me
4836#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004837$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004838#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004839
Guido van Rossum7f43da71994-08-01 12:15:30 +00004840; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004841EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004842if { (eval echo configure:4843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004843 rm -rf conftest*
4844 eval "ac_cv_func_$ac_func=yes"
4845else
4846 echo "configure: failed program was:" >&5
4847 cat conftest.$ac_ext >&5
4848 rm -rf conftest*
4849 eval "ac_cv_func_$ac_func=no"
4850fi
4851rm -f conftest*
4852fi
4853
4854if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4855 echo "$ac_t""yes" 1>&6
4856 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4857 cat >> confdefs.h <<EOF
4858#define $ac_tr_func 1
4859EOF
4860
4861else
4862 echo "$ac_t""no" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004863fi
4864done
4865
4866
4867# check for openpty and forkpty
4868
4869for ac_func in openpty
4870do
4871echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004872echo "configure:4873: checking for $ac_func" >&5
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004873if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4874 echo $ac_n "(cached) $ac_c" 1>&6
4875else
4876 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004877#line 4878 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004878#include "confdefs.h"
4879/* System header to define __stub macros and hopefully few prototypes,
4880 which can conflict with char $ac_func(); below. */
4881#include <assert.h>
4882/* Override any gcc2 internal prototype to avoid an error. */
4883/* We use char because int might match the return type of a gcc2
4884 builtin and then its argument prototype would still apply. */
4885char $ac_func();
4886
4887int main() {
4888
4889/* The GNU C library defines this for functions which it implements
4890 to always fail with ENOSYS. Some functions are actually named
4891 something starting with __ and the normal name is an alias. */
4892#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4893choke me
4894#else
4895$ac_func();
4896#endif
4897
4898; return 0; }
4899EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004900if { (eval echo configure:4901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004901 rm -rf conftest*
4902 eval "ac_cv_func_$ac_func=yes"
4903else
4904 echo "configure: failed program was:" >&5
4905 cat conftest.$ac_ext >&5
4906 rm -rf conftest*
4907 eval "ac_cv_func_$ac_func=no"
4908fi
4909rm -f conftest*
4910fi
4911
4912if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4913 echo "$ac_t""yes" 1>&6
4914 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4915 cat >> confdefs.h <<EOF
4916#define $ac_tr_func 1
4917EOF
4918
4919else
4920 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004921echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004922echo "configure:4923: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004923ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004924if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004925 echo $ac_n "(cached) $ac_c" 1>&6
4926else
4927 ac_save_LIBS="$LIBS"
4928LIBS="-lutil $LIBS"
4929cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004930#line 4931 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004931#include "confdefs.h"
4932/* Override any gcc2 internal prototype to avoid an error. */
4933/* We use char because int might match the return type of a gcc2
4934 builtin and then its argument prototype would still apply. */
4935char openpty();
4936
4937int main() {
4938openpty()
4939; return 0; }
4940EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004941if { (eval echo configure:4942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004942 rm -rf conftest*
4943 eval "ac_cv_lib_$ac_lib_var=yes"
4944else
4945 echo "configure: failed program was:" >&5
4946 cat conftest.$ac_ext >&5
4947 rm -rf conftest*
4948 eval "ac_cv_lib_$ac_lib_var=no"
4949fi
4950rm -f conftest*
4951LIBS="$ac_save_LIBS"
4952
4953fi
4954if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4955 echo "$ac_t""yes" 1>&6
4956 cat >> confdefs.h <<\EOF
4957#define HAVE_OPENPTY 1
4958EOF
4959 LIBS="$LIBS -lutil"
4960else
4961 echo "$ac_t""no" 1>&6
4962fi
4963
4964fi
4965done
4966
4967for ac_func in forkpty
4968do
4969echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004970echo "configure:4971: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004971if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004972 echo $ac_n "(cached) $ac_c" 1>&6
4973else
4974 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004975#line 4976 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004976#include "confdefs.h"
4977/* System header to define __stub macros and hopefully few prototypes,
4978 which can conflict with char $ac_func(); below. */
4979#include <assert.h>
4980/* Override any gcc2 internal prototype to avoid an error. */
4981/* We use char because int might match the return type of a gcc2
4982 builtin and then its argument prototype would still apply. */
4983char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004984
4985int main() {
4986
4987/* The GNU C library defines this for functions which it implements
4988 to always fail with ENOSYS. Some functions are actually named
4989 something starting with __ and the normal name is an alias. */
4990#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4991choke me
4992#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004993$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004994#endif
4995
4996; return 0; }
4997EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00004998if { (eval echo configure:4999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004999 rm -rf conftest*
5000 eval "ac_cv_func_$ac_func=yes"
5001else
5002 echo "configure: failed program was:" >&5
5003 cat conftest.$ac_ext >&5
5004 rm -rf conftest*
5005 eval "ac_cv_func_$ac_func=no"
5006fi
5007rm -f conftest*
5008fi
5009
5010if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5011 echo "$ac_t""yes" 1>&6
5012 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5013 cat >> confdefs.h <<EOF
5014#define $ac_tr_func 1
5015EOF
5016
5017else
5018 echo "$ac_t""no" 1>&6
5019echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005020echo "configure:5021: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00005021ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005022if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00005023 echo $ac_n "(cached) $ac_c" 1>&6
5024else
5025 ac_save_LIBS="$LIBS"
5026LIBS="-lutil $LIBS"
5027cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005028#line 5029 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005029#include "confdefs.h"
5030/* Override any gcc2 internal prototype to avoid an error. */
5031/* We use char because int might match the return type of a gcc2
5032 builtin and then its argument prototype would still apply. */
5033char forkpty();
5034
5035int main() {
5036forkpty()
5037; return 0; }
5038EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005039if { (eval echo configure:5040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00005040 rm -rf conftest*
5041 eval "ac_cv_lib_$ac_lib_var=yes"
5042else
5043 echo "configure: failed program was:" >&5
5044 cat conftest.$ac_ext >&5
5045 rm -rf conftest*
5046 eval "ac_cv_lib_$ac_lib_var=no"
5047fi
5048rm -f conftest*
5049LIBS="$ac_save_LIBS"
5050
5051fi
5052if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5053 echo "$ac_t""yes" 1>&6
5054 cat >> confdefs.h <<\EOF
5055#define HAVE_FORKPTY 1
5056EOF
5057 LIBS="$LIBS -lutil"
5058else
5059 echo "$ac_t""no" 1>&6
5060fi
5061
5062fi
5063done
5064
5065
5066# check for long file support functions
5067for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
5068do
5069echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005070echo "configure:5071: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005071if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00005072 echo $ac_n "(cached) $ac_c" 1>&6
5073else
5074 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005075#line 5076 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00005076#include "confdefs.h"
5077/* System header to define __stub macros and hopefully few prototypes,
5078 which can conflict with char $ac_func(); below. */
5079#include <assert.h>
5080/* Override any gcc2 internal prototype to avoid an error. */
5081/* We use char because int might match the return type of a gcc2
5082 builtin and then its argument prototype would still apply. */
5083char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005084
5085int main() {
5086
5087/* The GNU C library defines this for functions which it implements
5088 to always fail with ENOSYS. Some functions are actually named
5089 something starting with __ and the normal name is an alias. */
5090#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5091choke me
5092#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005093$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00005094#endif
5095
5096; return 0; }
5097EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005098if { (eval echo configure:5099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005099 rm -rf conftest*
5100 eval "ac_cv_func_$ac_func=yes"
5101else
5102 echo "configure: failed program was:" >&5
5103 cat conftest.$ac_ext >&5
5104 rm -rf conftest*
5105 eval "ac_cv_func_$ac_func=no"
5106fi
5107rm -f conftest*
5108fi
5109
5110if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5111 echo "$ac_t""yes" 1>&6
5112 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5113 cat >> confdefs.h <<EOF
5114#define $ac_tr_func 1
5115EOF
5116
5117else
5118 echo "$ac_t""no" 1>&6
5119fi
5120done
5121
5122
5123for ac_func in dup2 getcwd strdup strerror memmove
5124do
5125echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005126echo "configure:5127: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005127if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005128 echo $ac_n "(cached) $ac_c" 1>&6
5129else
5130 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005131#line 5132 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005132#include "confdefs.h"
5133/* System header to define __stub macros and hopefully few prototypes,
5134 which can conflict with char $ac_func(); below. */
5135#include <assert.h>
5136/* Override any gcc2 internal prototype to avoid an error. */
5137/* We use char because int might match the return type of a gcc2
5138 builtin and then its argument prototype would still apply. */
5139char $ac_func();
5140
5141int main() {
5142
5143/* The GNU C library defines this for functions which it implements
5144 to always fail with ENOSYS. Some functions are actually named
5145 something starting with __ and the normal name is an alias. */
5146#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5147choke me
5148#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005149$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005150#endif
5151
5152; return 0; }
5153EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005154if { (eval echo configure:5155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005155 rm -rf conftest*
5156 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005157else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005158 echo "configure: failed program was:" >&5
5159 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005160 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005161 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005162fi
5163rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005164fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005165
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005166if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005167 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005168 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5169 cat >> confdefs.h <<EOF
5170#define $ac_tr_func 1
5171EOF
5172
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005173else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005174 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005175LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005176fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005177done
5178
Guido van Rossumf78abae1997-01-21 22:02:36 +00005179
Thomas Wouters3a584202000-08-05 23:28:51 +00005180for ac_func in getpgrp
5181do
5182echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005183echo "configure:5184: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005184if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005185 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005186else
5187 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005188#line 5189 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005189#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005190/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005191 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005192#include <assert.h>
5193/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005194/* We use char because int might match the return type of a gcc2
5195 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005196char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005197
Guido van Rossumf78abae1997-01-21 22:02:36 +00005198int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005199
Guido van Rossum627b2d71993-12-24 10:39:16 +00005200/* The GNU C library defines this for functions which it implements
5201 to always fail with ENOSYS. Some functions are actually named
5202 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005203#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005204choke me
5205#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005206$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005207#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005208
5209; return 0; }
5210EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005211if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005212 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005213 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005214else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005215 echo "configure: failed program was:" >&5
5216 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005217 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005218 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005219fi
5220rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005221fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005222
Thomas Wouters3a584202000-08-05 23:28:51 +00005223if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005224 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005225 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5226 cat >> confdefs.h <<EOF
5227#define $ac_tr_func 1
5228EOF
5229 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005230#line 5231 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005231#include "confdefs.h"
5232#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005233int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005234getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005235; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005236EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005237if { (eval echo configure:5238: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005238 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005239 cat >> confdefs.h <<\EOF
5240#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005241EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005242
Guido van Rossumf78abae1997-01-21 22:02:36 +00005243else
5244 echo "configure: failed program was:" >&5
5245 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005246fi
5247rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005248else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005249 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005250fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005251done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005252
Thomas Wouters3a584202000-08-05 23:28:51 +00005253for ac_func in setpgrp
5254do
5255echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005256echo "configure:5257: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005257if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005258 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005259else
5260 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005261#line 5262 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005262#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005263/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005264 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005265#include <assert.h>
5266/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005267/* We use char because int might match the return type of a gcc2
5268 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005269char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005270
Guido van Rossumf78abae1997-01-21 22:02:36 +00005271int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005272
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005273/* The GNU C library defines this for functions which it implements
5274 to always fail with ENOSYS. Some functions are actually named
5275 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005276#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005277choke me
5278#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005279$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005280#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005281
5282; return 0; }
5283EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005284if { (eval echo configure:5285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005285 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005286 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005287else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005288 echo "configure: failed program was:" >&5
5289 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005290 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005291 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005292fi
5293rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005294fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005295
Thomas Wouters3a584202000-08-05 23:28:51 +00005296if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005297 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005298 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5299 cat >> confdefs.h <<EOF
5300#define $ac_tr_func 1
5301EOF
5302 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005303#line 5304 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005304#include "confdefs.h"
5305#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005306int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005307setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005308; return 0; }
5309EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005310if { (eval echo configure:5311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005311 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005312 cat >> confdefs.h <<\EOF
5313#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005314EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005315
Guido van Rossumf78abae1997-01-21 22:02:36 +00005316else
5317 echo "configure: failed program was:" >&5
5318 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005319fi
5320rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005321else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005322 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005323fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005324done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005325
Thomas Wouters3a584202000-08-05 23:28:51 +00005326for ac_func in gettimeofday
5327do
5328echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005329echo "configure:5330: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005330if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005331 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005332else
5333 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005334#line 5335 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005335#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005336/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005337 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005338#include <assert.h>
5339/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005340/* We use char because int might match the return type of a gcc2
5341 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005342char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005343
Guido van Rossumf78abae1997-01-21 22:02:36 +00005344int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005345
5346/* The GNU C library defines this for functions which it implements
5347 to always fail with ENOSYS. Some functions are actually named
5348 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005349#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005350choke me
5351#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005352$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005353#endif
5354
5355; return 0; }
5356EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005357if { (eval echo configure:5358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005358 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005359 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005360else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005361 echo "configure: failed program was:" >&5
5362 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005363 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005364 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005365fi
5366rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005367fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005368
Thomas Wouters3a584202000-08-05 23:28:51 +00005369if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005370 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005371 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5372 cat >> confdefs.h <<EOF
5373#define $ac_tr_func 1
5374EOF
5375 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005376#line 5377 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005377#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005378#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005379int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005380gettimeofday((struct timeval*)0,(struct timezone*)0);
5381; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005382EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005383if { (eval echo configure:5384: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005384 :
5385else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005386 echo "configure: failed program was:" >&5
5387 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005388 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005389 cat >> confdefs.h <<\EOF
5390#define GETTIMEOFDAY_NO_TZ 1
5391EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005392
5393fi
5394rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005395else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005396 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005397fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005398done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005399
5400
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005401for ac_func in getaddrinfo
5402do
5403echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005404echo "configure:5405: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005405if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5406 echo $ac_n "(cached) $ac_c" 1>&6
5407else
5408 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005409#line 5410 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005410#include "confdefs.h"
5411/* System header to define __stub macros and hopefully few prototypes,
5412 which can conflict with char $ac_func(); below. */
5413#include <assert.h>
5414/* Override any gcc2 internal prototype to avoid an error. */
5415/* We use char because int might match the return type of a gcc2
5416 builtin and then its argument prototype would still apply. */
5417char $ac_func();
5418
5419int main() {
5420
5421/* The GNU C library defines this for functions which it implements
5422 to always fail with ENOSYS. Some functions are actually named
5423 something starting with __ and the normal name is an alias. */
5424#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5425choke me
5426#else
5427$ac_func();
5428#endif
5429
5430; return 0; }
5431EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005432if { (eval echo configure:5433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005433 rm -rf conftest*
5434 eval "ac_cv_func_$ac_func=yes"
5435else
5436 echo "configure: failed program was:" >&5
5437 cat conftest.$ac_ext >&5
5438 rm -rf conftest*
5439 eval "ac_cv_func_$ac_func=no"
5440fi
5441rm -f conftest*
5442fi
5443
5444if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5445 echo "$ac_t""yes" 1>&6
5446 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5447 cat >> confdefs.h <<EOF
5448#define $ac_tr_func 1
5449EOF
5450 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005451echo "configure:5452: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005452if test "$cross_compiling" = yes; then
5453 echo "$ac_t""buggy" 1>&6
5454buggygetaddrinfo=yes
5455else
5456 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005457#line 5458 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005458#include "confdefs.h"
5459
5460#include <sys/types.h>
5461#include <netdb.h>
5462#include <string.h>
5463#include <sys/socket.h>
5464#include <netinet/in.h>
5465
5466main()
5467{
5468 int passive, gaierr, inet4 = 0, inet6 = 0;
5469 struct addrinfo hints, *ai, *aitop;
5470 char straddr[INET6_ADDRSTRLEN], strport[16];
5471
5472 for (passive = 0; passive <= 1; passive++) {
5473 memset(&hints, 0, sizeof(hints));
5474 hints.ai_family = AF_UNSPEC;
5475 hints.ai_flags = passive ? AI_PASSIVE : 0;
5476 hints.ai_socktype = SOCK_STREAM;
5477 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5478 (void)gai_strerror(gaierr);
5479 goto bad;
5480 }
5481 for (ai = aitop; ai; ai = ai->ai_next) {
5482 if (ai->ai_addr == NULL ||
5483 ai->ai_addrlen == 0 ||
5484 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5485 straddr, sizeof(straddr), strport, sizeof(strport),
5486 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5487 goto bad;
5488 }
5489 switch (ai->ai_family) {
5490 case AF_INET:
5491 if (strcmp(strport, "54321") != 0) {
5492 goto bad;
5493 }
5494 if (passive) {
5495 if (strcmp(straddr, "0.0.0.0") != 0) {
5496 goto bad;
5497 }
5498 } else {
5499 if (strcmp(straddr, "127.0.0.1") != 0) {
5500 goto bad;
5501 }
5502 }
5503 inet4++;
5504 break;
5505 case AF_INET6:
5506 if (strcmp(strport, "54321") != 0) {
5507 goto bad;
5508 }
5509 if (passive) {
5510 if (strcmp(straddr, "::") != 0) {
5511 goto bad;
5512 }
5513 } else {
5514 if (strcmp(straddr, "::1") != 0) {
5515 goto bad;
5516 }
5517 }
5518 inet6++;
5519 break;
5520 case AF_UNSPEC:
5521 goto bad;
5522 break;
5523 default:
5524 /* another family support? */
5525 break;
5526 }
5527 }
5528 }
5529
5530 if (!(inet4 == 0 || inet4 == 2))
5531 goto bad;
5532 if (!(inet6 == 0 || inet6 == 2))
5533 goto bad;
5534
5535 if (aitop)
5536 freeaddrinfo(aitop);
5537 exit(0);
5538
5539 bad:
5540 if (aitop)
5541 freeaddrinfo(aitop);
5542 exit(1);
5543}
5544
5545EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005546if { (eval echo configure:5547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005547then
5548 echo "$ac_t""good" 1>&6
5549buggygetaddrinfo=no
5550else
5551 echo "configure: failed program was:" >&5
5552 cat conftest.$ac_ext >&5
5553 rm -fr conftest*
5554 echo "$ac_t""buggy" 1>&6
5555buggygetaddrinfo=yes
5556fi
5557rm -fr conftest*
5558fi
5559
5560else
5561 echo "$ac_t""no" 1>&6
5562buggygetaddrinfo=yes
5563fi
5564done
5565
5566
5567if test "$buggygetaddrinfo" = "yes"; then
5568 if test "$ipv6" = "yes"; then
5569 echo 'Fatal: You must get working getaddrinfo() function.'
5570 echo ' or you can specify "--disable-ipv6"'.
5571 exit 1
5572 fi
5573fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005574for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005575do
5576echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005577echo "configure:5578: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005578if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5579 echo $ac_n "(cached) $ac_c" 1>&6
5580else
5581 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005582#line 5583 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005583#include "confdefs.h"
5584/* System header to define __stub macros and hopefully few prototypes,
5585 which can conflict with char $ac_func(); below. */
5586#include <assert.h>
5587/* Override any gcc2 internal prototype to avoid an error. */
5588/* We use char because int might match the return type of a gcc2
5589 builtin and then its argument prototype would still apply. */
5590char $ac_func();
5591
5592int main() {
5593
5594/* The GNU C library defines this for functions which it implements
5595 to always fail with ENOSYS. Some functions are actually named
5596 something starting with __ and the normal name is an alias. */
5597#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5598choke me
5599#else
5600$ac_func();
5601#endif
5602
5603; return 0; }
5604EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005605if { (eval echo configure:5606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005606 rm -rf conftest*
5607 eval "ac_cv_func_$ac_func=yes"
5608else
5609 echo "configure: failed program was:" >&5
5610 cat conftest.$ac_ext >&5
5611 rm -rf conftest*
5612 eval "ac_cv_func_$ac_func=no"
5613fi
5614rm -f conftest*
5615fi
5616
5617if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5618 echo "$ac_t""yes" 1>&6
5619 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5620 cat >> confdefs.h <<EOF
5621#define $ac_tr_func 1
5622EOF
5623
5624else
5625 echo "$ac_t""no" 1>&6
5626fi
5627done
5628
5629
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005630# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005631echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005632echo "configure:5633: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005633if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005634 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005635else
5636 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005637#line 5638 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005638#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005639#include <sys/types.h>
5640#include <sys/time.h>
5641#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005642int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005643struct tm *tp;
5644; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005645EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005646if { (eval echo configure:5647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005647 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005648 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005649else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005650 echo "configure: failed program was:" >&5
5651 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005652 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005653 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005654fi
5655rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005656fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005657
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005658echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005659if test $ac_cv_header_time = yes; then
5660 cat >> confdefs.h <<\EOF
5661#define TIME_WITH_SYS_TIME 1
5662EOF
5663
5664fi
5665
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005666echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005667echo "configure:5668: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005668if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005669 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005670else
5671 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005672#line 5673 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005673#include "confdefs.h"
5674#include <sys/types.h>
5675#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005676int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005677struct tm *tp; tp->tm_sec;
5678; return 0; }
5679EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005680if { (eval echo configure:5681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005681 rm -rf conftest*
5682 ac_cv_struct_tm=time.h
5683else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005684 echo "configure: failed program was:" >&5
5685 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005686 rm -rf conftest*
5687 ac_cv_struct_tm=sys/time.h
5688fi
5689rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005690fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005691
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005692echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005693if test $ac_cv_struct_tm = sys/time.h; then
5694 cat >> confdefs.h <<\EOF
5695#define TM_IN_SYS_TIME 1
5696EOF
5697
5698fi
5699
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005700echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005701echo "configure:5702: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005702if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005703 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005704else
5705 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005706#line 5707 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005707#include "confdefs.h"
5708#include <sys/types.h>
5709#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005710int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005711struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005712; return 0; }
5713EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005714if { (eval echo configure:5715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005715 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005716 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005717else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005718 echo "configure: failed program was:" >&5
5719 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005720 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005721 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005722fi
5723rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005724fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005725
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005726echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5727if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005728 cat >> confdefs.h <<\EOF
5729#define HAVE_TM_ZONE 1
5730EOF
5731
5732else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005733 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005734echo "configure:5735: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005735if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005736 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005737else
5738 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005739#line 5740 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005740#include "confdefs.h"
5741#include <time.h>
5742#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005743extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005744#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00005745int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005746atoi(*tzname);
5747; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005748EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005749if { (eval echo configure:5750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005750 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005751 ac_cv_var_tzname=yes
5752else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005753 echo "configure: failed program was:" >&5
5754 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005755 rm -rf conftest*
5756 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005757fi
5758rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005759fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005760
5761echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005762 if test $ac_cv_var_tzname = yes; then
5763 cat >> confdefs.h <<\EOF
5764#define HAVE_TZNAME 1
5765EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005766
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005767 fi
5768fi
5769
5770
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005771echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005772echo "configure:5773: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005773if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005774 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005775else
5776 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005777#line 5778 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005778#include "confdefs.h"
5779#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005780int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005781return altzone;
5782; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005783EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005784if { (eval echo configure:5785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005785 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005786 ac_cv_header_time_altzone=yes
5787else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005788 echo "configure: failed program was:" >&5
5789 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005790 rm -rf conftest*
5791 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005792fi
5793rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005794fi
5795
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005796echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005797if test $ac_cv_header_time_altzone = yes; then
5798 cat >> confdefs.h <<\EOF
5799#define HAVE_ALTZONE 1
5800EOF
5801
5802fi
5803
Guido van Rossumda88dad1995-01-26 00:46:29 +00005804was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005805echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005806echo "configure:5807: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005807cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005808#line 5809 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005809#include "confdefs.h"
5810
5811#include <sys/types.h>
5812#include <sys/select.h>
5813#include <sys/time.h>
5814
Guido van Rossumf78abae1997-01-21 22:02:36 +00005815int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005816;
5817; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005818EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005819if { (eval echo configure:5820: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005820 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005821 cat >> confdefs.h <<\EOF
5822#define SYS_SELECT_WITH_SYS_TIME 1
5823EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005824 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005825else
5826 echo "configure: failed program was:" >&5
5827 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005828fi
5829rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005830echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005831
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005832echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005833echo "configure:5834: checking for addrinfo" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005834if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
5835 echo $ac_n "(cached) $ac_c" 1>&6
5836else
5837 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005838#line 5839 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005839#include "confdefs.h"
5840
5841# include <netdb.h>
5842int main() {
5843struct addrinfo a
5844; return 0; }
5845EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005846if { (eval echo configure:5847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005847 rm -rf conftest*
5848 ac_cv_struct_addrinfo=yes
5849else
5850 echo "configure: failed program was:" >&5
5851 cat conftest.$ac_ext >&5
5852 rm -rf conftest*
5853 ac_cv_struct_addrinfo=no
5854fi
5855rm -f conftest*
5856fi
5857
5858echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
5859if test $ac_cv_struct_addrinfo = yes; then
5860 cat >> confdefs.h <<\EOF
5861#define HAVE_ADDRINFO 1
5862EOF
5863
5864fi
5865
5866echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005867echo "configure:5868: checking for sockaddr_storage" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005868if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
5869 echo $ac_n "(cached) $ac_c" 1>&6
5870else
5871 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005872#line 5873 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005873#include "confdefs.h"
5874
5875# include <sys/types.h>
5876# include <sys/socket.h>
5877int main() {
5878struct sockaddr_storage s
5879; return 0; }
5880EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005881if { (eval echo configure:5882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005882 rm -rf conftest*
5883 ac_cv_struct_sockaddr_storage=yes
5884else
5885 echo "configure: failed program was:" >&5
5886 cat conftest.$ac_ext >&5
5887 rm -rf conftest*
5888 ac_cv_struct_sockaddr_storage=no
5889fi
5890rm -f conftest*
5891fi
5892
5893echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
5894if test $ac_cv_struct_sockaddr_storage = yes; then
5895 cat >> confdefs.h <<\EOF
5896#define HAVE_SOCKADDR_STORAGE 1
5897EOF
5898
5899fi
5900
Guido van Rossum627b2d71993-12-24 10:39:16 +00005901# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00005902
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005903echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005904echo "configure:5905: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005905if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005906 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005907else
5908 if test "$GCC" = yes; then
5909 # GCC predefines this symbol on systems where it applies.
5910cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005911#line 5912 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005912#include "confdefs.h"
5913#ifdef __CHAR_UNSIGNED__
5914 yes
5915#endif
5916
5917EOF
5918if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5919 egrep "yes" >/dev/null 2>&1; then
5920 rm -rf conftest*
5921 ac_cv_c_char_unsigned=yes
5922else
5923 rm -rf conftest*
5924 ac_cv_c_char_unsigned=no
5925fi
5926rm -f conftest*
5927
5928else
5929if test "$cross_compiling" = yes; then
5930 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5931else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005932 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005933#line 5934 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005934#include "confdefs.h"
5935/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005936#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005937#define volatile
5938#endif
5939main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005940 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005941}
5942EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005943if { (eval echo configure:5944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00005944then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005945 ac_cv_c_char_unsigned=yes
5946else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005947 echo "configure: failed program was:" >&5
5948 cat conftest.$ac_ext >&5
5949 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005950 ac_cv_c_char_unsigned=no
5951fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005952rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005953fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005954
5955fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005956fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005957
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005958echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005959if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5960 cat >> confdefs.h <<\EOF
5961#define __CHAR_UNSIGNED__ 1
5962EOF
5963
5964fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005965
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005966echo $ac_n "checking for working const""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005967echo "configure:5968: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005968if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005969 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005970else
5971 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00005972#line 5973 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005973#include "confdefs.h"
5974
Guido van Rossumf78abae1997-01-21 22:02:36 +00005975int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005976
5977/* Ultrix mips cc rejects this. */
Martin v. Löwis9db2f572001-07-23 01:30:10 +00005978typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005979/* SunOS 4.1.1 cc rejects this. */
5980char const *const *ccp;
5981char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005982/* NEC SVR4.0.2 mips cc rejects this. */
5983struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005984static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005985/* AIX XL C 1.02.0.0 rejects this.
5986 It does not let you subtract one const X* pointer from another in an arm
5987 of an if-expression whose if-part is not a constant expression */
5988const char *g = "string";
5989ccp = &g + (g ? g-g : 0);
5990/* HPUX 7.0 cc rejects these. */
5991++ccp;
5992p = (char**) ccp;
5993ccp = (char const *const *) p;
5994{ /* SCO 3.2v4 cc rejects this. */
5995 char *t;
5996 char const *s = 0 ? (char *) 0 : (char const *) 0;
5997
5998 *t++ = 0;
5999}
6000{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006001 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00006002 const int *foo = &x[0];
6003 ++foo;
6004}
6005{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
6006 typedef const int *iptr;
6007 iptr p = 0;
6008 ++p;
6009}
6010{ /* AIX XL C 1.02.0.0 rejects this saying
6011 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
6012 struct s { int j; const int *ap[3]; };
6013 struct s *b; b->j = 5;
6014}
6015{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
6016 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006017}
6018
6019; return 0; }
6020EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006021if { (eval echo configure:6022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006022 rm -rf conftest*
6023 ac_cv_c_const=yes
6024else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006025 echo "configure: failed program was:" >&5
6026 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006027 rm -rf conftest*
6028 ac_cv_c_const=no
6029fi
6030rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006031fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006032
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006033echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006034if test $ac_cv_c_const = no; then
6035 cat >> confdefs.h <<\EOF
6036#define const
6037EOF
6038
6039fi
6040
6041
Guido van Rossumda88dad1995-01-26 00:46:29 +00006042works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006043echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006044echo "configure:6045: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006045cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006046#line 6047 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006047#include "confdefs.h"
6048
Guido van Rossumf78abae1997-01-21 22:02:36 +00006049int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006050volatile int x; x = 0;
6051; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006052EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006053if { (eval echo configure:6054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006054 rm -rf conftest*
6055 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006056else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006057 echo "configure: failed program was:" >&5
6058 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006059 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006060 cat >> confdefs.h <<\EOF
6061#define volatile
6062EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006063
6064fi
6065rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006066echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006067
Guido van Rossumda88dad1995-01-26 00:46:29 +00006068works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006069echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006070echo "configure:6071: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006071cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006072#line 6073 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006073#include "confdefs.h"
6074
Guido van Rossumf78abae1997-01-21 22:02:36 +00006075int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006076signed char c;
6077; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006078EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006079if { (eval echo configure:6080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006080 rm -rf conftest*
6081 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006082else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006083 echo "configure: failed program was:" >&5
6084 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00006085 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006086 cat >> confdefs.h <<\EOF
6087#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00006088EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006089
6090fi
6091rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006092echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006093
Guido van Rossumda88dad1995-01-26 00:46:29 +00006094have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006095echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006096echo "configure:6097: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006097cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006098#line 6099 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006099#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006100int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00006101int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006102return foo(10);
6103; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006104EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006105if { (eval echo configure:6106: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006106 rm -rf conftest*
6107 cat >> confdefs.h <<\EOF
6108#define HAVE_PROTOTYPES 1
6109EOF
6110 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006111else
6112 echo "configure: failed program was:" >&5
6113 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006114fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006115rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006116echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006117
Guido van Rossumda88dad1995-01-26 00:46:29 +00006118works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006119echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006120echo "configure:6121: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006121cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006122#line 6123 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006123#include "confdefs.h"
6124
6125#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00006126int foo(int x, ...) {
6127 va_list va;
6128 va_start(va, x);
6129 va_arg(va, int);
6130 va_arg(va, char *);
6131 va_arg(va, double);
6132 return 0;
6133}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006134
Guido van Rossumf78abae1997-01-21 22:02:36 +00006135int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00006136return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006137; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006138EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006139if { (eval echo configure:6140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006140 rm -rf conftest*
6141 cat >> confdefs.h <<\EOF
6142#define HAVE_STDARG_PROTOTYPES 1
6143EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006144 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006145else
6146 echo "configure: failed program was:" >&5
6147 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006148fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006149rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006150echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006151
Guido van Rossumda88dad1995-01-26 00:46:29 +00006152if test "$have_prototypes" = yes; then
6153bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006154echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006155echo "configure:6156: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006156cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006157#line 6158 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006158#include "confdefs.h"
6159#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00006160int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006161char **t;execve("@",t,t);
6162; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006163EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006164if { (eval echo configure:6165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006165 :
6166else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006167 echo "configure: failed program was:" >&5
6168 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006169 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006170 cat >> confdefs.h <<\EOF
6171#define BAD_EXEC_PROTOTYPES 1
6172EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006173 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006174fi
6175rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006176echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006177fi
6178
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006179# check if sockaddr has sa_len member
6180echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006181echo "configure:6182: checking if sockaddr has sa_len member" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006182cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006183#line 6184 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006184#include "confdefs.h"
6185#include <sys/types.h>
6186#include <sys/socket.h>
6187int main() {
6188struct sockaddr x;
6189x.sa_len = 0;
6190; return 0; }
6191EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006192if { (eval echo configure:6193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006193 rm -rf conftest*
6194 echo "$ac_t""yes" 1>&6
6195 cat >> confdefs.h <<\EOF
6196#define HAVE_SOCKADDR_SA_LEN 1
6197EOF
6198
6199else
6200 echo "configure: failed program was:" >&5
6201 cat conftest.$ac_ext >&5
6202 rm -rf conftest*
6203 echo "$ac_t""no" 1>&6
6204fi
6205rm -f conftest*
6206
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006207echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006208echo "configure:6209: checking for bad static forward" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006209if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
6210 echo $ac_n "(cached) $ac_c" 1>&6
6211else
6212 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006213 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006214else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006215 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006216#line 6217 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006217#include "confdefs.h"
6218
6219struct s { int a; int b; };
6220static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006221int foobar() {
6222 static int random;
6223 random = (int) &foo;
6224 return random;
6225}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006226static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006227main() {
6228 exit(!((int)&foo == foobar()));
6229}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006230EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006231if { (eval echo configure:6232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumf78abae1997-01-21 22:02:36 +00006232then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006233 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006234else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006235 echo "configure: failed program was:" >&5
6236 cat conftest.$ac_ext >&5
6237 rm -fr conftest*
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006238 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006239fi
6240rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006241fi
6242
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006243fi
6244
6245echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
6246if test "$ac_cv_bad_static_forward" = yes
6247then
6248 cat >> confdefs.h <<\EOF
6249#define BAD_STATIC_FORWARD 1
6250EOF
6251
6252fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006253
Guido van Rossumda88dad1995-01-26 00:46:29 +00006254va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006255echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006256echo "configure:6257: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006257cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006258#line 6259 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006259#include "confdefs.h"
6260
6261#ifdef HAVE_STDARG_PROTOTYPES
6262#include <stdarg.h>
6263#else
6264#include <varargs.h>
6265#endif
6266
Guido van Rossumf78abae1997-01-21 22:02:36 +00006267int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006268va_list list1, list2; list1 = list2;
6269; return 0; }
6270EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006271if { (eval echo configure:6272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006272 :
6273else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006274 echo "configure: failed program was:" >&5
6275 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006276 rm -rf conftest*
6277 cat >> confdefs.h <<\EOF
6278#define VA_LIST_IS_ARRAY 1
6279EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006280 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006281fi
6282rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006283echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006284
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006285# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
6286echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006287echo "configure:6288: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006288if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006289 echo $ac_n "(cached) $ac_c" 1>&6
6290else
6291 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006292#line 6293 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006293#include "confdefs.h"
6294/* System header to define __stub macros and hopefully few prototypes,
6295 which can conflict with char gethostbyname_r(); below. */
6296#include <assert.h>
6297/* Override any gcc2 internal prototype to avoid an error. */
6298/* We use char because int might match the return type of a gcc2
6299 builtin and then its argument prototype would still apply. */
6300char gethostbyname_r();
6301
6302int main() {
6303
6304/* The GNU C library defines this for functions which it implements
6305 to always fail with ENOSYS. Some functions are actually named
6306 something starting with __ and the normal name is an alias. */
6307#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6308choke me
6309#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006310gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006311#endif
6312
6313; return 0; }
6314EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006315if { (eval echo configure:6316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006316 rm -rf conftest*
6317 eval "ac_cv_func_gethostbyname_r=yes"
6318else
6319 echo "configure: failed program was:" >&5
6320 cat conftest.$ac_ext >&5
6321 rm -rf conftest*
6322 eval "ac_cv_func_gethostbyname_r=no"
6323fi
6324rm -f conftest*
6325fi
6326
6327if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6328 echo "$ac_t""yes" 1>&6
6329
6330 cat >> confdefs.h <<\EOF
6331#define HAVE_GETHOSTBYNAME_R 1
6332EOF
6333
6334 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006335echo "configure:6336: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006336 OLD_CFLAGS=$CFLAGS
6337 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
6338 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006339#line 6340 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006340#include "confdefs.h"
6341
6342# include <netdb.h>
6343
6344int main() {
6345
6346 char *name;
6347 struct hostent *he, *res;
6348 char buffer[2048];
6349 int buflen = 2048;
6350 int h_errnop;
6351
6352 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
6353
6354; return 0; }
6355EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006356if { (eval echo configure:6357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006357 rm -rf conftest*
6358
6359 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006360#define HAVE_GETHOSTBYNAME_R 1
6361EOF
6362
6363 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006364#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6365EOF
6366
6367 echo "$ac_t""yes" 1>&6
6368
6369else
6370 echo "configure: failed program was:" >&5
6371 cat conftest.$ac_ext >&5
6372 rm -rf conftest*
6373
6374 echo "$ac_t""no" 1>&6
6375 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006376echo "configure:6377: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006377 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006378#line 6379 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006379#include "confdefs.h"
6380
6381# include <netdb.h>
6382
6383int main() {
6384
6385 char *name;
6386 struct hostent *he;
6387 char buffer[2048];
6388 int buflen = 2048;
6389 int h_errnop;
6390
6391 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
6392
6393; return 0; }
6394EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006395if { (eval echo configure:6396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006396 rm -rf conftest*
6397
6398 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006399#define HAVE_GETHOSTBYNAME_R 1
6400EOF
6401
6402 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006403#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6404EOF
6405
6406 echo "$ac_t""yes" 1>&6
6407
6408else
6409 echo "configure: failed program was:" >&5
6410 cat conftest.$ac_ext >&5
6411 rm -rf conftest*
6412
6413 echo "$ac_t""no" 1>&6
6414 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006415echo "configure:6416: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006416 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006417#line 6418 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006418#include "confdefs.h"
6419
6420# include <netdb.h>
6421
6422int main() {
6423
6424 char *name;
6425 struct hostent *he;
6426 struct hostent_data data;
6427
6428 (void) gethostbyname_r(name, he, &data);
6429
6430; return 0; }
6431EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006432if { (eval echo configure:6433: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006433 rm -rf conftest*
6434
6435 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006436#define HAVE_GETHOSTBYNAME_R 1
6437EOF
6438
6439 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006440#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6441EOF
6442
6443 echo "$ac_t""yes" 1>&6
6444
6445else
6446 echo "configure: failed program was:" >&5
6447 cat conftest.$ac_ext >&5
6448 rm -rf conftest*
6449
6450 echo "$ac_t""no" 1>&6
6451
6452fi
6453rm -f conftest*
6454
6455fi
6456rm -f conftest*
6457
6458fi
6459rm -f conftest*
6460 CFLAGS=$OLD_CFLAGS
6461
6462else
6463 echo "$ac_t""no" 1>&6
6464
Thomas Wouters3a584202000-08-05 23:28:51 +00006465 for ac_func in gethostbyname
6466do
6467echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006468echo "configure:6469: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006469if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006470 echo $ac_n "(cached) $ac_c" 1>&6
6471else
6472 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006473#line 6474 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006474#include "confdefs.h"
6475/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00006476 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006477#include <assert.h>
6478/* Override any gcc2 internal prototype to avoid an error. */
6479/* We use char because int might match the return type of a gcc2
6480 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006481char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006482
6483int main() {
6484
6485/* The GNU C library defines this for functions which it implements
6486 to always fail with ENOSYS. Some functions are actually named
6487 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006488#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006489choke me
6490#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006491$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006492#endif
6493
6494; return 0; }
6495EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006496if { (eval echo configure:6497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006497 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006498 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006499else
6500 echo "configure: failed program was:" >&5
6501 cat conftest.$ac_ext >&5
6502 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006503 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006504fi
6505rm -f conftest*
6506fi
6507
Thomas Wouters3a584202000-08-05 23:28:51 +00006508if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006509 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00006510 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6511 cat >> confdefs.h <<EOF
6512#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006513EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00006514
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006515else
6516 echo "$ac_t""no" 1>&6
6517fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006518done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006519
6520
6521fi
6522
6523
6524
6525
6526
6527
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006528
Guido van Rossum627b2d71993-12-24 10:39:16 +00006529# checks for system services
6530# (none yet)
6531
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006532# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006533echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006534echo "configure:6535: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006535if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006536 echo $ac_n "(cached) $ac_c" 1>&6
6537else
6538 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006539#line 6540 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006540#include "confdefs.h"
6541/* System header to define __stub macros and hopefully few prototypes,
6542 which can conflict with char __fpu_control(); below. */
6543#include <assert.h>
6544/* Override any gcc2 internal prototype to avoid an error. */
6545/* We use char because int might match the return type of a gcc2
6546 builtin and then its argument prototype would still apply. */
6547char __fpu_control();
6548
6549int main() {
6550
6551/* The GNU C library defines this for functions which it implements
6552 to always fail with ENOSYS. Some functions are actually named
6553 something starting with __ and the normal name is an alias. */
6554#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6555choke me
6556#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006557__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006558#endif
6559
6560; return 0; }
6561EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006562if { (eval echo configure:6563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006563 rm -rf conftest*
6564 eval "ac_cv_func___fpu_control=yes"
6565else
6566 echo "configure: failed program was:" >&5
6567 cat conftest.$ac_ext >&5
6568 rm -rf conftest*
6569 eval "ac_cv_func___fpu_control=no"
6570fi
6571rm -f conftest*
6572fi
6573
6574if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6575 echo "$ac_t""yes" 1>&6
6576 :
6577else
6578 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006579echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006580echo "configure:6581: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00006581ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006582if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006583 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006584else
6585 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006586LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006587cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006588#line 6589 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006589#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006590/* Override any gcc2 internal prototype to avoid an error. */
6591/* We use char because int might match the return type of a gcc2
6592 builtin and then its argument prototype would still apply. */
6593char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00006594
Guido van Rossumf78abae1997-01-21 22:02:36 +00006595int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006596__fpu_control()
6597; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006598EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006599if { (eval echo configure:6600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006600 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006601 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006602else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006603 echo "configure: failed program was:" >&5
6604 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006605 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006606 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006607fi
6608rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006609LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006610
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006611fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006612if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006613 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006614 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6615 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006616 cat >> confdefs.h <<EOF
6617#define $ac_tr_lib 1
6618EOF
6619
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006620 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006621
6622else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006623 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006624fi
6625
6626
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006627fi
6628
6629
Guido van Rossum7f253911997-05-09 02:42:48 +00006630# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00006631echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006632echo "configure:6633: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006633# Check whether --with-fpectl or --without-fpectl was given.
6634if test "${with_fpectl+set}" = set; then
6635 withval="$with_fpectl"
6636
6637if test "$withval" != no
6638then cat >> confdefs.h <<\EOF
6639#define WANT_SIGFPE_HANDLER 1
6640EOF
6641 echo "$ac_t""yes" 1>&6
6642else echo "$ac_t""no" 1>&6
6643fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006644else
6645 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006646fi
6647
6648
Guido van Rossum7f43da71994-08-01 12:15:30 +00006649# check for --with-libm=...
6650
Guido van Rossum563e7081996-09-10 18:20:48 +00006651case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006652Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006653BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006654*) LIBM=-lm
6655esac
Guido van Rossum7f253911997-05-09 02:42:48 +00006656echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006657echo "configure:6658: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006658# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006659if test "${with_libm+set}" = set; then
6660 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006661
Guido van Rossum7f253911997-05-09 02:42:48 +00006662if test "$withval" = no
6663then LIBM=
6664 echo "$ac_t""force LIBM empty" 1>&6
6665elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006666then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006667 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006668else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006669fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006670else
6671 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006672fi
6673
6674
6675# check for --with-libc=...
6676
Guido van Rossum7f253911997-05-09 02:42:48 +00006677echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006678echo "configure:6679: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006679# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006680if test "${with_libc+set}" = set; then
6681 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006682
Guido van Rossum7f253911997-05-09 02:42:48 +00006683if test "$withval" = no
6684then LIBC=
6685 echo "$ac_t""force LIBC empty" 1>&6
6686elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006687then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006688 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006689else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006690fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006691else
6692 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006693fi
6694
6695
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006696# check for hypot() in math library
6697LIBS_SAVE=$LIBS
6698LIBS="$LIBS $LIBM"
6699for ac_func in hypot
6700do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006701echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006702echo "configure:6703: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006703if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006704 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006705else
6706 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006707#line 6708 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006708#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006709/* System header to define __stub macros and hopefully few prototypes,
6710 which can conflict with char $ac_func(); below. */
6711#include <assert.h>
6712/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006713/* We use char because int might match the return type of a gcc2
6714 builtin and then its argument prototype would still apply. */
6715char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006716
Guido van Rossumf78abae1997-01-21 22:02:36 +00006717int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006718
6719/* The GNU C library defines this for functions which it implements
6720 to always fail with ENOSYS. Some functions are actually named
6721 something starting with __ and the normal name is an alias. */
6722#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6723choke me
6724#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006725$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006726#endif
6727
6728; return 0; }
6729EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006730if { (eval echo configure:6731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006731 rm -rf conftest*
6732 eval "ac_cv_func_$ac_func=yes"
6733else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006734 echo "configure: failed program was:" >&5
6735 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006736 rm -rf conftest*
6737 eval "ac_cv_func_$ac_func=no"
6738fi
6739rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006740fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00006741
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006742if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6743 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006744 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6745 cat >> confdefs.h <<EOF
6746#define $ac_tr_func 1
6747EOF
6748
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006749else
6750 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006751LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006752fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006753done
6754
Guido van Rossumf78abae1997-01-21 22:02:36 +00006755
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006756LIBS=$LIBS_SAVE
6757
Guido van Rossumad713701997-07-10 22:42:38 +00006758# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00006759echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006760echo "configure:6761: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006761if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00006762 echo $ac_n "(cached) $ac_c" 1>&6
6763else
6764 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006765 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +00006766else
6767 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006768#line 6769 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006769#include "confdefs.h"
6770#include <stdio.h>
6771#ifdef HAVE_STDLIB
6772#include <stdlib.h>
6773#else
6774char *malloc(), *realloc();
6775int *free();
6776#endif
6777main() {
6778 char *p;
6779 p = malloc(0);
6780 if (p == NULL) exit(1);
6781 p = realloc(p, 0);
6782 if (p == NULL) exit(1);
6783 free(p);
6784 exit(0);
6785}
6786EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006787if { (eval echo configure:6788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumad713701997-07-10 22:42:38 +00006788then
6789 ac_cv_malloc_zero=nonnull
6790else
6791 echo "configure: failed program was:" >&5
6792 cat conftest.$ac_ext >&5
6793 rm -fr conftest*
6794 ac_cv_malloc_zero=null
6795fi
6796rm -fr conftest*
6797fi
6798
6799fi
Guido van Rossum3065c942001-09-17 04:03:14 +00006800 # XXX arm cross-compile?
Guido van Rossumad713701997-07-10 22:42:38 +00006801echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6802if test "$ac_cv_malloc_zero" = null
6803then
6804 cat >> confdefs.h <<\EOF
6805#define MALLOC_ZERO_RETURNS_NULL 1
6806EOF
6807
6808fi
6809
Guido van Rossumef2255b2000-03-10 22:30:29 +00006810# check for wchar.h
6811ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6812echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006813echo "configure:6814: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006814if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006815 echo $ac_n "(cached) $ac_c" 1>&6
6816else
6817 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006818#line 6819 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006819#include "confdefs.h"
6820#include <wchar.h>
6821EOF
6822ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006823{ (eval echo configure:6824: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006824ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6825if test -z "$ac_err"; then
6826 rm -rf conftest*
6827 eval "ac_cv_header_$ac_safe=yes"
6828else
6829 echo "$ac_err" >&5
6830 echo "configure: failed program was:" >&5
6831 cat conftest.$ac_ext >&5
6832 rm -rf conftest*
6833 eval "ac_cv_header_$ac_safe=no"
6834fi
6835rm -f conftest*
6836fi
6837if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6838 echo "$ac_t""yes" 1>&6
6839 cat >> confdefs.h <<\EOF
6840#define HAVE_WCHAR_H 1
6841EOF
6842 wchar_h="yes"
6843else
6844 echo "$ac_t""no" 1>&6
6845wchar_h="no"
6846
6847fi
6848
6849
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006850# determine wchar_t size
6851if test "$wchar_h" = yes
6852then
6853 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006854echo "configure:6855: checking size of wchar_t" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006855if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
6856 echo $ac_n "(cached) $ac_c" 1>&6
6857else
6858 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006859 ac_cv_sizeof_wchar_t=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00006860else
6861 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006862#line 6863 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006863#include "confdefs.h"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006864#include <stdio.h>
6865main()
6866{
6867 FILE *f=fopen("conftestval", "w");
6868 if (!f) exit(1);
6869 fprintf(f, "%d\n", sizeof(wchar_t));
Guido van Rossumef2255b2000-03-10 22:30:29 +00006870 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00006871}
Guido van Rossumef2255b2000-03-10 22:30:29 +00006872EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006873if { (eval echo configure:6874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00006874then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006875 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006876else
6877 echo "configure: failed program was:" >&5
6878 cat conftest.$ac_ext >&5
6879 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006880 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00006881fi
6882rm -fr conftest*
6883fi
6884
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006885fi
6886echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
6887cat >> confdefs.h <<EOF
6888#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
6889EOF
6890
6891
6892fi
6893
6894echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006895echo "configure:6896: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006896# Check whether --enable-unicode or --disable-unicode was given.
6897if test "${enable_unicode+set}" = set; then
6898 enableval="$enable_unicode"
6899 :
6900else
6901 enable_unicode=yes
6902fi
6903
6904
6905if test $enable_unicode = yes
6906then
Martin v. Löwisfd917792001-06-27 20:22:04 +00006907 # Without any arguments, Py_UNICODE defaults to two-byte mode
6908 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006909fi
6910
6911case "$enable_unicode" in
6912ucs2) unicode_size="2"
6913 cat >> confdefs.h <<\EOF
6914#define Py_UNICODE_SIZE 2
6915EOF
6916
6917 ;;
6918ucs4) unicode_size="4"
6919 cat >> confdefs.h <<\EOF
6920#define Py_UNICODE_SIZE 4
6921EOF
6922
6923 ;;
6924esac
6925
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006926
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006927if test "$enable_unicode" = "no"
6928then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006929 UNICODE_OBJS=""
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006930 echo "$ac_t""not used" 1>&6
6931else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006932 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006933 cat >> confdefs.h <<\EOF
6934#define Py_USING_UNICODE 1
6935EOF
6936
6937 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
6938 then
6939 PY_UNICODE_TYPE="wchar_t"
6940 cat >> confdefs.h <<\EOF
6941#define HAVE_USABLE_WCHAR_T 1
6942EOF
6943
6944 cat >> confdefs.h <<\EOF
6945#define PY_UNICODE_TYPE wchar_t
6946EOF
6947
6948 elif test "$ac_cv_sizeof_short" = "$unicode_size"
6949 then
6950 PY_UNICODE_TYPE="unsigned short"
6951 cat >> confdefs.h <<\EOF
6952#define PY_UNICODE_TYPE unsigned short
6953EOF
6954
6955 elif test "$ac_cv_sizeof_long" = "$unicode_size"
6956 then
6957 PY_UNICODE_TYPE="unsigned long"
6958 cat >> confdefs.h <<\EOF
6959#define PY_UNICODE_TYPE unsigned long
6960EOF
6961
6962 else
6963 PY_UNICODE_TYPE="no type found"
6964 fi
6965 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
6966fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006967
6968# check for endianness
6969echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006970echo "configure:6971: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006971if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006972 echo $ac_n "(cached) $ac_c" 1>&6
6973else
6974 ac_cv_c_bigendian=unknown
6975# See if sys/param.h defines the BYTE_ORDER macro.
6976cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006977#line 6978 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006978#include "confdefs.h"
6979#include <sys/types.h>
6980#include <sys/param.h>
6981int main() {
6982
6983#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6984 bogus endian macros
6985#endif
6986; return 0; }
6987EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006988if { (eval echo configure:6989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006989 rm -rf conftest*
6990 # It does; now see whether it defined to BIG_ENDIAN or not.
6991cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00006992#line 6993 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006993#include "confdefs.h"
6994#include <sys/types.h>
6995#include <sys/param.h>
6996int main() {
6997
6998#if BYTE_ORDER != BIG_ENDIAN
6999 not big endian
7000#endif
7001; return 0; }
7002EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007003if { (eval echo configure:7004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00007004 rm -rf conftest*
7005 ac_cv_c_bigendian=yes
7006else
7007 echo "configure: failed program was:" >&5
7008 cat conftest.$ac_ext >&5
7009 rm -rf conftest*
7010 ac_cv_c_bigendian=no
7011fi
7012rm -f conftest*
7013else
7014 echo "configure: failed program was:" >&5
7015 cat conftest.$ac_ext >&5
7016fi
7017rm -f conftest*
7018if test $ac_cv_c_bigendian = unknown; then
7019if test "$cross_compiling" = yes; then
7020 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
7021else
7022 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007023#line 7024 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00007024#include "confdefs.h"
7025main () {
7026 /* Are we little or big endian? From Harbison&Steele. */
7027 union
7028 {
7029 long l;
7030 char c[sizeof (long)];
7031 } u;
7032 u.l = 1;
7033 exit (u.c[sizeof (long) - 1] == 1);
7034}
7035EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007036if { (eval echo configure:7037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Guido van Rossumef2255b2000-03-10 22:30:29 +00007037then
7038 ac_cv_c_bigendian=no
7039else
7040 echo "configure: failed program was:" >&5
7041 cat conftest.$ac_ext >&5
7042 rm -fr conftest*
7043 ac_cv_c_bigendian=yes
7044fi
7045rm -fr conftest*
7046fi
7047
7048fi
7049fi
7050
7051echo "$ac_t""$ac_cv_c_bigendian" 1>&6
7052if test $ac_cv_c_bigendian = yes; then
7053 cat >> confdefs.h <<\EOF
7054#define WORDS_BIGENDIAN 1
7055EOF
7056
7057fi
7058
7059
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007060# Check whether right shifting a negative integer extends the sign bit
7061# or fills with zeros (like the Cray J90, according to Tim Peters).
7062echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007063echo "configure:7064: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007064if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00007065 echo $ac_n "(cached) $ac_c" 1>&6
7066else
7067
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007068if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007069 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007070else
7071 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007072#line 7073 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007073#include "confdefs.h"
7074
7075int main()
7076{
Vladimir Marangozova6180282000-07-12 05:05:06 +00007077 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007078}
7079
7080EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007081if { (eval echo configure:7082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Vladimir Marangozova6180282000-07-12 05:05:06 +00007082then
7083 ac_cv_rshift_extends_sign=yes
7084else
7085 echo "configure: failed program was:" >&5
7086 cat conftest.$ac_ext >&5
7087 rm -fr conftest*
7088 ac_cv_rshift_extends_sign=no
7089fi
7090rm -fr conftest*
7091fi
7092
7093fi
7094
7095echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
7096if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007097then
7098 cat >> confdefs.h <<\EOF
7099#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
7100EOF
7101
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007102fi
7103
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007104# check for getc_unlocked and related locking functions
7105echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007106echo "configure:7107: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007107if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
7108 echo $ac_n "(cached) $ac_c" 1>&6
7109else
7110
7111cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007112#line 7113 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007113#include "confdefs.h"
7114#include <stdio.h>
7115int main() {
7116
7117 FILE *f = fopen("/dev/null", "r");
7118 flockfile(f);
7119 getc_unlocked(f);
7120 funlockfile(f);
7121
7122; return 0; }
7123EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007124if { (eval echo configure:7125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007125 rm -rf conftest*
7126 ac_cv_have_getc_unlocked=yes
7127else
7128 echo "configure: failed program was:" >&5
7129 cat conftest.$ac_ext >&5
7130 rm -rf conftest*
7131 ac_cv_have_getc_unlocked=no
7132fi
7133rm -f conftest*
7134fi
7135
7136echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
7137if test "$ac_cv_have_getc_unlocked" = yes
7138then
7139 cat >> confdefs.h <<\EOF
7140#define HAVE_GETC_UNLOCKED 1
7141EOF
7142
7143fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007144
Martin v. Löwis0daad592001-09-30 21:09:59 +00007145# check for readline 4.0
7146echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007147echo "configure:7148: checking for rl_pre_input_hook in -lreadline" >&5
Martin v. Löwis0daad592001-09-30 21:09:59 +00007148ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'`
Guido van Rossum353ae582001-07-10 16:45:32 +00007149if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7150 echo $ac_n "(cached) $ac_c" 1>&6
7151else
7152 ac_save_LIBS="$LIBS"
7153LIBS="-lreadline -ltermcap $LIBS"
7154cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007155#line 7156 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00007156#include "confdefs.h"
7157/* Override any gcc2 internal prototype to avoid an error. */
7158/* We use char because int might match the return type of a gcc2
7159 builtin and then its argument prototype would still apply. */
Martin v. Löwis0daad592001-09-30 21:09:59 +00007160char rl_pre_input_hook();
7161
7162int main() {
7163rl_pre_input_hook()
7164; return 0; }
7165EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007166if { (eval echo configure:7167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis0daad592001-09-30 21:09:59 +00007167 rm -rf conftest*
7168 eval "ac_cv_lib_$ac_lib_var=yes"
7169else
7170 echo "configure: failed program was:" >&5
7171 cat conftest.$ac_ext >&5
7172 rm -rf conftest*
7173 eval "ac_cv_lib_$ac_lib_var=no"
7174fi
7175rm -f conftest*
7176LIBS="$ac_save_LIBS"
7177
7178fi
7179if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7180 echo "$ac_t""yes" 1>&6
7181 cat >> confdefs.h <<\EOF
7182#define HAVE_RL_PRE_INPUT_HOOK 1
7183EOF
7184
7185else
7186 echo "$ac_t""no" 1>&6
7187fi
7188
7189
7190# check for readline 4.2
7191echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007192echo "configure:7193: checking for rl_completion_matches in -lreadline" >&5
Martin v. Löwis0daad592001-09-30 21:09:59 +00007193ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
7194if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7195 echo $ac_n "(cached) $ac_c" 1>&6
7196else
7197 ac_save_LIBS="$LIBS"
7198LIBS="-lreadline -ltermcap $LIBS"
7199cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007200#line 7201 "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007201#include "confdefs.h"
7202/* Override any gcc2 internal prototype to avoid an error. */
7203/* We use char because int might match the return type of a gcc2
7204 builtin and then its argument prototype would still apply. */
Guido van Rossum353ae582001-07-10 16:45:32 +00007205char rl_completion_matches();
7206
7207int main() {
7208rl_completion_matches()
7209; return 0; }
7210EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007211if { (eval echo configure:7212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum353ae582001-07-10 16:45:32 +00007212 rm -rf conftest*
7213 eval "ac_cv_lib_$ac_lib_var=yes"
7214else
7215 echo "configure: failed program was:" >&5
7216 cat conftest.$ac_ext >&5
7217 rm -rf conftest*
7218 eval "ac_cv_lib_$ac_lib_var=no"
7219fi
7220rm -f conftest*
7221LIBS="$ac_save_LIBS"
7222
7223fi
7224if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7225 echo "$ac_t""yes" 1>&6
7226 cat >> confdefs.h <<\EOF
7227#define HAVE_RL_COMPLETION_MATCHES 1
7228EOF
7229
7230else
7231 echo "$ac_t""no" 1>&6
7232fi
7233
7234
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007235echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007236echo "configure:7237: checking for broken nice()" >&5
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007237if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
7238 echo $ac_n "(cached) $ac_c" 1>&6
7239else
7240
7241if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007242 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007243else
7244 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007245#line 7246 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007246#include "confdefs.h"
7247
7248int main()
7249{
7250 int val1 = nice(1);
7251 if (val1 != -1 && val1 == nice(2))
7252 exit(0);
7253 exit(1);
7254}
7255
7256EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007257if { (eval echo configure:7258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007258then
7259 ac_cv_broken_nice=yes
7260else
7261 echo "configure: failed program was:" >&5
7262 cat conftest.$ac_ext >&5
7263 rm -fr conftest*
7264 ac_cv_broken_nice=no
7265fi
7266rm -fr conftest*
7267fi
7268
7269fi
7270
7271echo "$ac_t""$ac_cv_broken_nice" 1>&6
7272if test "$ac_cv_broken_nice" = yes
7273then
7274 cat >> confdefs.h <<\EOF
7275#define HAVE_BROKEN_NICE 1
7276EOF
7277
7278fi
7279
Guido van Rossum95713eb2000-05-18 20:53:31 +00007280# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7281# Add sys/socket.h to confdefs.h
7282cat >> confdefs.h <<\EOF
7283#ifdef HAVE_SYS_SOCKET_H
7284#include <sys/socket.h>
7285#endif
7286EOF
7287echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007288echo "configure:7289: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007289if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00007290 echo $ac_n "(cached) $ac_c" 1>&6
7291else
7292 cat > conftest.$ac_ext <<EOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007293#line 7294 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007294#include "confdefs.h"
7295#include <sys/types.h>
7296#if STDC_HEADERS
7297#include <stdlib.h>
7298#include <stddef.h>
7299#endif
7300EOF
7301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7302 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7303 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007304 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007305else
7306 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007307 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007308fi
7309rm -f conftest*
7310
7311fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007312echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7313if test $ac_cv_type_socklen_t = no; then
7314 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007315#define socklen_t int
7316EOF
7317
7318fi
7319
7320
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007321# Add Python/ prefix to LIBOBJS
7322libobjs=$LIBOBJS
7323LIBOBJS=
7324for obj in $libobjs; do
7325 LIBOBJS="$LIBOBJS Python/$obj"
7326done
7327
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007328#AC_MSG_CHECKING(for Modules/Setup)
7329#if test ! -f Modules/Setup ; then
7330# if test ! -d Modules ; then
7331# mkdir Modules
7332# fi
7333# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7334# AC_MSG_RESULT(creating)
7335#else
7336# AC_MSG_RESULT(already exists)
7337#fi
7338
7339
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007340SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007341echo $ac_n "checking for build directories""... $ac_c" 1>&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00007342echo "configure:7343: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007343for dir in $SRCDIRS; do
7344 if test ! -d $dir; then
7345 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007346 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007347done
7348echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007349
Guido van Rossum627b2d71993-12-24 10:39:16 +00007350# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007351trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007352cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007353# This file is a shell script that caches the results of configure
7354# tests run on this system so they can be shared between configure
7355# scripts and configure runs. It is not useful on other systems.
7356# If it contains results you don't want to keep, you may remove or edit it.
7357#
7358# By default, configure uses ./config.cache as the cache file,
7359# creating it if it does not exist already. You can give configure
7360# the --cache-file=FILE option to use a different cache file; that is
7361# what configure does when it calls configure scripts in
7362# subdirectories, so they share the cache.
7363# Giving --cache-file=/dev/null disables caching, for debugging configure.
7364# config.status only pays attention to the cache file if you give it the
7365# --recheck option to rerun configure.
7366#
7367EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007368# The following way of writing the cache mishandles newlines in values,
7369# but we know of no workaround that is simple, portable, and efficient.
7370# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007371# Ultrix sh set writes to stderr and can't be redirected directly,
7372# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007373(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007374 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007375 *ac_space=\ *)
7376 # `set' does not quote correctly, so add quotes (double-quote substitution
7377 # turns \\\\ into \\, and sed turns \\ into \).
7378 sed -n \
7379 -e "s/'/'\\\\''/g" \
7380 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7381 ;;
7382 *)
7383 # `set' quotes correctly as required by POSIX, so do not add quotes.
7384 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7385 ;;
7386 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007387if cmp -s $cache_file confcache; then
7388 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007389else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007390 if test -w $cache_file; then
7391 echo "updating cache $cache_file"
7392 cat confcache > $cache_file
7393 else
7394 echo "not updating unwritable cache $cache_file"
7395 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007396fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007397rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007398
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007399trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007400
7401test "x$prefix" = xNONE && prefix=$ac_default_prefix
7402# Let make expand exec_prefix.
7403test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007404
Guido van Rossum7f43da71994-08-01 12:15:30 +00007405# Any assignment to VPATH causes Sun make to only execute
7406# the first set of double-colon rules, so remove it if not needed.
7407# If there is a colon in the path, we need to keep it.
7408if test "x$srcdir" = x.; then
7409 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7410fi
7411
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007412trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00007413
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007414DEFS=-DHAVE_CONFIG_H
7415
7416# Without the "./", some shells look in PATH for config.status.
7417: ${CONFIG_STATUS=./config.status}
7418
7419echo creating $CONFIG_STATUS
7420rm -f $CONFIG_STATUS
7421cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007422#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007423# Generated automatically by configure.
7424# Run this file to recreate the current configuration.
7425# This directory was configured as follows,
7426# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7427#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007428# $0 $ac_configure_args
7429#
7430# Compiler output produced by configure, useful for debugging
7431# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007432
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007433ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007434for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00007435do
Guido van Rossum7f43da71994-08-01 12:15:30 +00007436 case "\$ac_option" in
7437 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007438 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7439 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00007440 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007441 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007442 exit 0 ;;
7443 -help | --help | --hel | --he | --h)
7444 echo "\$ac_cs_usage"; exit 0 ;;
7445 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00007446 esac
7447done
7448
Guido van Rossum7f43da71994-08-01 12:15:30 +00007449ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007450ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00007451
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007452trap 'rm -fr `echo "Makefile.pre Modules/Setup.config pyconfig.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007453EOF
7454cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007455
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007456# Protect against being on the right side of a sed subst in config.status.
7457sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7458 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007459$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00007460$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007461s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007462s%@CFLAGS@%$CFLAGS%g
7463s%@CPPFLAGS@%$CPPFLAGS%g
7464s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007465s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007466s%@DEFS@%$DEFS%g
7467s%@LDFLAGS@%$LDFLAGS%g
7468s%@LIBS@%$LIBS%g
7469s%@exec_prefix@%$exec_prefix%g
7470s%@prefix@%$prefix%g
7471s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007472s%@bindir@%$bindir%g
7473s%@sbindir@%$sbindir%g
7474s%@libexecdir@%$libexecdir%g
7475s%@datadir@%$datadir%g
7476s%@sysconfdir@%$sysconfdir%g
7477s%@sharedstatedir@%$sharedstatedir%g
7478s%@localstatedir@%$localstatedir%g
7479s%@libdir@%$libdir%g
7480s%@includedir@%$includedir%g
7481s%@oldincludedir@%$oldincludedir%g
7482s%@infodir@%$infodir%g
7483s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00007484s%@VERSION@%$VERSION%g
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00007485s%@CONFIG_ARGS@%$CONFIG_ARGS%g
Jack Jansene578a632001-08-15 01:27:14 +00007486s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7487s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7488s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7489s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00007490s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00007491s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00007492s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007493s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007494s%@CC@%$CC%g
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00007495s%@CPP@%$CPP%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007496s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007497s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007498s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007499s%@DLLLIBRARY@%$DLLLIBRARY%g
Jack Jansene578a632001-08-15 01:27:14 +00007500s%@BLDLIBRARY@%$BLDLIBRARY%g
7501s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00007502s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007503s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007504s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007505s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007506s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007507s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007508s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00007509s%@OPT@%$OPT%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007510s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007511s%@SO@%$SO%g
7512s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007513s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007514s%@CCSHARED@%$CCSHARED%g
7515s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007516s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007517s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7518s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00007519s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00007520s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007521s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00007522s%@DYNLOADFILE@%$DYNLOADFILE%g
Neil Schemenauer4e425612001-06-19 15:44:15 +00007523s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007524s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007525s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7526s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7527s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00007528s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007529s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007530s%@LIBM@%$LIBM%g
7531s%@LIBC@%$LIBC%g
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007532s%@UNICODE_OBJS@%$UNICODE_OBJS%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007533s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007534
7535CEOF
7536EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007537
7538cat >> $CONFIG_STATUS <<\EOF
7539
7540# Split the substitutions into bite-sized pieces for seds with
7541# small command number limits, like on Digital OSF/1 and HP-UX.
7542ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7543ac_file=1 # Number of current file.
7544ac_beg=1 # First line for current file.
7545ac_end=$ac_max_sed_cmds # Line after last line for current file.
7546ac_more_lines=:
7547ac_sed_cmds=""
7548while $ac_more_lines; do
7549 if test $ac_beg -gt 1; then
7550 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7551 else
7552 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7553 fi
7554 if test ! -s conftest.s$ac_file; then
7555 ac_more_lines=false
7556 rm -f conftest.s$ac_file
7557 else
7558 if test -z "$ac_sed_cmds"; then
7559 ac_sed_cmds="sed -f conftest.s$ac_file"
7560 else
7561 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7562 fi
7563 ac_file=`expr $ac_file + 1`
7564 ac_beg=$ac_end
7565 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7566 fi
7567done
7568if test -z "$ac_sed_cmds"; then
7569 ac_sed_cmds=cat
7570fi
7571EOF
7572
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007573cat >> $CONFIG_STATUS <<EOF
7574
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007575CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007576EOF
7577cat >> $CONFIG_STATUS <<\EOF
7578for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007579 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007580 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007581 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007582 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7583 *) ac_file_in="${ac_file}.in" ;;
7584 esac
7585
Guido van Rossumf78abae1997-01-21 22:02:36 +00007586 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007587
7588 # Remove last slash and all that follows it. Not all systems have dirname.
7589 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7590 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7591 # The file is in a subdirectory.
7592 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007593 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007594 # A "../" for each directory in $ac_dir_suffix.
7595 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7596 else
7597 ac_dir_suffix= ac_dots=
7598 fi
7599
7600 case "$ac_given_srcdir" in
7601 .) srcdir=.
7602 if test -z "$ac_dots"; then top_srcdir=.
7603 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7604 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7605 *) # Relative path.
7606 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7607 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7608 esac
7609
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007610 case "$ac_given_INSTALL" in
7611 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7612 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7613 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007614
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007615 echo creating "$ac_file"
7616 rm -f "$ac_file"
7617 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7618 case "$ac_file" in
7619 *Makefile*) ac_comsub="1i\\
7620# $configure_input" ;;
7621 *) ac_comsub= ;;
7622 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007623
7624 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007625 sed -e "$ac_comsub
7626s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007627s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007628s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007629s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00007630" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00007631fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00007632rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007633
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007634# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7635# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007636#
7637# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007638ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7639ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007640ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007641ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007642# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007643ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7644ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007645ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007646ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007647# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007648ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7649ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007650ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007651ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007652
Guido van Rossumf78abae1997-01-21 22:02:36 +00007653if test "${CONFIG_HEADERS+set}" != set; then
7654EOF
7655cat >> $CONFIG_STATUS <<EOF
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007656 CONFIG_HEADERS="pyconfig.h"
Guido van Rossumf78abae1997-01-21 22:02:36 +00007657EOF
7658cat >> $CONFIG_STATUS <<\EOF
7659fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007660for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007661 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007662 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007663 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007664 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7665 *) ac_file_in="${ac_file}.in" ;;
7666 esac
7667
Guido van Rossum7f43da71994-08-01 12:15:30 +00007668 echo creating $ac_file
7669
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007670 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00007671 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7672 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007673
7674EOF
7675
7676# Transform confdefs.h into a sed script conftest.vals that substitutes
7677# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007678# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007679# Protect against being in an unquoted here document in config.status.
7680rm -f conftest.vals
7681cat > conftest.hdr <<\EOF
7682s/[\\&%]/\\&/g
7683s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007684s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007685s%ac_d%ac_u%gp
7686s%ac_u%ac_e%gp
7687EOF
7688sed -n -f conftest.hdr confdefs.h > conftest.vals
7689rm -f conftest.hdr
7690
7691# This sed command replaces #undef with comments. This is necessary, for
7692# example, in the case of _POSIX_SOURCE, which is predefined and required
7693# on some systems where configure will not decide to define it.
7694cat >> conftest.vals <<\EOF
7695s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7696EOF
7697
7698# Break up conftest.vals because some shells have a limit on
7699# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007700
7701rm -f conftest.tail
7702while :
7703do
7704 ac_lines=`grep -c . conftest.vals`
7705 # grep -c gives empty output for an empty file on some AIX systems.
7706 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7707 # Write a limited-size here document to conftest.frag.
7708 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7709 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7710 echo 'CEOF
7711 sed -f conftest.frag conftest.in > conftest.out
7712 rm -f conftest.in
7713 mv conftest.out conftest.in
7714' >> $CONFIG_STATUS
7715 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7716 rm -f conftest.vals
7717 mv conftest.tail conftest.vals
7718done
7719rm -f conftest.vals
7720
7721cat >> $CONFIG_STATUS <<\EOF
7722 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007723 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007724 cat conftest.in >> conftest.h
7725 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00007726 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00007727 echo "$ac_file is unchanged"
7728 rm -f conftest.h
7729 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007730 # Remove last slash and all that follows it. Not all systems have dirname.
7731 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7732 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7733 # The file is in a subdirectory.
7734 test ! -d "$ac_dir" && mkdir "$ac_dir"
7735 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00007736 rm -f $ac_file
7737 mv conftest.h $ac_file
7738 fi
7739fi; done
7740
Guido van Rossumf78abae1997-01-21 22:02:36 +00007741EOF
7742cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007743
Guido van Rossumf78abae1997-01-21 22:02:36 +00007744EOF
7745cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007746
7747exit 0
7748EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007749chmod +x $CONFIG_STATUS
7750rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007751test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00007752
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007753
7754echo "creating Setup"
7755if test ! -f Modules/Setup
7756then
7757 cp $srcdir/Modules/Setup.dist Modules/Setup
7758fi
7759
7760echo "creating Setup.local"
7761if test ! -f Modules/Setup.local
7762then
7763 echo "# Edit this file for local setup changes" >Modules/Setup.local
7764fi
7765
7766echo "creating Makefile"
7767$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
7768 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00007769 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007770mv config.c Modules