blob: 7444816a2f3180571e984c28fe68eb67e164eaea [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öwis25ae43b2001-10-07 08:39:18 +00003# From configure.in Revision: 1.264
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
743if test "$check_cxx" = "yes"
744then
745 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
746do
747# Extract the first word of "$ac_prog", so it can be a program name with args.
748set dummy $ac_prog; ac_word=$2
749echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000750echo "configure:751: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000751if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
752 echo $ac_n "(cached) $ac_c" 1>&6
753else
754 if test -n "$CXX"; then
755 ac_cv_prog_CXX="$CXX" # Let the user override the test.
756else
757 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
758 ac_dummy="$PATH"
759 for ac_dir in $ac_dummy; do
760 test -z "$ac_dir" && ac_dir=.
761 if test -f $ac_dir/$ac_word; then
762 ac_cv_prog_CXX="$ac_prog"
763 break
764 fi
765 done
766 IFS="$ac_save_ifs"
767fi
768fi
769CXX="$ac_cv_prog_CXX"
770if test -n "$CXX"; then
771 echo "$ac_t""$CXX" 1>&6
772else
773 echo "$ac_t""no" 1>&6
774fi
775
776test -n "$CXX" && break
777done
778test -n "$CXX" || CXX="notfound"
779
780 if test "$CXX" = "notfound"
781 then
782 CXX=
783 else
784 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000785echo "configure:786: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000786
787ac_ext=C
788# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
789ac_cpp='$CXXCPP $CPPFLAGS'
790ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
791ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
792cross_compiling=$ac_cv_prog_cxx_cross
793
794cat > conftest.$ac_ext << EOF
795
Jack Jansen127e56e2001-09-11 14:41:54 +0000796#line 797 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000797#include "confdefs.h"
798
799int main(){return(0);}
800EOF
Jack Jansen127e56e2001-09-11 14:41:54 +0000801if { (eval echo configure:802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000802 ac_cv_prog_cxx_works=yes
803 # If we can't run a trivial program, we are probably using a cross compiler.
804 if (./conftest; exit) 2>/dev/null; then
805 ac_cv_prog_cxx_cross=no
806 else
807 ac_cv_prog_cxx_cross=yes
808 fi
809else
810 echo "configure: failed program was:" >&5
811 cat conftest.$ac_ext >&5
812 ac_cv_prog_cxx_works=no
813fi
814rm -fr conftest*
815ac_ext=c
816# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
817ac_cpp='$CPP $CPPFLAGS'
818ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
819ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
820cross_compiling=$ac_cv_prog_cc_cross
821
822echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
823if test $ac_cv_prog_cxx_works = no; then
824 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
825fi
826echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000827echo "configure:828: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000828echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
829cross_compiling=$ac_cv_prog_cxx_cross
830
831 fi
832fi
833
Guido van Rossum8b131c51995-03-09 14:10:13 +0000834# If the user switches compilers, we can't believe the cache
835if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
836then
837 { echo "configure: error: cached CC is different -- throw away $cache_file
838(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
839fi
840
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000841# Extract the first word of "gcc", so it can be a program name with args.
842set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000843echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000844echo "configure:845: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000845if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000846 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847else
848 if test -n "$CC"; then
849 ac_cv_prog_CC="$CC" # Let the user override the test.
850else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000851 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
852 ac_dummy="$PATH"
853 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854 test -z "$ac_dir" && ac_dir=.
855 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000856 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000857 break
858 fi
859 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862fi
863CC="$ac_cv_prog_CC"
864if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000865 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000866else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000867 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000869
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000870if test -z "$CC"; then
871 # Extract the first word of "cc", so it can be a program name with args.
872set dummy cc; ac_word=$2
873echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000874echo "configure:875: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000875if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876 echo $ac_n "(cached) $ac_c" 1>&6
877else
878 if test -n "$CC"; then
879 ac_cv_prog_CC="$CC" # Let the user override the test.
880else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000881 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000883 ac_dummy="$PATH"
884 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000885 test -z "$ac_dir" && ac_dir=.
886 if test -f $ac_dir/$ac_word; then
887 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
888 ac_prog_rejected=yes
889 continue
890 fi
891 ac_cv_prog_CC="cc"
892 break
893 fi
894 done
895 IFS="$ac_save_ifs"
896if test $ac_prog_rejected = yes; then
897 # We found a bogon in the path, so make sure we never use it.
898 set dummy $ac_cv_prog_CC
899 shift
900 if test $# -gt 0; then
901 # We chose a different compiler from the bogus one.
902 # However, it has the same basename, so the bogon will be chosen
903 # first if we set CC to just the basename; use the full file name.
904 shift
905 set dummy "$ac_dir/$ac_word" "$@"
906 shift
907 ac_cv_prog_CC="$@"
908 fi
909fi
910fi
911fi
912CC="$ac_cv_prog_CC"
913if test -n "$CC"; then
914 echo "$ac_t""$CC" 1>&6
915else
916 echo "$ac_t""no" 1>&6
917fi
918
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000919 if test -z "$CC"; then
920 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000921 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000922 # Extract the first word of "cl", so it can be a program name with args.
923set dummy cl; ac_word=$2
924echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000925echo "configure:926: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000926if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000927 echo $ac_n "(cached) $ac_c" 1>&6
928else
929 if test -n "$CC"; then
930 ac_cv_prog_CC="$CC" # Let the user override the test.
931else
932 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
933 ac_dummy="$PATH"
934 for ac_dir in $ac_dummy; do
935 test -z "$ac_dir" && ac_dir=.
936 if test -f $ac_dir/$ac_word; then
937 ac_cv_prog_CC="cl"
938 break
939 fi
940 done
941 IFS="$ac_save_ifs"
942fi
943fi
944CC="$ac_cv_prog_CC"
945if test -n "$CC"; then
946 echo "$ac_t""$CC" 1>&6
947else
948 echo "$ac_t""no" 1>&6
949fi
950 ;;
951 esac
952 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000953 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
954fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000956echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000957echo "configure:958: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000958
959ac_ext=c
960# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
961ac_cpp='$CPP $CPPFLAGS'
962ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000963ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000964cross_compiling=$ac_cv_prog_cc_cross
965
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000966cat > conftest.$ac_ext << EOF
967
Jack Jansen127e56e2001-09-11 14:41:54 +0000968#line 969 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000969#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000970
Guido van Rossumf78abae1997-01-21 22:02:36 +0000971main(){return(0);}
972EOF
Jack Jansen127e56e2001-09-11 14:41:54 +0000973if { (eval echo configure:974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000974 ac_cv_prog_cc_works=yes
975 # If we can't run a trivial program, we are probably using a cross compiler.
976 if (./conftest; exit) 2>/dev/null; then
977 ac_cv_prog_cc_cross=no
978 else
979 ac_cv_prog_cc_cross=yes
980 fi
981else
982 echo "configure: failed program was:" >&5
983 cat conftest.$ac_ext >&5
984 ac_cv_prog_cc_works=no
985fi
986rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000987ac_ext=c
988# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
989ac_cpp='$CPP $CPPFLAGS'
990ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
991ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
992cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000993
994echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
995if test $ac_cv_prog_cc_works = no; then
996 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
997fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000998echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +0000999echo "configure:1000: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001000echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1001cross_compiling=$ac_cv_prog_cc_cross
1002
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001003echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001004echo "configure:1005: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001005if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001006 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001007else
1008 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001009#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001011#endif
1012EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001013if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001014 ac_cv_prog_gcc=yes
1015else
1016 ac_cv_prog_gcc=no
1017fi
1018fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001020echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001021
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001022if test $ac_cv_prog_gcc = yes; then
1023 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001024else
1025 GCC=
1026fi
1027
1028ac_test_CFLAGS="${CFLAGS+set}"
1029ac_save_CFLAGS="$CFLAGS"
1030CFLAGS=
1031echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001032echo "configure:1033: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001033if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001034 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035else
1036 echo 'void f(){}' > conftest.c
1037if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001038 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001040 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001041fi
1042rm -f conftest*
1043
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001044fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
Guido van Rossumf78abae1997-01-21 22:02:36 +00001046echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001047if test "$ac_test_CFLAGS" = set; then
1048 CFLAGS="$ac_save_CFLAGS"
1049elif test $ac_cv_prog_cc_g = yes; then
1050 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001051 CFLAGS="-g -O2"
1052 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001053 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054 fi
1055else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001056 if test "$GCC" = yes; then
1057 CFLAGS="-O2"
1058 else
1059 CFLAGS=
1060 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001061fi
1062
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001063
1064# checks for UNIX variants that set C preprocessor variables
1065echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001066echo "configure:1067: checking how to run the C preprocessor" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001067# On Suns, sometimes $CPP names a directory.
1068if test -n "$CPP" && test -d "$CPP"; then
1069 CPP=
1070fi
1071if test -z "$CPP"; then
1072if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1073 echo $ac_n "(cached) $ac_c" 1>&6
1074else
1075 # This must be in double quotes, not single quotes, because CPP may get
1076 # substituted into the Makefile and "${CC-cc}" will confuse make.
1077 CPP="${CC-cc} -E"
1078 # On the NeXT, cc -E runs the code through the compiler's parser,
1079 # not just through cpp.
1080 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001081#line 1082 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001082#include "confdefs.h"
1083#include <assert.h>
1084Syntax Error
1085EOF
1086ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen127e56e2001-09-11 14:41:54 +00001087{ (eval echo configure:1088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001088ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1089if test -z "$ac_err"; then
1090 :
1091else
1092 echo "$ac_err" >&5
1093 echo "configure: failed program was:" >&5
1094 cat conftest.$ac_ext >&5
1095 rm -rf conftest*
1096 CPP="${CC-cc} -E -traditional-cpp"
1097 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001098#line 1099 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001099#include "confdefs.h"
1100#include <assert.h>
1101Syntax Error
1102EOF
1103ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen127e56e2001-09-11 14:41:54 +00001104{ (eval echo configure:1105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001105ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1106if test -z "$ac_err"; then
1107 :
1108else
1109 echo "$ac_err" >&5
1110 echo "configure: failed program was:" >&5
1111 cat conftest.$ac_ext >&5
1112 rm -rf conftest*
1113 CPP="${CC-cc} -nologo -E"
1114 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001115#line 1116 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001116#include "confdefs.h"
1117#include <assert.h>
1118Syntax Error
1119EOF
1120ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen127e56e2001-09-11 14:41:54 +00001121{ (eval echo configure:1122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001122ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1123if test -z "$ac_err"; then
1124 :
1125else
1126 echo "$ac_err" >&5
1127 echo "configure: failed program was:" >&5
1128 cat conftest.$ac_ext >&5
1129 rm -rf conftest*
1130 CPP=/lib/cpp
1131fi
1132rm -f conftest*
1133fi
1134rm -f conftest*
1135fi
1136rm -f conftest*
1137 ac_cv_prog_CPP="$CPP"
1138fi
1139 CPP="$ac_cv_prog_CPP"
1140else
1141 ac_cv_prog_CPP="$CPP"
1142fi
1143echo "$ac_t""$CPP" 1>&6
1144
1145echo $ac_n "checking for AIX""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001146echo "configure:1147: checking for AIX" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001147cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001148#line 1149 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001149#include "confdefs.h"
1150#ifdef _AIX
1151 yes
1152#endif
1153
1154EOF
1155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1156 egrep "yes" >/dev/null 2>&1; then
1157 rm -rf conftest*
1158 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
1159#define _ALL_SOURCE 1
1160EOF
1161
1162else
1163 rm -rf conftest*
1164 echo "$ac_t""no" 1>&6
1165fi
1166rm -f conftest*
1167
1168
1169ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
1170echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001171echo "configure:1172: checking for minix/config.h" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001172if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1173 echo $ac_n "(cached) $ac_c" 1>&6
1174else
1175 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001176#line 1177 "configure"
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001177#include "confdefs.h"
1178#include <minix/config.h>
1179EOF
1180ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Jack Jansen127e56e2001-09-11 14:41:54 +00001181{ (eval echo configure:1182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00001182ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1183if test -z "$ac_err"; then
1184 rm -rf conftest*
1185 eval "ac_cv_header_$ac_safe=yes"
1186else
1187 echo "$ac_err" >&5
1188 echo "configure: failed program was:" >&5
1189 cat conftest.$ac_ext >&5
1190 rm -rf conftest*
1191 eval "ac_cv_header_$ac_safe=no"
1192fi
1193rm -f conftest*
1194fi
1195if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1196 echo "$ac_t""yes" 1>&6
1197 MINIX=yes
1198else
1199 echo "$ac_t""no" 1>&6
1200MINIX=
1201fi
1202
1203if test "$MINIX" = yes; then
1204 cat >> confdefs.h <<\EOF
1205#define _POSIX_SOURCE 1
1206EOF
1207
1208 cat >> confdefs.h <<\EOF
1209#define _POSIX_1_SOURCE 2
1210EOF
1211
1212 cat >> confdefs.h <<\EOF
1213#define _MINIX 1
1214EOF
1215
1216fi
1217
1218
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001219echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001220echo "configure:1221: checking for Cygwin environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001221if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1222 echo $ac_n "(cached) $ac_c" 1>&6
1223else
1224 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001225#line 1226 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001226#include "confdefs.h"
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001227
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001228int main() {
1229
1230#ifndef __CYGWIN__
1231#define __CYGWIN__ __CYGWIN32__
1232#endif
1233return __CYGWIN__;
1234; return 0; }
1235EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001236if { (eval echo configure:1237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001237 rm -rf conftest*
1238 ac_cv_cygwin=yes
1239else
1240 echo "configure: failed program was:" >&5
1241 cat conftest.$ac_ext >&5
1242 rm -rf conftest*
1243 ac_cv_cygwin=no
1244fi
1245rm -f conftest*
1246rm -f conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001247fi
1248
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001249echo "$ac_t""$ac_cv_cygwin" 1>&6
1250CYGWIN=
1251test "$ac_cv_cygwin" = yes && CYGWIN=yes
1252echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001253echo "configure:1254: checking for mingw32 environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001254if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1255 echo $ac_n "(cached) $ac_c" 1>&6
1256else
1257 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001258#line 1259 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001259#include "confdefs.h"
1260
1261int main() {
1262return __MINGW32__;
1263; return 0; }
1264EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001265if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001266 rm -rf conftest*
1267 ac_cv_mingw32=yes
1268else
1269 echo "configure: failed program was:" >&5
1270 cat conftest.$ac_ext >&5
1271 rm -rf conftest*
1272 ac_cv_mingw32=no
1273fi
1274rm -f conftest*
1275rm -f conftest*
1276fi
1277
1278echo "$ac_t""$ac_cv_mingw32" 1>&6
1279MINGW32=
1280test "$ac_cv_mingw32" = yes && MINGW32=yes
1281
1282
1283echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001284echo "configure:1285: checking for executable suffix" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001285if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1286 echo $ac_n "(cached) $ac_c" 1>&6
1287else
1288 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1289 ac_cv_exeext=.exe
1290else
1291 rm -f conftest*
1292 echo 'int main () { return 0; }' > conftest.$ac_ext
1293 ac_cv_exeext=
Jack Jansen127e56e2001-09-11 14:41:54 +00001294 if { (eval echo configure:1295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001295 for file in conftest.*; do
1296 case $file in
1297 *.c | *.o | *.obj) ;;
1298 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1299 esac
1300 done
1301 else
1302 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1303 fi
1304 rm -f conftest*
1305 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1306fi
1307fi
1308
1309EXEEXT=""
1310test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1311echo "$ac_t""${ac_cv_exeext}" 1>&6
1312ac_exeext=$EXEEXT
1313
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001314echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001315echo "configure:1316: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001316# Check whether --with-suffix or --without-suffix was given.
1317if test "${with_suffix+set}" = set; then
1318 withval="$with_suffix"
1319
1320 case $withval in
1321 no) EXEEXT=;;
1322 yes) EXEEXT=.exe;;
1323 *) EXEEXT=$withval;;
1324 esac
1325fi
1326
1327echo "$ac_t""$EXEEXT" 1>&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00001328# Test whether we're running on a non-case-sensitive system, in which
1329# case we give a warning if no ext is given
1330if test -d "python" -a -z "$EXEEXT"
1331then
1332 echo "configure: warning: This filesystem is not case-sensitive so you should probably use --with-suffix" 1>&2
1333fi
Guido van Rossumff555e32000-09-22 15:38:21 +00001334
Guido van Rossumdd997f71998-10-07 19:58:26 +00001335case $MACHDEP in
1336bsdos*)
1337 case $CC in
1338 gcc) CC="$CC -D_HAVE_BSDI";;
1339 esac;;
1340esac
1341
Guido van Rossum24b1e751997-08-21 02:29:16 +00001342case $ac_sys_system in
1343hp*|HP*)
1344 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001345 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001346 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001347Monterey*)
1348 case $CC in
1349 cc) CC="$CC -Wl,-Bexport";;
1350 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001351SunOS*)
1352 # Some functions have a prototype only with that define, e.g. confstr
1353 cat >> confdefs.h <<\EOF
1354#define __EXTENSIONS__ 1
1355EOF
1356
1357 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001358esac
1359
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001360
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001361
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001362echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001363echo "configure:1364: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001364if test -z "$LIBRARY"
1365then
1366 LIBRARY='libpython$(VERSION).a'
1367fi
1368echo "$ac_t""$LIBRARY" 1>&6
1369
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001370# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00001371# name of the library into which to insert object files). BLDLIBRARY is also
1372# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
1373# is blank as the main program is not linked directly against LDLIBRARY.
1374# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
1375# systems without shared libraries, LDLIBRARY is the same as LIBRARY
1376# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
1377# DLLLIBRARY is the shared (i.e., DLL) library.
1378#
1379
1380
Guido van Rossumaef734b2001-01-10 21:09:12 +00001381
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001382
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001383LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00001384BLDLIBRARY='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00001385DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00001386LDLIBRARYDIR=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001387
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001388# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001389# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001390# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001391
1392echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001393echo "configure:1394: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001394if test -z "$LINKCC"
1395then
1396 case $ac_sys_system in
1397 AIX*)
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001398 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001399 dgux*)
1400 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001401 Monterey64*)
1402 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001403 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001404 esac
1405fi
1406echo "$ac_t""$LINKCC" 1>&6
1407
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001408echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001409echo "configure:1410: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001410
1411# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001412case $MACHDEP in
1413dguxR4)
1414 LDLIBRARY='libpython$(VERSION).so'
1415 OPT="$OPT -pic"
1416 ;;
1417beos*)
1418 LDLIBRARY='libpython$(VERSION).so'
1419 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001420cygwin*)
1421 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001422 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001423 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001424esac
Jack Jansene578a632001-08-15 01:27:14 +00001425
Guido van Rossumb8552162001-09-05 14:58:11 +00001426# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
1427# library that we build, but we do not want to link against it (we
1428# will find it with a -framework option). For this reason there is an
1429# extra variable BLDLIBRARY against which Python and the extension
1430# modules are linked, BLDLIBRARY. This is normally the same as
1431# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00001432if test "$enable_framework"
1433then
1434 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
1435 LDLIBRARYDIR='$(PYTHONFRAMEWORKDIR)'
1436 BLDLIBRARY=''
1437else
1438 BLDLIBRARY='$(LDLIBRARY)'
1439fi
1440
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001441echo "$ac_t""$LDLIBRARY" 1>&6
1442
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001443# Extract the first word of "ranlib", so it can be a program name with args.
1444set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001445echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001446echo "configure:1447: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001447if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001448 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001449else
1450 if test -n "$RANLIB"; then
1451 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1452else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001453 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1454 ac_dummy="$PATH"
1455 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001456 test -z "$ac_dir" && ac_dir=.
1457 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001458 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001459 break
1460 fi
1461 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001462 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001463 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001464fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001465fi
1466RANLIB="$ac_cv_prog_RANLIB"
1467if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001468 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001469else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001470 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001471fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001472
1473
Guido van Rossum7f43da71994-08-01 12:15:30 +00001474for ac_prog in ar aal
1475do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001476# Extract the first word of "$ac_prog", so it can be a program name with args.
1477set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001478echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001479echo "configure:1480: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001480if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001481 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001482else
1483 if test -n "$AR"; then
1484 ac_cv_prog_AR="$AR" # Let the user override the test.
1485else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001486 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1487 ac_dummy="$PATH"
1488 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001489 test -z "$ac_dir" && ac_dir=.
1490 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001491 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001492 break
1493 fi
1494 done
1495 IFS="$ac_save_ifs"
1496fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001497fi
1498AR="$ac_cv_prog_AR"
1499if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001500 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001501else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001502 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001503fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001504
1505test -n "$AR" && break
1506done
1507test -n "$AR" || AR="ar"
1508
Neil Schemenauera42c8272001-03-31 00:01:55 +00001509
1510case $MACHDEP in
1511bsdos*)
1512 # install -d does not work on BSDI
1513 if test -z "$INSTALL"
1514 then
1515 INSTALL="${srcdir}/install-sh -c"
1516 fi
1517esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001518ac_aux_dir=
1519for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1520 if test -f $ac_dir/install-sh; then
1521 ac_aux_dir=$ac_dir
1522 ac_install_sh="$ac_aux_dir/install-sh -c"
1523 break
1524 elif test -f $ac_dir/install.sh; then
1525 ac_aux_dir=$ac_dir
1526 ac_install_sh="$ac_aux_dir/install.sh -c"
1527 break
1528 fi
1529done
1530if test -z "$ac_aux_dir"; then
1531 { 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 +00001532fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001533ac_config_guess=$ac_aux_dir/config.guess
1534ac_config_sub=$ac_aux_dir/config.sub
1535ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1536
1537# Find a good install program. We prefer a C program (faster),
1538# so one script is as good as another. But avoid the broken or
1539# incompatible versions:
1540# SysV /etc/install, /usr/sbin/install
1541# SunOS /usr/etc/install
1542# IRIX /sbin/install
1543# AIX /bin/install
1544# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1545# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1546# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1547# ./install, which can be erroneously created by make from ./install.sh.
1548echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001549echo "configure:1550: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001550if test -z "$INSTALL"; then
1551if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1552 echo $ac_n "(cached) $ac_c" 1>&6
1553else
1554 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1555 for ac_dir in $PATH; do
1556 # Account for people who put trailing slashes in PATH elements.
1557 case "$ac_dir/" in
1558 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1559 *)
1560 # OSF1 and SCO ODT 3.0 have their own names for install.
1561 # Don't use installbsd from OSF since it installs stuff as root
1562 # by default.
1563 for ac_prog in ginstall scoinst install; do
1564 if test -f $ac_dir/$ac_prog; then
1565 if test $ac_prog = install &&
1566 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1567 # AIX install. It has an incompatible calling convention.
1568 :
1569 else
1570 ac_cv_path_install="$ac_dir/$ac_prog -c"
1571 break 2
1572 fi
1573 fi
1574 done
1575 ;;
1576 esac
1577 done
1578 IFS="$ac_save_IFS"
1579
1580fi
1581 if test "${ac_cv_path_install+set}" = set; then
1582 INSTALL="$ac_cv_path_install"
1583 else
1584 # As a last resort, use the slow shell script. We don't cache a
1585 # path for INSTALL within a source directory, because that will
1586 # break other packages using the cache if that directory is
1587 # removed, or if the path is relative.
1588 INSTALL="$ac_install_sh"
1589 fi
1590fi
1591echo "$ac_t""$INSTALL" 1>&6
1592
1593# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1594# It thinks the first close brace ends the variable substitution.
1595test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1596
1597test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1598
1599test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1600
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001601
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001602# Not every filesystem supports hard links
1603
1604if test -z "$LN" ; then
1605 case $ac_sys_system in
1606 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001607 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001608 *) LN=ln;;
1609 esac
1610fi
1611
Fred Drake109d9862001-07-11 06:27:56 +00001612# Check for --with-pydebug
1613echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001614echo "configure:1615: checking for --with-pydebug" >&5
Fred Drake109d9862001-07-11 06:27:56 +00001615# Check whether --with-pydebug or --without-pydebug was given.
1616if test "${with_pydebug+set}" = set; then
1617 withval="$with_pydebug"
1618
1619if test "$withval" != no
1620then cat >> confdefs.h <<\EOF
1621#define Py_DEBUG 1
1622EOF
1623 echo "$ac_t""yes" 1>&6; Py_DEBUG='true'
1624else echo "$ac_t""no" 1>&6; Py_DEBUG='false'
1625fi
1626else
1627 echo "$ac_t""no" 1>&6
1628fi
1629
1630
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001631# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001632
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001633if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001634then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001635 case $GCC in
1636 yes)
1637 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001638 yes)
Fred Drake109d9862001-07-11 06:27:56 +00001639 if test "$Py_DEBUG" = 'true' ; then
1640 # Optimization messes up debuggers, so turn it off for
1641 # debug builds.
1642 OPT="-g -Wall -Wstrict-prototypes"
1643 else
1644 OPT="-g -O3 -Wall -Wstrict-prototypes"
1645 fi;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001646 *)
Fred Drake109d9862001-07-11 06:27:56 +00001647 OPT="-O3 -Wall -Wstrict-prototypes";;
1648 esac
1649 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001650 *)
1651 case $ac_sys_system in
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00001652 OpenUNIX*|UnixWare*)
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001653 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1654 *)
1655 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001656 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001657 esac
Jack Jansenca06bc62001-08-03 15:32:23 +00001658 case $ac_sys_system in
1659 Darwin*)
1660 OPT="$OPT -no-cpp-precomp";;
1661 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001662fi
1663
Trent Mick635f6fb2000-08-23 21:33:05 +00001664# The current (beta) Monterey compiler dies with optimizations
1665case $ac_sys_system in
1666Monterey*) OPT="";;
1667esac
1668
Guido van Rossum563e7081996-09-10 18:20:48 +00001669if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001670then
1671 OPT="$OPT $ac_arch_flags"
1672fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00001673
Guido van Rossum91922671997-10-09 20:24:13 +00001674echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001675echo "configure:1676: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001676if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001677 echo $ac_n "(cached) $ac_c" 1>&6
1678else
1679 ac_save_cc="$CC"
1680CC="$CC -OPT:Olimit=0"
1681if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001682 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00001683else
1684 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001685#line 1686 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001686#include "confdefs.h"
1687int main() { return 0; }
1688EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001689if { (eval echo configure:1690: \"$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 +00001690then
1691 ac_cv_opt_olimit_ok=yes
1692else
1693 echo "configure: failed program was:" >&5
1694 cat conftest.$ac_ext >&5
1695 rm -fr conftest*
1696 ac_cv_opt_olimit_ok=no
1697fi
1698rm -fr conftest*
1699fi
1700
1701CC="$ac_save_cc"
1702fi
1703
1704echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001705if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001706 case $ac_sys_system in
1707 Darwin*) OPT="$OPT" ;;
1708 *) OPT="$OPT -OPT:Olimit=0";;
1709 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001710else
1711 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Jack Jansen127e56e2001-09-11 14:41:54 +00001712echo "configure:1713: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001713 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001714 echo $ac_n "(cached) $ac_c" 1>&6
1715else
1716 ac_save_cc="$CC"
1717 CC="$CC -Olimit 1500"
1718 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00001719 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001720else
1721 cat > conftest.$ac_ext <<EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001722#line 1723 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001723#include "confdefs.h"
1724int main() { return 0; }
1725EOF
Jack Jansen127e56e2001-09-11 14:41:54 +00001726if { (eval echo configure:1727: \"$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 +00001727then
1728 ac_cv_olimit_ok=yes
1729else
1730 echo "configure: failed program was:" >&5
1731 cat conftest.$ac_ext >&5
1732 rm -fr conftest*
1733 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001734fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001735rm -fr conftest*
1736fi
1737
1738 CC="$ac_save_cc"
1739fi
1740
1741 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1742 if test $ac_cv_olimit_ok = yes; then
1743 OPT="$OPT -Olimit 1500"
1744 fi
1745fi
1746
Martin v. Löwis130fb172001-07-19 11:00:41 +00001747# -Kpthread, if available, provides the right #defines
1748# and linker options to make pthread_create available
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001749# Some compilers won't report that they do not support -Kpthread,
1750# so we need to run a program to see whether it really made the
1751# function available.
Martin v. Löwis130fb172001-07-19 11:00:41 +00001752echo $ac_n "checking whether $CC accepts -Kpthread""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001753echo "configure:1754: checking whether $CC accepts -Kpthread" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00001754if eval "test \"`echo '$''{'ac_cv_kpthread'+set}'`\" = set"; then
1755 echo $ac_n "(cached) $ac_c" 1>&6
1756else
1757 ac_save_cc="$CC"
1758CC="$CC -Kpthread"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001759if test "$cross_compiling" = yes; then
1760 ac_cv_kpthread=no
1761else
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öwis130fb172001-07-19 11:00:41 +00001780 ac_cv_kpthread=yes
1781else
1782 echo "configure: failed program was:" >&5
1783 cat conftest.$ac_ext >&5
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001784 rm -fr conftest*
Martin v. Löwis130fb172001-07-19 11:00:41 +00001785 ac_cv_kpthread=no
1786fi
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001787rm -fr conftest*
1788fi
1789
Martin v. Löwis130fb172001-07-19 11:00:41 +00001790CC="$ac_save_cc"
1791fi
1792
Martin v. Löwis130fb172001-07-19 11:00:41 +00001793echo "$ac_t""$ac_cv_kpthread" 1>&6
1794
Guido van Rossum84e7b241996-08-19 21:59:00 +00001795
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001796# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001797echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001798echo "configure:1799: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001799if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001800 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001801else
1802 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001803#line 1804 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001804#include "confdefs.h"
1805#include <stdlib.h>
1806#include <stdarg.h>
1807#include <string.h>
1808#include <float.h>
1809EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001810ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001811{ (eval echo configure:1812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001812ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001813if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001814 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001815 ac_cv_header_stdc=yes
1816else
1817 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001818 echo "configure: failed program was:" >&5
1819 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001820 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001821 ac_cv_header_stdc=no
1822fi
1823rm -f conftest*
1824
1825if test $ac_cv_header_stdc = yes; then
1826 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1827cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001828#line 1829 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001829#include "confdefs.h"
1830#include <string.h>
1831EOF
1832if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1833 egrep "memchr" >/dev/null 2>&1; then
1834 :
1835else
1836 rm -rf conftest*
1837 ac_cv_header_stdc=no
1838fi
1839rm -f conftest*
1840
1841fi
1842
1843if test $ac_cv_header_stdc = yes; then
1844 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1845cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001846#line 1847 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001847#include "confdefs.h"
1848#include <stdlib.h>
1849EOF
1850if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1851 egrep "free" >/dev/null 2>&1; then
1852 :
1853else
1854 rm -rf conftest*
1855 ac_cv_header_stdc=no
1856fi
1857rm -f conftest*
1858
1859fi
1860
1861if test $ac_cv_header_stdc = yes; then
1862 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1863if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001864 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001865else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001866 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001867#line 1868 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001868#include "confdefs.h"
1869#include <ctype.h>
1870#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1871#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001872#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001873int main () { int i; for (i = 0; i < 256; i++)
1874if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1875exit (0); }
1876
1877EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001878if { (eval echo configure:1879: \"$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 +00001879then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001880 :
1881else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001882 echo "configure: failed program was:" >&5
1883 cat conftest.$ac_ext >&5
1884 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001885 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001886fi
1887rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001888fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001889
1890fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001891fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001892
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001893echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001894if test $ac_cv_header_stdc = yes; then
1895 cat >> confdefs.h <<\EOF
1896#define STDC_HEADERS 1
1897EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001898
1899fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001900
Martin v. Löwis9b75dca2001-08-10 13:58:50 +00001901for ac_hdr in dlfcn.h fcntl.h limits.h langinfo.h locale.h \
1902ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00001903signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00001904sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00001905sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001906sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwisf24b2f32001-08-10 20:29:40 +00001907ndbm.h db1/ndbm.h gdbm/ndbm.h sys/resource.h netpacket/packet.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001908do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001909ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001910echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001911echo "configure:1912: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001912if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001913 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001914else
1915 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001916#line 1917 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001917#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001918#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001919EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001920ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001921{ (eval echo configure:1922: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001922ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001923if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001924 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001925 eval "ac_cv_header_$ac_safe=yes"
1926else
1927 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001928 echo "configure: failed program was:" >&5
1929 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001930 rm -rf conftest*
1931 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001932fi
1933rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001934fi
1935if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001936 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001937 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001938 cat >> confdefs.h <<EOF
1939#define $ac_tr_hdr 1
1940EOF
1941
1942else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001943 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001944fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001945done
1946
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001947ac_header_dirent=no
1948for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1949do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001950ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001951echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001952echo "configure:1953: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001953if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001954 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001955else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001956 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001957#line 1958 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001958#include "confdefs.h"
1959#include <sys/types.h>
1960#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001961int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001962DIR *dirp = 0;
1963; return 0; }
1964EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001965if { (eval echo configure:1966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001966 rm -rf conftest*
1967 eval "ac_cv_header_dirent_$ac_safe=yes"
1968else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001969 echo "configure: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001971 rm -rf conftest*
1972 eval "ac_cv_header_dirent_$ac_safe=no"
1973fi
1974rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001975fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001976if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001977 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001978 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001979 cat >> confdefs.h <<EOF
1980#define $ac_tr_hdr 1
1981EOF
1982 ac_header_dirent=$ac_hdr; break
1983else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001984 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001985fi
1986done
1987# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1988if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001989echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001990echo "configure:1991: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001991ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001992if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001993 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001994else
1995 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001996LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001997cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00001998#line 1999 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001999#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002000/* Override any gcc2 internal prototype to avoid an error. */
2001/* We use char because int might match the return type of a gcc2
2002 builtin and then its argument prototype would still apply. */
2003char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002004
Guido van Rossumf78abae1997-01-21 22:02:36 +00002005int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002006opendir()
2007; return 0; }
2008EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002009if { (eval echo configure:2010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002010 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002011 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002012else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002013 echo "configure: failed program was:" >&5
2014 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002015 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002016 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002017fi
2018rm -f conftest*
2019LIBS="$ac_save_LIBS"
2020
2021fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002022if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002023 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002024 LIBS="$LIBS -ldir"
2025else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002026 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002027fi
2028
2029else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002030echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002031echo "configure:2032: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002032ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002033if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002034 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002035else
2036 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002037LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002038cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002039#line 2040 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002040#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002041/* Override any gcc2 internal prototype to avoid an error. */
2042/* We use char because int might match the return type of a gcc2
2043 builtin and then its argument prototype would still apply. */
2044char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002045
Guido van Rossumf78abae1997-01-21 22:02:36 +00002046int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002047opendir()
2048; return 0; }
2049EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002050if { (eval echo configure:2051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002051 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002052 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002053else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002054 echo "configure: failed program was:" >&5
2055 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002056 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002057 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002058fi
2059rm -f conftest*
2060LIBS="$ac_save_LIBS"
2061
2062fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002063if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002064 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002065 LIBS="$LIBS -lx"
2066else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002067 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002068fi
2069
2070fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002071
2072
2073# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00002074was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002075echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002076echo "configure:2077: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002077cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002078#line 2079 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002079#include "confdefs.h"
2080#include <time.h>
2081EOF
2082if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2083 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00002084 rm -rf conftest*
2085 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002086else
2087 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002088 cat >> confdefs.h <<\EOF
2089#define clock_t long
2090EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002091
2092fi
2093rm -f conftest*
2094
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002095echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002096
Guido van Rossum810cc512001-09-09 23:51:39 +00002097# Two defines needed to enable largefile support on various platforms
2098# These may affect some typedefs
2099cat >> confdefs.h <<\EOF
2100#define _LARGEFILE_SOURCE 1
2101EOF
2102
2103cat >> confdefs.h <<\EOF
2104#define _FILE_OFFSET_BITS 64
2105EOF
2106
2107
Guido van Rossum84e7b241996-08-19 21:59:00 +00002108# Add some code to confdefs.h so that the test for off_t works on SCO
2109cat >> confdefs.h <<\EOF
2110#if defined(SCO_DS)
2111#undef _OFF_T
2112#endif
2113EOF
2114
Guido van Rossumef2255b2000-03-10 22:30:29 +00002115# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002116echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002117echo "configure:2118: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002118if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002119 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002120else
2121 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002122#line 2123 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002123#include "confdefs.h"
2124#include <sys/types.h>
2125#if STDC_HEADERS
2126#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002127#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002128#endif
2129EOF
2130if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002131 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 +00002132 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002133 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002134else
2135 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002136 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002137fi
2138rm -f conftest*
2139
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002140fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002141echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2142if test $ac_cv_type_mode_t = no; then
2143 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002144#define mode_t int
2145EOF
2146
2147fi
2148
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002149echo $ac_n "checking for off_t""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002150echo "configure:2151: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002151if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002152 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002153else
2154 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002155#line 2156 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002156#include "confdefs.h"
2157#include <sys/types.h>
2158#if STDC_HEADERS
2159#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002160#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002161#endif
2162EOF
2163if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002164 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 +00002165 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002166 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002167else
2168 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002169 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002170fi
2171rm -f conftest*
2172
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002173fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002174echo "$ac_t""$ac_cv_type_off_t" 1>&6
2175if test $ac_cv_type_off_t = no; then
2176 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002177#define off_t long
2178EOF
2179
2180fi
2181
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002182echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002183echo "configure:2184: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002184if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002185 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002186else
2187 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002188#line 2189 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002189#include "confdefs.h"
2190#include <sys/types.h>
2191#if STDC_HEADERS
2192#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002193#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002194#endif
2195EOF
2196if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002197 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 +00002198 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002199 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002200else
2201 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002202 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002203fi
2204rm -f conftest*
2205
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002206fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002207echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2208if test $ac_cv_type_pid_t = no; then
2209 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002210#define pid_t int
2211EOF
2212
2213fi
2214
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002215echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002216echo "configure:2217: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002217if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002218 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002219else
2220 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002221#line 2222 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002222#include "confdefs.h"
2223#include <sys/types.h>
2224#include <signal.h>
2225#ifdef signal
2226#undef signal
2227#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002228#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002229extern "C" void (*signal (int, void (*)(int)))(int);
2230#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002231void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002232#endif
2233
Guido van Rossumf78abae1997-01-21 22:02:36 +00002234int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002235int i;
2236; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002237EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002238if { (eval echo configure:2239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002239 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002240 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002241else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002242 echo "configure: failed program was:" >&5
2243 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002244 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002245 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002246fi
2247rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002248fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002249
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002250echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002251cat >> confdefs.h <<EOF
2252#define RETSIGTYPE $ac_cv_type_signal
2253EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002254
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002255
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002256echo $ac_n "checking for size_t""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002257echo "configure:2258: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002258if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002259 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002260else
2261 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002262#line 2263 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002263#include "confdefs.h"
2264#include <sys/types.h>
2265#if STDC_HEADERS
2266#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002267#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002268#endif
2269EOF
2270if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002271 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 +00002272 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002273 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002274else
2275 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002276 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002277fi
2278rm -f conftest*
2279
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002280fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002281echo "$ac_t""$ac_cv_type_size_t" 1>&6
2282if test $ac_cv_type_size_t = no; then
2283 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002284#define size_t unsigned
2285EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002286
2287fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002288
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002289echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002290echo "configure:2291: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002291if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002292 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002293else
2294 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002295#line 2296 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002296#include "confdefs.h"
2297#include <sys/types.h>
2298EOF
2299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2300 egrep "uid_t" >/dev/null 2>&1; then
2301 rm -rf conftest*
2302 ac_cv_type_uid_t=yes
2303else
2304 rm -rf conftest*
2305 ac_cv_type_uid_t=no
2306fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002307rm -f conftest*
2308
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002309fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002310
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002311echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002312if test $ac_cv_type_uid_t = no; then
2313 cat >> confdefs.h <<\EOF
2314#define uid_t int
2315EOF
2316
2317 cat >> confdefs.h <<\EOF
2318#define gid_t int
2319EOF
2320
2321fi
2322
Guido van Rossum627b2d71993-12-24 10:39:16 +00002323
Guido van Rossumef2255b2000-03-10 22:30:29 +00002324# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002325echo $ac_n "checking size of int""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002326echo "configure:2327: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002327if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002328 echo $ac_n "(cached) $ac_c" 1>&6
2329else
2330 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002331 ac_cv_sizeof_int=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002332else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002333 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002334#line 2335 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002335#include "confdefs.h"
2336#include <stdio.h>
2337main()
2338{
2339 FILE *f=fopen("conftestval", "w");
2340 if (!f) exit(1);
2341 fprintf(f, "%d\n", sizeof(int));
2342 exit(0);
2343}
2344EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002345if { (eval echo configure:2346: \"$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 +00002346then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002347 ac_cv_sizeof_int=`cat conftestval`
2348else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002349 echo "configure: failed program was:" >&5
2350 cat conftest.$ac_ext >&5
2351 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002352 ac_cv_sizeof_int=0
2353fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002354rm -fr conftest*
2355fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002356
2357fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002358echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2359cat >> confdefs.h <<EOF
2360#define SIZEOF_INT $ac_cv_sizeof_int
2361EOF
2362
2363
2364echo $ac_n "checking size of long""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002365echo "configure:2366: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002366if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002367 echo $ac_n "(cached) $ac_c" 1>&6
2368else
2369 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002370 ac_cv_sizeof_long=4
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002371else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002372 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002373#line 2374 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002374#include "confdefs.h"
2375#include <stdio.h>
2376main()
2377{
2378 FILE *f=fopen("conftestval", "w");
2379 if (!f) exit(1);
2380 fprintf(f, "%d\n", sizeof(long));
2381 exit(0);
2382}
2383EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002384if { (eval echo configure:2385: \"$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 +00002385then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002386 ac_cv_sizeof_long=`cat conftestval`
2387else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002388 echo "configure: failed program was:" >&5
2389 cat conftest.$ac_ext >&5
2390 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002391 ac_cv_sizeof_long=0
2392fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002393rm -fr conftest*
2394fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002395
2396fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002397echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2398cat >> confdefs.h <<EOF
2399#define SIZEOF_LONG $ac_cv_sizeof_long
2400EOF
2401
2402
Guido van Rossumad678af1998-10-02 14:42:15 +00002403echo $ac_n "checking size of void *""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002404echo "configure:2405: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002405if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002406 echo $ac_n "(cached) $ac_c" 1>&6
2407else
2408 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002409 ac_cv_sizeof_void_p=4
Guido van Rossumad678af1998-10-02 14:42:15 +00002410else
2411 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002412#line 2413 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002413#include "confdefs.h"
2414#include <stdio.h>
2415main()
2416{
2417 FILE *f=fopen("conftestval", "w");
2418 if (!f) exit(1);
2419 fprintf(f, "%d\n", sizeof(void *));
2420 exit(0);
2421}
2422EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002423if { (eval echo configure:2424: \"$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 +00002424then
2425 ac_cv_sizeof_void_p=`cat conftestval`
2426else
2427 echo "configure: failed program was:" >&5
2428 cat conftest.$ac_ext >&5
2429 rm -fr conftest*
2430 ac_cv_sizeof_void_p=0
2431fi
2432rm -fr conftest*
2433fi
2434
2435fi
2436echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2437cat >> confdefs.h <<EOF
2438#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2439EOF
2440
2441
Guido van Rossumef2255b2000-03-10 22:30:29 +00002442echo $ac_n "checking size of char""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002443echo "configure:2444: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002444if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002445 echo $ac_n "(cached) $ac_c" 1>&6
2446else
2447 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002448 ac_cv_sizeof_char=1
Guido van Rossumef2255b2000-03-10 22:30:29 +00002449else
2450 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002451#line 2452 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002452#include "confdefs.h"
2453#include <stdio.h>
2454main()
2455{
2456 FILE *f=fopen("conftestval", "w");
2457 if (!f) exit(1);
2458 fprintf(f, "%d\n", sizeof(char));
2459 exit(0);
2460}
2461EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002462if { (eval echo configure:2463: \"$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 +00002463then
2464 ac_cv_sizeof_char=`cat conftestval`
2465else
2466 echo "configure: failed program was:" >&5
2467 cat conftest.$ac_ext >&5
2468 rm -fr conftest*
2469 ac_cv_sizeof_char=0
2470fi
2471rm -fr conftest*
2472fi
2473
2474fi
2475echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2476cat >> confdefs.h <<EOF
2477#define SIZEOF_CHAR $ac_cv_sizeof_char
2478EOF
2479
2480
2481echo $ac_n "checking size of short""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002482echo "configure:2483: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002483if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002484 echo $ac_n "(cached) $ac_c" 1>&6
2485else
2486 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002487 ac_cv_sizeof_short=2
Guido van Rossumef2255b2000-03-10 22:30:29 +00002488else
2489 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002490#line 2491 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002491#include "confdefs.h"
2492#include <stdio.h>
2493main()
2494{
2495 FILE *f=fopen("conftestval", "w");
2496 if (!f) exit(1);
2497 fprintf(f, "%d\n", sizeof(short));
2498 exit(0);
2499}
2500EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002501if { (eval echo configure:2502: \"$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 +00002502then
2503 ac_cv_sizeof_short=`cat conftestval`
2504else
2505 echo "configure: failed program was:" >&5
2506 cat conftest.$ac_ext >&5
2507 rm -fr conftest*
2508 ac_cv_sizeof_short=0
2509fi
2510rm -fr conftest*
2511fi
2512
2513fi
2514echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2515cat >> confdefs.h <<EOF
2516#define SIZEOF_SHORT $ac_cv_sizeof_short
2517EOF
2518
2519
2520echo $ac_n "checking size of float""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002521echo "configure:2522: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002522if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002523 echo $ac_n "(cached) $ac_c" 1>&6
2524else
2525 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002526 ac_cv_sizeof_float=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00002527else
2528 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002529#line 2530 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002530#include "confdefs.h"
2531#include <stdio.h>
2532main()
2533{
2534 FILE *f=fopen("conftestval", "w");
2535 if (!f) exit(1);
2536 fprintf(f, "%d\n", sizeof(float));
2537 exit(0);
2538}
2539EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002540if { (eval echo configure:2541: \"$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 +00002541then
2542 ac_cv_sizeof_float=`cat conftestval`
2543else
2544 echo "configure: failed program was:" >&5
2545 cat conftest.$ac_ext >&5
2546 rm -fr conftest*
2547 ac_cv_sizeof_float=0
2548fi
2549rm -fr conftest*
2550fi
2551
2552fi
2553echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2554cat >> confdefs.h <<EOF
2555#define SIZEOF_FLOAT $ac_cv_sizeof_float
2556EOF
2557
2558
2559echo $ac_n "checking size of double""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002560echo "configure:2561: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002561if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002562 echo $ac_n "(cached) $ac_c" 1>&6
2563else
2564 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002565 ac_cv_sizeof_double=8
Guido van Rossumef2255b2000-03-10 22:30:29 +00002566else
2567 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002568#line 2569 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002569#include "confdefs.h"
2570#include <stdio.h>
2571main()
2572{
2573 FILE *f=fopen("conftestval", "w");
2574 if (!f) exit(1);
2575 fprintf(f, "%d\n", sizeof(double));
2576 exit(0);
2577}
2578EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002579if { (eval echo configure:2580: \"$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 +00002580then
2581 ac_cv_sizeof_double=`cat conftestval`
2582else
2583 echo "configure: failed program was:" >&5
2584 cat conftest.$ac_ext >&5
2585 rm -fr conftest*
2586 ac_cv_sizeof_double=0
2587fi
2588rm -fr conftest*
2589fi
2590
2591fi
2592echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2593cat >> confdefs.h <<EOF
2594#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2595EOF
2596
2597
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002598echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002599echo "configure:2600: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002600if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002601 echo $ac_n "(cached) $ac_c" 1>&6
2602else
2603 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002604 ac_cv_sizeof_fpos_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002605else
2606 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002607#line 2608 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002608#include "confdefs.h"
2609#include <stdio.h>
2610main()
2611{
2612 FILE *f=fopen("conftestval", "w");
2613 if (!f) exit(1);
2614 fprintf(f, "%d\n", sizeof(fpos_t));
2615 exit(0);
2616}
2617EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002618if { (eval echo configure:2619: \"$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 +00002619then
2620 ac_cv_sizeof_fpos_t=`cat conftestval`
2621else
2622 echo "configure: failed program was:" >&5
2623 cat conftest.$ac_ext >&5
2624 rm -fr conftest*
2625 ac_cv_sizeof_fpos_t=0
2626fi
2627rm -fr conftest*
2628fi
2629
2630fi
2631echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2632cat >> confdefs.h <<EOF
2633#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2634EOF
2635
2636
Guido van Rossum0a516c91994-09-12 10:58:40 +00002637
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002638echo $ac_n "checking for long long support""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002639echo "configure:2640: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002640have_long_long=no
2641cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002642#line 2643 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002643#include "confdefs.h"
2644
2645int main() {
2646long long x; x = (long long)0;
2647; return 0; }
2648EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002649if { (eval echo configure:2650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002650 rm -rf conftest*
2651 cat >> confdefs.h <<\EOF
2652#define HAVE_LONG_LONG 1
2653EOF
2654 have_long_long=yes
2655else
2656 echo "configure: failed program was:" >&5
2657 cat conftest.$ac_ext >&5
2658fi
2659rm -f conftest*
2660echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002661if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002662echo $ac_n "checking size of long long""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002663echo "configure:2664: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002664if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002665 echo $ac_n "(cached) $ac_c" 1>&6
2666else
2667 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002668 ac_cv_sizeof_long_long=8
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002669else
2670 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002671#line 2672 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002672#include "confdefs.h"
2673#include <stdio.h>
2674main()
2675{
2676 FILE *f=fopen("conftestval", "w");
2677 if (!f) exit(1);
2678 fprintf(f, "%d\n", sizeof(long long));
2679 exit(0);
2680}
2681EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002682if { (eval echo configure:2683: \"$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 +00002683then
2684 ac_cv_sizeof_long_long=`cat conftestval`
2685else
2686 echo "configure: failed program was:" >&5
2687 cat conftest.$ac_ext >&5
2688 rm -fr conftest*
2689 ac_cv_sizeof_long_long=0
2690fi
2691rm -fr conftest*
2692fi
2693
2694fi
2695echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2696cat >> confdefs.h <<EOF
2697#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2698EOF
2699
2700
2701fi
2702
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002703echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002704echo "configure:2705: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002705have_uintptr_t=no
2706cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002707#line 2708 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002708#include "confdefs.h"
2709
2710int main() {
2711uintptr_t x; x = (uintptr_t)0;
2712; return 0; }
2713EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002714if { (eval echo configure:2715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002715 rm -rf conftest*
2716 cat >> confdefs.h <<\EOF
2717#define HAVE_UINTPTR_T 1
2718EOF
2719 have_uintptr_t=yes
2720else
2721 echo "configure: failed program was:" >&5
2722 cat conftest.$ac_ext >&5
2723fi
2724rm -f conftest*
2725echo "$ac_t""$have_uintptr_t" 1>&6
2726if test "$have_uintptr_t" = yes ; then
2727echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002728echo "configure:2729: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002729if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002730 echo $ac_n "(cached) $ac_c" 1>&6
2731else
2732 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002733 ac_cv_sizeof_uintptr_t=4
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002734else
2735 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002736#line 2737 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002737#include "confdefs.h"
2738#include <stdio.h>
2739main()
2740{
2741 FILE *f=fopen("conftestval", "w");
2742 if (!f) exit(1);
2743 fprintf(f, "%d\n", sizeof(uintptr_t));
2744 exit(0);
2745}
2746EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002747if { (eval echo configure:2748: \"$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 +00002748then
2749 ac_cv_sizeof_uintptr_t=`cat conftestval`
2750else
2751 echo "configure: failed program was:" >&5
2752 cat conftest.$ac_ext >&5
2753 rm -fr conftest*
2754 ac_cv_sizeof_uintptr_t=0
2755fi
2756rm -fr conftest*
2757fi
2758
2759fi
2760echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2761cat >> confdefs.h <<EOF
2762#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2763EOF
2764
2765
2766fi
2767
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002768# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2769echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002770echo "configure:2771: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002771if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002772 echo $ac_n "(cached) $ac_c" 1>&6
2773else
2774 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002775 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002776else
2777 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002778#line 2779 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002779#include "confdefs.h"
2780#include <stdio.h>
2781#include <sys/types.h>
2782main()
2783{
2784 FILE *f=fopen("conftestval", "w");
2785 if (!f) exit(1);
2786 fprintf(f, "%d\n", sizeof(off_t));
2787 exit(0);
2788}
2789EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002790if { (eval echo configure:2791: \"$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 +00002791then
2792 ac_cv_sizeof_off_t=`cat conftestval`
2793else
2794 echo "configure: failed program was:" >&5
2795 cat conftest.$ac_ext >&5
2796 rm -fr conftest*
2797 ac_cv_sizeof_off_t=0
2798fi
2799rm -fr conftest*
2800fi
2801
2802
2803fi
2804
2805echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2806cat >> confdefs.h <<EOF
2807#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2808EOF
2809
2810
2811echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002812echo "configure:2813: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002813if test "$have_long_long" = yes -a \
2814 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2815 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002816 cat >> confdefs.h <<\EOF
2817#define HAVE_LARGEFILE_SUPPORT 1
2818EOF
2819
2820 echo "$ac_t""yes" 1>&6
2821else
2822 echo "$ac_t""no" 1>&6
2823fi
2824
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002825# AC_CHECK_SIZEOF() doesn't include <time.h>.
2826echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002827echo "configure:2828: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002828if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002829 echo $ac_n "(cached) $ac_c" 1>&6
2830else
2831 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002832 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002833else
2834 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002835#line 2836 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002836#include "confdefs.h"
2837#include <stdio.h>
2838#include <time.h>
2839main()
2840{
2841 FILE *f=fopen("conftestval", "w");
2842 if (!f) exit(1);
2843 fprintf(f, "%d\n", sizeof(time_t));
2844 exit(0);
2845}
2846EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002847if { (eval echo configure:2848: \"$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 +00002848then
2849 ac_cv_sizeof_time_t=`cat conftestval`
2850else
2851 echo "configure: failed program was:" >&5
2852 cat conftest.$ac_ext >&5
2853 rm -fr conftest*
2854 ac_cv_sizeof_time_t=0
2855fi
2856rm -fr conftest*
2857fi
2858
2859
2860fi
2861
2862echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2863cat >> confdefs.h <<EOF
2864#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2865EOF
2866
2867
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002868
Trent Mick635f6fb2000-08-23 21:33:05 +00002869# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002870ac_save_cc="$CC"
2871if test "$ac_cv_kpthread" = "yes"
2872then CC="$CC -Kpthread"
2873fi
Trent Mick635f6fb2000-08-23 21:33:05 +00002874echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002875echo "configure:2876: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002876have_pthread_t=no
2877cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002878#line 2879 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002879#include "confdefs.h"
2880#include <pthread.h>
2881int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002882pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002883; return 0; }
2884EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002885if { (eval echo configure:2886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002886 rm -rf conftest*
2887 have_pthread_t=yes
2888else
2889 echo "configure: failed program was:" >&5
2890 cat conftest.$ac_ext >&5
2891fi
2892rm -f conftest*
2893echo "$ac_t""$have_pthread_t" 1>&6
2894if test "$have_pthread_t" = yes ; then
2895 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2896 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002897echo "configure:2898: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002898 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002899 echo $ac_n "(cached) $ac_c" 1>&6
2900else
2901 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00002902 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00002903else
2904 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002905#line 2906 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002906#include "confdefs.h"
2907#include <stdio.h>
2908 #include <pthread.h>
2909 main()
2910 {
2911 FILE *f=fopen("conftestval", "w");
2912 if (!f) exit(1);
2913 fprintf(f, "%d\n", sizeof(pthread_t));
2914 exit(0);
2915 }
2916EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002917if { (eval echo configure:2918: \"$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 +00002918then
2919 ac_cv_sizeof_pthread_t=`cat conftestval`
2920else
2921 echo "configure: failed program was:" >&5
2922 cat conftest.$ac_ext >&5
2923 rm -fr conftest*
2924 ac_cv_sizeof_pthread_t=0
2925fi
2926rm -fr conftest*
2927fi
2928
2929
2930fi
2931
2932 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2933 cat >> confdefs.h <<EOF
2934#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2935EOF
2936
2937fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00002938CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00002939
Jack Jansene578a632001-08-15 01:27:14 +00002940echo $ac_n "checking for --enable-toolbox-glue""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002941echo "configure:2942: checking for --enable-toolbox-glue" >&5
Jack Jansene578a632001-08-15 01:27:14 +00002942# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
2943if test "${enable_toolbox_glue+set}" = set; then
2944 enableval="$enable_toolbox_glue"
2945 :
2946fi
2947
2948
2949if test -z "$enable_toolbox_glue"
2950then
2951 case $ac_sys_system/$ac_sys_release in
2952 Darwin/*)
2953 enable_toolbox_glue="yes";;
2954 *)
2955 enable_toolbox_glue="no";;
2956 esac
2957fi
2958case "$enable_toolbox_glue" in
2959yes)
2960 extra_frameworks="-framework Carbon -framework Foundation"
2961 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00002962 extra_undefs="-u __dummy -u _PyMac_Error"
Jack Jansene578a632001-08-15 01:27:14 +00002963 cat >> confdefs.h <<\EOF
2964#define USE_TOOLBOX_OBJECT_GLUE 1
2965EOF
2966
2967 ;;
2968*)
2969 extra_frameworks=""
2970 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00002971 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00002972 ;;
2973esac
2974echo "$ac_t""$enable_toolbox_glue" 1>&6
2975
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002976
2977case $ac_sys_system/$ac_sys_release in
Jack Jansena3891ea2001-09-07 14:25:12 +00002978 Darwin/1.4*)
2979 ns_undef_sym='_environ'
2980 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -flat_namespace -U $ns_undef_sym"
2981 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
2982 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
2983 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00002984 Darwin/*)
2985 ns_undef_sym='_environ'
Jack Jansene578a632001-08-15 01:27:14 +00002986 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym"
2987 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
2988 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/Python'
2989 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002990esac
2991
Jack Jansene578a632001-08-15 01:27:14 +00002992echo $ac_n "checking for --enable-framework""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00002993echo "configure:2994: checking for --enable-framework" >&5
Jack Jansene578a632001-08-15 01:27:14 +00002994if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002995then
Jack Jansenca06bc62001-08-03 15:32:23 +00002996 OPT="$OPT -fno-common -dynamic"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002997 # -U __environ is needed since bundles don't have access
2998 # to crt0 when built but will always be linked against it
Jack Jansene578a632001-08-15 01:27:14 +00002999 # -F. is needed to allow linking to the framework while
3000 # in the build location.
3001
Jack Jansena3891ea2001-09-07 14:25:12 +00003002 case $ac_sys_system/$ac_sys_release in
3003 Darwin/1.4*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-flat_namespace,-U,$ns_undef_sym";;
3004 Darwin/*)LDFLAGS="$LDFLAGS -Wl,-F. -Wl,-U,$ns_undef_sym";;
3005 esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003006 cat >> confdefs.h <<\EOF
3007#define WITH_NEXT_FRAMEWORK 1
3008EOF
3009
3010 echo "$ac_t""yes" 1>&6
3011else
3012 echo "$ac_t""no" 1>&6
3013fi
3014
Jack Jansene578a632001-08-15 01:27:14 +00003015echo $ac_n "checking for dyld""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003016echo "configure:3017: checking for dyld" >&5
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003017case $ac_sys_system/$ac_sys_release in
3018 Darwin/*)
3019 cat >> confdefs.h <<\EOF
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003020#define WITH_DYLD 1
3021EOF
3022
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003023 echo "$ac_t""always on for Darwin" 1>&6
3024 ;;
3025 *)
Jack Jansene578a632001-08-15 01:27:14 +00003026 echo "$ac_t""no" 1>&6
3027 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003028esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003029
Guido van Rossum0a516c91994-09-12 10:58:40 +00003030# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00003031
3032
3033
3034
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003035
Guido van Rossum0a516c91994-09-12 10:58:40 +00003036# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00003037# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003038echo $ac_n "checking SO""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003039echo "configure:3040: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003040if test -z "$SO"
3041then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003042 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00003043 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003044 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00003045 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003046 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003047fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003048echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003049# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003050# -- "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 +00003051# (Shared libraries in this instance are shared modules to be loaded into
3052# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003053echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003054echo "configure:3055: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003055if test -z "$LDSHARED"
3056then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003057 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003058 AIX*)
3059 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00003060 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003061 ;;
3062 BeOS*)
3063 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00003064 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003065 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00003066 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00003067 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003068 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00003069 SunOS/5*)
3070 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00003071 then LDSHARED='$(CC) -shared'
Martin v. Löwis5b718fc2001-09-10 15:34:42 +00003072 else LDSHARED="$(CC) -G";
Greg Ward57c9a6632000-05-26 12:22:54 +00003073 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003074 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00003075 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
3076 DYNIX/ptx*) LDSHARED="ld -G";;
Jack Jansena3891ea2001-09-07 14:25:12 +00003077 Darwin/1.4*)
3078 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3079 if test "$enable_framework" ; then
3080 # Link against the framework. All externals should be defined.
3081 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3082 else
3083 # No framework. Ignore undefined symbols, assuming they come from Python
3084 LDSHARED="$LDSHARED -flat_namespace -undefined suppress"
3085 fi ;;
Jack Jansene578a632001-08-15 01:27:14 +00003086 Darwin/*)
3087 LDSHARED='$(CC) $(LDFLAGS) -bundle'
3088 if test "$enable_framework" ; then
3089 # Link against the framework. All externals should be defined.
3090 LDSHARED="$LDSHARED "'-framework $(PYTHONFRAMEWORK)'
3091 else
3092 # No framework. Ignore undefined symbols, assuming they come from Python
3093 LDSHARED="$LDSHARED -undefined suppress"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003094 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00003095 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00003096 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00003097 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003098 OpenBSD*|NetBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00003099 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00003100 then
3101 LDSHARED="cc -shared ${LDFLAGS}"
3102 else
3103 LDSHARED="ld -Bshareable ${LDFLAGS}"
3104 fi;;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003105 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003106 if test "$GCC" = "yes"
3107 then LDSHARED="$(CC) -shared"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003108 else LDSHARED="$(CC) -G"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003109 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003110 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003111 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003112 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003113 *) LDSHARED="ld";;
3114 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003115fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003116echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003117BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00003118# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003119# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003120echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003121echo "configure:3122: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003122if test -z "$CCSHARED"
3123then
Guido van Rossum07397971997-04-29 21:49:50 +00003124 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00003125 SunOS*) if test "$GCC" = yes;
3126 then CCSHARED="-fPIC";
3127 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00003128 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00003129 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00003130 else CCSHARED="+z";
3131 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003132 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003133 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003134 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003135 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00003136 if test "$GCC" = "yes"
3137 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003138 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00003139 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003140 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003141 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003142 IRIX*/6*) case $CC in
3143 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003144 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003145 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003146 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003147 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003148fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003149echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003150# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003151# the python executable -- this is only needed for a few systems
3152echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003153echo "configure:3154: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003154if test -z "$LINKFORSHARED"
3155then
Guido van Rossum07397971997-04-29 21:49:50 +00003156 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003157 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003158 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003159 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003160 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00003161 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003162 # -u libsys_s pulls in all symbols in libsys
Jack Jansene578a632001-08-15 01:27:14 +00003163 Darwin/*)
3164 # -u __dummy makes the linker aware of the objc runtime
3165 # in System.framework; otherwise, __objcInit (referenced in
3166 # crt1.o) gets erroneously defined as common, which breaks dynamic
3167 # loading of any modules which reference it in System.framework.
3168 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
3169 # not used by the core itself but which needs to be in the core so
3170 # that dynamically loaded extension modules have access to it.
Jack Jansen591cbed2001-08-15 13:55:15 +00003171 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00003172 if test "$enable_framework"
3173 then
3174 LINKFORSHARED="$LINKFORSHARED -framework Python"
3175 fi
3176 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00003177 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003178 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003179 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00003180 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003181 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3182 then
3183 LINKFORSHARED="-Wl,--export-dynamic"
3184 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003185 SunOS/5*) case $CC in
3186 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003187 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003188 then
3189 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003190 fi;;
3191 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003192 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003193fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003194echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003195
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003196
3197echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003198echo "configure:3199: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003199if test ! "$LIBRARY" = "$LDLIBRARY"
3200then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003201 case $ac_sys_system in
3202 CYGWIN*)
3203 # Cygwin needs CCSHARED when building extension DLLs
3204 # but not when building the interpreter DLL.
3205 CFLAGSFORSHARED='';;
3206 *)
3207 CFLAGSFORSHARED='$(CCSHARED)'
3208 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003209fi
3210echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3211
Guido van Rossum627b2d71993-12-24 10:39:16 +00003212# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003213echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003214echo "configure:3215: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003215ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003216if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003217 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003218else
3219 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003220LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003221cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003222#line 3223 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003223#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003224/* Override any gcc2 internal prototype to avoid an error. */
3225/* We use char because int might match the return type of a gcc2
3226 builtin and then its argument prototype would still apply. */
3227char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003228
Guido van Rossumf78abae1997-01-21 22:02:36 +00003229int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003230dlopen()
3231; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003232EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003233if { (eval echo configure:3234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003234 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003235 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003236else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003237 echo "configure: failed program was:" >&5
3238 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003239 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003240 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003241fi
3242rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003243LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003244
Guido van Rossum627b2d71993-12-24 10:39:16 +00003245fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003246if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003247 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003248 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3249 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003250 cat >> confdefs.h <<EOF
3251#define $ac_tr_lib 1
3252EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003253
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003254 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003255
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003256else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003257 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003258fi
3259 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003260echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003261echo "configure:3262: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003262ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003263if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003264 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003265else
3266 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003267LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003268cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003269#line 3270 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003270#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003271/* Override any gcc2 internal prototype to avoid an error. */
3272/* We use char because int might match the return type of a gcc2
3273 builtin and then its argument prototype would still apply. */
3274char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003275
Guido van Rossumf78abae1997-01-21 22:02:36 +00003276int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003277shl_load()
3278; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003279EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003280if { (eval echo configure:3281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003281 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003282 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003283else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003284 echo "configure: failed program was:" >&5
3285 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003286 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003287 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003288fi
3289rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003290LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003291
Guido van Rossum627b2d71993-12-24 10:39:16 +00003292fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003293if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003294 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003295 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3296 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003297 cat >> confdefs.h <<EOF
3298#define $ac_tr_lib 1
3299EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003300
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003301 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003302
3303else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003304 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003305fi
3306 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003307
3308# checks for system dependent C++ extensions support
3309case "$ac_sys_system" in
3310 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003311echo "configure:3312: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003312 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003313#line 3314 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003314#include "confdefs.h"
3315#include "/usr/lpp/xlC/include/load.h"
3316int main() {
3317loadAndInit("", 0, "")
3318; return 0; }
3319EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003320if { (eval echo configure:3321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003321 rm -rf conftest*
3322 cat >> confdefs.h <<\EOF
3323#define AIX_GENUINE_CPLUSPLUS 1
3324EOF
3325
3326 echo "$ac_t""yes" 1>&6
3327else
3328 echo "configure: failed program was:" >&5
3329 cat conftest.$ac_ext >&5
3330 rm -rf conftest*
3331 echo "$ac_t""no" 1>&6
3332fi
3333rm -f conftest*;;
3334 *) ;;
3335esac
3336
Guido van Rossum70c7f481998-03-26 18:44:10 +00003337# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3338# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003339# BeOS' sockets are stashed in libnet.
3340case "$ac_sys_system" in
3341IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003342*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003343echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003344echo "configure:3345: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003345ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003346if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003347 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003348else
3349 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003350LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003351cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003352#line 3353 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003353#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003354/* Override any gcc2 internal prototype to avoid an error. */
3355/* We use char because int might match the return type of a gcc2
3356 builtin and then its argument prototype would still apply. */
3357char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003358
Guido van Rossumf78abae1997-01-21 22:02:36 +00003359int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003360t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003361; return 0; }
3362EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003363if { (eval echo configure:3364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003364 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003365 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003366else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003367 echo "configure: failed program was:" >&5
3368 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003369 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003370 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003371fi
3372rm -f conftest*
3373LIBS="$ac_save_LIBS"
3374
3375fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003376if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003377 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003378 LIBS="-lnsl $LIBS"
3379else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003380 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003381fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003382 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003383echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003384echo "configure:3385: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003385ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003386if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003387 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003388else
3389 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003390LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003391cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003392#line 3393 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003393#include "confdefs.h"
3394/* Override any gcc2 internal prototype to avoid an error. */
3395/* We use char because int might match the return type of a gcc2
3396 builtin and then its argument prototype would still apply. */
3397char socket();
3398
3399int main() {
3400socket()
3401; return 0; }
3402EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003403if { (eval echo configure:3404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003404 rm -rf conftest*
3405 eval "ac_cv_lib_$ac_lib_var=yes"
3406else
3407 echo "configure: failed program was:" >&5
3408 cat conftest.$ac_ext >&5
3409 rm -rf conftest*
3410 eval "ac_cv_lib_$ac_lib_var=no"
3411fi
3412rm -f conftest*
3413LIBS="$ac_save_LIBS"
3414
3415fi
3416if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3417 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003418 LIBS="-lsocket $LIBS"
3419else
3420 echo "$ac_t""no" 1>&6
3421fi
3422 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003423;;
3424esac
3425case "$ac_sys_system" in
3426BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003427echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003428echo "configure:3429: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003429ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003430if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003431 echo $ac_n "(cached) $ac_c" 1>&6
3432else
3433 ac_save_LIBS="$LIBS"
3434LIBS="-lnet $LIBS $LIBS"
3435cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003436#line 3437 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003437#include "confdefs.h"
3438/* Override any gcc2 internal prototype to avoid an error. */
3439/* We use char because int might match the return type of a gcc2
3440 builtin and then its argument prototype would still apply. */
3441char socket();
3442
3443int main() {
3444socket()
3445; return 0; }
3446EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003447if { (eval echo configure:3448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003448 rm -rf conftest*
3449 eval "ac_cv_lib_$ac_lib_var=yes"
3450else
3451 echo "configure: failed program was:" >&5
3452 cat conftest.$ac_ext >&5
3453 rm -rf conftest*
3454 eval "ac_cv_lib_$ac_lib_var=no"
3455fi
3456rm -f conftest*
3457LIBS="$ac_save_LIBS"
3458
3459fi
3460if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3461 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003462 LIBS="-lnet $LIBS"
3463else
3464 echo "$ac_t""no" 1>&6
3465fi
3466 # BeOS
3467;;
3468esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003469
Guido van Rossuma68acba1996-07-31 17:36:39 +00003470echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003471echo "configure:3472: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003472# Check whether --with-libs or --without-libs was given.
3473if test "${with_libs+set}" = set; then
3474 withval="$with_libs"
3475
3476echo "$ac_t""$withval" 1>&6
3477LIBS="$withval $LIBS"
3478
3479else
3480 echo "$ac_t""no" 1>&6
3481fi
3482
Guido van Rossum7f43da71994-08-01 12:15:30 +00003483
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003484# Determine if signalmodule should be used.
3485
3486
3487echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003488echo "configure:3489: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003489# Check whether --with-signal-module or --without-signal-module was given.
3490if test "${with_signal_module+set}" = set; then
3491 withval="$with_signal_module"
3492 :
3493fi
3494
3495
3496if test -z "$with_signal_module"
3497then with_signal_module="yes"
3498fi
3499echo "$ac_t""$with_signal_module" 1>&6
3500
3501if test "${with_signal_module}" = "yes"; then
3502 USE_SIGNAL_MODULE=""
3503 SIGNAL_OBJS=""
3504else
3505 USE_SIGNAL_MODULE="#"
3506 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3507fi
3508
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003509# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003510
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003511USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003512
Guido van Rossumec2f0731997-01-22 20:54:01 +00003513echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003514echo "configure:3515: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003515
3516# Check whether --with-dec-threads or --without-dec-threads was given.
3517if test "${with_dec_threads+set}" = set; then
3518 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003519
3520echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003521LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003522if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003523 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003524fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003525else
3526 echo "$ac_t""no" 1>&6
3527fi
3528
3529
3530echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003531echo "configure:3532: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003532# Check whether --with-threads or --without-threads was given.
3533if test "${with_threads+set}" = set; then
3534 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003535 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003536fi
3537
3538
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003539# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003540# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003541if test "${with_thread+set}" = set; then
3542 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003543
3544with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003545fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003546
3547
3548if test -z "$with_threads"
3549then with_threads="yes"
3550fi
3551echo "$ac_t""$with_threads" 1>&6
3552
3553if test "$with_threads" = "no"
3554then
3555 USE_THREAD_MODULE="#"
Martin v. Löwis130fb172001-07-19 11:00:41 +00003556elif test "$ac_cv_kpthread" = "yes"
3557then
3558 CC="$CC -Kpthread"
3559 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003560#define WITH_THREAD 1
3561EOF
3562
Martin v. Löwis130fb172001-07-19 11:00:41 +00003563 cat >> confdefs.h <<\EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003564#define _POSIX_THREADS 1
3565EOF
3566
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003567 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003568 LIBOBJS="$LIBOBJS thread.o"
3569else
3570 if test ! -z "$with_threads" -a -d "$with_threads"
3571 then LDFLAGS="$LDFLAGS -L$with_threads"
3572 fi
3573 if test ! -z "$withval" -a -d "$withval"
3574 then LDFLAGS="$LDFLAGS -L$withval"
3575 fi
3576 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003577#define _REENTRANT 1
3578EOF
3579
Martin v. Löwis130fb172001-07-19 11:00:41 +00003580 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003581echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003582echo "configure:3583: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003583if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003584 echo $ac_n "(cached) $ac_c" 1>&6
3585else
3586 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003587#line 3588 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003588#include "confdefs.h"
3589#include <mach/cthreads.h>
3590EOF
3591ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003592{ (eval echo configure:3593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003593ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003594if test -z "$ac_err"; then
3595 rm -rf conftest*
3596 eval "ac_cv_header_$ac_safe=yes"
3597else
3598 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003599 echo "configure: failed program was:" >&5
3600 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003601 rm -rf conftest*
3602 eval "ac_cv_header_$ac_safe=no"
3603fi
3604rm -f conftest*
3605fi
3606if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3607 echo "$ac_t""yes" 1>&6
3608 cat >> confdefs.h <<\EOF
3609#define WITH_THREAD 1
3610EOF
3611
Martin v. Löwis130fb172001-07-19 11:00:41 +00003612 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003613#define C_THREADS 1
3614EOF
3615
Martin v. Löwis130fb172001-07-19 11:00:41 +00003616 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003617else
3618 echo "$ac_t""no" 1>&6
3619
Martin v. Löwis130fb172001-07-19 11:00:41 +00003620 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003621echo "configure:3622: checking for --with-pth" >&5
Martin v. Löwis130fb172001-07-19 11:00:41 +00003622 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003623if test "${with_pth+set}" = set; then
3624 withval="$with_pth"
3625
Martin v. Löwis130fb172001-07-19 11:00:41 +00003626 echo "$ac_t""$withval" 1>&6
3627 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003628#define WITH_THREAD 1
3629EOF
3630
Martin v. Löwis130fb172001-07-19 11:00:41 +00003631 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003632#define HAVE_PTH 1
3633EOF
3634
Martin v. Löwis130fb172001-07-19 11:00:41 +00003635 LIBS="-lpth $LIBS"
3636 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003637else
3638
Martin v. Löwis130fb172001-07-19 11:00:41 +00003639 echo "$ac_t""no" 1>&6
3640 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003641echo "configure:3642: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003642ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003643if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003644 echo $ac_n "(cached) $ac_c" 1>&6
3645else
3646 ac_save_LIBS="$LIBS"
3647LIBS="-lpthread $LIBS"
3648cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003649#line 3650 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003650#include "confdefs.h"
3651/* Override any gcc2 internal prototype to avoid an error. */
3652/* We use char because int might match the return type of a gcc2
3653 builtin and then its argument prototype would still apply. */
3654char pthread_create();
3655
3656int main() {
3657pthread_create()
3658; return 0; }
3659EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003660if { (eval echo configure:3661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003661 rm -rf conftest*
3662 eval "ac_cv_lib_$ac_lib_var=yes"
3663else
3664 echo "configure: failed program was:" >&5
3665 cat conftest.$ac_ext >&5
3666 rm -rf conftest*
3667 eval "ac_cv_lib_$ac_lib_var=no"
3668fi
3669rm -f conftest*
3670LIBS="$ac_save_LIBS"
3671
3672fi
3673if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3674 echo "$ac_t""yes" 1>&6
3675 cat >> confdefs.h <<\EOF
3676#define WITH_THREAD 1
3677EOF
3678
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003679 case $ac_sys_system in
3680 Darwin*) ;;
3681 *) cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003682#define _POSIX_THREADS 1
3683EOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003684
3685 posix_threads=yes
3686 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003687 esac
Martin v. Löwis130fb172001-07-19 11:00:41 +00003688 LIBS="-lpthread $LIBS"
3689 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003690else
3691 echo "$ac_t""no" 1>&6
3692
Martin v. Löwis130fb172001-07-19 11:00:41 +00003693 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003694echo "configure:3695: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003695if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003696 echo $ac_n "(cached) $ac_c" 1>&6
3697else
3698 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003699#line 3700 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003700#include "confdefs.h"
3701/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003702 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003703#include <assert.h>
3704/* Override any gcc2 internal prototype to avoid an error. */
3705/* We use char because int might match the return type of a gcc2
3706 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003707char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003708
3709int main() {
3710
3711/* The GNU C library defines this for functions which it implements
3712 to always fail with ENOSYS. Some functions are actually named
3713 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003714#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003715choke me
3716#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003717pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003718#endif
3719
3720; return 0; }
3721EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003722if { (eval echo configure:3723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003723 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003724 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003725else
3726 echo "configure: failed program was:" >&5
3727 cat conftest.$ac_ext >&5
3728 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003729 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003730fi
3731rm -f conftest*
3732fi
3733
Guido van Rossumea516321998-12-17 18:08:55 +00003734if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003735 echo "$ac_t""yes" 1>&6
3736 cat >> confdefs.h <<\EOF
3737#define WITH_THREAD 1
3738EOF
3739
Martin v. Löwis130fb172001-07-19 11:00:41 +00003740 case $ac_sys_system in
3741 Darwin*) ;;
3742 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003743#define _POSIX_THREADS 1
3744EOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003745
3746 posix_threads=yes
3747 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003748 esac
3749 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003750else
3751 echo "$ac_t""no" 1>&6
3752
Martin v. Löwis130fb172001-07-19 11:00:41 +00003753 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003754echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003755echo "configure:3756: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003756if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003757 echo $ac_n "(cached) $ac_c" 1>&6
3758else
3759 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003760#line 3761 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003761#include "confdefs.h"
3762#include <kernel/OS.h>
3763EOF
3764ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003765{ (eval echo configure:3766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003766ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003767if test -z "$ac_err"; then
3768 rm -rf conftest*
3769 eval "ac_cv_header_$ac_safe=yes"
3770else
3771 echo "$ac_err" >&5
3772 echo "configure: failed program was:" >&5
3773 cat conftest.$ac_ext >&5
3774 rm -rf conftest*
3775 eval "ac_cv_header_$ac_safe=no"
3776fi
3777rm -f conftest*
3778fi
3779if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3780 echo "$ac_t""yes" 1>&6
3781 cat >> confdefs.h <<\EOF
3782#define WITH_THREAD 1
3783EOF
3784
Martin v. Löwis130fb172001-07-19 11:00:41 +00003785 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003786#define BEOS_THREADS 1
3787EOF
3788
Martin v. Löwis130fb172001-07-19 11:00:41 +00003789 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003790else
3791 echo "$ac_t""no" 1>&6
3792
Martin v. Löwis130fb172001-07-19 11:00:41 +00003793 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003794echo "configure:3795: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003795ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003796if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003797 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003798else
3799 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003800LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003801cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003802#line 3803 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003803#include "confdefs.h"
3804/* Override any gcc2 internal prototype to avoid an error. */
3805/* We use char because int might match the return type of a gcc2
3806 builtin and then its argument prototype would still apply. */
3807char pthread_create();
3808
3809int main() {
3810pthread_create()
3811; return 0; }
3812EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003813if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003814 rm -rf conftest*
3815 eval "ac_cv_lib_$ac_lib_var=yes"
3816else
3817 echo "configure: failed program was:" >&5
3818 cat conftest.$ac_ext >&5
3819 rm -rf conftest*
3820 eval "ac_cv_lib_$ac_lib_var=no"
3821fi
3822rm -f conftest*
3823LIBS="$ac_save_LIBS"
3824
3825fi
3826if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3827 echo "$ac_t""yes" 1>&6
3828 cat >> confdefs.h <<\EOF
3829#define WITH_THREAD 1
3830EOF
3831
Martin v. Löwis130fb172001-07-19 11:00:41 +00003832 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003833#define _POSIX_THREADS 1
3834EOF
3835
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003836 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003837 LIBS="$LIBS -lpthreads"
3838 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003839else
3840 echo "$ac_t""no" 1>&6
3841
Martin v. Löwis130fb172001-07-19 11:00:41 +00003842 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003843echo "configure:3844: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003844ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003845if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003846 echo $ac_n "(cached) $ac_c" 1>&6
3847else
3848 ac_save_LIBS="$LIBS"
3849LIBS="-lc_r $LIBS"
3850cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003851#line 3852 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003852#include "confdefs.h"
3853/* Override any gcc2 internal prototype to avoid an error. */
3854/* We use char because int might match the return type of a gcc2
3855 builtin and then its argument prototype would still apply. */
3856char pthread_create();
3857
3858int main() {
3859pthread_create()
3860; return 0; }
3861EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003862if { (eval echo configure:3863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003863 rm -rf conftest*
3864 eval "ac_cv_lib_$ac_lib_var=yes"
3865else
3866 echo "configure: failed program was:" >&5
3867 cat conftest.$ac_ext >&5
3868 rm -rf conftest*
3869 eval "ac_cv_lib_$ac_lib_var=no"
3870fi
3871rm -f conftest*
3872LIBS="$ac_save_LIBS"
3873
3874fi
3875if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3876 echo "$ac_t""yes" 1>&6
3877 cat >> confdefs.h <<\EOF
3878#define WITH_THREAD 1
3879EOF
3880
Martin v. Löwis130fb172001-07-19 11:00:41 +00003881 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003882#define _POSIX_THREADS 1
3883EOF
3884
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003885 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003886 LIBS="$LIBS -lc_r"
3887 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003888else
3889 echo "$ac_t""no" 1>&6
3890
Martin v. Löwis130fb172001-07-19 11:00:41 +00003891 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003892echo "configure:3893: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003893ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003894if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003895 echo $ac_n "(cached) $ac_c" 1>&6
3896else
3897 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003898LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003899cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003900#line 3901 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003901#include "confdefs.h"
3902/* Override any gcc2 internal prototype to avoid an error. */
3903/* We use char because int might match the return type of a gcc2
3904 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003905char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003906
3907int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003908__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003909; return 0; }
3910EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003911if { (eval echo configure:3912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003912 rm -rf conftest*
3913 eval "ac_cv_lib_$ac_lib_var=yes"
3914else
3915 echo "configure: failed program was:" >&5
3916 cat conftest.$ac_ext >&5
3917 rm -rf conftest*
3918 eval "ac_cv_lib_$ac_lib_var=no"
3919fi
3920rm -f conftest*
3921LIBS="$ac_save_LIBS"
3922
3923fi
3924if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3925 echo "$ac_t""yes" 1>&6
3926 cat >> confdefs.h <<\EOF
3927#define WITH_THREAD 1
3928EOF
3929
Martin v. Löwis130fb172001-07-19 11:00:41 +00003930 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003931#define _POSIX_THREADS 1
3932EOF
3933
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003934 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003935 LIBS="$LIBS -lthread"
3936 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003937else
3938 echo "$ac_t""no" 1>&6
3939
Martin v. Löwis130fb172001-07-19 11:00:41 +00003940 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003941echo "configure:3942: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003942ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3943if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3944 echo $ac_n "(cached) $ac_c" 1>&6
3945else
3946 ac_save_LIBS="$LIBS"
3947LIBS="-lpthread $LIBS"
3948cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003949#line 3950 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003950#include "confdefs.h"
3951/* Override any gcc2 internal prototype to avoid an error. */
3952/* We use char because int might match the return type of a gcc2
3953 builtin and then its argument prototype would still apply. */
3954char __pthread_create_system();
3955
3956int main() {
3957__pthread_create_system()
3958; return 0; }
3959EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003960if { (eval echo configure:3961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003961 rm -rf conftest*
3962 eval "ac_cv_lib_$ac_lib_var=yes"
3963else
3964 echo "configure: failed program was:" >&5
3965 cat conftest.$ac_ext >&5
3966 rm -rf conftest*
3967 eval "ac_cv_lib_$ac_lib_var=no"
3968fi
3969rm -f conftest*
3970LIBS="$ac_save_LIBS"
3971
3972fi
3973if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3974 echo "$ac_t""yes" 1>&6
3975 cat >> confdefs.h <<\EOF
3976#define WITH_THREAD 1
3977EOF
3978
Martin v. Löwis130fb172001-07-19 11:00:41 +00003979 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003980#define _POSIX_THREADS 1
3981EOF
3982
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00003983 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00003984 LIBS="$LIBS -lpthread"
3985 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003986else
3987 echo "$ac_t""no" 1>&6
3988
Martin v. Löwis130fb172001-07-19 11:00:41 +00003989 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003990echo "configure:3991: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003991ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003992if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003993 echo $ac_n "(cached) $ac_c" 1>&6
3994else
3995 ac_save_LIBS="$LIBS"
3996LIBS="-lcma $LIBS"
3997cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003998#line 3999 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003999#include "confdefs.h"
4000/* Override any gcc2 internal prototype to avoid an error. */
4001/* We use char because int might match the return type of a gcc2
4002 builtin and then its argument prototype would still apply. */
4003char pthread_create();
4004
4005int main() {
4006pthread_create()
4007; return 0; }
4008EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004009if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00004010 rm -rf conftest*
4011 eval "ac_cv_lib_$ac_lib_var=yes"
4012else
4013 echo "configure: failed program was:" >&5
4014 cat conftest.$ac_ext >&5
4015 rm -rf conftest*
4016 eval "ac_cv_lib_$ac_lib_var=no"
4017fi
4018rm -f conftest*
4019LIBS="$ac_save_LIBS"
4020
4021fi
4022if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4023 echo "$ac_t""yes" 1>&6
4024 cat >> confdefs.h <<\EOF
4025#define WITH_THREAD 1
4026EOF
4027
Martin v. Löwis130fb172001-07-19 11:00:41 +00004028 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00004029#define _POSIX_THREADS 1
4030EOF
4031
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004032 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00004033 LIBS="$LIBS -lcma"
4034 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00004035else
4036 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00004037
Martin v. Löwis130fb172001-07-19 11:00:41 +00004038 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00004039fi
4040
Martin v. Löwis130fb172001-07-19 11:00:41 +00004041
Guido van Rossum627b2d71993-12-24 10:39:16 +00004042fi
4043
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004044fi
4045
Guido van Rossum0be3e491997-05-22 20:33:33 +00004046fi
4047
Guido van Rossum49545951997-12-02 19:28:29 +00004048fi
4049
Guido van Rossumb93a8621998-05-07 13:27:32 +00004050fi
4051
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004052fi
4053
Guido van Rossumad678af1998-10-02 14:42:15 +00004054fi
4055
Guido van Rossum07bd90e2000-05-08 13:41:38 +00004056fi
4057
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004058fi
4059
Guido van Rossum0be3e491997-05-22 20:33:33 +00004060
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004061 if test "$posix_threads" = "yes"; then
4062 echo $ac_n "checking if PTHREAD_SCOPE_SYSTEM is supported""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004063echo "configure:4064: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004064 if eval "test \"`echo '$''{'ac_cv_pthread_system_supported'+set}'`\" = set"; then
4065 echo $ac_n "(cached) $ac_c" 1>&6
4066else
4067 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004068 ac_cv_pthread_system_supported=no
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004069else
4070 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004071#line 4072 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004072#include "confdefs.h"
4073#include <pthread.h>
4074 void *foo(void *parm) {
4075 return NULL;
4076 }
4077 main() {
4078 pthread_attr_t attr;
4079 if (pthread_attr_init(&attr)) exit(-1);
4080 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
4081 if (pthread_create(NULL, &attr, foo, NULL)) exit(-1);
4082 exit(0);
4083 }
4084EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004085if { (eval echo configure:4086: \"$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 +00004086then
4087 ac_cv_pthread_system_supported=yes
4088else
4089 echo "configure: failed program was:" >&5
4090 cat conftest.$ac_ext >&5
4091 rm -fr conftest*
4092 ac_cv_pthread_system_supported=no
4093fi
4094rm -fr conftest*
4095fi
4096
4097
4098fi
4099
4100 echo "$ac_t""$ac_cv_pthread_system_supported" 1>&6
4101 if test "$ac_cv_pthread_system_supported" = "yes"; then
4102 cat >> confdefs.h <<\EOF
4103#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
4104EOF
4105
4106 fi
4107 fi
4108
Martin v. Löwis130fb172001-07-19 11:00:41 +00004109 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004110echo "configure:4111: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004111ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004112if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004113 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004114else
4115 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004116LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004117cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004118#line 4119 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004119#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004120/* Override any gcc2 internal prototype to avoid an error. */
4121/* We use char because int might match the return type of a gcc2
4122 builtin and then its argument prototype would still apply. */
4123char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004124
Guido van Rossumf78abae1997-01-21 22:02:36 +00004125int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004126usconfig()
4127; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004128EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004129if { (eval echo configure:4130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004130 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004131 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004132else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004133 echo "configure: failed program was:" >&5
4134 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004135 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004136 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004137fi
4138rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004139LIBS="$ac_save_LIBS"
4140
4141fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004142if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004143 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004144 cat >> confdefs.h <<\EOF
4145#define WITH_THREAD 1
4146EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004147
Martin v. Löwis130fb172001-07-19 11:00:41 +00004148 LIBS="$LIBS -lmpc"
4149 LIBOBJS="$LIBOBJS thread.o"
4150 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004151else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004152 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004153fi
4154
Martin v. Löwis130fb172001-07-19 11:00:41 +00004155 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004156echo "configure:4157: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00004157ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004158if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004159 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004160else
4161 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004162LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004163cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004164#line 4165 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004165#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004166/* Override any gcc2 internal prototype to avoid an error. */
4167/* We use char because int might match the return type of a gcc2
4168 builtin and then its argument prototype would still apply. */
4169char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004170
Guido van Rossumf78abae1997-01-21 22:02:36 +00004171int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004172thr_create()
4173; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004174EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004175if { (eval echo configure:4176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004176 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004177 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004178else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004179 echo "configure: failed program was:" >&5
4180 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004181 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004182 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004183fi
4184rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004185LIBS="$ac_save_LIBS"
4186
4187fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004188if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004189 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004190 cat >> confdefs.h <<\EOF
4191#define WITH_THREAD 1
4192EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004193
Martin v. Löwis130fb172001-07-19 11:00:41 +00004194 LIBS="$LIBS -lthread"
4195 LIBOBJS="$LIBOBJS thread.o"
4196 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004197else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004198 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004199fi
4200
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004201
Martin v. Löwis130fb172001-07-19 11:00:41 +00004202 if test "$USE_THREAD_MODULE" != "#"
4203 then
4204 # If the above checks didn't disable threads, (at least) OSF1
4205 # needs this '-threads' argument during linking.
4206 case $ac_sys_system in
4207 OSF1) LDLAST=-threads;;
4208 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004209 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004210fi
4211
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004212# Check for enable-ipv6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004213echo $ac_n "checking if --enable-ipv6 is specified""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004214echo "configure:4215: checking if --enable-ipv6 is specified" >&5
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004215# Check whether --enable-ipv6 or --disable-ipv6 was given.
4216if test "${enable_ipv6+set}" = set; then
4217 enableval="$enable_ipv6"
4218 case "$enableval" in
4219 no)
4220 echo "$ac_t""no" 1>&6
4221 ipv6=no
4222 ;;
4223 *) echo "$ac_t""yes" 1>&6
4224 cat >> confdefs.h <<\EOF
4225#define ENABLE_IPV6 1
4226EOF
4227
4228 ipv6=yes
4229 ;;
4230 esac
4231else
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004232
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004233 if test "$cross_compiling" = yes; then
4234 echo "$ac_t""no" 1>&6
4235 ipv6=no
4236
4237else
4238 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004239#line 4240 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004240#include "confdefs.h"
4241 /* AF_INET6 available check */
4242#include <sys/types.h>
4243#include <sys/socket.h>
4244main()
4245{
4246 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
4247 exit(1);
4248 else
4249 exit(0);
4250}
4251
4252EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004253if { (eval echo configure:4254: \"$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 +00004254then
4255 echo "$ac_t""yes" 1>&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004256 ipv6=yes
4257else
4258 echo "configure: failed program was:" >&5
4259 cat conftest.$ac_ext >&5
4260 rm -fr conftest*
4261 echo "$ac_t""no" 1>&6
4262 ipv6=no
4263fi
4264rm -fr conftest*
4265fi
4266
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004267
4268if test "$ipv6" = "yes"; then
4269 echo $ac_n "checking if RFC2553 API is available""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004270echo "configure:4271: checking if RFC2553 API is available" >&5
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004271 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004272#line 4273 "configure"
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004273#include "confdefs.h"
4274#include <sys/types.h>
4275#include <netinet/in.h>
4276int main() {
4277struct sockaddr_in6 x;
4278x.sin6_scope_id;
4279; return 0; }
4280EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004281if { (eval echo configure:4282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00004282 rm -rf conftest*
4283 echo "$ac_t""yes" 1>&6
4284 ipv6=yes
4285else
4286 echo "configure: failed program was:" >&5
4287 cat conftest.$ac_ext >&5
4288 rm -rf conftest*
4289 echo "$ac_t""no" 1>&6
4290 ipv6=no
4291fi
4292rm -f conftest*
4293fi
4294
4295if test "$ipv6" = "yes"; then
4296 cat >> confdefs.h <<\EOF
4297#define ENABLE_IPV6 1
4298EOF
4299
4300fi
4301
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004302fi
4303
4304
4305ipv6type=unknown
4306ipv6lib=none
4307ipv6trylibc=no
4308
4309if test "$ipv6" = "yes"; then
4310 echo $ac_n "checking ipv6 stack type""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004311echo "configure:4312: checking ipv6 stack type" >&5
Guido van Rossumb8552162001-09-05 14:58:11 +00004312 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
4313 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004314 case $i in
4315 inria)
4316 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004317#line 4318 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004318#include "confdefs.h"
4319dnl
4320#include <netinet/in.h>
4321#ifdef IPV6_INRIA_VERSION
4322yes
4323#endif
4324EOF
4325if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4326 egrep "yes" >/dev/null 2>&1; then
4327 rm -rf conftest*
4328 ipv6type=$i;
4329 OPT="-DINET6 $OPT"
4330fi
4331rm -f conftest*
4332
4333 ;;
4334 kame)
4335 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004336#line 4337 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004337#include "confdefs.h"
4338dnl
4339#include <netinet/in.h>
4340#ifdef __KAME__
4341yes
4342#endif
4343EOF
4344if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4345 egrep "yes" >/dev/null 2>&1; then
4346 rm -rf conftest*
4347 ipv6type=$i;
4348 ipv6lib=inet6
4349 ipv6libdir=/usr/local/v6/lib
4350 ipv6trylibc=yes
4351 OPT="-DINET6 $OPT"
4352fi
4353rm -f conftest*
4354
4355 ;;
4356 linux-glibc)
4357 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004358#line 4359 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004359#include "confdefs.h"
4360dnl
4361#include <features.h>
4362#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
4363yes
4364#endif
4365EOF
4366if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4367 egrep "yes" >/dev/null 2>&1; then
4368 rm -rf conftest*
4369 ipv6type=$i;
4370 ipv6trylibc=yes
4371 OPT="-DINET6 $OPT"
4372fi
4373rm -f conftest*
4374
4375 ;;
4376 linux-inet6)
4377 if test -d /usr/inet6; then
4378 ipv6type=$i
4379 ipv6lib=inet6
4380 ipv6libdir=/usr/inet6/lib
4381 OPT="-DINET6 -I/usr/inet6/include $OPT"
4382 fi
4383 ;;
4384 solaris)
4385 if test -f /etc/netconfig; then
4386 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
4387 ipv6type=$i
4388 ipv6trylibc=yes
4389 OPT="-DINET6 $OPT"
4390 fi
4391 fi
4392 ;;
4393 toshiba)
4394 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004395#line 4396 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004396#include "confdefs.h"
4397dnl
4398#include <sys/param.h>
4399#ifdef _TOSHIBA_INET6
4400yes
4401#endif
4402EOF
4403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4404 egrep "yes" >/dev/null 2>&1; then
4405 rm -rf conftest*
4406 ipv6type=$i;
4407 ipv6lib=inet6;
4408 ipv6libdir=/usr/local/v6/lib;
4409 OPT="-DINET6 $OPT"
4410fi
4411rm -f conftest*
4412
4413 ;;
4414 v6d)
4415 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004416#line 4417 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004417#include "confdefs.h"
4418dnl
4419#include </usr/local/v6/include/sys/v6config.h>
4420#ifdef __V6D__
4421yes
4422#endif
4423EOF
4424if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4425 egrep "yes" >/dev/null 2>&1; then
4426 rm -rf conftest*
4427 ipv6type=$i;
4428 ipv6lib=v6;
4429 ipv6libdir=/usr/local/v6/lib;
4430 OPT="-I/usr/local/v6/include $OPT"
4431fi
4432rm -f conftest*
4433
4434 ;;
4435 zeta)
4436 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004437#line 4438 "configure"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00004438#include "confdefs.h"
4439dnl
4440#include <sys/param.h>
4441#ifdef _ZETA_MINAMI_INET6
4442yes
4443#endif
4444EOF
4445if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4446 egrep "yes" >/dev/null 2>&1; then
4447 rm -rf conftest*
4448 ipv6type=$i;
4449 ipv6lib=inet6;
4450 ipv6libdir=/usr/local/v6/lib;
4451 OPT="-DINET6 $OPT"
4452fi
4453rm -f conftest*
4454
4455 ;;
4456 esac
4457 if test "$ipv6type" != "unknown"; then
4458 break
4459 fi
4460 done
4461 echo "$ac_t""$ipv6type" 1>&6
4462fi
4463
4464if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4465 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4466 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4467 echo "using lib$ipv6lib"
4468 else
4469 if test $ipv6trylibc = "yes"; then
4470 echo "using libc"
4471 else
4472 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4473 echo "You need to fetch lib$ipv6lib.a from appropriate"
4474 echo 'ipv6 kit and compile beforehand.'
4475 exit 1
4476 fi
4477 fi
4478fi
4479
Barry Warsawef82cd72000-06-30 16:21:01 +00004480# Check for GC support
Barry Warsawef82cd72000-06-30 16:21:01 +00004481echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004482echo "configure:4483: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004483# Check whether --with-cycle-gc or --without-cycle-gc was given.
4484if test "${with_cycle_gc+set}" = set; then
4485 withval="$with_cycle_gc"
4486 :
4487fi
4488
4489
4490if test -z "$with_cycle_gc"
4491then with_cycle_gc="yes"
4492fi
Neil Schemenauercf229462001-08-29 23:58:47 +00004493if test "$with_cycle_gc" != "no"
Barry Warsawef82cd72000-06-30 16:21:01 +00004494then
Barry Warsawef82cd72000-06-30 16:21:01 +00004495 cat >> confdefs.h <<\EOF
4496#define WITH_CYCLE_GC 1
4497EOF
4498
4499fi
4500echo "$ac_t""$with_cycle_gc" 1>&6
4501
Neil Schemenauera35c6882001-02-27 04:45:05 +00004502# Check for Python-specific malloc support
4503echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004504echo "configure:4505: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004505# Check whether --with-pymalloc or --without-pymalloc was given.
4506if test "${with_pymalloc+set}" = set; then
4507 withval="$with_pymalloc"
4508
4509if test "$withval" != no
4510then cat >> confdefs.h <<\EOF
4511#define WITH_PYMALLOC 1
4512EOF
4513 echo "$ac_t""yes" 1>&6
4514else echo "$ac_t""no" 1>&6
4515fi
4516else
4517 echo "$ac_t""no" 1>&6
4518fi
4519
4520
Barry Warsawef82cd72000-06-30 16:21:01 +00004521# Check for --with-wctype-functions
4522echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004523echo "configure:4524: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004524# Check whether --with-wctype-functions or --without-wctype-functions was given.
4525if test "${with_wctype_functions+set}" = set; then
4526 withval="$with_wctype_functions"
4527
4528if test "$withval" != no
4529then cat >> confdefs.h <<\EOF
4530#define WANT_WCTYPE_FUNCTIONS 1
4531EOF
4532 echo "$ac_t""yes" 1>&6
4533else echo "$ac_t""no" 1>&6
4534fi
4535else
4536 echo "$ac_t""no" 1>&6
4537fi
4538
4539
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004540# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004541
Guido van Rossum98935bf2001-09-05 19:13:16 +00004542DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +00004543
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004544echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004545echo "configure:4546: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004546# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004547if test "${with_sgi_dl+set}" = set; then
4548 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004549
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004550echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004551cat >> confdefs.h <<\EOF
4552#define WITH_SGI_DL 1
4553EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004554
Guido van Rossume97ee181999-12-20 21:27:22 +00004555DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004556dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004557if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004558then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004559else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004560fi
4561DLINCLDIR=${dldir}
4562LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004563else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004564 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004565fi
4566
4567
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004568echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004569echo "configure:4570: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004570# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004571if test "${with_dl_dld+set}" = set; then
4572 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004573
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004574echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004575cat >> confdefs.h <<\EOF
4576#define WITH_DL_DLD 1
4577EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004578
Guido van Rossume97ee181999-12-20 21:27:22 +00004579DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004580dldir=`echo "$withval" | sed 's/,.*//'`
4581dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004582if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004583then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004584else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004585fi
4586DLINCLDIR=${dldir}
4587LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004588else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004589 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004590fi
4591
4592
Guido van Rossume97ee181999-12-20 21:27:22 +00004593# the dlopen() function means we might want to use dynload_shlib.o. some
4594# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004595for ac_func in dlopen
4596do
4597echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004598echo "configure:4599: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004599if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004600 echo $ac_n "(cached) $ac_c" 1>&6
4601else
4602 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004603#line 4604 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004604#include "confdefs.h"
4605/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004606 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004607#include <assert.h>
4608/* Override any gcc2 internal prototype to avoid an error. */
4609/* We use char because int might match the return type of a gcc2
4610 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004611char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004612
4613int main() {
4614
4615/* The GNU C library defines this for functions which it implements
4616 to always fail with ENOSYS. Some functions are actually named
4617 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004618#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004619choke me
4620#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004621$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004622#endif
4623
4624; return 0; }
4625EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004626if { (eval echo configure:4627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004627 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004628 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004629else
4630 echo "configure: failed program was:" >&5
4631 cat conftest.$ac_ext >&5
4632 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004633 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004634fi
4635rm -f conftest*
4636fi
4637
Thomas Wouters3a584202000-08-05 23:28:51 +00004638if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004639 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004640 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4641 cat >> confdefs.h <<EOF
4642#define $ac_tr_func 1
4643EOF
4644
Guido van Rossume97ee181999-12-20 21:27:22 +00004645else
4646 echo "$ac_t""no" 1>&6
4647fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004648done
Guido van Rossume97ee181999-12-20 21:27:22 +00004649
4650
4651# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4652# loading of modules.
4653
4654echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004655echo "configure:4656: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004656if test -z "$DYNLOADFILE"
4657then
4658 case $ac_sys_system/$ac_sys_release in
4659 AIX*) DYNLOADFILE="dynload_aix.o";;
4660 BeOS*) DYNLOADFILE="dynload_beos.o";;
4661 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +00004662 Darwin/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004663 *)
4664 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4665 # out any dynamic loading
4666 if test "$ac_cv_func_dlopen" = yes
4667 then DYNLOADFILE="dynload_shlib.o"
4668 else DYNLOADFILE="dynload_stub.o"
4669 fi
4670 ;;
4671 esac
4672fi
4673echo "$ac_t""$DYNLOADFILE" 1>&6
4674if test "$DYNLOADFILE" != "dynload_stub.o"
4675then
4676 cat >> confdefs.h <<\EOF
4677#define HAVE_DYNAMIC_LOADING 1
4678EOF
4679
4680fi
4681
Neil Schemenauer4e425612001-06-19 15:44:15 +00004682# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4683
4684
4685echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004686echo "configure:4687: checking MACHDEP_OBJS" >&5
Neil Schemenauer4e425612001-06-19 15:44:15 +00004687if test -z "$MACHDEP_OBJS"
4688then
Jack Jansene578a632001-08-15 01:27:14 +00004689 MACHDEP_OBJS=$extra_machdep_objs
4690else
4691 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +00004692fi
Jack Jansene578a632001-08-15 01:27:14 +00004693echo "$ac_t""MACHDEP_OBJS" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004694
Guido van Rossum627b2d71993-12-24 10:39:16 +00004695# checks for library functions
Martin v. Löwis244edc82001-10-04 22:44:26 +00004696for ac_func in alarm chown chroot clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004697 flock fork fsync fdatasync fpathconf ftime ftruncate \
Martin v. Löwisf95dd0a2001-08-15 17:14:33 +00004698 gai_strerror getgroups getlogin getpeername getpid getpwent getwd \
Martin v. Löwis864e9ff2001-08-04 22:32:03 +00004699 hstrerror inet_pton kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004700 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004701 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004702 select setegid seteuid setgid \
Martin v. Löwis791bfda2001-07-24 06:33:08 +00004703 setlocale setregid setreuid setsid setpgid setuid setvbuf snprintf \
Fred Drake35a092f1999-12-13 16:23:35 +00004704 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004705 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Woutersc2c12dc2001-07-11 14:45:34 +00004706 truncate uname waitpid _getpty getpriority
Guido van Rossum627b2d71993-12-24 10:39:16 +00004707do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004708echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004709echo "configure:4710: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004710if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004711 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004712else
4713 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004714#line 4715 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004715#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004716/* System header to define __stub macros and hopefully few prototypes,
4717 which can conflict with char $ac_func(); below. */
4718#include <assert.h>
4719/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004720/* We use char because int might match the return type of a gcc2
4721 builtin and then its argument prototype would still apply. */
4722char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004723
Guido van Rossumf78abae1997-01-21 22:02:36 +00004724int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004725
Guido van Rossum627b2d71993-12-24 10:39:16 +00004726/* The GNU C library defines this for functions which it implements
4727 to always fail with ENOSYS. Some functions are actually named
4728 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004729#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004730choke me
4731#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004732$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004733#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004734
Guido van Rossum7f43da71994-08-01 12:15:30 +00004735; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004736EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004737if { (eval echo configure:4738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004738 rm -rf conftest*
4739 eval "ac_cv_func_$ac_func=yes"
4740else
4741 echo "configure: failed program was:" >&5
4742 cat conftest.$ac_ext >&5
4743 rm -rf conftest*
4744 eval "ac_cv_func_$ac_func=no"
4745fi
4746rm -f conftest*
4747fi
4748
4749if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4750 echo "$ac_t""yes" 1>&6
4751 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4752 cat >> confdefs.h <<EOF
4753#define $ac_tr_func 1
4754EOF
4755
4756else
4757 echo "$ac_t""no" 1>&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004758fi
4759done
4760
4761
4762# check for openpty and forkpty
4763
4764for ac_func in openpty
4765do
4766echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004767echo "configure:4768: checking for $ac_func" >&5
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004768if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4769 echo $ac_n "(cached) $ac_c" 1>&6
4770else
4771 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004772#line 4773 "configure"
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004773#include "confdefs.h"
4774/* System header to define __stub macros and hopefully few prototypes,
4775 which can conflict with char $ac_func(); below. */
4776#include <assert.h>
4777/* Override any gcc2 internal prototype to avoid an error. */
4778/* We use char because int might match the return type of a gcc2
4779 builtin and then its argument prototype would still apply. */
4780char $ac_func();
4781
4782int main() {
4783
4784/* The GNU C library defines this for functions which it implements
4785 to always fail with ENOSYS. Some functions are actually named
4786 something starting with __ and the normal name is an alias. */
4787#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4788choke me
4789#else
4790$ac_func();
4791#endif
4792
4793; return 0; }
4794EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004795if { (eval echo configure:4796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00004796 rm -rf conftest*
4797 eval "ac_cv_func_$ac_func=yes"
4798else
4799 echo "configure: failed program was:" >&5
4800 cat conftest.$ac_ext >&5
4801 rm -rf conftest*
4802 eval "ac_cv_func_$ac_func=no"
4803fi
4804rm -f conftest*
4805fi
4806
4807if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4808 echo "$ac_t""yes" 1>&6
4809 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4810 cat >> confdefs.h <<EOF
4811#define $ac_tr_func 1
4812EOF
4813
4814else
4815 echo "$ac_t""no" 1>&6
Fred Drake8cef4cf2000-06-28 16:40:38 +00004816echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004817echo "configure:4818: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004818ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004819if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004820 echo $ac_n "(cached) $ac_c" 1>&6
4821else
4822 ac_save_LIBS="$LIBS"
4823LIBS="-lutil $LIBS"
4824cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004825#line 4826 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004826#include "confdefs.h"
4827/* Override any gcc2 internal prototype to avoid an error. */
4828/* We use char because int might match the return type of a gcc2
4829 builtin and then its argument prototype would still apply. */
4830char openpty();
4831
4832int main() {
4833openpty()
4834; return 0; }
4835EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004836if { (eval echo configure:4837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004837 rm -rf conftest*
4838 eval "ac_cv_lib_$ac_lib_var=yes"
4839else
4840 echo "configure: failed program was:" >&5
4841 cat conftest.$ac_ext >&5
4842 rm -rf conftest*
4843 eval "ac_cv_lib_$ac_lib_var=no"
4844fi
4845rm -f conftest*
4846LIBS="$ac_save_LIBS"
4847
4848fi
4849if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4850 echo "$ac_t""yes" 1>&6
4851 cat >> confdefs.h <<\EOF
4852#define HAVE_OPENPTY 1
4853EOF
4854 LIBS="$LIBS -lutil"
4855else
4856 echo "$ac_t""no" 1>&6
4857fi
4858
4859fi
4860done
4861
4862for ac_func in forkpty
4863do
4864echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004865echo "configure:4866: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004866if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004867 echo $ac_n "(cached) $ac_c" 1>&6
4868else
4869 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004870#line 4871 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004871#include "confdefs.h"
4872/* System header to define __stub macros and hopefully few prototypes,
4873 which can conflict with char $ac_func(); below. */
4874#include <assert.h>
4875/* Override any gcc2 internal prototype to avoid an error. */
4876/* We use char because int might match the return type of a gcc2
4877 builtin and then its argument prototype would still apply. */
4878char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004879
4880int main() {
4881
4882/* The GNU C library defines this for functions which it implements
4883 to always fail with ENOSYS. Some functions are actually named
4884 something starting with __ and the normal name is an alias. */
4885#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4886choke me
4887#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004888$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004889#endif
4890
4891; return 0; }
4892EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004893if { (eval echo configure:4894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004894 rm -rf conftest*
4895 eval "ac_cv_func_$ac_func=yes"
4896else
4897 echo "configure: failed program was:" >&5
4898 cat conftest.$ac_ext >&5
4899 rm -rf conftest*
4900 eval "ac_cv_func_$ac_func=no"
4901fi
4902rm -f conftest*
4903fi
4904
4905if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4906 echo "$ac_t""yes" 1>&6
4907 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4908 cat >> confdefs.h <<EOF
4909#define $ac_tr_func 1
4910EOF
4911
4912else
4913 echo "$ac_t""no" 1>&6
4914echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004915echo "configure:4916: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004916ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004917if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004918 echo $ac_n "(cached) $ac_c" 1>&6
4919else
4920 ac_save_LIBS="$LIBS"
4921LIBS="-lutil $LIBS"
4922cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004923#line 4924 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004924#include "confdefs.h"
4925/* Override any gcc2 internal prototype to avoid an error. */
4926/* We use char because int might match the return type of a gcc2
4927 builtin and then its argument prototype would still apply. */
4928char forkpty();
4929
4930int main() {
4931forkpty()
4932; return 0; }
4933EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004934if { (eval echo configure:4935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004935 rm -rf conftest*
4936 eval "ac_cv_lib_$ac_lib_var=yes"
4937else
4938 echo "configure: failed program was:" >&5
4939 cat conftest.$ac_ext >&5
4940 rm -rf conftest*
4941 eval "ac_cv_lib_$ac_lib_var=no"
4942fi
4943rm -f conftest*
4944LIBS="$ac_save_LIBS"
4945
4946fi
4947if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4948 echo "$ac_t""yes" 1>&6
4949 cat >> confdefs.h <<\EOF
4950#define HAVE_FORKPTY 1
4951EOF
4952 LIBS="$LIBS -lutil"
4953else
4954 echo "$ac_t""no" 1>&6
4955fi
4956
4957fi
4958done
4959
4960
4961# check for long file support functions
4962for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4963do
4964echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004965echo "configure:4966: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004966if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004967 echo $ac_n "(cached) $ac_c" 1>&6
4968else
4969 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004970#line 4971 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004971#include "confdefs.h"
4972/* System header to define __stub macros and hopefully few prototypes,
4973 which can conflict with char $ac_func(); below. */
4974#include <assert.h>
4975/* Override any gcc2 internal prototype to avoid an error. */
4976/* We use char because int might match the return type of a gcc2
4977 builtin and then its argument prototype would still apply. */
4978char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004979
4980int main() {
4981
4982/* The GNU C library defines this for functions which it implements
4983 to always fail with ENOSYS. Some functions are actually named
4984 something starting with __ and the normal name is an alias. */
4985#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4986choke me
4987#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004988$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004989#endif
4990
4991; return 0; }
4992EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004993if { (eval echo configure:4994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004994 rm -rf conftest*
4995 eval "ac_cv_func_$ac_func=yes"
4996else
4997 echo "configure: failed program was:" >&5
4998 cat conftest.$ac_ext >&5
4999 rm -rf conftest*
5000 eval "ac_cv_func_$ac_func=no"
5001fi
5002rm -f conftest*
5003fi
5004
5005if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5006 echo "$ac_t""yes" 1>&6
5007 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5008 cat >> confdefs.h <<EOF
5009#define $ac_tr_func 1
5010EOF
5011
5012else
5013 echo "$ac_t""no" 1>&6
5014fi
5015done
5016
5017
5018for ac_func in dup2 getcwd strdup strerror memmove
5019do
5020echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005021echo "configure:5022: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005022if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005023 echo $ac_n "(cached) $ac_c" 1>&6
5024else
5025 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005026#line 5027 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005027#include "confdefs.h"
5028/* System header to define __stub macros and hopefully few prototypes,
5029 which can conflict with char $ac_func(); below. */
5030#include <assert.h>
5031/* Override any gcc2 internal prototype to avoid an error. */
5032/* We use char because int might match the return type of a gcc2
5033 builtin and then its argument prototype would still apply. */
5034char $ac_func();
5035
5036int main() {
5037
5038/* The GNU C library defines this for functions which it implements
5039 to always fail with ENOSYS. Some functions are actually named
5040 something starting with __ and the normal name is an alias. */
5041#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5042choke me
5043#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005044$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00005045#endif
5046
5047; return 0; }
5048EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005049if { (eval echo configure:5050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005050 rm -rf conftest*
5051 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005052else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005053 echo "configure: failed program was:" >&5
5054 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005055 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005056 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005057fi
5058rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005059fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005060
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005061if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005062 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005063 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5064 cat >> confdefs.h <<EOF
5065#define $ac_tr_func 1
5066EOF
5067
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005068else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005069 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005070LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005071fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005072done
5073
Guido van Rossumf78abae1997-01-21 22:02:36 +00005074
Thomas Wouters3a584202000-08-05 23:28:51 +00005075for ac_func in getpgrp
5076do
5077echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005078echo "configure:5079: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005079if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005080 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005081else
5082 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005083#line 5084 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005084#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005085/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005086 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005087#include <assert.h>
5088/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005089/* We use char because int might match the return type of a gcc2
5090 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005091char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005092
Guido van Rossumf78abae1997-01-21 22:02:36 +00005093int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005094
Guido van Rossum627b2d71993-12-24 10:39:16 +00005095/* The GNU C library defines this for functions which it implements
5096 to always fail with ENOSYS. Some functions are actually named
5097 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005098#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00005099choke me
5100#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005101$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005102#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005103
5104; return 0; }
5105EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005106if { (eval echo configure:5107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005107 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005108 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005109else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005110 echo "configure: failed program was:" >&5
5111 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005112 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005113 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005114fi
5115rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005116fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005117
Thomas Wouters3a584202000-08-05 23:28:51 +00005118if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005119 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005120 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5121 cat >> confdefs.h <<EOF
5122#define $ac_tr_func 1
5123EOF
5124 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005125#line 5126 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005126#include "confdefs.h"
5127#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005128int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005129getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005130; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005131EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005132if { (eval echo configure:5133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005133 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005134 cat >> confdefs.h <<\EOF
5135#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00005136EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005137
Guido van Rossumf78abae1997-01-21 22:02:36 +00005138else
5139 echo "configure: failed program was:" >&5
5140 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005141fi
5142rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005143else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005144 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005145fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005146done
Guido van Rossum627b2d71993-12-24 10:39:16 +00005147
Thomas Wouters3a584202000-08-05 23:28:51 +00005148for ac_func in setpgrp
5149do
5150echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005151echo "configure:5152: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005152if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005153 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005154else
5155 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005156#line 5157 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005157#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005158/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005159 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005160#include <assert.h>
5161/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005162/* We use char because int might match the return type of a gcc2
5163 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005164char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005165
Guido van Rossumf78abae1997-01-21 22:02:36 +00005166int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005167
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005168/* The GNU C library defines this for functions which it implements
5169 to always fail with ENOSYS. Some functions are actually named
5170 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005171#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005172choke me
5173#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005174$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005175#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005176
5177; return 0; }
5178EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005179if { (eval echo configure:5180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005180 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005181 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005182else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005183 echo "configure: failed program was:" >&5
5184 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005185 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005186 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005187fi
5188rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005189fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005190
Thomas Wouters3a584202000-08-05 23:28:51 +00005191if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005192 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005193 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5194 cat >> confdefs.h <<EOF
5195#define $ac_tr_func 1
5196EOF
5197 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005198#line 5199 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005199#include "confdefs.h"
5200#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005201int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005202setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005203; return 0; }
5204EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005205if { (eval echo configure:5206: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005206 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005207 cat >> confdefs.h <<\EOF
5208#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005209EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005210
Guido van Rossumf78abae1997-01-21 22:02:36 +00005211else
5212 echo "configure: failed program was:" >&5
5213 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005214fi
5215rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005216else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005217 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005218fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005219done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00005220
Thomas Wouters3a584202000-08-05 23:28:51 +00005221for ac_func in gettimeofday
5222do
5223echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005224echo "configure:5225: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005225if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005226 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005227else
5228 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005229#line 5230 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005230#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005231/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005232 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005233#include <assert.h>
5234/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005235/* We use char because int might match the return type of a gcc2
5236 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005237char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005238
Guido van Rossumf78abae1997-01-21 22:02:36 +00005239int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005240
5241/* The GNU C library defines this for functions which it implements
5242 to always fail with ENOSYS. Some functions are actually named
5243 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005244#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005245choke me
5246#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005247$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005248#endif
5249
5250; return 0; }
5251EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005252if { (eval echo configure:5253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005253 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005254 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005255else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005256 echo "configure: failed program was:" >&5
5257 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005258 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005259 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005260fi
5261rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005262fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005263
Thomas Wouters3a584202000-08-05 23:28:51 +00005264if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005265 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005266 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5267 cat >> confdefs.h <<EOF
5268#define $ac_tr_func 1
5269EOF
5270 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005271#line 5272 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005272#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005273#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005274int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005275gettimeofday((struct timeval*)0,(struct timezone*)0);
5276; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005277EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005278if { (eval echo configure:5279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005279 :
5280else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005281 echo "configure: failed program was:" >&5
5282 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005283 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005284 cat >> confdefs.h <<\EOF
5285#define GETTIMEOFDAY_NO_TZ 1
5286EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005287
5288fi
5289rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005290else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005291 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005292fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005293done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005294
5295
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005296for ac_func in getaddrinfo
5297do
5298echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005299echo "configure:5300: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005300if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5301 echo $ac_n "(cached) $ac_c" 1>&6
5302else
5303 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005304#line 5305 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005305#include "confdefs.h"
5306/* System header to define __stub macros and hopefully few prototypes,
5307 which can conflict with char $ac_func(); below. */
5308#include <assert.h>
5309/* Override any gcc2 internal prototype to avoid an error. */
5310/* We use char because int might match the return type of a gcc2
5311 builtin and then its argument prototype would still apply. */
5312char $ac_func();
5313
5314int main() {
5315
5316/* The GNU C library defines this for functions which it implements
5317 to always fail with ENOSYS. Some functions are actually named
5318 something starting with __ and the normal name is an alias. */
5319#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5320choke me
5321#else
5322$ac_func();
5323#endif
5324
5325; return 0; }
5326EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005327if { (eval echo configure:5328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005328 rm -rf conftest*
5329 eval "ac_cv_func_$ac_func=yes"
5330else
5331 echo "configure: failed program was:" >&5
5332 cat conftest.$ac_ext >&5
5333 rm -rf conftest*
5334 eval "ac_cv_func_$ac_func=no"
5335fi
5336rm -f conftest*
5337fi
5338
5339if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5340 echo "$ac_t""yes" 1>&6
5341 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5342 cat >> confdefs.h <<EOF
5343#define $ac_tr_func 1
5344EOF
5345 echo $ac_n "checking getaddrinfo bug""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005346echo "configure:5347: checking getaddrinfo bug" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005347if test "$cross_compiling" = yes; then
5348 echo "$ac_t""buggy" 1>&6
5349buggygetaddrinfo=yes
5350else
5351 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005352#line 5353 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005353#include "confdefs.h"
5354
5355#include <sys/types.h>
5356#include <netdb.h>
5357#include <string.h>
5358#include <sys/socket.h>
5359#include <netinet/in.h>
5360
5361main()
5362{
5363 int passive, gaierr, inet4 = 0, inet6 = 0;
5364 struct addrinfo hints, *ai, *aitop;
5365 char straddr[INET6_ADDRSTRLEN], strport[16];
5366
5367 for (passive = 0; passive <= 1; passive++) {
5368 memset(&hints, 0, sizeof(hints));
5369 hints.ai_family = AF_UNSPEC;
5370 hints.ai_flags = passive ? AI_PASSIVE : 0;
5371 hints.ai_socktype = SOCK_STREAM;
5372 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
5373 (void)gai_strerror(gaierr);
5374 goto bad;
5375 }
5376 for (ai = aitop; ai; ai = ai->ai_next) {
5377 if (ai->ai_addr == NULL ||
5378 ai->ai_addrlen == 0 ||
5379 getnameinfo(ai->ai_addr, ai->ai_addrlen,
5380 straddr, sizeof(straddr), strport, sizeof(strport),
5381 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
5382 goto bad;
5383 }
5384 switch (ai->ai_family) {
5385 case AF_INET:
5386 if (strcmp(strport, "54321") != 0) {
5387 goto bad;
5388 }
5389 if (passive) {
5390 if (strcmp(straddr, "0.0.0.0") != 0) {
5391 goto bad;
5392 }
5393 } else {
5394 if (strcmp(straddr, "127.0.0.1") != 0) {
5395 goto bad;
5396 }
5397 }
5398 inet4++;
5399 break;
5400 case AF_INET6:
5401 if (strcmp(strport, "54321") != 0) {
5402 goto bad;
5403 }
5404 if (passive) {
5405 if (strcmp(straddr, "::") != 0) {
5406 goto bad;
5407 }
5408 } else {
5409 if (strcmp(straddr, "::1") != 0) {
5410 goto bad;
5411 }
5412 }
5413 inet6++;
5414 break;
5415 case AF_UNSPEC:
5416 goto bad;
5417 break;
5418 default:
5419 /* another family support? */
5420 break;
5421 }
5422 }
5423 }
5424
5425 if (!(inet4 == 0 || inet4 == 2))
5426 goto bad;
5427 if (!(inet6 == 0 || inet6 == 2))
5428 goto bad;
5429
5430 if (aitop)
5431 freeaddrinfo(aitop);
5432 exit(0);
5433
5434 bad:
5435 if (aitop)
5436 freeaddrinfo(aitop);
5437 exit(1);
5438}
5439
5440EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005441if { (eval echo configure:5442: \"$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 +00005442then
5443 echo "$ac_t""good" 1>&6
5444buggygetaddrinfo=no
5445else
5446 echo "configure: failed program was:" >&5
5447 cat conftest.$ac_ext >&5
5448 rm -fr conftest*
5449 echo "$ac_t""buggy" 1>&6
5450buggygetaddrinfo=yes
5451fi
5452rm -fr conftest*
5453fi
5454
5455else
5456 echo "$ac_t""no" 1>&6
5457buggygetaddrinfo=yes
5458fi
5459done
5460
5461
5462if test "$buggygetaddrinfo" = "yes"; then
5463 if test "$ipv6" = "yes"; then
5464 echo 'Fatal: You must get working getaddrinfo() function.'
5465 echo ' or you can specify "--disable-ipv6"'.
5466 exit 1
5467 fi
5468fi
Jack Jansen9a66b6d2001-08-08 13:56:14 +00005469for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005470do
5471echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005472echo "configure:5473: checking for $ac_func" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005473if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5474 echo $ac_n "(cached) $ac_c" 1>&6
5475else
5476 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005477#line 5478 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005478#include "confdefs.h"
5479/* System header to define __stub macros and hopefully few prototypes,
5480 which can conflict with char $ac_func(); below. */
5481#include <assert.h>
5482/* Override any gcc2 internal prototype to avoid an error. */
5483/* We use char because int might match the return type of a gcc2
5484 builtin and then its argument prototype would still apply. */
5485char $ac_func();
5486
5487int main() {
5488
5489/* The GNU C library defines this for functions which it implements
5490 to always fail with ENOSYS. Some functions are actually named
5491 something starting with __ and the normal name is an alias. */
5492#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5493choke me
5494#else
5495$ac_func();
5496#endif
5497
5498; return 0; }
5499EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005500if { (eval echo configure:5501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005501 rm -rf conftest*
5502 eval "ac_cv_func_$ac_func=yes"
5503else
5504 echo "configure: failed program was:" >&5
5505 cat conftest.$ac_ext >&5
5506 rm -rf conftest*
5507 eval "ac_cv_func_$ac_func=no"
5508fi
5509rm -f conftest*
5510fi
5511
5512if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5513 echo "$ac_t""yes" 1>&6
5514 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5515 cat >> confdefs.h <<EOF
5516#define $ac_tr_func 1
5517EOF
5518
5519else
5520 echo "$ac_t""no" 1>&6
5521fi
5522done
5523
5524
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005525# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005526echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005527echo "configure:5528: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005528if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005529 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005530else
5531 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005532#line 5533 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005533#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005534#include <sys/types.h>
5535#include <sys/time.h>
5536#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005537int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005538struct tm *tp;
5539; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005540EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005541if { (eval echo configure:5542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005542 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005543 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005544else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005545 echo "configure: failed program was:" >&5
5546 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005547 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005548 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005549fi
5550rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005551fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005552
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005553echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005554if test $ac_cv_header_time = yes; then
5555 cat >> confdefs.h <<\EOF
5556#define TIME_WITH_SYS_TIME 1
5557EOF
5558
5559fi
5560
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005561echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005562echo "configure:5563: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005563if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005564 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005565else
5566 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005567#line 5568 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005568#include "confdefs.h"
5569#include <sys/types.h>
5570#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005571int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005572struct tm *tp; tp->tm_sec;
5573; return 0; }
5574EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005575if { (eval echo configure:5576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005576 rm -rf conftest*
5577 ac_cv_struct_tm=time.h
5578else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005579 echo "configure: failed program was:" >&5
5580 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005581 rm -rf conftest*
5582 ac_cv_struct_tm=sys/time.h
5583fi
5584rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005585fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005586
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005587echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005588if test $ac_cv_struct_tm = sys/time.h; then
5589 cat >> confdefs.h <<\EOF
5590#define TM_IN_SYS_TIME 1
5591EOF
5592
5593fi
5594
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005595echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005596echo "configure:5597: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005597if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005598 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005599else
5600 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005601#line 5602 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005602#include "confdefs.h"
5603#include <sys/types.h>
5604#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005605int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005606struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005607; return 0; }
5608EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005609if { (eval echo configure:5610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005610 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005611 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005612else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005613 echo "configure: failed program was:" >&5
5614 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005615 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005616 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005617fi
5618rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005619fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005620
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005621echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
5622if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005623 cat >> confdefs.h <<\EOF
5624#define HAVE_TM_ZONE 1
5625EOF
5626
5627else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005628 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005629echo "configure:5630: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005630if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005631 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005632else
5633 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005634#line 5635 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005635#include "confdefs.h"
5636#include <time.h>
5637#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005638extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005639#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00005640int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005641atoi(*tzname);
5642; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005643EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005644if { (eval echo configure:5645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005645 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005646 ac_cv_var_tzname=yes
5647else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005648 echo "configure: failed program was:" >&5
5649 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005650 rm -rf conftest*
5651 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005652fi
5653rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00005654fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005655
5656echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005657 if test $ac_cv_var_tzname = yes; then
5658 cat >> confdefs.h <<\EOF
5659#define HAVE_TZNAME 1
5660EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005661
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005662 fi
5663fi
5664
5665
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005666echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005667echo "configure:5668: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005668if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+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öwis260aecc2001-10-07 08:14:41 +00005672#line 5673 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005673#include "confdefs.h"
5674#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005675int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005676return altzone;
5677; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005678EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005679if { (eval echo configure:5680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005680 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005681 ac_cv_header_time_altzone=yes
5682else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005683 echo "configure: failed program was:" >&5
5684 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005685 rm -rf conftest*
5686 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005687fi
5688rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005689fi
5690
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005691echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005692if test $ac_cv_header_time_altzone = yes; then
5693 cat >> confdefs.h <<\EOF
5694#define HAVE_ALTZONE 1
5695EOF
5696
5697fi
5698
Guido van Rossumda88dad1995-01-26 00:46:29 +00005699was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005700echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005701echo "configure:5702: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005702cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005703#line 5704 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005704#include "confdefs.h"
5705
5706#include <sys/types.h>
5707#include <sys/select.h>
5708#include <sys/time.h>
5709
Guido van Rossumf78abae1997-01-21 22:02:36 +00005710int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005711;
5712; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005713EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005714if { (eval echo configure:5715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005715 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005716 cat >> confdefs.h <<\EOF
5717#define SYS_SELECT_WITH_SYS_TIME 1
5718EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005719 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005720else
5721 echo "configure: failed program was:" >&5
5722 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005723fi
5724rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005725echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005726
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005727echo $ac_n "checking for addrinfo""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005728echo "configure:5729: checking for addrinfo" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005729if eval "test \"`echo '$''{'ac_cv_struct_addrinfo'+set}'`\" = set"; then
5730 echo $ac_n "(cached) $ac_c" 1>&6
5731else
5732 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005733#line 5734 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005734#include "confdefs.h"
5735
5736# include <netdb.h>
5737int main() {
5738struct addrinfo a
5739; return 0; }
5740EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005741if { (eval echo configure:5742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005742 rm -rf conftest*
5743 ac_cv_struct_addrinfo=yes
5744else
5745 echo "configure: failed program was:" >&5
5746 cat conftest.$ac_ext >&5
5747 rm -rf conftest*
5748 ac_cv_struct_addrinfo=no
5749fi
5750rm -f conftest*
5751fi
5752
5753echo "$ac_t""$ac_cv_struct_addrinfo" 1>&6
5754if test $ac_cv_struct_addrinfo = yes; then
5755 cat >> confdefs.h <<\EOF
5756#define HAVE_ADDRINFO 1
5757EOF
5758
5759fi
5760
5761echo $ac_n "checking for sockaddr_storage""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005762echo "configure:5763: checking for sockaddr_storage" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005763if eval "test \"`echo '$''{'ac_cv_struct_sockaddr_storage'+set}'`\" = set"; then
5764 echo $ac_n "(cached) $ac_c" 1>&6
5765else
5766 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005767#line 5768 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005768#include "confdefs.h"
5769
5770# include <sys/types.h>
5771# include <sys/socket.h>
5772int main() {
5773struct sockaddr_storage s
5774; return 0; }
5775EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005776if { (eval echo configure:5777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00005777 rm -rf conftest*
5778 ac_cv_struct_sockaddr_storage=yes
5779else
5780 echo "configure: failed program was:" >&5
5781 cat conftest.$ac_ext >&5
5782 rm -rf conftest*
5783 ac_cv_struct_sockaddr_storage=no
5784fi
5785rm -f conftest*
5786fi
5787
5788echo "$ac_t""$ac_cv_struct_sockaddr_storage" 1>&6
5789if test $ac_cv_struct_sockaddr_storage = yes; then
5790 cat >> confdefs.h <<\EOF
5791#define HAVE_SOCKADDR_STORAGE 1
5792EOF
5793
5794fi
5795
Guido van Rossum627b2d71993-12-24 10:39:16 +00005796# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00005797
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005798echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005799echo "configure:5800: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005800if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005801 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005802else
5803 if test "$GCC" = yes; then
5804 # GCC predefines this symbol on systems where it applies.
5805cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005806#line 5807 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005807#include "confdefs.h"
5808#ifdef __CHAR_UNSIGNED__
5809 yes
5810#endif
5811
5812EOF
5813if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5814 egrep "yes" >/dev/null 2>&1; then
5815 rm -rf conftest*
5816 ac_cv_c_char_unsigned=yes
5817else
5818 rm -rf conftest*
5819 ac_cv_c_char_unsigned=no
5820fi
5821rm -f conftest*
5822
5823else
5824if test "$cross_compiling" = yes; then
5825 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5826else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005827 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005828#line 5829 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005829#include "confdefs.h"
5830/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005831#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005832#define volatile
5833#endif
5834main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005835 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005836}
5837EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005838if { (eval echo configure:5839: \"$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 +00005839then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005840 ac_cv_c_char_unsigned=yes
5841else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005842 echo "configure: failed program was:" >&5
5843 cat conftest.$ac_ext >&5
5844 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005845 ac_cv_c_char_unsigned=no
5846fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005847rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005848fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005849
5850fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005851fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005852
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005853echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005854if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5855 cat >> confdefs.h <<\EOF
5856#define __CHAR_UNSIGNED__ 1
5857EOF
5858
5859fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005860
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005861echo $ac_n "checking for working const""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005862echo "configure:5863: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005863if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005864 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005865else
5866 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005867#line 5868 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005868#include "confdefs.h"
5869
Guido van Rossumf78abae1997-01-21 22:02:36 +00005870int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005871
5872/* Ultrix mips cc rejects this. */
Martin v. Löwis9db2f572001-07-23 01:30:10 +00005873typedef int charset[2]; const charset x;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005874/* SunOS 4.1.1 cc rejects this. */
5875char const *const *ccp;
5876char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005877/* NEC SVR4.0.2 mips cc rejects this. */
5878struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005879static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005880/* AIX XL C 1.02.0.0 rejects this.
5881 It does not let you subtract one const X* pointer from another in an arm
5882 of an if-expression whose if-part is not a constant expression */
5883const char *g = "string";
5884ccp = &g + (g ? g-g : 0);
5885/* HPUX 7.0 cc rejects these. */
5886++ccp;
5887p = (char**) ccp;
5888ccp = (char const *const *) p;
5889{ /* SCO 3.2v4 cc rejects this. */
5890 char *t;
5891 char const *s = 0 ? (char *) 0 : (char const *) 0;
5892
5893 *t++ = 0;
5894}
5895{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005896 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005897 const int *foo = &x[0];
5898 ++foo;
5899}
5900{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5901 typedef const int *iptr;
5902 iptr p = 0;
5903 ++p;
5904}
5905{ /* AIX XL C 1.02.0.0 rejects this saying
5906 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5907 struct s { int j; const int *ap[3]; };
5908 struct s *b; b->j = 5;
5909}
5910{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5911 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005912}
5913
5914; return 0; }
5915EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005916if { (eval echo configure:5917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005917 rm -rf conftest*
5918 ac_cv_c_const=yes
5919else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005920 echo "configure: failed program was:" >&5
5921 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005922 rm -rf conftest*
5923 ac_cv_c_const=no
5924fi
5925rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005926fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005927
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005928echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005929if test $ac_cv_c_const = no; then
5930 cat >> confdefs.h <<\EOF
5931#define const
5932EOF
5933
5934fi
5935
5936
Guido van Rossumda88dad1995-01-26 00:46:29 +00005937works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005938echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005939echo "configure:5940: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005940cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005941#line 5942 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005942#include "confdefs.h"
5943
Guido van Rossumf78abae1997-01-21 22:02:36 +00005944int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005945volatile int x; x = 0;
5946; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005947EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005948if { (eval echo configure:5949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005949 rm -rf conftest*
5950 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005951else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005952 echo "configure: failed program was:" >&5
5953 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005954 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005955 cat >> confdefs.h <<\EOF
5956#define volatile
5957EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005958
5959fi
5960rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005961echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005962
Guido van Rossumda88dad1995-01-26 00:46:29 +00005963works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005964echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005965echo "configure:5966: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005966cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005967#line 5968 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005968#include "confdefs.h"
5969
Guido van Rossumf78abae1997-01-21 22:02:36 +00005970int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005971signed char c;
5972; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005973EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005974if { (eval echo configure:5975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005975 rm -rf conftest*
5976 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005977else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005978 echo "configure: failed program was:" >&5
5979 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005980 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005981 cat >> confdefs.h <<\EOF
5982#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005983EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005984
5985fi
5986rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005987echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005988
Guido van Rossumda88dad1995-01-26 00:46:29 +00005989have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005990echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005991echo "configure:5992: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005992cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005993#line 5994 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005994#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005995int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005996int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005997return foo(10);
5998; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005999EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006000if { (eval echo configure:6001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006001 rm -rf conftest*
6002 cat >> confdefs.h <<\EOF
6003#define HAVE_PROTOTYPES 1
6004EOF
6005 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006006else
6007 echo "configure: failed program was:" >&5
6008 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00006009fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006010rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006011echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006012
Guido van Rossumda88dad1995-01-26 00:46:29 +00006013works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006014echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006015echo "configure:6016: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006016cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006017#line 6018 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006018#include "confdefs.h"
6019
6020#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00006021int foo(int x, ...) {
6022 va_list va;
6023 va_start(va, x);
6024 va_arg(va, int);
6025 va_arg(va, char *);
6026 va_arg(va, double);
6027 return 0;
6028}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006029
Guido van Rossumf78abae1997-01-21 22:02:36 +00006030int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00006031return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006032; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006033EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006034if { (eval echo configure:6035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006035 rm -rf conftest*
6036 cat >> confdefs.h <<\EOF
6037#define HAVE_STDARG_PROTOTYPES 1
6038EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006039 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00006040else
6041 echo "configure: failed program was:" >&5
6042 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006043fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006044rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006045echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006046
Guido van Rossumda88dad1995-01-26 00:46:29 +00006047if test "$have_prototypes" = yes; then
6048bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006049echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006050echo "configure:6051: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006051cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006052#line 6053 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006053#include "confdefs.h"
6054#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00006055int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006056char **t;execve("@",t,t);
6057; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006058EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006059if { (eval echo configure:6060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006060 :
6061else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006062 echo "configure: failed program was:" >&5
6063 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006064 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006065 cat >> confdefs.h <<\EOF
6066#define BAD_EXEC_PROTOTYPES 1
6067EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006068 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006069fi
6070rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006071echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006072fi
6073
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006074# check if sockaddr has sa_len member
6075echo $ac_n "checking if sockaddr has sa_len member""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006076echo "configure:6077: checking if sockaddr has sa_len member" >&5
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006077cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006078#line 6079 "configure"
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006079#include "confdefs.h"
6080#include <sys/types.h>
6081#include <sys/socket.h>
6082int main() {
6083struct sockaddr x;
6084x.sa_len = 0;
6085; return 0; }
6086EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006087if { (eval echo configure:6088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +00006088 rm -rf conftest*
6089 echo "$ac_t""yes" 1>&6
6090 cat >> confdefs.h <<\EOF
6091#define HAVE_SOCKADDR_SA_LEN 1
6092EOF
6093
6094else
6095 echo "configure: failed program was:" >&5
6096 cat conftest.$ac_ext >&5
6097 rm -rf conftest*
6098 echo "$ac_t""no" 1>&6
6099fi
6100rm -f conftest*
6101
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006102echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006103echo "configure:6104: checking for bad static forward" >&5
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006104if eval "test \"`echo '$''{'ac_cv_bad_static_forward'+set}'`\" = set"; then
6105 echo $ac_n "(cached) $ac_c" 1>&6
6106else
6107 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006108 ac_cv_bad_static_forward=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006109else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006110 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006111#line 6112 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006112#include "confdefs.h"
6113
6114struct s { int a; int b; };
6115static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006116int foobar() {
6117 static int random;
6118 random = (int) &foo;
6119 return random;
6120}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006121static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006122main() {
6123 exit(!((int)&foo == foobar()));
6124}
Guido van Rossum7f43da71994-08-01 12:15:30 +00006125EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006126if { (eval echo configure:6127: \"$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 +00006127then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006128 ac_cv_bad_static_forward=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00006129else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006130 echo "configure: failed program was:" >&5
6131 cat conftest.$ac_ext >&5
6132 rm -fr conftest*
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006133 ac_cv_bad_static_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006134fi
6135rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00006136fi
6137
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00006138fi
6139
6140echo "$ac_t""$ac_cv_bad_static_forward" 1>&6
6141if test "$ac_cv_bad_static_forward" = yes
6142then
6143 cat >> confdefs.h <<\EOF
6144#define BAD_STATIC_FORWARD 1
6145EOF
6146
6147fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006148
Guido van Rossumda88dad1995-01-26 00:46:29 +00006149va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006150echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006151echo "configure:6152: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006152cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006153#line 6154 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006154#include "confdefs.h"
6155
6156#ifdef HAVE_STDARG_PROTOTYPES
6157#include <stdarg.h>
6158#else
6159#include <varargs.h>
6160#endif
6161
Guido van Rossumf78abae1997-01-21 22:02:36 +00006162int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006163va_list list1, list2; list1 = list2;
6164; return 0; }
6165EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006166if { (eval echo configure:6167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006167 :
6168else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006169 echo "configure: failed program was:" >&5
6170 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006171 rm -rf conftest*
6172 cat >> confdefs.h <<\EOF
6173#define VA_LIST_IS_ARRAY 1
6174EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00006175 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006176fi
6177rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006178echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006179
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006180# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
6181echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006182echo "configure:6183: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006183if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006184 echo $ac_n "(cached) $ac_c" 1>&6
6185else
6186 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006187#line 6188 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006188#include "confdefs.h"
6189/* System header to define __stub macros and hopefully few prototypes,
6190 which can conflict with char gethostbyname_r(); below. */
6191#include <assert.h>
6192/* Override any gcc2 internal prototype to avoid an error. */
6193/* We use char because int might match the return type of a gcc2
6194 builtin and then its argument prototype would still apply. */
6195char gethostbyname_r();
6196
6197int main() {
6198
6199/* The GNU C library defines this for functions which it implements
6200 to always fail with ENOSYS. Some functions are actually named
6201 something starting with __ and the normal name is an alias. */
6202#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
6203choke me
6204#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006205gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006206#endif
6207
6208; return 0; }
6209EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006210if { (eval echo configure:6211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006211 rm -rf conftest*
6212 eval "ac_cv_func_gethostbyname_r=yes"
6213else
6214 echo "configure: failed program was:" >&5
6215 cat conftest.$ac_ext >&5
6216 rm -rf conftest*
6217 eval "ac_cv_func_gethostbyname_r=no"
6218fi
6219rm -f conftest*
6220fi
6221
6222if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
6223 echo "$ac_t""yes" 1>&6
6224
6225 cat >> confdefs.h <<\EOF
6226#define HAVE_GETHOSTBYNAME_R 1
6227EOF
6228
6229 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006230echo "configure:6231: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006231 OLD_CFLAGS=$CFLAGS
6232 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
6233 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006234#line 6235 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006235#include "confdefs.h"
6236
6237# include <netdb.h>
6238
6239int main() {
6240
6241 char *name;
6242 struct hostent *he, *res;
6243 char buffer[2048];
6244 int buflen = 2048;
6245 int h_errnop;
6246
6247 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
6248
6249; return 0; }
6250EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006251if { (eval echo configure:6252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006252 rm -rf conftest*
6253
6254 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006255#define HAVE_GETHOSTBYNAME_R 1
6256EOF
6257
6258 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006259#define HAVE_GETHOSTBYNAME_R_6_ARG 1
6260EOF
6261
6262 echo "$ac_t""yes" 1>&6
6263
6264else
6265 echo "configure: failed program was:" >&5
6266 cat conftest.$ac_ext >&5
6267 rm -rf conftest*
6268
6269 echo "$ac_t""no" 1>&6
6270 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006271echo "configure:6272: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006272 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006273#line 6274 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006274#include "confdefs.h"
6275
6276# include <netdb.h>
6277
6278int main() {
6279
6280 char *name;
6281 struct hostent *he;
6282 char buffer[2048];
6283 int buflen = 2048;
6284 int h_errnop;
6285
6286 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
6287
6288; return 0; }
6289EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006290if { (eval echo configure:6291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006291 rm -rf conftest*
6292
6293 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006294#define HAVE_GETHOSTBYNAME_R 1
6295EOF
6296
6297 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006298#define HAVE_GETHOSTBYNAME_R_5_ARG 1
6299EOF
6300
6301 echo "$ac_t""yes" 1>&6
6302
6303else
6304 echo "configure: failed program was:" >&5
6305 cat conftest.$ac_ext >&5
6306 rm -rf conftest*
6307
6308 echo "$ac_t""no" 1>&6
6309 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006310echo "configure:6311: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006311 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006312#line 6313 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006313#include "confdefs.h"
6314
6315# include <netdb.h>
6316
6317int main() {
6318
6319 char *name;
6320 struct hostent *he;
6321 struct hostent_data data;
6322
6323 (void) gethostbyname_r(name, he, &data);
6324
6325; return 0; }
6326EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006327if { (eval echo configure:6328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006328 rm -rf conftest*
6329
6330 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006331#define HAVE_GETHOSTBYNAME_R 1
6332EOF
6333
6334 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006335#define HAVE_GETHOSTBYNAME_R_3_ARG 1
6336EOF
6337
6338 echo "$ac_t""yes" 1>&6
6339
6340else
6341 echo "configure: failed program was:" >&5
6342 cat conftest.$ac_ext >&5
6343 rm -rf conftest*
6344
6345 echo "$ac_t""no" 1>&6
6346
6347fi
6348rm -f conftest*
6349
6350fi
6351rm -f conftest*
6352
6353fi
6354rm -f conftest*
6355 CFLAGS=$OLD_CFLAGS
6356
6357else
6358 echo "$ac_t""no" 1>&6
6359
Thomas Wouters3a584202000-08-05 23:28:51 +00006360 for ac_func in gethostbyname
6361do
6362echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006363echo "configure:6364: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006364if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006365 echo $ac_n "(cached) $ac_c" 1>&6
6366else
6367 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006368#line 6369 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006369#include "confdefs.h"
6370/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00006371 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006372#include <assert.h>
6373/* Override any gcc2 internal prototype to avoid an error. */
6374/* We use char because int might match the return type of a gcc2
6375 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006376char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006377
6378int main() {
6379
6380/* The GNU C library defines this for functions which it implements
6381 to always fail with ENOSYS. Some functions are actually named
6382 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00006383#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006384choke me
6385#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006386$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006387#endif
6388
6389; return 0; }
6390EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006391if { (eval echo configure:6392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006392 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006393 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006394else
6395 echo "configure: failed program was:" >&5
6396 cat conftest.$ac_ext >&5
6397 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00006398 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006399fi
6400rm -f conftest*
6401fi
6402
Thomas Wouters3a584202000-08-05 23:28:51 +00006403if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006404 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00006405 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6406 cat >> confdefs.h <<EOF
6407#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006408EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00006409
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006410else
6411 echo "$ac_t""no" 1>&6
6412fi
Thomas Wouters3a584202000-08-05 23:28:51 +00006413done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006414
6415
6416fi
6417
6418
6419
6420
6421
6422
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006423
Guido van Rossum627b2d71993-12-24 10:39:16 +00006424# checks for system services
6425# (none yet)
6426
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006427# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006428echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006429echo "configure:6430: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006430if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006431 echo $ac_n "(cached) $ac_c" 1>&6
6432else
6433 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006434#line 6435 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006435#include "confdefs.h"
6436/* System header to define __stub macros and hopefully few prototypes,
6437 which can conflict with char __fpu_control(); below. */
6438#include <assert.h>
6439/* Override any gcc2 internal prototype to avoid an error. */
6440/* We use char because int might match the return type of a gcc2
6441 builtin and then its argument prototype would still apply. */
6442char __fpu_control();
6443
6444int main() {
6445
6446/* The GNU C library defines this for functions which it implements
6447 to always fail with ENOSYS. Some functions are actually named
6448 something starting with __ and the normal name is an alias. */
6449#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
6450choke me
6451#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006452__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006453#endif
6454
6455; return 0; }
6456EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006457if { (eval echo configure:6458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006458 rm -rf conftest*
6459 eval "ac_cv_func___fpu_control=yes"
6460else
6461 echo "configure: failed program was:" >&5
6462 cat conftest.$ac_ext >&5
6463 rm -rf conftest*
6464 eval "ac_cv_func___fpu_control=no"
6465fi
6466rm -f conftest*
6467fi
6468
6469if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
6470 echo "$ac_t""yes" 1>&6
6471 :
6472else
6473 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006474echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006475echo "configure:6476: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00006476ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006477if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006478 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006479else
6480 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006481LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006482cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006483#line 6484 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006484#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006485/* Override any gcc2 internal prototype to avoid an error. */
6486/* We use char because int might match the return type of a gcc2
6487 builtin and then its argument prototype would still apply. */
6488char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00006489
Guido van Rossumf78abae1997-01-21 22:02:36 +00006490int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006491__fpu_control()
6492; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00006493EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006494if { (eval echo configure:6495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00006495 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006496 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006497else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006498 echo "configure: failed program was:" >&5
6499 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00006500 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006501 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006502fi
6503rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006504LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006505
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006506fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006507if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006508 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006509 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6510 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006511 cat >> confdefs.h <<EOF
6512#define $ac_tr_lib 1
6513EOF
6514
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006515 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006516
6517else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006518 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006519fi
6520
6521
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00006522fi
6523
6524
Guido van Rossum7f253911997-05-09 02:42:48 +00006525# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00006526echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006527echo "configure:6528: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00006528# Check whether --with-fpectl or --without-fpectl was given.
6529if test "${with_fpectl+set}" = set; then
6530 withval="$with_fpectl"
6531
6532if test "$withval" != no
6533then cat >> confdefs.h <<\EOF
6534#define WANT_SIGFPE_HANDLER 1
6535EOF
6536 echo "$ac_t""yes" 1>&6
6537else echo "$ac_t""no" 1>&6
6538fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006539else
6540 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00006541fi
6542
6543
Guido van Rossum7f43da71994-08-01 12:15:30 +00006544# check for --with-libm=...
6545
Guido van Rossum563e7081996-09-10 18:20:48 +00006546case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00006547Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006548BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00006549*) LIBM=-lm
6550esac
Guido van Rossum7f253911997-05-09 02:42:48 +00006551echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006552echo "configure:6553: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006553# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006554if test "${with_libm+set}" = set; then
6555 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006556
Guido van Rossum7f253911997-05-09 02:42:48 +00006557if test "$withval" = no
6558then LIBM=
6559 echo "$ac_t""force LIBM empty" 1>&6
6560elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006561then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006562 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006563else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006564fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006565else
6566 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006567fi
6568
6569
6570# check for --with-libc=...
6571
Guido van Rossum7f253911997-05-09 02:42:48 +00006572echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006573echo "configure:6574: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006574# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006575if test "${with_libc+set}" = set; then
6576 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006577
Guido van Rossum7f253911997-05-09 02:42:48 +00006578if test "$withval" = no
6579then LIBC=
6580 echo "$ac_t""force LIBC empty" 1>&6
6581elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00006582then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00006583 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006584else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00006585fi
Guido van Rossum7f253911997-05-09 02:42:48 +00006586else
6587 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00006588fi
6589
6590
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006591# check for hypot() in math library
6592LIBS_SAVE=$LIBS
6593LIBS="$LIBS $LIBM"
6594for ac_func in hypot
6595do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006596echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006597echo "configure:6598: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006598if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006599 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006600else
6601 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006602#line 6603 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006603#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006604/* System header to define __stub macros and hopefully few prototypes,
6605 which can conflict with char $ac_func(); below. */
6606#include <assert.h>
6607/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006608/* We use char because int might match the return type of a gcc2
6609 builtin and then its argument prototype would still apply. */
6610char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006611
Guido van Rossumf78abae1997-01-21 22:02:36 +00006612int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006613
6614/* The GNU C library defines this for functions which it implements
6615 to always fail with ENOSYS. Some functions are actually named
6616 something starting with __ and the normal name is an alias. */
6617#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6618choke me
6619#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006620$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006621#endif
6622
6623; return 0; }
6624EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006625if { (eval echo configure:6626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006626 rm -rf conftest*
6627 eval "ac_cv_func_$ac_func=yes"
6628else
Guido van Rossumf78abae1997-01-21 22:02:36 +00006629 echo "configure: failed program was:" >&5
6630 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006631 rm -rf conftest*
6632 eval "ac_cv_func_$ac_func=no"
6633fi
6634rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006635fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00006636
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006637if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6638 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00006639 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6640 cat >> confdefs.h <<EOF
6641#define $ac_tr_func 1
6642EOF
6643
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006644else
6645 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006646LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006647fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00006648done
6649
Guido van Rossumf78abae1997-01-21 22:02:36 +00006650
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00006651LIBS=$LIBS_SAVE
6652
Guido van Rossumad713701997-07-10 22:42:38 +00006653# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00006654echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006655echo "configure:6656: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006656if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00006657 echo $ac_n "(cached) $ac_c" 1>&6
6658else
6659 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006660 ac_cv_malloc_zero=nonnull
Guido van Rossumad713701997-07-10 22:42:38 +00006661else
6662 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006663#line 6664 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00006664#include "confdefs.h"
6665#include <stdio.h>
6666#ifdef HAVE_STDLIB
6667#include <stdlib.h>
6668#else
6669char *malloc(), *realloc();
6670int *free();
6671#endif
6672main() {
6673 char *p;
6674 p = malloc(0);
6675 if (p == NULL) exit(1);
6676 p = realloc(p, 0);
6677 if (p == NULL) exit(1);
6678 free(p);
6679 exit(0);
6680}
6681EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006682if { (eval echo configure:6683: \"$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 +00006683then
6684 ac_cv_malloc_zero=nonnull
6685else
6686 echo "configure: failed program was:" >&5
6687 cat conftest.$ac_ext >&5
6688 rm -fr conftest*
6689 ac_cv_malloc_zero=null
6690fi
6691rm -fr conftest*
6692fi
6693
6694fi
Guido van Rossum3065c942001-09-17 04:03:14 +00006695 # XXX arm cross-compile?
Guido van Rossumad713701997-07-10 22:42:38 +00006696echo "$ac_t""$ac_cv_malloc_zero" 1>&6
6697if test "$ac_cv_malloc_zero" = null
6698then
6699 cat >> confdefs.h <<\EOF
6700#define MALLOC_ZERO_RETURNS_NULL 1
6701EOF
6702
6703fi
6704
Guido van Rossumef2255b2000-03-10 22:30:29 +00006705# check for wchar.h
6706ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
6707echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006708echo "configure:6709: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006709if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006710 echo $ac_n "(cached) $ac_c" 1>&6
6711else
6712 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006713#line 6714 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006714#include "confdefs.h"
6715#include <wchar.h>
6716EOF
6717ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006718{ (eval echo configure:6719: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00006719ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6720if test -z "$ac_err"; then
6721 rm -rf conftest*
6722 eval "ac_cv_header_$ac_safe=yes"
6723else
6724 echo "$ac_err" >&5
6725 echo "configure: failed program was:" >&5
6726 cat conftest.$ac_ext >&5
6727 rm -rf conftest*
6728 eval "ac_cv_header_$ac_safe=no"
6729fi
6730rm -f conftest*
6731fi
6732if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6733 echo "$ac_t""yes" 1>&6
6734 cat >> confdefs.h <<\EOF
6735#define HAVE_WCHAR_H 1
6736EOF
6737 wchar_h="yes"
6738else
6739 echo "$ac_t""no" 1>&6
6740wchar_h="no"
6741
6742fi
6743
6744
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006745# determine wchar_t size
6746if test "$wchar_h" = yes
6747then
6748 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006749echo "configure:6750: checking size of wchar_t" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006750if eval "test \"`echo '$''{'ac_cv_sizeof_wchar_t'+set}'`\" = set"; then
6751 echo $ac_n "(cached) $ac_c" 1>&6
6752else
6753 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006754 ac_cv_sizeof_wchar_t=4
Guido van Rossumef2255b2000-03-10 22:30:29 +00006755else
6756 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006757#line 6758 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006758#include "confdefs.h"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006759#include <stdio.h>
6760main()
6761{
6762 FILE *f=fopen("conftestval", "w");
6763 if (!f) exit(1);
6764 fprintf(f, "%d\n", sizeof(wchar_t));
Guido van Rossumef2255b2000-03-10 22:30:29 +00006765 exit(0);
Guido van Rossumef2255b2000-03-10 22:30:29 +00006766}
Guido van Rossumef2255b2000-03-10 22:30:29 +00006767EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006768if { (eval echo configure:6769: \"$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 +00006769then
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006770 ac_cv_sizeof_wchar_t=`cat conftestval`
Guido van Rossumef2255b2000-03-10 22:30:29 +00006771else
6772 echo "configure: failed program was:" >&5
6773 cat conftest.$ac_ext >&5
6774 rm -fr conftest*
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006775 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00006776fi
6777rm -fr conftest*
6778fi
6779
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006780fi
6781echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6
6782cat >> confdefs.h <<EOF
6783#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
6784EOF
6785
6786
6787fi
6788
6789echo $ac_n "checking what type to use for unicode""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006790echo "configure:6791: checking what type to use for unicode" >&5
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006791# Check whether --enable-unicode or --disable-unicode was given.
6792if test "${enable_unicode+set}" = set; then
6793 enableval="$enable_unicode"
6794 :
6795else
6796 enable_unicode=yes
6797fi
6798
6799
6800if test $enable_unicode = yes
6801then
Martin v. Löwisfd917792001-06-27 20:22:04 +00006802 # Without any arguments, Py_UNICODE defaults to two-byte mode
6803 enable_unicode="ucs2"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006804fi
6805
6806case "$enable_unicode" in
6807ucs2) unicode_size="2"
6808 cat >> confdefs.h <<\EOF
6809#define Py_UNICODE_SIZE 2
6810EOF
6811
6812 ;;
6813ucs4) unicode_size="4"
6814 cat >> confdefs.h <<\EOF
6815#define Py_UNICODE_SIZE 4
6816EOF
6817
6818 ;;
6819esac
6820
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006821
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006822if test "$enable_unicode" = "no"
6823then
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006824 UNICODE_OBJS=""
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006825 echo "$ac_t""not used" 1>&6
6826else
Martin v. Löwis339d0f72001-08-17 18:39:25 +00006827 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +00006828 cat >> confdefs.h <<\EOF
6829#define Py_USING_UNICODE 1
6830EOF
6831
6832 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t"
6833 then
6834 PY_UNICODE_TYPE="wchar_t"
6835 cat >> confdefs.h <<\EOF
6836#define HAVE_USABLE_WCHAR_T 1
6837EOF
6838
6839 cat >> confdefs.h <<\EOF
6840#define PY_UNICODE_TYPE wchar_t
6841EOF
6842
6843 elif test "$ac_cv_sizeof_short" = "$unicode_size"
6844 then
6845 PY_UNICODE_TYPE="unsigned short"
6846 cat >> confdefs.h <<\EOF
6847#define PY_UNICODE_TYPE unsigned short
6848EOF
6849
6850 elif test "$ac_cv_sizeof_long" = "$unicode_size"
6851 then
6852 PY_UNICODE_TYPE="unsigned long"
6853 cat >> confdefs.h <<\EOF
6854#define PY_UNICODE_TYPE unsigned long
6855EOF
6856
6857 else
6858 PY_UNICODE_TYPE="no type found"
6859 fi
6860 echo "$ac_t""$PY_UNICODE_TYPE" 1>&6
6861fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00006862
6863# check for endianness
6864echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006865echo "configure:6866: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006866if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006867 echo $ac_n "(cached) $ac_c" 1>&6
6868else
6869 ac_cv_c_bigendian=unknown
6870# See if sys/param.h defines the BYTE_ORDER macro.
6871cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006872#line 6873 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006873#include "confdefs.h"
6874#include <sys/types.h>
6875#include <sys/param.h>
6876int main() {
6877
6878#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6879 bogus endian macros
6880#endif
6881; return 0; }
6882EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006883if { (eval echo configure:6884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006884 rm -rf conftest*
6885 # It does; now see whether it defined to BIG_ENDIAN or not.
6886cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006887#line 6888 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006888#include "confdefs.h"
6889#include <sys/types.h>
6890#include <sys/param.h>
6891int main() {
6892
6893#if BYTE_ORDER != BIG_ENDIAN
6894 not big endian
6895#endif
6896; return 0; }
6897EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006898if { (eval echo configure:6899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006899 rm -rf conftest*
6900 ac_cv_c_bigendian=yes
6901else
6902 echo "configure: failed program was:" >&5
6903 cat conftest.$ac_ext >&5
6904 rm -rf conftest*
6905 ac_cv_c_bigendian=no
6906fi
6907rm -f conftest*
6908else
6909 echo "configure: failed program was:" >&5
6910 cat conftest.$ac_ext >&5
6911fi
6912rm -f conftest*
6913if test $ac_cv_c_bigendian = unknown; then
6914if test "$cross_compiling" = yes; then
6915 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6916else
6917 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006918#line 6919 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006919#include "confdefs.h"
6920main () {
6921 /* Are we little or big endian? From Harbison&Steele. */
6922 union
6923 {
6924 long l;
6925 char c[sizeof (long)];
6926 } u;
6927 u.l = 1;
6928 exit (u.c[sizeof (long) - 1] == 1);
6929}
6930EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006931if { (eval echo configure:6932: \"$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 +00006932then
6933 ac_cv_c_bigendian=no
6934else
6935 echo "configure: failed program was:" >&5
6936 cat conftest.$ac_ext >&5
6937 rm -fr conftest*
6938 ac_cv_c_bigendian=yes
6939fi
6940rm -fr conftest*
6941fi
6942
6943fi
6944fi
6945
6946echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6947if test $ac_cv_c_bigendian = yes; then
6948 cat >> confdefs.h <<\EOF
6949#define WORDS_BIGENDIAN 1
6950EOF
6951
6952fi
6953
6954
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006955# Check whether right shifting a negative integer extends the sign bit
6956# or fills with zeros (like the Cray J90, according to Tim Peters).
6957echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006958echo "configure:6959: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006959if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006960 echo $ac_n "(cached) $ac_c" 1>&6
6961else
6962
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006963if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00006964 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006965else
6966 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006967#line 6968 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006968#include "confdefs.h"
6969
6970int main()
6971{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006972 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006973}
6974
6975EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00006976if { (eval echo configure:6977: \"$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 +00006977then
6978 ac_cv_rshift_extends_sign=yes
6979else
6980 echo "configure: failed program was:" >&5
6981 cat conftest.$ac_ext >&5
6982 rm -fr conftest*
6983 ac_cv_rshift_extends_sign=no
6984fi
6985rm -fr conftest*
6986fi
6987
6988fi
6989
6990echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6991if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006992then
6993 cat >> confdefs.h <<\EOF
6994#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6995EOF
6996
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006997fi
6998
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006999# check for getc_unlocked and related locking functions
7000echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00007001echo "configure:7002: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007002if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
7003 echo $ac_n "(cached) $ac_c" 1>&6
7004else
7005
7006cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00007007#line 7008 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007008#include "confdefs.h"
7009#include <stdio.h>
7010int main() {
7011
7012 FILE *f = fopen("/dev/null", "r");
7013 flockfile(f);
7014 getc_unlocked(f);
7015 funlockfile(f);
7016
7017; return 0; }
7018EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00007019if { (eval echo configure:7020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00007020 rm -rf conftest*
7021 ac_cv_have_getc_unlocked=yes
7022else
7023 echo "configure: failed program was:" >&5
7024 cat conftest.$ac_ext >&5
7025 rm -rf conftest*
7026 ac_cv_have_getc_unlocked=no
7027fi
7028rm -f conftest*
7029fi
7030
7031echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
7032if test "$ac_cv_have_getc_unlocked" = yes
7033then
7034 cat >> confdefs.h <<\EOF
7035#define HAVE_GETC_UNLOCKED 1
7036EOF
7037
7038fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00007039
Martin v. Löwis0daad592001-09-30 21:09:59 +00007040# check for readline 4.0
7041echo $ac_n "checking for rl_pre_input_hook in -lreadline""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00007042echo "configure:7043: checking for rl_pre_input_hook in -lreadline" >&5
Martin v. Löwis0daad592001-09-30 21:09:59 +00007043ac_lib_var=`echo readline'_'rl_pre_input_hook | sed 'y%./+-%__p_%'`
Guido van Rossum353ae582001-07-10 16:45:32 +00007044if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7045 echo $ac_n "(cached) $ac_c" 1>&6
7046else
7047 ac_save_LIBS="$LIBS"
7048LIBS="-lreadline -ltermcap $LIBS"
7049cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00007050#line 7051 "configure"
Guido van Rossum353ae582001-07-10 16:45:32 +00007051#include "confdefs.h"
7052/* Override any gcc2 internal prototype to avoid an error. */
7053/* We use char because int might match the return type of a gcc2
7054 builtin and then its argument prototype would still apply. */
Martin v. Löwis0daad592001-09-30 21:09:59 +00007055char rl_pre_input_hook();
7056
7057int main() {
7058rl_pre_input_hook()
7059; return 0; }
7060EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00007061if { (eval echo configure:7062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis0daad592001-09-30 21:09:59 +00007062 rm -rf conftest*
7063 eval "ac_cv_lib_$ac_lib_var=yes"
7064else
7065 echo "configure: failed program was:" >&5
7066 cat conftest.$ac_ext >&5
7067 rm -rf conftest*
7068 eval "ac_cv_lib_$ac_lib_var=no"
7069fi
7070rm -f conftest*
7071LIBS="$ac_save_LIBS"
7072
7073fi
7074if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7075 echo "$ac_t""yes" 1>&6
7076 cat >> confdefs.h <<\EOF
7077#define HAVE_RL_PRE_INPUT_HOOK 1
7078EOF
7079
7080else
7081 echo "$ac_t""no" 1>&6
7082fi
7083
7084
7085# check for readline 4.2
7086echo $ac_n "checking for rl_completion_matches in -lreadline""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00007087echo "configure:7088: checking for rl_completion_matches in -lreadline" >&5
Martin v. Löwis0daad592001-09-30 21:09:59 +00007088ac_lib_var=`echo readline'_'rl_completion_matches | sed 'y%./+-%__p_%'`
7089if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7090 echo $ac_n "(cached) $ac_c" 1>&6
7091else
7092 ac_save_LIBS="$LIBS"
7093LIBS="-lreadline -ltermcap $LIBS"
7094cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00007095#line 7096 "configure"
Martin v. Löwis0daad592001-09-30 21:09:59 +00007096#include "confdefs.h"
7097/* Override any gcc2 internal prototype to avoid an error. */
7098/* We use char because int might match the return type of a gcc2
7099 builtin and then its argument prototype would still apply. */
Guido van Rossum353ae582001-07-10 16:45:32 +00007100char rl_completion_matches();
7101
7102int main() {
7103rl_completion_matches()
7104; return 0; }
7105EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00007106if { (eval echo configure:7107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum353ae582001-07-10 16:45:32 +00007107 rm -rf conftest*
7108 eval "ac_cv_lib_$ac_lib_var=yes"
7109else
7110 echo "configure: failed program was:" >&5
7111 cat conftest.$ac_ext >&5
7112 rm -rf conftest*
7113 eval "ac_cv_lib_$ac_lib_var=no"
7114fi
7115rm -f conftest*
7116LIBS="$ac_save_LIBS"
7117
7118fi
7119if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7120 echo "$ac_t""yes" 1>&6
7121 cat >> confdefs.h <<\EOF
7122#define HAVE_RL_COMPLETION_MATCHES 1
7123EOF
7124
7125else
7126 echo "$ac_t""no" 1>&6
7127fi
7128
7129
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007130echo $ac_n "checking for broken nice()""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00007131echo "configure:7132: checking for broken nice()" >&5
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007132if eval "test \"`echo '$''{'ac_cv_broken_nice'+set}'`\" = set"; then
7133 echo $ac_n "(cached) $ac_c" 1>&6
7134else
7135
7136if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00007137 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007138else
7139 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00007140#line 7141 "configure"
Thomas Wouterse38b2f12001-07-11 22:35:31 +00007141#include "confdefs.h"
7142
7143int main()
7144{
7145 int val1 = nice(1);
7146 if (val1 != -1 && val1 == nice(2))
7147 exit(0);
7148 exit(1);
7149}
7150
7151EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00007152if { (eval echo configure:7153: \"$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 +00007153then
7154 ac_cv_broken_nice=yes
7155else
7156 echo "configure: failed program was:" >&5
7157 cat conftest.$ac_ext >&5
7158 rm -fr conftest*
7159 ac_cv_broken_nice=no
7160fi
7161rm -fr conftest*
7162fi
7163
7164fi
7165
7166echo "$ac_t""$ac_cv_broken_nice" 1>&6
7167if test "$ac_cv_broken_nice" = yes
7168then
7169 cat >> confdefs.h <<\EOF
7170#define HAVE_BROKEN_NICE 1
7171EOF
7172
7173fi
7174
Guido van Rossum95713eb2000-05-18 20:53:31 +00007175# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
7176# Add sys/socket.h to confdefs.h
7177cat >> confdefs.h <<\EOF
7178#ifdef HAVE_SYS_SOCKET_H
7179#include <sys/socket.h>
7180#endif
7181EOF
7182echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00007183echo "configure:7184: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007184if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00007185 echo $ac_n "(cached) $ac_c" 1>&6
7186else
7187 cat > conftest.$ac_ext <<EOF
Martin v. Löwis260aecc2001-10-07 08:14:41 +00007188#line 7189 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00007189#include "confdefs.h"
7190#include <sys/types.h>
7191#if STDC_HEADERS
7192#include <stdlib.h>
7193#include <stddef.h>
7194#endif
7195EOF
7196if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7197 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
7198 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007199 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00007200else
7201 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007202 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00007203fi
7204rm -f conftest*
7205
7206fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007207echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
7208if test $ac_cv_type_socklen_t = no; then
7209 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00007210#define socklen_t int
7211EOF
7212
7213fi
7214
7215
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00007216# Add Python/ prefix to LIBOBJS
7217libobjs=$LIBOBJS
7218LIBOBJS=
7219for obj in $libobjs; do
7220 LIBOBJS="$LIBOBJS Python/$obj"
7221done
7222
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007223#AC_MSG_CHECKING(for Modules/Setup)
7224#if test ! -f Modules/Setup ; then
7225# if test ! -d Modules ; then
7226# mkdir Modules
7227# fi
7228# cp "$srcdir/Modules/Setup.dist" Modules/Setup
7229# AC_MSG_RESULT(creating)
7230#else
7231# AC_MSG_RESULT(already exists)
7232#fi
7233
7234
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00007235SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007236echo $ac_n "checking for build directories""... $ac_c" 1>&6
Martin v. Löwis260aecc2001-10-07 08:14:41 +00007237echo "configure:7238: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007238for dir in $SRCDIRS; do
7239 if test ! -d $dir; then
7240 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00007241 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007242done
7243echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00007244
Guido van Rossum627b2d71993-12-24 10:39:16 +00007245# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007246trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007247cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007248# This file is a shell script that caches the results of configure
7249# tests run on this system so they can be shared between configure
7250# scripts and configure runs. It is not useful on other systems.
7251# If it contains results you don't want to keep, you may remove or edit it.
7252#
7253# By default, configure uses ./config.cache as the cache file,
7254# creating it if it does not exist already. You can give configure
7255# the --cache-file=FILE option to use a different cache file; that is
7256# what configure does when it calls configure scripts in
7257# subdirectories, so they share the cache.
7258# Giving --cache-file=/dev/null disables caching, for debugging configure.
7259# config.status only pays attention to the cache file if you give it the
7260# --recheck option to rerun configure.
7261#
7262EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007263# The following way of writing the cache mishandles newlines in values,
7264# but we know of no workaround that is simple, portable, and efficient.
7265# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007266# Ultrix sh set writes to stderr and can't be redirected directly,
7267# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007268(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007269 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007270 *ac_space=\ *)
7271 # `set' does not quote correctly, so add quotes (double-quote substitution
7272 # turns \\\\ into \\, and sed turns \\ into \).
7273 sed -n \
7274 -e "s/'/'\\\\''/g" \
7275 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7276 ;;
7277 *)
7278 # `set' quotes correctly as required by POSIX, so do not add quotes.
7279 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7280 ;;
7281 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007282if cmp -s $cache_file confcache; then
7283 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007284else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007285 if test -w $cache_file; then
7286 echo "updating cache $cache_file"
7287 cat confcache > $cache_file
7288 else
7289 echo "not updating unwritable cache $cache_file"
7290 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007291fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007292rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00007293
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007294trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007295
7296test "x$prefix" = xNONE && prefix=$ac_default_prefix
7297# Let make expand exec_prefix.
7298test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00007299
Guido van Rossum7f43da71994-08-01 12:15:30 +00007300# Any assignment to VPATH causes Sun make to only execute
7301# the first set of double-colon rules, so remove it if not needed.
7302# If there is a colon in the path, we need to keep it.
7303if test "x$srcdir" = x.; then
7304 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7305fi
7306
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007307trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00007308
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007309DEFS=-DHAVE_CONFIG_H
7310
7311# Without the "./", some shells look in PATH for config.status.
7312: ${CONFIG_STATUS=./config.status}
7313
7314echo creating $CONFIG_STATUS
7315rm -f $CONFIG_STATUS
7316cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007317#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00007318# Generated automatically by configure.
7319# Run this file to recreate the current configuration.
7320# This directory was configured as follows,
7321# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7322#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007323# $0 $ac_configure_args
7324#
7325# Compiler output produced by configure, useful for debugging
7326# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007327
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007328ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007329for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00007330do
Guido van Rossum7f43da71994-08-01 12:15:30 +00007331 case "\$ac_option" in
7332 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007333 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7334 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00007335 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007336 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00007337 exit 0 ;;
7338 -help | --help | --hel | --he | --h)
7339 echo "\$ac_cs_usage"; exit 0 ;;
7340 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00007341 esac
7342done
7343
Guido van Rossum7f43da71994-08-01 12:15:30 +00007344ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007345ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00007346
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007347trap '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 +00007348EOF
7349cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007350
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007351# Protect against being on the right side of a sed subst in config.status.
7352sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7353 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007354$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00007355$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007356s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007357s%@CFLAGS@%$CFLAGS%g
7358s%@CPPFLAGS@%$CPPFLAGS%g
7359s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00007360s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007361s%@DEFS@%$DEFS%g
7362s%@LDFLAGS@%$LDFLAGS%g
7363s%@LIBS@%$LIBS%g
7364s%@exec_prefix@%$exec_prefix%g
7365s%@prefix@%$prefix%g
7366s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007367s%@bindir@%$bindir%g
7368s%@sbindir@%$sbindir%g
7369s%@libexecdir@%$libexecdir%g
7370s%@datadir@%$datadir%g
7371s%@sysconfdir@%$sysconfdir%g
7372s%@sharedstatedir@%$sharedstatedir%g
7373s%@localstatedir@%$localstatedir%g
7374s%@libdir@%$libdir%g
7375s%@includedir@%$includedir%g
7376s%@oldincludedir@%$oldincludedir%g
7377s%@infodir@%$infodir%g
7378s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00007379s%@VERSION@%$VERSION%g
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00007380s%@CONFIG_ARGS@%$CONFIG_ARGS%g
Jack Jansene578a632001-08-15 01:27:14 +00007381s%@PYTHONFRAMEWORK@%$PYTHONFRAMEWORK%g
7382s%@PYTHONFRAMEWORKDIR@%$PYTHONFRAMEWORKDIR%g
7383s%@PYTHONFRAMEWORKPREFIX@%$PYTHONFRAMEWORKPREFIX%g
7384s%@PYTHONFRAMEWORKINSTALLDIR@%$PYTHONFRAMEWORKINSTALLDIR%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00007385s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00007386s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00007387s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007388s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007389s%@CC@%$CC%g
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00007390s%@CPP@%$CPP%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007391s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007392s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007393s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00007394s%@DLLLIBRARY@%$DLLLIBRARY%g
Jack Jansene578a632001-08-15 01:27:14 +00007395s%@BLDLIBRARY@%$BLDLIBRARY%g
7396s%@LDLIBRARYDIR@%$LDLIBRARYDIR%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00007397s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007398s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007399s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007400s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007401s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00007402s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007403s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00007404s%@OPT@%$OPT%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00007405s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007406s%@SO@%$SO%g
7407s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00007408s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00007409s%@CCSHARED@%$CCSHARED%g
7410s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007411s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007412s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
7413s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00007414s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00007415s%@LDLAST@%$LDLAST%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007416s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00007417s%@DYNLOADFILE@%$DYNLOADFILE%g
Neil Schemenauer4e425612001-06-19 15:44:15 +00007418s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007419s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007420s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
7421s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
7422s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00007423s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00007424s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007425s%@LIBM@%$LIBM%g
7426s%@LIBC@%$LIBC%g
Martin v. Löwis339d0f72001-08-17 18:39:25 +00007427s%@UNICODE_OBJS@%$UNICODE_OBJS%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007428s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007429
7430CEOF
7431EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00007432
7433cat >> $CONFIG_STATUS <<\EOF
7434
7435# Split the substitutions into bite-sized pieces for seds with
7436# small command number limits, like on Digital OSF/1 and HP-UX.
7437ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7438ac_file=1 # Number of current file.
7439ac_beg=1 # First line for current file.
7440ac_end=$ac_max_sed_cmds # Line after last line for current file.
7441ac_more_lines=:
7442ac_sed_cmds=""
7443while $ac_more_lines; do
7444 if test $ac_beg -gt 1; then
7445 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7446 else
7447 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7448 fi
7449 if test ! -s conftest.s$ac_file; then
7450 ac_more_lines=false
7451 rm -f conftest.s$ac_file
7452 else
7453 if test -z "$ac_sed_cmds"; then
7454 ac_sed_cmds="sed -f conftest.s$ac_file"
7455 else
7456 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7457 fi
7458 ac_file=`expr $ac_file + 1`
7459 ac_beg=$ac_end
7460 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7461 fi
7462done
7463if test -z "$ac_sed_cmds"; then
7464 ac_sed_cmds=cat
7465fi
7466EOF
7467
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007468cat >> $CONFIG_STATUS <<EOF
7469
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00007470CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007471EOF
7472cat >> $CONFIG_STATUS <<\EOF
7473for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007474 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007475 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007476 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007477 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7478 *) ac_file_in="${ac_file}.in" ;;
7479 esac
7480
Guido van Rossumf78abae1997-01-21 22:02:36 +00007481 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007482
7483 # Remove last slash and all that follows it. Not all systems have dirname.
7484 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7485 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7486 # The file is in a subdirectory.
7487 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00007488 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007489 # A "../" for each directory in $ac_dir_suffix.
7490 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7491 else
7492 ac_dir_suffix= ac_dots=
7493 fi
7494
7495 case "$ac_given_srcdir" in
7496 .) srcdir=.
7497 if test -z "$ac_dots"; then top_srcdir=.
7498 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7499 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7500 *) # Relative path.
7501 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7502 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7503 esac
7504
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007505 case "$ac_given_INSTALL" in
7506 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7507 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7508 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007509
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007510 echo creating "$ac_file"
7511 rm -f "$ac_file"
7512 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7513 case "$ac_file" in
7514 *Makefile*) ac_comsub="1i\\
7515# $configure_input" ;;
7516 *) ac_comsub= ;;
7517 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00007518
7519 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 +00007520 sed -e "$ac_comsub
7521s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00007522s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00007523s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00007524s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00007525" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00007526fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00007527rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007528
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007529# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7530# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00007531#
7532# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007533ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7534ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007535ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007536ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007537# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007538ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7539ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007540ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007541ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007542# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007543ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7544ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007545ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007546ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00007547
Guido van Rossumf78abae1997-01-21 22:02:36 +00007548if test "${CONFIG_HEADERS+set}" != set; then
7549EOF
7550cat >> $CONFIG_STATUS <<EOF
Martin v. Löwis4f1cd8b2001-07-26 13:41:06 +00007551 CONFIG_HEADERS="pyconfig.h"
Guido van Rossumf78abae1997-01-21 22:02:36 +00007552EOF
7553cat >> $CONFIG_STATUS <<\EOF
7554fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007555for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00007556 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007557 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00007558 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007559 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7560 *) ac_file_in="${ac_file}.in" ;;
7561 esac
7562
Guido van Rossum7f43da71994-08-01 12:15:30 +00007563 echo creating $ac_file
7564
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007565 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00007566 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7567 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007568
7569EOF
7570
7571# Transform confdefs.h into a sed script conftest.vals that substitutes
7572# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007573# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007574# Protect against being in an unquoted here document in config.status.
7575rm -f conftest.vals
7576cat > conftest.hdr <<\EOF
7577s/[\\&%]/\\&/g
7578s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007579s%#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 +00007580s%ac_d%ac_u%gp
7581s%ac_u%ac_e%gp
7582EOF
7583sed -n -f conftest.hdr confdefs.h > conftest.vals
7584rm -f conftest.hdr
7585
7586# This sed command replaces #undef with comments. This is necessary, for
7587# example, in the case of _POSIX_SOURCE, which is predefined and required
7588# on some systems where configure will not decide to define it.
7589cat >> conftest.vals <<\EOF
7590s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
7591EOF
7592
7593# Break up conftest.vals because some shells have a limit on
7594# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007595
7596rm -f conftest.tail
7597while :
7598do
7599 ac_lines=`grep -c . conftest.vals`
7600 # grep -c gives empty output for an empty file on some AIX systems.
7601 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7602 # Write a limited-size here document to conftest.frag.
7603 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
7604 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7605 echo 'CEOF
7606 sed -f conftest.frag conftest.in > conftest.out
7607 rm -f conftest.in
7608 mv conftest.out conftest.in
7609' >> $CONFIG_STATUS
7610 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7611 rm -f conftest.vals
7612 mv conftest.tail conftest.vals
7613done
7614rm -f conftest.vals
7615
7616cat >> $CONFIG_STATUS <<\EOF
7617 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00007618 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007619 cat conftest.in >> conftest.h
7620 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00007621 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00007622 echo "$ac_file is unchanged"
7623 rm -f conftest.h
7624 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007625 # Remove last slash and all that follows it. Not all systems have dirname.
7626 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7627 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7628 # The file is in a subdirectory.
7629 test ! -d "$ac_dir" && mkdir "$ac_dir"
7630 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00007631 rm -f $ac_file
7632 mv conftest.h $ac_file
7633 fi
7634fi; done
7635
Guido van Rossumf78abae1997-01-21 22:02:36 +00007636EOF
7637cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00007638
Guido van Rossumf78abae1997-01-21 22:02:36 +00007639EOF
7640cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007641
7642exit 0
7643EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007644chmod +x $CONFIG_STATUS
7645rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00007646test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00007647
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00007648
7649echo "creating Setup"
7650if test ! -f Modules/Setup
7651then
7652 cp $srcdir/Modules/Setup.dist Modules/Setup
7653fi
7654
7655echo "creating Setup.local"
7656if test ! -f Modules/Setup.local
7657then
7658 echo "# Edit this file for local setup changes" >Modules/Setup.local
7659fi
7660
7661echo "creating Makefile"
7662$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
7663 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00007664 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00007665mv config.c Modules