blob: 4758aa5d5dbb2d2d3bf24e34ed6275e6b9e2047f [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Neil Schemenauer4e425612001-06-19 15:44:15 +00003# From configure.in Revision: 1.219
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
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000017 --with-next-archs='arch1 arch2 ..' build MAB binary"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000018ac_help="$ac_help
Guido van Rossum3dc0a512000-10-05 18:00:06 +000019 --with-next-framework Build (OpenStep|Rhapsody|MacOSX|Darwin) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000020ac_help="$ac_help
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021 --with-dyld Use (OpenStep|Rhapsody|MacOSX|Darwin) dynamic linker"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000022ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000023 --without-gcc never use gcc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000024ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000025 --with-cxx=<compiler> enable C++ support"
Guido van Rossum95012191999-12-16 17:50:52 +000026ac_help="$ac_help
Neil Schemenauerdfb38e42001-01-27 06:57:08 +000027 --with-suffix=.exe set executable suffix"
28ac_help="$ac_help
Skip Montanarocb853262000-08-30 22:29:48 +000029 --with-pydebug build with Py_DEBUG defined"
30ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000031 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000032ac_help="$ac_help
Neil Schemenauerd32c2492001-01-24 17:25:28 +000033 --with-signal-module disable/enable signal module"
34ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000035 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000036ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000037 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000038ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000039 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000040ac_help="$ac_help
Guido van Rossum9e8181b2000-09-19 00:46:46 +000041 --with-pth use GNU pth threading libraries"
42ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000043 --with(out)-cycle-gc disable/enable garbage collection"
44ac_help="$ac_help
Neil Schemenauera35c6882001-02-27 04:45:05 +000045 --with(out)-pymalloc disable/enable specialized mallocs"
46ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000047 --with-wctype-functions use wctype.h functions"
48ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000049 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000051 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000052ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000053 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000054ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000055 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000056ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000057 --with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000058
Guido van Rossum7f43da71994-08-01 12:15:30 +000059# Initialize some variables set by options.
60# The variables have the same names as the options, with
61# dashes changed to underlines.
62build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000063cache_file=./config.cache
64exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000065host=NONE
66no_create=
67nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000068no_recursion=
69prefix=NONE
70program_prefix=NONE
71program_suffix=NONE
72program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000073silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000074site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000075srcdir=
76target=NONE
77verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000078x_includes=NONE
79x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000080bindir='${exec_prefix}/bin'
81sbindir='${exec_prefix}/sbin'
82libexecdir='${exec_prefix}/libexec'
83datadir='${prefix}/share'
84sysconfdir='${prefix}/etc'
85sharedstatedir='${prefix}/com'
86localstatedir='${prefix}/var'
87libdir='${exec_prefix}/lib'
88includedir='${prefix}/include'
89oldincludedir='/usr/include'
90infodir='${prefix}/info'
91mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000092
93# Initialize some other variables.
94subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000095MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000096SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000097# Maximum number of lines to put in a shell here document.
98ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000099
100ac_prev=
101for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000102do
Guido van Rossum627b2d71993-12-24 10:39:16 +0000103
Guido van Rossum7f43da71994-08-01 12:15:30 +0000104 # If the previous option needs an argument, assign it.
105 if test -n "$ac_prev"; then
106 eval "$ac_prev=\$ac_option"
107 ac_prev=
108 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000109 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000110
Guido van Rossum7f43da71994-08-01 12:15:30 +0000111 case "$ac_option" in
112 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
113 *) ac_optarg= ;;
114 esac
115
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000116 # Accept the important Cygnus configure options, so we can diagnose typos.
117
Guido van Rossum7f43da71994-08-01 12:15:30 +0000118 case "$ac_option" in
119
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000120 -bindir | --bindir | --bindi | --bind | --bin | --bi)
121 ac_prev=bindir ;;
122 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
123 bindir="$ac_optarg" ;;
124
125 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000126 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000127 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000128 build="$ac_optarg" ;;
129
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000130 -cache-file | --cache-file | --cache-fil | --cache-fi \
131 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
132 ac_prev=cache_file ;;
133 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
134 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
135 cache_file="$ac_optarg" ;;
136
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000137 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
138 ac_prev=datadir ;;
139 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
140 | --da=*)
141 datadir="$ac_optarg" ;;
142
Guido van Rossum7f43da71994-08-01 12:15:30 +0000143 -disable-* | --disable-*)
144 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000145 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000146 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000147 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000148 fi
149 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
150 eval "enable_${ac_feature}=no" ;;
151
152 -enable-* | --enable-*)
153 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000154 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000155 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000156 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000157 fi
158 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
159 case "$ac_option" in
160 *=*) ;;
161 *) ac_optarg=yes ;;
162 esac
163 eval "enable_${ac_feature}='$ac_optarg'" ;;
164
Guido van Rossum7f43da71994-08-01 12:15:30 +0000165 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
166 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
167 | --exec | --exe | --ex)
168 ac_prev=exec_prefix ;;
169 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
170 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
171 | --exec=* | --exe=* | --ex=*)
172 exec_prefix="$ac_optarg" ;;
173
174 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000175 # Obsolete; use --with-gas.
176 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000177
178 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000179 # Omit some internal or obsolete options to make the list less imposing.
180 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000181 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000182Usage: configure [options] [host]
183Options: [defaults in brackets after descriptions]
184Configuration:
185 --cache-file=FILE cache test results in FILE
186 --help print this message
187 --no-create do not create output files
188 --quiet, --silent do not print \`checking...' messages
189 --version print the version of autoconf that created configure
190Directory and file names:
191 --prefix=PREFIX install architecture-independent files in PREFIX
192 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000193 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000194 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000195 --bindir=DIR user executables in DIR [EPREFIX/bin]
196 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
197 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
198 --datadir=DIR read-only architecture-independent data in DIR
199 [PREFIX/share]
200 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
201 --sharedstatedir=DIR modifiable architecture-independent data in DIR
202 [PREFIX/com]
203 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
204 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
205 --includedir=DIR C header files in DIR [PREFIX/include]
206 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
207 --infodir=DIR info documentation in DIR [PREFIX/info]
208 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000209 --srcdir=DIR find the sources in DIR [configure dir or ..]
210 --program-prefix=PREFIX prepend PREFIX to installed program names
211 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000212 --program-transform-name=PROGRAM
213 run sed PROGRAM on installed program names
214EOF
215 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000216Host type:
217 --build=BUILD configure for building on BUILD [BUILD=HOST]
218 --host=HOST configure for HOST [guessed]
219 --target=TARGET configure for TARGET [TARGET=HOST]
220Features and packages:
221 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
222 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
223 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
224 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
225 --x-includes=DIR X include files are in DIR
226 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000227EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000228 if test -n "$ac_help"; then
229 echo "--enable and --with options recognized:$ac_help"
230 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000231 exit 0 ;;
232
233 -host | --host | --hos | --ho)
234 ac_prev=host ;;
235 -host=* | --host=* | --hos=* | --ho=*)
236 host="$ac_optarg" ;;
237
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000238 -includedir | --includedir | --includedi | --included | --include \
239 | --includ | --inclu | --incl | --inc)
240 ac_prev=includedir ;;
241 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
242 | --includ=* | --inclu=* | --incl=* | --inc=*)
243 includedir="$ac_optarg" ;;
244
245 -infodir | --infodir | --infodi | --infod | --info | --inf)
246 ac_prev=infodir ;;
247 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
248 infodir="$ac_optarg" ;;
249
250 -libdir | --libdir | --libdi | --libd)
251 ac_prev=libdir ;;
252 -libdir=* | --libdir=* | --libdi=* | --libd=*)
253 libdir="$ac_optarg" ;;
254
255 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
256 | --libexe | --libex | --libe)
257 ac_prev=libexecdir ;;
258 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
259 | --libexe=* | --libex=* | --libe=*)
260 libexecdir="$ac_optarg" ;;
261
262 -localstatedir | --localstatedir | --localstatedi | --localstated \
263 | --localstate | --localstat | --localsta | --localst \
264 | --locals | --local | --loca | --loc | --lo)
265 ac_prev=localstatedir ;;
266 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
267 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
268 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
269 localstatedir="$ac_optarg" ;;
270
271 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
272 ac_prev=mandir ;;
273 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
274 mandir="$ac_optarg" ;;
275
Guido van Rossum7f43da71994-08-01 12:15:30 +0000276 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000277 # Obsolete; use --without-fp.
278 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000279
280 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
281 | --no-cr | --no-c)
282 no_create=yes ;;
283
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000284 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
285 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
286 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000287
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000288 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
289 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
290 | --oldin | --oldi | --old | --ol | --o)
291 ac_prev=oldincludedir ;;
292 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
293 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
294 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
295 oldincludedir="$ac_optarg" ;;
296
Guido van Rossum7f43da71994-08-01 12:15:30 +0000297 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
298 ac_prev=prefix ;;
299 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
300 prefix="$ac_optarg" ;;
301
302 -program-prefix | --program-prefix | --program-prefi | --program-pref \
303 | --program-pre | --program-pr | --program-p)
304 ac_prev=program_prefix ;;
305 -program-prefix=* | --program-prefix=* | --program-prefi=* \
306 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
307 program_prefix="$ac_optarg" ;;
308
309 -program-suffix | --program-suffix | --program-suffi | --program-suff \
310 | --program-suf | --program-su | --program-s)
311 ac_prev=program_suffix ;;
312 -program-suffix=* | --program-suffix=* | --program-suffi=* \
313 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
314 program_suffix="$ac_optarg" ;;
315
316 -program-transform-name | --program-transform-name \
317 | --program-transform-nam | --program-transform-na \
318 | --program-transform-n | --program-transform- \
319 | --program-transform | --program-transfor \
320 | --program-transfo | --program-transf \
321 | --program-trans | --program-tran \
322 | --progr-tra | --program-tr | --program-t)
323 ac_prev=program_transform_name ;;
324 -program-transform-name=* | --program-transform-name=* \
325 | --program-transform-nam=* | --program-transform-na=* \
326 | --program-transform-n=* | --program-transform-=* \
327 | --program-transform=* | --program-transfor=* \
328 | --program-transfo=* | --program-transf=* \
329 | --program-trans=* | --program-tran=* \
330 | --progr-tra=* | --program-tr=* | --program-t=*)
331 program_transform_name="$ac_optarg" ;;
332
333 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
334 | -silent | --silent | --silen | --sile | --sil)
335 silent=yes ;;
336
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000337 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
338 ac_prev=sbindir ;;
339 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
340 | --sbi=* | --sb=*)
341 sbindir="$ac_optarg" ;;
342
343 -sharedstatedir | --sharedstatedir | --sharedstatedi \
344 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
345 | --sharedst | --shareds | --shared | --share | --shar \
346 | --sha | --sh)
347 ac_prev=sharedstatedir ;;
348 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
349 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
350 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
351 | --sha=* | --sh=*)
352 sharedstatedir="$ac_optarg" ;;
353
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000354 -site | --site | --sit)
355 ac_prev=site ;;
356 -site=* | --site=* | --sit=*)
357 site="$ac_optarg" ;;
358
Guido van Rossum7f43da71994-08-01 12:15:30 +0000359 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
360 ac_prev=srcdir ;;
361 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
362 srcdir="$ac_optarg" ;;
363
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000364 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
365 | --syscon | --sysco | --sysc | --sys | --sy)
366 ac_prev=sysconfdir ;;
367 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
368 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
369 sysconfdir="$ac_optarg" ;;
370
Guido van Rossum7f43da71994-08-01 12:15:30 +0000371 -target | --target | --targe | --targ | --tar | --ta | --t)
372 ac_prev=target ;;
373 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
374 target="$ac_optarg" ;;
375
376 -v | -verbose | --verbose | --verbos | --verbo | --verb)
377 verbose=yes ;;
378
379 -version | --version | --versio | --versi | --vers)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000380 echo "configure generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000381 exit 0 ;;
382
383 -with-* | --with-*)
384 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000385 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000386 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000387 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000388 fi
389 ac_package=`echo $ac_package| sed 's/-/_/g'`
390 case "$ac_option" in
391 *=*) ;;
392 *) ac_optarg=yes ;;
393 esac
394 eval "with_${ac_package}='$ac_optarg'" ;;
395
396 -without-* | --without-*)
397 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000398 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000399 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000400 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000401 fi
402 ac_package=`echo $ac_package| sed 's/-/_/g'`
403 eval "with_${ac_package}=no" ;;
404
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000405 --x)
406 # Obsolete; use --with-x.
407 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000408
409 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
410 | --x-incl | --x-inc | --x-in | --x-i)
411 ac_prev=x_includes ;;
412 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
413 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
414 x_includes="$ac_optarg" ;;
415
416 -x-libraries | --x-libraries | --x-librarie | --x-librari \
417 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
418 ac_prev=x_libraries ;;
419 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
420 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
421 x_libraries="$ac_optarg" ;;
422
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000423 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000424 ;;
425
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000426 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000427 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000428 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000429 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000430 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000431 { 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 +0000432 fi
433 nonopt="$ac_option"
434 ;;
435
436 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000437done
438
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000440 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000441fi
442
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000443trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000444
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000445# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000446# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000447# 1 file creation
448# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000449# 3 some systems may open it to /dev/tty
450# 4 used on the Kubota Titan
451# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000452# 5 compiler messages saved in config.log
453if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000454 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000455else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000456 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000457fi
458exec 5>./config.log
459
460echo "\
461This file contains any messages produced by compilers while
462running configure, to aid debugging if configure makes a mistake.
463" 1>&5
464
465# Strip out --no-create and --no-recursion so they do not pile up.
466# Also quote any args containing shell metacharacters.
467ac_configure_args=
468for ac_arg
469do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000470 case "$ac_arg" in
471 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
472 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000473 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
474 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
475 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
476 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
477 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000478 esac
479done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000480
481# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000482# Only set these to C if already set. These must not be set unconditionally
483# because not all systems understand e.g. LANG=C (notably SCO).
484# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
485# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000486if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000487if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
488if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
489if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000490
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491# confdefs.h avoids OS command line length limits that DEFS can exceed.
492rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000493# AIX cpp loses on an empty file, so make sure it contains at least a newline.
494echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000495
496# A filename unique to this package, relative to the directory that
497# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000499
500# Find the source files, if location was not specified.
501if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000502 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000503 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000504 ac_prog=$0
505 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
506 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
507 srcdir=$ac_confdir
508 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000509 srcdir=..
510 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000511else
512 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000513fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000514if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000515 if test "$ac_srcdir_defaulted" = yes; then
516 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000517 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000518 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000519 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000520fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000521srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
522
523# Prefer explicitly selected file to automatically selected ones.
524if test -z "$CONFIG_SITE"; then
525 if test "x$prefix" != xNONE; then
526 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
527 else
528 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
529 fi
530fi
531for ac_site_file in $CONFIG_SITE; do
532 if test -r "$ac_site_file"; then
533 echo "loading site script $ac_site_file"
534 . "$ac_site_file"
535 fi
536done
537
538if test -r "$cache_file"; then
539 echo "loading cache $cache_file"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000540 . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000541else
542 echo "creating cache $cache_file"
543 > $cache_file
544fi
545
Guido van Rossum7f43da71994-08-01 12:15:30 +0000546ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000547# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000548ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000549ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000550ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000551cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000552
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000553ac_exeext=
554ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000555if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
556 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
557 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
558 ac_n= ac_c='
559' ac_t=' '
560 else
561 ac_n=-n ac_c= ac_t=
562 fi
563else
564 ac_n= ac_c='\c' ac_t=
565fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000566
Guido van Rossum0a516c91994-09-12 10:58:40 +0000567
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000568
Guido van Rossum627b2d71993-12-24 10:39:16 +0000569
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000570# Set VERSION so we only need to edit in one place (i.e., here)
571
Guido van Rossum6db412b2001-04-18 04:37:57 +0000572VERSION=2.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000573
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +0000574# Arguments passed to configure.
575
576CONFIG_ARGS="$ac_configure_args"
577
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000578# NEXTSTEP|MacOSX|Darwin stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000579if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000580
581 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +0000582echo "configure:583: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000583 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000584if test "${with_next_archs+set}" = set; then
585 withval="$with_next_archs"
586
Guido van Rossum563e7081996-09-10 18:20:48 +0000587 if test -n "$withval"; then
588 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
589 # GCC does not currently support multi archs on the NeXT
590 with_gcc=no
591 fi
592 echo "$ac_t""$with_next_archs" 1>&6
593
594else
595 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000596fi
597
Guido van Rossum563e7081996-09-10 18:20:48 +0000598
599 if test -z "$MACHDEP"
600 then
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000601 ac_sys_system=`uname -s`
602 if test "$ac_sys_system" = "Darwin" ; then
603 ac_sys_release=`uname -r`
604 else
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000605 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000606 sed -e 's/://' -e 's/\./_/'` && \
607 ac_sys_system=next && ac_sys_release=$4
608 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000609
Guido van Rossum3dc0a512000-10-05 18:00:06 +0000610 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000611 fi
612fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000613
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000614# Check whether --with-next-framework or --without-next-framework was given.
615if test "${with_next_framework+set}" = set; then
616 withval="$with_next_framework"
617 :
618fi
619
620# Check whether --with-dyld or --without-dyld was given.
621if test "${with_dyld+set}" = set; then
622 withval="$with_dyld"
623 :
624fi
625
Guido van Rossum91922671997-10-09 20:24:13 +0000626
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000627# Set name for machine-dependent library files
628
629echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +0000630echo "configure:631: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000631if test -z "$MACHDEP"
632then
Guido van Rossum563e7081996-09-10 18:20:48 +0000633 ac_sys_system=`uname -s`
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000634 if test "$ac_sys_system" = "AIX" -o \
635 "$ac_sys_system" = "Monterey64" -o \
636 "$ac_sys_system" = "UnixWare"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000637 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000638 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000639 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000640 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000641 ac_md_system=`echo $ac_sys_system |
642 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
643 ac_md_release=`echo $ac_sys_release |
644 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000645 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000646
Guido van Rossum07397971997-04-29 21:49:50 +0000647 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000648 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000649 esac
650fi
Guido van Rossum91922671997-10-09 20:24:13 +0000651
652#
653# SGI compilers allow the specification of the both the ABI and the
654# ISA on the command line. Depending on the values of these switches,
655# different and often incompatable code will be generated.
656#
657# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
658# thus supply support for various ABI/ISA combinations. The MACHDEP
659# variable is also adjusted.
660#
661
662if test ! -z "$SGI_ABI"
663then
664 CC="cc $SGI_ABI"
665 LDFLAGS="$SGI_ABI $LDFLAGS"
666 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
667fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000668echo "$ac_t""$MACHDEP" 1>&6
669
Guido van Rossum627b2d71993-12-24 10:39:16 +0000670# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000671echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000672echo "configure:673: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000673# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000674if test "${with_gcc+set}" = set; then
675 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000676
677 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000678 no) CC=cc
679 without_gcc=yes;;
680 yes) CC=gcc
681 without_gcc=no;;
682 *) CC=$withval
683 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000684 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000685else
Guido van Rossume77438c1995-09-13 18:59:59 +0000686
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000687 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000688 OSF1) CC=cc
689 without_gcc=;;
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000690 AIX*) CC=cc_r
691 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000692 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000693 case $BE_HOST_CPU in
694 ppc)
Fred Drake5790be12000-10-09 17:06:13 +0000695 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000696 without_gcc=yes
Fred Drake5790be12000-10-09 17:06:13 +0000697 OPT="-O -D'DL_EXPORT(RTYPE)=__declspec(dllexport) RTYPE' -D'DL_IMPORT(RTYPE)=__declspec(dllexport) RTYPE' -export pragma"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000698 CCSHARED="-UDL_IMPORT -D'DL_IMPORT(RTYPE)=__declspec(dllimport) RTYPE'"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000699 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000700 ;;
701 x86)
Fred Drake5790be12000-10-09 17:06:13 +0000702 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000703 without_gcc=no
Fred Drake5790be12000-10-09 17:06:13 +0000704 OPT=-O
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000705 ;;
706 *)
Fred Drake5790be12000-10-09 17:06:13 +0000707 { echo "configure: error: Unknown BeOS platform \"$BE_HOST_CPU\"" 1>&2; exit 1; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000708 ;;
709 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +0000710 AR="\$(srcdir)/Modules/ar_beos"
711 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000712 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000713 Monterey*)
714 RANLIB=:
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000715 without_gcc=
716 ;;
717 UnixWare*)
718 RANLIB=:
719 without_gcc=
720 ;;
721 *)
722 without_gcc=no
723 ;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000724 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000725fi
726
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000727echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000728
Guido van Rossum95012191999-12-16 17:50:52 +0000729
730
Fred Drakea1a84e72001-03-06 05:52:16 +0000731MAINOBJ=python.o
Guido van Rossum95012191999-12-16 17:50:52 +0000732echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000733echo "configure:734: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000734# Check whether --with-cxx or --without-cxx was given.
735if test "${with_cxx+set}" = set; then
736 withval="$with_cxx"
737
Martin v. Löwis22352952000-12-13 17:37:02 +0000738 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +0000739 case $withval in
740 no) CXX=
741 with_cxx=no;;
742 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +0000743 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +0000744 with_cxx=$withval;;
745 esac
746else
747
748 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +0000749 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +0000750
751fi
752
753echo "$ac_t""$with_cxx" 1>&6
Martin v. Löwis22352952000-12-13 17:37:02 +0000754
755
756if test "$check_cxx" = "yes"
757then
758 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
759do
760# Extract the first word of "$ac_prog", so it can be a program name with args.
761set dummy $ac_prog; ac_word=$2
762echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000763echo "configure:764: checking for $ac_word" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000764if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
765 echo $ac_n "(cached) $ac_c" 1>&6
766else
767 if test -n "$CXX"; then
768 ac_cv_prog_CXX="$CXX" # Let the user override the test.
769else
770 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
771 ac_dummy="$PATH"
772 for ac_dir in $ac_dummy; do
773 test -z "$ac_dir" && ac_dir=.
774 if test -f $ac_dir/$ac_word; then
775 ac_cv_prog_CXX="$ac_prog"
776 break
777 fi
778 done
779 IFS="$ac_save_ifs"
780fi
781fi
782CXX="$ac_cv_prog_CXX"
783if test -n "$CXX"; then
784 echo "$ac_t""$CXX" 1>&6
785else
786 echo "$ac_t""no" 1>&6
787fi
788
789test -n "$CXX" && break
790done
791test -n "$CXX" || CXX="notfound"
792
793 if test "$CXX" = "notfound"
794 then
795 CXX=
796 else
797 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000798echo "configure:799: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000799
800ac_ext=C
801# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
802ac_cpp='$CXXCPP $CPPFLAGS'
803ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
804ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
805cross_compiling=$ac_cv_prog_cxx_cross
806
807cat > conftest.$ac_ext << EOF
808
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000809#line 810 "configure"
Martin v. Löwis22352952000-12-13 17:37:02 +0000810#include "confdefs.h"
811
812int main(){return(0);}
813EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000814if { (eval echo configure:815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Martin v. Löwis22352952000-12-13 17:37:02 +0000815 ac_cv_prog_cxx_works=yes
816 # If we can't run a trivial program, we are probably using a cross compiler.
817 if (./conftest; exit) 2>/dev/null; then
818 ac_cv_prog_cxx_cross=no
819 else
820 ac_cv_prog_cxx_cross=yes
821 fi
822else
823 echo "configure: failed program was:" >&5
824 cat conftest.$ac_ext >&5
825 ac_cv_prog_cxx_works=no
826fi
827rm -fr conftest*
828ac_ext=c
829# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
830ac_cpp='$CPP $CPPFLAGS'
831ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
832ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
833cross_compiling=$ac_cv_prog_cc_cross
834
835echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
836if test $ac_cv_prog_cxx_works = no; then
837 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
838fi
839echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000840echo "configure:841: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
Martin v. Löwis22352952000-12-13 17:37:02 +0000841echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
842cross_compiling=$ac_cv_prog_cxx_cross
843
844 fi
845fi
846
Guido van Rossum8b131c51995-03-09 14:10:13 +0000847# If the user switches compilers, we can't believe the cache
848if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
849then
850 { echo "configure: error: cached CC is different -- throw away $cache_file
851(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
852fi
853
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000854# Extract the first word of "gcc", so it can be a program name with args.
855set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000856echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000857echo "configure:858: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000858if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000859 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000860else
861 if test -n "$CC"; then
862 ac_cv_prog_CC="$CC" # Let the user override the test.
863else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000864 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
865 ac_dummy="$PATH"
866 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867 test -z "$ac_dir" && ac_dir=.
868 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000870 break
871 fi
872 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000874fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000875fi
876CC="$ac_cv_prog_CC"
877if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000878 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000880 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000881fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000882
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000883if test -z "$CC"; then
884 # Extract the first word of "cc", so it can be a program name with args.
885set dummy cc; ac_word=$2
886echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000887echo "configure:888: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000888if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000889 echo $ac_n "(cached) $ac_c" 1>&6
890else
891 if test -n "$CC"; then
892 ac_cv_prog_CC="$CC" # Let the user override the test.
893else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000894 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000896 ac_dummy="$PATH"
897 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898 test -z "$ac_dir" && ac_dir=.
899 if test -f $ac_dir/$ac_word; then
900 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
901 ac_prog_rejected=yes
902 continue
903 fi
904 ac_cv_prog_CC="cc"
905 break
906 fi
907 done
908 IFS="$ac_save_ifs"
909if test $ac_prog_rejected = yes; then
910 # We found a bogon in the path, so make sure we never use it.
911 set dummy $ac_cv_prog_CC
912 shift
913 if test $# -gt 0; then
914 # We chose a different compiler from the bogus one.
915 # However, it has the same basename, so the bogon will be chosen
916 # first if we set CC to just the basename; use the full file name.
917 shift
918 set dummy "$ac_dir/$ac_word" "$@"
919 shift
920 ac_cv_prog_CC="$@"
921 fi
922fi
923fi
924fi
925CC="$ac_cv_prog_CC"
926if test -n "$CC"; then
927 echo "$ac_t""$CC" 1>&6
928else
929 echo "$ac_t""no" 1>&6
930fi
931
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000932 if test -z "$CC"; then
933 case "`uname -s`" in
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000934 *win32* | *WIN32*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000935 # Extract the first word of "cl", so it can be a program name with args.
936set dummy cl; ac_word=$2
937echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000938echo "configure:939: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000939if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000940 echo $ac_n "(cached) $ac_c" 1>&6
941else
942 if test -n "$CC"; then
943 ac_cv_prog_CC="$CC" # Let the user override the test.
944else
945 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
946 ac_dummy="$PATH"
947 for ac_dir in $ac_dummy; do
948 test -z "$ac_dir" && ac_dir=.
949 if test -f $ac_dir/$ac_word; then
950 ac_cv_prog_CC="cl"
951 break
952 fi
953 done
954 IFS="$ac_save_ifs"
955fi
956fi
957CC="$ac_cv_prog_CC"
958if test -n "$CC"; then
959 echo "$ac_t""$CC" 1>&6
960else
961 echo "$ac_t""no" 1>&6
962fi
963 ;;
964 esac
965 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000966 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
967fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000968
Guido van Rossum8d6e8af2000-10-30 17:45:07 +0000969echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000970echo "configure:971: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000971
972ac_ext=c
973# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
974ac_cpp='$CPP $CPPFLAGS'
975ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000976ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000977cross_compiling=$ac_cv_prog_cc_cross
978
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000979cat > conftest.$ac_ext << EOF
980
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000981#line 982 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000982#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000983
Guido van Rossumf78abae1997-01-21 22:02:36 +0000984main(){return(0);}
985EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +0000986if { (eval echo configure:987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000987 ac_cv_prog_cc_works=yes
988 # If we can't run a trivial program, we are probably using a cross compiler.
989 if (./conftest; exit) 2>/dev/null; then
990 ac_cv_prog_cc_cross=no
991 else
992 ac_cv_prog_cc_cross=yes
993 fi
994else
995 echo "configure: failed program was:" >&5
996 cat conftest.$ac_ext >&5
997 ac_cv_prog_cc_works=no
998fi
999rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001000ac_ext=c
1001# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1002ac_cpp='$CPP $CPPFLAGS'
1003ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1004ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1005cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +00001006
1007echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1008if test $ac_cv_prog_cc_works = no; then
1009 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1010fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001011echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001012echo "configure:1013: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001013echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1014cross_compiling=$ac_cv_prog_cc_cross
1015
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001016echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001017echo "configure:1018: checking whether we are using GNU C" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001018if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001019 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001020else
1021 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001022#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001023 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001024#endif
1025EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001026if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001027 ac_cv_prog_gcc=yes
1028else
1029 ac_cv_prog_gcc=no
1030fi
1031fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001033echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001034
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001035if test $ac_cv_prog_gcc = yes; then
1036 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001037else
1038 GCC=
1039fi
1040
1041ac_test_CFLAGS="${CFLAGS+set}"
1042ac_save_CFLAGS="$CFLAGS"
1043CFLAGS=
1044echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001045echo "configure:1046: checking whether ${CC-cc} accepts -g" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001046if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001047 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001048else
1049 echo 'void f(){}' > conftest.c
1050if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001051 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001052else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001053 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001054fi
1055rm -f conftest*
1056
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001057fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
Guido van Rossumf78abae1997-01-21 22:02:36 +00001059echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001060if test "$ac_test_CFLAGS" = set; then
1061 CFLAGS="$ac_save_CFLAGS"
1062elif test $ac_cv_prog_cc_g = yes; then
1063 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001064 CFLAGS="-g -O2"
1065 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001066 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001067 fi
1068else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001069 if test "$GCC" = yes; then
1070 CFLAGS="-O2"
1071 else
1072 CFLAGS=
1073 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001074fi
1075
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001076echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001077echo "configure:1078: checking for Cygwin environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001078if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1079 echo $ac_n "(cached) $ac_c" 1>&6
1080else
1081 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001082#line 1083 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001083#include "confdefs.h"
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001084
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001085int main() {
1086
1087#ifndef __CYGWIN__
1088#define __CYGWIN__ __CYGWIN32__
1089#endif
1090return __CYGWIN__;
1091; return 0; }
1092EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001093if { (eval echo configure:1094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001094 rm -rf conftest*
1095 ac_cv_cygwin=yes
1096else
1097 echo "configure: failed program was:" >&5
1098 cat conftest.$ac_ext >&5
1099 rm -rf conftest*
1100 ac_cv_cygwin=no
1101fi
1102rm -f conftest*
1103rm -f conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001104fi
1105
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001106echo "$ac_t""$ac_cv_cygwin" 1>&6
1107CYGWIN=
1108test "$ac_cv_cygwin" = yes && CYGWIN=yes
1109echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001110echo "configure:1111: checking for mingw32 environment" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001111if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1112 echo $ac_n "(cached) $ac_c" 1>&6
1113else
1114 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001115#line 1116 "configure"
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001116#include "confdefs.h"
1117
1118int main() {
1119return __MINGW32__;
1120; return 0; }
1121EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001122if { (eval echo configure:1123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001123 rm -rf conftest*
1124 ac_cv_mingw32=yes
1125else
1126 echo "configure: failed program was:" >&5
1127 cat conftest.$ac_ext >&5
1128 rm -rf conftest*
1129 ac_cv_mingw32=no
1130fi
1131rm -f conftest*
1132rm -f conftest*
1133fi
1134
1135echo "$ac_t""$ac_cv_mingw32" 1>&6
1136MINGW32=
1137test "$ac_cv_mingw32" = yes && MINGW32=yes
1138
1139
1140echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001141echo "configure:1142: checking for executable suffix" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001142if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1143 echo $ac_n "(cached) $ac_c" 1>&6
1144else
1145 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1146 ac_cv_exeext=.exe
1147else
1148 rm -f conftest*
1149 echo 'int main () { return 0; }' > conftest.$ac_ext
1150 ac_cv_exeext=
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001151 if { (eval echo configure:1152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001152 for file in conftest.*; do
1153 case $file in
1154 *.c | *.o | *.obj) ;;
1155 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1156 esac
1157 done
1158 else
1159 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1160 fi
1161 rm -f conftest*
1162 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1163fi
1164fi
1165
1166EXEEXT=""
1167test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1168echo "$ac_t""${ac_cv_exeext}" 1>&6
1169ac_exeext=$EXEEXT
1170
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001171echo $ac_n "checking for --with-suffix""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001172echo "configure:1173: checking for --with-suffix" >&5
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00001173# Check whether --with-suffix or --without-suffix was given.
1174if test "${with_suffix+set}" = set; then
1175 withval="$with_suffix"
1176
1177 case $withval in
1178 no) EXEEXT=;;
1179 yes) EXEEXT=.exe;;
1180 *) EXEEXT=$withval;;
1181 esac
1182fi
1183
1184echo "$ac_t""$EXEEXT" 1>&6
Guido van Rossumff555e32000-09-22 15:38:21 +00001185
Guido van Rossumdd997f71998-10-07 19:58:26 +00001186case $MACHDEP in
1187bsdos*)
1188 case $CC in
1189 gcc) CC="$CC -D_HAVE_BSDI";;
1190 esac;;
1191esac
1192
Guido van Rossum24b1e751997-08-21 02:29:16 +00001193case $ac_sys_system in
1194hp*|HP*)
1195 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00001196 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001197 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001198Monterey*)
1199 case $CC in
1200 cc) CC="$CC -Wl,-Bexport";;
1201 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001202SunOS*)
1203 # Some functions have a prototype only with that define, e.g. confstr
1204 cat >> confdefs.h <<\EOF
1205#define __EXTENSIONS__ 1
1206EOF
1207
1208 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001209esac
1210
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001211
Martin v. Löwisa30c1002001-03-06 12:10:20 +00001212
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001213echo $ac_n "checking LIBRARY""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001214echo "configure:1215: checking LIBRARY" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001215if test -z "$LIBRARY"
1216then
1217 LIBRARY='libpython$(VERSION).a'
1218fi
1219echo "$ac_t""$LIBRARY" 1>&6
1220
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001221# LDLIBRARY is the name of the library to link against (as opposed to the
1222# name of the library into which to insert object files). On systems
1223# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
Guido van Rossumaef734b2001-01-10 21:09:12 +00001224# the Makefiles). On Cygwin LDLIBRARY is the import library, DLLLIBRARY is the
1225# shared (i.e., DLL) library.
1226
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001227
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00001228LDLIBRARY="$LIBRARY"
Guido van Rossumca563f22001-01-23 01:52:44 +00001229DLLLIBRARY=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001230
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001231# LINKCC is the command that links the python executable -- default is $(CC).
Fred Drake5790be12000-10-09 17:06:13 +00001232# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001233# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001234
1235echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001236echo "configure:1237: checking LINKCC" >&5
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001237if test -z "$LINKCC"
1238then
1239 case $ac_sys_system in
1240 AIX*)
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001241 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001242 dgux*)
1243 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001244 Monterey64*)
1245 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001246 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001247 esac
1248fi
1249echo "$ac_t""$LINKCC" 1>&6
1250
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001251echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001252echo "configure:1253: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001253
1254# NeXT framework builds require that the 'ar' library be converted into
1255# a bundle using libtool.
1256if test "$with_next_framework"
1257then
1258 LDLIBRARY='libpython$(VERSION).dylib'
1259fi
1260
1261# DG/UX requires some fancy ld contortions to produce a .so from an .a
Fred Drake5790be12000-10-09 17:06:13 +00001262case $MACHDEP in
1263dguxR4)
1264 LDLIBRARY='libpython$(VERSION).so'
1265 OPT="$OPT -pic"
1266 ;;
1267beos*)
1268 LDLIBRARY='libpython$(VERSION).so'
1269 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001270cygwin*)
1271 LDLIBRARY='libpython$(VERSION).dll.a'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001272 DLLLIBRARY='libpython$(VERSION).dll'
Guido van Rossumaef734b2001-01-10 21:09:12 +00001273 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001274unixware*)
1275 LDLIBRARY='libpython$(VERSION).so'
1276 ;;
Fred Drake5790be12000-10-09 17:06:13 +00001277esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001278echo "$ac_t""$LDLIBRARY" 1>&6
1279
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001280# Extract the first word of "ranlib", so it can be a program name with args.
1281set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001282echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001283echo "configure:1284: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001284if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001285 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001286else
1287 if test -n "$RANLIB"; then
1288 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1289else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001290 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1291 ac_dummy="$PATH"
1292 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001293 test -z "$ac_dir" && ac_dir=.
1294 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001295 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001296 break
1297 fi
1298 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001299 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001300 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302fi
1303RANLIB="$ac_cv_prog_RANLIB"
1304if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001305 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001306else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001307 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001309
1310
Guido van Rossum7f43da71994-08-01 12:15:30 +00001311for ac_prog in ar aal
1312do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001313# Extract the first word of "$ac_prog", so it can be a program name with args.
1314set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001315echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001316echo "configure:1317: checking for $ac_word" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001317if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001318 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001319else
1320 if test -n "$AR"; then
1321 ac_cv_prog_AR="$AR" # Let the user override the test.
1322else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001323 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1324 ac_dummy="$PATH"
1325 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001326 test -z "$ac_dir" && ac_dir=.
1327 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001328 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001329 break
1330 fi
1331 done
1332 IFS="$ac_save_ifs"
1333fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001334fi
1335AR="$ac_cv_prog_AR"
1336if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001337 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001338else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001339 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001340fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001341
1342test -n "$AR" && break
1343done
1344test -n "$AR" || AR="ar"
1345
Neil Schemenauera42c8272001-03-31 00:01:55 +00001346
1347case $MACHDEP in
1348bsdos*)
1349 # install -d does not work on BSDI
1350 if test -z "$INSTALL"
1351 then
1352 INSTALL="${srcdir}/install-sh -c"
1353 fi
1354esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001355ac_aux_dir=
1356for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1357 if test -f $ac_dir/install-sh; then
1358 ac_aux_dir=$ac_dir
1359 ac_install_sh="$ac_aux_dir/install-sh -c"
1360 break
1361 elif test -f $ac_dir/install.sh; then
1362 ac_aux_dir=$ac_dir
1363 ac_install_sh="$ac_aux_dir/install.sh -c"
1364 break
1365 fi
1366done
1367if test -z "$ac_aux_dir"; then
1368 { 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 +00001369fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001370ac_config_guess=$ac_aux_dir/config.guess
1371ac_config_sub=$ac_aux_dir/config.sub
1372ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
1373
1374# Find a good install program. We prefer a C program (faster),
1375# so one script is as good as another. But avoid the broken or
1376# incompatible versions:
1377# SysV /etc/install, /usr/sbin/install
1378# SunOS /usr/etc/install
1379# IRIX /sbin/install
1380# AIX /bin/install
1381# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1382# AFS /usr/afsws/bin/install, which mishandles nonexistent args
1383# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1384# ./install, which can be erroneously created by make from ./install.sh.
1385echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001386echo "configure:1387: checking for a BSD compatible install" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001387if test -z "$INSTALL"; then
1388if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1389 echo $ac_n "(cached) $ac_c" 1>&6
1390else
1391 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1392 for ac_dir in $PATH; do
1393 # Account for people who put trailing slashes in PATH elements.
1394 case "$ac_dir/" in
1395 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1396 *)
1397 # OSF1 and SCO ODT 3.0 have their own names for install.
1398 # Don't use installbsd from OSF since it installs stuff as root
1399 # by default.
1400 for ac_prog in ginstall scoinst install; do
1401 if test -f $ac_dir/$ac_prog; then
1402 if test $ac_prog = install &&
1403 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1404 # AIX install. It has an incompatible calling convention.
1405 :
1406 else
1407 ac_cv_path_install="$ac_dir/$ac_prog -c"
1408 break 2
1409 fi
1410 fi
1411 done
1412 ;;
1413 esac
1414 done
1415 IFS="$ac_save_IFS"
1416
1417fi
1418 if test "${ac_cv_path_install+set}" = set; then
1419 INSTALL="$ac_cv_path_install"
1420 else
1421 # As a last resort, use the slow shell script. We don't cache a
1422 # path for INSTALL within a source directory, because that will
1423 # break other packages using the cache if that directory is
1424 # removed, or if the path is relative.
1425 INSTALL="$ac_install_sh"
1426 fi
1427fi
1428echo "$ac_t""$INSTALL" 1>&6
1429
1430# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1431# It thinks the first close brace ends the variable substitution.
1432test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1433
1434test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1435
1436test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1437
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001438
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001439# Not every filesystem supports hard links
1440
1441if test -z "$LN" ; then
1442 case $ac_sys_system in
1443 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00001444 CYGWIN*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001445 *) LN=ln;;
1446 esac
1447fi
1448
Neil Schemenauerd32c2492001-01-24 17:25:28 +00001449# Optimizer/debugger flags
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001450
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001451if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001452then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001453 case $GCC in
1454 yes)
1455 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001456 yes)
1457 OPT="-g -O2 -Wall -Wstrict-prototypes";;
1458 *)
1459 OPT="-O2 -Wall -Wstrict-prototypes";;
Guido van Rossumedca74a1997-07-18 23:29:40 +00001460 esac
1461 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001462 *)
1463 case $ac_sys_system in
1464 UnixWare*)
1465 OPT="-O -K pentium,host,inline,loop_unroll,alloca ";;
1466 *)
1467 OPT="-O";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001468 esac
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001469 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001470fi
1471
Trent Mick635f6fb2000-08-23 21:33:05 +00001472# The current (beta) Monterey compiler dies with optimizations
1473case $ac_sys_system in
1474Monterey*) OPT="";;
1475esac
1476
Guido van Rossum563e7081996-09-10 18:20:48 +00001477if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001478then
1479 OPT="$OPT $ac_arch_flags"
1480fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001481# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001482echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001483echo "configure:1484: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001484# On Suns, sometimes $CPP names a directory.
1485if test -n "$CPP" && test -d "$CPP"; then
1486 CPP=
1487fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001488if test -z "$CPP"; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001489if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001490 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001491else
1492 # This must be in double quotes, not single quotes, because CPP may get
1493 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001494 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001495 # On the NeXT, cc -E runs the code through the compiler's parser,
1496 # not just through cpp.
1497 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001498#line 1499 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001499#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001500#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001501Syntax Error
1502EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001503ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001504{ (eval echo configure:1505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001505ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1506if test -z "$ac_err"; then
1507 :
1508else
1509 echo "$ac_err" >&5
1510 echo "configure: failed program was:" >&5
1511 cat conftest.$ac_ext >&5
1512 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001513 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001514 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001515#line 1516 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001516#include "confdefs.h"
1517#include <assert.h>
1518Syntax Error
1519EOF
1520ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001521{ (eval echo configure:1522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001522ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001523if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001524 :
1525else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001526 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001527 echo "configure: failed program was:" >&5
1528 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001529 rm -rf conftest*
Guido van Rossumff555e32000-09-22 15:38:21 +00001530 CPP="${CC-cc} -nologo -E"
1531 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001532#line 1533 "configure"
Guido van Rossumff555e32000-09-22 15:38:21 +00001533#include "confdefs.h"
1534#include <assert.h>
1535Syntax Error
1536EOF
1537ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001538{ (eval echo configure:1539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumff555e32000-09-22 15:38:21 +00001539ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1540if test -z "$ac_err"; then
1541 :
1542else
1543 echo "$ac_err" >&5
1544 echo "configure: failed program was:" >&5
1545 cat conftest.$ac_ext >&5
1546 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001547 CPP=/lib/cpp
1548fi
1549rm -f conftest*
1550fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001551rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001552fi
1553rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001554 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001555fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001556 CPP="$ac_cv_prog_CPP"
1557else
1558 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001559fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001560echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001561
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001562echo $ac_n "checking for AIX""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001563echo "configure:1564: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001564cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001565#line 1566 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001566#include "confdefs.h"
1567#ifdef _AIX
1568 yes
1569#endif
1570
1571EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001572if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1573 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001574 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001575 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001576#define _ALL_SOURCE 1
1577EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001578
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001579else
1580 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001581 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001582fi
1583rm -f conftest*
1584
1585
Guido van Rossumf78abae1997-01-21 22:02:36 +00001586ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001587echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001588echo "configure:1589: checking for minix/config.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001589if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001590 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001591else
1592 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001593#line 1594 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001594#include "confdefs.h"
1595#include <minix/config.h>
1596EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001597ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001598{ (eval echo configure:1599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001599ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001600if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001601 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001602 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001603else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001604 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001605 echo "configure: failed program was:" >&5
1606 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001607 rm -rf conftest*
1608 eval "ac_cv_header_$ac_safe=no"
1609fi
1610rm -f conftest*
1611fi
1612if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001613 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001614 MINIX=yes
1615else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001616 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001617MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001618fi
1619
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001620if test "$MINIX" = yes; then
1621 cat >> confdefs.h <<\EOF
1622#define _POSIX_SOURCE 1
1623EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001624
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001625 cat >> confdefs.h <<\EOF
1626#define _POSIX_1_SOURCE 2
1627EOF
1628
1629 cat >> confdefs.h <<\EOF
1630#define _MINIX 1
1631EOF
1632
1633fi
1634
Guido van Rossumda88dad1995-01-26 00:46:29 +00001635
Guido van Rossum91922671997-10-09 20:24:13 +00001636echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001637echo "configure:1638: checking whether $CC accepts -OPT:Olimit=0" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001638if eval "test \"`echo '$''{'ac_cv_opt_olimit_ok'+set}'`\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001639 echo $ac_n "(cached) $ac_c" 1>&6
1640else
1641 ac_save_cc="$CC"
1642CC="$CC -OPT:Olimit=0"
1643if test "$cross_compiling" = yes; then
1644 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1645else
1646 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001647#line 1648 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001648#include "confdefs.h"
1649int main() { return 0; }
1650EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001651if { (eval echo configure:1652: \"$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 +00001652then
1653 ac_cv_opt_olimit_ok=yes
1654else
1655 echo "configure: failed program was:" >&5
1656 cat conftest.$ac_ext >&5
1657 rm -fr conftest*
1658 ac_cv_opt_olimit_ok=no
1659fi
1660rm -fr conftest*
1661fi
1662
1663CC="$ac_save_cc"
1664fi
1665
1666echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001667if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00001668 case $ac_sys_system in
1669 Darwin*) OPT="$OPT" ;;
1670 *) OPT="$OPT -OPT:Olimit=0";;
1671 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001672else
1673 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001674echo "configure:1675: checking whether $CC accepts -Olimit 1500" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001675 if eval "test \"`echo '$''{'ac_cv_olimit_ok'+set}'`\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001676 echo $ac_n "(cached) $ac_c" 1>&6
1677else
1678 ac_save_cc="$CC"
1679 CC="$CC -Olimit 1500"
1680 if test "$cross_compiling" = yes; then
1681 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1682else
1683 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001684#line 1685 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001685#include "confdefs.h"
1686int main() { return 0; }
1687EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001688if { (eval echo configure:1689: \"$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 +00001689then
1690 ac_cv_olimit_ok=yes
1691else
1692 echo "configure: failed program was:" >&5
1693 cat conftest.$ac_ext >&5
1694 rm -fr conftest*
1695 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001696fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001697rm -fr conftest*
1698fi
1699
1700 CC="$ac_save_cc"
1701fi
1702
1703 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1704 if test $ac_cv_olimit_ok = yes; then
1705 OPT="$OPT -Olimit 1500"
1706 fi
1707fi
1708
Guido van Rossum84e7b241996-08-19 21:59:00 +00001709
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001710# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001711echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001712echo "configure:1713: checking for ANSI C header files" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001713if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001714 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001715else
1716 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001717#line 1718 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001718#include "confdefs.h"
1719#include <stdlib.h>
1720#include <stdarg.h>
1721#include <string.h>
1722#include <float.h>
1723EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001724ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001725{ (eval echo configure:1726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001726ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001727if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001728 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001729 ac_cv_header_stdc=yes
1730else
1731 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001732 echo "configure: failed program was:" >&5
1733 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001734 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001735 ac_cv_header_stdc=no
1736fi
1737rm -f conftest*
1738
1739if test $ac_cv_header_stdc = yes; then
1740 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1741cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001742#line 1743 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001743#include "confdefs.h"
1744#include <string.h>
1745EOF
1746if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1747 egrep "memchr" >/dev/null 2>&1; then
1748 :
1749else
1750 rm -rf conftest*
1751 ac_cv_header_stdc=no
1752fi
1753rm -f conftest*
1754
1755fi
1756
1757if test $ac_cv_header_stdc = yes; then
1758 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1759cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001760#line 1761 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001761#include "confdefs.h"
1762#include <stdlib.h>
1763EOF
1764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1765 egrep "free" >/dev/null 2>&1; then
1766 :
1767else
1768 rm -rf conftest*
1769 ac_cv_header_stdc=no
1770fi
1771rm -f conftest*
1772
1773fi
1774
1775if test $ac_cv_header_stdc = yes; then
1776 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1777if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001778 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001779else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001780 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001781#line 1782 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001782#include "confdefs.h"
1783#include <ctype.h>
1784#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1785#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001786#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001787int main () { int i; for (i = 0; i < 256; i++)
1788if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1789exit (0); }
1790
1791EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001792if { (eval echo configure:1793: \"$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 +00001793then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001794 :
1795else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001796 echo "configure: failed program was:" >&5
1797 cat conftest.$ac_ext >&5
1798 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001799 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001800fi
1801rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001802fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001803
1804fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001806
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001807echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808if test $ac_cv_header_stdc = yes; then
1809 cat >> confdefs.h <<\EOF
1810#define STDC_HEADERS 1
1811EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001812
1813fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001814
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001815for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \
Eric S. Raymondd2d75d32001-01-16 15:26:34 +00001816signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h termios.h \
Fred Drakebbc3c5a2001-05-11 16:11:25 +00001817sys/audioio.h sys/file.h sys/lock.h sys/modem.h db_185.h db.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001818sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drakeae90f8d2000-09-15 03:38:12 +00001819sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
1820ndbm.h db1/ndbm.h gdbm/ndbm.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001821do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001822ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001823echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001824echo "configure:1825: checking for $ac_hdr" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001825if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001826 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001827else
1828 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001829#line 1830 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001830#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001831#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001832EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001833ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001834{ (eval echo configure:1835: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001835ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001836if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001837 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001838 eval "ac_cv_header_$ac_safe=yes"
1839else
1840 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001841 echo "configure: failed program was:" >&5
1842 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001843 rm -rf conftest*
1844 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001845fi
1846rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001847fi
1848if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001849 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001850 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001851 cat >> confdefs.h <<EOF
1852#define $ac_tr_hdr 1
1853EOF
1854
1855else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001856 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001857fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001858done
1859
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001860ac_header_dirent=no
1861for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1862do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001863ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001864echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001865echo "configure:1866: checking for $ac_hdr that defines DIR" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001866if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001867 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001868else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001869 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001870#line 1871 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001871#include "confdefs.h"
1872#include <sys/types.h>
1873#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001874int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001875DIR *dirp = 0;
1876; return 0; }
1877EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001878if { (eval echo configure:1879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001879 rm -rf conftest*
1880 eval "ac_cv_header_dirent_$ac_safe=yes"
1881else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001882 echo "configure: failed program was:" >&5
1883 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001884 rm -rf conftest*
1885 eval "ac_cv_header_dirent_$ac_safe=no"
1886fi
1887rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001888fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001889if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001890 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001891 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001892 cat >> confdefs.h <<EOF
1893#define $ac_tr_hdr 1
1894EOF
1895 ac_header_dirent=$ac_hdr; break
1896else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001897 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001898fi
1899done
1900# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1901if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001902echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001903echo "configure:1904: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001904ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001905if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001906 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001907else
1908 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001909LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001910cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001911#line 1912 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001912#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001913/* Override any gcc2 internal prototype to avoid an error. */
1914/* We use char because int might match the return type of a gcc2
1915 builtin and then its argument prototype would still apply. */
1916char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001917
Guido van Rossumf78abae1997-01-21 22:02:36 +00001918int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001919opendir()
1920; return 0; }
1921EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001922if { (eval echo configure:1923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001923 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001924 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001925else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001926 echo "configure: failed program was:" >&5
1927 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001928 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001929 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001930fi
1931rm -f conftest*
1932LIBS="$ac_save_LIBS"
1933
1934fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001935if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001936 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001937 LIBS="$LIBS -ldir"
1938else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001939 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001940fi
1941
1942else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001943echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001944echo "configure:1945: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001945ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00001946if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001947 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001948else
1949 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001950LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001951cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001952#line 1953 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001953#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001954/* Override any gcc2 internal prototype to avoid an error. */
1955/* We use char because int might match the return type of a gcc2
1956 builtin and then its argument prototype would still apply. */
1957char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001958
Guido van Rossumf78abae1997-01-21 22:02:36 +00001959int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001960opendir()
1961; return 0; }
1962EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001963if { (eval echo configure:1964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001964 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001965 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001966else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001967 echo "configure: failed program was:" >&5
1968 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001969 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001970 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001971fi
1972rm -f conftest*
1973LIBS="$ac_save_LIBS"
1974
1975fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001976if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001977 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001978 LIBS="$LIBS -lx"
1979else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001980 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001981fi
1982
1983fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001984
1985
1986# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001987was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001988echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001989echo "configure:1990: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001990cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00001991#line 1992 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001992#include "confdefs.h"
1993#include <time.h>
1994EOF
1995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1996 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001997 rm -rf conftest*
1998 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001999else
2000 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002001 cat >> confdefs.h <<\EOF
2002#define clock_t long
2003EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002004
2005fi
2006rm -f conftest*
2007
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002008echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00002009
Guido van Rossum84e7b241996-08-19 21:59:00 +00002010# Add some code to confdefs.h so that the test for off_t works on SCO
2011cat >> confdefs.h <<\EOF
2012#if defined(SCO_DS)
2013#undef _OFF_T
2014#endif
2015EOF
2016
Guido van Rossumef2255b2000-03-10 22:30:29 +00002017# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002018echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002019echo "configure:2020: checking for mode_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002020if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002021 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002022else
2023 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002024#line 2025 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002025#include "confdefs.h"
2026#include <sys/types.h>
2027#if STDC_HEADERS
2028#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002029#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002030#endif
2031EOF
2032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002033 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 +00002034 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002035 ac_cv_type_mode_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002036else
2037 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002038 ac_cv_type_mode_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002039fi
2040rm -f conftest*
2041
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002042fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002043echo "$ac_t""$ac_cv_type_mode_t" 1>&6
2044if test $ac_cv_type_mode_t = no; then
2045 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002046#define mode_t int
2047EOF
2048
2049fi
2050
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002051echo $ac_n "checking for off_t""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002052echo "configure:2053: checking for off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002053if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002054 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002055else
2056 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002057#line 2058 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002058#include "confdefs.h"
2059#include <sys/types.h>
2060#if STDC_HEADERS
2061#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002062#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002063#endif
2064EOF
2065if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002066 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 +00002067 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002068 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002069else
2070 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002071 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002072fi
2073rm -f conftest*
2074
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002075fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002076echo "$ac_t""$ac_cv_type_off_t" 1>&6
2077if test $ac_cv_type_off_t = no; then
2078 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002079#define off_t long
2080EOF
2081
2082fi
2083
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002084echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002085echo "configure:2086: checking for pid_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002086if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002087 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002088else
2089 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002090#line 2091 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002091#include "confdefs.h"
2092#include <sys/types.h>
2093#if STDC_HEADERS
2094#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002095#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002096#endif
2097EOF
2098if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002099 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 +00002100 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002101 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002102else
2103 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002104 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002105fi
2106rm -f conftest*
2107
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002108fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002109echo "$ac_t""$ac_cv_type_pid_t" 1>&6
2110if test $ac_cv_type_pid_t = no; then
2111 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002112#define pid_t int
2113EOF
2114
2115fi
2116
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002117echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002118echo "configure:2119: checking return type of signal handlers" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002119if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002120 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002121else
2122 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002123#line 2124 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002124#include "confdefs.h"
2125#include <sys/types.h>
2126#include <signal.h>
2127#ifdef signal
2128#undef signal
2129#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002130#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002131extern "C" void (*signal (int, void (*)(int)))(int);
2132#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002133void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002134#endif
2135
Guido van Rossumf78abae1997-01-21 22:02:36 +00002136int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002137int i;
2138; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002139EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002140if { (eval echo configure:2141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002141 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002142 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00002143else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002144 echo "configure: failed program was:" >&5
2145 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00002146 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002147 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00002148fi
2149rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002150fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002151
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002152echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002153cat >> confdefs.h <<EOF
2154#define RETSIGTYPE $ac_cv_type_signal
2155EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002156
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002157
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002158echo $ac_n "checking for size_t""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002159echo "configure:2160: checking for size_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002160if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002161 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002162else
2163 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002164#line 2165 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002165#include "confdefs.h"
2166#include <sys/types.h>
2167#if STDC_HEADERS
2168#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00002169#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002170#endif
2171EOF
2172if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002173 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 +00002174 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002175 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00002176else
2177 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002178 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002179fi
2180rm -f conftest*
2181
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002182fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002183echo "$ac_t""$ac_cv_type_size_t" 1>&6
2184if test $ac_cv_type_size_t = no; then
2185 cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002186#define size_t unsigned
2187EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002188
2189fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002190
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002191echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002192echo "configure:2193: checking for uid_t in sys/types.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002193if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002194 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002195else
2196 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002197#line 2198 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002198#include "confdefs.h"
2199#include <sys/types.h>
2200EOF
2201if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2202 egrep "uid_t" >/dev/null 2>&1; then
2203 rm -rf conftest*
2204 ac_cv_type_uid_t=yes
2205else
2206 rm -rf conftest*
2207 ac_cv_type_uid_t=no
2208fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00002209rm -f conftest*
2210
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002211fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002212
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002213echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002214if test $ac_cv_type_uid_t = no; then
2215 cat >> confdefs.h <<\EOF
2216#define uid_t int
2217EOF
2218
2219 cat >> confdefs.h <<\EOF
2220#define gid_t int
2221EOF
2222
2223fi
2224
Guido van Rossum627b2d71993-12-24 10:39:16 +00002225
Guido van Rossumef2255b2000-03-10 22:30:29 +00002226# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002227echo $ac_n "checking size of int""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002228echo "configure:2229: checking size of int" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002229if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002230 echo $ac_n "(cached) $ac_c" 1>&6
2231else
2232 if test "$cross_compiling" = yes; then
2233 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2234else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002235 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002236#line 2237 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002237#include "confdefs.h"
2238#include <stdio.h>
2239main()
2240{
2241 FILE *f=fopen("conftestval", "w");
2242 if (!f) exit(1);
2243 fprintf(f, "%d\n", sizeof(int));
2244 exit(0);
2245}
2246EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002247if { (eval echo configure:2248: \"$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 +00002248then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002249 ac_cv_sizeof_int=`cat conftestval`
2250else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002251 echo "configure: failed program was:" >&5
2252 cat conftest.$ac_ext >&5
2253 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002254 ac_cv_sizeof_int=0
2255fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002256rm -fr conftest*
2257fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002258
2259fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002260echo "$ac_t""$ac_cv_sizeof_int" 1>&6
2261cat >> confdefs.h <<EOF
2262#define SIZEOF_INT $ac_cv_sizeof_int
2263EOF
2264
2265
2266echo $ac_n "checking size of long""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002267echo "configure:2268: checking size of long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002268if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002269 echo $ac_n "(cached) $ac_c" 1>&6
2270else
2271 if test "$cross_compiling" = yes; then
2272 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2273else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002274 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002275#line 2276 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002276#include "confdefs.h"
2277#include <stdio.h>
2278main()
2279{
2280 FILE *f=fopen("conftestval", "w");
2281 if (!f) exit(1);
2282 fprintf(f, "%d\n", sizeof(long));
2283 exit(0);
2284}
2285EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002286if { (eval echo configure:2287: \"$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 +00002287then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002288 ac_cv_sizeof_long=`cat conftestval`
2289else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002290 echo "configure: failed program was:" >&5
2291 cat conftest.$ac_ext >&5
2292 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002293 ac_cv_sizeof_long=0
2294fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002295rm -fr conftest*
2296fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002297
2298fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002299echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2300cat >> confdefs.h <<EOF
2301#define SIZEOF_LONG $ac_cv_sizeof_long
2302EOF
2303
2304
Guido van Rossumad678af1998-10-02 14:42:15 +00002305echo $ac_n "checking size of void *""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002306echo "configure:2307: checking size of void *" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002307if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002308 echo $ac_n "(cached) $ac_c" 1>&6
2309else
2310 if test "$cross_compiling" = yes; then
2311 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2312else
2313 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002314#line 2315 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002315#include "confdefs.h"
2316#include <stdio.h>
2317main()
2318{
2319 FILE *f=fopen("conftestval", "w");
2320 if (!f) exit(1);
2321 fprintf(f, "%d\n", sizeof(void *));
2322 exit(0);
2323}
2324EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002325if { (eval echo configure:2326: \"$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 +00002326then
2327 ac_cv_sizeof_void_p=`cat conftestval`
2328else
2329 echo "configure: failed program was:" >&5
2330 cat conftest.$ac_ext >&5
2331 rm -fr conftest*
2332 ac_cv_sizeof_void_p=0
2333fi
2334rm -fr conftest*
2335fi
2336
2337fi
2338echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2339cat >> confdefs.h <<EOF
2340#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2341EOF
2342
2343
Guido van Rossumef2255b2000-03-10 22:30:29 +00002344echo $ac_n "checking size of char""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002345echo "configure:2346: checking size of char" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002346if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002347 echo $ac_n "(cached) $ac_c" 1>&6
2348else
2349 if test "$cross_compiling" = yes; then
2350 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2351else
2352 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002353#line 2354 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002354#include "confdefs.h"
2355#include <stdio.h>
2356main()
2357{
2358 FILE *f=fopen("conftestval", "w");
2359 if (!f) exit(1);
2360 fprintf(f, "%d\n", sizeof(char));
2361 exit(0);
2362}
2363EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002364if { (eval echo configure:2365: \"$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 +00002365then
2366 ac_cv_sizeof_char=`cat conftestval`
2367else
2368 echo "configure: failed program was:" >&5
2369 cat conftest.$ac_ext >&5
2370 rm -fr conftest*
2371 ac_cv_sizeof_char=0
2372fi
2373rm -fr conftest*
2374fi
2375
2376fi
2377echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2378cat >> confdefs.h <<EOF
2379#define SIZEOF_CHAR $ac_cv_sizeof_char
2380EOF
2381
2382
2383echo $ac_n "checking size of short""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002384echo "configure:2385: checking size of short" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002385if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002386 echo $ac_n "(cached) $ac_c" 1>&6
2387else
2388 if test "$cross_compiling" = yes; then
2389 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2390else
2391 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002392#line 2393 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002393#include "confdefs.h"
2394#include <stdio.h>
2395main()
2396{
2397 FILE *f=fopen("conftestval", "w");
2398 if (!f) exit(1);
2399 fprintf(f, "%d\n", sizeof(short));
2400 exit(0);
2401}
2402EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002403if { (eval echo configure:2404: \"$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 +00002404then
2405 ac_cv_sizeof_short=`cat conftestval`
2406else
2407 echo "configure: failed program was:" >&5
2408 cat conftest.$ac_ext >&5
2409 rm -fr conftest*
2410 ac_cv_sizeof_short=0
2411fi
2412rm -fr conftest*
2413fi
2414
2415fi
2416echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2417cat >> confdefs.h <<EOF
2418#define SIZEOF_SHORT $ac_cv_sizeof_short
2419EOF
2420
2421
2422echo $ac_n "checking size of float""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002423echo "configure:2424: checking size of float" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002424if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002425 echo $ac_n "(cached) $ac_c" 1>&6
2426else
2427 if test "$cross_compiling" = yes; then
2428 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2429else
2430 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002431#line 2432 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002432#include "confdefs.h"
2433#include <stdio.h>
2434main()
2435{
2436 FILE *f=fopen("conftestval", "w");
2437 if (!f) exit(1);
2438 fprintf(f, "%d\n", sizeof(float));
2439 exit(0);
2440}
2441EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002442if { (eval echo configure:2443: \"$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 +00002443then
2444 ac_cv_sizeof_float=`cat conftestval`
2445else
2446 echo "configure: failed program was:" >&5
2447 cat conftest.$ac_ext >&5
2448 rm -fr conftest*
2449 ac_cv_sizeof_float=0
2450fi
2451rm -fr conftest*
2452fi
2453
2454fi
2455echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2456cat >> confdefs.h <<EOF
2457#define SIZEOF_FLOAT $ac_cv_sizeof_float
2458EOF
2459
2460
2461echo $ac_n "checking size of double""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002462echo "configure:2463: checking size of double" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002463if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002464 echo $ac_n "(cached) $ac_c" 1>&6
2465else
2466 if test "$cross_compiling" = yes; then
2467 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2468else
2469 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002470#line 2471 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002471#include "confdefs.h"
2472#include <stdio.h>
2473main()
2474{
2475 FILE *f=fopen("conftestval", "w");
2476 if (!f) exit(1);
2477 fprintf(f, "%d\n", sizeof(double));
2478 exit(0);
2479}
2480EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002481if { (eval echo configure:2482: \"$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 +00002482then
2483 ac_cv_sizeof_double=`cat conftestval`
2484else
2485 echo "configure: failed program was:" >&5
2486 cat conftest.$ac_ext >&5
2487 rm -fr conftest*
2488 ac_cv_sizeof_double=0
2489fi
2490rm -fr conftest*
2491fi
2492
2493fi
2494echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2495cat >> confdefs.h <<EOF
2496#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2497EOF
2498
2499
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002500echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002501echo "configure:2502: checking size of fpos_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002502if eval "test \"`echo '$''{'ac_cv_sizeof_fpos_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002503 echo $ac_n "(cached) $ac_c" 1>&6
2504else
2505 if test "$cross_compiling" = yes; then
2506 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2507else
2508 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002509#line 2510 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002510#include "confdefs.h"
2511#include <stdio.h>
2512main()
2513{
2514 FILE *f=fopen("conftestval", "w");
2515 if (!f) exit(1);
2516 fprintf(f, "%d\n", sizeof(fpos_t));
2517 exit(0);
2518}
2519EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002520if { (eval echo configure:2521: \"$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 +00002521then
2522 ac_cv_sizeof_fpos_t=`cat conftestval`
2523else
2524 echo "configure: failed program was:" >&5
2525 cat conftest.$ac_ext >&5
2526 rm -fr conftest*
2527 ac_cv_sizeof_fpos_t=0
2528fi
2529rm -fr conftest*
2530fi
2531
2532fi
2533echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2534cat >> confdefs.h <<EOF
2535#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2536EOF
2537
2538
Guido van Rossum0a516c91994-09-12 10:58:40 +00002539
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002540echo $ac_n "checking for long long support""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002541echo "configure:2542: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002542have_long_long=no
2543cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002544#line 2545 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002545#include "confdefs.h"
2546
2547int main() {
2548long long x; x = (long long)0;
2549; return 0; }
2550EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002551if { (eval echo configure:2552: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002552 rm -rf conftest*
2553 cat >> confdefs.h <<\EOF
2554#define HAVE_LONG_LONG 1
2555EOF
2556 have_long_long=yes
2557else
2558 echo "configure: failed program was:" >&5
2559 cat conftest.$ac_ext >&5
2560fi
2561rm -f conftest*
2562echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002563if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002564echo $ac_n "checking size of long long""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002565echo "configure:2566: checking size of long long" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002566if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002567 echo $ac_n "(cached) $ac_c" 1>&6
2568else
2569 if test "$cross_compiling" = yes; then
2570 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2571else
2572 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002573#line 2574 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002574#include "confdefs.h"
2575#include <stdio.h>
2576main()
2577{
2578 FILE *f=fopen("conftestval", "w");
2579 if (!f) exit(1);
2580 fprintf(f, "%d\n", sizeof(long long));
2581 exit(0);
2582}
2583EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002584if { (eval echo configure:2585: \"$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 +00002585then
2586 ac_cv_sizeof_long_long=`cat conftestval`
2587else
2588 echo "configure: failed program was:" >&5
2589 cat conftest.$ac_ext >&5
2590 rm -fr conftest*
2591 ac_cv_sizeof_long_long=0
2592fi
2593rm -fr conftest*
2594fi
2595
2596fi
2597echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2598cat >> confdefs.h <<EOF
2599#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2600EOF
2601
2602
2603fi
2604
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002605echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002606echo "configure:2607: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002607have_uintptr_t=no
2608cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002609#line 2610 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002610#include "confdefs.h"
2611
2612int main() {
2613uintptr_t x; x = (uintptr_t)0;
2614; return 0; }
2615EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002616if { (eval echo configure:2617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002617 rm -rf conftest*
2618 cat >> confdefs.h <<\EOF
2619#define HAVE_UINTPTR_T 1
2620EOF
2621 have_uintptr_t=yes
2622else
2623 echo "configure: failed program was:" >&5
2624 cat conftest.$ac_ext >&5
2625fi
2626rm -f conftest*
2627echo "$ac_t""$have_uintptr_t" 1>&6
2628if test "$have_uintptr_t" = yes ; then
2629echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002630echo "configure:2631: checking size of uintptr_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002631if eval "test \"`echo '$''{'ac_cv_sizeof_uintptr_t'+set}'`\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002632 echo $ac_n "(cached) $ac_c" 1>&6
2633else
2634 if test "$cross_compiling" = yes; then
2635 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2636else
2637 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002638#line 2639 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002639#include "confdefs.h"
2640#include <stdio.h>
2641main()
2642{
2643 FILE *f=fopen("conftestval", "w");
2644 if (!f) exit(1);
2645 fprintf(f, "%d\n", sizeof(uintptr_t));
2646 exit(0);
2647}
2648EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002649if { (eval echo configure:2650: \"$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 +00002650then
2651 ac_cv_sizeof_uintptr_t=`cat conftestval`
2652else
2653 echo "configure: failed program was:" >&5
2654 cat conftest.$ac_ext >&5
2655 rm -fr conftest*
2656 ac_cv_sizeof_uintptr_t=0
2657fi
2658rm -fr conftest*
2659fi
2660
2661fi
2662echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2663cat >> confdefs.h <<EOF
2664#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2665EOF
2666
2667
2668fi
2669
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002670# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2671echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002672echo "configure:2673: checking size of off_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002673if eval "test \"`echo '$''{'ac_cv_sizeof_off_t'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002674 echo $ac_n "(cached) $ac_c" 1>&6
2675else
2676 if test "$cross_compiling" = yes; then
2677 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2678else
2679 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002680#line 2681 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002681#include "confdefs.h"
2682#include <stdio.h>
2683#include <sys/types.h>
2684main()
2685{
2686 FILE *f=fopen("conftestval", "w");
2687 if (!f) exit(1);
2688 fprintf(f, "%d\n", sizeof(off_t));
2689 exit(0);
2690}
2691EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002692if { (eval echo configure:2693: \"$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 +00002693then
2694 ac_cv_sizeof_off_t=`cat conftestval`
2695else
2696 echo "configure: failed program was:" >&5
2697 cat conftest.$ac_ext >&5
2698 rm -fr conftest*
2699 ac_cv_sizeof_off_t=0
2700fi
2701rm -fr conftest*
2702fi
2703
2704
2705fi
2706
2707echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2708cat >> confdefs.h <<EOF
2709#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2710EOF
2711
2712
2713echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002714echo "configure:2715: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002715if test "$have_long_long" = yes -a \
2716 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2717 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002718 cat >> confdefs.h <<\EOF
2719#define HAVE_LARGEFILE_SUPPORT 1
2720EOF
2721
2722 echo "$ac_t""yes" 1>&6
2723else
2724 echo "$ac_t""no" 1>&6
2725fi
2726
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002727# AC_CHECK_SIZEOF() doesn't include <time.h>.
2728echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002729echo "configure:2730: checking size of time_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002730if eval "test \"`echo '$''{'ac_cv_sizeof_time_t'+set}'`\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002731 echo $ac_n "(cached) $ac_c" 1>&6
2732else
2733 if test "$cross_compiling" = yes; then
2734 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2735else
2736 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002737#line 2738 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002738#include "confdefs.h"
2739#include <stdio.h>
2740#include <time.h>
2741main()
2742{
2743 FILE *f=fopen("conftestval", "w");
2744 if (!f) exit(1);
2745 fprintf(f, "%d\n", sizeof(time_t));
2746 exit(0);
2747}
2748EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002749if { (eval echo configure:2750: \"$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 +00002750then
2751 ac_cv_sizeof_time_t=`cat conftestval`
2752else
2753 echo "configure: failed program was:" >&5
2754 cat conftest.$ac_ext >&5
2755 rm -fr conftest*
2756 ac_cv_sizeof_time_t=0
2757fi
2758rm -fr conftest*
2759fi
2760
2761
2762fi
2763
2764echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2765cat >> confdefs.h <<EOF
2766#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2767EOF
2768
2769
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002770
Trent Mick635f6fb2000-08-23 21:33:05 +00002771# if have pthread_t then define SIZEOF_PTHREAD_T
2772echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002773echo "configure:2774: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002774have_pthread_t=no
2775cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002776#line 2777 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002777#include "confdefs.h"
2778#include <pthread.h>
2779int main() {
Guido van Rossum12580492000-09-24 16:47:19 +00002780pthread_t x; x = *(pthread_t*)0;
Trent Mick635f6fb2000-08-23 21:33:05 +00002781; return 0; }
2782EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002783if { (eval echo configure:2784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002784 rm -rf conftest*
2785 have_pthread_t=yes
2786else
2787 echo "configure: failed program was:" >&5
2788 cat conftest.$ac_ext >&5
2789fi
2790rm -f conftest*
2791echo "$ac_t""$have_pthread_t" 1>&6
2792if test "$have_pthread_t" = yes ; then
2793 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2794 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002795echo "configure:2796: checking size of pthread_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00002796 if eval "test \"`echo '$''{'ac_cv_sizeof_pthread_t'+set}'`\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002797 echo $ac_n "(cached) $ac_c" 1>&6
2798else
2799 if test "$cross_compiling" = yes; then
2800 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2801else
2802 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002803#line 2804 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002804#include "confdefs.h"
2805#include <stdio.h>
2806 #include <pthread.h>
2807 main()
2808 {
2809 FILE *f=fopen("conftestval", "w");
2810 if (!f) exit(1);
2811 fprintf(f, "%d\n", sizeof(pthread_t));
2812 exit(0);
2813 }
2814EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002815if { (eval echo configure:2816: \"$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 +00002816then
2817 ac_cv_sizeof_pthread_t=`cat conftestval`
2818else
2819 echo "configure: failed program was:" >&5
2820 cat conftest.$ac_ext >&5
2821 rm -fr conftest*
2822 ac_cv_sizeof_pthread_t=0
2823fi
2824rm -fr conftest*
2825fi
2826
2827
2828fi
2829
2830 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2831 cat >> confdefs.h <<EOF
2832#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2833EOF
2834
2835fi
2836
2837
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002838# Minor variations in building a framework between NextStep versions 4 and 5
2839
2840case $ac_sys_system/$ac_sys_release in
Guido van Rossum5839e582000-10-09 19:52:35 +00002841 Darwin/*)
2842 ns_undef_sym='_environ'
2843 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc -U $ns_undef_sym" ;;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002844 next/4*)
2845 ns_undef_sym='__environ'
2846 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2847 next/5*)
2848 ns_undef_sym='_environ'
2849 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2850esac
2851
2852echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002853echo "configure:2854: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002854if test "$with_next_framework"
2855then
2856 OPT="$OPT -fno-common"
2857 # -U __environ is needed since bundles don't have access
2858 # to crt0 when built but will always be linked against it
2859 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2860 cat >> confdefs.h <<\EOF
2861#define WITH_NEXT_FRAMEWORK 1
2862EOF
2863
2864 echo "$ac_t""yes" 1>&6
2865else
2866 echo "$ac_t""no" 1>&6
2867fi
2868
2869echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002870echo "configure:2871: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002871if test "$with_next_framework" -o "$with_dyld"
2872then
2873 if test "$with_dyld"
2874 then
2875 echo "$ac_t""yes" 1>&6
2876 else
2877 echo "$ac_t""required for framework build" 1>&6
2878 fi
2879 cat >> confdefs.h <<\EOF
2880#define WITH_DYLD 1
2881EOF
2882
2883 ns_dyld='set'
2884else
2885 echo "$ac_t""no" 1>&6
2886fi
2887
Guido van Rossum0a516c91994-09-12 10:58:40 +00002888# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002889
2890
2891
2892
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002893
Guido van Rossum0a516c91994-09-12 10:58:40 +00002894# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00002895# -- usually .so, .sl on HP-UX, .dll on Cygwin
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002896echo $ac_n "checking SO""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002897echo "configure:2898: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002898if test -z "$SO"
2899then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002900 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002901 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002902 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00002903 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002904 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002905fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002906echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002907# LDSHARED is the ld *command* used to create shared library
2908# -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002909# (Shared libraries in this instance are shared modules to be loaded into
2910# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002911echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002912echo "configure:2913: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002913if test -z "$LDSHARED"
2914then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002915 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002916 AIX*)
2917 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
2918 LDSHARED="\$(BINLIBDEST)/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/python.exp"
2919 ;;
2920 BeOS*)
2921 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
2922 LDSHARED="\$(BINLIBDEST)/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
2923 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00002924 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002925 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002926 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00002927 SunOS/5*)
2928 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00002929 then LDSHARED='$(CC) -shared'
Greg Ward57c9a6632000-05-26 12:22:54 +00002930 else LDSHARED="ld -G";
2931 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002932 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002933 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2934 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002935 Darwin/*|next/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002936 if test "$ns_dyld"
Guido van Rossumacb14c72001-01-10 21:41:16 +00002937 then LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined suppress'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002938 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2939 fi
Guido van Rossum3dc0a512000-10-05 18:00:06 +00002940 if test "$with_next_framework" ; then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002941 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2942 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002943 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002944 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002945 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002946 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002947 NetBSD*)
2948 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2949 then
2950 LDSHARED="cc -shared"
2951 else
2952 LDSHARED="ld -Bshareable"
2953 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002954 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00002955 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00002956 then
2957 LDSHARED="cc -shared ${LDFLAGS}"
2958 else
2959 LDSHARED="ld -Bshareable ${LDFLAGS}"
2960 fi;;
Martin v. Löwisbec19582001-03-21 15:57:54 +00002961 UnixWare*)
2962 if test "$GCC" = "yes"
2963 then LDSHARED="$(CC) -shared"
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002964 else LDSHARED="ld -G -dy -Bdynamic"
Martin v. Löwisbec19582001-03-21 15:57:54 +00002965 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002966 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002967 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00002968 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002969 *) LDSHARED="ld";;
2970 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002971fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002972echo "$ac_t""$LDSHARED" 1>&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002973BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00002974# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002975# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002976echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002977echo "configure:2978: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002978if test -z "$CCSHARED"
2979then
Guido van Rossum07397971997-04-29 21:49:50 +00002980 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00002981 SunOS*) if test "$GCC" = yes;
2982 then CCSHARED="-fPIC";
2983 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00002984 hp*|HP*) if test "$GCC" = yes;
2985 then CCSHARED="-fpic";
2986 else CCSHARED="+z";
2987 fi;;
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00002988 Linux*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002989 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002990 OpenBSD*) CCSHARED="-fpic";;
2991 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Martin v. Löwisbec19582001-03-21 15:57:54 +00002992 UnixWare*)
2993 if test "$GCC" = "yes"
2994 then CCSHARED="-fPIC"
Guido van Rossum2242f2f2001-04-11 20:58:20 +00002995 else CCSHARED="-KPIC -G -dy -Bdynamic"
Martin v. Löwisbec19582001-03-21 15:57:54 +00002996 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002997 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002998 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002999 IRIX*/6*) case $CC in
3000 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00003001 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003002 esac;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003003 CYGWIN*) CCSHARED="-DUSE_DL_IMPORT";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003004 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003005fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003006echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003007# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003008# the python executable -- this is only needed for a few systems
3009echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003010echo "configure:3011: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00003011if test -z "$LINKFORSHARED"
3012then
Guido van Rossum07397971997-04-29 21:49:50 +00003013 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003014 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00003015 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00003016 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00003017 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00003018 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003019 # -u libsys_s pulls in all symbols in libsys
3020 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
3021 # -u __dummy makes the linker aware of the objc runtime
3022 # in System.framework; otherwise, __objcInit (referenced in
3023 # crt1.o) gets erroneously defined as common, which breaks dynamic
3024 # loading of any modules which reference it in System.framework
3025 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Neil Schemenauer4e425612001-06-19 15:44:15 +00003026 Darwin/*) LINKFORSHARED="-u __dummy -u _PyMac_Error -framework System -framework Foundation -framework Carbon" ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003027 UnixWare*) LINKFORSHARED="-dy -Bdynamic -Wl,-Bexport";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00003028 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00003029 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00003030 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00003031 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
3032 then
3033 LINKFORSHARED="-Wl,--export-dynamic"
3034 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003035 SunOS/5*) case $CC in
3036 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00003037 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00003038 then
3039 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00003040 fi;;
3041 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00003042 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00003043fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003044echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00003045
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003046
3047echo $ac_n "checking CFLAGSFORSHARED""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003048echo "configure:3049: checking CFLAGSFORSHARED" >&5
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003049if test ! "$LIBRARY" = "$LDLIBRARY"
3050then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00003051 case $ac_sys_system in
3052 CYGWIN*)
3053 # Cygwin needs CCSHARED when building extension DLLs
3054 # but not when building the interpreter DLL.
3055 CFLAGSFORSHARED='';;
3056 *)
3057 CFLAGSFORSHARED='$(CCSHARED)'
3058 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003059fi
3060echo "$ac_t""$CFLAGSFORSHARED" 1>&6
3061
Guido van Rossum627b2d71993-12-24 10:39:16 +00003062# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00003063echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003064echo "configure:3065: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003065ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003066if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003067 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003068else
3069 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003070LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003071cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003072#line 3073 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003073#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003074/* Override any gcc2 internal prototype to avoid an error. */
3075/* We use char because int might match the return type of a gcc2
3076 builtin and then its argument prototype would still apply. */
3077char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003078
Guido van Rossumf78abae1997-01-21 22:02:36 +00003079int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003080dlopen()
3081; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003082EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003083if { (eval echo configure:3084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003084 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003085 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003086else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003087 echo "configure: failed program was:" >&5
3088 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003089 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003090 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003091fi
3092rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003093LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003094
Guido van Rossum627b2d71993-12-24 10:39:16 +00003095fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003096if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003097 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003098 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3099 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003100 cat >> confdefs.h <<EOF
3101#define $ac_tr_lib 1
3102EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003103
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003104 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003105
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003106else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003107 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003108fi
3109 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00003110echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003111echo "configure:3112: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003112ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003113if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003114 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003115else
3116 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003117LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003118cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003119#line 3120 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003120#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003121/* Override any gcc2 internal prototype to avoid an error. */
3122/* We use char because int might match the return type of a gcc2
3123 builtin and then its argument prototype would still apply. */
3124char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003125
Guido van Rossumf78abae1997-01-21 22:02:36 +00003126int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003127shl_load()
3128; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003129EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003130if { (eval echo configure:3131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003131 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003132 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003133else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003134 echo "configure: failed program was:" >&5
3135 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003136 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003137 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003138fi
3139rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003140LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003141
Guido van Rossum627b2d71993-12-24 10:39:16 +00003142fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003143if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003144 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00003145 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3146 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003147 cat >> confdefs.h <<EOF
3148#define $ac_tr_lib 1
3149EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003150
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003151 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003152
3153else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003154 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003155fi
3156 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003157
Skip Montanarocb853262000-08-30 22:29:48 +00003158# Check for --with-pydebug
3159echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003160echo "configure:3161: checking for --with-pydebug" >&5
Skip Montanarocb853262000-08-30 22:29:48 +00003161# Check whether --with-pydebug or --without-pydebug was given.
3162if test "${with_pydebug+set}" = set; then
3163 withval="$with_pydebug"
3164
3165if test "$withval" != no
3166then cat >> confdefs.h <<\EOF
3167#define Py_DEBUG 1
3168EOF
3169 echo "$ac_t""yes" 1>&6
3170else echo "$ac_t""no" 1>&6
3171fi
3172else
3173 echo "$ac_t""no" 1>&6
3174fi
3175
3176
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003177# checks for system dependent C++ extensions support
3178case "$ac_sys_system" in
3179 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003180echo "configure:3181: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003181 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003182#line 3183 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003183#include "confdefs.h"
3184#include "/usr/lpp/xlC/include/load.h"
3185int main() {
3186loadAndInit("", 0, "")
3187; return 0; }
3188EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003189if { (eval echo configure:3190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00003190 rm -rf conftest*
3191 cat >> confdefs.h <<\EOF
3192#define AIX_GENUINE_CPLUSPLUS 1
3193EOF
3194
3195 echo "$ac_t""yes" 1>&6
3196else
3197 echo "configure: failed program was:" >&5
3198 cat conftest.$ac_ext >&5
3199 rm -rf conftest*
3200 echo "$ac_t""no" 1>&6
3201fi
3202rm -f conftest*;;
3203 *) ;;
3204esac
3205
Guido van Rossum70c7f481998-03-26 18:44:10 +00003206# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
3207# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003208# BeOS' sockets are stashed in libnet.
3209case "$ac_sys_system" in
3210IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00003211*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00003212echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003213echo "configure:3214: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003214ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003215if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003216 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003217else
3218 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003219LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003220cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003221#line 3222 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003222#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003223/* Override any gcc2 internal prototype to avoid an error. */
3224/* We use char because int might match the return type of a gcc2
3225 builtin and then its argument prototype would still apply. */
3226char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003227
Guido van Rossumf78abae1997-01-21 22:02:36 +00003228int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003229t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003230; return 0; }
3231EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003232if { (eval echo configure:3233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003233 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003234 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003235else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003236 echo "configure: failed program was:" >&5
3237 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003238 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003239 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003240fi
3241rm -f conftest*
3242LIBS="$ac_save_LIBS"
3243
3244fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003245if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003246 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003247 LIBS="-lnsl $LIBS"
3248else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003249 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00003250fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00003251 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00003252echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003253echo "configure:3254: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003254ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003255if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003256 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003257else
3258 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003259LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003260cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003261#line 3262 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003262#include "confdefs.h"
3263/* Override any gcc2 internal prototype to avoid an error. */
3264/* We use char because int might match the return type of a gcc2
3265 builtin and then its argument prototype would still apply. */
3266char socket();
3267
3268int main() {
3269socket()
3270; return 0; }
3271EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003272if { (eval echo configure:3273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003273 rm -rf conftest*
3274 eval "ac_cv_lib_$ac_lib_var=yes"
3275else
3276 echo "configure: failed program was:" >&5
3277 cat conftest.$ac_ext >&5
3278 rm -rf conftest*
3279 eval "ac_cv_lib_$ac_lib_var=no"
3280fi
3281rm -f conftest*
3282LIBS="$ac_save_LIBS"
3283
3284fi
3285if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3286 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00003287 LIBS="-lsocket $LIBS"
3288else
3289 echo "$ac_t""no" 1>&6
3290fi
3291 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00003292;;
3293esac
3294case "$ac_sys_system" in
3295BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00003296echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003297echo "configure:3298: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00003298ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003299if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003300 echo $ac_n "(cached) $ac_c" 1>&6
3301else
3302 ac_save_LIBS="$LIBS"
3303LIBS="-lnet $LIBS $LIBS"
3304cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003305#line 3306 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003306#include "confdefs.h"
3307/* Override any gcc2 internal prototype to avoid an error. */
3308/* We use char because int might match the return type of a gcc2
3309 builtin and then its argument prototype would still apply. */
3310char socket();
3311
3312int main() {
3313socket()
3314; return 0; }
3315EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003316if { (eval echo configure:3317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003317 rm -rf conftest*
3318 eval "ac_cv_lib_$ac_lib_var=yes"
3319else
3320 echo "configure: failed program was:" >&5
3321 cat conftest.$ac_ext >&5
3322 rm -rf conftest*
3323 eval "ac_cv_lib_$ac_lib_var=no"
3324fi
3325rm -f conftest*
3326LIBS="$ac_save_LIBS"
3327
3328fi
3329if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3330 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003331 LIBS="-lnet $LIBS"
3332else
3333 echo "$ac_t""no" 1>&6
3334fi
3335 # BeOS
3336;;
3337esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003338
Guido van Rossuma68acba1996-07-31 17:36:39 +00003339echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003340echo "configure:3341: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003341# Check whether --with-libs or --without-libs was given.
3342if test "${with_libs+set}" = set; then
3343 withval="$with_libs"
3344
3345echo "$ac_t""$withval" 1>&6
3346LIBS="$withval $LIBS"
3347
3348else
3349 echo "$ac_t""no" 1>&6
3350fi
3351
Guido van Rossum7f43da71994-08-01 12:15:30 +00003352
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003353# Determine if signalmodule should be used.
3354
3355
3356echo $ac_n "checking for --with-signal-module""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003357echo "configure:3358: checking for --with-signal-module" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003358# Check whether --with-signal-module or --without-signal-module was given.
3359if test "${with_signal_module+set}" = set; then
3360 withval="$with_signal_module"
3361 :
3362fi
3363
3364
3365if test -z "$with_signal_module"
3366then with_signal_module="yes"
3367fi
3368echo "$ac_t""$with_signal_module" 1>&6
3369
3370if test "${with_signal_module}" = "yes"; then
3371 USE_SIGNAL_MODULE=""
3372 SIGNAL_OBJS=""
3373else
3374 USE_SIGNAL_MODULE="#"
3375 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
3376fi
3377
Guido van Rossum3d15bd82001-01-10 18:53:48 +00003378# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00003379
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003380USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003381
Guido van Rossumec2f0731997-01-22 20:54:01 +00003382echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003383echo "configure:3384: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003384
3385# Check whether --with-dec-threads or --without-dec-threads was given.
3386if test "${with_dec_threads+set}" = set; then
3387 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003388
3389echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003390LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003391if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003392 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003393fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003394else
3395 echo "$ac_t""no" 1>&6
3396fi
3397
3398
3399echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003400echo "configure:3401: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003401# Check whether --with-threads or --without-threads was given.
3402if test "${with_threads+set}" = set; then
3403 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003404 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003405fi
3406
3407
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003408# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003409# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003410if test "${with_thread+set}" = set; then
3411 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003412
3413with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003414fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003415
3416
3417if test -z "$with_threads"
3418then with_threads="yes"
3419fi
3420echo "$ac_t""$with_threads" 1>&6
3421
3422if test "$with_threads" = "no"
3423then
3424 USE_THREAD_MODULE="#"
3425else
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003426 if test "$ac_sys_system" = "UnixWare"
3427 then
3428 CC="${CC} -Kthread"
3429 LIBOBJS="$LIBOBJS thread.o"
3430 cat >> confdefs.h <<\EOF
3431#define WITH_THREAD 1
3432EOF
3433
3434 cat >> confdefs.h <<\EOF
3435#define _POSIX_THREADS 1
3436EOF
3437
3438 USE_THREAD_MODULE=""
3439 else
3440 if test ! -z "$with_threads" -a -d "$with_threads"
3441 then LDFLAGS="$LDFLAGS -L$with_threads"
3442 fi
3443 if test ! -z "$withval" -a -d "$withval"
3444 then LDFLAGS="$LDFLAGS -L$withval"
3445 fi
3446 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003447#define _REENTRANT 1
3448EOF
3449
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003450 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003451echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003452echo "configure:3453: checking for mach/cthreads.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003453if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003454 echo $ac_n "(cached) $ac_c" 1>&6
3455else
3456 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003457#line 3458 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003458#include "confdefs.h"
3459#include <mach/cthreads.h>
3460EOF
3461ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003462{ (eval echo configure:3463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003463ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003464if test -z "$ac_err"; then
3465 rm -rf conftest*
3466 eval "ac_cv_header_$ac_safe=yes"
3467else
3468 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003469 echo "configure: failed program was:" >&5
3470 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003471 rm -rf conftest*
3472 eval "ac_cv_header_$ac_safe=no"
3473fi
3474rm -f conftest*
3475fi
3476if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3477 echo "$ac_t""yes" 1>&6
3478 cat >> confdefs.h <<\EOF
3479#define WITH_THREAD 1
3480EOF
3481
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003482 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003483#define C_THREADS 1
3484EOF
3485
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003486 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003487else
3488 echo "$ac_t""no" 1>&6
3489
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003490 echo $ac_n "checking for --with-pth""... $ac_c" 1>&6
3491echo "configure:3492: checking for --with-pth" >&5
3492 # Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003493if test "${with_pth+set}" = set; then
3494 withval="$with_pth"
3495
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003496 echo "$ac_t""$withval" 1>&6
3497 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003498#define WITH_THREAD 1
3499EOF
3500
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003501 cat >> confdefs.h <<\EOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003502#define HAVE_PTH 1
3503EOF
3504
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003505 LIBS="-lpth $LIBS"
3506 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00003507else
3508
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003509 echo "$ac_t""no" 1>&6
3510 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
3511echo "configure:3512: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003512ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003513if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003514 echo $ac_n "(cached) $ac_c" 1>&6
3515else
3516 ac_save_LIBS="$LIBS"
3517LIBS="-lpthread $LIBS"
3518cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003519#line 3520 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003520#include "confdefs.h"
3521/* Override any gcc2 internal prototype to avoid an error. */
3522/* We use char because int might match the return type of a gcc2
3523 builtin and then its argument prototype would still apply. */
3524char pthread_create();
3525
3526int main() {
3527pthread_create()
3528; return 0; }
3529EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003530if { (eval echo configure:3531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003531 rm -rf conftest*
3532 eval "ac_cv_lib_$ac_lib_var=yes"
3533else
3534 echo "configure: failed program was:" >&5
3535 cat conftest.$ac_ext >&5
3536 rm -rf conftest*
3537 eval "ac_cv_lib_$ac_lib_var=no"
3538fi
3539rm -f conftest*
3540LIBS="$ac_save_LIBS"
3541
3542fi
3543if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3544 echo "$ac_t""yes" 1>&6
3545 cat >> confdefs.h <<\EOF
3546#define WITH_THREAD 1
3547EOF
3548
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003549 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003550#define _POSIX_THREADS 1
3551EOF
3552
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003553 LIBS="-lpthread $LIBS"
3554 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003555else
3556 echo "$ac_t""no" 1>&6
3557
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003558 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
3559echo "configure:3560: checking for pthread_detach" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003560if eval "test \"`echo '$''{'ac_cv_func_pthread_detach'+set}'`\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003561 echo $ac_n "(cached) $ac_c" 1>&6
3562else
3563 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003564#line 3565 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003565#include "confdefs.h"
3566/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003567 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003568#include <assert.h>
3569/* Override any gcc2 internal prototype to avoid an error. */
3570/* We use char because int might match the return type of a gcc2
3571 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003572char pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003573
3574int main() {
3575
3576/* The GNU C library defines this for functions which it implements
3577 to always fail with ENOSYS. Some functions are actually named
3578 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003579#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003580choke me
3581#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003582pthread_detach();
Guido van Rossumad678af1998-10-02 14:42:15 +00003583#endif
3584
3585; return 0; }
3586EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003587if { (eval echo configure:3588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003588 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003589 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003590else
3591 echo "configure: failed program was:" >&5
3592 cat conftest.$ac_ext >&5
3593 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003594 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003595fi
3596rm -f conftest*
3597fi
3598
Guido van Rossumea516321998-12-17 18:08:55 +00003599if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003600 echo "$ac_t""yes" 1>&6
3601 cat >> confdefs.h <<\EOF
3602#define WITH_THREAD 1
3603EOF
3604
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003605 case $ac_sys_system in
3606 Darwin*) ;;
3607 *) cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003608#define _POSIX_THREADS 1
3609EOF
Guido van Rossum5839e582000-10-09 19:52:35 +00003610;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003611 esac
3612 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003613else
3614 echo "$ac_t""no" 1>&6
3615
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003616 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003617echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003618echo "configure:3619: checking for kernel/OS.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003619if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003620 echo $ac_n "(cached) $ac_c" 1>&6
3621else
3622 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003623#line 3624 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003624#include "confdefs.h"
3625#include <kernel/OS.h>
3626EOF
3627ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003628{ (eval echo configure:3629: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003629ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003630if test -z "$ac_err"; then
3631 rm -rf conftest*
3632 eval "ac_cv_header_$ac_safe=yes"
3633else
3634 echo "$ac_err" >&5
3635 echo "configure: failed program was:" >&5
3636 cat conftest.$ac_ext >&5
3637 rm -rf conftest*
3638 eval "ac_cv_header_$ac_safe=no"
3639fi
3640rm -f conftest*
3641fi
3642if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3643 echo "$ac_t""yes" 1>&6
3644 cat >> confdefs.h <<\EOF
3645#define WITH_THREAD 1
3646EOF
3647
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003648 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003649#define BEOS_THREADS 1
3650EOF
3651
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003652 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003653else
3654 echo "$ac_t""no" 1>&6
3655
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003656 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
3657echo "configure:3658: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003658ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003659if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003660 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003661else
3662 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003663LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003664cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003665#line 3666 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003666#include "confdefs.h"
3667/* Override any gcc2 internal prototype to avoid an error. */
3668/* We use char because int might match the return type of a gcc2
3669 builtin and then its argument prototype would still apply. */
3670char pthread_create();
3671
3672int main() {
3673pthread_create()
3674; return 0; }
3675EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003676if { (eval echo configure:3677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003677 rm -rf conftest*
3678 eval "ac_cv_lib_$ac_lib_var=yes"
3679else
3680 echo "configure: failed program was:" >&5
3681 cat conftest.$ac_ext >&5
3682 rm -rf conftest*
3683 eval "ac_cv_lib_$ac_lib_var=no"
3684fi
3685rm -f conftest*
3686LIBS="$ac_save_LIBS"
3687
3688fi
3689if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3690 echo "$ac_t""yes" 1>&6
3691 cat >> confdefs.h <<\EOF
3692#define WITH_THREAD 1
3693EOF
3694
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003695 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003696#define _POSIX_THREADS 1
3697EOF
3698
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003699 LIBS="$LIBS -lpthreads"
3700 LIBOBJS="$LIBOBJS thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00003701else
3702 echo "$ac_t""no" 1>&6
3703
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003704 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
3705echo "configure:3706: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003706ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003707if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003708 echo $ac_n "(cached) $ac_c" 1>&6
3709else
3710 ac_save_LIBS="$LIBS"
3711LIBS="-lc_r $LIBS"
3712cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003713#line 3714 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003714#include "confdefs.h"
3715/* Override any gcc2 internal prototype to avoid an error. */
3716/* We use char because int might match the return type of a gcc2
3717 builtin and then its argument prototype would still apply. */
3718char pthread_create();
3719
3720int main() {
3721pthread_create()
3722; return 0; }
3723EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003724if { (eval echo configure:3725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003725 rm -rf conftest*
3726 eval "ac_cv_lib_$ac_lib_var=yes"
3727else
3728 echo "configure: failed program was:" >&5
3729 cat conftest.$ac_ext >&5
3730 rm -rf conftest*
3731 eval "ac_cv_lib_$ac_lib_var=no"
3732fi
3733rm -f conftest*
3734LIBS="$ac_save_LIBS"
3735
3736fi
3737if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3738 echo "$ac_t""yes" 1>&6
3739 cat >> confdefs.h <<\EOF
3740#define WITH_THREAD 1
3741EOF
3742
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003743 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003744#define _POSIX_THREADS 1
3745EOF
3746
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003747 LIBS="$LIBS -lc_r"
3748 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003749else
3750 echo "$ac_t""no" 1>&6
3751
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003752 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
3753echo "configure:3754: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003754ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003755if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003756 echo $ac_n "(cached) $ac_c" 1>&6
3757else
3758 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003759LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003760cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003761#line 3762 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003762#include "confdefs.h"
3763/* Override any gcc2 internal prototype to avoid an error. */
3764/* We use char because int might match the return type of a gcc2
3765 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003766char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003767
3768int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003769__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003770; return 0; }
3771EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003772if { (eval echo configure:3773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003773 rm -rf conftest*
3774 eval "ac_cv_lib_$ac_lib_var=yes"
3775else
3776 echo "configure: failed program was:" >&5
3777 cat conftest.$ac_ext >&5
3778 rm -rf conftest*
3779 eval "ac_cv_lib_$ac_lib_var=no"
3780fi
3781rm -f conftest*
3782LIBS="$ac_save_LIBS"
3783
3784fi
3785if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3786 echo "$ac_t""yes" 1>&6
3787 cat >> confdefs.h <<\EOF
3788#define WITH_THREAD 1
3789EOF
3790
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003791 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003792#define _POSIX_THREADS 1
3793EOF
3794
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003795 LIBS="$LIBS -lthread"
3796 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003797else
3798 echo "$ac_t""no" 1>&6
3799
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003800 echo $ac_n "checking for __pthread_create_system in -lpthread""... $ac_c" 1>&6
3801echo "configure:3802: checking for __pthread_create_system in -lpthread" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003802ac_lib_var=`echo pthread'_'__pthread_create_system | sed 'y%./+-%__p_%'`
3803if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3804 echo $ac_n "(cached) $ac_c" 1>&6
3805else
3806 ac_save_LIBS="$LIBS"
3807LIBS="-lpthread $LIBS"
3808cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003809#line 3810 "configure"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003810#include "confdefs.h"
3811/* Override any gcc2 internal prototype to avoid an error. */
3812/* We use char because int might match the return type of a gcc2
3813 builtin and then its argument prototype would still apply. */
3814char __pthread_create_system();
3815
3816int main() {
3817__pthread_create_system()
3818; return 0; }
3819EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003820if { (eval echo configure:3821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003821 rm -rf conftest*
3822 eval "ac_cv_lib_$ac_lib_var=yes"
3823else
3824 echo "configure: failed program was:" >&5
3825 cat conftest.$ac_ext >&5
3826 rm -rf conftest*
3827 eval "ac_cv_lib_$ac_lib_var=no"
3828fi
3829rm -f conftest*
3830LIBS="$ac_save_LIBS"
3831
3832fi
3833if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3834 echo "$ac_t""yes" 1>&6
3835 cat >> confdefs.h <<\EOF
3836#define WITH_THREAD 1
3837EOF
3838
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003839 cat >> confdefs.h <<\EOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003840#define _POSIX_THREADS 1
3841EOF
3842
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003843 LIBS="$LIBS -lpthread"
3844 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003845else
3846 echo "$ac_t""no" 1>&6
3847
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003848 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
3849echo "configure:3850: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003850ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003851if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003852 echo $ac_n "(cached) $ac_c" 1>&6
3853else
3854 ac_save_LIBS="$LIBS"
3855LIBS="-lcma $LIBS"
3856cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003857#line 3858 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003858#include "confdefs.h"
3859/* Override any gcc2 internal prototype to avoid an error. */
3860/* We use char because int might match the return type of a gcc2
3861 builtin and then its argument prototype would still apply. */
3862char pthread_create();
3863
3864int main() {
3865pthread_create()
3866; return 0; }
3867EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003868if { (eval echo configure:3869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003869 rm -rf conftest*
3870 eval "ac_cv_lib_$ac_lib_var=yes"
3871else
3872 echo "configure: failed program was:" >&5
3873 cat conftest.$ac_ext >&5
3874 rm -rf conftest*
3875 eval "ac_cv_lib_$ac_lib_var=no"
3876fi
3877rm -f conftest*
3878LIBS="$ac_save_LIBS"
3879
3880fi
3881if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3882 echo "$ac_t""yes" 1>&6
3883 cat >> confdefs.h <<\EOF
3884#define WITH_THREAD 1
3885EOF
3886
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003887 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003888#define _POSIX_THREADS 1
3889EOF
3890
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003891 LIBS="$LIBS -lcma"
3892 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003893else
3894 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003895
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003896 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003897fi
3898
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003899
Guido van Rossum627b2d71993-12-24 10:39:16 +00003900fi
3901
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003902fi
3903
Guido van Rossum0be3e491997-05-22 20:33:33 +00003904fi
3905
Guido van Rossum49545951997-12-02 19:28:29 +00003906fi
3907
Guido van Rossumb93a8621998-05-07 13:27:32 +00003908fi
3909
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003910fi
3911
Guido van Rossumad678af1998-10-02 14:42:15 +00003912fi
3913
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003914fi
3915
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003916fi
3917
Guido van Rossum0be3e491997-05-22 20:33:33 +00003918
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003919 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
3920echo "configure:3921: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003921ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003922if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003923 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003924else
3925 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003926LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003927cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003928#line 3929 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003929#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003930/* Override any gcc2 internal prototype to avoid an error. */
3931/* We use char because int might match the return type of a gcc2
3932 builtin and then its argument prototype would still apply. */
3933char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003934
Guido van Rossumf78abae1997-01-21 22:02:36 +00003935int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003936usconfig()
3937; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003938EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003939if { (eval echo configure:3940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003940 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003941 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003942else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003943 echo "configure: failed program was:" >&5
3944 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003945 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003946 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003947fi
3948rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003949LIBS="$ac_save_LIBS"
3950
3951fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003952if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003953 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003954 cat >> confdefs.h <<\EOF
3955#define WITH_THREAD 1
3956EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003957
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003958 LIBS="$LIBS -lmpc"
3959 LIBOBJS="$LIBOBJS thread.o"
3960 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003961else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003962 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003963fi
3964
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003965 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
3966echo "configure:3967: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003967ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00003968if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003969 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003970else
3971 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003972LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003973cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003974#line 3975 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003975#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003976/* Override any gcc2 internal prototype to avoid an error. */
3977/* We use char because int might match the return type of a gcc2
3978 builtin and then its argument prototype would still apply. */
3979char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003980
Guido van Rossumf78abae1997-01-21 22:02:36 +00003981int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003982thr_create()
3983; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003984EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003985if { (eval echo configure:3986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003986 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003987 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003988else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003989 echo "configure: failed program was:" >&5
3990 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003991 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003992 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003993fi
3994rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003995LIBS="$ac_save_LIBS"
3996
3997fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003998if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003999 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004000 cat >> confdefs.h <<\EOF
4001#define WITH_THREAD 1
4002EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004003
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004004 LIBS="$LIBS -lthread"
4005 LIBOBJS="$LIBOBJS thread.o"
4006 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00004007else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004008 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004009fi
4010
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004011
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004012 if test "$USE_THREAD_MODULE" != "#"
4013 then
4014 # If the above checks didn't disable threads, (at least) OSF1
4015 # needs this '-threads' argument during linking.
4016 case $ac_sys_system in
4017 OSF1) LDLAST=-threads;;
4018 esac
4019 fi
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00004020 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004021fi
4022
Barry Warsawef82cd72000-06-30 16:21:01 +00004023# Check for GC support
4024
4025USE_GC_MODULE=""
4026echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004027echo "configure:4028: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004028# Check whether --with-cycle-gc or --without-cycle-gc was given.
4029if test "${with_cycle_gc+set}" = set; then
4030 withval="$with_cycle_gc"
4031 :
4032fi
4033
4034
4035if test -z "$with_cycle_gc"
4036then with_cycle_gc="yes"
4037fi
4038if test "$with_cycle_gc" = "no"
4039then
4040 USE_GC_MODULE="#"
4041else
4042 cat >> confdefs.h <<\EOF
4043#define WITH_CYCLE_GC 1
4044EOF
4045
4046fi
4047echo "$ac_t""$with_cycle_gc" 1>&6
4048
Neil Schemenauera35c6882001-02-27 04:45:05 +00004049# Check for Python-specific malloc support
4050echo $ac_n "checking for --with-pymalloc""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004051echo "configure:4052: checking for --with-pymalloc" >&5
Neil Schemenauera35c6882001-02-27 04:45:05 +00004052# Check whether --with-pymalloc or --without-pymalloc was given.
4053if test "${with_pymalloc+set}" = set; then
4054 withval="$with_pymalloc"
4055
4056if test "$withval" != no
4057then cat >> confdefs.h <<\EOF
4058#define WITH_PYMALLOC 1
4059EOF
4060 echo "$ac_t""yes" 1>&6
4061else echo "$ac_t""no" 1>&6
4062fi
4063else
4064 echo "$ac_t""no" 1>&6
4065fi
4066
4067
Barry Warsawef82cd72000-06-30 16:21:01 +00004068# Check for --with-wctype-functions
4069echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004070echo "configure:4071: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00004071# Check whether --with-wctype-functions or --without-wctype-functions was given.
4072if test "${with_wctype_functions+set}" = set; then
4073 withval="$with_wctype_functions"
4074
4075if test "$withval" != no
4076then cat >> confdefs.h <<\EOF
4077#define WANT_WCTYPE_FUNCTIONS 1
4078EOF
4079 echo "$ac_t""yes" 1>&6
4080else echo "$ac_t""no" 1>&6
4081fi
4082else
4083 echo "$ac_t""no" 1>&6
4084fi
4085
4086
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004087# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00004088
4089DLINCLDIR=/
4090
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004091echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004092echo "configure:4093: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004093# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004094if test "${with_sgi_dl+set}" = set; then
4095 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004096
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004097echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004098cat >> confdefs.h <<\EOF
4099#define WITH_SGI_DL 1
4100EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004101
Guido van Rossume97ee181999-12-20 21:27:22 +00004102DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004103dldir=$withval
Guido van Rossum40951012000-10-07 16:21:27 +00004104if test ! -z "$dldir" -a -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004105then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004106else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004107fi
4108DLINCLDIR=${dldir}
4109LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004110else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004111 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004112fi
4113
4114
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004115echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004116echo "configure:4117: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004117# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004118if test "${with_dl_dld+set}" = set; then
4119 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004120
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004121echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004122cat >> confdefs.h <<\EOF
4123#define WITH_DL_DLD 1
4124EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004125
Guido van Rossume97ee181999-12-20 21:27:22 +00004126DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004127dldir=`echo "$withval" | sed 's/,.*//'`
4128dlddir=`echo "$withval" | sed 's/.*,//'`
Barry Warsaw7d1219d2000-10-05 18:45:53 +00004129if test ! -z "$dldir" -a -d "$dldir" -a ! -z "$dlddir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00004130then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004131else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004132fi
4133DLINCLDIR=${dldir}
4134LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00004135else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004136 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004137fi
4138
4139
Guido van Rossume97ee181999-12-20 21:27:22 +00004140# the dlopen() function means we might want to use dynload_shlib.o. some
4141# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00004142for ac_func in dlopen
4143do
4144echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004145echo "configure:4146: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004146if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004147 echo $ac_n "(cached) $ac_c" 1>&6
4148else
4149 cat > conftest.$ac_ext <<EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004150#line 4151 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00004151#include "confdefs.h"
4152/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004153 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00004154#include <assert.h>
4155/* Override any gcc2 internal prototype to avoid an error. */
4156/* We use char because int might match the return type of a gcc2
4157 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004158char $ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004159
4160int main() {
4161
4162/* The GNU C library defines this for functions which it implements
4163 to always fail with ENOSYS. Some functions are actually named
4164 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004165#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00004166choke me
4167#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004168$ac_func();
Guido van Rossume97ee181999-12-20 21:27:22 +00004169#endif
4170
4171; return 0; }
4172EOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004173if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004174 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004175 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00004176else
4177 echo "configure: failed program was:" >&5
4178 cat conftest.$ac_ext >&5
4179 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004180 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00004181fi
4182rm -f conftest*
4183fi
4184
Thomas Wouters3a584202000-08-05 23:28:51 +00004185if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00004186 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004187 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4188 cat >> confdefs.h <<EOF
4189#define $ac_tr_func 1
4190EOF
4191
Guido van Rossume97ee181999-12-20 21:27:22 +00004192else
4193 echo "$ac_t""no" 1>&6
4194fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004195done
Guido van Rossume97ee181999-12-20 21:27:22 +00004196
4197
4198# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
4199# loading of modules.
4200
4201echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Guido van Rossum2242f2f2001-04-11 20:58:20 +00004202echo "configure:4203: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00004203if test -z "$DYNLOADFILE"
4204then
4205 case $ac_sys_system/$ac_sys_release in
4206 AIX*) DYNLOADFILE="dynload_aix.o";;
4207 BeOS*) DYNLOADFILE="dynload_beos.o";;
4208 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Guido van Rossum5839e582000-10-09 19:52:35 +00004209 Darwin/*|next/*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +00004210 *)
4211 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
4212 # out any dynamic loading
4213 if test "$ac_cv_func_dlopen" = yes
4214 then DYNLOADFILE="dynload_shlib.o"
4215 else DYNLOADFILE="dynload_stub.o"
4216 fi
4217 ;;
4218 esac
4219fi
4220echo "$ac_t""$DYNLOADFILE" 1>&6
4221if test "$DYNLOADFILE" != "dynload_stub.o"
4222then
4223 cat >> confdefs.h <<\EOF
4224#define HAVE_DYNAMIC_LOADING 1
4225EOF
4226
4227fi
4228
Neil Schemenauer4e425612001-06-19 15:44:15 +00004229# MACHDEP_OBJS can be set to platform-specific object files needed by Python
4230
4231
4232echo $ac_n "checking MACHDEP_OBJS""... $ac_c" 1>&6
4233echo "configure:4234: checking MACHDEP_OBJS" >&5
4234if test -z "$MACHDEP_OBJS"
4235then
4236 case $ac_sys_system/$ac_sys_release in
4237 Darwin/*)
4238 MACHDEP_OBJS="Mac/Python/macglue.o"
4239 cat >> confdefs.h <<\EOF
4240#define USE_TOOLBOX_OBJECT_GLUE 1
4241EOF
4242
4243 ;;
4244 *) MACHDEP_OBJS="";;
4245 esac
4246fi
4247echo "$ac_t""$DYNLOADFILE" 1>&6
4248
Guido van Rossum627b2d71993-12-24 10:39:16 +00004249# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00004250for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00004251 flock fork fsync fdatasync fpathconf ftime ftruncate \
Andrew M. Kuchlinga9586c72001-01-08 17:58:56 +00004252 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00004253 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00004254 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00004255 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00004256 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00004257 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00004258 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00004259 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00004260 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004261do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004262echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004263echo "configure:4264: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004264if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004265 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004266else
4267 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004268#line 4269 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004269#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004270/* System header to define __stub macros and hopefully few prototypes,
4271 which can conflict with char $ac_func(); below. */
4272#include <assert.h>
4273/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004274/* We use char because int might match the return type of a gcc2
4275 builtin and then its argument prototype would still apply. */
4276char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004277
Guido van Rossumf78abae1997-01-21 22:02:36 +00004278int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004279
Guido van Rossum627b2d71993-12-24 10:39:16 +00004280/* The GNU C library defines this for functions which it implements
4281 to always fail with ENOSYS. Some functions are actually named
4282 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004283#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004284choke me
4285#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004286$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004287#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004288
Guido van Rossum7f43da71994-08-01 12:15:30 +00004289; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004290EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004291if { (eval echo configure:4292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004292 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004293 eval "ac_cv_func_$ac_func=yes"
4294else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004295 echo "configure: failed program was:" >&5
4296 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004297 rm -rf conftest*
4298 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004299fi
4300rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004301fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004302
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004303if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004304 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004305 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004306 cat >> confdefs.h <<EOF
4307#define $ac_tr_func 1
4308EOF
4309
4310else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004311 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004312fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004313done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00004314
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004315
Fred Drake8cef4cf2000-06-28 16:40:38 +00004316# check for openpty and forkpty
4317
4318for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00004319do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004320echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004321echo "configure:4322: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004322if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004323 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004324else
4325 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004326#line 4327 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004327#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004328/* System header to define __stub macros and hopefully few prototypes,
4329 which can conflict with char $ac_func(); below. */
4330#include <assert.h>
4331/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004332/* We use char because int might match the return type of a gcc2
4333 builtin and then its argument prototype would still apply. */
4334char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004335
Guido van Rossumf78abae1997-01-21 22:02:36 +00004336int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004337
Guido van Rossum627b2d71993-12-24 10:39:16 +00004338/* The GNU C library defines this for functions which it implements
4339 to always fail with ENOSYS. Some functions are actually named
4340 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004341#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004342choke me
4343#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004344$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004345#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004346
Guido van Rossum7f43da71994-08-01 12:15:30 +00004347; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004348EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004349if { (eval echo configure:4350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004350 rm -rf conftest*
4351 eval "ac_cv_func_$ac_func=yes"
4352else
4353 echo "configure: failed program was:" >&5
4354 cat conftest.$ac_ext >&5
4355 rm -rf conftest*
4356 eval "ac_cv_func_$ac_func=no"
4357fi
4358rm -f conftest*
4359fi
4360
4361if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4362 echo "$ac_t""yes" 1>&6
4363 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4364 cat >> confdefs.h <<EOF
4365#define $ac_tr_func 1
4366EOF
4367
4368else
4369 echo "$ac_t""no" 1>&6
4370echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004371echo "configure:4372: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004372ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004373if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004374 echo $ac_n "(cached) $ac_c" 1>&6
4375else
4376 ac_save_LIBS="$LIBS"
4377LIBS="-lutil $LIBS"
4378cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004379#line 4380 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004380#include "confdefs.h"
4381/* Override any gcc2 internal prototype to avoid an error. */
4382/* We use char because int might match the return type of a gcc2
4383 builtin and then its argument prototype would still apply. */
4384char openpty();
4385
4386int main() {
4387openpty()
4388; return 0; }
4389EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004390if { (eval echo configure:4391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004391 rm -rf conftest*
4392 eval "ac_cv_lib_$ac_lib_var=yes"
4393else
4394 echo "configure: failed program was:" >&5
4395 cat conftest.$ac_ext >&5
4396 rm -rf conftest*
4397 eval "ac_cv_lib_$ac_lib_var=no"
4398fi
4399rm -f conftest*
4400LIBS="$ac_save_LIBS"
4401
4402fi
4403if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4404 echo "$ac_t""yes" 1>&6
4405 cat >> confdefs.h <<\EOF
4406#define HAVE_OPENPTY 1
4407EOF
4408 LIBS="$LIBS -lutil"
4409else
4410 echo "$ac_t""no" 1>&6
4411fi
4412
4413fi
4414done
4415
4416for ac_func in forkpty
4417do
4418echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004419echo "configure:4420: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004420if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004421 echo $ac_n "(cached) $ac_c" 1>&6
4422else
4423 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004424#line 4425 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004425#include "confdefs.h"
4426/* System header to define __stub macros and hopefully few prototypes,
4427 which can conflict with char $ac_func(); below. */
4428#include <assert.h>
4429/* Override any gcc2 internal prototype to avoid an error. */
4430/* We use char because int might match the return type of a gcc2
4431 builtin and then its argument prototype would still apply. */
4432char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004433
4434int main() {
4435
4436/* The GNU C library defines this for functions which it implements
4437 to always fail with ENOSYS. Some functions are actually named
4438 something starting with __ and the normal name is an alias. */
4439#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4440choke me
4441#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004442$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004443#endif
4444
4445; return 0; }
4446EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004447if { (eval echo configure:4448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004448 rm -rf conftest*
4449 eval "ac_cv_func_$ac_func=yes"
4450else
4451 echo "configure: failed program was:" >&5
4452 cat conftest.$ac_ext >&5
4453 rm -rf conftest*
4454 eval "ac_cv_func_$ac_func=no"
4455fi
4456rm -f conftest*
4457fi
4458
4459if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4460 echo "$ac_t""yes" 1>&6
4461 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4462 cat >> confdefs.h <<EOF
4463#define $ac_tr_func 1
4464EOF
4465
4466else
4467 echo "$ac_t""no" 1>&6
4468echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004469echo "configure:4470: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004470ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004471if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004472 echo $ac_n "(cached) $ac_c" 1>&6
4473else
4474 ac_save_LIBS="$LIBS"
4475LIBS="-lutil $LIBS"
4476cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004477#line 4478 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004478#include "confdefs.h"
4479/* Override any gcc2 internal prototype to avoid an error. */
4480/* We use char because int might match the return type of a gcc2
4481 builtin and then its argument prototype would still apply. */
4482char forkpty();
4483
4484int main() {
4485forkpty()
4486; return 0; }
4487EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004488if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004489 rm -rf conftest*
4490 eval "ac_cv_lib_$ac_lib_var=yes"
4491else
4492 echo "configure: failed program was:" >&5
4493 cat conftest.$ac_ext >&5
4494 rm -rf conftest*
4495 eval "ac_cv_lib_$ac_lib_var=no"
4496fi
4497rm -f conftest*
4498LIBS="$ac_save_LIBS"
4499
4500fi
4501if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4502 echo "$ac_t""yes" 1>&6
4503 cat >> confdefs.h <<\EOF
4504#define HAVE_FORKPTY 1
4505EOF
4506 LIBS="$LIBS -lutil"
4507else
4508 echo "$ac_t""no" 1>&6
4509fi
4510
4511fi
4512done
4513
4514
4515# check for long file support functions
4516for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4517do
4518echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004519echo "configure:4520: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004520if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004521 echo $ac_n "(cached) $ac_c" 1>&6
4522else
4523 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004524#line 4525 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004525#include "confdefs.h"
4526/* System header to define __stub macros and hopefully few prototypes,
4527 which can conflict with char $ac_func(); below. */
4528#include <assert.h>
4529/* Override any gcc2 internal prototype to avoid an error. */
4530/* We use char because int might match the return type of a gcc2
4531 builtin and then its argument prototype would still apply. */
4532char $ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004533
4534int main() {
4535
4536/* The GNU C library defines this for functions which it implements
4537 to always fail with ENOSYS. Some functions are actually named
4538 something starting with __ and the normal name is an alias. */
4539#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4540choke me
4541#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004542$ac_func();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004543#endif
4544
4545; return 0; }
4546EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004547if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004548 rm -rf conftest*
4549 eval "ac_cv_func_$ac_func=yes"
4550else
4551 echo "configure: failed program was:" >&5
4552 cat conftest.$ac_ext >&5
4553 rm -rf conftest*
4554 eval "ac_cv_func_$ac_func=no"
4555fi
4556rm -f conftest*
4557fi
4558
4559if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4560 echo "$ac_t""yes" 1>&6
4561 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4562 cat >> confdefs.h <<EOF
4563#define $ac_tr_func 1
4564EOF
4565
4566else
4567 echo "$ac_t""no" 1>&6
4568fi
4569done
4570
4571
4572for ac_func in dup2 getcwd strdup strerror memmove
4573do
4574echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004575echo "configure:4576: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004576if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004577 echo $ac_n "(cached) $ac_c" 1>&6
4578else
4579 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004580#line 4581 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004581#include "confdefs.h"
4582/* System header to define __stub macros and hopefully few prototypes,
4583 which can conflict with char $ac_func(); below. */
4584#include <assert.h>
4585/* Override any gcc2 internal prototype to avoid an error. */
4586/* We use char because int might match the return type of a gcc2
4587 builtin and then its argument prototype would still apply. */
4588char $ac_func();
4589
4590int main() {
4591
4592/* The GNU C library defines this for functions which it implements
4593 to always fail with ENOSYS. Some functions are actually named
4594 something starting with __ and the normal name is an alias. */
4595#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4596choke me
4597#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004598$ac_func();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004599#endif
4600
4601; return 0; }
4602EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004603if { (eval echo configure:4604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004604 rm -rf conftest*
4605 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004606else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004607 echo "configure: failed program was:" >&5
4608 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004609 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004610 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004611fi
4612rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004613fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004614
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004615if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004616 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004617 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4618 cat >> confdefs.h <<EOF
4619#define $ac_tr_func 1
4620EOF
4621
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004622else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004623 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004624LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004625fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004626done
4627
Guido van Rossumf78abae1997-01-21 22:02:36 +00004628
Thomas Wouters3a584202000-08-05 23:28:51 +00004629for ac_func in getpgrp
4630do
4631echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004632echo "configure:4633: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004633if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004634 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004635else
4636 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004637#line 4638 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004638#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004639/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004640 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004641#include <assert.h>
4642/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004643/* We use char because int might match the return type of a gcc2
4644 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004645char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004646
Guido van Rossumf78abae1997-01-21 22:02:36 +00004647int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004648
Guido van Rossum627b2d71993-12-24 10:39:16 +00004649/* The GNU C library defines this for functions which it implements
4650 to always fail with ENOSYS. Some functions are actually named
4651 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004652#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004653choke me
4654#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004655$ac_func();
Guido van Rossum627b2d71993-12-24 10:39:16 +00004656#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004657
4658; return 0; }
4659EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004660if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004661 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004662 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004663else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004664 echo "configure: failed program was:" >&5
4665 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004666 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004667 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004668fi
4669rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004670fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004671
Thomas Wouters3a584202000-08-05 23:28:51 +00004672if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004673 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004674 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4675 cat >> confdefs.h <<EOF
4676#define $ac_tr_func 1
4677EOF
4678 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004679#line 4680 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004680#include "confdefs.h"
4681#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004682int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004683getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004684; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004685EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004686if { (eval echo configure:4687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004687 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004688 cat >> confdefs.h <<\EOF
4689#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004690EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004691
Guido van Rossumf78abae1997-01-21 22:02:36 +00004692else
4693 echo "configure: failed program was:" >&5
4694 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004695fi
4696rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004697else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004698 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004699fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004700done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004701
Thomas Wouters3a584202000-08-05 23:28:51 +00004702for ac_func in setpgrp
4703do
4704echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004705echo "configure:4706: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004706if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004707 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004708else
4709 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004710#line 4711 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004711#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004712/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004713 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004714#include <assert.h>
4715/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004716/* We use char because int might match the return type of a gcc2
4717 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004718char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004719
Guido van Rossumf78abae1997-01-21 22:02:36 +00004720int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004721
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004722/* The GNU C library defines this for functions which it implements
4723 to always fail with ENOSYS. Some functions are actually named
4724 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004725#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004726choke me
4727#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004728$ac_func();
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004729#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004730
4731; return 0; }
4732EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004733if { (eval echo configure:4734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004734 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004735 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004736else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004737 echo "configure: failed program was:" >&5
4738 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004739 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004740 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004741fi
4742rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004743fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004744
Thomas Wouters3a584202000-08-05 23:28:51 +00004745if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004746 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004747 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4748 cat >> confdefs.h <<EOF
4749#define $ac_tr_func 1
4750EOF
4751 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004752#line 4753 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004753#include "confdefs.h"
4754#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004755int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004756setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004757; return 0; }
4758EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004759if { (eval echo configure:4760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004760 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004761 cat >> confdefs.h <<\EOF
4762#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004763EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004764
Guido van Rossumf78abae1997-01-21 22:02:36 +00004765else
4766 echo "configure: failed program was:" >&5
4767 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004768fi
4769rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004770else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004771 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004772fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004773done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004774
Thomas Wouters3a584202000-08-05 23:28:51 +00004775for ac_func in gettimeofday
4776do
4777echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004778echo "configure:4779: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004779if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004780 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004781else
4782 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004783#line 4784 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004784#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004785/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004786 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004787#include <assert.h>
4788/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004789/* We use char because int might match the return type of a gcc2
4790 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004791char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004792
Guido van Rossumf78abae1997-01-21 22:02:36 +00004793int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004794
4795/* The GNU C library defines this for functions which it implements
4796 to always fail with ENOSYS. Some functions are actually named
4797 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004798#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004799choke me
4800#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004801$ac_func();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004802#endif
4803
4804; return 0; }
4805EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004806if { (eval echo configure:4807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004807 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004808 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004809else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004810 echo "configure: failed program was:" >&5
4811 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004812 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004813 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004814fi
4815rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004816fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004817
Thomas Wouters3a584202000-08-05 23:28:51 +00004818if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004819 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004820 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4821 cat >> confdefs.h <<EOF
4822#define $ac_tr_func 1
4823EOF
4824 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004825#line 4826 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004826#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004827#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004828int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004829gettimeofday((struct timeval*)0,(struct timezone*)0);
4830; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004831EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004832if { (eval echo configure:4833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004833 :
4834else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004835 echo "configure: failed program was:" >&5
4836 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004837 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004838 cat >> confdefs.h <<\EOF
4839#define GETTIMEOFDAY_NO_TZ 1
4840EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004841
4842fi
4843rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004844else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004845 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004846fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004847done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004848
4849
4850# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004851echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004852echo "configure:4853: checking whether time.h and sys/time.h may both be included" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004853if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004854 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004855else
4856 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004857#line 4858 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004858#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004859#include <sys/types.h>
4860#include <sys/time.h>
4861#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004862int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004863struct tm *tp;
4864; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004865EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004866if { (eval echo configure:4867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004867 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004868 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004869else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004870 echo "configure: failed program was:" >&5
4871 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004872 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004873 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004874fi
4875rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004876fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004877
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004878echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004879if test $ac_cv_header_time = yes; then
4880 cat >> confdefs.h <<\EOF
4881#define TIME_WITH_SYS_TIME 1
4882EOF
4883
4884fi
4885
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004886echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004887echo "configure:4888: checking whether struct tm is in sys/time.h or time.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004888if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004889 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004890else
4891 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004892#line 4893 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004893#include "confdefs.h"
4894#include <sys/types.h>
4895#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004896int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004897struct tm *tp; tp->tm_sec;
4898; return 0; }
4899EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004900if { (eval echo configure:4901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004901 rm -rf conftest*
4902 ac_cv_struct_tm=time.h
4903else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004904 echo "configure: failed program was:" >&5
4905 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004906 rm -rf conftest*
4907 ac_cv_struct_tm=sys/time.h
4908fi
4909rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004910fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004911
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004912echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004913if test $ac_cv_struct_tm = sys/time.h; then
4914 cat >> confdefs.h <<\EOF
4915#define TM_IN_SYS_TIME 1
4916EOF
4917
4918fi
4919
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004920echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004921echo "configure:4922: checking for tm_zone in struct tm" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004922if eval "test \"`echo '$''{'ac_cv_struct_tm_zone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004923 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004924else
4925 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004926#line 4927 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004927#include "confdefs.h"
4928#include <sys/types.h>
4929#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004930int main() {
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004931struct tm tm; tm.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004932; return 0; }
4933EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004934if { (eval echo configure:4935: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004935 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004936 ac_cv_struct_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004937else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004938 echo "configure: failed program was:" >&5
4939 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004940 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004941 ac_cv_struct_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004942fi
4943rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004944fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004945
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004946echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4947if test "$ac_cv_struct_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004948 cat >> confdefs.h <<\EOF
4949#define HAVE_TM_ZONE 1
4950EOF
4951
4952else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004953 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004954echo "configure:4955: checking for tzname" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004955if eval "test \"`echo '$''{'ac_cv_var_tzname'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004956 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004957else
4958 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004959#line 4960 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004960#include "confdefs.h"
4961#include <time.h>
4962#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004963extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004964#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004965int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004966atoi(*tzname);
4967; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004968EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004969if { (eval echo configure:4970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004970 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004971 ac_cv_var_tzname=yes
4972else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004973 echo "configure: failed program was:" >&5
4974 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004975 rm -rf conftest*
4976 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004977fi
4978rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004979fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004980
4981echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004982 if test $ac_cv_var_tzname = yes; then
4983 cat >> confdefs.h <<\EOF
4984#define HAVE_TZNAME 1
4985EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004986
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004987 fi
4988fi
4989
4990
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004991echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00004992echo "configure:4993: checking for time.h that defines altzone" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00004993if eval "test \"`echo '$''{'ac_cv_header_time_altzone'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004994 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004995else
4996 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00004997#line 4998 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004998#include "confdefs.h"
4999#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005000int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005001return altzone;
5002; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005003EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005004if { (eval echo configure:5005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005005 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005006 ac_cv_header_time_altzone=yes
5007else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005008 echo "configure: failed program was:" >&5
5009 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005010 rm -rf conftest*
5011 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00005012fi
5013rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005014fi
5015
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005016echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005017if test $ac_cv_header_time_altzone = yes; then
5018 cat >> confdefs.h <<\EOF
5019#define HAVE_ALTZONE 1
5020EOF
5021
5022fi
5023
Guido van Rossumda88dad1995-01-26 00:46:29 +00005024was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005025echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005026echo "configure:5027: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005027cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005028#line 5029 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005029#include "confdefs.h"
5030
5031#include <sys/types.h>
5032#include <sys/select.h>
5033#include <sys/time.h>
5034
Guido van Rossumf78abae1997-01-21 22:02:36 +00005035int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005036;
5037; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005038EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005039if { (eval echo configure:5040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005040 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005041 cat >> confdefs.h <<\EOF
5042#define SYS_SELECT_WITH_SYS_TIME 1
5043EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005044 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005045else
5046 echo "configure: failed program was:" >&5
5047 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005048fi
5049rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005050echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005051
5052# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00005053
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005054echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005055echo "configure:5056: checking whether char is unsigned" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005056if eval "test \"`echo '$''{'ac_cv_c_char_unsigned'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005057 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005058else
5059 if test "$GCC" = yes; then
5060 # GCC predefines this symbol on systems where it applies.
5061cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005062#line 5063 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005063#include "confdefs.h"
5064#ifdef __CHAR_UNSIGNED__
5065 yes
5066#endif
5067
5068EOF
5069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5070 egrep "yes" >/dev/null 2>&1; then
5071 rm -rf conftest*
5072 ac_cv_c_char_unsigned=yes
5073else
5074 rm -rf conftest*
5075 ac_cv_c_char_unsigned=no
5076fi
5077rm -f conftest*
5078
5079else
5080if test "$cross_compiling" = yes; then
5081 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5082else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005083 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005084#line 5085 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005085#include "confdefs.h"
5086/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005087#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00005088#define volatile
5089#endif
5090main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00005091 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00005092}
5093EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005094if { (eval echo configure:5095: \"$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 +00005095then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005096 ac_cv_c_char_unsigned=yes
5097else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005098 echo "configure: failed program was:" >&5
5099 cat conftest.$ac_ext >&5
5100 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005101 ac_cv_c_char_unsigned=no
5102fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005103rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005104fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005105
5106fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005107fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005108
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005109echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005110if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
5111 cat >> confdefs.h <<\EOF
5112#define __CHAR_UNSIGNED__ 1
5113EOF
5114
5115fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00005116
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005117echo $ac_n "checking for working const""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005118echo "configure:5119: checking for working const" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005119if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005120 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005121else
5122 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005123#line 5124 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005124#include "confdefs.h"
5125
Guido van Rossumf78abae1997-01-21 22:02:36 +00005126int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005127
5128/* Ultrix mips cc rejects this. */
Neil Schemenauer4e425612001-06-19 15:44:15 +00005129typedef int charset[2]; const charset x = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005130/* SunOS 4.1.1 cc rejects this. */
5131char const *const *ccp;
5132char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005133/* NEC SVR4.0.2 mips cc rejects this. */
5134struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005135static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005136/* AIX XL C 1.02.0.0 rejects this.
5137 It does not let you subtract one const X* pointer from another in an arm
5138 of an if-expression whose if-part is not a constant expression */
5139const char *g = "string";
5140ccp = &g + (g ? g-g : 0);
5141/* HPUX 7.0 cc rejects these. */
5142++ccp;
5143p = (char**) ccp;
5144ccp = (char const *const *) p;
5145{ /* SCO 3.2v4 cc rejects this. */
5146 char *t;
5147 char const *s = 0 ? (char *) 0 : (char const *) 0;
5148
5149 *t++ = 0;
5150}
5151{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005152 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00005153 const int *foo = &x[0];
5154 ++foo;
5155}
5156{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5157 typedef const int *iptr;
5158 iptr p = 0;
5159 ++p;
5160}
5161{ /* AIX XL C 1.02.0.0 rejects this saying
5162 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5163 struct s { int j; const int *ap[3]; };
5164 struct s *b; b->j = 5;
5165}
5166{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5167 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005168}
5169
5170; return 0; }
5171EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005172if { (eval echo configure:5173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005173 rm -rf conftest*
5174 ac_cv_c_const=yes
5175else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005176 echo "configure: failed program was:" >&5
5177 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005178 rm -rf conftest*
5179 ac_cv_c_const=no
5180fi
5181rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005182fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005183
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005184echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005185if test $ac_cv_c_const = no; then
5186 cat >> confdefs.h <<\EOF
5187#define const
5188EOF
5189
5190fi
5191
5192
Guido van Rossumda88dad1995-01-26 00:46:29 +00005193works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005194echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005195echo "configure:5196: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005196cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005197#line 5198 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005198#include "confdefs.h"
5199
Guido van Rossumf78abae1997-01-21 22:02:36 +00005200int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005201volatile int x; x = 0;
5202; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005203EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005204if { (eval echo configure:5205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005205 rm -rf conftest*
5206 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005207else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005208 echo "configure: failed program was:" >&5
5209 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005210 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005211 cat >> confdefs.h <<\EOF
5212#define volatile
5213EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005214
5215fi
5216rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005217echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005218
Guido van Rossumda88dad1995-01-26 00:46:29 +00005219works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005220echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005221echo "configure:5222: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005222cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005223#line 5224 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005224#include "confdefs.h"
5225
Guido van Rossumf78abae1997-01-21 22:02:36 +00005226int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005227signed char c;
5228; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005229EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005230if { (eval echo configure:5231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005231 rm -rf conftest*
5232 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005233else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005234 echo "configure: failed program was:" >&5
5235 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00005236 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005237 cat >> confdefs.h <<\EOF
5238#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00005239EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005240
5241fi
5242rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005243echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005244
Guido van Rossumda88dad1995-01-26 00:46:29 +00005245have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005246echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005247echo "configure:5248: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005248cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005249#line 5250 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005250#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005251int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00005252int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005253return foo(10);
5254; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005255EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005256if { (eval echo configure:5257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005257 rm -rf conftest*
5258 cat >> confdefs.h <<\EOF
5259#define HAVE_PROTOTYPES 1
5260EOF
5261 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005262else
5263 echo "configure: failed program was:" >&5
5264 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00005265fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005266rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005267echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005268
Guido van Rossumda88dad1995-01-26 00:46:29 +00005269works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005270echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005271echo "configure:5272: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005272cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005273#line 5274 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005274#include "confdefs.h"
5275
5276#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00005277int foo(int x, ...) {
5278 va_list va;
5279 va_start(va, x);
5280 va_arg(va, int);
5281 va_arg(va, char *);
5282 va_arg(va, double);
5283 return 0;
5284}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005285
Guido van Rossumf78abae1997-01-21 22:02:36 +00005286int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00005287return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005288; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005289EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005290if { (eval echo configure:5291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005291 rm -rf conftest*
5292 cat >> confdefs.h <<\EOF
5293#define HAVE_STDARG_PROTOTYPES 1
5294EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005295 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00005296else
5297 echo "configure: failed program was:" >&5
5298 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005299fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005300rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005301echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005302
Guido van Rossumda88dad1995-01-26 00:46:29 +00005303if test "$have_prototypes" = yes; then
5304bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005305echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005306echo "configure:5307: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005307cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005308#line 5309 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005309#include "confdefs.h"
5310#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00005311int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005312char **t;execve("@",t,t);
5313; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005314EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005315if { (eval echo configure:5316: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005316 :
5317else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005318 echo "configure: failed program was:" >&5
5319 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005320 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005321 cat >> confdefs.h <<\EOF
5322#define BAD_EXEC_PROTOTYPES 1
5323EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005324 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005325fi
5326rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005327echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005328fi
5329
Guido van Rossumda88dad1995-01-26 00:46:29 +00005330bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005331echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005332echo "configure:5333: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005333if test "$cross_compiling" = yes; then
5334 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5335else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005336 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005337#line 5338 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005338#include "confdefs.h"
5339
5340struct s { int a; int b; };
5341static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005342int foobar() {
5343 static int random;
5344 random = (int) &foo;
5345 return random;
5346}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005347static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005348main() {
5349 exit(!((int)&foo == foobar()));
5350}
Guido van Rossum7f43da71994-08-01 12:15:30 +00005351
5352EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005353if { (eval echo configure:5354: \"$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 +00005354then
Guido van Rossum7f43da71994-08-01 12:15:30 +00005355 :
5356else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005357 echo "configure: failed program was:" >&5
5358 cat conftest.$ac_ext >&5
5359 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005360 cat >> confdefs.h <<\EOF
5361#define BAD_STATIC_FORWARD 1
5362EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005363 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005364fi
5365rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005366fi
5367
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005368echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005369
Guido van Rossumda88dad1995-01-26 00:46:29 +00005370va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005371echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005372echo "configure:5373: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005373cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005374#line 5375 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005375#include "confdefs.h"
5376
5377#ifdef HAVE_STDARG_PROTOTYPES
5378#include <stdarg.h>
5379#else
5380#include <varargs.h>
5381#endif
5382
Guido van Rossumf78abae1997-01-21 22:02:36 +00005383int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005384va_list list1, list2; list1 = list2;
5385; return 0; }
5386EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005387if { (eval echo configure:5388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005388 :
5389else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005390 echo "configure: failed program was:" >&5
5391 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005392 rm -rf conftest*
5393 cat >> confdefs.h <<\EOF
5394#define VA_LIST_IS_ARRAY 1
5395EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005396 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005397fi
5398rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005399echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005400
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005401# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5402echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005403echo "configure:5404: checking for gethostbyname_r" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005404if eval "test \"`echo '$''{'ac_cv_func_gethostbyname_r'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005405 echo $ac_n "(cached) $ac_c" 1>&6
5406else
5407 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005408#line 5409 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005409#include "confdefs.h"
5410/* System header to define __stub macros and hopefully few prototypes,
5411 which can conflict with char gethostbyname_r(); below. */
5412#include <assert.h>
5413/* Override any gcc2 internal prototype to avoid an error. */
5414/* We use char because int might match the return type of a gcc2
5415 builtin and then its argument prototype would still apply. */
5416char gethostbyname_r();
5417
5418int main() {
5419
5420/* The GNU C library defines this for functions which it implements
5421 to always fail with ENOSYS. Some functions are actually named
5422 something starting with __ and the normal name is an alias. */
5423#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5424choke me
5425#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005426gethostbyname_r();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005427#endif
5428
5429; return 0; }
5430EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005431if { (eval echo configure:5432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005432 rm -rf conftest*
5433 eval "ac_cv_func_gethostbyname_r=yes"
5434else
5435 echo "configure: failed program was:" >&5
5436 cat conftest.$ac_ext >&5
5437 rm -rf conftest*
5438 eval "ac_cv_func_gethostbyname_r=no"
5439fi
5440rm -f conftest*
5441fi
5442
5443if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5444 echo "$ac_t""yes" 1>&6
5445
5446 cat >> confdefs.h <<\EOF
5447#define HAVE_GETHOSTBYNAME_R 1
5448EOF
5449
5450 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005451echo "configure:5452: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005452 OLD_CFLAGS=$CFLAGS
5453 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5454 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005455#line 5456 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005456#include "confdefs.h"
5457
5458# include <netdb.h>
5459
5460int main() {
5461
5462 char *name;
5463 struct hostent *he, *res;
5464 char buffer[2048];
5465 int buflen = 2048;
5466 int h_errnop;
5467
5468 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5469
5470; return 0; }
5471EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005472if { (eval echo configure:5473: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005473 rm -rf conftest*
5474
5475 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005476#define HAVE_GETHOSTBYNAME_R 1
5477EOF
5478
5479 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005480#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5481EOF
5482
5483 echo "$ac_t""yes" 1>&6
5484
5485else
5486 echo "configure: failed program was:" >&5
5487 cat conftest.$ac_ext >&5
5488 rm -rf conftest*
5489
5490 echo "$ac_t""no" 1>&6
5491 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005492echo "configure:5493: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005493 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005494#line 5495 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005495#include "confdefs.h"
5496
5497# include <netdb.h>
5498
5499int main() {
5500
5501 char *name;
5502 struct hostent *he;
5503 char buffer[2048];
5504 int buflen = 2048;
5505 int h_errnop;
5506
5507 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5508
5509; return 0; }
5510EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005511if { (eval echo configure:5512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005512 rm -rf conftest*
5513
5514 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005515#define HAVE_GETHOSTBYNAME_R 1
5516EOF
5517
5518 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005519#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5520EOF
5521
5522 echo "$ac_t""yes" 1>&6
5523
5524else
5525 echo "configure: failed program was:" >&5
5526 cat conftest.$ac_ext >&5
5527 rm -rf conftest*
5528
5529 echo "$ac_t""no" 1>&6
5530 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005531echo "configure:5532: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005532 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005533#line 5534 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005534#include "confdefs.h"
5535
5536# include <netdb.h>
5537
5538int main() {
5539
5540 char *name;
5541 struct hostent *he;
5542 struct hostent_data data;
5543
5544 (void) gethostbyname_r(name, he, &data);
5545
5546; return 0; }
5547EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005548if { (eval echo configure:5549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005549 rm -rf conftest*
5550
5551 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005552#define HAVE_GETHOSTBYNAME_R 1
5553EOF
5554
5555 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005556#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5557EOF
5558
5559 echo "$ac_t""yes" 1>&6
5560
5561else
5562 echo "configure: failed program was:" >&5
5563 cat conftest.$ac_ext >&5
5564 rm -rf conftest*
5565
5566 echo "$ac_t""no" 1>&6
5567
5568fi
5569rm -f conftest*
5570
5571fi
5572rm -f conftest*
5573
5574fi
5575rm -f conftest*
5576 CFLAGS=$OLD_CFLAGS
5577
5578else
5579 echo "$ac_t""no" 1>&6
5580
Thomas Wouters3a584202000-08-05 23:28:51 +00005581 for ac_func in gethostbyname
5582do
5583echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005584echo "configure:5585: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005585if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005586 echo $ac_n "(cached) $ac_c" 1>&6
5587else
5588 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005589#line 5590 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005590#include "confdefs.h"
5591/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005592 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005593#include <assert.h>
5594/* Override any gcc2 internal prototype to avoid an error. */
5595/* We use char because int might match the return type of a gcc2
5596 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005597char $ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005598
5599int main() {
5600
5601/* The GNU C library defines this for functions which it implements
5602 to always fail with ENOSYS. Some functions are actually named
5603 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005604#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005605choke me
5606#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005607$ac_func();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005608#endif
5609
5610; return 0; }
5611EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005612if { (eval echo configure:5613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005613 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005614 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005615else
5616 echo "configure: failed program was:" >&5
5617 cat conftest.$ac_ext >&5
5618 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005619 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005620fi
5621rm -f conftest*
5622fi
5623
Thomas Wouters3a584202000-08-05 23:28:51 +00005624if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005625 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005626 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5627 cat >> confdefs.h <<EOF
5628#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005629EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005630
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005631else
5632 echo "$ac_t""no" 1>&6
5633fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005634done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005635
5636
5637fi
5638
5639
5640
5641
5642
5643
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005644
Guido van Rossum627b2d71993-12-24 10:39:16 +00005645# checks for system services
5646# (none yet)
5647
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005648# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005649echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005650echo "configure:5651: checking for __fpu_control" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005651if eval "test \"`echo '$''{'ac_cv_func___fpu_control'+set}'`\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005652 echo $ac_n "(cached) $ac_c" 1>&6
5653else
5654 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005655#line 5656 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005656#include "confdefs.h"
5657/* System header to define __stub macros and hopefully few prototypes,
5658 which can conflict with char __fpu_control(); below. */
5659#include <assert.h>
5660/* Override any gcc2 internal prototype to avoid an error. */
5661/* We use char because int might match the return type of a gcc2
5662 builtin and then its argument prototype would still apply. */
5663char __fpu_control();
5664
5665int main() {
5666
5667/* The GNU C library defines this for functions which it implements
5668 to always fail with ENOSYS. Some functions are actually named
5669 something starting with __ and the normal name is an alias. */
5670#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5671choke me
5672#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005673__fpu_control();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005674#endif
5675
5676; return 0; }
5677EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005678if { (eval echo configure:5679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005679 rm -rf conftest*
5680 eval "ac_cv_func___fpu_control=yes"
5681else
5682 echo "configure: failed program was:" >&5
5683 cat conftest.$ac_ext >&5
5684 rm -rf conftest*
5685 eval "ac_cv_func___fpu_control=no"
5686fi
5687rm -f conftest*
5688fi
5689
5690if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5691 echo "$ac_t""yes" 1>&6
5692 :
5693else
5694 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005695echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005696echo "configure:5697: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005697ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005698if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005699 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005700else
5701 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005702LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005703cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005704#line 5705 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005705#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005706/* Override any gcc2 internal prototype to avoid an error. */
5707/* We use char because int might match the return type of a gcc2
5708 builtin and then its argument prototype would still apply. */
5709char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005710
Guido van Rossumf78abae1997-01-21 22:02:36 +00005711int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005712__fpu_control()
5713; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005714EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005715if { (eval echo configure:5716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005716 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005717 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005718else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005719 echo "configure: failed program was:" >&5
5720 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005721 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005722 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005723fi
5724rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005725LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005726
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005727fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005728if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005729 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005730 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5731 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005732 cat >> confdefs.h <<EOF
5733#define $ac_tr_lib 1
5734EOF
5735
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005736 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005737
5738else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005739 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005740fi
5741
5742
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005743fi
5744
5745
Guido van Rossum7f253911997-05-09 02:42:48 +00005746# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005747echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005748echo "configure:5749: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005749# Check whether --with-fpectl or --without-fpectl was given.
5750if test "${with_fpectl+set}" = set; then
5751 withval="$with_fpectl"
5752
5753if test "$withval" != no
5754then cat >> confdefs.h <<\EOF
5755#define WANT_SIGFPE_HANDLER 1
5756EOF
5757 echo "$ac_t""yes" 1>&6
5758else echo "$ac_t""no" 1>&6
5759fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005760else
5761 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005762fi
5763
5764
Guido van Rossum7f43da71994-08-01 12:15:30 +00005765# check for --with-libm=...
5766
Guido van Rossum563e7081996-09-10 18:20:48 +00005767case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +00005768Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005769next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005770BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005771*) LIBM=-lm
5772esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005773echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005774echo "configure:5775: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005775# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005776if test "${with_libm+set}" = set; then
5777 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005778
Guido van Rossum7f253911997-05-09 02:42:48 +00005779if test "$withval" = no
5780then LIBM=
5781 echo "$ac_t""force LIBM empty" 1>&6
5782elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005783then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005784 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005785else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005786fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005787else
5788 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005789fi
5790
5791
5792# check for --with-libc=...
5793
Guido van Rossum7f253911997-05-09 02:42:48 +00005794echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005795echo "configure:5796: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005796# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005797if test "${with_libc+set}" = set; then
5798 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005799
Guido van Rossum7f253911997-05-09 02:42:48 +00005800if test "$withval" = no
5801then LIBC=
5802 echo "$ac_t""force LIBC empty" 1>&6
5803elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005804then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005805 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005806else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005807fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005808else
5809 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005810fi
5811
5812
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005813# check for hypot() in math library
5814LIBS_SAVE=$LIBS
5815LIBS="$LIBS $LIBM"
5816for ac_func in hypot
5817do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005818echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005819echo "configure:5820: checking for $ac_func" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005820if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005821 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005822else
5823 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005824#line 5825 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005825#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005826/* System header to define __stub macros and hopefully few prototypes,
5827 which can conflict with char $ac_func(); below. */
5828#include <assert.h>
5829/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005830/* We use char because int might match the return type of a gcc2
5831 builtin and then its argument prototype would still apply. */
5832char $ac_func();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005833
Guido van Rossumf78abae1997-01-21 22:02:36 +00005834int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005835
5836/* The GNU C library defines this for functions which it implements
5837 to always fail with ENOSYS. Some functions are actually named
5838 something starting with __ and the normal name is an alias. */
5839#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5840choke me
5841#else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005842$ac_func();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005843#endif
5844
5845; return 0; }
5846EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005847if { (eval echo configure:5848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005848 rm -rf conftest*
5849 eval "ac_cv_func_$ac_func=yes"
5850else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005851 echo "configure: failed program was:" >&5
5852 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005853 rm -rf conftest*
5854 eval "ac_cv_func_$ac_func=no"
5855fi
5856rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005857fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005858
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005859if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5860 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005861 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5862 cat >> confdefs.h <<EOF
5863#define $ac_tr_func 1
5864EOF
5865
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005866else
5867 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005868LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005869fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005870done
5871
Guido van Rossumf78abae1997-01-21 22:02:36 +00005872
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005873LIBS=$LIBS_SAVE
5874
Guido van Rossumad713701997-07-10 22:42:38 +00005875# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005876echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005877echo "configure:5878: checking what malloc(0) returns" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005878if eval "test \"`echo '$''{'ac_cv_malloc_zero'+set}'`\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005879 echo $ac_n "(cached) $ac_c" 1>&6
5880else
5881 if test "$cross_compiling" = yes; then
5882 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5883else
5884 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005885#line 5886 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005886#include "confdefs.h"
5887#include <stdio.h>
5888#ifdef HAVE_STDLIB
5889#include <stdlib.h>
5890#else
5891char *malloc(), *realloc();
5892int *free();
5893#endif
5894main() {
5895 char *p;
5896 p = malloc(0);
5897 if (p == NULL) exit(1);
5898 p = realloc(p, 0);
5899 if (p == NULL) exit(1);
5900 free(p);
5901 exit(0);
5902}
5903EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005904if { (eval echo configure:5905: \"$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 +00005905then
5906 ac_cv_malloc_zero=nonnull
5907else
5908 echo "configure: failed program was:" >&5
5909 cat conftest.$ac_ext >&5
5910 rm -fr conftest*
5911 ac_cv_malloc_zero=null
5912fi
5913rm -fr conftest*
5914fi
5915
5916fi
5917
5918echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5919if test "$ac_cv_malloc_zero" = null
5920then
5921 cat >> confdefs.h <<\EOF
5922#define MALLOC_ZERO_RETURNS_NULL 1
5923EOF
5924
5925fi
5926
Guido van Rossumef2255b2000-03-10 22:30:29 +00005927# check for wchar.h
5928ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5929echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005930echo "configure:5931: checking for wchar.h" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005931if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005932 echo $ac_n "(cached) $ac_c" 1>&6
5933else
5934 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005935#line 5936 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005936#include "confdefs.h"
5937#include <wchar.h>
5938EOF
5939ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Neil Schemenauer4e425612001-06-19 15:44:15 +00005940{ (eval echo configure:5941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005941ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5942if test -z "$ac_err"; then
5943 rm -rf conftest*
5944 eval "ac_cv_header_$ac_safe=yes"
5945else
5946 echo "$ac_err" >&5
5947 echo "configure: failed program was:" >&5
5948 cat conftest.$ac_ext >&5
5949 rm -rf conftest*
5950 eval "ac_cv_header_$ac_safe=no"
5951fi
5952rm -f conftest*
5953fi
5954if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5955 echo "$ac_t""yes" 1>&6
5956 cat >> confdefs.h <<\EOF
5957#define HAVE_WCHAR_H 1
5958EOF
5959 wchar_h="yes"
5960else
5961 echo "$ac_t""no" 1>&6
5962wchar_h="no"
5963
5964fi
5965
5966
5967# check for usable wchar_t
5968usable_wchar_t="unkown"
5969echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00005970echo "configure:5971: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005971if test "$cross_compiling" = yes; then
5972 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5973else
5974 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005975#line 5976 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005976#include "confdefs.h"
5977
5978#include "wchar.h"
5979#include "wctype.h"
5980main() {
5981 wchar_t s;
5982 if (sizeof(s) == 2)
5983 exit(0);
5984 else
5985 exit(1);
5986}
5987
5988EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00005989if { (eval echo configure:5990: \"$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 +00005990then
5991 cat >> confdefs.h <<\EOF
5992#define HAVE_USABLE_WCHAR_T 1
5993EOF
5994 usable_wchar_t="yes"
5995else
5996 echo "configure: failed program was:" >&5
5997 cat conftest.$ac_ext >&5
5998 rm -fr conftest*
5999 usable_wchar_t="no"
6000fi
6001rm -fr conftest*
6002fi
6003
6004echo "$ac_t""$usable_wchar_t" 1>&6
6005
6006# check for endianness
6007echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00006008echo "configure:6009: checking whether byte ordering is bigendian" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006009if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006010 echo $ac_n "(cached) $ac_c" 1>&6
6011else
6012 ac_cv_c_bigendian=unknown
6013# See if sys/param.h defines the BYTE_ORDER macro.
6014cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00006015#line 6016 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006016#include "confdefs.h"
6017#include <sys/types.h>
6018#include <sys/param.h>
6019int main() {
6020
6021#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
6022 bogus endian macros
6023#endif
6024; return 0; }
6025EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00006026if { (eval echo configure:6027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006027 rm -rf conftest*
6028 # It does; now see whether it defined to BIG_ENDIAN or not.
6029cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00006030#line 6031 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006031#include "confdefs.h"
6032#include <sys/types.h>
6033#include <sys/param.h>
6034int main() {
6035
6036#if BYTE_ORDER != BIG_ENDIAN
6037 not big endian
6038#endif
6039; return 0; }
6040EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00006041if { (eval echo configure:6042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00006042 rm -rf conftest*
6043 ac_cv_c_bigendian=yes
6044else
6045 echo "configure: failed program was:" >&5
6046 cat conftest.$ac_ext >&5
6047 rm -rf conftest*
6048 ac_cv_c_bigendian=no
6049fi
6050rm -f conftest*
6051else
6052 echo "configure: failed program was:" >&5
6053 cat conftest.$ac_ext >&5
6054fi
6055rm -f conftest*
6056if test $ac_cv_c_bigendian = unknown; then
6057if test "$cross_compiling" = yes; then
6058 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6059else
6060 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00006061#line 6062 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00006062#include "confdefs.h"
6063main () {
6064 /* Are we little or big endian? From Harbison&Steele. */
6065 union
6066 {
6067 long l;
6068 char c[sizeof (long)];
6069 } u;
6070 u.l = 1;
6071 exit (u.c[sizeof (long) - 1] == 1);
6072}
6073EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00006074if { (eval echo configure:6075: \"$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 +00006075then
6076 ac_cv_c_bigendian=no
6077else
6078 echo "configure: failed program was:" >&5
6079 cat conftest.$ac_ext >&5
6080 rm -fr conftest*
6081 ac_cv_c_bigendian=yes
6082fi
6083rm -fr conftest*
6084fi
6085
6086fi
6087fi
6088
6089echo "$ac_t""$ac_cv_c_bigendian" 1>&6
6090if test $ac_cv_c_bigendian = yes; then
6091 cat >> confdefs.h <<\EOF
6092#define WORDS_BIGENDIAN 1
6093EOF
6094
6095fi
6096
6097
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006098# Check whether right shifting a negative integer extends the sign bit
6099# or fills with zeros (like the Cray J90, according to Tim Peters).
6100echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00006101echo "configure:6102: checking whether right shift extends the sign bit" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006102if eval "test \"`echo '$''{'ac_cv_rshift_extends_sign'+set}'`\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00006103 echo $ac_n "(cached) $ac_c" 1>&6
6104else
6105
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006106if test "$cross_compiling" = yes; then
6107 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6108else
6109 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00006110#line 6111 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006111#include "confdefs.h"
6112
6113int main()
6114{
Vladimir Marangozova6180282000-07-12 05:05:06 +00006115 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006116}
6117
6118EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00006119if { (eval echo configure:6120: \"$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 +00006120then
6121 ac_cv_rshift_extends_sign=yes
6122else
6123 echo "configure: failed program was:" >&5
6124 cat conftest.$ac_ext >&5
6125 rm -fr conftest*
6126 ac_cv_rshift_extends_sign=no
6127fi
6128rm -fr conftest*
6129fi
6130
6131fi
6132
6133echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
6134if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006135then
6136 cat >> confdefs.h <<\EOF
6137#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
6138EOF
6139
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006140fi
6141
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006142# check for getc_unlocked and related locking functions
6143echo $ac_n "checking for getc_unlocked() and friends""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00006144echo "configure:6145: checking for getc_unlocked() and friends" >&5
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006145if eval "test \"`echo '$''{'ac_cv_have_getc_unlocked'+set}'`\" = set"; then
6146 echo $ac_n "(cached) $ac_c" 1>&6
6147else
6148
6149cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00006150#line 6151 "configure"
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006151#include "confdefs.h"
6152#include <stdio.h>
6153int main() {
6154
6155 FILE *f = fopen("/dev/null", "r");
6156 flockfile(f);
6157 getc_unlocked(f);
6158 funlockfile(f);
6159
6160; return 0; }
6161EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00006162if { (eval echo configure:6163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +00006163 rm -rf conftest*
6164 ac_cv_have_getc_unlocked=yes
6165else
6166 echo "configure: failed program was:" >&5
6167 cat conftest.$ac_ext >&5
6168 rm -rf conftest*
6169 ac_cv_have_getc_unlocked=no
6170fi
6171rm -f conftest*
6172fi
6173
6174echo "$ac_t""$ac_cv_have_getc_unlocked" 1>&6
6175if test "$ac_cv_have_getc_unlocked" = yes
6176then
6177 cat >> confdefs.h <<\EOF
6178#define HAVE_GETC_UNLOCKED 1
6179EOF
6180
6181fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +00006182
Guido van Rossum95713eb2000-05-18 20:53:31 +00006183# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
6184# Add sys/socket.h to confdefs.h
6185cat >> confdefs.h <<\EOF
6186#ifdef HAVE_SYS_SOCKET_H
6187#include <sys/socket.h>
6188#endif
6189EOF
6190echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00006191echo "configure:6192: checking for socklen_t" >&5
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006192if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00006193 echo $ac_n "(cached) $ac_c" 1>&6
6194else
6195 cat > conftest.$ac_ext <<EOF
Neil Schemenauer4e425612001-06-19 15:44:15 +00006196#line 6197 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00006197#include "confdefs.h"
6198#include <sys/types.h>
6199#if STDC_HEADERS
6200#include <stdlib.h>
6201#include <stddef.h>
6202#endif
6203EOF
6204if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6205 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
6206 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006207 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +00006208else
6209 rm -rf conftest*
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006210 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +00006211fi
6212rm -f conftest*
6213
6214fi
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006215echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
6216if test $ac_cv_type_socklen_t = no; then
6217 cat >> confdefs.h <<\EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00006218#define socklen_t int
6219EOF
6220
6221fi
6222
6223
Neil Schemenauerf25cf6c2001-03-04 06:39:33 +00006224# Add Python/ prefix to LIBOBJS
6225libobjs=$LIBOBJS
6226LIBOBJS=
6227for obj in $libobjs; do
6228 LIBOBJS="$LIBOBJS Python/$obj"
6229done
6230
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006231#AC_MSG_CHECKING(for Modules/Setup)
6232#if test ! -f Modules/Setup ; then
6233# if test ! -d Modules ; then
6234# mkdir Modules
6235# fi
6236# cp "$srcdir/Modules/Setup.dist" Modules/Setup
6237# AC_MSG_RESULT(creating)
6238#else
6239# AC_MSG_RESULT(already exists)
6240#fi
6241
6242
Neil Schemenaueracbf9ef2001-02-27 02:15:14 +00006243SRCDIRS="Parser Grammar Objects Python Modules"
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00006244echo $ac_n "checking for build directories""... $ac_c" 1>&6
Neil Schemenauer4e425612001-06-19 15:44:15 +00006245echo "configure:6246: checking for build directories" >&5
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006246for dir in $SRCDIRS; do
6247 if test ! -d $dir; then
6248 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +00006249 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006250done
6251echo "$ac_t""done" 1>&6
Fred Drake036144d2000-10-26 17:09:35 +00006252
Guido van Rossum627b2d71993-12-24 10:39:16 +00006253# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006254trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006255cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006256# This file is a shell script that caches the results of configure
6257# tests run on this system so they can be shared between configure
6258# scripts and configure runs. It is not useful on other systems.
6259# If it contains results you don't want to keep, you may remove or edit it.
6260#
6261# By default, configure uses ./config.cache as the cache file,
6262# creating it if it does not exist already. You can give configure
6263# the --cache-file=FILE option to use a different cache file; that is
6264# what configure does when it calls configure scripts in
6265# subdirectories, so they share the cache.
6266# Giving --cache-file=/dev/null disables caching, for debugging configure.
6267# config.status only pays attention to the cache file if you give it the
6268# --recheck option to rerun configure.
6269#
6270EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006271# The following way of writing the cache mishandles newlines in values,
6272# but we know of no workaround that is simple, portable, and efficient.
6273# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006274# Ultrix sh set writes to stderr and can't be redirected directly,
6275# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006276(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006277 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006278 *ac_space=\ *)
6279 # `set' does not quote correctly, so add quotes (double-quote substitution
6280 # turns \\\\ into \\, and sed turns \\ into \).
6281 sed -n \
6282 -e "s/'/'\\\\''/g" \
6283 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6284 ;;
6285 *)
6286 # `set' quotes correctly as required by POSIX, so do not add quotes.
6287 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6288 ;;
6289 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006290if cmp -s $cache_file confcache; then
6291 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006292else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006293 if test -w $cache_file; then
6294 echo "updating cache $cache_file"
6295 cat confcache > $cache_file
6296 else
6297 echo "not updating unwritable cache $cache_file"
6298 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006299fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006300rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00006301
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006302trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006303
6304test "x$prefix" = xNONE && prefix=$ac_default_prefix
6305# Let make expand exec_prefix.
6306test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00006307
Guido van Rossum7f43da71994-08-01 12:15:30 +00006308# Any assignment to VPATH causes Sun make to only execute
6309# the first set of double-colon rules, so remove it if not needed.
6310# If there is a colon in the path, we need to keep it.
6311if test "x$srcdir" = x.; then
6312 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6313fi
6314
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006315trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00006316
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006317DEFS=-DHAVE_CONFIG_H
6318
6319# Without the "./", some shells look in PATH for config.status.
6320: ${CONFIG_STATUS=./config.status}
6321
6322echo creating $CONFIG_STATUS
6323rm -f $CONFIG_STATUS
6324cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006325#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00006326# Generated automatically by configure.
6327# Run this file to recreate the current configuration.
6328# This directory was configured as follows,
6329# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6330#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006331# $0 $ac_configure_args
6332#
6333# Compiler output produced by configure, useful for debugging
6334# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00006335
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006336ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006337for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00006338do
Guido van Rossum7f43da71994-08-01 12:15:30 +00006339 case "\$ac_option" in
6340 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006341 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
6342 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00006343 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006344 echo "$CONFIG_STATUS generated by autoconf version 2.13"
Guido van Rossum7f43da71994-08-01 12:15:30 +00006345 exit 0 ;;
6346 -help | --help | --hel | --he | --h)
6347 echo "\$ac_cs_usage"; exit 0 ;;
6348 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00006349 esac
6350done
6351
Guido van Rossum7f43da71994-08-01 12:15:30 +00006352ac_given_srcdir=$srcdir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006353ac_given_INSTALL="$INSTALL"
Guido van Rossum627b2d71993-12-24 10:39:16 +00006354
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00006355trap 'rm -fr `echo "Makefile.pre Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006356EOF
6357cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006358
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006359# Protect against being on the right side of a sed subst in config.status.
6360sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
6361 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006362$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00006363$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006364s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006365s%@CFLAGS@%$CFLAGS%g
6366s%@CPPFLAGS@%$CPPFLAGS%g
6367s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00006368s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006369s%@DEFS@%$DEFS%g
6370s%@LDFLAGS@%$LDFLAGS%g
6371s%@LIBS@%$LIBS%g
6372s%@exec_prefix@%$exec_prefix%g
6373s%@prefix@%$prefix%g
6374s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006375s%@bindir@%$bindir%g
6376s%@sbindir@%$sbindir%g
6377s%@libexecdir@%$libexecdir%g
6378s%@datadir@%$datadir%g
6379s%@sysconfdir@%$sysconfdir%g
6380s%@sharedstatedir@%$sharedstatedir%g
6381s%@localstatedir@%$localstatedir%g
6382s%@libdir@%$libdir%g
6383s%@includedir@%$includedir%g
6384s%@oldincludedir@%$oldincludedir%g
6385s%@infodir@%$infodir%g
6386s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006387s%@VERSION@%$VERSION%g
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00006388s%@CONFIG_ARGS@%$CONFIG_ARGS%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006389s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006390s%@SGI_ABI@%$SGI_ABI%g
Martin v. Löwis22352952000-12-13 17:37:02 +00006391s%@CXX@%$CXX%g
Guido van Rossumca563f22001-01-23 01:52:44 +00006392s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006393s%@CC@%$CC%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006394s%@EXEEXT@%$EXEEXT%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00006395s%@LIBRARY@%$LIBRARY%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006396s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossumca563f22001-01-23 01:52:44 +00006397s%@DLLLIBRARY@%$DLLLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006398s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006399s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006400s%@AR@%$AR%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006401s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006402s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006403s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006404s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006405s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006406s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006407s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006408s%@SO@%$SO%g
6409s%@LDSHARED@%$LDSHARED%g
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00006410s%@BLDSHARED@%$BLDSHARED%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006411s%@CCSHARED@%$CCSHARED%g
6412s%@LINKFORSHARED@%$LINKFORSHARED%g
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00006413s%@CFLAGSFORSHARED@%$CFLAGSFORSHARED%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006414s%@USE_SIGNAL_MODULE@%$USE_SIGNAL_MODULE%g
6415s%@SIGNAL_OBJS@%$SIGNAL_OBJS%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006416s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006417s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006418s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006419s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006420s%@DYNLOADFILE@%$DYNLOADFILE%g
Neil Schemenauer4e425612001-06-19 15:44:15 +00006421s%@MACHDEP_OBJS@%$MACHDEP_OBJS%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006422s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006423s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6424s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6425s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006426s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006427s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006428s%@LIBM@%$LIBM%g
6429s%@LIBC@%$LIBC%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006430s%@SRCDIRS@%$SRCDIRS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006431
6432CEOF
6433EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006434
6435cat >> $CONFIG_STATUS <<\EOF
6436
6437# Split the substitutions into bite-sized pieces for seds with
6438# small command number limits, like on Digital OSF/1 and HP-UX.
6439ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6440ac_file=1 # Number of current file.
6441ac_beg=1 # First line for current file.
6442ac_end=$ac_max_sed_cmds # Line after last line for current file.
6443ac_more_lines=:
6444ac_sed_cmds=""
6445while $ac_more_lines; do
6446 if test $ac_beg -gt 1; then
6447 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6448 else
6449 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6450 fi
6451 if test ! -s conftest.s$ac_file; then
6452 ac_more_lines=false
6453 rm -f conftest.s$ac_file
6454 else
6455 if test -z "$ac_sed_cmds"; then
6456 ac_sed_cmds="sed -f conftest.s$ac_file"
6457 else
6458 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6459 fi
6460 ac_file=`expr $ac_file + 1`
6461 ac_beg=$ac_end
6462 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6463 fi
6464done
6465if test -z "$ac_sed_cmds"; then
6466 ac_sed_cmds=cat
6467fi
6468EOF
6469
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006470cat >> $CONFIG_STATUS <<EOF
6471
Andrew M. Kuchling8abedde2001-01-26 22:55:24 +00006472CONFIG_FILES=\${CONFIG_FILES-"Makefile.pre Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006473EOF
6474cat >> $CONFIG_STATUS <<\EOF
6475for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006476 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006477 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006478 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006479 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6480 *) ac_file_in="${ac_file}.in" ;;
6481 esac
6482
Guido van Rossumf78abae1997-01-21 22:02:36 +00006483 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006484
6485 # Remove last slash and all that follows it. Not all systems have dirname.
6486 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6487 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6488 # The file is in a subdirectory.
6489 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006490 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006491 # A "../" for each directory in $ac_dir_suffix.
6492 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6493 else
6494 ac_dir_suffix= ac_dots=
6495 fi
6496
6497 case "$ac_given_srcdir" in
6498 .) srcdir=.
6499 if test -z "$ac_dots"; then top_srcdir=.
6500 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6501 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6502 *) # Relative path.
6503 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6504 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6505 esac
6506
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006507 case "$ac_given_INSTALL" in
6508 [/$]*) INSTALL="$ac_given_INSTALL" ;;
6509 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
6510 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006511
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006512 echo creating "$ac_file"
6513 rm -f "$ac_file"
6514 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6515 case "$ac_file" in
6516 *Makefile*) ac_comsub="1i\\
6517# $configure_input" ;;
6518 *) ac_comsub= ;;
6519 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006520
6521 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 +00006522 sed -e "$ac_comsub
6523s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006524s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006525s%@top_srcdir@%$top_srcdir%g
Neil Schemenauerd32c2492001-01-24 17:25:28 +00006526s%@INSTALL@%$INSTALL%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006527" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006528fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006529rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006530
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006531# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6532# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006533#
6534# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006535ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6536ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006537ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006538ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006539# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006540ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6541ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006542ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006543ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006544# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006545ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6546ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006547ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006548ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006549
Guido van Rossumf78abae1997-01-21 22:02:36 +00006550if test "${CONFIG_HEADERS+set}" != set; then
6551EOF
6552cat >> $CONFIG_STATUS <<EOF
6553 CONFIG_HEADERS="config.h"
6554EOF
6555cat >> $CONFIG_STATUS <<\EOF
6556fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006557for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006558 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006559 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006560 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006561 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6562 *) ac_file_in="${ac_file}.in" ;;
6563 esac
6564
Guido van Rossum7f43da71994-08-01 12:15:30 +00006565 echo creating $ac_file
6566
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006567 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006568 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6569 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006570
6571EOF
6572
6573# Transform confdefs.h into a sed script conftest.vals that substitutes
6574# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006575# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006576# Protect against being in an unquoted here document in config.status.
6577rm -f conftest.vals
6578cat > conftest.hdr <<\EOF
6579s/[\\&%]/\\&/g
6580s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006581s%#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 +00006582s%ac_d%ac_u%gp
6583s%ac_u%ac_e%gp
6584EOF
6585sed -n -f conftest.hdr confdefs.h > conftest.vals
6586rm -f conftest.hdr
6587
6588# This sed command replaces #undef with comments. This is necessary, for
6589# example, in the case of _POSIX_SOURCE, which is predefined and required
6590# on some systems where configure will not decide to define it.
6591cat >> conftest.vals <<\EOF
6592s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6593EOF
6594
6595# Break up conftest.vals because some shells have a limit on
6596# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006597
6598rm -f conftest.tail
6599while :
6600do
6601 ac_lines=`grep -c . conftest.vals`
6602 # grep -c gives empty output for an empty file on some AIX systems.
6603 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6604 # Write a limited-size here document to conftest.frag.
6605 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6606 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6607 echo 'CEOF
6608 sed -f conftest.frag conftest.in > conftest.out
6609 rm -f conftest.in
6610 mv conftest.out conftest.in
6611' >> $CONFIG_STATUS
6612 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6613 rm -f conftest.vals
6614 mv conftest.tail conftest.vals
6615done
6616rm -f conftest.vals
6617
6618cat >> $CONFIG_STATUS <<\EOF
6619 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006620 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006621 cat conftest.in >> conftest.h
6622 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006623 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006624 echo "$ac_file is unchanged"
6625 rm -f conftest.h
6626 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006627 # Remove last slash and all that follows it. Not all systems have dirname.
6628 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6629 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6630 # The file is in a subdirectory.
6631 test ! -d "$ac_dir" && mkdir "$ac_dir"
6632 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006633 rm -f $ac_file
6634 mv conftest.h $ac_file
6635 fi
6636fi; done
6637
Guido van Rossumf78abae1997-01-21 22:02:36 +00006638EOF
6639cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006640
Guido van Rossumf78abae1997-01-21 22:02:36 +00006641EOF
6642cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006643
6644exit 0
6645EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006646chmod +x $CONFIG_STATUS
6647rm -fr confdefs* $ac_clean_files
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006648test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006649
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00006650
6651echo "creating Setup"
6652if test ! -f Modules/Setup
6653then
6654 cp $srcdir/Modules/Setup.dist Modules/Setup
6655fi
6656
6657echo "creating Setup.local"
6658if test ! -f Modules/Setup.local
6659then
6660 echo "# Edit this file for local setup changes" >Modules/Setup.local
6661fi
6662
6663echo "creating Makefile"
6664$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
6665 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +00006666 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +00006667mv config.c Modules