blob: c211b3458e8702f586a0242fc52e0e4038e9a9bf [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002
Guido van Rossum0286ae82000-08-29 15:06:49 +00003# From configure.in Revision: 1.150
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.
Skip Montanarocb853262000-08-30 22:29:48 +00006# Generated automatically using autoconf version 2.14.1
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
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000019 --with-next-framework Build (OpenStep|Rhapsody|MacOSX) framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000020ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000021 --with-dyld Use (OpenStep|Rhapsody|MacOSX) 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
Skip Montanarocb853262000-08-30 22:29:48 +000027 --with-pydebug build with Py_DEBUG defined"
28ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000029 --with-libs='lib1 ...' link against additional libs"
Guido van Rossuma68acba1996-07-31 17:36:39 +000030ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000031 --with(out)-readline obsolete, edit Modules/Setup instead"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000032ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000033 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries"
Guido van Rossumec2f0731997-01-22 20:54:01 +000034ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000035 --with(out)-threads[=DIRECTORY] disable/enable thread support"
Guido van Rossumec2f0731997-01-22 20:54:01 +000036ac_help="$ac_help
Barry Warsawa0f3c5c2000-06-30 16:39:35 +000037 --with(out)-thread[=DIRECTORY] deprecated; use --with(out)-threads"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000038ac_help="$ac_help
Barry Warsawef82cd72000-06-30 16:21:01 +000039 --with(out)-cycle-gc disable/enable garbage collection"
40ac_help="$ac_help
41 --with-wctype-functions use wctype.h functions"
42ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000043 --with-sgi-dl=DIRECTORY IRIX 4 dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000044ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000045 --with-dl-dld=DL_DIR,DLD_DIR GNU dynamic linking"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000046ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000047 --with-fpectl enable SIGFPE catching"
Guido van Rossum7f253911997-05-09 02:42:48 +000048ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000049 --with-libm=STRING math library"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000050ac_help="$ac_help
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000051 --with-libc=STRING C library"
Guido van Rossum627b2d71993-12-24 10:39:16 +000052
Guido van Rossum7f43da71994-08-01 12:15:30 +000053# Initialize some variables set by options.
54# The variables have the same names as the options, with
55# dashes changed to underlines.
56build=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000057cache_file=./config.cache
58exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +000059host=NONE
60no_create=
61nonopt=NONE
Guido van Rossum76be6ed1995-01-02 18:33:54 +000062no_recursion=
63prefix=NONE
64program_prefix=NONE
65program_suffix=NONE
66program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +000067silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000068site=
Guido van Rossum7f43da71994-08-01 12:15:30 +000069srcdir=
70target=NONE
71verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +000072x_includes=NONE
73x_libraries=NONE
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000074bindir='${exec_prefix}/bin'
75sbindir='${exec_prefix}/sbin'
76libexecdir='${exec_prefix}/libexec'
77datadir='${prefix}/share'
78sysconfdir='${prefix}/etc'
79sharedstatedir='${prefix}/com'
80localstatedir='${prefix}/var'
81libdir='${exec_prefix}/lib'
82includedir='${prefix}/include'
83oldincludedir='/usr/include'
84infodir='${prefix}/info'
85mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000086
87# Initialize some other variables.
88subdirs=
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000089MFLAGS= MAKEFLAGS=
Guido van Rossume6c2cf11999-01-08 21:08:33 +000090SHELL=${CONFIG_SHELL-/bin/sh}
Guido van Rossumf78abae1997-01-21 22:02:36 +000091# Maximum number of lines to put in a shell here document.
92ac_max_here_lines=12
Guido van Rossum7f43da71994-08-01 12:15:30 +000093
94ac_prev=
95for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000096do
Guido van Rossum627b2d71993-12-24 10:39:16 +000097
Guido van Rossum7f43da71994-08-01 12:15:30 +000098 # If the previous option needs an argument, assign it.
99 if test -n "$ac_prev"; then
100 eval "$ac_prev=\$ac_option"
101 ac_prev=
102 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000103 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000104
Guido van Rossum7f43da71994-08-01 12:15:30 +0000105 case "$ac_option" in
106 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
107 *) ac_optarg= ;;
108 esac
109
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000110 # Accept the important Cygnus configure options, so we can diagnose typos.
111
Guido van Rossum7f43da71994-08-01 12:15:30 +0000112 case "$ac_option" in
113
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000114 -bindir | --bindir | --bindi | --bind | --bin | --bi)
115 ac_prev=bindir ;;
116 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
117 bindir="$ac_optarg" ;;
118
119 -build | --build | --buil | --bui | --bu)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000120 ac_prev=build ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000121 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000122 build="$ac_optarg" ;;
123
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000124 -cache-file | --cache-file | --cache-fil | --cache-fi \
125 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
126 ac_prev=cache_file ;;
127 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
128 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
129 cache_file="$ac_optarg" ;;
130
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000131 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
132 ac_prev=datadir ;;
133 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
134 | --da=*)
135 datadir="$ac_optarg" ;;
136
Guido van Rossum7f43da71994-08-01 12:15:30 +0000137 -disable-* | --disable-*)
138 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000139 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000140 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000141 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000142 fi
143 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
144 eval "enable_${ac_feature}=no" ;;
145
146 -enable-* | --enable-*)
147 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000148 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000149 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000150 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000151 fi
152 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
153 case "$ac_option" in
154 *=*) ;;
155 *) ac_optarg=yes ;;
156 esac
157 eval "enable_${ac_feature}='$ac_optarg'" ;;
158
Guido van Rossum7f43da71994-08-01 12:15:30 +0000159 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
160 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
161 | --exec | --exe | --ex)
162 ac_prev=exec_prefix ;;
163 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
164 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
165 | --exec=* | --exe=* | --ex=*)
166 exec_prefix="$ac_optarg" ;;
167
168 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000169 # Obsolete; use --with-gas.
170 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000171
172 -help | --help | --hel | --he)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000173 # Omit some internal or obsolete options to make the list less imposing.
174 # This message is too long to be a string in the A/UX 3.1 sh.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000175 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000176Usage: configure [options] [host]
177Options: [defaults in brackets after descriptions]
178Configuration:
179 --cache-file=FILE cache test results in FILE
180 --help print this message
181 --no-create do not create output files
182 --quiet, --silent do not print \`checking...' messages
183 --version print the version of autoconf that created configure
184Directory and file names:
185 --prefix=PREFIX install architecture-independent files in PREFIX
186 [$ac_default_prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000187 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000188 [same as prefix]
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000189 --bindir=DIR user executables in DIR [EPREFIX/bin]
190 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
191 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
192 --datadir=DIR read-only architecture-independent data in DIR
193 [PREFIX/share]
194 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
195 --sharedstatedir=DIR modifiable architecture-independent data in DIR
196 [PREFIX/com]
197 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
198 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
199 --includedir=DIR C header files in DIR [PREFIX/include]
200 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
201 --infodir=DIR info documentation in DIR [PREFIX/info]
202 --mandir=DIR man documentation in DIR [PREFIX/man]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000203 --srcdir=DIR find the sources in DIR [configure dir or ..]
204 --program-prefix=PREFIX prepend PREFIX to installed program names
205 --program-suffix=SUFFIX append SUFFIX to installed program names
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000206 --program-transform-name=PROGRAM
207 run sed PROGRAM on installed program names
208EOF
209 cat << EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000210Host type:
211 --build=BUILD configure for building on BUILD [BUILD=HOST]
212 --host=HOST configure for HOST [guessed]
213 --target=TARGET configure for TARGET [TARGET=HOST]
214Features and packages:
215 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
216 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
217 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
218 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
219 --x-includes=DIR X include files are in DIR
220 --x-libraries=DIR X library files are in DIR
Guido van Rossum7f43da71994-08-01 12:15:30 +0000221EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000222 if test -n "$ac_help"; then
223 echo "--enable and --with options recognized:$ac_help"
224 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000225 exit 0 ;;
226
227 -host | --host | --hos | --ho)
228 ac_prev=host ;;
229 -host=* | --host=* | --hos=* | --ho=*)
230 host="$ac_optarg" ;;
231
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000232 -includedir | --includedir | --includedi | --included | --include \
233 | --includ | --inclu | --incl | --inc)
234 ac_prev=includedir ;;
235 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
236 | --includ=* | --inclu=* | --incl=* | --inc=*)
237 includedir="$ac_optarg" ;;
238
239 -infodir | --infodir | --infodi | --infod | --info | --inf)
240 ac_prev=infodir ;;
241 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
242 infodir="$ac_optarg" ;;
243
244 -libdir | --libdir | --libdi | --libd)
245 ac_prev=libdir ;;
246 -libdir=* | --libdir=* | --libdi=* | --libd=*)
247 libdir="$ac_optarg" ;;
248
249 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
250 | --libexe | --libex | --libe)
251 ac_prev=libexecdir ;;
252 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
253 | --libexe=* | --libex=* | --libe=*)
254 libexecdir="$ac_optarg" ;;
255
256 -localstatedir | --localstatedir | --localstatedi | --localstated \
257 | --localstate | --localstat | --localsta | --localst \
258 | --locals | --local | --loca | --loc | --lo)
259 ac_prev=localstatedir ;;
260 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
261 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
262 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
263 localstatedir="$ac_optarg" ;;
264
265 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
266 ac_prev=mandir ;;
267 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
268 mandir="$ac_optarg" ;;
269
Guido van Rossum7f43da71994-08-01 12:15:30 +0000270 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000271 # Obsolete; use --without-fp.
272 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000273
274 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
275 | --no-cr | --no-c)
276 no_create=yes ;;
277
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000278 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
279 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
280 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000281
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000282 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
283 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
284 | --oldin | --oldi | --old | --ol | --o)
285 ac_prev=oldincludedir ;;
286 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
287 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
288 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
289 oldincludedir="$ac_optarg" ;;
290
Guido van Rossum7f43da71994-08-01 12:15:30 +0000291 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
292 ac_prev=prefix ;;
293 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
294 prefix="$ac_optarg" ;;
295
296 -program-prefix | --program-prefix | --program-prefi | --program-pref \
297 | --program-pre | --program-pr | --program-p)
298 ac_prev=program_prefix ;;
299 -program-prefix=* | --program-prefix=* | --program-prefi=* \
300 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
301 program_prefix="$ac_optarg" ;;
302
303 -program-suffix | --program-suffix | --program-suffi | --program-suff \
304 | --program-suf | --program-su | --program-s)
305 ac_prev=program_suffix ;;
306 -program-suffix=* | --program-suffix=* | --program-suffi=* \
307 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
308 program_suffix="$ac_optarg" ;;
309
310 -program-transform-name | --program-transform-name \
311 | --program-transform-nam | --program-transform-na \
312 | --program-transform-n | --program-transform- \
313 | --program-transform | --program-transfor \
314 | --program-transfo | --program-transf \
315 | --program-trans | --program-tran \
316 | --progr-tra | --program-tr | --program-t)
317 ac_prev=program_transform_name ;;
318 -program-transform-name=* | --program-transform-name=* \
319 | --program-transform-nam=* | --program-transform-na=* \
320 | --program-transform-n=* | --program-transform-=* \
321 | --program-transform=* | --program-transfor=* \
322 | --program-transfo=* | --program-transf=* \
323 | --program-trans=* | --program-tran=* \
324 | --progr-tra=* | --program-tr=* | --program-t=*)
325 program_transform_name="$ac_optarg" ;;
326
327 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
328 | -silent | --silent | --silen | --sile | --sil)
329 silent=yes ;;
330
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000331 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
332 ac_prev=sbindir ;;
333 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
334 | --sbi=* | --sb=*)
335 sbindir="$ac_optarg" ;;
336
337 -sharedstatedir | --sharedstatedir | --sharedstatedi \
338 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
339 | --sharedst | --shareds | --shared | --share | --shar \
340 | --sha | --sh)
341 ac_prev=sharedstatedir ;;
342 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
343 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
344 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
345 | --sha=* | --sh=*)
346 sharedstatedir="$ac_optarg" ;;
347
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000348 -site | --site | --sit)
349 ac_prev=site ;;
350 -site=* | --site=* | --sit=*)
351 site="$ac_optarg" ;;
352
Guido van Rossum7f43da71994-08-01 12:15:30 +0000353 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
354 ac_prev=srcdir ;;
355 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
356 srcdir="$ac_optarg" ;;
357
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000358 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
359 | --syscon | --sysco | --sysc | --sys | --sy)
360 ac_prev=sysconfdir ;;
361 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
362 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
363 sysconfdir="$ac_optarg" ;;
364
Guido van Rossum7f43da71994-08-01 12:15:30 +0000365 -target | --target | --targe | --targ | --tar | --ta | --t)
366 ac_prev=target ;;
367 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
368 target="$ac_optarg" ;;
369
370 -v | -verbose | --verbose | --verbos | --verbo | --verb)
371 verbose=yes ;;
372
373 -version | --version | --versio | --versi | --vers)
Skip Montanarocb853262000-08-30 22:29:48 +0000374 echo "configure generated by autoconf version 2.14.1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000375 exit 0 ;;
376
377 -with-* | --with-*)
378 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000379 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000380 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000381 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000382 fi
383 ac_package=`echo $ac_package| sed 's/-/_/g'`
384 case "$ac_option" in
385 *=*) ;;
386 *) ac_optarg=yes ;;
387 esac
388 eval "with_${ac_package}='$ac_optarg'" ;;
389
390 -without-* | --without-*)
391 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000392 # Reject names that are not valid shell variable names.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000393 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000394 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000395 fi
396 ac_package=`echo $ac_package| sed 's/-/_/g'`
397 eval "with_${ac_package}=no" ;;
398
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000399 --x)
400 # Obsolete; use --with-x.
401 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000402
403 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
404 | --x-incl | --x-inc | --x-in | --x-i)
405 ac_prev=x_includes ;;
406 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
407 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
408 x_includes="$ac_optarg" ;;
409
410 -x-libraries | --x-libraries | --x-librarie | --x-librari \
411 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
412 ac_prev=x_libraries ;;
413 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
414 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
415 x_libraries="$ac_optarg" ;;
416
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000417 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000418 ;;
419
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000420 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000421 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000422 echo "configure: warning: $ac_option: invalid host type" 1>&2
Guido van Rossum7f43da71994-08-01 12:15:30 +0000423 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000424 if test "x$nonopt" != xNONE; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000425 { 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 +0000426 fi
427 nonopt="$ac_option"
428 ;;
429
430 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000431done
432
Guido van Rossum7f43da71994-08-01 12:15:30 +0000433if test -n "$ac_prev"; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000434 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000435fi
436
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000437trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum7f43da71994-08-01 12:15:30 +0000438
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000439# File descriptor usage:
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000440# 0 standard input
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000441# 1 file creation
442# 2 errors and warnings
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000443# 3 some systems may open it to /dev/tty
444# 4 used on the Kubota Titan
445# 6 checking for... messages and results
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000446# 5 compiler messages saved in config.log
447if test "$silent" = yes; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000448 exec 6>/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000449else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000450 exec 6>&1
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000451fi
452exec 5>./config.log
453
454echo "\
455This file contains any messages produced by compilers while
456running configure, to aid debugging if configure makes a mistake.
457" 1>&5
458
459# Strip out --no-create and --no-recursion so they do not pile up.
460# Also quote any args containing shell metacharacters.
461ac_configure_args=
462for ac_arg
463do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000464 case "$ac_arg" in
465 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
466 | --no-cr | --no-c) ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000467 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
468 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
469 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
470 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
471 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000472 esac
473done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000474
475# NLS nuisances.
Guido van Rossumf78abae1997-01-21 22:02:36 +0000476# Only set these to C if already set. These must not be set unconditionally
477# because not all systems understand e.g. LANG=C (notably SCO).
478# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
479# Non-C LC_CTYPE values break the ctype check.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000480if test "${LANG+set}" = set; then LANG=C; export LANG; fi
Guido van Rossumf78abae1997-01-21 22:02:36 +0000481if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
482if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
483if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000484
Guido van Rossum7f43da71994-08-01 12:15:30 +0000485# confdefs.h avoids OS command line length limits that DEFS can exceed.
486rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000487# AIX cpp loses on an empty file, so make sure it contains at least a newline.
488echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000489
490# A filename unique to this package, relative to the directory that
491# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000492ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000493
494# Find the source files, if location was not specified.
495if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000496 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000497 # Try the directory containing this script, then its parent.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498 ac_prog=$0
499 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
500 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
501 srcdir=$ac_confdir
502 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000503 srcdir=..
504 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000505else
506 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000507fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000508if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000509 if test "$ac_srcdir_defaulted" = yes; then
510 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000511 else
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000512 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000513 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000514fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000515srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
516
517# Prefer explicitly selected file to automatically selected ones.
518if test -z "$CONFIG_SITE"; then
519 if test "x$prefix" != xNONE; then
520 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
521 else
522 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
523 fi
524fi
525for ac_site_file in $CONFIG_SITE; do
526 if test -r "$ac_site_file"; then
527 echo "loading site script $ac_site_file"
528 . "$ac_site_file"
529 fi
530done
531
532if test -r "$cache_file"; then
533 echo "loading cache $cache_file"
Skip Montanarocb853262000-08-30 22:29:48 +0000534 test -f "$cache_file" && . $cache_file
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000535else
536 echo "creating cache $cache_file"
537 > $cache_file
538fi
539
Guido van Rossum7f43da71994-08-01 12:15:30 +0000540ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000541# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000542ac_cpp='$CPP $CPPFLAGS'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000543ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000544ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000545cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000546
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000547ac_exeext=
548ac_objext=o
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000549if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
550 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
551 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
552 ac_n= ac_c='
553' ac_t=' '
554 else
555 ac_n=-n ac_c= ac_t=
556 fi
557else
558 ac_n= ac_c='\c' ac_t=
559fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000560
Guido van Rossum0a516c91994-09-12 10:58:40 +0000561
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000562
Guido van Rossum627b2d71993-12-24 10:39:16 +0000563
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000564# Set VERSION so we only need to edit in one place (i.e., here)
565
Guido van Rossumb9a22a12000-06-30 02:48:53 +0000566VERSION=2.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +0000567
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000568# NEXTSTEP stuff
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000569if test -f /usr/lib/NextStep/software_version -o -f /System/Library/CoreServices/software_version ; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000570
571 echo $ac_n "checking for --with-next-archs""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +0000572echo "configure:573: checking for --with-next-archs" >&5
Guido van Rossum563e7081996-09-10 18:20:48 +0000573 # Check whether --with-next-archs or --without-next-archs was given.
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000574if test "${with_next_archs+set}" = set; then
575 withval="$with_next_archs"
576
Guido van Rossum563e7081996-09-10 18:20:48 +0000577 if test -n "$withval"; then
578 ac_arch_flags=`/usr/lib/arch_tool -archify_list $withval`
579 # GCC does not currently support multi archs on the NeXT
580 with_gcc=no
581 fi
582 echo "$ac_t""$with_next_archs" 1>&6
583
584else
585 echo "$ac_t""none: using `arch`" 1>&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000586fi
587
Guido van Rossum563e7081996-09-10 18:20:48 +0000588
589 if test -z "$MACHDEP"
590 then
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000591 set X `hostinfo | egrep '(NeXT Mach|Kernel Release).*:' | \
Guido van Rossum563e7081996-09-10 18:20:48 +0000592 sed -e 's/://' -e 's/\./_/'` && \
593 ac_sys_system=next && ac_sys_release=$4
594
Guido van Rossumb97ef171997-09-28 05:44:03 +0000595 MACHDEP="$ac_sys_system$ac_sys_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000596 fi
597fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000598
Guido van Rossum54ecc3d1999-01-27 17:53:11 +0000599# Check whether --with-next-framework or --without-next-framework was given.
600if test "${with_next_framework+set}" = set; then
601 withval="$with_next_framework"
602 :
603fi
604
605# Check whether --with-dyld or --without-dyld was given.
606if test "${with_dyld+set}" = set; then
607 withval="$with_dyld"
608 :
609fi
610
Guido van Rossum91922671997-10-09 20:24:13 +0000611
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000612# Set name for machine-dependent library files
613
614echo $ac_n "checking MACHDEP""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +0000615echo "configure:616: checking MACHDEP" >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000616if test -z "$MACHDEP"
617then
Guido van Rossum563e7081996-09-10 18:20:48 +0000618 ac_sys_system=`uname -s`
Trent Mick635f6fb2000-08-23 21:33:05 +0000619 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64"; then
Guido van Rossum563e7081996-09-10 18:20:48 +0000620 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000621 else
Guido van Rossum563e7081996-09-10 18:20:48 +0000622 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000623 fi
Guido van Rossum563e7081996-09-10 18:20:48 +0000624 ac_md_system=`echo $ac_sys_system |
625 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
626 ac_md_release=`echo $ac_sys_release |
627 tr -d '/ ' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +0000628 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +0000629
Guido van Rossum07397971997-04-29 21:49:50 +0000630 case $MACHDEP in
Guido van Rossumb97ef171997-09-28 05:44:03 +0000631 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000632 esac
633fi
Guido van Rossum91922671997-10-09 20:24:13 +0000634
635#
636# SGI compilers allow the specification of the both the ABI and the
637# ISA on the command line. Depending on the values of these switches,
638# different and often incompatable code will be generated.
639#
640# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
641# thus supply support for various ABI/ISA combinations. The MACHDEP
642# variable is also adjusted.
643#
644
645if test ! -z "$SGI_ABI"
646then
647 CC="cc $SGI_ABI"
648 LDFLAGS="$SGI_ABI $LDFLAGS"
649 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
650fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000651echo "$ac_t""$MACHDEP" 1>&6
652
Guido van Rossum91922671997-10-09 20:24:13 +0000653#
654# CCC is the command that compiles C++ programs
655#
656# Not all make programs have this predefined.
657#
Guido van Rossum95012191999-12-16 17:50:52 +0000658#AC_SUBST(SET_CCC)
659#AC_MSG_CHECKING(CCC)
660#if test -z "$CCC"
661#then
662# case $ac_sys_system in
663# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
664# Linux*) SET_CCC="CCC= g++";;
665# *) SET_CCC=""
666# esac
667#else
668# SET_CCC="CCC= ${CCC}"
669#fi
670#AC_MSG_RESULT($SET_CCC)
Guido van Rossum91922671997-10-09 20:24:13 +0000671
672
Guido van Rossum627b2d71993-12-24 10:39:16 +0000673# checks for alternative programs
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000674echo $ac_n "checking for --without-gcc""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +0000675echo "configure:676: checking for --without-gcc" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000676# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000677if test "${with_gcc+set}" = set; then
678 withval="$with_gcc"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000679
680 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +0000681 no) CC=cc
682 without_gcc=yes;;
683 yes) CC=gcc
684 without_gcc=no;;
685 *) CC=$withval
686 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000687 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +0000688else
Guido van Rossume77438c1995-09-13 18:59:59 +0000689
Guido van Rossum7b3853f1996-07-30 18:09:35 +0000690 case $ac_sys_system in
Guido van Rossume77438c1995-09-13 18:59:59 +0000691 OSF1) CC=cc
692 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000693 BeOS*)
694 # Dunno if it's a good idea to get this over with all at once, or
695 # to handle it in with the other goodies.
696 MACHDEP=beos
697
698 case $BE_HOST_CPU in
699 ppc)
Guido van Rossum81376801999-04-06 15:50:51 +0000700 CC="mwcc -I$PWD/BeOS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000701 without_gcc=yes
Guido van Rossum6b9da451999-03-24 17:48:12 +0000702 case `uname -r` in
703 4.0*) OPT="-DUSE_DL_EXPORT -O7 -opt schedule604 -export pragma" ;;
704 *) OPT="-DUSE_DL_EXPORT -O2 -proc 604e -export pragma" ;;
705 esac
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000706 CCSHARED=-UUSE_DL_EXPORT
707 LDFLAGS="$LDFLAGS -nodup"
708
709 AR="$PWD/BeOS/ar-fake"
710 RANLIB=:
711
712 cat >> confdefs.h <<\EOF
713#define DL_EXPORT_HEADER "dl_export.h"
714EOF
715
716 ;;
717 x86)
718 CC="gcc -I$PWD/BeOS"
719 without_gcc=no
Guido van Rossum32000e82000-05-22 21:31:50 +0000720 OPT="-DUSE_DL_EXPORT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +0000721 CCSHARED=-UUSE_DL_EXPORT
722
723 AR="$PWD/BeOS/ar-fake"
724 RANLIB=:
725
726 cat >> confdefs.h <<\EOF
727#define DL_EXPORT_HEADER "dl_export.h"
728EOF
729
730 ;;
731 *)
732 { echo "configure: error: Your BeOS system isn't PowerPC or x86... neat" 1>&2; exit 1; }
733 ;;
734 esac
735 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +0000736 Monterey*)
737 RANLIB=:
738 without_gcc=;;
Guido van Rossume77438c1995-09-13 18:59:59 +0000739 *) without_gcc=no;;
740 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000741fi
742
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000743echo "$ac_t""$without_gcc" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +0000744
Guido van Rossum95012191999-12-16 17:50:52 +0000745
746
747MAINOBJ=python.o
748echo $ac_n "checking for --with-cxx=<compiler>""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +0000749echo "configure:750: checking for --with-cxx=<compiler>" >&5
Guido van Rossum95012191999-12-16 17:50:52 +0000750# Check whether --with-cxx or --without-cxx was given.
751if test "${with_cxx+set}" = set; then
752 withval="$with_cxx"
753
754 case $withval in
755 no) CXX=
756 with_cxx=no;;
757 *) CXX=$withval
758 MAINOBJ=ccpython.o
759 with_cxx=$withval;;
760 esac
761else
762
763 with_cxx=no
764
765fi
766
767echo "$ac_t""$with_cxx" 1>&6
768SET_CXX="CXX = $CXX"
769
770#AC_MSG_CHECKING(CCC)
771#if test -z "$CCC"
772#then
773# case $ac_sys_system in
774# IRIX*) SET_CCC="CCC= CC ${SGI_ABI}";;
775# Linux*) SET_CCC="CCC= g++";;
776# *) SET_CCC=""
777# esac
778#else
779# SET_CCC="CCC= ${CCC}"
780#fi
781#AC_MSG_RESULT($SET_CCC)
782
Guido van Rossum8b131c51995-03-09 14:10:13 +0000783# If the user switches compilers, we can't believe the cache
784if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
785then
786 { echo "configure: error: cached CC is different -- throw away $cache_file
787(it is also a good idea to do 'make clean' before compiling)" 1>&2; exit 1; }
788fi
789
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000790# Extract the first word of "gcc", so it can be a program name with args.
791set dummy gcc; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000792echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +0000793echo "configure:794: checking for $ac_word" >&5
794if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000795 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000796else
797 if test -n "$CC"; then
798 ac_cv_prog_CC="$CC" # Let the user override the test.
799else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000800 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
801 ac_dummy="$PATH"
802 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803 test -z "$ac_dir" && ac_dir=.
804 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000805 ac_cv_prog_CC="gcc"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000806 break
807 fi
808 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000810fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811fi
812CC="$ac_cv_prog_CC"
813if test -n "$CC"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000814 echo "$ac_t""$CC" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000816 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000817fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000818
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000819if test -z "$CC"; then
820 # Extract the first word of "cc", so it can be a program name with args.
821set dummy cc; ac_word=$2
822echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +0000823echo "configure:824: checking for $ac_word" >&5
824if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000825 echo $ac_n "(cached) $ac_c" 1>&6
826else
827 if test -n "$CC"; then
828 ac_cv_prog_CC="$CC" # Let the user override the test.
829else
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000830 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000831 ac_prog_rejected=no
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000832 ac_dummy="$PATH"
833 for ac_dir in $ac_dummy; do
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000834 test -z "$ac_dir" && ac_dir=.
835 if test -f $ac_dir/$ac_word; then
836 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
837 ac_prog_rejected=yes
838 continue
839 fi
840 ac_cv_prog_CC="cc"
841 break
842 fi
843 done
844 IFS="$ac_save_ifs"
845if test $ac_prog_rejected = yes; then
846 # We found a bogon in the path, so make sure we never use it.
847 set dummy $ac_cv_prog_CC
848 shift
849 if test $# -gt 0; then
850 # We chose a different compiler from the bogus one.
851 # However, it has the same basename, so the bogon will be chosen
852 # first if we set CC to just the basename; use the full file name.
853 shift
854 set dummy "$ac_dir/$ac_word" "$@"
855 shift
856 ac_cv_prog_CC="$@"
857 fi
858fi
859fi
860fi
861CC="$ac_cv_prog_CC"
862if test -n "$CC"; then
863 echo "$ac_t""$CC" 1>&6
864else
865 echo "$ac_t""no" 1>&6
866fi
867
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000868 if test -z "$CC"; then
869 case "`uname -s`" in
Skip Montanarocb853262000-08-30 22:29:48 +0000870 *win32* | *WIN32* | *CYGWIN*)
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000871 # Extract the first word of "cl", so it can be a program name with args.
872set dummy cl; ac_word=$2
873echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +0000874echo "configure:875: checking for $ac_word" >&5
875if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000876 echo $ac_n "(cached) $ac_c" 1>&6
877else
878 if test -n "$CC"; then
879 ac_cv_prog_CC="$CC" # Let the user override the test.
880else
881 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
882 ac_dummy="$PATH"
883 for ac_dir in $ac_dummy; do
884 test -z "$ac_dir" && ac_dir=.
885 if test -f $ac_dir/$ac_word; then
886 ac_cv_prog_CC="cl"
887 break
888 fi
889 done
890 IFS="$ac_save_ifs"
891fi
892fi
893CC="$ac_cv_prog_CC"
894if test -n "$CC"; then
895 echo "$ac_t""$CC" 1>&6
896else
897 echo "$ac_t""no" 1>&6
898fi
899 ;;
900 esac
901 fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000902 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
903fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904
Skip Montanarocb853262000-08-30 22:29:48 +0000905echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
906echo "configure:907: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000907
908ac_ext=c
909# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
910ac_cpp='$CPP $CPPFLAGS'
911ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000912ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
Guido van Rossumf78abae1997-01-21 22:02:36 +0000913cross_compiling=$ac_cv_prog_cc_cross
914
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000915cat > conftest.$ac_ext << EOF
916
Skip Montanarocb853262000-08-30 22:29:48 +0000917#line 918 "configure"
Guido van Rossumf78abae1997-01-21 22:02:36 +0000918#include "confdefs.h"
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000919
Guido van Rossumf78abae1997-01-21 22:02:36 +0000920main(){return(0);}
921EOF
Skip Montanarocb853262000-08-30 22:29:48 +0000922if { (eval echo configure:923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000923 ac_cv_prog_cc_works=yes
924 # If we can't run a trivial program, we are probably using a cross compiler.
925 if (./conftest; exit) 2>/dev/null; then
926 ac_cv_prog_cc_cross=no
927 else
928 ac_cv_prog_cc_cross=yes
929 fi
930else
931 echo "configure: failed program was:" >&5
932 cat conftest.$ac_ext >&5
933 ac_cv_prog_cc_works=no
934fi
935rm -fr conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000936ac_ext=c
937# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
938ac_cpp='$CPP $CPPFLAGS'
939ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
940ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
941cross_compiling=$ac_cv_prog_cc_cross
Guido van Rossumf78abae1997-01-21 22:02:36 +0000942
943echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
944if test $ac_cv_prog_cc_works = no; then
945 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
946fi
Skip Montanarocb853262000-08-30 22:29:48 +0000947echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
948echo "configure:949: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +0000949echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
950cross_compiling=$ac_cv_prog_cc_cross
951
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000952echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +0000953echo "configure:954: checking whether we are using GNU C" >&5
954if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000955 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000956else
957 cat > conftest.c <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000958#ifdef __GNUC__
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 yes;
Guido van Rossum627b2d71993-12-24 10:39:16 +0000960#endif
961EOF
Skip Montanarocb853262000-08-30 22:29:48 +0000962if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000963 ac_cv_prog_gcc=yes
964else
965 ac_cv_prog_gcc=no
966fi
967fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000968
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000969echo "$ac_t""$ac_cv_prog_gcc" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +0000970
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000971if test $ac_cv_prog_gcc = yes; then
972 GCC=yes
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000973else
974 GCC=
975fi
976
977ac_test_CFLAGS="${CFLAGS+set}"
978ac_save_CFLAGS="$CFLAGS"
979CFLAGS=
980echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +0000981echo "configure:982: checking whether ${CC-cc} accepts -g" >&5
982if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +0000983 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984else
985 echo 'void f(){}' > conftest.c
986if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
Guido van Rossumf78abae1997-01-21 22:02:36 +0000987 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000988else
Guido van Rossumf78abae1997-01-21 22:02:36 +0000989 ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000990fi
991rm -f conftest*
992
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000993fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000994
Guido van Rossumf78abae1997-01-21 22:02:36 +0000995echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +0000996if test "$ac_test_CFLAGS" = set; then
997 CFLAGS="$ac_save_CFLAGS"
998elif test $ac_cv_prog_cc_g = yes; then
999 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001000 CFLAGS="-g -O2"
1001 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001002 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001003 fi
1004else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001005 if test "$GCC" = yes; then
1006 CFLAGS="-O2"
1007 else
1008 CFLAGS=
1009 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001010fi
1011
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001012
Guido van Rossumdd997f71998-10-07 19:58:26 +00001013case $MACHDEP in
1014bsdos*)
1015 case $CC in
1016 gcc) CC="$CC -D_HAVE_BSDI";;
1017 esac;;
1018esac
1019
Guido van Rossum24b1e751997-08-21 02:29:16 +00001020case $ac_sys_system in
1021hp*|HP*)
1022 case $CC in
1023 cc|*/cc) CC="$CC -Aa -D_HPUX_SOURCE";;
1024 esac;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001025BeOS*)
1026 case $CC in
1027 cc) CC=cc;;
1028 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001029Monterey*)
1030 case $CC in
1031 cc) CC="$CC -Wl,-Bexport";;
1032 esac;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00001033esac
1034
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001035# LDLIBRARY is the name of the library to link against (as opposed to the
1036# name of the library into which to insert object files). On systems
1037# without shared libraries, LDLIBRARY is the same as LIBRARY (defined in
1038# the Makefiles).
1039
1040
1041LDLIBRARY=''
1042
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001043# LINKCC is the command that links the python executable -- default is $(CC).
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001044# This is altered for AIX and BeOS in order to build the export list before
1045# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001046
1047echo $ac_n "checking LINKCC""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001048echo "configure:1049: checking LINKCC" >&5
Guido van Rossum95012191999-12-16 17:50:52 +00001049if test -z "$LINKCC" -a ! -z "$CXX"
1050then
1051 LINKCC="$CXX"
1052fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001053if test -z "$LINKCC"
1054then
1055 case $ac_sys_system in
1056 AIX*)
Guido van Rossum45140f91997-08-29 18:44:06 +00001057 LINKCC="\$(srcdir)/makexp_aix python.exp \"\" \$(LIBRARY); \$(PURIFY) \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001058 BeOS*)
Guido van Rossumea516321998-12-17 18:08:55 +00001059 LINKCC="\$(srcdir)/../BeOS/linkcc \$(LIBRARY) \$(PURIFY) \$(CC) \$(OPT)"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001060 LDLIBRARY='libpython$(VERSION).so';;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00001061 dgux*)
1062 LINKCC="LD_RUN_PATH=$libdir \$(PURIFY) \$(CC)";;
Trent Mick635f6fb2000-08-23 21:33:05 +00001063 Monterey64*)
1064 LINKCC="\$(PURIFY) \$(CC) -L/usr/lib/ia64l64";;
Guido van Rossum25f93031997-08-18 16:00:04 +00001065 *) LINKCC="\$(PURIFY) \$(CC)";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00001066 esac
1067fi
1068echo "$ac_t""$LINKCC" 1>&6
1069
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001070echo $ac_n "checking LDLIBRARY""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001071echo "configure:1072: checking LDLIBRARY" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00001072
1073# NeXT framework builds require that the 'ar' library be converted into
1074# a bundle using libtool.
1075if test "$with_next_framework"
1076then
1077 LDLIBRARY='libpython$(VERSION).dylib'
1078fi
1079
1080# DG/UX requires some fancy ld contortions to produce a .so from an .a
1081if test "$MACHDEP" = "dguxR4"
1082then
1083 LDLIBRARY='libpython$(VERSION).so'
1084 OPT="$OPT -pic"
1085fi
1086echo "$ac_t""$LDLIBRARY" 1>&6
1087
1088# If LDLIBRARY is different from LIBRARY, emit a rule to build it.
1089if test -z "$LDLIBRARY"
1090then
1091 LDLIBRARY='libpython$(VERSION).a'
1092 MAKE_LDLIBRARY="true"
1093else
1094 MAKE_LDLIBRARY='$(MAKE) $(LDLIBRARY)'
1095fi
1096
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001097# Extract the first word of "ranlib", so it can be a program name with args.
1098set dummy ranlib; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001099echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001100echo "configure:1101: checking for $ac_word" >&5
1101if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001102 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001103else
1104 if test -n "$RANLIB"; then
1105 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1106else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001107 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1108 ac_dummy="$PATH"
1109 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110 test -z "$ac_dir" && ac_dir=.
1111 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001112 ac_cv_prog_RANLIB="ranlib"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001113 break
1114 fi
1115 done
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116 IFS="$ac_save_ifs"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001117 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001118fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001119fi
1120RANLIB="$ac_cv_prog_RANLIB"
1121if test -n "$RANLIB"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001122 echo "$ac_t""$RANLIB" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001123else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001124 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001125fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001126
1127
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128for ac_prog in ar aal
1129do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130# Extract the first word of "$ac_prog", so it can be a program name with args.
1131set dummy $ac_prog; ac_word=$2
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001132echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001133echo "configure:1134: checking for $ac_word" >&5
1134if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001135 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136else
1137 if test -n "$AR"; then
1138 ac_cv_prog_AR="$AR" # Let the user override the test.
1139else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001140 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1141 ac_dummy="$PATH"
1142 for ac_dir in $ac_dummy; do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 test -z "$ac_dir" && ac_dir=.
1144 if test -f $ac_dir/$ac_word; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001145 ac_cv_prog_AR="$ac_prog"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001146 break
1147 fi
1148 done
1149 IFS="$ac_save_ifs"
1150fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001151fi
1152AR="$ac_cv_prog_AR"
1153if test -n "$AR"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001154 echo "$ac_t""$AR" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001155else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001156 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158
1159test -n "$AR" && break
1160done
1161test -n "$AR" || AR="ar"
1162
1163
Guido van Rossumda88dad1995-01-26 00:46:29 +00001164
1165
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001166# Install just never works :-(
1167if test -z "$INSTALL"
Guido van Rossumda88dad1995-01-26 00:46:29 +00001168then
1169 INSTALL=cp
1170 INSTALL_PROGRAM=cp
1171 INSTALL_DATA=cp
1172else
1173 INSTALL_PROGRAM="$INSTALL"
1174 INSTALL_DATA="$INSTALL -m 644"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001175fi
1176
Guido van Rossumec95c7b1998-08-04 17:59:56 +00001177# Not every filesystem supports hard links
1178
1179if test -z "$LN" ; then
1180 case $ac_sys_system in
1181 BeOS*) LN="ln -s";;
1182 *) LN=ln;;
1183 esac
1184fi
1185
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001186# Optimizer/debugger flags passed between Makefiles
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001187
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001188if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001189then
Guido van Rossumedca74a1997-07-18 23:29:40 +00001190 case $GCC in
1191 yes)
1192 case $ac_cv_prog_cc_g in
1193 yes) OPT="-g -O2";;
1194 *) OPT="-O2";;
1195 esac
1196 ;;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001197 *) OPT="-O";;
1198 esac
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001199fi
1200
Trent Mick635f6fb2000-08-23 21:33:05 +00001201# The current (beta) Monterey compiler dies with optimizations
1202case $ac_sys_system in
1203Monterey*) OPT="";;
1204esac
1205
Guido van Rossum563e7081996-09-10 18:20:48 +00001206if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00001207then
1208 OPT="$OPT $ac_arch_flags"
1209fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001210# checks for UNIX variants that set C preprocessor variables
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001211echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001212echo "configure:1213: checking how to run the C preprocessor" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001213# On Suns, sometimes $CPP names a directory.
1214if test -n "$CPP" && test -d "$CPP"; then
1215 CPP=
1216fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001217if test -z "$CPP"; then
Skip Montanarocb853262000-08-30 22:29:48 +00001218if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001219 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001220else
1221 # This must be in double quotes, not single quotes, because CPP may get
1222 # substituted into the Makefile and "${CC-cc}" will confuse make.
Guido van Rossum627b2d71993-12-24 10:39:16 +00001223 CPP="${CC-cc} -E"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001224 # On the NeXT, cc -E runs the code through the compiler's parser,
1225 # not just through cpp.
1226 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001227#line 1228 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001228#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001229#include <assert.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001230Syntax Error
1231EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001232ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Skip Montanarocb853262000-08-30 22:29:48 +00001233{ (eval echo configure:1234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001234ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235if test -z "$ac_err"; then
1236 :
1237else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001238 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001239 echo "configure: failed program was:" >&5
1240 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00001241 rm -rf conftest*
1242 CPP="${CC-cc} -E -traditional-cpp"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001243 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001244#line 1245 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001245#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001246#include <assert.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247Syntax Error
1248EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001249ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Skip Montanarocb853262000-08-30 22:29:48 +00001250{ (eval echo configure:1251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001251ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1252if test -z "$ac_err"; then
1253 :
1254else
1255 echo "$ac_err" >&5
1256 echo "configure: failed program was:" >&5
1257 cat conftest.$ac_ext >&5
1258 rm -rf conftest*
1259 CPP="${CC-cc} -nologo -E"
1260 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001261#line 1262 "configure"
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001262#include "confdefs.h"
1263#include <assert.h>
1264Syntax Error
1265EOF
1266ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Skip Montanarocb853262000-08-30 22:29:48 +00001267{ (eval echo configure:1268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001268ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001269if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270 :
1271else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001273 echo "configure: failed program was:" >&5
1274 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275 rm -rf conftest*
1276 CPP=/lib/cpp
1277fi
1278rm -f conftest*
1279fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00001280rm -f conftest*
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001281fi
1282rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001283 ac_cv_prog_CPP="$CPP"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284fi
Guido van Rossume77438c1995-09-13 18:59:59 +00001285 CPP="$ac_cv_prog_CPP"
1286else
1287 ac_cv_prog_CPP="$CPP"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001288fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001289echo "$ac_t""$CPP" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001291echo $ac_n "checking for AIX""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001292echo "configure:1293: checking for AIX" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001293cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001294#line 1295 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295#include "confdefs.h"
1296#ifdef _AIX
1297 yes
1298#endif
1299
1300EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1302 egrep "yes" >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001304 echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305#define _ALL_SOURCE 1
1306EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001307
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001308else
1309 rm -rf conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001310 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311fi
1312rm -f conftest*
1313
1314
Guido van Rossumf78abae1997-01-21 22:02:36 +00001315ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001316echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001317echo "configure:1318: checking for minix/config.h" >&5
1318if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001319 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001320else
1321 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001322#line 1323 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001323#include "confdefs.h"
1324#include <minix/config.h>
1325EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001326ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Skip Montanarocb853262000-08-30 22:29:48 +00001327{ (eval echo configure:1328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001328ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001329if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001331 eval "ac_cv_header_$ac_safe=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001332else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001333 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001334 echo "configure: failed program was:" >&5
1335 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001336 rm -rf conftest*
1337 eval "ac_cv_header_$ac_safe=no"
1338fi
1339rm -f conftest*
1340fi
1341if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001342 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001343 MINIX=yes
1344else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001345 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001346MINIX=
Guido van Rossum627b2d71993-12-24 10:39:16 +00001347fi
1348
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001349if test "$MINIX" = yes; then
1350 cat >> confdefs.h <<\EOF
1351#define _POSIX_SOURCE 1
1352EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001353
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001354 cat >> confdefs.h <<\EOF
1355#define _POSIX_1_SOURCE 2
1356EOF
1357
1358 cat >> confdefs.h <<\EOF
1359#define _MINIX 1
1360EOF
1361
1362fi
1363
Guido van Rossumda88dad1995-01-26 00:46:29 +00001364
Guido van Rossum91922671997-10-09 20:24:13 +00001365echo $ac_n "checking whether $CC accepts -OPT:Olimit=0""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001366echo "configure:1367: checking whether $CC accepts -OPT:Olimit=0" >&5
1367if eval "test \"\${ac_cv_opt_olimit_ok+set}\" = set"; then
Guido van Rossum91922671997-10-09 20:24:13 +00001368 echo $ac_n "(cached) $ac_c" 1>&6
1369else
1370 ac_save_cc="$CC"
1371CC="$CC -OPT:Olimit=0"
1372if test "$cross_compiling" = yes; then
1373 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1374else
1375 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001376#line 1377 "configure"
Guido van Rossum91922671997-10-09 20:24:13 +00001377#include "confdefs.h"
1378int main() { return 0; }
1379EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001380if { (eval echo configure:1381: \"$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 +00001381then
1382 ac_cv_opt_olimit_ok=yes
1383else
1384 echo "configure: failed program was:" >&5
1385 cat conftest.$ac_ext >&5
1386 rm -fr conftest*
1387 ac_cv_opt_olimit_ok=no
1388fi
1389rm -fr conftest*
1390fi
1391
1392CC="$ac_save_cc"
1393fi
1394
1395echo "$ac_t""$ac_cv_opt_olimit_ok" 1>&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00001396if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum304dd2d1997-10-20 23:10:56 +00001397 OPT="$OPT -OPT:Olimit=0"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001398else
1399 echo $ac_n "checking whether $CC accepts -Olimit 1500""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001400echo "configure:1401: checking whether $CC accepts -Olimit 1500" >&5
1401 if eval "test \"\${ac_cv_olimit_ok+set}\" = set"; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001402 echo $ac_n "(cached) $ac_c" 1>&6
1403else
1404 ac_save_cc="$CC"
1405 CC="$CC -Olimit 1500"
1406 if test "$cross_compiling" = yes; then
1407 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1408else
1409 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001410#line 1411 "configure"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001411#include "confdefs.h"
1412int main() { return 0; }
1413EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001414if { (eval echo configure:1415: \"$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 +00001415then
1416 ac_cv_olimit_ok=yes
1417else
1418 echo "configure: failed program was:" >&5
1419 cat conftest.$ac_ext >&5
1420 rm -fr conftest*
1421 ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00001422fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00001423rm -fr conftest*
1424fi
1425
1426 CC="$ac_save_cc"
1427fi
1428
1429 echo "$ac_t""$ac_cv_olimit_ok" 1>&6
1430 if test $ac_cv_olimit_ok = yes; then
1431 OPT="$OPT -Olimit 1500"
1432 fi
1433fi
1434
Guido van Rossum84e7b241996-08-19 21:59:00 +00001435
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001436# checks for header files
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001437echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001438echo "configure:1439: checking for ANSI C header files" >&5
1439if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001440 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001441else
1442 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001443#line 1444 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001444#include "confdefs.h"
1445#include <stdlib.h>
1446#include <stdarg.h>
1447#include <string.h>
1448#include <float.h>
1449EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001450ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Skip Montanarocb853262000-08-30 22:29:48 +00001451{ (eval echo configure:1452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001452ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001453if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001454 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001455 ac_cv_header_stdc=yes
1456else
1457 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001458 echo "configure: failed program was:" >&5
1459 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001460 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001461 ac_cv_header_stdc=no
1462fi
1463rm -f conftest*
1464
1465if test $ac_cv_header_stdc = yes; then
1466 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
1467cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001468#line 1469 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001469#include "confdefs.h"
1470#include <string.h>
1471EOF
1472if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1473 egrep "memchr" >/dev/null 2>&1; then
1474 :
1475else
1476 rm -rf conftest*
1477 ac_cv_header_stdc=no
1478fi
1479rm -f conftest*
1480
1481fi
1482
1483if test $ac_cv_header_stdc = yes; then
1484 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
1485cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001486#line 1487 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001487#include "confdefs.h"
1488#include <stdlib.h>
1489EOF
1490if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1491 egrep "free" >/dev/null 2>&1; then
1492 :
1493else
1494 rm -rf conftest*
1495 ac_cv_header_stdc=no
1496fi
1497rm -f conftest*
1498
1499fi
1500
1501if test $ac_cv_header_stdc = yes; then
1502 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
1503if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001504 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001505else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001506 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001507#line 1508 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001508#include "confdefs.h"
1509#include <ctype.h>
1510#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
1511#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001512#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
Guido van Rossum627b2d71993-12-24 10:39:16 +00001513int main () { int i; for (i = 0; i < 256; i++)
1514if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
1515exit (0); }
1516
1517EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001518if { (eval echo configure:1519: \"$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 +00001519then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001520 :
1521else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001522 echo "configure: failed program was:" >&5
1523 cat conftest.$ac_ext >&5
1524 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001525 ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001526fi
1527rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001528fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001529
1530fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001531fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001532
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001533echo "$ac_t""$ac_cv_header_stdc" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001534if test $ac_cv_header_stdc = yes; then
1535 cat >> confdefs.h <<\EOF
1536#define STDC_HEADERS 1
1537EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001538
1539fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001540
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00001541for ac_hdr in dlfcn.h fcntl.h limits.h locale.h ncurses.h poll.h pthread.h \
Guido van Rossum2d38f911996-06-26 19:47:01 +00001542signal.h stdarg.h stddef.h stdlib.h thread.h unistd.h utime.h \
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001543sys/audioio.h sys/file.h sys/lock.h \
Guido van Rossum95713eb2000-05-18 20:53:31 +00001544sys/param.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Fred Drake8cef4cf2000-06-28 16:40:38 +00001545sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001546do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001547ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001548echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001549echo "configure:1550: checking for $ac_hdr" >&5
1550if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001551 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001552else
1553 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001554#line 1555 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001555#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001556#include <$ac_hdr>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001557EOF
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001558ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Skip Montanarocb853262000-08-30 22:29:48 +00001559{ (eval echo configure:1560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001560ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001561if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001562 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001563 eval "ac_cv_header_$ac_safe=yes"
1564else
1565 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001566 echo "configure: failed program was:" >&5
1567 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001568 rm -rf conftest*
1569 eval "ac_cv_header_$ac_safe=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001570fi
1571rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001572fi
1573if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001574 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001575 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001576 cat >> confdefs.h <<EOF
1577#define $ac_tr_hdr 1
1578EOF
1579
1580else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001581 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001582fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001583done
1584
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001585ac_header_dirent=no
1586for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
1587do
Guido van Rossumf78abae1997-01-21 22:02:36 +00001588ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001589echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001590echo "configure:1591: checking for $ac_hdr that defines DIR" >&5
1591if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001592 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00001593else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001594 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001595#line 1596 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001596#include "confdefs.h"
1597#include <sys/types.h>
1598#include <$ac_hdr>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001599int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001600DIR *dirp = 0;
1601; return 0; }
1602EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001603if { (eval echo configure:1604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001604 rm -rf conftest*
1605 eval "ac_cv_header_dirent_$ac_safe=yes"
1606else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001607 echo "configure: failed program was:" >&5
1608 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001609 rm -rf conftest*
1610 eval "ac_cv_header_dirent_$ac_safe=no"
1611fi
1612rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00001613fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001614if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001615 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00001616 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001617 cat >> confdefs.h <<EOF
1618#define $ac_tr_hdr 1
1619EOF
1620 ac_header_dirent=$ac_hdr; break
1621else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001622 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001623fi
1624done
1625# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
1626if test $ac_header_dirent = dirent.h; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00001627echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001628echo "configure:1629: checking for opendir in -ldir" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001629ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00001630if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001631 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001632else
1633 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001634LIBS="-ldir $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001635cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001636#line 1637 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001637#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001638/* Override any gcc2 internal prototype to avoid an error. */
1639/* We use char because int might match the return type of a gcc2
1640 builtin and then its argument prototype would still apply. */
1641char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001642
Guido van Rossumf78abae1997-01-21 22:02:36 +00001643int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001644opendir()
1645; return 0; }
1646EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001647if { (eval echo configure:1648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001648 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001649 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001650else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001651 echo "configure: failed program was:" >&5
1652 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001653 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001654 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001655fi
1656rm -f conftest*
1657LIBS="$ac_save_LIBS"
1658
1659fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001660if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001661 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001662 LIBS="$LIBS -ldir"
1663else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001664 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001665fi
1666
1667else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001668echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001669echo "configure:1670: checking for opendir in -lx" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00001670ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00001671if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001672 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001673else
1674 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001675LIBS="-lx $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001676cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001677#line 1678 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001678#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001679/* Override any gcc2 internal prototype to avoid an error. */
1680/* We use char because int might match the return type of a gcc2
1681 builtin and then its argument prototype would still apply. */
1682char opendir();
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001683
Guido van Rossumf78abae1997-01-21 22:02:36 +00001684int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001685opendir()
1686; return 0; }
1687EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001688if { (eval echo configure:1689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001689 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001690 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001691else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001692 echo "configure: failed program was:" >&5
1693 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001694 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001695 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001696fi
1697rm -f conftest*
1698LIBS="$ac_save_LIBS"
1699
1700fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001701if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001702 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001703 LIBS="$LIBS -lx"
1704else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001705 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001706fi
1707
1708fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001709
1710
1711# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00001712was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001713echo $ac_n "checking for clock_t in time.h""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001714echo "configure:1715: checking for clock_t in time.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001715cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001716#line 1717 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001717#include "confdefs.h"
1718#include <time.h>
1719EOF
1720if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1721 egrep "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00001722 rm -rf conftest*
1723 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00001724else
1725 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001726 cat >> confdefs.h <<\EOF
1727#define clock_t long
1728EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001729
1730fi
1731rm -f conftest*
1732
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001733echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00001734
Guido van Rossum84e7b241996-08-19 21:59:00 +00001735# Add some code to confdefs.h so that the test for off_t works on SCO
1736cat >> confdefs.h <<\EOF
1737#if defined(SCO_DS)
1738#undef _OFF_T
1739#endif
1740EOF
1741
Guido van Rossumef2255b2000-03-10 22:30:29 +00001742# Type availability checks
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001743echo $ac_n "checking for mode_t""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001744echo "configure:1745: checking for mode_t" >&5
1745if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001746 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001747else
1748 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001749#line 1750 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001750#include "confdefs.h"
1751#include <sys/types.h>
1752#if STDC_HEADERS
1753#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001754#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001755#endif
1756EOF
1757if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001758 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 +00001759 rm -rf conftest*
Skip Montanarocb853262000-08-30 22:29:48 +00001760 eval "ac_cv_type_mode_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001761else
1762 rm -rf conftest*
Skip Montanarocb853262000-08-30 22:29:48 +00001763 eval "ac_cv_type_mode_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001764fi
1765rm -f conftest*
1766
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001767fi
Skip Montanarocb853262000-08-30 22:29:48 +00001768if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
1769 echo "$ac_t""yes" 1>&6
1770else
1771 echo "$ac_t""no" 1>&6
1772 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001773#define mode_t int
1774EOF
1775
1776fi
1777
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001778echo $ac_n "checking for off_t""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001779echo "configure:1780: checking for off_t" >&5
1780if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001781 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001782else
1783 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001784#line 1785 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001785#include "confdefs.h"
1786#include <sys/types.h>
1787#if STDC_HEADERS
1788#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001789#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001790#endif
1791EOF
1792if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001793 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 +00001794 rm -rf conftest*
Skip Montanarocb853262000-08-30 22:29:48 +00001795 eval "ac_cv_type_off_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001796else
1797 rm -rf conftest*
Skip Montanarocb853262000-08-30 22:29:48 +00001798 eval "ac_cv_type_off_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001799fi
1800rm -f conftest*
1801
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001802fi
Skip Montanarocb853262000-08-30 22:29:48 +00001803if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
1804 echo "$ac_t""yes" 1>&6
1805else
1806 echo "$ac_t""no" 1>&6
1807 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808#define off_t long
1809EOF
1810
1811fi
1812
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001813echo $ac_n "checking for pid_t""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001814echo "configure:1815: checking for pid_t" >&5
1815if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001816 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001817else
1818 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001819#line 1820 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001820#include "confdefs.h"
1821#include <sys/types.h>
1822#if STDC_HEADERS
1823#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001824#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001825#endif
1826EOF
1827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001828 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 +00001829 rm -rf conftest*
Skip Montanarocb853262000-08-30 22:29:48 +00001830 eval "ac_cv_type_pid_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001831else
1832 rm -rf conftest*
Skip Montanarocb853262000-08-30 22:29:48 +00001833 eval "ac_cv_type_pid_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001834fi
1835rm -f conftest*
1836
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001837fi
Skip Montanarocb853262000-08-30 22:29:48 +00001838if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
1839 echo "$ac_t""yes" 1>&6
1840else
1841 echo "$ac_t""no" 1>&6
1842 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001843#define pid_t int
1844EOF
1845
1846fi
1847
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001848echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001849echo "configure:1850: checking return type of signal handlers" >&5
1850if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001851 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001852else
1853 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001854#line 1855 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001855#include "confdefs.h"
1856#include <sys/types.h>
1857#include <signal.h>
1858#ifdef signal
1859#undef signal
1860#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001861#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001862extern "C" void (*signal (int, void (*)(int)))(int);
1863#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001864void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001865#endif
1866
Guido van Rossumf78abae1997-01-21 22:02:36 +00001867int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001868int i;
1869; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001870EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001871if { (eval echo configure:1872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001872 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001873 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00001874else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001875 echo "configure: failed program was:" >&5
1876 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00001877 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001878 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00001879fi
1880rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001881fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001882
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001883echo "$ac_t""$ac_cv_type_signal" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001884cat >> confdefs.h <<EOF
1885#define RETSIGTYPE $ac_cv_type_signal
1886EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001887
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001888
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001889echo $ac_n "checking for size_t""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001890echo "configure:1891: checking for size_t" >&5
1891if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001892 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001893else
1894 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001895#line 1896 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001896#include "confdefs.h"
1897#include <sys/types.h>
1898#if STDC_HEADERS
1899#include <stdlib.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00001900#include <stddef.h>
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001901#endif
1902EOF
1903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001904 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 +00001905 rm -rf conftest*
Skip Montanarocb853262000-08-30 22:29:48 +00001906 eval "ac_cv_type_size_t=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001907else
1908 rm -rf conftest*
Skip Montanarocb853262000-08-30 22:29:48 +00001909 eval "ac_cv_type_size_t=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001910fi
1911rm -f conftest*
1912
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001913fi
Skip Montanarocb853262000-08-30 22:29:48 +00001914if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
1915 echo "$ac_t""yes" 1>&6
1916else
1917 echo "$ac_t""no" 1>&6
1918 cat >> confdefs.h <<EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001919#define size_t unsigned
1920EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001921
1922fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001923
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001924echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001925echo "configure:1926: checking for uid_t in sys/types.h" >&5
1926if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001927 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001928else
1929 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001930#line 1931 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001931#include "confdefs.h"
1932#include <sys/types.h>
1933EOF
1934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1935 egrep "uid_t" >/dev/null 2>&1; then
1936 rm -rf conftest*
1937 ac_cv_type_uid_t=yes
1938else
1939 rm -rf conftest*
1940 ac_cv_type_uid_t=no
1941fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00001942rm -f conftest*
1943
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001944fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001945
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001946echo "$ac_t""$ac_cv_type_uid_t" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001947if test $ac_cv_type_uid_t = no; then
1948 cat >> confdefs.h <<\EOF
1949#define uid_t int
1950EOF
1951
1952 cat >> confdefs.h <<\EOF
1953#define gid_t int
1954EOF
1955
1956fi
1957
Guido van Rossum627b2d71993-12-24 10:39:16 +00001958
Guido van Rossumef2255b2000-03-10 22:30:29 +00001959# Sizes of various common basic types
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001960echo $ac_n "checking size of int""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00001961echo "configure:1962: checking size of int" >&5
1962if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001963 echo $ac_n "(cached) $ac_c" 1>&6
1964else
1965 if test "$cross_compiling" = yes; then
1966 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
1967else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001968 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001969#line 1970 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001970#include "confdefs.h"
1971#include <stdio.h>
1972main()
1973{
1974 FILE *f=fopen("conftestval", "w");
1975 if (!f) exit(1);
1976 fprintf(f, "%d\n", sizeof(int));
1977 exit(0);
1978}
1979EOF
Skip Montanarocb853262000-08-30 22:29:48 +00001980if { (eval echo configure:1981: \"$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 +00001981then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001982 ac_cv_sizeof_int=`cat conftestval`
1983else
Guido van Rossumf78abae1997-01-21 22:02:36 +00001984 echo "configure: failed program was:" >&5
1985 cat conftest.$ac_ext >&5
1986 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001987 ac_cv_sizeof_int=0
1988fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001989rm -fr conftest*
1990fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00001991
1992fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00001993echo "$ac_t""$ac_cv_sizeof_int" 1>&6
1994cat >> confdefs.h <<EOF
1995#define SIZEOF_INT $ac_cv_sizeof_int
1996EOF
1997
1998
1999echo $ac_n "checking size of long""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002000echo "configure:2001: checking size of long" >&5
2001if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002002 echo $ac_n "(cached) $ac_c" 1>&6
2003else
2004 if test "$cross_compiling" = yes; then
2005 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2006else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002007 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002008#line 2009 "configure"
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002009#include "confdefs.h"
2010#include <stdio.h>
2011main()
2012{
2013 FILE *f=fopen("conftestval", "w");
2014 if (!f) exit(1);
2015 fprintf(f, "%d\n", sizeof(long));
2016 exit(0);
2017}
2018EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002019if { (eval echo configure:2020: \"$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 +00002020then
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002021 ac_cv_sizeof_long=`cat conftestval`
2022else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002023 echo "configure: failed program was:" >&5
2024 cat conftest.$ac_ext >&5
2025 rm -fr conftest*
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002026 ac_cv_sizeof_long=0
2027fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002028rm -fr conftest*
2029fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00002030
2031fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002032echo "$ac_t""$ac_cv_sizeof_long" 1>&6
2033cat >> confdefs.h <<EOF
2034#define SIZEOF_LONG $ac_cv_sizeof_long
2035EOF
2036
2037
Guido van Rossumad678af1998-10-02 14:42:15 +00002038echo $ac_n "checking size of void *""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002039echo "configure:2040: checking size of void *" >&5
2040if eval "test \"\${ac_cv_sizeof_void_p+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002041 echo $ac_n "(cached) $ac_c" 1>&6
2042else
2043 if test "$cross_compiling" = yes; then
2044 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2045else
2046 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002047#line 2048 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002048#include "confdefs.h"
2049#include <stdio.h>
2050main()
2051{
2052 FILE *f=fopen("conftestval", "w");
2053 if (!f) exit(1);
2054 fprintf(f, "%d\n", sizeof(void *));
2055 exit(0);
2056}
2057EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002058if { (eval echo configure:2059: \"$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 +00002059then
2060 ac_cv_sizeof_void_p=`cat conftestval`
2061else
2062 echo "configure: failed program was:" >&5
2063 cat conftest.$ac_ext >&5
2064 rm -fr conftest*
2065 ac_cv_sizeof_void_p=0
2066fi
2067rm -fr conftest*
2068fi
2069
2070fi
2071echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
2072cat >> confdefs.h <<EOF
2073#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
2074EOF
2075
2076
Guido van Rossumef2255b2000-03-10 22:30:29 +00002077echo $ac_n "checking size of char""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002078echo "configure:2079: checking size of char" >&5
2079if eval "test \"\${ac_cv_sizeof_char+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002080 echo $ac_n "(cached) $ac_c" 1>&6
2081else
2082 if test "$cross_compiling" = yes; then
2083 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2084else
2085 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002086#line 2087 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002087#include "confdefs.h"
2088#include <stdio.h>
2089main()
2090{
2091 FILE *f=fopen("conftestval", "w");
2092 if (!f) exit(1);
2093 fprintf(f, "%d\n", sizeof(char));
2094 exit(0);
2095}
2096EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002097if { (eval echo configure:2098: \"$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 +00002098then
2099 ac_cv_sizeof_char=`cat conftestval`
2100else
2101 echo "configure: failed program was:" >&5
2102 cat conftest.$ac_ext >&5
2103 rm -fr conftest*
2104 ac_cv_sizeof_char=0
2105fi
2106rm -fr conftest*
2107fi
2108
2109fi
2110echo "$ac_t""$ac_cv_sizeof_char" 1>&6
2111cat >> confdefs.h <<EOF
2112#define SIZEOF_CHAR $ac_cv_sizeof_char
2113EOF
2114
2115
2116echo $ac_n "checking size of short""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002117echo "configure:2118: checking size of short" >&5
2118if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002119 echo $ac_n "(cached) $ac_c" 1>&6
2120else
2121 if test "$cross_compiling" = yes; then
2122 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2123else
2124 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002125#line 2126 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002126#include "confdefs.h"
2127#include <stdio.h>
2128main()
2129{
2130 FILE *f=fopen("conftestval", "w");
2131 if (!f) exit(1);
2132 fprintf(f, "%d\n", sizeof(short));
2133 exit(0);
2134}
2135EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002136if { (eval echo configure:2137: \"$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 +00002137then
2138 ac_cv_sizeof_short=`cat conftestval`
2139else
2140 echo "configure: failed program was:" >&5
2141 cat conftest.$ac_ext >&5
2142 rm -fr conftest*
2143 ac_cv_sizeof_short=0
2144fi
2145rm -fr conftest*
2146fi
2147
2148fi
2149echo "$ac_t""$ac_cv_sizeof_short" 1>&6
2150cat >> confdefs.h <<EOF
2151#define SIZEOF_SHORT $ac_cv_sizeof_short
2152EOF
2153
2154
2155echo $ac_n "checking size of float""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002156echo "configure:2157: checking size of float" >&5
2157if eval "test \"\${ac_cv_sizeof_float+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002158 echo $ac_n "(cached) $ac_c" 1>&6
2159else
2160 if test "$cross_compiling" = yes; then
2161 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2162else
2163 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002164#line 2165 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002165#include "confdefs.h"
2166#include <stdio.h>
2167main()
2168{
2169 FILE *f=fopen("conftestval", "w");
2170 if (!f) exit(1);
2171 fprintf(f, "%d\n", sizeof(float));
2172 exit(0);
2173}
2174EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002175if { (eval echo configure:2176: \"$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 +00002176then
2177 ac_cv_sizeof_float=`cat conftestval`
2178else
2179 echo "configure: failed program was:" >&5
2180 cat conftest.$ac_ext >&5
2181 rm -fr conftest*
2182 ac_cv_sizeof_float=0
2183fi
2184rm -fr conftest*
2185fi
2186
2187fi
2188echo "$ac_t""$ac_cv_sizeof_float" 1>&6
2189cat >> confdefs.h <<EOF
2190#define SIZEOF_FLOAT $ac_cv_sizeof_float
2191EOF
2192
2193
2194echo $ac_n "checking size of double""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002195echo "configure:2196: checking size of double" >&5
2196if eval "test \"\${ac_cv_sizeof_double+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00002197 echo $ac_n "(cached) $ac_c" 1>&6
2198else
2199 if test "$cross_compiling" = yes; then
2200 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2201else
2202 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002203#line 2204 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00002204#include "confdefs.h"
2205#include <stdio.h>
2206main()
2207{
2208 FILE *f=fopen("conftestval", "w");
2209 if (!f) exit(1);
2210 fprintf(f, "%d\n", sizeof(double));
2211 exit(0);
2212}
2213EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002214if { (eval echo configure:2215: \"$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 +00002215then
2216 ac_cv_sizeof_double=`cat conftestval`
2217else
2218 echo "configure: failed program was:" >&5
2219 cat conftest.$ac_ext >&5
2220 rm -fr conftest*
2221 ac_cv_sizeof_double=0
2222fi
2223rm -fr conftest*
2224fi
2225
2226fi
2227echo "$ac_t""$ac_cv_sizeof_double" 1>&6
2228cat >> confdefs.h <<EOF
2229#define SIZEOF_DOUBLE $ac_cv_sizeof_double
2230EOF
2231
2232
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002233echo $ac_n "checking size of fpos_t""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002234echo "configure:2235: checking size of fpos_t" >&5
2235if eval "test \"\${ac_cv_sizeof_fpos_t+set}\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002236 echo $ac_n "(cached) $ac_c" 1>&6
2237else
2238 if test "$cross_compiling" = yes; then
2239 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2240else
2241 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002242#line 2243 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002243#include "confdefs.h"
2244#include <stdio.h>
2245main()
2246{
2247 FILE *f=fopen("conftestval", "w");
2248 if (!f) exit(1);
2249 fprintf(f, "%d\n", sizeof(fpos_t));
2250 exit(0);
2251}
2252EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002253if { (eval echo configure:2254: \"$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 +00002254then
2255 ac_cv_sizeof_fpos_t=`cat conftestval`
2256else
2257 echo "configure: failed program was:" >&5
2258 cat conftest.$ac_ext >&5
2259 rm -fr conftest*
2260 ac_cv_sizeof_fpos_t=0
2261fi
2262rm -fr conftest*
2263fi
2264
2265fi
2266echo "$ac_t""$ac_cv_sizeof_fpos_t" 1>&6
2267cat >> confdefs.h <<EOF
2268#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
2269EOF
2270
2271
Guido van Rossum0a516c91994-09-12 10:58:40 +00002272
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002273echo $ac_n "checking for long long support""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002274echo "configure:2275: checking for long long support" >&5
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002275have_long_long=no
2276cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002277#line 2278 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002278#include "confdefs.h"
2279
2280int main() {
2281long long x; x = (long long)0;
2282; return 0; }
2283EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002284if { (eval echo configure:2285: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002285 rm -rf conftest*
2286 cat >> confdefs.h <<\EOF
2287#define HAVE_LONG_LONG 1
2288EOF
2289 have_long_long=yes
2290else
2291 echo "configure: failed program was:" >&5
2292 cat conftest.$ac_ext >&5
2293fi
2294rm -f conftest*
2295echo "$ac_t""$have_long_long" 1>&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002296if test "$have_long_long" = yes ; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002297echo $ac_n "checking size of long long""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002298echo "configure:2299: checking size of long long" >&5
2299if eval "test \"\${ac_cv_sizeof_long_long+set}\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002300 echo $ac_n "(cached) $ac_c" 1>&6
2301else
2302 if test "$cross_compiling" = yes; then
2303 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2304else
2305 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002306#line 2307 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002307#include "confdefs.h"
2308#include <stdio.h>
2309main()
2310{
2311 FILE *f=fopen("conftestval", "w");
2312 if (!f) exit(1);
2313 fprintf(f, "%d\n", sizeof(long long));
2314 exit(0);
2315}
2316EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002317if { (eval echo configure:2318: \"$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 +00002318then
2319 ac_cv_sizeof_long_long=`cat conftestval`
2320else
2321 echo "configure: failed program was:" >&5
2322 cat conftest.$ac_ext >&5
2323 rm -fr conftest*
2324 ac_cv_sizeof_long_long=0
2325fi
2326rm -fr conftest*
2327fi
2328
2329fi
2330echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
2331cat >> confdefs.h <<EOF
2332#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
2333EOF
2334
2335
2336fi
2337
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002338echo $ac_n "checking for uintptr_t support""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002339echo "configure:2340: checking for uintptr_t support" >&5
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002340have_uintptr_t=no
2341cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002342#line 2343 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002343#include "confdefs.h"
2344
2345int main() {
2346uintptr_t x; x = (uintptr_t)0;
2347; return 0; }
2348EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002349if { (eval echo configure:2350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002350 rm -rf conftest*
2351 cat >> confdefs.h <<\EOF
2352#define HAVE_UINTPTR_T 1
2353EOF
2354 have_uintptr_t=yes
2355else
2356 echo "configure: failed program was:" >&5
2357 cat conftest.$ac_ext >&5
2358fi
2359rm -f conftest*
2360echo "$ac_t""$have_uintptr_t" 1>&6
2361if test "$have_uintptr_t" = yes ; then
2362echo $ac_n "checking size of uintptr_t""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002363echo "configure:2364: checking size of uintptr_t" >&5
2364if eval "test \"\${ac_cv_sizeof_uintptr_t+set}\" = set"; then
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002365 echo $ac_n "(cached) $ac_c" 1>&6
2366else
2367 if test "$cross_compiling" = yes; then
2368 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2369else
2370 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002371#line 2372 "configure"
Barry Warsawbc7c7f92000-08-18 04:53:33 +00002372#include "confdefs.h"
2373#include <stdio.h>
2374main()
2375{
2376 FILE *f=fopen("conftestval", "w");
2377 if (!f) exit(1);
2378 fprintf(f, "%d\n", sizeof(uintptr_t));
2379 exit(0);
2380}
2381EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002382if { (eval echo configure:2383: \"$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 +00002383then
2384 ac_cv_sizeof_uintptr_t=`cat conftestval`
2385else
2386 echo "configure: failed program was:" >&5
2387 cat conftest.$ac_ext >&5
2388 rm -fr conftest*
2389 ac_cv_sizeof_uintptr_t=0
2390fi
2391rm -fr conftest*
2392fi
2393
2394fi
2395echo "$ac_t""$ac_cv_sizeof_uintptr_t" 1>&6
2396cat >> confdefs.h <<EOF
2397#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
2398EOF
2399
2400
2401fi
2402
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002403# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
2404echo $ac_n "checking size of off_t""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002405echo "configure:2406: checking size of off_t" >&5
2406if eval "test \"\${ac_cv_sizeof_off_t+set}\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002407 echo $ac_n "(cached) $ac_c" 1>&6
2408else
2409 if test "$cross_compiling" = yes; then
2410 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2411else
2412 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002413#line 2414 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002414#include "confdefs.h"
2415#include <stdio.h>
2416#include <sys/types.h>
2417main()
2418{
2419 FILE *f=fopen("conftestval", "w");
2420 if (!f) exit(1);
2421 fprintf(f, "%d\n", sizeof(off_t));
2422 exit(0);
2423}
2424EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002425if { (eval echo configure:2426: \"$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 +00002426then
2427 ac_cv_sizeof_off_t=`cat conftestval`
2428else
2429 echo "configure: failed program was:" >&5
2430 cat conftest.$ac_ext >&5
2431 rm -fr conftest*
2432 ac_cv_sizeof_off_t=0
2433fi
2434rm -fr conftest*
2435fi
2436
2437
2438fi
2439
2440echo "$ac_t""$ac_cv_sizeof_off_t" 1>&6
2441cat >> confdefs.h <<EOF
2442#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
2443EOF
2444
2445
2446echo $ac_n "checking whether to enable large file support""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002447echo "configure:2448: checking whether to enable large file support" >&5
Guido van Rossum96f2eb91999-04-10 16:02:18 +00002448if test "$have_long_long" = yes -a \
2449 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
2450 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002451 cat >> confdefs.h <<\EOF
2452#define HAVE_LARGEFILE_SUPPORT 1
2453EOF
2454
2455 echo "$ac_t""yes" 1>&6
2456else
2457 echo "$ac_t""no" 1>&6
2458fi
2459
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002460# AC_CHECK_SIZEOF() doesn't include <time.h>.
2461echo $ac_n "checking size of time_t""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002462echo "configure:2463: checking size of time_t" >&5
2463if eval "test \"\${ac_cv_sizeof_time_t+set}\" = set"; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +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
Skip Montanarocb853262000-08-30 22:29:48 +00002470#line 2471 "configure"
Guido van Rossumb9a22a12000-06-30 02:48:53 +00002471#include "confdefs.h"
2472#include <stdio.h>
2473#include <time.h>
2474main()
2475{
2476 FILE *f=fopen("conftestval", "w");
2477 if (!f) exit(1);
2478 fprintf(f, "%d\n", sizeof(time_t));
2479 exit(0);
2480}
2481EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002482if { (eval echo configure:2483: \"$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 +00002483then
2484 ac_cv_sizeof_time_t=`cat conftestval`
2485else
2486 echo "configure: failed program was:" >&5
2487 cat conftest.$ac_ext >&5
2488 rm -fr conftest*
2489 ac_cv_sizeof_time_t=0
2490fi
2491rm -fr conftest*
2492fi
2493
2494
2495fi
2496
2497echo "$ac_t""$ac_cv_sizeof_time_t" 1>&6
2498cat >> confdefs.h <<EOF
2499#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
2500EOF
2501
2502
Guido van Rossumf98e2a71999-01-06 18:53:34 +00002503
Trent Mick635f6fb2000-08-23 21:33:05 +00002504# if have pthread_t then define SIZEOF_PTHREAD_T
2505echo $ac_n "checking for pthread_t""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002506echo "configure:2507: checking for pthread_t" >&5
Trent Mick635f6fb2000-08-23 21:33:05 +00002507have_pthread_t=no
2508cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002509#line 2510 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002510#include "confdefs.h"
2511#include <pthread.h>
2512int main() {
2513pthread_t x; x = (pthread_t)0;
2514; return 0; }
2515EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002516if { (eval echo configure:2517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002517 rm -rf conftest*
2518 have_pthread_t=yes
2519else
2520 echo "configure: failed program was:" >&5
2521 cat conftest.$ac_ext >&5
2522fi
2523rm -f conftest*
2524echo "$ac_t""$have_pthread_t" 1>&6
2525if test "$have_pthread_t" = yes ; then
2526 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
2527 echo $ac_n "checking size of pthread_t""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002528echo "configure:2529: checking size of pthread_t" >&5
2529 if eval "test \"\${ac_cv_sizeof_pthread_t+set}\" = set"; then
Trent Mick635f6fb2000-08-23 21:33:05 +00002530 echo $ac_n "(cached) $ac_c" 1>&6
2531else
2532 if test "$cross_compiling" = yes; then
2533 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
2534else
2535 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002536#line 2537 "configure"
Trent Mick635f6fb2000-08-23 21:33:05 +00002537#include "confdefs.h"
2538#include <stdio.h>
2539 #include <pthread.h>
2540 main()
2541 {
2542 FILE *f=fopen("conftestval", "w");
2543 if (!f) exit(1);
2544 fprintf(f, "%d\n", sizeof(pthread_t));
2545 exit(0);
2546 }
2547EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002548if { (eval echo configure:2549: \"$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 +00002549then
2550 ac_cv_sizeof_pthread_t=`cat conftestval`
2551else
2552 echo "configure: failed program was:" >&5
2553 cat conftest.$ac_ext >&5
2554 rm -fr conftest*
2555 ac_cv_sizeof_pthread_t=0
2556fi
2557rm -fr conftest*
2558fi
2559
2560
2561fi
2562
2563 echo "$ac_t""$ac_cv_sizeof_pthread_t" 1>&6
2564 cat >> confdefs.h <<EOF
2565#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
2566EOF
2567
2568fi
2569
2570
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002571# Minor variations in building a framework between NextStep versions 4 and 5
2572
2573case $ac_sys_system/$ac_sys_release in
2574 next/4*)
2575 ns_undef_sym='__environ'
2576 LIBTOOL_CRUFT="-U $ns_undef_sym" ;;
2577 next/5*)
2578 ns_undef_sym='_environ'
2579 LIBTOOL_CRUFT="-lcc_dynamic -U $ns_undef_sym" ;;
2580esac
2581
2582echo $ac_n "checking for --with-next-framework""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002583echo "configure:2584: checking for --with-next-framework" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002584if test "$with_next_framework"
2585then
2586 OPT="$OPT -fno-common"
2587 # -U __environ is needed since bundles don't have access
2588 # to crt0 when built but will always be linked against it
2589 LDFLAGS="$LDFLAGS -Wl,-U,$ns_undef_sym"
2590 cat >> confdefs.h <<\EOF
2591#define WITH_NEXT_FRAMEWORK 1
2592EOF
2593
2594 echo "$ac_t""yes" 1>&6
2595else
2596 echo "$ac_t""no" 1>&6
2597fi
2598
2599echo $ac_n "checking for --with-dyld""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002600echo "configure:2601: checking for --with-dyld" >&5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002601if test "$with_next_framework" -o "$with_dyld"
2602then
2603 if test "$with_dyld"
2604 then
2605 echo "$ac_t""yes" 1>&6
2606 else
2607 echo "$ac_t""required for framework build" 1>&6
2608 fi
2609 cat >> confdefs.h <<\EOF
2610#define WITH_DYLD 1
2611EOF
2612
2613 ns_dyld='set'
2614else
2615 echo "$ac_t""no" 1>&6
2616fi
2617
Guido van Rossum0a516c91994-09-12 10:58:40 +00002618# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00002619
2620
2621
2622
Guido van Rossum0a516c91994-09-12 10:58:40 +00002623# SO is the extension of shared libraries `(including the dot!)
2624# -- usually .so, .sl on HP-UX
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002625echo $ac_n "checking SO""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002626echo "configure:2627: checking SO" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002627if test -z "$SO"
2628then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002629 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00002630 hp*|HP*) SO=.sl;;
2631 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002632 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002633fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002634echo "$ac_t""$SO" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002635# LDSHARED is the ld *command* used to create shared library
2636# -- "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 +00002637# (Shared libraries in this instance are shared modules to be loaded into
2638# Python, as opposed to building Python itself as a shared library.)
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002639echo $ac_n "checking LDSHARED""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002640echo "configure:2641: checking LDSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002641if test -z "$LDSHARED"
2642then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002643 case $ac_sys_system/$ac_sys_release in
Guido van Rossum45140f91997-08-29 18:44:06 +00002644 AIX*) LDSHARED="\$(srcdir)/ld_so_aix \$(CC)";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002645 BeOS*) LDSHARED="\$(srcdir)/../BeOS/linkmodule -L.. -lpython\$(VERSION)";;
Guido van Rossum07397971997-04-29 21:49:50 +00002646 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00002647 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002648 SunOS/4*) LDSHARED="ld";;
Greg Ward57c9a6632000-05-26 12:22:54 +00002649 SunOS/5*)
2650 if test "$GCC" = "yes"
2651 then LDSHARED='$(CC) -G'
2652 else LDSHARED="ld -G";
2653 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002654 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00002655 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
2656 DYNIX/ptx*) LDSHARED="ld -G";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002657 next/*)
2658 if test "$ns_dyld"
2659 then LDSHARED='$(CC) $(LDFLAGS) -bundle -prebind'
2660 else LDSHARED='$(CC) $(CFLAGS) -nostdlib -r';
2661 fi
2662 if test "$with_next_framework" ; then
2663 LDSHARED="$LDSHARED \$(LDLIBRARY)"
2664 fi ;;
Guido van Rossum81652ab1996-07-21 02:53:27 +00002665 Linux*) LDSHARED="gcc -shared";;
Guido van Rossum3c4bb801997-12-18 23:55:32 +00002666 dgux*) LDSHARED="ld -G";;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00002667 BSD/OS*/4*) LDSHARED="gcc -shared";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002668 OpenBSD*) LDSHARED="ld -Bshareable";;
Guido van Rossumdf693651999-01-07 21:50:41 +00002669 NetBSD*)
2670 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2671 then
2672 LDSHARED="cc -shared"
2673 else
2674 LDSHARED="ld -Bshareable"
2675 fi;;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002676 FreeBSD*)
2677 if "`$CC -dM -E - </dev/null | grep __ELF__`" != ""
2678 then
2679 LDSHARED="cc -shared ${LDFLAGS}"
2680 else
2681 LDSHARED="ld -Bshareable ${LDFLAGS}"
2682 fi;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002683 SCO_SV*) LDSHARED="cc -G -KPIC -Ki486 -belf -Wl,-Bexport";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002684 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002685 *) LDSHARED="ld";;
2686 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002687fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002688echo "$ac_t""$LDSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002689# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002690# library (module) -- this is only needed for a few systems
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002691echo $ac_n "checking CCSHARED""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002692echo "configure:2693: checking CCSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002693if test -z "$CCSHARED"
2694then
Guido van Rossum07397971997-04-29 21:49:50 +00002695 case $ac_sys_system/$ac_sys_release in
Guido van Rossumaf07a441995-02-13 19:45:27 +00002696 hp*|HP*) if test "$GCC" = yes;
2697 then CCSHARED="-fpic";
2698 else CCSHARED="+z";
2699 fi;;
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002700 Linux*) CCSHARED="-fpic";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002701 BSD/OS*/4*) CCSHARED="-fpic";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002702 OpenBSD*) CCSHARED="-fpic";;
2703 FreeBSD*|NetBSD*) CCSHARED="-fPIC";;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002704 SCO_SV*) CCSHARED="-KPIC -dy -Bdynamic";;
Trent Mick635f6fb2000-08-23 21:33:05 +00002705 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002706 IRIX*/6*) case $CC in
2707 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00002708 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002709 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002710 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002711fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002712echo "$ac_t""$CCSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002713# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002714# the python executable -- this is only needed for a few systems
2715echo $ac_n "checking LINKFORSHARED""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002716echo "configure:2717: checking LINKFORSHARED" >&5
Guido van Rossum0a516c91994-09-12 10:58:40 +00002717if test -z "$LINKFORSHARED"
2718then
Guido van Rossum07397971997-04-29 21:49:50 +00002719 case $ac_sys_system/$ac_sys_release in
Guido van Rossum69f65801998-03-03 21:47:00 +00002720 AIX*) LINKFORSHARED='-Wl,-bE:python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00002721 hp*|HP*)
Guido van Rossum304dd2d1997-10-20 23:10:56 +00002722 LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00002723 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum2d9feed1997-11-24 17:36:21 +00002724 Linux*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00002725 # -u libsys_s pulls in all symbols in libsys
2726 next/2*|next/3*) LINKFORSHARED="-u libsys_s";;
2727 # -u __dummy makes the linker aware of the objc runtime
2728 # in System.framework; otherwise, __objcInit (referenced in
2729 # crt1.o) gets erroneously defined as common, which breaks dynamic
2730 # loading of any modules which reference it in System.framework
2731 next/4*|next/5*) LINKFORSHARED="-u __dummy -framework System" ;;
Guido van Rossum84e7b241996-08-19 21:59:00 +00002732 SCO_SV*) LINKFORSHARED="-Bdynamic -dy -Wl,-Bexport";;
Guido van Rossum0286ae82000-08-29 15:06:49 +00002733 FreeBSD*|NetBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00002734 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
2735 then
2736 LINKFORSHARED="-Wl,--export-dynamic"
2737 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002738 SunOS/5*) case $CC in
2739 *gcc*)
Guido van Rossumff484182000-02-03 13:50:24 +00002740 if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00002741 then
2742 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00002743 fi;;
2744 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00002745 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00002746fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002747echo "$ac_t""$LINKFORSHARED" 1>&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00002748
Guido van Rossum627b2d71993-12-24 10:39:16 +00002749# checks for libraries
Guido van Rossumf78abae1997-01-21 22:02:36 +00002750echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002751echo "configure:2752: checking for dlopen in -ldl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002752ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00002753if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002754 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002755else
2756 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002757LIBS="-ldl $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002758cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002759#line 2760 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002760#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002761/* Override any gcc2 internal prototype to avoid an error. */
2762/* We use char because int might match the return type of a gcc2
2763 builtin and then its argument prototype would still apply. */
2764char dlopen();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002765
Guido van Rossumf78abae1997-01-21 22:02:36 +00002766int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002767dlopen()
2768; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002769EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002770if { (eval echo configure:2771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002771 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002772 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002773else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002774 echo "configure: failed program was:" >&5
2775 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002776 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002777 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002778fi
2779rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002780LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002781
Guido van Rossum627b2d71993-12-24 10:39:16 +00002782fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002783if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002784 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002785 ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2786 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002787 cat >> confdefs.h <<EOF
2788#define $ac_tr_lib 1
2789EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002790
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002791 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002792
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002794 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002795fi
2796 # Dynamic linking for SunOS/Solaris and SYSV
Guido van Rossumf78abae1997-01-21 22:02:36 +00002797echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002798echo "configure:2799: checking for shl_load in -ldld" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002799ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00002800if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002801 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002802else
2803 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002804LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002805cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002806#line 2807 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002807#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002808/* Override any gcc2 internal prototype to avoid an error. */
2809/* We use char because int might match the return type of a gcc2
2810 builtin and then its argument prototype would still apply. */
2811char shl_load();
Guido van Rossum627b2d71993-12-24 10:39:16 +00002812
Guido van Rossumf78abae1997-01-21 22:02:36 +00002813int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002814shl_load()
2815; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002816EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002817if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002818 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002819 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002820else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002821 echo "configure: failed program was:" >&5
2822 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002823 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002824 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002825fi
2826rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002827LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002828
Guido van Rossum627b2d71993-12-24 10:39:16 +00002829fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002830if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002831 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00002832 ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2833 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002834 cat >> confdefs.h <<EOF
2835#define $ac_tr_lib 1
2836EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002837
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002838 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002839
2840else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002841 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002842fi
2843 # Dynamic linking for HP-UX
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002844
Skip Montanarocb853262000-08-30 22:29:48 +00002845# Check for --with-pydebug
2846echo $ac_n "checking for --with-pydebug""... $ac_c" 1>&6
2847echo "configure:2848: checking for --with-pydebug" >&5
2848# Check whether --with-pydebug or --without-pydebug was given.
2849if test "${with_pydebug+set}" = set; then
2850 withval="$with_pydebug"
2851
2852if test "$withval" != no
2853then cat >> confdefs.h <<\EOF
2854#define Py_DEBUG 1
2855EOF
2856 echo "$ac_t""yes" 1>&6
2857else echo "$ac_t""no" 1>&6
2858fi
2859else
2860 echo "$ac_t""no" 1>&6
2861fi
2862
2863
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002864# checks for system dependent C++ extensions support
2865case "$ac_sys_system" in
2866 AIX*) echo $ac_n "checking for genuine AIX C++ extensions support""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002867echo "configure:2868: checking for genuine AIX C++ extensions support" >&5
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002868 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002869#line 2870 "configure"
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002870#include "confdefs.h"
2871#include "/usr/lpp/xlC/include/load.h"
2872int main() {
2873loadAndInit("", 0, "")
2874; return 0; }
2875EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002876if { (eval echo configure:2877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00002877 rm -rf conftest*
2878 cat >> confdefs.h <<\EOF
2879#define AIX_GENUINE_CPLUSPLUS 1
2880EOF
2881
2882 echo "$ac_t""yes" 1>&6
2883else
2884 echo "configure: failed program was:" >&5
2885 cat conftest.$ac_ext >&5
2886 rm -rf conftest*
2887 echo "$ac_t""no" 1>&6
2888fi
2889rm -f conftest*;;
2890 *) ;;
2891esac
2892
Guido van Rossum70c7f481998-03-26 18:44:10 +00002893# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
2894# However on SGI IRIX, these exist but are broken.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002895# BeOS' sockets are stashed in libnet.
2896case "$ac_sys_system" in
2897IRIX*) ;;
Guido van Rossumb93a8621998-05-07 13:27:32 +00002898*)
Guido van Rossumf78abae1997-01-21 22:02:36 +00002899echo $ac_n "checking for t_open in -lnsl""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002900echo "configure:2901: checking for t_open in -lnsl" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002901ac_lib_var=`echo nsl'_'t_open | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00002902if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002903 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002904else
2905 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002906LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002907cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002908#line 2909 "configure"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002909#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002910/* Override any gcc2 internal prototype to avoid an error. */
2911/* We use char because int might match the return type of a gcc2
2912 builtin and then its argument prototype would still apply. */
2913char t_open();
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002914
Guido van Rossumf78abae1997-01-21 22:02:36 +00002915int main() {
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002916t_open()
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002917; return 0; }
2918EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002919if { (eval echo configure:2920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002920 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002921 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002922else
Guido van Rossumf78abae1997-01-21 22:02:36 +00002923 echo "configure: failed program was:" >&5
2924 cat conftest.$ac_ext >&5
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002925 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002926 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002927fi
2928rm -f conftest*
2929LIBS="$ac_save_LIBS"
2930
2931fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002932if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002933 echo "$ac_t""yes" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002934 LIBS="-lnsl $LIBS"
2935else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002936 echo "$ac_t""no" 1>&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00002937fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00002938 # SVR4
Guido van Rossumf78abae1997-01-21 22:02:36 +00002939echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002940echo "configure:2941: checking for socket in -lsocket" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00002941ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00002942if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002943 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002944else
2945 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00002946LIBS="-lsocket $LIBS $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002947cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002948#line 2949 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002949#include "confdefs.h"
2950/* Override any gcc2 internal prototype to avoid an error. */
2951/* We use char because int might match the return type of a gcc2
2952 builtin and then its argument prototype would still apply. */
2953char socket();
2954
2955int main() {
2956socket()
2957; return 0; }
2958EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002959if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00002960 rm -rf conftest*
2961 eval "ac_cv_lib_$ac_lib_var=yes"
2962else
2963 echo "configure: failed program was:" >&5
2964 cat conftest.$ac_ext >&5
2965 rm -rf conftest*
2966 eval "ac_cv_lib_$ac_lib_var=no"
2967fi
2968rm -f conftest*
2969LIBS="$ac_save_LIBS"
2970
2971fi
2972if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2973 echo "$ac_t""yes" 1>&6
Guido van Rossumad678af1998-10-02 14:42:15 +00002974 LIBS="-lsocket $LIBS"
2975else
2976 echo "$ac_t""no" 1>&6
2977fi
2978 # SVR4 sockets
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00002979;;
2980esac
2981case "$ac_sys_system" in
2982BeOS*)
Guido van Rossumad678af1998-10-02 14:42:15 +00002983echo $ac_n "checking for socket in -lnet""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00002984echo "configure:2985: checking for socket in -lnet" >&5
Guido van Rossumad678af1998-10-02 14:42:15 +00002985ac_lib_var=`echo net'_'socket | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00002986if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00002987 echo $ac_n "(cached) $ac_c" 1>&6
2988else
2989 ac_save_LIBS="$LIBS"
2990LIBS="-lnet $LIBS $LIBS"
2991cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00002992#line 2993 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00002993#include "confdefs.h"
2994/* Override any gcc2 internal prototype to avoid an error. */
2995/* We use char because int might match the return type of a gcc2
2996 builtin and then its argument prototype would still apply. */
2997char socket();
2998
2999int main() {
3000socket()
3001; return 0; }
3002EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003003if { (eval echo configure:3004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003004 rm -rf conftest*
3005 eval "ac_cv_lib_$ac_lib_var=yes"
3006else
3007 echo "configure: failed program was:" >&5
3008 cat conftest.$ac_ext >&5
3009 rm -rf conftest*
3010 eval "ac_cv_lib_$ac_lib_var=no"
3011fi
3012rm -f conftest*
3013LIBS="$ac_save_LIBS"
3014
3015fi
3016if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3017 echo "$ac_t""yes" 1>&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003018 LIBS="-lnet $LIBS"
3019else
3020 echo "$ac_t""no" 1>&6
3021fi
3022 # BeOS
3023;;
3024esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00003025
Guido van Rossuma68acba1996-07-31 17:36:39 +00003026echo $ac_n "checking for --with-libs""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003027echo "configure:3028: checking for --with-libs" >&5
Guido van Rossuma68acba1996-07-31 17:36:39 +00003028# Check whether --with-libs or --without-libs was given.
3029if test "${with_libs+set}" = set; then
3030 withval="$with_libs"
3031
3032echo "$ac_t""$withval" 1>&6
3033LIBS="$withval $LIBS"
3034
3035else
3036 echo "$ac_t""no" 1>&6
3037fi
3038
Guido van Rossum7f43da71994-08-01 12:15:30 +00003039
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003040echo $ac_n "checking for --with(out)-readline""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003041echo "configure:3042: checking for --with(out)-readline" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003042# Check whether --with-readline or --without-readline was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003043if test "${with_readline+set}" = set; then
3044 withval="$with_readline"
Guido van Rossumb06df271997-08-05 21:50:20 +00003045 echo "$ac_t""$withval" 1>&6
3046{ echo "configure: error: --with(out)-readline is obsolete" 1>&2; exit 1; }
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003047else
Guido van Rossumb06df271997-08-05 21:50:20 +00003048 echo "$ac_t""not specified." 1>&6
Guido van Rossum3c83bb41996-12-31 22:35:16 +00003049fi
3050
Guido van Rossum7f43da71994-08-01 12:15:30 +00003051
Guido van Rossum009f7871997-12-04 00:51:42 +00003052
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003053USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00003054
Guido van Rossumec2f0731997-01-22 20:54:01 +00003055echo $ac_n "checking for --with-dec-threads""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003056echo "configure:3057: checking for --with-dec-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003057
3058# Check whether --with-dec-threads or --without-dec-threads was given.
3059if test "${with_dec_threads+set}" = set; then
3060 withval="$with_dec_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003061
3062echo "$ac_t""$withval" 1>&6
Guido van Rossumec2f0731997-01-22 20:54:01 +00003063LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00003064if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00003065 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00003066fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00003067else
3068 echo "$ac_t""no" 1>&6
3069fi
3070
3071
3072echo $ac_n "checking for --with-threads""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003073echo "configure:3074: checking for --with-threads" >&5
Guido van Rossumec2f0731997-01-22 20:54:01 +00003074# Check whether --with-threads or --without-threads was given.
3075if test "${with_threads+set}" = set; then
3076 withval="$with_threads"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003077 :
Guido van Rossumec2f0731997-01-22 20:54:01 +00003078fi
3079
3080
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003081# --with-thread is deprecated, but check for it anyway
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003082# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003083if test "${with_thread+set}" = set; then
3084 withval="$with_thread"
Barry Warsawa0f3c5c2000-06-30 16:39:35 +00003085
3086with_threads=$with_thread
Guido van Rossum7f43da71994-08-01 12:15:30 +00003087fi
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003088
3089
3090if test -z "$with_threads"
3091then with_threads="yes"
3092fi
3093echo "$ac_t""$with_threads" 1>&6
3094
3095if test "$with_threads" = "no"
3096then
3097 USE_THREAD_MODULE="#"
3098else
3099 if test -d "$with_threads"
3100 then LDFLAGS="$LDFLAGS -L$with_threads"
3101 fi
3102 if test -d "$withval"
3103 then LDFLAGS="$LDFLAGS -L$withval"
3104 fi
3105 cat >> confdefs.h <<\EOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +00003106#define _REENTRANT 1
3107EOF
3108
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003109 ac_safe=`echo "mach/cthreads.h" | sed 'y%./+-%__p_%'`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003110echo $ac_n "checking for mach/cthreads.h""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003111echo "configure:3112: checking for mach/cthreads.h" >&5
3112if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003113 echo $ac_n "(cached) $ac_c" 1>&6
3114else
3115 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003116#line 3117 "configure"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003117#include "confdefs.h"
3118#include <mach/cthreads.h>
3119EOF
3120ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Skip Montanarocb853262000-08-30 22:29:48 +00003121{ (eval echo configure:3122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003122ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003123if test -z "$ac_err"; then
3124 rm -rf conftest*
3125 eval "ac_cv_header_$ac_safe=yes"
3126else
3127 echo "$ac_err" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003128 echo "configure: failed program was:" >&5
3129 cat conftest.$ac_ext >&5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003130 rm -rf conftest*
3131 eval "ac_cv_header_$ac_safe=no"
3132fi
3133rm -f conftest*
3134fi
3135if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3136 echo "$ac_t""yes" 1>&6
3137 cat >> confdefs.h <<\EOF
3138#define WITH_THREAD 1
3139EOF
3140
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003141 cat >> confdefs.h <<\EOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003142#define C_THREADS 1
3143EOF
3144
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003145 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003146else
3147 echo "$ac_t""no" 1>&6
3148
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003149 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003150echo "configure:3151: checking for pthread_create in -lpthread" >&5
Guido van Rossum02a1c402000-02-25 19:26:31 +00003151ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00003152if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003153 echo $ac_n "(cached) $ac_c" 1>&6
3154else
3155 ac_save_LIBS="$LIBS"
3156LIBS="-lpthread $LIBS"
3157cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003158#line 3159 "configure"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003159#include "confdefs.h"
3160/* Override any gcc2 internal prototype to avoid an error. */
3161/* We use char because int might match the return type of a gcc2
3162 builtin and then its argument prototype would still apply. */
3163char pthread_create();
3164
3165int main() {
3166pthread_create()
3167; return 0; }
3168EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003169if { (eval echo configure:3170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum02a1c402000-02-25 19:26:31 +00003170 rm -rf conftest*
3171 eval "ac_cv_lib_$ac_lib_var=yes"
3172else
3173 echo "configure: failed program was:" >&5
3174 cat conftest.$ac_ext >&5
3175 rm -rf conftest*
3176 eval "ac_cv_lib_$ac_lib_var=no"
3177fi
3178rm -f conftest*
3179LIBS="$ac_save_LIBS"
3180
3181fi
3182if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3183 echo "$ac_t""yes" 1>&6
3184 cat >> confdefs.h <<\EOF
3185#define WITH_THREAD 1
3186EOF
3187
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003188 cat >> confdefs.h <<\EOF
Guido van Rossum02a1c402000-02-25 19:26:31 +00003189#define _POSIX_THREADS 1
3190EOF
3191
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003192 LIBS="-lpthread $LIBS"
3193 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00003194else
3195 echo "$ac_t""no" 1>&6
3196
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003197 echo $ac_n "checking for pthread_detach""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003198echo "configure:3199: checking for pthread_detach" >&5
3199if eval "test \"\${ac_cv_func_pthread_detach+set}\" = set"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003200 echo $ac_n "(cached) $ac_c" 1>&6
3201else
3202 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003203#line 3204 "configure"
Guido van Rossumad678af1998-10-02 14:42:15 +00003204#include "confdefs.h"
3205/* System header to define __stub macros and hopefully few prototypes,
Guido van Rossumea516321998-12-17 18:08:55 +00003206 which can conflict with char pthread_detach(); below. */
Guido van Rossumad678af1998-10-02 14:42:15 +00003207#include <assert.h>
3208/* Override any gcc2 internal prototype to avoid an error. */
3209/* We use char because int might match the return type of a gcc2
3210 builtin and then its argument prototype would still apply. */
Guido van Rossumea516321998-12-17 18:08:55 +00003211char pthread_detach();
Skip Montanarocb853262000-08-30 22:29:48 +00003212char (*f)();
Guido van Rossumad678af1998-10-02 14:42:15 +00003213
3214int main() {
3215
3216/* The GNU C library defines this for functions which it implements
3217 to always fail with ENOSYS. Some functions are actually named
3218 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +00003219#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +00003220choke me
3221#else
Skip Montanarocb853262000-08-30 22:29:48 +00003222f = pthread_detach;
Guido van Rossumad678af1998-10-02 14:42:15 +00003223#endif
3224
3225; return 0; }
3226EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003227if { (eval echo configure:3228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003228 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003229 eval "ac_cv_func_pthread_detach=yes"
Guido van Rossumad678af1998-10-02 14:42:15 +00003230else
3231 echo "configure: failed program was:" >&5
3232 cat conftest.$ac_ext >&5
3233 rm -rf conftest*
Guido van Rossumea516321998-12-17 18:08:55 +00003234 eval "ac_cv_func_pthread_detach=no"
Guido van Rossumad678af1998-10-02 14:42:15 +00003235fi
3236rm -f conftest*
3237fi
3238
Guido van Rossumea516321998-12-17 18:08:55 +00003239if eval "test \"`echo '$ac_cv_func_'pthread_detach`\" = yes"; then
Guido van Rossumad678af1998-10-02 14:42:15 +00003240 echo "$ac_t""yes" 1>&6
3241 cat >> confdefs.h <<\EOF
3242#define WITH_THREAD 1
3243EOF
3244
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003245 cat >> confdefs.h <<\EOF
Guido van Rossumad678af1998-10-02 14:42:15 +00003246#define _POSIX_THREADS 1
3247EOF
3248
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003249 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00003250else
3251 echo "$ac_t""no" 1>&6
3252
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003253 ac_safe=`echo "kernel/OS.h" | sed 'y%./+-%__p_%'`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003254echo $ac_n "checking for kernel/OS.h""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003255echo "configure:3256: checking for kernel/OS.h" >&5
3256if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003257 echo $ac_n "(cached) $ac_c" 1>&6
3258else
3259 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003260#line 3261 "configure"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003261#include "confdefs.h"
3262#include <kernel/OS.h>
3263EOF
3264ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Skip Montanarocb853262000-08-30 22:29:48 +00003265{ (eval echo configure:3266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003266ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003267if test -z "$ac_err"; then
3268 rm -rf conftest*
3269 eval "ac_cv_header_$ac_safe=yes"
3270else
3271 echo "$ac_err" >&5
3272 echo "configure: failed program was:" >&5
3273 cat conftest.$ac_ext >&5
3274 rm -rf conftest*
3275 eval "ac_cv_header_$ac_safe=no"
3276fi
3277rm -f conftest*
3278fi
3279if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3280 echo "$ac_t""yes" 1>&6
3281 cat >> confdefs.h <<\EOF
3282#define WITH_THREAD 1
3283EOF
3284
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003285 cat >> confdefs.h <<\EOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003286#define BEOS_THREADS 1
3287EOF
3288
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003289 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003290else
3291 echo "$ac_t""no" 1>&6
3292
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003293 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003294echo "configure:3295: checking for pthread_create in -lpthreads" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003295ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00003296if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003297 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003298else
3299 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003300LIBS="-lpthreads $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003301cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003302#line 3303 "configure"
Greg Steinadf63d62000-07-05 10:38:09 +00003303#include "confdefs.h"
3304/* Override any gcc2 internal prototype to avoid an error. */
3305/* We use char because int might match the return type of a gcc2
3306 builtin and then its argument prototype would still apply. */
3307char pthread_create();
3308
3309int main() {
3310pthread_create()
3311; return 0; }
3312EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003313if { (eval echo configure:3314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Greg Steinadf63d62000-07-05 10:38:09 +00003314 rm -rf conftest*
3315 eval "ac_cv_lib_$ac_lib_var=yes"
3316else
3317 echo "configure: failed program was:" >&5
3318 cat conftest.$ac_ext >&5
3319 rm -rf conftest*
3320 eval "ac_cv_lib_$ac_lib_var=no"
3321fi
3322rm -f conftest*
3323LIBS="$ac_save_LIBS"
3324
3325fi
3326if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3327 echo "$ac_t""yes" 1>&6
3328 cat >> confdefs.h <<\EOF
3329#define WITH_THREAD 1
3330EOF
3331
3332 cat >> confdefs.h <<\EOF
3333#define _POSIX_THREADS 1
3334EOF
3335
3336 LIBS="$LIBS -lpthreads"
3337 LIBOBJS="$LIBOBJS thread.o"
3338else
3339 echo "$ac_t""no" 1>&6
3340
3341 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003342echo "configure:3343: checking for pthread_create in -lc_r" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003343ac_lib_var=`echo c_r'_'pthread_create | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00003344if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Greg Steinadf63d62000-07-05 10:38:09 +00003345 echo $ac_n "(cached) $ac_c" 1>&6
3346else
3347 ac_save_LIBS="$LIBS"
3348LIBS="-lc_r $LIBS"
3349cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003350#line 3351 "configure"
Guido van Rossum49545951997-12-02 19:28:29 +00003351#include "confdefs.h"
3352/* Override any gcc2 internal prototype to avoid an error. */
3353/* We use char because int might match the return type of a gcc2
3354 builtin and then its argument prototype would still apply. */
3355char pthread_create();
3356
3357int main() {
3358pthread_create()
3359; return 0; }
3360EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003361if { (eval echo configure:3362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum49545951997-12-02 19:28:29 +00003362 rm -rf conftest*
3363 eval "ac_cv_lib_$ac_lib_var=yes"
3364else
3365 echo "configure: failed program was:" >&5
3366 cat conftest.$ac_ext >&5
3367 rm -rf conftest*
3368 eval "ac_cv_lib_$ac_lib_var=no"
3369fi
3370rm -f conftest*
3371LIBS="$ac_save_LIBS"
3372
3373fi
3374if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3375 echo "$ac_t""yes" 1>&6
3376 cat >> confdefs.h <<\EOF
3377#define WITH_THREAD 1
3378EOF
3379
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003380 cat >> confdefs.h <<\EOF
Guido van Rossum49545951997-12-02 19:28:29 +00003381#define _POSIX_THREADS 1
3382EOF
3383
Greg Steinadf63d62000-07-05 10:38:09 +00003384 LIBS="$LIBS -lc_r"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003385 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003386else
3387 echo "$ac_t""no" 1>&6
3388
Greg Steinadf63d62000-07-05 10:38:09 +00003389 echo $ac_n "checking for __d6_pthread_create in -lthread""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003390echo "configure:3391: checking for __d6_pthread_create in -lthread" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003391ac_lib_var=`echo thread'_'__d6_pthread_create | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00003392if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003393 echo $ac_n "(cached) $ac_c" 1>&6
3394else
3395 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003396LIBS="-lthread $LIBS"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003397cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003398#line 3399 "configure"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003399#include "confdefs.h"
3400/* Override any gcc2 internal prototype to avoid an error. */
3401/* We use char because int might match the return type of a gcc2
3402 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003403char __d6_pthread_create();
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003404
3405int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003406__d6_pthread_create()
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003407; return 0; }
3408EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003409if { (eval echo configure:3410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003410 rm -rf conftest*
3411 eval "ac_cv_lib_$ac_lib_var=yes"
3412else
3413 echo "configure: failed program was:" >&5
3414 cat conftest.$ac_ext >&5
3415 rm -rf conftest*
3416 eval "ac_cv_lib_$ac_lib_var=no"
3417fi
3418rm -f conftest*
3419LIBS="$ac_save_LIBS"
3420
3421fi
3422if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3423 echo "$ac_t""yes" 1>&6
3424 cat >> confdefs.h <<\EOF
3425#define WITH_THREAD 1
3426EOF
3427
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003428 cat >> confdefs.h <<\EOF
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003429#define _POSIX_THREADS 1
3430EOF
3431
Greg Steinadf63d62000-07-05 10:38:09 +00003432 LIBS="$LIBS -lthread"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003433 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum49545951997-12-02 19:28:29 +00003434else
3435 echo "$ac_t""no" 1>&6
3436
Greg Steinadf63d62000-07-05 10:38:09 +00003437 echo $ac_n "checking for pth_init in -lpth""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003438echo "configure:3439: checking for pth_init in -lpth" >&5
Greg Steinadf63d62000-07-05 10:38:09 +00003439ac_lib_var=`echo pth'_'pth_init | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00003440if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003441 echo $ac_n "(cached) $ac_c" 1>&6
3442else
3443 ac_save_LIBS="$LIBS"
Greg Steinadf63d62000-07-05 10:38:09 +00003444LIBS="-lpth $LIBS"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003445cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003446#line 3447 "configure"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003447#include "confdefs.h"
3448/* Override any gcc2 internal prototype to avoid an error. */
3449/* We use char because int might match the return type of a gcc2
3450 builtin and then its argument prototype would still apply. */
Greg Steinadf63d62000-07-05 10:38:09 +00003451char pth_init();
Guido van Rossum0be3e491997-05-22 20:33:33 +00003452
3453int main() {
Greg Steinadf63d62000-07-05 10:38:09 +00003454pth_init()
Guido van Rossum0be3e491997-05-22 20:33:33 +00003455; return 0; }
3456EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003457if { (eval echo configure:3458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum0be3e491997-05-22 20:33:33 +00003458 rm -rf conftest*
3459 eval "ac_cv_lib_$ac_lib_var=yes"
3460else
3461 echo "configure: failed program was:" >&5
3462 cat conftest.$ac_ext >&5
3463 rm -rf conftest*
3464 eval "ac_cv_lib_$ac_lib_var=no"
3465fi
3466rm -f conftest*
3467LIBS="$ac_save_LIBS"
3468
3469fi
3470if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3471 echo "$ac_t""yes" 1>&6
3472 cat >> confdefs.h <<\EOF
3473#define WITH_THREAD 1
3474EOF
3475
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003476 cat >> confdefs.h <<\EOF
Greg Steinadf63d62000-07-05 10:38:09 +00003477#define _GNU_PTH 1
Guido van Rossum0be3e491997-05-22 20:33:33 +00003478EOF
3479
Greg Steinadf63d62000-07-05 10:38:09 +00003480 LIBS="-lpth $LIBS"
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003481 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossum0be3e491997-05-22 20:33:33 +00003482else
3483 echo "$ac_t""no" 1>&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00003484
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003485 echo $ac_n "checking for pthread_create in -lcma""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003486echo "configure:3487: checking for pthread_create in -lcma" >&5
Guido van Rossumb93a8621998-05-07 13:27:32 +00003487ac_lib_var=`echo cma'_'pthread_create | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00003488if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003489 echo $ac_n "(cached) $ac_c" 1>&6
3490else
3491 ac_save_LIBS="$LIBS"
3492LIBS="-lcma $LIBS"
3493cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003494#line 3495 "configure"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003495#include "confdefs.h"
3496/* Override any gcc2 internal prototype to avoid an error. */
3497/* We use char because int might match the return type of a gcc2
3498 builtin and then its argument prototype would still apply. */
3499char pthread_create();
3500
3501int main() {
3502pthread_create()
3503; return 0; }
3504EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003505if { (eval echo configure:3506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumb93a8621998-05-07 13:27:32 +00003506 rm -rf conftest*
3507 eval "ac_cv_lib_$ac_lib_var=yes"
3508else
3509 echo "configure: failed program was:" >&5
3510 cat conftest.$ac_ext >&5
3511 rm -rf conftest*
3512 eval "ac_cv_lib_$ac_lib_var=no"
3513fi
3514rm -f conftest*
3515LIBS="$ac_save_LIBS"
3516
3517fi
3518if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3519 echo "$ac_t""yes" 1>&6
3520 cat >> confdefs.h <<\EOF
3521#define WITH_THREAD 1
3522EOF
3523
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003524 cat >> confdefs.h <<\EOF
Guido van Rossumb93a8621998-05-07 13:27:32 +00003525#define _POSIX_THREADS 1
3526EOF
3527
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003528 LIBS="$LIBS -lcma"
3529 LIBOBJS="$LIBOBJS thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00003530else
3531 echo "$ac_t""no" 1>&6
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003532
3533 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00003534fi
3535
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003536
Guido van Rossum627b2d71993-12-24 10:39:16 +00003537fi
3538
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003539fi
3540
Guido van Rossum0be3e491997-05-22 20:33:33 +00003541fi
3542
Guido van Rossum49545951997-12-02 19:28:29 +00003543fi
3544
Guido van Rossumb93a8621998-05-07 13:27:32 +00003545fi
3546
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003547fi
3548
Guido van Rossumad678af1998-10-02 14:42:15 +00003549fi
3550
Guido van Rossum07bd90e2000-05-08 13:41:38 +00003551fi
3552
Guido van Rossum0be3e491997-05-22 20:33:33 +00003553
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003554 echo $ac_n "checking for usconfig in -lmpc""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003555echo "configure:3556: checking for usconfig in -lmpc" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003556ac_lib_var=`echo mpc'_'usconfig | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00003557if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003558 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003559else
3560 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003561LIBS="-lmpc $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003562cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003563#line 3564 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003564#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003565/* Override any gcc2 internal prototype to avoid an error. */
3566/* We use char because int might match the return type of a gcc2
3567 builtin and then its argument prototype would still apply. */
3568char usconfig();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003569
Guido van Rossumf78abae1997-01-21 22:02:36 +00003570int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003571usconfig()
3572; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003573EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003574if { (eval echo configure:3575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003575 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003576 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003577else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003578 echo "configure: failed program was:" >&5
3579 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003580 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003581 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003582fi
3583rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003584LIBS="$ac_save_LIBS"
3585
3586fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003587if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003588 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003589 cat >> confdefs.h <<\EOF
3590#define WITH_THREAD 1
3591EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003592
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003593 LIBS="$LIBS -lmpc"
3594 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003595 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003596else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003597 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003598fi
3599
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003600 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003601echo "configure:3602: checking for thr_create in -lthread" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00003602ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00003603if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003604 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003605else
3606 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003607LIBS="-lthread $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003608cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003609#line 3610 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003610#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003611/* Override any gcc2 internal prototype to avoid an error. */
3612/* We use char because int might match the return type of a gcc2
3613 builtin and then its argument prototype would still apply. */
3614char thr_create();
Guido van Rossum627b2d71993-12-24 10:39:16 +00003615
Guido van Rossumf78abae1997-01-21 22:02:36 +00003616int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003617thr_create()
3618; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003619EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003620if { (eval echo configure:3621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003621 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003622 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003623else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003624 echo "configure: failed program was:" >&5
3625 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003626 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003627 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003628fi
3629rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003630LIBS="$ac_save_LIBS"
3631
3632fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003633if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003634 echo "$ac_t""yes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003635 cat >> confdefs.h <<\EOF
3636#define WITH_THREAD 1
3637EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00003638
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00003639 LIBS="$LIBS -lthread"
3640 LIBOBJS="$LIBOBJS thread.o"
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00003641 USE_THREAD_MODULE=""
Guido van Rossum7f43da71994-08-01 12:15:30 +00003642else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003643 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003644fi
3645
Guido van Rossum627b2d71993-12-24 10:39:16 +00003646fi
3647
Barry Warsawef82cd72000-06-30 16:21:01 +00003648# Check for GC support
3649
3650USE_GC_MODULE=""
3651echo $ac_n "checking for --with-cycle-gc""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003652echo "configure:3653: checking for --with-cycle-gc" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003653# Check whether --with-cycle-gc or --without-cycle-gc was given.
3654if test "${with_cycle_gc+set}" = set; then
3655 withval="$with_cycle_gc"
3656 :
3657fi
3658
3659
3660if test -z "$with_cycle_gc"
3661then with_cycle_gc="yes"
3662fi
3663if test "$with_cycle_gc" = "no"
3664then
3665 USE_GC_MODULE="#"
3666else
3667 cat >> confdefs.h <<\EOF
3668#define WITH_CYCLE_GC 1
3669EOF
3670
3671fi
3672echo "$ac_t""$with_cycle_gc" 1>&6
3673
3674# Check for --with-wctype-functions
3675echo $ac_n "checking for --with-wctype-functions""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003676echo "configure:3677: checking for --with-wctype-functions" >&5
Barry Warsawef82cd72000-06-30 16:21:01 +00003677# Check whether --with-wctype-functions or --without-wctype-functions was given.
3678if test "${with_wctype_functions+set}" = set; then
3679 withval="$with_wctype_functions"
3680
3681if test "$withval" != no
3682then cat >> confdefs.h <<\EOF
3683#define WANT_WCTYPE_FUNCTIONS 1
3684EOF
3685 echo "$ac_t""yes" 1>&6
3686else echo "$ac_t""no" 1>&6
3687fi
3688else
3689 echo "$ac_t""no" 1>&6
3690fi
3691
3692
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003693# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +00003694
3695DLINCLDIR=/
3696
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003697echo $ac_n "checking for --with-sgi-dl""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003698echo "configure:3699: checking for --with-sgi-dl" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003699# Check whether --with-sgi-dl or --without-sgi-dl was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003700if test "${with_sgi_dl+set}" = set; then
3701 withval="$with_sgi_dl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003702
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003703echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003704cat >> confdefs.h <<\EOF
3705#define WITH_SGI_DL 1
3706EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003707
Guido van Rossume97ee181999-12-20 21:27:22 +00003708DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003709dldir=$withval
3710if test -d "$dldir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003711then LDFLAGS="$LDFLAGS -L$dldir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003712else { echo "configure: error: proper usage is --with-sgi-dl=DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003713fi
3714DLINCLDIR=${dldir}
3715LIBS="$LIBS -ldl -lmld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003716else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003717 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003718fi
3719
3720
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003721echo $ac_n "checking for --with-dl-dld""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003722echo "configure:3723: checking for --with-dl-dld" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003723# Check whether --with-dl-dld or --without-dl-dld was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003724if test "${with_dl_dld+set}" = set; then
3725 withval="$with_dl_dld"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003726
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003727echo "$ac_t""$withval" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003728cat >> confdefs.h <<\EOF
3729#define WITH_DL_DLD 1
3730EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00003731
Guido van Rossume97ee181999-12-20 21:27:22 +00003732DYNLOADFILE="dynload_dl.o"
Guido van Rossum7f43da71994-08-01 12:15:30 +00003733dldir=`echo "$withval" | sed 's/,.*//'`
3734dlddir=`echo "$withval" | sed 's/.*,//'`
3735if test -d "$dldir" -a -d "$dlddir"
Guido van Rossum84e7b241996-08-19 21:59:00 +00003736then LDFLAGS="$LDFLAGS -L$dldir -L$dlddir"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003737else { echo "configure: error: proper usage is --with-dl-dld=DL_DIRECTORY" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00003738fi
3739DLINCLDIR=${dldir}
3740LIBS="$LIBS -ldl -ldld"
Guido van Rossumda88dad1995-01-26 00:46:29 +00003741else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003742 echo "$ac_t""no" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00003743fi
3744
3745
Guido van Rossume97ee181999-12-20 21:27:22 +00003746# the dlopen() function means we might want to use dynload_shlib.o. some
3747# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +00003748for ac_func in dlopen
3749do
3750echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003751echo "configure:3752: checking for $ac_func" >&5
3752if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003753 echo $ac_n "(cached) $ac_c" 1>&6
3754else
3755 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003756#line 3757 "configure"
Guido van Rossume97ee181999-12-20 21:27:22 +00003757#include "confdefs.h"
3758/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00003759 which can conflict with char $ac_func(); below. */
Guido van Rossume97ee181999-12-20 21:27:22 +00003760#include <assert.h>
3761/* Override any gcc2 internal prototype to avoid an error. */
3762/* We use char because int might match the return type of a gcc2
3763 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003764char $ac_func();
Skip Montanarocb853262000-08-30 22:29:48 +00003765char (*f)();
Guido van Rossume97ee181999-12-20 21:27:22 +00003766
3767int main() {
3768
3769/* The GNU C library defines this for functions which it implements
3770 to always fail with ENOSYS. Some functions are actually named
3771 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00003772#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +00003773choke me
3774#else
Skip Montanarocb853262000-08-30 22:29:48 +00003775f = $ac_func;
Guido van Rossume97ee181999-12-20 21:27:22 +00003776#endif
3777
3778; return 0; }
3779EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003780if { (eval echo configure:3781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003781 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003782 eval "ac_cv_func_$ac_func=yes"
Guido van Rossume97ee181999-12-20 21:27:22 +00003783else
3784 echo "configure: failed program was:" >&5
3785 cat conftest.$ac_ext >&5
3786 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00003787 eval "ac_cv_func_$ac_func=no"
Guido van Rossume97ee181999-12-20 21:27:22 +00003788fi
3789rm -f conftest*
3790fi
3791
Thomas Wouters3a584202000-08-05 23:28:51 +00003792if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossume97ee181999-12-20 21:27:22 +00003793 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00003794 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3795 cat >> confdefs.h <<EOF
3796#define $ac_tr_func 1
3797EOF
3798
Guido van Rossume97ee181999-12-20 21:27:22 +00003799else
3800 echo "$ac_t""no" 1>&6
3801fi
Thomas Wouters3a584202000-08-05 23:28:51 +00003802done
Guido van Rossume97ee181999-12-20 21:27:22 +00003803
3804
3805# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
3806# loading of modules.
3807
3808echo $ac_n "checking DYNLOADFILE""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003809echo "configure:3810: checking DYNLOADFILE" >&5
Guido van Rossume97ee181999-12-20 21:27:22 +00003810if test -z "$DYNLOADFILE"
3811then
3812 case $ac_sys_system/$ac_sys_release in
3813 AIX*) DYNLOADFILE="dynload_aix.o";;
3814 BeOS*) DYNLOADFILE="dynload_beos.o";;
3815 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
3816 next/*) DYNLOADFILE="dynload_next.o";;
3817 *)
3818 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
3819 # out any dynamic loading
3820 if test "$ac_cv_func_dlopen" = yes
3821 then DYNLOADFILE="dynload_shlib.o"
3822 else DYNLOADFILE="dynload_stub.o"
3823 fi
3824 ;;
3825 esac
3826fi
3827echo "$ac_t""$DYNLOADFILE" 1>&6
3828if test "$DYNLOADFILE" != "dynload_stub.o"
3829then
3830 cat >> confdefs.h <<\EOF
3831#define HAVE_DYNAMIC_LOADING 1
3832EOF
3833
3834fi
3835
Guido van Rossum627b2d71993-12-24 10:39:16 +00003836# checks for library functions
Thomas Wouters3a584202000-08-05 23:28:51 +00003837for ac_func in alarm chown clock confstr ctermid ctermid_r execv \
Fred Drake35a092f1999-12-13 16:23:35 +00003838 flock fork fsync fdatasync fpathconf ftime ftruncate \
Thomas Wouters3a584202000-08-05 23:28:51 +00003839 getgroups getlogin getpeername getpid getpwent getwd \
Andrew M. Kuchling22c69342000-06-18 15:07:40 +00003840 kill link lstat mkfifo mktime mremap \
Andrew M. Kuchling5821b772000-08-25 01:14:08 +00003841 nice pathconf pause plock poll pthread_init \
Fred Drake35a092f1999-12-13 16:23:35 +00003842 putenv readlink \
Andrew M. Kuchling8d2f2b22000-07-13 01:26:58 +00003843 select setegid seteuid setgid \
Thomas Wouters3a584202000-08-05 23:28:51 +00003844 setlocale setregid setreuid setsid setpgid setuid setvbuf \
Fred Drake35a092f1999-12-13 16:23:35 +00003845 sigaction siginterrupt sigrelse strftime strptime symlink sysconf \
Fred Drake89143df1999-12-09 22:03:25 +00003846 tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters70c21a12000-07-14 14:28:33 +00003847 truncate uname waitpid _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003848do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003849echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003850echo "configure:3851: checking for $ac_func" >&5
3851if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003852 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003853else
3854 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003855#line 3856 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003856#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003857/* System header to define __stub macros and hopefully few prototypes,
3858 which can conflict with char $ac_func(); below. */
3859#include <assert.h>
3860/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003861/* We use char because int might match the return type of a gcc2
3862 builtin and then its argument prototype would still apply. */
3863char $ac_func();
Skip Montanarocb853262000-08-30 22:29:48 +00003864char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003865
Guido van Rossumf78abae1997-01-21 22:02:36 +00003866int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003867
Guido van Rossum627b2d71993-12-24 10:39:16 +00003868/* The GNU C library defines this for functions which it implements
3869 to always fail with ENOSYS. Some functions are actually named
3870 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003871#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003872choke me
3873#else
Skip Montanarocb853262000-08-30 22:29:48 +00003874f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003875#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003876
Guido van Rossum7f43da71994-08-01 12:15:30 +00003877; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003878EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003879if { (eval echo configure:3880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00003880 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003881 eval "ac_cv_func_$ac_func=yes"
3882else
Guido van Rossumf78abae1997-01-21 22:02:36 +00003883 echo "configure: failed program was:" >&5
3884 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003885 rm -rf conftest*
3886 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003887fi
3888rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003889fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00003890
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003891if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003892 echo "$ac_t""yes" 1>&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003893 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003894 cat >> confdefs.h <<EOF
3895#define $ac_tr_func 1
3896EOF
3897
3898else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003899 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003900fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003901done
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003902
Guido van Rossumf98e2a71999-01-06 18:53:34 +00003903
Fred Drake8cef4cf2000-06-28 16:40:38 +00003904# check for openpty and forkpty
3905
3906for ac_func in openpty
Guido van Rossum627b2d71993-12-24 10:39:16 +00003907do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003908echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003909echo "configure:3910: checking for $ac_func" >&5
3910if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003911 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003912else
3913 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003914#line 3915 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00003915#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003916/* System header to define __stub macros and hopefully few prototypes,
3917 which can conflict with char $ac_func(); below. */
3918#include <assert.h>
3919/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003920/* We use char because int might match the return type of a gcc2
3921 builtin and then its argument prototype would still apply. */
3922char $ac_func();
Skip Montanarocb853262000-08-30 22:29:48 +00003923char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00003924
Guido van Rossumf78abae1997-01-21 22:02:36 +00003925int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003926
Guido van Rossum627b2d71993-12-24 10:39:16 +00003927/* The GNU C library defines this for functions which it implements
3928 to always fail with ENOSYS. Some functions are actually named
3929 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003930#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00003931choke me
3932#else
Skip Montanarocb853262000-08-30 22:29:48 +00003933f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00003934#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003935
Guido van Rossum7f43da71994-08-01 12:15:30 +00003936; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00003937EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003938if { (eval echo configure:3939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003939 rm -rf conftest*
3940 eval "ac_cv_func_$ac_func=yes"
3941else
3942 echo "configure: failed program was:" >&5
3943 cat conftest.$ac_ext >&5
3944 rm -rf conftest*
3945 eval "ac_cv_func_$ac_func=no"
3946fi
3947rm -f conftest*
3948fi
3949
3950if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3951 echo "$ac_t""yes" 1>&6
3952 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3953 cat >> confdefs.h <<EOF
3954#define $ac_tr_func 1
3955EOF
3956
3957else
3958 echo "$ac_t""no" 1>&6
3959echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00003960echo "configure:3961: checking for openpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00003961ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00003962if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003963 echo $ac_n "(cached) $ac_c" 1>&6
3964else
3965 ac_save_LIBS="$LIBS"
3966LIBS="-lutil $LIBS"
3967cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003968#line 3969 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00003969#include "confdefs.h"
3970/* Override any gcc2 internal prototype to avoid an error. */
3971/* We use char because int might match the return type of a gcc2
3972 builtin and then its argument prototype would still apply. */
3973char openpty();
3974
3975int main() {
3976openpty()
3977; return 0; }
3978EOF
Skip Montanarocb853262000-08-30 22:29:48 +00003979if { (eval echo configure:3980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00003980 rm -rf conftest*
3981 eval "ac_cv_lib_$ac_lib_var=yes"
3982else
3983 echo "configure: failed program was:" >&5
3984 cat conftest.$ac_ext >&5
3985 rm -rf conftest*
3986 eval "ac_cv_lib_$ac_lib_var=no"
3987fi
3988rm -f conftest*
3989LIBS="$ac_save_LIBS"
3990
3991fi
3992if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3993 echo "$ac_t""yes" 1>&6
3994 cat >> confdefs.h <<\EOF
3995#define HAVE_OPENPTY 1
3996EOF
3997 LIBS="$LIBS -lutil"
3998else
3999 echo "$ac_t""no" 1>&6
4000fi
4001
4002fi
4003done
4004
4005for ac_func in forkpty
4006do
4007echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004008echo "configure:4009: checking for $ac_func" >&5
4009if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004010 echo $ac_n "(cached) $ac_c" 1>&6
4011else
4012 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004013#line 4014 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004014#include "confdefs.h"
4015/* System header to define __stub macros and hopefully few prototypes,
4016 which can conflict with char $ac_func(); below. */
4017#include <assert.h>
4018/* Override any gcc2 internal prototype to avoid an error. */
4019/* We use char because int might match the return type of a gcc2
4020 builtin and then its argument prototype would still apply. */
4021char $ac_func();
Skip Montanarocb853262000-08-30 22:29:48 +00004022char (*f)();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004023
4024int main() {
4025
4026/* The GNU C library defines this for functions which it implements
4027 to always fail with ENOSYS. Some functions are actually named
4028 something starting with __ and the normal name is an alias. */
4029#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4030choke me
4031#else
Skip Montanarocb853262000-08-30 22:29:48 +00004032f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +00004033#endif
4034
4035; return 0; }
4036EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004037if { (eval echo configure:4038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004038 rm -rf conftest*
4039 eval "ac_cv_func_$ac_func=yes"
4040else
4041 echo "configure: failed program was:" >&5
4042 cat conftest.$ac_ext >&5
4043 rm -rf conftest*
4044 eval "ac_cv_func_$ac_func=no"
4045fi
4046rm -f conftest*
4047fi
4048
4049if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4050 echo "$ac_t""yes" 1>&6
4051 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4052 cat >> confdefs.h <<EOF
4053#define $ac_tr_func 1
4054EOF
4055
4056else
4057 echo "$ac_t""no" 1>&6
4058echo $ac_n "checking for forkpty in -lutil""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004059echo "configure:4060: checking for forkpty in -lutil" >&5
Fred Drake8cef4cf2000-06-28 16:40:38 +00004060ac_lib_var=`echo util'_'forkpty | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00004061if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004062 echo $ac_n "(cached) $ac_c" 1>&6
4063else
4064 ac_save_LIBS="$LIBS"
4065LIBS="-lutil $LIBS"
4066cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004067#line 4068 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004068#include "confdefs.h"
4069/* Override any gcc2 internal prototype to avoid an error. */
4070/* We use char because int might match the return type of a gcc2
4071 builtin and then its argument prototype would still apply. */
4072char forkpty();
4073
4074int main() {
4075forkpty()
4076; return 0; }
4077EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004078if { (eval echo configure:4079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004079 rm -rf conftest*
4080 eval "ac_cv_lib_$ac_lib_var=yes"
4081else
4082 echo "configure: failed program was:" >&5
4083 cat conftest.$ac_ext >&5
4084 rm -rf conftest*
4085 eval "ac_cv_lib_$ac_lib_var=no"
4086fi
4087rm -f conftest*
4088LIBS="$ac_save_LIBS"
4089
4090fi
4091if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4092 echo "$ac_t""yes" 1>&6
4093 cat >> confdefs.h <<\EOF
4094#define HAVE_FORKPTY 1
4095EOF
4096 LIBS="$LIBS -lutil"
4097else
4098 echo "$ac_t""no" 1>&6
4099fi
4100
4101fi
4102done
4103
4104
4105# check for long file support functions
4106for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
4107do
4108echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004109echo "configure:4110: checking for $ac_func" >&5
4110if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Fred Drake8cef4cf2000-06-28 16:40:38 +00004111 echo $ac_n "(cached) $ac_c" 1>&6
4112else
4113 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004114#line 4115 "configure"
Fred Drake8cef4cf2000-06-28 16:40:38 +00004115#include "confdefs.h"
4116/* System header to define __stub macros and hopefully few prototypes,
4117 which can conflict with char $ac_func(); below. */
4118#include <assert.h>
4119/* Override any gcc2 internal prototype to avoid an error. */
4120/* We use char because int might match the return type of a gcc2
4121 builtin and then its argument prototype would still apply. */
4122char $ac_func();
Skip Montanarocb853262000-08-30 22:29:48 +00004123char (*f)();
Fred Drake8cef4cf2000-06-28 16:40:38 +00004124
4125int main() {
4126
4127/* The GNU C library defines this for functions which it implements
4128 to always fail with ENOSYS. Some functions are actually named
4129 something starting with __ and the normal name is an alias. */
4130#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4131choke me
4132#else
Skip Montanarocb853262000-08-30 22:29:48 +00004133f = $ac_func;
Fred Drake8cef4cf2000-06-28 16:40:38 +00004134#endif
4135
4136; return 0; }
4137EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004138if { (eval echo configure:4139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004139 rm -rf conftest*
4140 eval "ac_cv_func_$ac_func=yes"
4141else
4142 echo "configure: failed program was:" >&5
4143 cat conftest.$ac_ext >&5
4144 rm -rf conftest*
4145 eval "ac_cv_func_$ac_func=no"
4146fi
4147rm -f conftest*
4148fi
4149
4150if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4151 echo "$ac_t""yes" 1>&6
4152 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4153 cat >> confdefs.h <<EOF
4154#define $ac_tr_func 1
4155EOF
4156
4157else
4158 echo "$ac_t""no" 1>&6
4159fi
4160done
4161
4162
4163for ac_func in dup2 getcwd strdup strerror memmove
4164do
4165echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004166echo "configure:4167: checking for $ac_func" >&5
4167if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004168 echo $ac_n "(cached) $ac_c" 1>&6
4169else
4170 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004171#line 4172 "configure"
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004172#include "confdefs.h"
4173/* System header to define __stub macros and hopefully few prototypes,
4174 which can conflict with char $ac_func(); below. */
4175#include <assert.h>
4176/* Override any gcc2 internal prototype to avoid an error. */
4177/* We use char because int might match the return type of a gcc2
4178 builtin and then its argument prototype would still apply. */
4179char $ac_func();
Skip Montanarocb853262000-08-30 22:29:48 +00004180char (*f)();
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004181
4182int main() {
4183
4184/* The GNU C library defines this for functions which it implements
4185 to always fail with ENOSYS. Some functions are actually named
4186 something starting with __ and the normal name is an alias. */
4187#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4188choke me
4189#else
Skip Montanarocb853262000-08-30 22:29:48 +00004190f = $ac_func;
Guido van Rossumf98e2a71999-01-06 18:53:34 +00004191#endif
4192
4193; return 0; }
4194EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004195if { (eval echo configure:4196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004196 rm -rf conftest*
4197 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004198else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004199 echo "configure: failed program was:" >&5
4200 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004201 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004202 eval "ac_cv_func_$ac_func=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004203fi
4204rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004205fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004206
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004208 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00004209 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4210 cat >> confdefs.h <<EOF
4211#define $ac_tr_func 1
4212EOF
4213
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004214else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004215 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004216LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004217fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004218done
4219
Guido van Rossumf78abae1997-01-21 22:02:36 +00004220
Thomas Wouters3a584202000-08-05 23:28:51 +00004221for ac_func in getpgrp
4222do
4223echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004224echo "configure:4225: checking for $ac_func" >&5
4225if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004226 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004227else
4228 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004229#line 4230 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004230#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004231/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004232 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004233#include <assert.h>
4234/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004235/* We use char because int might match the return type of a gcc2
4236 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004237char $ac_func();
Skip Montanarocb853262000-08-30 22:29:48 +00004238char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004239
Guido van Rossumf78abae1997-01-21 22:02:36 +00004240int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004241
Guido van Rossum627b2d71993-12-24 10:39:16 +00004242/* The GNU C library defines this for functions which it implements
4243 to always fail with ENOSYS. Some functions are actually named
4244 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004245#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +00004246choke me
4247#else
Skip Montanarocb853262000-08-30 22:29:48 +00004248f = $ac_func;
Guido van Rossum627b2d71993-12-24 10:39:16 +00004249#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004250
4251; return 0; }
4252EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004253if { (eval echo configure:4254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004255 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004256else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004257 echo "configure: failed program was:" >&5
4258 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004259 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004260 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004261fi
4262rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004263fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004264
Thomas Wouters3a584202000-08-05 23:28:51 +00004265if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004266 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004267 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4268 cat >> confdefs.h <<EOF
4269#define $ac_tr_func 1
4270EOF
4271 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004272#line 4273 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004273#include "confdefs.h"
4274#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004275int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004276getpgrp(0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004277; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004278EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004279if { (eval echo configure:4280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004280 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004281 cat >> confdefs.h <<\EOF
4282#define GETPGRP_HAVE_ARG 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00004283EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004284
Guido van Rossumf78abae1997-01-21 22:02:36 +00004285else
4286 echo "configure: failed program was:" >&5
4287 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004288fi
4289rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004290else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004291 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004292fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004293done
Guido van Rossum627b2d71993-12-24 10:39:16 +00004294
Thomas Wouters3a584202000-08-05 23:28:51 +00004295for ac_func in setpgrp
4296do
4297echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004298echo "configure:4299: checking for $ac_func" >&5
4299if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004300 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004301else
4302 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004303#line 4304 "configure"
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004304#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004305/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004306 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004307#include <assert.h>
4308/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004309/* We use char because int might match the return type of a gcc2
4310 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004311char $ac_func();
Skip Montanarocb853262000-08-30 22:29:48 +00004312char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004313
Guido van Rossumf78abae1997-01-21 22:02:36 +00004314int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004315
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004316/* The GNU C library defines this for functions which it implements
4317 to always fail with ENOSYS. Some functions are actually named
4318 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004319#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004320choke me
4321#else
Skip Montanarocb853262000-08-30 22:29:48 +00004322f = $ac_func;
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004323#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004324
4325; return 0; }
4326EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004327if { (eval echo configure:4328: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004328 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004329 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004330else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004331 echo "configure: failed program was:" >&5
4332 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004333 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004334 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004335fi
4336rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004337fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004338
Thomas Wouters3a584202000-08-05 23:28:51 +00004339if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004340 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004341 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4342 cat >> confdefs.h <<EOF
4343#define $ac_tr_func 1
4344EOF
4345 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004346#line 4347 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004347#include "confdefs.h"
4348#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004349int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004350setpgrp(0,0);
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004351; return 0; }
4352EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004353if { (eval echo configure:4354: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004354 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004355 cat >> confdefs.h <<\EOF
4356#define SETPGRP_HAVE_ARG 1
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004357EOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004358
Guido van Rossumf78abae1997-01-21 22:02:36 +00004359else
4360 echo "configure: failed program was:" >&5
4361 cat conftest.$ac_ext >&5
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004362fi
4363rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004364else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004365 echo "$ac_t""no" 1>&6
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004366fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004367done
Guido van Rossum8eee56f1994-10-20 22:18:37 +00004368
Thomas Wouters3a584202000-08-05 23:28:51 +00004369for ac_func in gettimeofday
4370do
4371echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004372echo "configure:4373: checking for $ac_func" >&5
4373if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004374 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004375else
4376 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004377#line 4378 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004378#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004379/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00004380 which can conflict with char $ac_func(); below. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004381#include <assert.h>
4382/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004383/* We use char because int might match the return type of a gcc2
4384 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004385char $ac_func();
Skip Montanarocb853262000-08-30 22:29:48 +00004386char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004387
Guido van Rossumf78abae1997-01-21 22:02:36 +00004388int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004389
4390/* The GNU C library defines this for functions which it implements
4391 to always fail with ENOSYS. Some functions are actually named
4392 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00004393#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004394choke me
4395#else
Skip Montanarocb853262000-08-30 22:29:48 +00004396f = $ac_func;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004397#endif
4398
4399; return 0; }
4400EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004401if { (eval echo configure:4402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004402 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004403 eval "ac_cv_func_$ac_func=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004404else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004405 echo "configure: failed program was:" >&5
4406 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004407 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00004408 eval "ac_cv_func_$ac_func=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004409fi
4410rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004411fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004412
Thomas Wouters3a584202000-08-05 23:28:51 +00004413if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004414 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00004415 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4416 cat >> confdefs.h <<EOF
4417#define $ac_tr_func 1
4418EOF
4419 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004420#line 4421 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004421#include "confdefs.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004422#include <sys/time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004423int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004424gettimeofday((struct timeval*)0,(struct timezone*)0);
4425; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004426EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004427if { (eval echo configure:4428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004428 :
4429else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004430 echo "configure: failed program was:" >&5
4431 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004432 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004433 cat >> confdefs.h <<\EOF
4434#define GETTIMEOFDAY_NO_TZ 1
4435EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004436
4437fi
4438rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004439else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004440 echo "$ac_t""no" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004441fi
Thomas Wouters3a584202000-08-05 23:28:51 +00004442done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004443
4444
4445# checks for structures
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004446echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004447echo "configure:4448: checking whether time.h and sys/time.h may both be included" >&5
4448if eval "test \"\${ac_cv_header_time+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004449 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004450else
4451 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004452#line 4453 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004453#include "confdefs.h"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004454#include <sys/types.h>
4455#include <sys/time.h>
4456#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004457int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004458struct tm *tp;
4459; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004460EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004461if { (eval echo configure:4462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004462 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004463 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004464else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004465 echo "configure: failed program was:" >&5
4466 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004467 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004468 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004469fi
4470rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004471fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004472
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004473echo "$ac_t""$ac_cv_header_time" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004474if test $ac_cv_header_time = yes; then
4475 cat >> confdefs.h <<\EOF
4476#define TIME_WITH_SYS_TIME 1
4477EOF
4478
4479fi
4480
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004481echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004482echo "configure:4483: checking whether struct tm is in sys/time.h or time.h" >&5
4483if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004484 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004485else
4486 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004487#line 4488 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004488#include "confdefs.h"
4489#include <sys/types.h>
4490#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004491int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004492struct tm *tp; tp->tm_sec;
4493; return 0; }
4494EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004495if { (eval echo configure:4496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004496 rm -rf conftest*
4497 ac_cv_struct_tm=time.h
4498else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004499 echo "configure: failed program was:" >&5
4500 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004501 rm -rf conftest*
4502 ac_cv_struct_tm=sys/time.h
4503fi
4504rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004505fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004506
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004507echo "$ac_t""$ac_cv_struct_tm" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004508if test $ac_cv_struct_tm = sys/time.h; then
4509 cat >> confdefs.h <<\EOF
4510#define TM_IN_SYS_TIME 1
4511EOF
4512
4513fi
4514
Skip Montanarocb853262000-08-30 22:29:48 +00004515echo $ac_n "checking for member tm_zone in aggregate type struct tm""... $ac_c" 1>&6
4516echo "configure:4517: checking for member tm_zone in aggregate type struct tm" >&5
4517if eval "test \"\${ac_cv_c_struct_member_tm_zone+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004518 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004519else
4520 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004521#line 4522 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004522#include "confdefs.h"
4523#include <sys/types.h>
4524#include <$ac_cv_struct_tm>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004525int main() {
Skip Montanarocb853262000-08-30 22:29:48 +00004526struct tm foo; foo.tm_zone;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004527; return 0; }
4528EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004529if { (eval echo configure:4530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004530 rm -rf conftest*
Skip Montanarocb853262000-08-30 22:29:48 +00004531 ac_cv_c_struct_member_tm_zone=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004532else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004533 echo "configure: failed program was:" >&5
4534 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004535 rm -rf conftest*
Skip Montanarocb853262000-08-30 22:29:48 +00004536 ac_cv_c_struct_member_tm_zone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004537fi
4538rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004539fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004540
Skip Montanarocb853262000-08-30 22:29:48 +00004541echo "$ac_t""$ac_cv_c_struct_member_tm_zone" 1>&6
4542tm_zone="$ac_cv_c_struct_member_tm_zone"
4543if test "$ac_cv_c_struct_member_tm_zone" = yes; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004544 cat >> confdefs.h <<\EOF
4545#define HAVE_TM_ZONE 1
4546EOF
4547
4548else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004549 echo $ac_n "checking for tzname""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004550echo "configure:4551: checking for tzname" >&5
4551if eval "test \"\${ac_cv_var_tzname+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004552 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004553else
4554 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004555#line 4556 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004556#include "confdefs.h"
4557#include <time.h>
4558#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004559extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004560#endif
Guido van Rossumf78abae1997-01-21 22:02:36 +00004561int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004562atoi(*tzname);
4563; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004564EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004565if { (eval echo configure:4566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004566 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004567 ac_cv_var_tzname=yes
4568else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004569 echo "configure: failed program was:" >&5
4570 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004571 rm -rf conftest*
4572 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004573fi
4574rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00004575fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004576
4577echo "$ac_t""$ac_cv_var_tzname" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004578 if test $ac_cv_var_tzname = yes; then
4579 cat >> confdefs.h <<\EOF
4580#define HAVE_TZNAME 1
4581EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004582
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004583 fi
4584fi
4585
4586
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004587echo $ac_n "checking for time.h that defines altzone""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004588echo "configure:4589: checking for time.h that defines altzone" >&5
4589if eval "test \"\${ac_cv_header_time_altzone+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004590 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004591else
4592 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004593#line 4594 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004594#include "confdefs.h"
4595#include <time.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004596int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004597return altzone;
4598; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004599EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004600if { (eval echo configure:4601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004601 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004602 ac_cv_header_time_altzone=yes
4603else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004604 echo "configure: failed program was:" >&5
4605 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004606 rm -rf conftest*
4607 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +00004608fi
4609rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004610fi
4611
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004612echo "$ac_t""$ac_cv_header_time_altzone" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004613if test $ac_cv_header_time_altzone = yes; then
4614 cat >> confdefs.h <<\EOF
4615#define HAVE_ALTZONE 1
4616EOF
4617
4618fi
4619
Guido van Rossumda88dad1995-01-26 00:46:29 +00004620was_it_defined=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004621echo $ac_n "checking whether sys/select.h and sys/time.h may both be included""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004622echo "configure:4623: checking whether sys/select.h and sys/time.h may both be included" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004623cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004624#line 4625 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004625#include "confdefs.h"
4626
4627#include <sys/types.h>
4628#include <sys/select.h>
4629#include <sys/time.h>
4630
Guido van Rossumf78abae1997-01-21 22:02:36 +00004631int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004632;
4633; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004634EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004635if { (eval echo configure:4636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004636 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004637 cat >> confdefs.h <<\EOF
4638#define SYS_SELECT_WITH_SYS_TIME 1
4639EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004640 was_it_defined=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004641else
4642 echo "configure: failed program was:" >&5
4643 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004644fi
4645rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004646echo "$ac_t""$was_it_defined" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004647
4648# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00004649
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004650echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004651echo "configure:4652: checking whether char is unsigned" >&5
4652if eval "test \"\${ac_cv_c_char_unsigned+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004653 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004654else
4655 if test "$GCC" = yes; then
4656 # GCC predefines this symbol on systems where it applies.
4657cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004658#line 4659 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004659#include "confdefs.h"
4660#ifdef __CHAR_UNSIGNED__
4661 yes
4662#endif
4663
4664EOF
4665if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4666 egrep "yes" >/dev/null 2>&1; then
4667 rm -rf conftest*
4668 ac_cv_c_char_unsigned=yes
4669else
4670 rm -rf conftest*
4671 ac_cv_c_char_unsigned=no
4672fi
4673rm -f conftest*
4674
4675else
4676if test "$cross_compiling" = yes; then
4677 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4678else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004679 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004680#line 4681 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004681#include "confdefs.h"
4682/* volatile prevents gcc2 from optimizing the test away on sparcs. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004683#if !defined(__STDC__) || __STDC__ != 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00004684#define volatile
4685#endif
4686main() {
Guido van Rossum7f43da71994-08-01 12:15:30 +00004687 volatile char c = 255; exit(c < 0);
Guido van Rossum7f43da71994-08-01 12:15:30 +00004688}
4689EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004690if { (eval echo configure:4691: \"$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 +00004691then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004692 ac_cv_c_char_unsigned=yes
4693else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004694 echo "configure: failed program was:" >&5
4695 cat conftest.$ac_ext >&5
4696 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004697 ac_cv_c_char_unsigned=no
4698fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004699rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004700fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00004701
4702fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004703fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004704
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004705echo "$ac_t""$ac_cv_c_char_unsigned" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004706if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
4707 cat >> confdefs.h <<\EOF
4708#define __CHAR_UNSIGNED__ 1
4709EOF
4710
4711fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004712
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004713echo $ac_n "checking for working const""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004714echo "configure:4715: checking for working const" >&5
4715if eval "test \"\${ac_cv_c_const+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004716 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004717else
4718 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004719#line 4720 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004720#include "confdefs.h"
4721
Guido van Rossumf78abae1997-01-21 22:02:36 +00004722int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004723
4724/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004725typedef int charset[2]; const charset x;
4726/* SunOS 4.1.1 cc rejects this. */
4727char const *const *ccp;
4728char **p;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004729/* NEC SVR4.0.2 mips cc rejects this. */
4730struct point {int x, y;};
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004731static struct point const zero = {0,0};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004732/* AIX XL C 1.02.0.0 rejects this.
4733 It does not let you subtract one const X* pointer from another in an arm
4734 of an if-expression whose if-part is not a constant expression */
4735const char *g = "string";
4736ccp = &g + (g ? g-g : 0);
4737/* HPUX 7.0 cc rejects these. */
4738++ccp;
4739p = (char**) ccp;
4740ccp = (char const *const *) p;
4741{ /* SCO 3.2v4 cc rejects this. */
4742 char *t;
4743 char const *s = 0 ? (char *) 0 : (char const *) 0;
4744
4745 *t++ = 0;
4746}
4747{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004748 int x[] = {25, 17};
Guido van Rossum627b2d71993-12-24 10:39:16 +00004749 const int *foo = &x[0];
4750 ++foo;
4751}
4752{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4753 typedef const int *iptr;
4754 iptr p = 0;
4755 ++p;
4756}
4757{ /* AIX XL C 1.02.0.0 rejects this saying
4758 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4759 struct s { int j; const int *ap[3]; };
4760 struct s *b; b->j = 5;
4761}
4762{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4763 const int foo = 10;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004764}
4765
4766; return 0; }
4767EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004768if { (eval echo configure:4769: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004769 rm -rf conftest*
4770 ac_cv_c_const=yes
4771else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004772 echo "configure: failed program was:" >&5
4773 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004774 rm -rf conftest*
4775 ac_cv_c_const=no
4776fi
4777rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004778fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004779
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004780echo "$ac_t""$ac_cv_c_const" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004781if test $ac_cv_c_const = no; then
4782 cat >> confdefs.h <<\EOF
4783#define const
4784EOF
4785
4786fi
4787
Guido van Rossumef2255b2000-03-10 22:30:29 +00004788echo $ac_n "checking for inline""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004789echo "configure:4790: checking for inline" >&5
4790if eval "test \"\${ac_cv_c_inline+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004791 echo $ac_n "(cached) $ac_c" 1>&6
4792else
4793 ac_cv_c_inline=no
4794for ac_kw in inline __inline__ __inline; do
4795 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004796#line 4797 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00004797#include "confdefs.h"
4798
4799int main() {
4800} $ac_kw foo() {
4801; return 0; }
4802EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004803if { (eval echo configure:4804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00004804 rm -rf conftest*
4805 ac_cv_c_inline=$ac_kw; break
4806else
4807 echo "configure: failed program was:" >&5
4808 cat conftest.$ac_ext >&5
4809fi
4810rm -f conftest*
4811done
4812
4813fi
4814
4815echo "$ac_t""$ac_cv_c_inline" 1>&6
4816case "$ac_cv_c_inline" in
4817 inline | yes) ;;
4818 no) cat >> confdefs.h <<\EOF
4819#define inline
4820EOF
4821 ;;
4822 *) cat >> confdefs.h <<EOF
4823#define inline $ac_cv_c_inline
4824EOF
4825 ;;
4826esac
4827
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004828
Guido van Rossumda88dad1995-01-26 00:46:29 +00004829works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004830echo $ac_n "checking for working volatile""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004831echo "configure:4832: checking for working volatile" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004832cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004833#line 4834 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004834#include "confdefs.h"
4835
Guido van Rossumf78abae1997-01-21 22:02:36 +00004836int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004837volatile int x; x = 0;
4838; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004839EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004840if { (eval echo configure:4841: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004841 rm -rf conftest*
4842 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004843else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004844 echo "configure: failed program was:" >&5
4845 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004846 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004847 cat >> confdefs.h <<\EOF
4848#define volatile
4849EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004850
4851fi
4852rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004853echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004854
Guido van Rossumda88dad1995-01-26 00:46:29 +00004855works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004856echo $ac_n "checking for working signed char""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004857echo "configure:4858: checking for working signed char" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004858cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004859#line 4860 "configure"
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004860#include "confdefs.h"
4861
Guido van Rossumf78abae1997-01-21 22:02:36 +00004862int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004863signed char c;
4864; return 0; }
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004865EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004866if { (eval echo configure:4867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00004867 rm -rf conftest*
4868 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004869else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004870 echo "configure: failed program was:" >&5
4871 cat conftest.$ac_ext >&5
Guido van Rossumdabb11b1994-10-11 15:04:27 +00004872 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004873 cat >> confdefs.h <<\EOF
4874#define signed
Guido van Rossum627b2d71993-12-24 10:39:16 +00004875EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00004876
4877fi
4878rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004879echo "$ac_t""$works" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00004880
Guido van Rossumda88dad1995-01-26 00:46:29 +00004881have_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004882echo $ac_n "checking for prototypes""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004883echo "configure:4884: checking for prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004884cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004885#line 4886 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004886#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004887int foo(int x) { return 0; }
Guido van Rossumf78abae1997-01-21 22:02:36 +00004888int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004889return foo(10);
4890; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004891EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004892if { (eval echo configure:4893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004893 rm -rf conftest*
4894 cat >> confdefs.h <<\EOF
4895#define HAVE_PROTOTYPES 1
4896EOF
4897 have_prototypes=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004898else
4899 echo "configure: failed program was:" >&5
4900 cat conftest.$ac_ext >&5
Guido van Rossum7f43da71994-08-01 12:15:30 +00004901fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004902rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004903echo "$ac_t""$have_prototypes" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004904
Guido van Rossumda88dad1995-01-26 00:46:29 +00004905works=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004906echo $ac_n "checking for variable length prototypes and stdarg.h""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004907echo "configure:4908: checking for variable length prototypes and stdarg.h" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004908cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004909#line 4910 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004910#include "confdefs.h"
4911
4912#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +00004913int foo(int x, ...) {
4914 va_list va;
4915 va_start(va, x);
4916 va_arg(va, int);
4917 va_arg(va, char *);
4918 va_arg(va, double);
4919 return 0;
4920}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004921
Guido van Rossumf78abae1997-01-21 22:02:36 +00004922int main() {
Guido van Rossum90eea071996-08-30 20:58:57 +00004923return foo(10, "", 3.14);
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004924; return 0; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00004925EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004926if { (eval echo configure:4927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004927 rm -rf conftest*
4928 cat >> confdefs.h <<\EOF
4929#define HAVE_STDARG_PROTOTYPES 1
4930EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004931 works=yes
Guido van Rossumf78abae1997-01-21 22:02:36 +00004932else
4933 echo "configure: failed program was:" >&5
4934 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004935fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004936rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004937echo "$ac_t""$works" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004938
Guido van Rossumda88dad1995-01-26 00:46:29 +00004939if test "$have_prototypes" = yes; then
4940bad_prototypes=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004941echo $ac_n "checking for bad exec* prototypes""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004942echo "configure:4943: checking for bad exec* prototypes" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004943cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004944#line 4945 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00004945#include "confdefs.h"
4946#include <unistd.h>
Guido van Rossumf78abae1997-01-21 22:02:36 +00004947int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004948char **t;execve("@",t,t);
4949; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00004950EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004951if { (eval echo configure:4952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00004952 :
4953else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004954 echo "configure: failed program was:" >&5
4955 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00004956 rm -rf conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004957 cat >> confdefs.h <<\EOF
4958#define BAD_EXEC_PROTOTYPES 1
4959EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004960 bad_prototypes=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004961fi
4962rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004963echo "$ac_t""$bad_prototypes" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004964fi
4965
Guido van Rossumda88dad1995-01-26 00:46:29 +00004966bad_forward=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004967echo $ac_n "checking for bad static forward""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00004968echo "configure:4969: checking for bad static forward" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004969if test "$cross_compiling" = yes; then
4970 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4971else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004972 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004973#line 4974 "configure"
Guido van Rossum7f43da71994-08-01 12:15:30 +00004974#include "confdefs.h"
4975
4976struct s { int a; int b; };
4977static struct s foo;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004978int foobar() {
4979 static int random;
4980 random = (int) &foo;
4981 return random;
4982}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004983static struct s foo = { 1, 2 };
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004984main() {
4985 exit(!((int)&foo == foobar()));
4986}
Guido van Rossum7f43da71994-08-01 12:15:30 +00004987
4988EOF
Skip Montanarocb853262000-08-30 22:29:48 +00004989if { (eval echo configure:4990: \"$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 +00004990then
Guido van Rossum7f43da71994-08-01 12:15:30 +00004991 :
4992else
Guido van Rossumf78abae1997-01-21 22:02:36 +00004993 echo "configure: failed program was:" >&5
4994 cat conftest.$ac_ext >&5
4995 rm -fr conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004996 cat >> confdefs.h <<\EOF
4997#define BAD_STATIC_FORWARD 1
4998EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00004999 bad_forward=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005000fi
5001rm -fr conftest*
Guido van Rossumf78abae1997-01-21 22:02:36 +00005002fi
5003
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005004echo "$ac_t""$bad_forward" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005005
Guido van Rossumda88dad1995-01-26 00:46:29 +00005006va_list_is_array=no
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005007echo $ac_n "checking whether va_list is an array""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005008echo "configure:5009: checking whether va_list is an array" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005009cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005010#line 5011 "configure"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005011#include "confdefs.h"
5012
5013#ifdef HAVE_STDARG_PROTOTYPES
5014#include <stdarg.h>
5015#else
5016#include <varargs.h>
5017#endif
5018
Guido van Rossumf78abae1997-01-21 22:02:36 +00005019int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005020va_list list1, list2; list1 = list2;
5021; return 0; }
5022EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005023if { (eval echo configure:5024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005024 :
5025else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005026 echo "configure: failed program was:" >&5
5027 cat conftest.$ac_ext >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005028 rm -rf conftest*
5029 cat >> confdefs.h <<\EOF
5030#define VA_LIST_IS_ARRAY 1
5031EOF
Guido van Rossumda88dad1995-01-26 00:46:29 +00005032 va_list_is_array=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005033fi
5034rm -f conftest*
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005035echo "$ac_t""$va_list_is_array" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005036
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005037# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
5038echo $ac_n "checking for gethostbyname_r""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005039echo "configure:5040: checking for gethostbyname_r" >&5
5040if eval "test \"\${ac_cv_func_gethostbyname_r+set}\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005041 echo $ac_n "(cached) $ac_c" 1>&6
5042else
5043 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005044#line 5045 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005045#include "confdefs.h"
5046/* System header to define __stub macros and hopefully few prototypes,
5047 which can conflict with char gethostbyname_r(); below. */
5048#include <assert.h>
5049/* Override any gcc2 internal prototype to avoid an error. */
5050/* We use char because int might match the return type of a gcc2
5051 builtin and then its argument prototype would still apply. */
5052char gethostbyname_r();
Skip Montanarocb853262000-08-30 22:29:48 +00005053char (*f)();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005054
5055int main() {
5056
5057/* The GNU C library defines this for functions which it implements
5058 to always fail with ENOSYS. Some functions are actually named
5059 something starting with __ and the normal name is an alias. */
5060#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
5061choke me
5062#else
Skip Montanarocb853262000-08-30 22:29:48 +00005063f = gethostbyname_r;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005064#endif
5065
5066; return 0; }
5067EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005068if { (eval echo configure:5069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005069 rm -rf conftest*
5070 eval "ac_cv_func_gethostbyname_r=yes"
5071else
5072 echo "configure: failed program was:" >&5
5073 cat conftest.$ac_ext >&5
5074 rm -rf conftest*
5075 eval "ac_cv_func_gethostbyname_r=no"
5076fi
5077rm -f conftest*
5078fi
5079
5080if eval "test \"`echo '$ac_cv_func_'gethostbyname_r`\" = yes"; then
5081 echo "$ac_t""yes" 1>&6
5082
5083 cat >> confdefs.h <<\EOF
5084#define HAVE_GETHOSTBYNAME_R 1
5085EOF
5086
5087 echo $ac_n "checking gethostbyname_r with 6 args""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005088echo "configure:5089: checking gethostbyname_r with 6 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005089 OLD_CFLAGS=$CFLAGS
5090 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
5091 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005092#line 5093 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005093#include "confdefs.h"
5094
5095# include <netdb.h>
5096
5097int main() {
5098
5099 char *name;
5100 struct hostent *he, *res;
5101 char buffer[2048];
5102 int buflen = 2048;
5103 int h_errnop;
5104
5105 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
5106
5107; return 0; }
5108EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005109if { (eval echo configure:5110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005110 rm -rf conftest*
5111
5112 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005113#define HAVE_GETHOSTBYNAME_R 1
5114EOF
5115
5116 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005117#define HAVE_GETHOSTBYNAME_R_6_ARG 1
5118EOF
5119
5120 echo "$ac_t""yes" 1>&6
5121
5122else
5123 echo "configure: failed program was:" >&5
5124 cat conftest.$ac_ext >&5
5125 rm -rf conftest*
5126
5127 echo "$ac_t""no" 1>&6
5128 echo $ac_n "checking gethostbyname_r with 5 args""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005129echo "configure:5130: checking gethostbyname_r with 5 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005130 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005131#line 5132 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005132#include "confdefs.h"
5133
5134# include <netdb.h>
5135
5136int main() {
5137
5138 char *name;
5139 struct hostent *he;
5140 char buffer[2048];
5141 int buflen = 2048;
5142 int h_errnop;
5143
5144 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
5145
5146; return 0; }
5147EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005148if { (eval echo configure:5149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005149 rm -rf conftest*
5150
5151 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005152#define HAVE_GETHOSTBYNAME_R 1
5153EOF
5154
5155 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005156#define HAVE_GETHOSTBYNAME_R_5_ARG 1
5157EOF
5158
5159 echo "$ac_t""yes" 1>&6
5160
5161else
5162 echo "configure: failed program was:" >&5
5163 cat conftest.$ac_ext >&5
5164 rm -rf conftest*
5165
5166 echo "$ac_t""no" 1>&6
5167 echo $ac_n "checking gethostbyname_r with 3 args""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005168echo "configure:5169: checking gethostbyname_r with 3 args" >&5
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005169 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005170#line 5171 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005171#include "confdefs.h"
5172
5173# include <netdb.h>
5174
5175int main() {
5176
5177 char *name;
5178 struct hostent *he;
5179 struct hostent_data data;
5180
5181 (void) gethostbyname_r(name, he, &data);
5182
5183; return 0; }
5184EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005185if { (eval echo configure:5186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005186 rm -rf conftest*
5187
5188 cat >> confdefs.h <<\EOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005189#define HAVE_GETHOSTBYNAME_R 1
5190EOF
5191
5192 cat >> confdefs.h <<\EOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005193#define HAVE_GETHOSTBYNAME_R_3_ARG 1
5194EOF
5195
5196 echo "$ac_t""yes" 1>&6
5197
5198else
5199 echo "configure: failed program was:" >&5
5200 cat conftest.$ac_ext >&5
5201 rm -rf conftest*
5202
5203 echo "$ac_t""no" 1>&6
5204
5205fi
5206rm -f conftest*
5207
5208fi
5209rm -f conftest*
5210
5211fi
5212rm -f conftest*
5213 CFLAGS=$OLD_CFLAGS
5214
5215else
5216 echo "$ac_t""no" 1>&6
5217
Thomas Wouters3a584202000-08-05 23:28:51 +00005218 for ac_func in gethostbyname
5219do
5220echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005221echo "configure:5222: checking for $ac_func" >&5
5222if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005223 echo $ac_n "(cached) $ac_c" 1>&6
5224else
5225 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005226#line 5227 "configure"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005227#include "confdefs.h"
5228/* System header to define __stub macros and hopefully few prototypes,
Thomas Wouters3a584202000-08-05 23:28:51 +00005229 which can conflict with char $ac_func(); below. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005230#include <assert.h>
5231/* Override any gcc2 internal prototype to avoid an error. */
5232/* We use char because int might match the return type of a gcc2
5233 builtin and then its argument prototype would still apply. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005234char $ac_func();
Skip Montanarocb853262000-08-30 22:29:48 +00005235char (*f)();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005236
5237int main() {
5238
5239/* The GNU C library defines this for functions which it implements
5240 to always fail with ENOSYS. Some functions are actually named
5241 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +00005242#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005243choke me
5244#else
Skip Montanarocb853262000-08-30 22:29:48 +00005245f = $ac_func;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005246#endif
5247
5248; return 0; }
5249EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005250if { (eval echo configure:5251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005251 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005252 eval "ac_cv_func_$ac_func=yes"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005253else
5254 echo "configure: failed program was:" >&5
5255 cat conftest.$ac_ext >&5
5256 rm -rf conftest*
Thomas Wouters3a584202000-08-05 23:28:51 +00005257 eval "ac_cv_func_$ac_func=no"
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005258fi
5259rm -f conftest*
5260fi
5261
Thomas Wouters3a584202000-08-05 23:28:51 +00005262if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005263 echo "$ac_t""yes" 1>&6
Thomas Wouters3a584202000-08-05 23:28:51 +00005264 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5265 cat >> confdefs.h <<EOF
5266#define $ac_tr_func 1
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005267EOF
Thomas Wouters3a584202000-08-05 23:28:51 +00005268
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005269else
5270 echo "$ac_t""no" 1>&6
5271fi
Thomas Wouters3a584202000-08-05 23:28:51 +00005272done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00005273
5274
5275fi
5276
5277
5278
5279
5280
5281
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00005282
Guido van Rossum627b2d71993-12-24 10:39:16 +00005283# checks for system services
5284# (none yet)
5285
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005286# Linux requires this for correct f.p. operations
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005287echo $ac_n "checking for __fpu_control""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005288echo "configure:5289: checking for __fpu_control" >&5
5289if eval "test \"\${ac_cv_func___fpu_control+set}\" = set"; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005290 echo $ac_n "(cached) $ac_c" 1>&6
5291else
5292 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005293#line 5294 "configure"
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005294#include "confdefs.h"
5295/* System header to define __stub macros and hopefully few prototypes,
5296 which can conflict with char __fpu_control(); below. */
5297#include <assert.h>
5298/* Override any gcc2 internal prototype to avoid an error. */
5299/* We use char because int might match the return type of a gcc2
5300 builtin and then its argument prototype would still apply. */
5301char __fpu_control();
Skip Montanarocb853262000-08-30 22:29:48 +00005302char (*f)();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005303
5304int main() {
5305
5306/* The GNU C library defines this for functions which it implements
5307 to always fail with ENOSYS. Some functions are actually named
5308 something starting with __ and the normal name is an alias. */
5309#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
5310choke me
5311#else
Skip Montanarocb853262000-08-30 22:29:48 +00005312f = __fpu_control;
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005313#endif
5314
5315; return 0; }
5316EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005317if { (eval echo configure:5318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005318 rm -rf conftest*
5319 eval "ac_cv_func___fpu_control=yes"
5320else
5321 echo "configure: failed program was:" >&5
5322 cat conftest.$ac_ext >&5
5323 rm -rf conftest*
5324 eval "ac_cv_func___fpu_control=no"
5325fi
5326rm -f conftest*
5327fi
5328
5329if eval "test \"`echo '$ac_cv_func_'__fpu_control`\" = yes"; then
5330 echo "$ac_t""yes" 1>&6
5331 :
5332else
5333 echo "$ac_t""no" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005334echo $ac_n "checking for __fpu_control in -lieee""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005335echo "configure:5336: checking for __fpu_control in -lieee" >&5
Guido van Rossumf78abae1997-01-21 22:02:36 +00005336ac_lib_var=`echo ieee'_'__fpu_control | sed 'y%./+-%__p_%'`
Skip Montanarocb853262000-08-30 22:29:48 +00005337if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005338 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005339else
5340 ac_save_LIBS="$LIBS"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005341LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005342cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005343#line 5344 "configure"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005344#include "confdefs.h"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005345/* Override any gcc2 internal prototype to avoid an error. */
5346/* We use char because int might match the return type of a gcc2
5347 builtin and then its argument prototype would still apply. */
5348char __fpu_control();
Guido van Rossum627b2d71993-12-24 10:39:16 +00005349
Guido van Rossumf78abae1997-01-21 22:02:36 +00005350int main() {
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005351__fpu_control()
5352; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00005353EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005354if { (eval echo configure:5355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00005355 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005356 eval "ac_cv_lib_$ac_lib_var=yes"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005357else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005358 echo "configure: failed program was:" >&5
5359 cat conftest.$ac_ext >&5
Guido van Rossum627b2d71993-12-24 10:39:16 +00005360 rm -rf conftest*
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005361 eval "ac_cv_lib_$ac_lib_var=no"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005362fi
5363rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005364LIBS="$ac_save_LIBS"
Guido van Rossum627b2d71993-12-24 10:39:16 +00005365
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005366fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005367if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005368 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005369 ac_tr_lib=HAVE_LIB`echo ieee | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5370 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005371 cat >> confdefs.h <<EOF
5372#define $ac_tr_lib 1
5373EOF
5374
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005375 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005376
5377else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005378 echo "$ac_t""no" 1>&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005379fi
5380
5381
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +00005382fi
5383
5384
Guido van Rossum7f253911997-05-09 02:42:48 +00005385# Check for --with-fpectl
Guido van Rossum7f253911997-05-09 02:42:48 +00005386echo $ac_n "checking for --with-fpectl""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005387echo "configure:5388: checking for --with-fpectl" >&5
Guido van Rossum7f253911997-05-09 02:42:48 +00005388# Check whether --with-fpectl or --without-fpectl was given.
5389if test "${with_fpectl+set}" = set; then
5390 withval="$with_fpectl"
5391
5392if test "$withval" != no
5393then cat >> confdefs.h <<\EOF
5394#define WANT_SIGFPE_HANDLER 1
5395EOF
5396 echo "$ac_t""yes" 1>&6
5397else echo "$ac_t""no" 1>&6
5398fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00005399else
5400 echo "$ac_t""no" 1>&6
Guido van Rossum7f253911997-05-09 02:42:48 +00005401fi
5402
5403
Guido van Rossum7f43da71994-08-01 12:15:30 +00005404# check for --with-libm=...
5405
Guido van Rossum563e7081996-09-10 18:20:48 +00005406case $ac_sys_system in
5407next) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005408BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +00005409*) LIBM=-lm
5410esac
Guido van Rossum7f253911997-05-09 02:42:48 +00005411echo $ac_n "checking for --with-libm=STRING""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005412echo "configure:5413: checking for --with-libm=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005413# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005414if test "${with_libm+set}" = set; then
5415 withval="$with_libm"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005416
Guido van Rossum7f253911997-05-09 02:42:48 +00005417if test "$withval" = no
5418then LIBM=
5419 echo "$ac_t""force LIBM empty" 1>&6
5420elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005421then LIBM=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005422 echo "$ac_t""set LIBM=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005423else { echo "configure: error: proper usage is --with-libm=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005424fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005425else
5426 echo "$ac_t""default LIBM=\"$LIBM\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005427fi
5428
5429
5430# check for --with-libc=...
5431
Guido van Rossum7f253911997-05-09 02:42:48 +00005432echo $ac_n "checking for --with-libc=STRING""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005433echo "configure:5434: checking for --with-libc=STRING" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005434# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005435if test "${with_libc+set}" = set; then
5436 withval="$with_libc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005437
Guido van Rossum7f253911997-05-09 02:42:48 +00005438if test "$withval" = no
5439then LIBC=
5440 echo "$ac_t""force LIBC empty" 1>&6
5441elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +00005442then LIBC=$withval
Guido van Rossum7f253911997-05-09 02:42:48 +00005443 echo "$ac_t""set LIBC=\"$withval\"" 1>&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005444else { echo "configure: error: proper usage is --with-libc=STRING" 1>&2; exit 1; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00005445fi
Guido van Rossum7f253911997-05-09 02:42:48 +00005446else
5447 echo "$ac_t""default LIBC=\"$LIBC\"" 1>&6
Guido van Rossum7f43da71994-08-01 12:15:30 +00005448fi
5449
5450
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005451# check for hypot() in math library
5452LIBS_SAVE=$LIBS
5453LIBS="$LIBS $LIBM"
5454for ac_func in hypot
5455do
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005456echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005457echo "configure:5458: checking for $ac_func" >&5
5458if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005459 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005460else
5461 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005462#line 5463 "configure"
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005463#include "confdefs.h"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005464/* System header to define __stub macros and hopefully few prototypes,
5465 which can conflict with char $ac_func(); below. */
5466#include <assert.h>
5467/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005468/* We use char because int might match the return type of a gcc2
5469 builtin and then its argument prototype would still apply. */
5470char $ac_func();
Skip Montanarocb853262000-08-30 22:29:48 +00005471char (*f)();
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005472
Guido van Rossumf78abae1997-01-21 22:02:36 +00005473int main() {
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005474
5475/* The GNU C library defines this for functions which it implements
5476 to always fail with ENOSYS. Some functions are actually named
5477 something starting with __ and the normal name is an alias. */
5478#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5479choke me
5480#else
Skip Montanarocb853262000-08-30 22:29:48 +00005481f = $ac_func;
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005482#endif
5483
5484; return 0; }
5485EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005486if { (eval echo configure:5487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005487 rm -rf conftest*
5488 eval "ac_cv_func_$ac_func=yes"
5489else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005490 echo "configure: failed program was:" >&5
5491 cat conftest.$ac_ext >&5
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005492 rm -rf conftest*
5493 eval "ac_cv_func_$ac_func=no"
5494fi
5495rm -f conftest*
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005496fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005497
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005498if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5499 echo "$ac_t""yes" 1>&6
Guido van Rossumf78abae1997-01-21 22:02:36 +00005500 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5501 cat >> confdefs.h <<EOF
5502#define $ac_tr_func 1
5503EOF
5504
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005505else
5506 echo "$ac_t""no" 1>&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005507LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005508fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +00005509done
5510
Guido van Rossumf78abae1997-01-21 22:02:36 +00005511
Guido van Rossumaf5b83e1995-01-04 19:02:35 +00005512LIBS=$LIBS_SAVE
5513
Guido van Rossumda88dad1995-01-26 00:46:29 +00005514# check for getopt
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005515echo $ac_n "checking for genuine getopt""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005516echo "configure:5517: checking for genuine getopt" >&5
5517if eval "test \"\${ac_cv_func_getopt+set}\" = set"; then
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005518 echo $ac_n "(cached) $ac_c" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005519else
5520 if test "$cross_compiling" = yes; then
5521 ac_cv_func_getopt=no
5522else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005523 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005524#line 5525 "configure"
Guido van Rossumda88dad1995-01-26 00:46:29 +00005525#include "confdefs.h"
5526#include <stdio.h>
5527extern int optind, opterr, getopt();
5528extern char* optarg;
5529int main() {
5530 char* av[] = { "testprog", "parameter", "-fFlag", NULL };
5531 opterr = 0;
5532 if (getopt(3, av, "f:") == 'f') { exit(1); }
5533 exit(0);
5534}
5535EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005536if { (eval echo configure:5537: \"$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 +00005537then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005538 ac_cv_func_getopt=yes
5539else
Guido van Rossumf78abae1997-01-21 22:02:36 +00005540 echo "configure: failed program was:" >&5
5541 cat conftest.$ac_ext >&5
5542 rm -fr conftest*
Guido van Rossumda88dad1995-01-26 00:46:29 +00005543 ac_cv_func_getopt=no
5544fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00005545rm -fr conftest*
5546fi
Guido van Rossumf78abae1997-01-21 22:02:36 +00005547
5548fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005549echo "$ac_t""$ac_cv_func_getopt" 1>&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005550test $ac_cv_func_getopt = no && LIBOBJS="$LIBOBJS getopt.o"
5551
Guido van Rossumad713701997-07-10 22:42:38 +00005552# check whether malloc(0) returns NULL or not
Guido van Rossumad713701997-07-10 22:42:38 +00005553echo $ac_n "checking what malloc(0) returns""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005554echo "configure:5555: checking what malloc(0) returns" >&5
5555if eval "test \"\${ac_cv_malloc_zero+set}\" = set"; then
Guido van Rossumad713701997-07-10 22:42:38 +00005556 echo $ac_n "(cached) $ac_c" 1>&6
5557else
5558 if test "$cross_compiling" = yes; then
5559 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5560else
5561 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005562#line 5563 "configure"
Guido van Rossumad713701997-07-10 22:42:38 +00005563#include "confdefs.h"
5564#include <stdio.h>
5565#ifdef HAVE_STDLIB
5566#include <stdlib.h>
5567#else
5568char *malloc(), *realloc();
5569int *free();
5570#endif
5571main() {
5572 char *p;
5573 p = malloc(0);
5574 if (p == NULL) exit(1);
5575 p = realloc(p, 0);
5576 if (p == NULL) exit(1);
5577 free(p);
5578 exit(0);
5579}
5580EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005581if { (eval echo configure:5582: \"$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 +00005582then
5583 ac_cv_malloc_zero=nonnull
5584else
5585 echo "configure: failed program was:" >&5
5586 cat conftest.$ac_ext >&5
5587 rm -fr conftest*
5588 ac_cv_malloc_zero=null
5589fi
5590rm -fr conftest*
5591fi
5592
5593fi
5594
5595echo "$ac_t""$ac_cv_malloc_zero" 1>&6
5596if test "$ac_cv_malloc_zero" = null
5597then
5598 cat >> confdefs.h <<\EOF
5599#define MALLOC_ZERO_RETURNS_NULL 1
5600EOF
5601
5602fi
5603
Guido van Rossumef2255b2000-03-10 22:30:29 +00005604# check for wchar.h
5605ac_safe=`echo "wchar.h" | sed 'y%./+-%__p_%'`
5606echo $ac_n "checking for wchar.h""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005607echo "configure:5608: checking for wchar.h" >&5
5608if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005609 echo $ac_n "(cached) $ac_c" 1>&6
5610else
5611 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005612#line 5613 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005613#include "confdefs.h"
5614#include <wchar.h>
5615EOF
5616ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
Skip Montanarocb853262000-08-30 22:29:48 +00005617{ (eval echo configure:5618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00005618ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5619if test -z "$ac_err"; then
5620 rm -rf conftest*
5621 eval "ac_cv_header_$ac_safe=yes"
5622else
5623 echo "$ac_err" >&5
5624 echo "configure: failed program was:" >&5
5625 cat conftest.$ac_ext >&5
5626 rm -rf conftest*
5627 eval "ac_cv_header_$ac_safe=no"
5628fi
5629rm -f conftest*
5630fi
5631if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5632 echo "$ac_t""yes" 1>&6
5633 cat >> confdefs.h <<\EOF
5634#define HAVE_WCHAR_H 1
5635EOF
5636 wchar_h="yes"
5637else
5638 echo "$ac_t""no" 1>&6
5639wchar_h="no"
5640
5641fi
5642
5643
5644# check for usable wchar_t
5645usable_wchar_t="unkown"
5646echo $ac_n "checking for usable wchar_t""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005647echo "configure:5648: checking for usable wchar_t" >&5
Guido van Rossumef2255b2000-03-10 22:30:29 +00005648if test "$cross_compiling" = yes; then
5649 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5650else
5651 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005652#line 5653 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005653#include "confdefs.h"
5654
5655#include "wchar.h"
5656#include "wctype.h"
5657main() {
5658 wchar_t s;
5659 if (sizeof(s) == 2)
5660 exit(0);
5661 else
5662 exit(1);
5663}
5664
5665EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005666if { (eval echo configure:5667: \"$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 +00005667then
5668 cat >> confdefs.h <<\EOF
5669#define HAVE_USABLE_WCHAR_T 1
5670EOF
5671 usable_wchar_t="yes"
5672else
5673 echo "configure: failed program was:" >&5
5674 cat conftest.$ac_ext >&5
5675 rm -fr conftest*
5676 usable_wchar_t="no"
5677fi
5678rm -fr conftest*
5679fi
5680
5681echo "$ac_t""$usable_wchar_t" 1>&6
5682
5683# check for endianness
5684echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005685echo "configure:5686: checking whether byte ordering is bigendian" >&5
5686if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005687 echo $ac_n "(cached) $ac_c" 1>&6
5688else
5689 ac_cv_c_bigendian=unknown
5690# See if sys/param.h defines the BYTE_ORDER macro.
5691cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005692#line 5693 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005693#include "confdefs.h"
5694#include <sys/types.h>
5695#include <sys/param.h>
5696int main() {
5697
5698#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
5699 bogus endian macros
5700#endif
5701; return 0; }
5702EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005703if { (eval echo configure:5704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005704 rm -rf conftest*
5705 # It does; now see whether it defined to BIG_ENDIAN or not.
5706cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005707#line 5708 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005708#include "confdefs.h"
5709#include <sys/types.h>
5710#include <sys/param.h>
5711int main() {
5712
5713#if BYTE_ORDER != BIG_ENDIAN
5714 not big endian
5715#endif
5716; return 0; }
5717EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005718if { (eval echo configure:5719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +00005719 rm -rf conftest*
5720 ac_cv_c_bigendian=yes
5721else
5722 echo "configure: failed program was:" >&5
5723 cat conftest.$ac_ext >&5
5724 rm -rf conftest*
5725 ac_cv_c_bigendian=no
5726fi
5727rm -f conftest*
5728else
5729 echo "configure: failed program was:" >&5
5730 cat conftest.$ac_ext >&5
5731fi
5732rm -f conftest*
5733if test $ac_cv_c_bigendian = unknown; then
5734if test "$cross_compiling" = yes; then
5735 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5736else
5737 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005738#line 5739 "configure"
Guido van Rossumef2255b2000-03-10 22:30:29 +00005739#include "confdefs.h"
5740main () {
5741 /* Are we little or big endian? From Harbison&Steele. */
5742 union
5743 {
5744 long l;
5745 char c[sizeof (long)];
5746 } u;
5747 u.l = 1;
5748 exit (u.c[sizeof (long) - 1] == 1);
5749}
5750EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005751if { (eval echo configure:5752: \"$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 +00005752then
5753 ac_cv_c_bigendian=no
5754else
5755 echo "configure: failed program was:" >&5
5756 cat conftest.$ac_ext >&5
5757 rm -fr conftest*
5758 ac_cv_c_bigendian=yes
5759fi
5760rm -fr conftest*
5761fi
5762
5763fi
5764fi
5765
5766echo "$ac_t""$ac_cv_c_bigendian" 1>&6
5767if test $ac_cv_c_bigendian = yes; then
5768 cat >> confdefs.h <<\EOF
5769#define WORDS_BIGENDIAN 1
5770EOF
5771
5772fi
5773
5774
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005775# Check whether right shifting a negative integer extends the sign bit
5776# or fills with zeros (like the Cray J90, according to Tim Peters).
5777echo $ac_n "checking whether right shift extends the sign bit""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005778echo "configure:5779: checking whether right shift extends the sign bit" >&5
5779if eval "test \"\${ac_cv_rshift_extends_sign+set}\" = set"; then
Vladimir Marangozova6180282000-07-12 05:05:06 +00005780 echo $ac_n "(cached) $ac_c" 1>&6
5781else
5782
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005783if test "$cross_compiling" = yes; then
5784 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5785else
5786 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005787#line 5788 "configure"
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005788#include "confdefs.h"
5789
5790int main()
5791{
Vladimir Marangozova6180282000-07-12 05:05:06 +00005792 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005793}
5794
5795EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005796if { (eval echo configure:5797: \"$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 +00005797then
5798 ac_cv_rshift_extends_sign=yes
5799else
5800 echo "configure: failed program was:" >&5
5801 cat conftest.$ac_ext >&5
5802 rm -fr conftest*
5803 ac_cv_rshift_extends_sign=no
5804fi
5805rm -fr conftest*
5806fi
5807
5808fi
5809
5810echo "$ac_t""$ac_cv_rshift_extends_sign" 1>&6
5811if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005812then
5813 cat >> confdefs.h <<\EOF
5814#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
5815EOF
5816
Vladimir Marangozov676aa882000-07-12 03:02:43 +00005817fi
5818
5819
Guido van Rossum95713eb2000-05-18 20:53:31 +00005820# THIS MUST BE LAST, IT CAN BREAK OTHER TESTS!
5821# Add sys/socket.h to confdefs.h
5822cat >> confdefs.h <<\EOF
5823#ifdef HAVE_SYS_SOCKET_H
5824#include <sys/socket.h>
5825#endif
5826EOF
5827echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
Skip Montanarocb853262000-08-30 22:29:48 +00005828echo "configure:5829: checking for socklen_t" >&5
5829if eval "test \"\${ac_cv_type_socklen_t+set}\" = set"; then
Guido van Rossum95713eb2000-05-18 20:53:31 +00005830 echo $ac_n "(cached) $ac_c" 1>&6
5831else
5832 cat > conftest.$ac_ext <<EOF
Skip Montanarocb853262000-08-30 22:29:48 +00005833#line 5834 "configure"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005834#include "confdefs.h"
5835#include <sys/types.h>
5836#if STDC_HEADERS
5837#include <stdlib.h>
5838#include <stddef.h>
5839#endif
5840EOF
5841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5842 egrep "(^|[^a-zA-Z_0-9])socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
5843 rm -rf conftest*
Skip Montanarocb853262000-08-30 22:29:48 +00005844 eval "ac_cv_type_socklen_t=yes"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005845else
5846 rm -rf conftest*
Skip Montanarocb853262000-08-30 22:29:48 +00005847 eval "ac_cv_type_socklen_t=no"
Guido van Rossum95713eb2000-05-18 20:53:31 +00005848fi
5849rm -f conftest*
5850
5851fi
Skip Montanarocb853262000-08-30 22:29:48 +00005852if eval "test \"`echo '$ac_cv_type_'socklen_t`\" = yes"; then
5853 echo "$ac_t""yes" 1>&6
5854else
5855 echo "$ac_t""no" 1>&6
5856 cat >> confdefs.h <<EOF
Guido van Rossum95713eb2000-05-18 20:53:31 +00005857#define socklen_t int
5858EOF
5859
5860fi
5861
5862
Guido van Rossum627b2d71993-12-24 10:39:16 +00005863# generate output files
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005864trap '' 1 2 15
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005865cat > confcache <<\EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005866# This file is a shell script that caches the results of configure
5867# tests run on this system so they can be shared between configure
5868# scripts and configure runs. It is not useful on other systems.
5869# If it contains results you don't want to keep, you may remove or edit it.
5870#
5871# By default, configure uses ./config.cache as the cache file,
5872# creating it if it does not exist already. You can give configure
5873# the --cache-file=FILE option to use a different cache file; that is
5874# what configure does when it calls configure scripts in
5875# subdirectories, so they share the cache.
5876# Giving --cache-file=/dev/null disables caching, for debugging configure.
5877# config.status only pays attention to the cache file if you give it the
5878# --recheck option to rerun configure.
5879#
5880EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00005881# The following way of writing the cache mishandles newlines in values,
5882# but we know of no workaround that is simple, portable, and efficient.
5883# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005884# Ultrix sh set writes to stderr and can't be redirected directly,
5885# and sets the high bit in the cache file unless we assign to the vars.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005886(set) 2>&1 |
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005887 case `(ac_space=' '; set | grep ac_space) 2>&1` in
Guido van Rossumf78abae1997-01-21 22:02:36 +00005888 *ac_space=\ *)
5889 # `set' does not quote correctly, so add quotes (double-quote substitution
5890 # turns \\\\ into \\, and sed turns \\ into \).
5891 sed -n \
5892 -e "s/'/'\\\\''/g" \
5893 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5894 ;;
5895 *)
5896 # `set' quotes correctly as required by POSIX, so do not add quotes.
5897 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5898 ;;
5899 esac >> confcache
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005900if cmp -s $cache_file confcache; then
5901 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005902else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005903 if test -w $cache_file; then
5904 echo "updating cache $cache_file"
5905 cat confcache > $cache_file
5906 else
5907 echo "not updating unwritable cache $cache_file"
5908 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005909fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005910rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +00005911
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005912trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005913
5914test "x$prefix" = xNONE && prefix=$ac_default_prefix
5915# Let make expand exec_prefix.
5916test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +00005917
Guido van Rossum7f43da71994-08-01 12:15:30 +00005918# Any assignment to VPATH causes Sun make to only execute
5919# the first set of double-colon rules, so remove it if not needed.
5920# If there is a colon in the path, we need to keep it.
5921if test "x$srcdir" = x.; then
5922 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5923fi
5924
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005925trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00005926
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005927DEFS=-DHAVE_CONFIG_H
5928
5929# Without the "./", some shells look in PATH for config.status.
5930: ${CONFIG_STATUS=./config.status}
5931
5932echo creating $CONFIG_STATUS
5933rm -f $CONFIG_STATUS
5934cat > $CONFIG_STATUS <<EOF
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005935#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00005936# Generated automatically by configure.
5937# Run this file to recreate the current configuration.
5938# This directory was configured as follows,
5939# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5940#
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005941# $0 $ac_configure_args
5942#
5943# Compiler output produced by configure, useful for debugging
5944# configure, is in ./config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +00005945
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005946ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005947for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00005948do
Guido van Rossum7f43da71994-08-01 12:15:30 +00005949 case "\$ac_option" in
5950 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005951 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5952 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00005953 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Skip Montanarocb853262000-08-30 22:29:48 +00005954 echo "$CONFIG_STATUS generated by autoconf version 2.14.1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00005955 exit 0 ;;
5956 -help | --help | --hel | --he | --h)
5957 echo "\$ac_cs_usage"; exit 0 ;;
5958 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00005959 esac
5960done
5961
Guido van Rossum7f43da71994-08-01 12:15:30 +00005962ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00005963
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005964trap 'rm -fr `echo "Makefile \
5965 Objects/Makefile \
5966 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00005967 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005968 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00005969 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00005970 Modules/Setup.config config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005971EOF
5972cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005973
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005974# Protect against being on the right side of a sed subst in config.status.
5975sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5976 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00005977$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00005978$extrasub
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005979s%@SHELL@%$SHELL%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005980s%@CFLAGS@%$CFLAGS%g
5981s%@CPPFLAGS@%$CPPFLAGS%g
5982s%@CXXFLAGS@%$CXXFLAGS%g
Guido van Rossume6c2cf11999-01-08 21:08:33 +00005983s%@FFLAGS@%$FFLAGS%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005984s%@DEFS@%$DEFS%g
5985s%@LDFLAGS@%$LDFLAGS%g
5986s%@LIBS@%$LIBS%g
5987s%@exec_prefix@%$exec_prefix%g
5988s%@prefix@%$prefix%g
5989s%@program_transform_name@%$program_transform_name%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005990s%@bindir@%$bindir%g
5991s%@sbindir@%$sbindir%g
5992s%@libexecdir@%$libexecdir%g
5993s%@datadir@%$datadir%g
5994s%@sysconfdir@%$sysconfdir%g
5995s%@sharedstatedir@%$sharedstatedir%g
5996s%@localstatedir@%$localstatedir%g
5997s%@libdir@%$libdir%g
5998s%@includedir@%$includedir%g
5999s%@oldincludedir@%$oldincludedir%g
6000s%@infodir@%$infodir%g
6001s%@mandir@%$mandir%g
Guido van Rossum1fd74a71997-07-19 19:36:02 +00006002s%@VERSION@%$VERSION%g
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006003s%@MACHDEP@%$MACHDEP%g
Guido van Rossum91922671997-10-09 20:24:13 +00006004s%@SGI_ABI@%$SGI_ABI%g
Guido van Rossum95012191999-12-16 17:50:52 +00006005s%@SET_CXX@%$SET_CXX%g
6006s%@MAINOBJ@%$MAINOBJ%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006007s%@CC@%$CC%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006008s%@MAKE_LDLIBRARY@%$MAKE_LDLIBRARY%g
6009s%@LDLIBRARY@%$LDLIBRARY%g
Guido van Rossum76c5fe21997-08-14 19:45:07 +00006010s%@LINKCC@%$LINKCC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006011s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006012s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006013s%@INSTALL@%$INSTALL%g
Guido van Rossumda88dad1995-01-26 00:46:29 +00006014s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
6015s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossumec95c7b1998-08-04 17:59:56 +00006016s%@LN@%$LN%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00006017s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006018s%@CPP@%$CPP%g
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00006019s%@LIBTOOL_CRUFT@%$LIBTOOL_CRUFT%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00006020s%@SO@%$SO%g
6021s%@LDSHARED@%$LDSHARED%g
6022s%@CCSHARED@%$CCSHARED%g
6023s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum009f7871997-12-04 00:51:42 +00006024s%@USE_THREAD_MODULE@%$USE_THREAD_MODULE%g
Guido van Rossumec2f0731997-01-22 20:54:01 +00006025s%@LDLAST@%$LDLAST%g
Barry Warsawef82cd72000-06-30 16:21:01 +00006026s%@USE_GC_MODULE@%$USE_GC_MODULE%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006027s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossume97ee181999-12-20 21:27:22 +00006028s%@DYNLOADFILE@%$DYNLOADFILE%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006029s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006030s%@HAVE_GETHOSTBYNAME_R_6_ARG@%$HAVE_GETHOSTBYNAME_R_6_ARG%g
6031s%@HAVE_GETHOSTBYNAME_R_5_ARG@%$HAVE_GETHOSTBYNAME_R_5_ARG%g
6032s%@HAVE_GETHOSTBYNAME_R_3_ARG@%$HAVE_GETHOSTBYNAME_R_3_ARG%g
Guido van Rossum8db7d8b1999-03-23 16:40:33 +00006033s%@HAVE_GETHOSTBYNAME_R@%$HAVE_GETHOSTBYNAME_R%g
Guido van Rossuma96f0ba1999-03-22 21:49:51 +00006034s%@HAVE_GETHOSTBYNAME@%$HAVE_GETHOSTBYNAME%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006035s%@LIBM@%$LIBM%g
6036s%@LIBC@%$LIBC%g
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006037
6038CEOF
6039EOF
Guido van Rossumf78abae1997-01-21 22:02:36 +00006040
6041cat >> $CONFIG_STATUS <<\EOF
6042
6043# Split the substitutions into bite-sized pieces for seds with
6044# small command number limits, like on Digital OSF/1 and HP-UX.
6045ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
6046ac_file=1 # Number of current file.
6047ac_beg=1 # First line for current file.
6048ac_end=$ac_max_sed_cmds # Line after last line for current file.
6049ac_more_lines=:
6050ac_sed_cmds=""
6051while $ac_more_lines; do
6052 if test $ac_beg -gt 1; then
6053 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
6054 else
6055 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
6056 fi
6057 if test ! -s conftest.s$ac_file; then
6058 ac_more_lines=false
6059 rm -f conftest.s$ac_file
6060 else
6061 if test -z "$ac_sed_cmds"; then
6062 ac_sed_cmds="sed -f conftest.s$ac_file"
6063 else
6064 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
6065 fi
6066 ac_file=`expr $ac_file + 1`
6067 ac_beg=$ac_end
6068 ac_end=`expr $ac_end + $ac_max_sed_cmds`
6069 fi
6070done
6071if test -z "$ac_sed_cmds"; then
6072 ac_sed_cmds=cat
6073fi
6074EOF
6075
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006076cat >> $CONFIG_STATUS <<EOF
6077
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006078CONFIG_FILES=\${CONFIG_FILES-"Makefile \
6079 Objects/Makefile \
6080 Parser/Makefile \
Sjoerd Mullendera1795032000-08-17 11:41:06 +00006081 Grammar/Makefile \
Guido van Rossum7b3853f1996-07-30 18:09:35 +00006082 Python/Makefile \
Guido van Rossum009f7871997-12-04 00:51:42 +00006083 Modules/Makefile.pre \
Barry Warsawef82cd72000-06-30 16:21:01 +00006084 Modules/Setup.config"}
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006085EOF
6086cat >> $CONFIG_STATUS <<\EOF
6087for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006088 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006089 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006090 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006091 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6092 *) ac_file_in="${ac_file}.in" ;;
6093 esac
6094
Guido van Rossumf78abae1997-01-21 22:02:36 +00006095 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006096
6097 # Remove last slash and all that follows it. Not all systems have dirname.
6098 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6099 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6100 # The file is in a subdirectory.
6101 test ! -d "$ac_dir" && mkdir "$ac_dir"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00006102 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006103 # A "../" for each directory in $ac_dir_suffix.
6104 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
6105 else
6106 ac_dir_suffix= ac_dots=
6107 fi
6108
6109 case "$ac_given_srcdir" in
6110 .) srcdir=.
6111 if test -z "$ac_dots"; then top_srcdir=.
6112 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
6113 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
6114 *) # Relative path.
6115 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
6116 top_srcdir="$ac_dots$ac_given_srcdir" ;;
6117 esac
6118
Guido van Rossumf78abae1997-01-21 22:02:36 +00006119
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006120 echo creating "$ac_file"
6121 rm -f "$ac_file"
6122 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
6123 case "$ac_file" in
6124 *Makefile*) ac_comsub="1i\\
6125# $configure_input" ;;
6126 *) ac_comsub= ;;
6127 esac
Guido van Rossumf78abae1997-01-21 22:02:36 +00006128
6129 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 +00006130 sed -e "$ac_comsub
6131s%@configure_input@%$configure_input%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00006132s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00006133s%@top_srcdir@%$top_srcdir%g
Guido van Rossumf78abae1997-01-21 22:02:36 +00006134" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00006135fi; done
Guido van Rossumf78abae1997-01-21 22:02:36 +00006136rm -f conftest.s*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006137
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006138# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
6139# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +00006140#
6141# ac_d sets the value in "#define NAME VALUE" lines.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006142ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
6143ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006144ac_dC='\3'
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006145ac_dD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006146# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006147ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6148ac_uB='\([ ]\)%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006149ac_uC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006150ac_uD='\4%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006151# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006152ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
6153ac_eB='$%\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006154ac_eC=' '
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006155ac_eD='%g'
Guido van Rossum7f43da71994-08-01 12:15:30 +00006156
Guido van Rossumf78abae1997-01-21 22:02:36 +00006157if test "${CONFIG_HEADERS+set}" != set; then
6158EOF
6159cat >> $CONFIG_STATUS <<EOF
6160 CONFIG_HEADERS="config.h"
6161EOF
6162cat >> $CONFIG_STATUS <<\EOF
6163fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006164for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00006165 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006166 case "$ac_file" in
Guido van Rossumf78abae1997-01-21 22:02:36 +00006167 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006168 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
6169 *) ac_file_in="${ac_file}.in" ;;
6170 esac
6171
Guido van Rossum7f43da71994-08-01 12:15:30 +00006172 echo creating $ac_file
6173
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006174 rm -f conftest.frag conftest.in conftest.out
Guido van Rossumf78abae1997-01-21 22:02:36 +00006175 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
6176 cat $ac_file_inputs > conftest.in
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006177
6178EOF
6179
6180# Transform confdefs.h into a sed script conftest.vals that substitutes
6181# the proper values into config.h.in to produce config.h. And first:
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006182# Protect against being on the right side of a sed subst in config.status.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006183# Protect against being in an unquoted here document in config.status.
6184rm -f conftest.vals
6185cat > conftest.hdr <<\EOF
6186s/[\\&%]/\\&/g
6187s%[\\$`]%\\&%g
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006188s%#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 +00006189s%ac_d%ac_u%gp
6190s%ac_u%ac_e%gp
6191EOF
6192sed -n -f conftest.hdr confdefs.h > conftest.vals
6193rm -f conftest.hdr
6194
6195# This sed command replaces #undef with comments. This is necessary, for
6196# example, in the case of _POSIX_SOURCE, which is predefined and required
6197# on some systems where configure will not decide to define it.
6198cat >> conftest.vals <<\EOF
6199s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
6200EOF
6201
6202# Break up conftest.vals because some shells have a limit on
6203# the size of here documents, and old seds have small limits too.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006204
6205rm -f conftest.tail
6206while :
6207do
6208 ac_lines=`grep -c . conftest.vals`
6209 # grep -c gives empty output for an empty file on some AIX systems.
6210 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
6211 # Write a limited-size here document to conftest.frag.
6212 echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
6213 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
6214 echo 'CEOF
6215 sed -f conftest.frag conftest.in > conftest.out
6216 rm -f conftest.in
6217 mv conftest.out conftest.in
6218' >> $CONFIG_STATUS
6219 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
6220 rm -f conftest.vals
6221 mv conftest.tail conftest.vals
6222done
6223rm -f conftest.vals
6224
6225cat >> $CONFIG_STATUS <<\EOF
6226 rm -f conftest.frag conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00006227 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006228 cat conftest.in >> conftest.h
6229 rm -f conftest.in
Guido van Rossum7f43da71994-08-01 12:15:30 +00006230 if cmp -s $ac_file conftest.h 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00006231 echo "$ac_file is unchanged"
6232 rm -f conftest.h
6233 else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006234 # Remove last slash and all that follows it. Not all systems have dirname.
6235 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
6236 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
6237 # The file is in a subdirectory.
6238 test ! -d "$ac_dir" && mkdir "$ac_dir"
6239 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00006240 rm -f $ac_file
6241 mv conftest.h $ac_file
6242 fi
6243fi; done
6244
Guido van Rossumf78abae1997-01-21 22:02:36 +00006245EOF
6246cat >> $CONFIG_STATUS <<EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00006247
Guido van Rossumf78abae1997-01-21 22:02:36 +00006248EOF
6249cat >> $CONFIG_STATUS <<\EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006250
6251exit 0
6252EOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006253chmod +x $CONFIG_STATUS
6254rm -fr confdefs* $ac_clean_files
Skip Montanarocb853262000-08-30 22:29:48 +00006255test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +00006256