blob: a09bfa027ecfd4e18140b8c5ffc6efe8af121691 [file] [log] [blame]
Guido van Rossum7f43da71994-08-01 12:15:30 +00001#!/bin/sh
2# From configure.in Revision: 1.3
Guido van Rossum627b2d71993-12-24 10:39:16 +00003#!/bin/sh
4# Guess values for system-dependent variables and create Makefiles.
Guido van Rossum7f43da71994-08-01 12:15:30 +00005# Generated automatically using autoconf version 1.8
6# Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
Guido van Rossum627b2d71993-12-24 10:39:16 +00007
Guido van Rossum7f43da71994-08-01 12:15:30 +00008# This configure script is free software; you can redistribute it and/or
9# modify it under the terms of the GNU General Public License as published
10# by the Free Software Foundation; either version 2, or (at your option)
Guido van Rossum627b2d71993-12-24 10:39:16 +000011# any later version.
12
Guido van Rossum7f43da71994-08-01 12:15:30 +000013# This script is distributed in the hope that it will be useful, but
14# WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16# Public License for more details.
Guido van Rossum627b2d71993-12-24 10:39:16 +000017
18# You should have received a copy of the GNU General Public License
19# along with this program; if not, write to the Free Software
20# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
Guido van Rossum7f43da71994-08-01 12:15:30 +000022# Save the original args to write them into config.status later.
23configure_args="$*"
Guido van Rossum627b2d71993-12-24 10:39:16 +000024
Guido van Rossum7f43da71994-08-01 12:15:30 +000025# Only options that might do something get documented.
26ac_usage="Usage: configure [options] [host]
27Options: [defaults in brackets after descriptions]
28--build=BUILD configure for building on BUILD [BUILD=HOST]
29--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
30--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
31--exec-prefix=PREFIX install host dependent files in PREFIX [/usr/local]
32--help print this message
33--host=HOST configure for HOST [guessed]
34--prefix=PREFIX install host independent files in PREFIX [/usr/local]
35--quiet, --silent do not print \`checking for...' messages
36--srcdir=DIR find the sources in DIR [configure dir or ..]
37--target=TARGET configure for TARGET [TARGET=HOST]
38--verbose print results of checks
39--version print the version of autoconf that created configure
40--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
41--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
42--x-includes=DIR X include files are in DIR
43--x-libraries=DIR X library files are in DIR"
44
45# Initialize some variables set by options.
46# The variables have the same names as the options, with
47# dashes changed to underlines.
48build=NONE
49exec_prefix=
50host=NONE
51no_create=
52nonopt=NONE
53norecursion=
54prefix=
55program_prefix=
56program_suffix=
57program_transform_name=
58silent=
59srcdir=
60target=NONE
61verbose=
62x_includes=
63x_libraries=
64
65ac_prev=
66for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +000067do
Guido van Rossum627b2d71993-12-24 10:39:16 +000068
Guido van Rossum7f43da71994-08-01 12:15:30 +000069 # If the previous option needs an argument, assign it.
70 if test -n "$ac_prev"; then
71 eval "$ac_prev=\$ac_option"
72 ac_prev=
73 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +000074 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000075
76 # Accept (but ignore some of) the important Cygnus configure
77 # options, so we can diagnose typos.
78
79 case "$ac_option" in
80 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
81 *) ac_optarg= ;;
82 esac
83
84 case "$ac_option" in
85
86 -build | --build | --buil | --bui | --bu | --b)
87 ac_prev=build ;;
88 -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
89 build="$ac_optarg" ;;
90
91 -disable-* | --disable-*)
92 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
93 # Reject names that aren't valid shell variable names.
94 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
95 echo "configure: $ac_feature: invalid feature name" >&2; exit 1
96 fi
97 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
98 eval "enable_${ac_feature}=no" ;;
99
100 -enable-* | --enable-*)
101 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
102 # Reject names that aren't valid shell variable names.
103 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
104 echo "configure: $ac_feature: invalid feature name" >&2; exit 1
105 fi
106 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
107 case "$ac_option" in
108 *=*) ;;
109 *) ac_optarg=yes ;;
110 esac
111 eval "enable_${ac_feature}='$ac_optarg'" ;;
112
113 # For backward compatibility, recognize -exec-prefix and --exec_prefix.
114 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
115 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
116 | --exec | --exe | --ex)
117 ac_prev=exec_prefix ;;
118 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
119 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
120 | --exec=* | --exe=* | --ex=*)
121 exec_prefix="$ac_optarg" ;;
122
123 -gas | --gas | --ga | --g)
124 with_gas=1 ;; # Obsolete; use --with-gas.
125
126 -help | --help | --hel | --he)
127 cat << EOF
128$ac_usage
129EOF
130 exit 0 ;;
131
132 -host | --host | --hos | --ho)
133 ac_prev=host ;;
134 -host=* | --host=* | --hos=* | --ho=*)
135 host="$ac_optarg" ;;
136
137 -nfp | --nfp | --nf)
138 with_fp=no ;; # Obsolete; use --without-fp.
139
140 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
141 | --no-cr | --no-c)
142 no_create=yes ;;
143
144 -norecursion | --norecursion | --norecursio | --norecursi \
145 | --norecurs | --norecur | --norecu | --norec | --nore | --nor)
146 norecursion=yes ;;
147
148 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
149 ac_prev=prefix ;;
150 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
151 prefix="$ac_optarg" ;;
152
153 -program-prefix | --program-prefix | --program-prefi | --program-pref \
154 | --program-pre | --program-pr | --program-p)
155 ac_prev=program_prefix ;;
156 -program-prefix=* | --program-prefix=* | --program-prefi=* \
157 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
158 program_prefix="$ac_optarg" ;;
159
160 -program-suffix | --program-suffix | --program-suffi | --program-suff \
161 | --program-suf | --program-su | --program-s)
162 ac_prev=program_suffix ;;
163 -program-suffix=* | --program-suffix=* | --program-suffi=* \
164 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
165 program_suffix="$ac_optarg" ;;
166
167 -program-transform-name | --program-transform-name \
168 | --program-transform-nam | --program-transform-na \
169 | --program-transform-n | --program-transform- \
170 | --program-transform | --program-transfor \
171 | --program-transfo | --program-transf \
172 | --program-trans | --program-tran \
173 | --progr-tra | --program-tr | --program-t)
174 ac_prev=program_transform_name ;;
175 -program-transform-name=* | --program-transform-name=* \
176 | --program-transform-nam=* | --program-transform-na=* \
177 | --program-transform-n=* | --program-transform-=* \
178 | --program-transform=* | --program-transfor=* \
179 | --program-transfo=* | --program-transf=* \
180 | --program-trans=* | --program-tran=* \
181 | --progr-tra=* | --program-tr=* | --program-t=*)
182 program_transform_name="$ac_optarg" ;;
183
184 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
185 | -silent | --silent | --silen | --sile | --sil)
186 silent=yes ;;
187
188 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
189 ac_prev=srcdir ;;
190 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
191 srcdir="$ac_optarg" ;;
192
193 -target | --target | --targe | --targ | --tar | --ta | --t)
194 ac_prev=target ;;
195 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
196 target="$ac_optarg" ;;
197
198 -v | -verbose | --verbose | --verbos | --verbo | --verb)
199 verbose=yes ;;
200
201 -version | --version | --versio | --versi | --vers)
202 echo "configure generated by autoconf version 1.8"
203 exit 0 ;;
204
205 -with-* | --with-*)
206 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
207 # Reject names that aren't valid shell variable names.
208 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
209 echo "configure: $ac_package: invalid package name" >&2; exit 1
210 fi
211 ac_package=`echo $ac_package| sed 's/-/_/g'`
212 case "$ac_option" in
213 *=*) ;;
214 *) ac_optarg=yes ;;
215 esac
216 eval "with_${ac_package}='$ac_optarg'" ;;
217
218 -without-* | --without-*)
219 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
220 # Reject names that aren't valid shell variable names.
221 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
222 echo "configure: $ac_package: invalid package name" >&2; exit 1
223 fi
224 ac_package=`echo $ac_package| sed 's/-/_/g'`
225 eval "with_${ac_package}=no" ;;
226
227 --x) with_x=1 ;; # Obsolete; use --with-x.
228
229 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
230 | --x-incl | --x-inc | --x-in | --x-i)
231 ac_prev=x_includes ;;
232 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
233 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
234 x_includes="$ac_optarg" ;;
235
236 -x-libraries | --x-libraries | --x-librarie | --x-librari \
237 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
238 ac_prev=x_libraries ;;
239 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
240 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
241 x_libraries="$ac_optarg" ;;
242
243 -*) echo "configure: $ac_option: invalid option; use --help to show usage" >&2; exit 1
244 ;;
245
246 *)
247 if test -n "`echo $ac_option| sed 's/[-a-z0-9]//g'`"; then
248 echo "configure: warning: $ac_option: invalid host type" >&2
249 fi
250 if test "x$nonopt" -ne xNONE; then
251 echo "configure: can only configure for one host and one target at a time" >&2; exit 1
252 fi
253 nonopt="$ac_option"
254 ;;
255
256 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000257done
258
Guido van Rossum7f43da71994-08-01 12:15:30 +0000259if test -n "$ac_prev"; then
260 echo "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" >&2; exit 1
261fi
262
263trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
264trap 'rm -fr confdefs* $ac_clean_files' 0
265
266# Save the original args if we used an alternate arg parser.
267ac_configure_temp="${configure_args-$*}"
268# Strip out --no-create and --norecursion so they don't pile up.
269configure_args=
270for ac_arg in $ac_configure_temp; do
271 case "$ac_arg" in
272 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
273 | --no-cr | --no-c) ;;
274 -norecursion | --norecursion | --norecursio | --norecursi \
275 | --norecurs | --norecur | --norecu | --norec | --nore | --nor) ;;
276 *) configure_args="$configure_args $ac_arg" ;;
277 esac
278done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000279
280# NLS nuisances.
281# These must not be set unconditionally because not all systems understand
282# e.g. LANG=C (notably SCO).
Guido van Rossum7f43da71994-08-01 12:15:30 +0000283if test "${LC_ALL+set}" = 'set'; then LC_ALL=C; export LC_ALL; fi
284if test "${LANG+set}" = 'set'; then LANG=C; export LANG; fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000285
Guido van Rossum7f43da71994-08-01 12:15:30 +0000286# confdefs.h avoids OS command line length limits that DEFS can exceed.
287rm -rf conftest* confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000288# AIX cpp loses on an empty file, so make sure it contains at least a newline.
289echo > confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000290
291# A filename unique to this package, relative to the directory that
292# configure is in, which we can look for to find out if srcdir is correct.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000293ac_unique_file=Include/object.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000294
295# Find the source files, if location was not specified.
296if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000297 ac_srcdir_defaulted=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +0000298 # Try the directory containing this script, then `..'.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000299 ac_prog=$0
300 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
301 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
302 srcdir=$ac_confdir
303 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000304 srcdir=..
305 fi
306fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000307if test ! -r $srcdir/$ac_unique_file; then
308 if test x$ac_srcdir_defaulted = xyes; then
309 echo "configure: can not find sources in ${ac_confdir} or .." >&2; exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +0000310 else
Guido van Rossum7f43da71994-08-01 12:15:30 +0000311 echo "configure: can not find sources in ${srcdir}" >&2; exit 1
Guido van Rossum627b2d71993-12-24 10:39:16 +0000312 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000313fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000314
Guido van Rossum7f43da71994-08-01 12:15:30 +0000315ac_ext=c
316ac_cpp='${CPP} $CFLAGS'
317ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
Guido van Rossum627b2d71993-12-24 10:39:16 +0000318
Guido van Rossum7f43da71994-08-01 12:15:30 +0000319if test -z "$prefix"
320then
321 test -n "$silent" || echo "checking for python to derive installation directory prefix"
322 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$IFS:"
323 for ac_dir in $PATH; do
324 test -z "$ac_dir" && ac_dir=.
325 if test $ac_dir != . && test -f $ac_dir/python; then
326 # Not all systems have dirname.
327 prefix=`echo $ac_dir|sed 's%/[^/][^/]*$%%'`
328 break
329 fi
330 done
331 IFS="$ac_save_ifs"
332 test -n "$verbose" && echo " chose installation directory prefix ${prefix}"
333fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000334
Guido van Rossum7f43da71994-08-01 12:15:30 +0000335# Don't suppress compiler output when --verbose is specified
336test -n "$verbose" &&
337 ac_compile=`echo "$ac_compile" | sed "s|>/dev/null 2>&1||"`
338test -n "$verbose" && echo " setting ac_compile to '$ac_compile'"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000339
340# checks for alternative programs
Guido van Rossum7f43da71994-08-01 12:15:30 +0000341test -n "$silent" || echo "checking for --with(out)-gcc"
342# check whether --with-gcc or --without-gcc was given.
343withval="$with_gcc"
344if test -n "$withval"; then
345
346 case $withval in
347 no) withval=cc;;
348 yes) withval=gcc;;
349 esac
350 CC=$withval
351fi
352
Guido van Rossum627b2d71993-12-24 10:39:16 +0000353if test -z "$CC"; then
354 # Extract the first word of `gcc', so it can be a program name with args.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000355 set ac_dummy gcc; ac_word=$2
356 test -n "$silent" || echo "checking for $ac_word"
357 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
358 for ac_dir in $PATH; do
359 test -z "$ac_dir" && ac_dir=.
360 if test -f $ac_dir/$ac_word; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000361 CC="gcc"
362 break
363 fi
364 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000365 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000366fi
367test -z "$CC" && CC="cc"
368test -n "$CC" && test -n "$verbose" && echo " setting CC to $CC"
369
370# Find out if we are using GNU C, under whatever name.
371cat > conftest.c <<EOF
372#ifdef __GNUC__
373 yes
374#endif
375EOF
376${CC-cc} -E conftest.c > conftest.out 2>&1
377if egrep yes conftest.out >/dev/null 2>&1; then
378 GCC=1 # For later tests.
379fi
380rm -f conftest*
381
Guido van Rossum7f43da71994-08-01 12:15:30 +0000382# Make sure to not get the incompatible SysV /etc/install and
383# /usr/sbin/install, which might be in PATH before a BSD-like install,
384# or the SunOS /usr/etc/install directory, or the AIX /bin/install,
385# or the AFS install, which mishandles nonexistent args, or
386# /usr/ucb/install on SVR4, which tries to use the nonexistent group
387# `staff', or /sbin/install on IRIX which has incompatible command-line
388# syntax. Sigh.
389#
390# On most BSDish systems install is in /usr/bin, not /usr/ucb
391# anyway.
392# This turns out not to be true, so the mere pathname isn't an indication
393# of whether the program works. What we really need is a set of tests for
394# the install program to see if it actually works in all the required ways.
395#
396# Avoid using ./install, which might have been erroneously created
397# by make from ./install.sh.
398if test "z${INSTALL}" = "z" ; then
399 test -n "$silent" || echo "checking for a BSD compatible install"
400 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
401 for ac_dir in $PATH; do
402 case "$ac_dir" in
403 ''|.|/etc|/sbin|/usr/sbin|/usr/etc|/usr/afsws/bin|/usr/ucb) ;;
404 *)
405 # OSF1 and SCO ODT 3.0 have their own names for install.
406 for ac_prog in installbsd scoinst install; do
407 if test -f $ac_dir/$ac_prog; then
408 if grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
409 : # AIX
410 else
411 INSTALL="$ac_dir/$ac_prog -c"
412 INSTALL_PROGRAM='${INSTALL}'
413 INSTALL_DATA='${INSTALL} -m 644'
414 break 2
415 fi
416 fi
417 done
418 ;;
419 esac
420 done
421 IFS="$ac_save_ifs"
422fi
423if test -z "$INSTALL"; then
424 if test -f ${srcdir}/install.sh; then
425 # As a last resort, use the slow shell script.
426 INSTALL='@top_srcdir@/install.sh -c'
427 else
428 echo "configure: warning: ${srcdir}/install.sh not found; using cp" >&2
429 INSTALL=cp
430 fi
431fi
432test -n "$verbose" && echo " setting INSTALL to $INSTALL"
433# Use test -z because SunOS4 sh mishandles ${INSTALL_PROGRAM-'${INSTALL}'}.
434# It thinks the first close brace ends the variable substitution.
435test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
436test -n "$verbose" && echo " setting INSTALL_PROGRAM to $INSTALL_PROGRAM"
437test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL}'
438test -n "$verbose" && echo " setting INSTALL_DATA to $INSTALL_DATA"
439
Guido van Rossum627b2d71993-12-24 10:39:16 +0000440if test -z "$RANLIB"; then
441 # Extract the first word of `ranlib', so it can be a program name with args.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000442 set ac_dummy ranlib; ac_word=$2
443 test -n "$silent" || echo "checking for $ac_word"
444 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
445 for ac_dir in $PATH; do
446 test -z "$ac_dir" && ac_dir=.
447 if test -f $ac_dir/$ac_word; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000448 RANLIB="ranlib"
449 break
450 fi
451 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000452 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000453fi
454test -z "$RANLIB" && RANLIB=":"
455test -n "$RANLIB" && test -n "$verbose" && echo " setting RANLIB to $RANLIB"
456
457
Guido van Rossum7f43da71994-08-01 12:15:30 +0000458for ac_prog in ar aal
459do
460if test -z "$AR"; then
461 # Extract the first word of `$ac_prog', so it can be a program name with args.
462 set ac_dummy $ac_prog; ac_word=$2
463 test -n "$silent" || echo "checking for $ac_word"
464 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
465 for ac_dir in $PATH; do
466 test -z "$ac_dir" && ac_dir=.
467 if test -f $ac_dir/$ac_word; then
468 AR="$ac_prog"
469 break
470 fi
471 done
472 IFS="$ac_save_ifs"
473fi
474
475test -n "$AR" && test -n "$verbose" && echo " setting AR to $AR"
476
477test -n "$AR" && break
478done
479test -n "$AR" || AR="ar"
480
481
Guido van Rossum627b2d71993-12-24 10:39:16 +0000482# checks for UNIX variants that set C preprocessor variables
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483test -n "$silent" || echo "checking for AIX"
484test -n "$silent" || echo "checking how to run the C preprocessor"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000485if test -z "$CPP"; then
486 # This must be in double quotes, not single quotes, because CPP may get
487 # substituted into the Makefile and ``${CC-cc}'' will simply confuse
488 # make. It must be expanded now.
489 CPP="${CC-cc} -E"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000490 cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000491#include "confdefs.h"
492#include <stdio.h>
493Syntax Error
494EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000495# Some shells (Coherent) do redirections in the wrong order, so need
496# the parens.
497ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
498if test -z "$ac_err"; then
499 :
500else
501 rm -rf conftest*
502 CPP="${CC-cc} -E -traditional-cpp"
503 cat > conftest.${ac_ext} <<EOF
504#include "confdefs.h"
505#include <stdio.h>
506Syntax Error
507EOF
508# Some shells (Coherent) do redirections in the wrong order, so need
509# the parens.
510ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
511if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000512 :
513else
514 rm -rf conftest*
515 CPP=/lib/cpp
516fi
517rm -f conftest*
518fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000519rm -f conftest*
520fi
521test -n "$verbose" && echo " setting CPP to $CPP"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000522
Guido van Rossum7f43da71994-08-01 12:15:30 +0000523cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000524#include "confdefs.h"
525#ifdef _AIX
526 yes
527#endif
528
529EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000530eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000531if egrep "yes" conftest.out >/dev/null 2>&1; then
532 rm -rf conftest*
533
534{
535test -n "$verbose" && \
536echo " defining _ALL_SOURCE"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000537echo "#define" _ALL_SOURCE "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000538DEFS="$DEFS -D_ALL_SOURCE=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000539ac_sed_defs="${ac_sed_defs}\${ac_dA}_ALL_SOURCE\${ac_dB}_ALL_SOURCE\${ac_dC}1\${ac_dD}
540\${ac_uA}_ALL_SOURCE\${ac_uB}_ALL_SOURCE\${ac_uC}1\${ac_uD}
541\${ac_eA}_ALL_SOURCE\${ac_eB}_ALL_SOURCE\${ac_eC}1\${ac_eD}
542"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000543}
544
545
546fi
547rm -f conftest*
548
549
Guido van Rossum7f43da71994-08-01 12:15:30 +0000550test -n "$silent" || echo "checking for POSIXized ISC"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000551if test -d /etc/conf/kconfig.d &&
552 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
553then
554 ISC=1 # If later tests want to check for ISC.
555
556{
557test -n "$verbose" && \
558echo " defining _POSIX_SOURCE"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000559echo "#define" _POSIX_SOURCE "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000560DEFS="$DEFS -D_POSIX_SOURCE=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000561ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
562\${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
563\${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
564"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000565}
566
567 if test -n "$GCC"; then
568 CC="$CC -posix"
569 else
570 CC="$CC -Xp"
571 fi
572fi
573
Guido van Rossum7f43da71994-08-01 12:15:30 +0000574test -n "$silent" || echo "checking for minix/config.h"
575cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000576#include "confdefs.h"
577#include <minix/config.h>
578EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000579# Some shells (Coherent) do redirections in the wrong order, so need
580# the parens.
581ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
582if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000583 rm -rf conftest*
584 MINIX=1
585
586fi
587rm -f conftest*
588
589# The Minix shell can't assign to the same variable on the same line!
590if test -n "$MINIX"; then
591
592{
593test -n "$verbose" && \
594echo " defining _POSIX_SOURCE"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000595echo "#define" _POSIX_SOURCE "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000596DEFS="$DEFS -D_POSIX_SOURCE=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000597ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
598\${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
599\${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
600"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000601}
602
603
604{
605test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000606echo " defining" _POSIX_1_SOURCE to be "2"
607echo "#define" _POSIX_1_SOURCE "2" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000608DEFS="$DEFS -D_POSIX_1_SOURCE=2"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000609ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_1_SOURCE\${ac_dB}_POSIX_1_SOURCE\${ac_dC}2\${ac_dD}
610\${ac_uA}_POSIX_1_SOURCE\${ac_uB}_POSIX_1_SOURCE\${ac_uC}2\${ac_uD}
611\${ac_eA}_POSIX_1_SOURCE\${ac_eB}_POSIX_1_SOURCE\${ac_eC}2\${ac_eD}
612"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000613}
614
615
616{
617test -n "$verbose" && \
618echo " defining _MINIX"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000619echo "#define" _MINIX "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000620DEFS="$DEFS -D_MINIX=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000621ac_sed_defs="${ac_sed_defs}\${ac_dA}_MINIX\${ac_dB}_MINIX\${ac_dC}1\${ac_dD}
622\${ac_uA}_MINIX\${ac_uB}_MINIX\${ac_uC}1\${ac_uD}
623\${ac_eA}_MINIX\${ac_eB}_MINIX\${ac_eC}1\${ac_eD}
624"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000625}
626
627fi
628
Guido van Rossum7f43da71994-08-01 12:15:30 +0000629ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000630LIBS="${LIBS} -lseq"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000631ac_have_lib=""
632test -n "$silent" || echo "checking for -lseq"
633cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000634#include "confdefs.h"
635
Guido van Rossum7f43da71994-08-01 12:15:30 +0000636int main() { return 0; }
637int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000638EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000639if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000640 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +0000641 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000642
643fi
644rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +0000645LIBS="${ac_save_LIBS}"
646if test -n "${ac_have_lib}"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000647 :; LIBS="$LIBS -lseq"
648else
649 :;
650fi
651
652
Guido van Rossum7f43da71994-08-01 12:15:30 +0000653test -n "$silent" || echo "checking for NeXT"
654cat > conftest.${ac_ext} <<EOF
655#include "confdefs.h"
656
657#ifdef _NEXT_SOURCE
658main() { exit(0); }
659#endif
660
661EOF
662eval $ac_compile
663if test -s conftest && (./conftest; exit) 2>/dev/null; then
664
665{
666test -n "$verbose" && \
667echo " defining _POSIX_SOURCE"
668echo "#define" _POSIX_SOURCE "1" >> confdefs.h
669DEFS="$DEFS -D_POSIX_SOURCE=1"
670ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
671\${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
672\${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
673"
674}
675
676
677fi
678rm -fr conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +0000679
680# checks for header files
Guido van Rossum7f43da71994-08-01 12:15:30 +0000681test -n "$silent" || echo "checking for ANSI C header files"
682cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000683#include "confdefs.h"
684#include <stdlib.h>
685#include <stdarg.h>
686#include <string.h>
687#include <float.h>
688EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000689# Some shells (Coherent) do redirections in the wrong order, so need
690# the parens.
691ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
692if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000693 rm -rf conftest*
694 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
695echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000696#include <string.h>' > conftest.${ac_ext}
697eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000698if egrep "memchr" conftest.out >/dev/null 2>&1; then
699 rm -rf conftest*
700 # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000701cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000702#include "confdefs.h"
703#include <ctype.h>
704#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
705#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
706#define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
707int main () { int i; for (i = 0; i < 256; i++)
708if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
709exit (0); }
710
711EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000712eval $ac_compile
Guido van Rossum627b2d71993-12-24 10:39:16 +0000713if test -s conftest && (./conftest; exit) 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
715echo '#include "confdefs.h"
716#include <stdlib.h>' > conftest.${ac_ext}
717eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
718if egrep "free" conftest.out >/dev/null 2>&1; then
719 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +0000720
721{
722test -n "$verbose" && \
723echo " defining STDC_HEADERS"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000724echo "#define" STDC_HEADERS "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000725DEFS="$DEFS -DSTDC_HEADERS=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000726ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD}
727\${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD}
728\${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD}
729"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000730}
731
732
733fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000734rm -f conftest*
735
736
737fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000738rm -fr conftest*
739
740fi
741rm -f conftest*
742
743
744fi
745rm -f conftest*
746
Guido van Rossum7f43da71994-08-01 12:15:30 +0000747for ac_hdr in dlfcn.h fcntl.h limits.h signal.h stdarg.h stdlib.h thread.h unistd.h utime.h sys/audioio.h sys/param.h sys/select.h sys/time.h sys/times.h sys/un.h sys/utsname.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000748do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000749ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
750test -n "$silent" || echo "checking for ${ac_hdr}"
751cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000752#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000753#include <${ac_hdr}>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000754EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000755# Some shells (Coherent) do redirections in the wrong order, so need
756# the parens.
757ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
758if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000759 rm -rf conftest*
760
761{
762test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000763echo " defining ${ac_tr_hdr}"
764echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
765DEFS="$DEFS -D${ac_tr_hdr}=1"
766ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
767\${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
768\${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
769"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000770}
771
772
773fi
774rm -f conftest*
775done
776
Guido van Rossum7f43da71994-08-01 12:15:30 +0000777test -n "$silent" || echo "checking for directory library header"
778ac_dir_header=
779if test -z "$ac_dir_header"; then
780 test -n "$silent" || echo "checking for dirent.h"
781cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000782#include "confdefs.h"
783#include <sys/types.h>
784#include <dirent.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785int main() { return 0; }
786int t() { DIR *dirp = 0;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000787EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000788if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000789 rm -rf conftest*
790
791{
792test -n "$verbose" && \
793echo " defining DIRENT"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000794echo "#define" DIRENT "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000795DEFS="$DEFS -DDIRENT=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796ac_sed_defs="${ac_sed_defs}\${ac_dA}DIRENT\${ac_dB}DIRENT\${ac_dC}1\${ac_dD}
797\${ac_uA}DIRENT\${ac_uB}DIRENT\${ac_uC}1\${ac_uD}
798\${ac_eA}DIRENT\${ac_eB}DIRENT\${ac_eC}1\${ac_eD}
799"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000800}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000801 ac_dir_header=dirent.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802
803fi
804rm -f conftest*
805fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806if test -z "$ac_dir_header"; then
807 test -n "$silent" || echo "checking for sys/ndir.h"
808cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000809#include "confdefs.h"
810#include <sys/types.h>
811#include <sys/ndir.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000812int main() { return 0; }
813int t() { DIR *dirp = 0;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000814EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000815if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000816 rm -rf conftest*
817
818{
819test -n "$verbose" && \
820echo " defining SYSNDIR"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821echo "#define" SYSNDIR "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000822DEFS="$DEFS -DSYSNDIR=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSNDIR\${ac_dB}SYSNDIR\${ac_dC}1\${ac_dD}
824\${ac_uA}SYSNDIR\${ac_uB}SYSNDIR\${ac_uC}1\${ac_uD}
825\${ac_eA}SYSNDIR\${ac_eB}SYSNDIR\${ac_eC}1\${ac_eD}
826"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000827}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828 ac_dir_header=sys/ndir.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000829
830fi
831rm -f conftest*
832fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000833if test -z "$ac_dir_header"; then
834 test -n "$silent" || echo "checking for sys/dir.h"
835cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000836#include "confdefs.h"
837#include <sys/types.h>
838#include <sys/dir.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839int main() { return 0; }
840int t() { DIR *dirp = 0;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000843 rm -rf conftest*
844
845{
846test -n "$verbose" && \
847echo " defining SYSDIR"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848echo "#define" SYSDIR "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000849DEFS="$DEFS -DSYSDIR=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSDIR\${ac_dB}SYSDIR\${ac_dC}1\${ac_dD}
851\${ac_uA}SYSDIR\${ac_uB}SYSDIR\${ac_uC}1\${ac_uD}
852\${ac_eA}SYSDIR\${ac_eB}SYSDIR\${ac_eC}1\${ac_eD}
853"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000854}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855 ac_dir_header=sys/dir.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000856
857fi
858rm -f conftest*
859fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860if test -z "$ac_dir_header"; then
861 test -n "$silent" || echo "checking for ndir.h"
862cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000863#include "confdefs.h"
864#include <sys/types.h>
865#include <ndir.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866int main() { return 0; }
867int t() { DIR *dirp = 0;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000868EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000870 rm -rf conftest*
871
872{
873test -n "$verbose" && \
874echo " defining NDIR"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875echo "#define" NDIR "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000876DEFS="$DEFS -DNDIR=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877ac_sed_defs="${ac_sed_defs}\${ac_dA}NDIR\${ac_dB}NDIR\${ac_dC}1\${ac_dD}
878\${ac_uA}NDIR\${ac_uB}NDIR\${ac_uC}1\${ac_uD}
879\${ac_eA}NDIR\${ac_eB}NDIR\${ac_eC}1\${ac_eD}
880"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000881}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882 ac_dir_header=ndir.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000883
884fi
885rm -f conftest*
886fi
887
Guido van Rossum7f43da71994-08-01 12:15:30 +0000888test -n "$silent" || echo "checking for closedir return value"
889cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000890#include "confdefs.h"
891#include <sys/types.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892#include <$ac_dir_header>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000893int closedir(); main() { exit(closedir(opendir(".")) != 0); }
894EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000895eval $ac_compile
Guido van Rossum627b2d71993-12-24 10:39:16 +0000896if test -s conftest && (./conftest; exit) 2>/dev/null; then
897 :
898else
899
900{
901test -n "$verbose" && \
902echo " defining VOID_CLOSEDIR"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903echo "#define" VOID_CLOSEDIR "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000904DEFS="$DEFS -DVOID_CLOSEDIR=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905ac_sed_defs="${ac_sed_defs}\${ac_dA}VOID_CLOSEDIR\${ac_dB}VOID_CLOSEDIR\${ac_dC}1\${ac_dD}
906\${ac_uA}VOID_CLOSEDIR\${ac_uB}VOID_CLOSEDIR\${ac_uC}1\${ac_uD}
907\${ac_eA}VOID_CLOSEDIR\${ac_eB}VOID_CLOSEDIR\${ac_eC}1\${ac_eD}
908"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000909}
910
911fi
912rm -fr conftest*
913
914
915# checks for typedefs
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916test -n "$silent" || echo "checking for clock_t in time.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000917echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000918#include <time.h>' > conftest.${ac_ext}
919eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
920if egrep "clock_t" conftest.out >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000921 :
922else
923 rm -rf conftest*
924
925{
926test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927echo " defining" clock_t to be "long"
928echo "#define" clock_t "long" >> confdefs.h
929DEFS="$DEFS -Dclock_t=long"
930ac_sed_defs="${ac_sed_defs}\${ac_dA}clock_t\${ac_dB}clock_t\${ac_dC}long\${ac_dD}
931\${ac_uA}clock_t\${ac_uB}clock_t\${ac_uC}long\${ac_uD}
932\${ac_eA}clock_t\${ac_eB}clock_t\${ac_eC}long\${ac_eD}
933"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000934}
935
936fi
937rm -f conftest*
938
Guido van Rossum7f43da71994-08-01 12:15:30 +0000939test -n "$silent" || echo "checking for mode_t in sys/types.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000940echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000941#include <sys/types.h>' > conftest.${ac_ext}
942eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000943if egrep "mode_t" conftest.out >/dev/null 2>&1; then
944 :
945else
946 rm -rf conftest*
947
948{
949test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950echo " defining" mode_t to be "int"
951echo "#define" mode_t "int" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000952DEFS="$DEFS -Dmode_t=int"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953ac_sed_defs="${ac_sed_defs}\${ac_dA}mode_t\${ac_dB}mode_t\${ac_dC}int\${ac_dD}
954\${ac_uA}mode_t\${ac_uB}mode_t\${ac_uC}int\${ac_uD}
955\${ac_eA}mode_t\${ac_eB}mode_t\${ac_eC}int\${ac_eD}
956"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000957}
958
959fi
960rm -f conftest*
961
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962test -n "$silent" || echo "checking for off_t in sys/types.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000963echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964#include <sys/types.h>' > conftest.${ac_ext}
965eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000966if egrep "off_t" conftest.out >/dev/null 2>&1; then
967 :
968else
969 rm -rf conftest*
970
971{
972test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973echo " defining" off_t to be "long"
974echo "#define" off_t "long" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000975DEFS="$DEFS -Doff_t=long"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976ac_sed_defs="${ac_sed_defs}\${ac_dA}off_t\${ac_dB}off_t\${ac_dC}long\${ac_dD}
977\${ac_uA}off_t\${ac_uB}off_t\${ac_uC}long\${ac_uD}
978\${ac_eA}off_t\${ac_eB}off_t\${ac_eC}long\${ac_eD}
979"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000980}
981
982fi
983rm -f conftest*
984
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985test -n "$silent" || echo "checking for pid_t in sys/types.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000986echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987#include <sys/types.h>' > conftest.${ac_ext}
988eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000989if egrep "pid_t" conftest.out >/dev/null 2>&1; then
990 :
991else
992 rm -rf conftest*
993
994{
995test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996echo " defining" pid_t to be "int"
997echo "#define" pid_t "int" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000998DEFS="$DEFS -Dpid_t=int"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999ac_sed_defs="${ac_sed_defs}\${ac_dA}pid_t\${ac_dB}pid_t\${ac_dC}int\${ac_dD}
1000\${ac_uA}pid_t\${ac_uB}pid_t\${ac_uC}int\${ac_uD}
1001\${ac_eA}pid_t\${ac_eB}pid_t\${ac_eC}int\${ac_eD}
1002"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001003}
1004
1005fi
1006rm -f conftest*
1007
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008test -n "$silent" || echo "checking for return type of signal handlers"
1009cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001010#include "confdefs.h"
1011#include <sys/types.h>
1012#include <signal.h>
1013#ifdef signal
1014#undef signal
1015#endif
1016extern void (*signal ()) ();
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017int main() { return 0; }
1018int t() { int i;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001019EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001021 rm -rf conftest*
1022
1023{
1024test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025echo " defining" RETSIGTYPE to be "void"
1026echo "#define" RETSIGTYPE "void" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001027DEFS="$DEFS -DRETSIGTYPE=void"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD}
1029\${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD}
1030\${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD}
1031"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001032}
1033
1034
1035else
1036 rm -rf conftest*
1037
1038{
1039test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040echo " defining" RETSIGTYPE to be "int"
1041echo "#define" RETSIGTYPE "int" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001042DEFS="$DEFS -DRETSIGTYPE=int"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD}
1044\${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD}
1045\${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD}
1046"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001047}
1048
1049fi
1050rm -f conftest*
1051
1052
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053test -n "$silent" || echo "checking for size_t in sys/types.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001054echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055#include <sys/types.h>' > conftest.${ac_ext}
1056eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001057if egrep "size_t" conftest.out >/dev/null 2>&1; then
1058 :
1059else
1060 rm -rf conftest*
1061
1062{
1063test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064echo " defining" size_t to be "unsigned"
1065echo "#define" size_t "unsigned" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001066DEFS="$DEFS -Dsize_t=unsigned"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067ac_sed_defs="${ac_sed_defs}\${ac_dA}size_t\${ac_dB}size_t\${ac_dC}unsigned\${ac_dD}
1068\${ac_uA}size_t\${ac_uB}size_t\${ac_uC}unsigned\${ac_uD}
1069\${ac_eA}size_t\${ac_eB}size_t\${ac_eC}unsigned\${ac_eD}
1070"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001071}
1072
1073fi
1074rm -f conftest*
1075
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076test -n "$silent" || echo "checking for uid_t in sys/types.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001077echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078#include <sys/types.h>' > conftest.${ac_ext}
1079eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001080if egrep "uid_t" conftest.out >/dev/null 2>&1; then
1081 :
1082else
1083 rm -rf conftest*
1084
1085{
1086test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001087echo " defining" uid_t to be "int"
1088echo "#define" uid_t "int" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001089DEFS="$DEFS -Duid_t=int"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090ac_sed_defs="${ac_sed_defs}\${ac_dA}uid_t\${ac_dB}uid_t\${ac_dC}int\${ac_dD}
1091\${ac_uA}uid_t\${ac_uB}uid_t\${ac_uC}int\${ac_uD}
1092\${ac_eA}uid_t\${ac_eB}uid_t\${ac_eC}int\${ac_eD}
1093"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001094}
1095
1096{
1097test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001098echo " defining" gid_t to be "int"
1099echo "#define" gid_t "int" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001100DEFS="$DEFS -Dgid_t=int"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001101ac_sed_defs="${ac_sed_defs}\${ac_dA}gid_t\${ac_dB}gid_t\${ac_dC}int\${ac_dD}
1102\${ac_uA}gid_t\${ac_uB}gid_t\${ac_uC}int\${ac_uD}
1103\${ac_eA}gid_t\${ac_eB}gid_t\${ac_eC}int\${ac_eD}
1104"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001105}
1106
1107fi
1108rm -f conftest*
1109
1110
1111# checks for libraries
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001113LIBS="${LIBS} -ldl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114ac_have_lib=""
1115test -n "$silent" || echo "checking for -ldl"
1116cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001117#include "confdefs.h"
1118
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119int main() { return 0; }
1120int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001121EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001123 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001125
1126fi
1127rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128LIBS="${ac_save_LIBS}"
1129if test -n "${ac_have_lib}"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001130
1131{
1132test -n "$verbose" && \
1133echo " defining HAVE_LIBDL"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134echo "#define" HAVE_LIBDL "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001135DEFS="$DEFS -DHAVE_LIBDL=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBDL\${ac_dB}HAVE_LIBDL\${ac_dC}1\${ac_dD}
1137\${ac_uA}HAVE_LIBDL\${ac_uB}HAVE_LIBDL\${ac_uC}1\${ac_uD}
1138\${ac_eA}HAVE_LIBDL\${ac_eB}HAVE_LIBDL\${ac_eC}1\${ac_eD}
1139"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001140}
1141
1142 LIBS="${LIBS} -ldl"
1143fi
1144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145
1146test -n "$silent" || echo "checking for --with-svr4"
1147# check whether --with-svr4 or --without-svr4 was given.
1148withval="$with_svr4"
1149if test -n "$withval"; then
1150
1151ac_save_LIBS="${LIBS}"
1152LIBS="${LIBS} -lsocket"
1153ac_have_lib=""
1154test -n "$silent" || echo "checking for -lsocket"
1155cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156#include "confdefs.h"
1157
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158int main() { return 0; }
1159int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001160EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001162 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001164
1165fi
1166rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167LIBS="${ac_save_LIBS}"
1168if test -n "${ac_have_lib}"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001169
1170{
1171test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172echo " defining HAVE_LIBSOCKET"
1173echo "#define" HAVE_LIBSOCKET "1" >> confdefs.h
1174DEFS="$DEFS -DHAVE_LIBSOCKET=1"
1175ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBSOCKET\${ac_dB}HAVE_LIBSOCKET\${ac_dC}1\${ac_dD}
1176\${ac_uA}HAVE_LIBSOCKET\${ac_uB}HAVE_LIBSOCKET\${ac_uC}1\${ac_uD}
1177\${ac_eA}HAVE_LIBSOCKET\${ac_eB}HAVE_LIBSOCKET\${ac_eC}1\${ac_eD}
1178"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001179}
1180
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 LIBS="${LIBS} -lsocket"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182fi
1183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184ac_save_LIBS="${LIBS}"
1185LIBS="${LIBS} -linet"
1186ac_have_lib=""
1187test -n "$silent" || echo "checking for -linet"
1188cat > conftest.${ac_ext} <<EOF
1189#include "confdefs.h"
1190
1191int main() { return 0; }
1192int t() { main();; return 0; }
1193EOF
1194if eval $ac_compile; then
1195 rm -rf conftest*
1196 ac_have_lib="1"
1197
1198fi
1199rm -f conftest*
1200LIBS="${ac_save_LIBS}"
1201if test -n "${ac_have_lib}"; then
1202
1203{
1204test -n "$verbose" && \
1205echo " defining HAVE_LIBINET"
1206echo "#define" HAVE_LIBINET "1" >> confdefs.h
1207DEFS="$DEFS -DHAVE_LIBINET=1"
1208ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBINET\${ac_dB}HAVE_LIBINET\${ac_dC}1\${ac_dD}
1209\${ac_uA}HAVE_LIBINET\${ac_uB}HAVE_LIBINET\${ac_uC}1\${ac_uD}
1210\${ac_eA}HAVE_LIBINET\${ac_eB}HAVE_LIBINET\${ac_eC}1\${ac_eD}
1211"
1212}
1213
1214 LIBS="${LIBS} -linet"
1215fi
1216
1217ac_save_LIBS="${LIBS}"
1218LIBS="${LIBS} -lnsl"
1219ac_have_lib=""
1220test -n "$silent" || echo "checking for -lnsl"
1221cat > conftest.${ac_ext} <<EOF
1222#include "confdefs.h"
1223
1224int main() { return 0; }
1225int t() { main();; return 0; }
1226EOF
1227if eval $ac_compile; then
1228 rm -rf conftest*
1229 ac_have_lib="1"
1230
1231fi
1232rm -f conftest*
1233LIBS="${ac_save_LIBS}"
1234if test -n "${ac_have_lib}"; then
1235
1236{
1237test -n "$verbose" && \
1238echo " defining HAVE_LIBNSL"
1239echo "#define" HAVE_LIBNSL "1" >> confdefs.h
1240DEFS="$DEFS -DHAVE_LIBNSL=1"
1241ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBNSL\${ac_dB}HAVE_LIBNSL\${ac_dC}1\${ac_dD}
1242\${ac_uA}HAVE_LIBNSL\${ac_uB}HAVE_LIBNSL\${ac_uC}1\${ac_uD}
1243\${ac_eA}HAVE_LIBNSL\${ac_eB}HAVE_LIBNSL\${ac_eC}1\${ac_eD}
1244"
1245}
1246
1247 LIBS="${LIBS} -lnsl"
1248fi
1249
1250
1251fi
1252
1253
1254test -n "$silent" || echo "checking for --with-readline"
1255# check whether --with-readline or --without-readline was given.
1256withval="$with_readline"
1257if test -n "$withval"; then
1258
1259{
1260test -n "$verbose" && \
1261echo " defining WITH_READLINE"
1262echo "#define" WITH_READLINE "1" >> confdefs.h
1263DEFS="$DEFS -DWITH_READLINE=1"
1264ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_READLINE\${ac_dB}WITH_READLINE\${ac_dC}1\${ac_dD}
1265\${ac_uA}WITH_READLINE\${ac_uB}WITH_READLINE\${ac_uC}1\${ac_uD}
1266\${ac_eA}WITH_READLINE\${ac_eB}WITH_READLINE\${ac_eC}1\${ac_eD}
1267"
1268}
1269
1270if test -d "$withval"
1271then LIBS="$LIBS -L$withval"
1272else echo "configure: proper usage is --with-readline=DIRECTORY" >&2; exit 1
1273fi
1274termcap=
1275ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001276LIBS="${LIBS} -ltermcap"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277ac_have_lib=""
1278test -n "$silent" || echo "checking for -ltermcap"
1279cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001280#include "confdefs.h"
1281
Guido van Rossum7f43da71994-08-01 12:15:30 +00001282int main() { return 0; }
1283int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001284EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001285if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001287 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001288
1289fi
1290rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001291LIBS="${ac_save_LIBS}"
1292if test -n "${ac_have_lib}"; then
1293 :; termcap=termcap
1294else
1295 :; ac_save_LIBS="${LIBS}"
1296LIBS="${LIBS} -ltermlib"
1297ac_have_lib=""
1298test -n "$silent" || echo "checking for -ltermlib"
1299cat > conftest.${ac_ext} <<EOF
1300#include "confdefs.h"
1301
1302int main() { return 0; }
1303int t() { main();; return 0; }
1304EOF
1305if eval $ac_compile; then
1306 rm -rf conftest*
1307 ac_have_lib="1"
1308
1309fi
1310rm -f conftest*
1311LIBS="${ac_save_LIBS}"
1312if test -n "${ac_have_lib}"; then
1313 :; termcap=termlib
1314else
1315 :;
1316fi
1317
1318fi
1319
1320if test ! -z "$termcap"
1321then LIBS="$LIBS -lreadline"
1322 # Avoid possible conflict between shared libraries termcap and gl
1323 # on IRIX 5: both contain a routine called clear.
1324 if test -f /usr/lib/lib$termcap.a
1325 then LIBS="$LIBS /usr/lib/lib$termcap.a"
1326 else LIBS="$LIBS -l$termcap"
1327 fi
1328else echo "configure: no working termcap/termlib" >&2; exit 1
1329fi
1330fi
1331
1332
1333test -n "$silent" || echo "checking for --with-thread"
1334# check whether --with-thread or --without-thread was given.
1335withval="$with_thread"
1336if test -n "$withval"; then
1337
1338if test -d "$withval"
1339then LIBS="$LIBS -L$withval"
1340fi
1341ac_save_LIBS="${LIBS}"
1342LIBS="${LIBS} -lpthreads"
1343ac_have_lib=""
1344test -n "$silent" || echo "checking for -lpthreads"
1345cat > conftest.${ac_ext} <<EOF
1346#include "confdefs.h"
1347
1348int main() { return 0; }
1349int t() { main();; return 0; }
1350EOF
1351if eval $ac_compile; then
1352 rm -rf conftest*
1353 ac_have_lib="1"
1354
1355fi
1356rm -f conftest*
1357LIBS="${ac_save_LIBS}"
1358if test -n "${ac_have_lib}"; then
1359 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001360{
1361test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001362echo " defining WITH_THREAD"
1363echo "#define" WITH_THREAD "1" >> confdefs.h
1364DEFS="$DEFS -DWITH_THREAD=1"
1365ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD}
1366\${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD}
1367\${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD}
1368"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001369}
1370
Guido van Rossum7f43da71994-08-01 12:15:30 +00001371
1372{
1373test -n "$verbose" && \
1374echo " defining _POSIX_THREADS"
1375echo "#define" _POSIX_THREADS "1" >> confdefs.h
1376DEFS="$DEFS -D_POSIX_THREADS=1"
1377ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_THREADS\${ac_dB}_POSIX_THREADS\${ac_dC}1\${ac_dD}
1378\${ac_uA}_POSIX_THREADS\${ac_uB}_POSIX_THREADS\${ac_uC}1\${ac_uD}
1379\${ac_eA}_POSIX_THREADS\${ac_eB}_POSIX_THREADS\${ac_eC}1\${ac_eD}
1380"
1381}
1382
1383LIBS="$LIBS -lpthreads"
1384LIBOBJS="$LIBOBJS thread.o"
1385else
1386 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001387fi
1388
Guido van Rossum7f43da71994-08-01 12:15:30 +00001389ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001390LIBS="${LIBS} -lmpc"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001391ac_have_lib=""
1392test -n "$silent" || echo "checking for -lmpc"
1393cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001394#include "confdefs.h"
1395
Guido van Rossum7f43da71994-08-01 12:15:30 +00001396int main() { return 0; }
1397int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001398EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001399if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001400 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001401 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001402
1403fi
1404rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001405LIBS="${ac_save_LIBS}"
1406if test -n "${ac_have_lib}"; then
1407 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001408{
1409test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001410echo " defining WITH_THREAD"
1411echo "#define" WITH_THREAD "1" >> confdefs.h
1412DEFS="$DEFS -DWITH_THREAD=1"
1413ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD}
1414\${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD}
1415\${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD}
1416"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001417}
1418
Guido van Rossum7f43da71994-08-01 12:15:30 +00001419LIBS="$LIBS -lmpc"
1420LIBOBJS="$LIBOBJS thread.o"
1421else
1422 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001423fi
1424
Guido van Rossum7f43da71994-08-01 12:15:30 +00001425ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001426LIBS="${LIBS} -lthread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001427ac_have_lib=""
1428test -n "$silent" || echo "checking for -lthread"
1429cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001430#include "confdefs.h"
1431
Guido van Rossum7f43da71994-08-01 12:15:30 +00001432int main() { return 0; }
1433int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001434EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001435if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001436 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001437 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001438
1439fi
1440rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001441LIBS="${ac_save_LIBS}"
1442if test -n "${ac_have_lib}"; then
1443 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001444{
1445test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001446echo " defining WITH_THREAD"
1447echo "#define" WITH_THREAD "1" >> confdefs.h
1448DEFS="$DEFS -DWITH_THREAD=1"
1449ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD}
1450\${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD}
1451\${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD}
1452"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001453}
1454
Guido van Rossum7f43da71994-08-01 12:15:30 +00001455LIBS="$LIBS -lthread"
1456LIBOBJS="$LIBOBJS thread.o"
1457else
1458 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001459fi
1460
Guido van Rossum7f43da71994-08-01 12:15:30 +00001461
Guido van Rossum627b2d71993-12-24 10:39:16 +00001462fi
1463
Guido van Rossum7f43da71994-08-01 12:15:30 +00001464
1465# -I${DLINCLDIR} is added to the compile rule for import.o
1466
1467DLINCLDIR=/
1468
1469test -n "$silent" || echo "checking for --with-sgi-dl"
1470# check whether --with-sgi-dl or --without-sgi-dl was given.
1471withval="$with_sgi_dl"
1472if test -n "$withval"; then
1473
1474{
1475test -n "$verbose" && \
1476echo " defining WITH_SGI_DL"
1477echo "#define" WITH_SGI_DL "1" >> confdefs.h
1478DEFS="$DEFS -DWITH_SGI_DL=1"
1479ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_SGI_DL\${ac_dB}WITH_SGI_DL\${ac_dC}1\${ac_dD}
1480\${ac_uA}WITH_SGI_DL\${ac_uB}WITH_SGI_DL\${ac_uC}1\${ac_uD}
1481\${ac_eA}WITH_SGI_DL\${ac_eB}WITH_SGI_DL\${ac_eC}1\${ac_eD}
1482"
1483}
1484
1485dldir=$withval
1486if test -d "$dldir"
1487then LIBS="$LIBS -L$dldir"
1488else echo "configure: proper usage is --with-sgi-dl=DIRECTORY" >&2; exit 1
1489fi
1490DLINCLDIR=${dldir}
1491LIBS="$LIBS -ldl -lmld"
1492fi
1493
1494
1495test -n "$silent" || echo "checking for --with-dl-dld"
1496# check whether --with-dl-dld or --without-dl-dld was given.
1497withval="$with_dl_dld"
1498if test -n "$withval"; then
1499
1500{
1501test -n "$verbose" && \
1502echo " defining WITH_DL_DLD"
1503echo "#define" WITH_DL_DLD "1" >> confdefs.h
1504DEFS="$DEFS -DWITH_DL_DLD=1"
1505ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_DL_DLD\${ac_dB}WITH_DL_DLD\${ac_dC}1\${ac_dD}
1506\${ac_uA}WITH_DL_DLD\${ac_uB}WITH_DL_DLD\${ac_uC}1\${ac_uD}
1507\${ac_eA}WITH_DL_DLD\${ac_eB}WITH_DL_DLD\${ac_eC}1\${ac_eD}
1508"
1509}
1510
1511dldir=`echo "$withval" | sed 's/,.*//'`
1512dlddir=`echo "$withval" | sed 's/.*,//'`
1513if test -d "$dldir" -a -d "$dlddir"
1514then LIBS="$LIBS -L$dldir -L$dlddir"
1515else echo "configure: proper usage is --with-dl-dld=DL_DIRECTORY" >&2; exit 1
1516fi
1517DLINCLDIR=${dldir}
1518LIBS="$LIBS -ldl -ldld"
1519fi
1520
1521
Guido van Rossum627b2d71993-12-24 10:39:16 +00001522# checks for library functions
Guido van Rossum7f43da71994-08-01 12:15:30 +00001523for ac_func in chown clock dlopen ftime gettimeofday getpeername getpgrp getpid getwd link lstat nice readlink select setgid setuid setsid setpgid setpgrp setvbuf siginterrupt symlink tcgetpgrp tcsetpgrp times uname waitpid
Guido van Rossum627b2d71993-12-24 10:39:16 +00001524do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001525ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1526test -n "$silent" || echo "checking for ${ac_func}"
1527cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001528#include "confdefs.h"
1529#include <ctype.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001530int main() { return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001531int t() {
1532/* The GNU C library defines this for functions which it implements
1533 to always fail with ENOSYS. Some functions are actually named
1534 something starting with __ and the normal name is an alias. */
Guido van Rossum7f43da71994-08-01 12:15:30 +00001535#if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
Guido van Rossum627b2d71993-12-24 10:39:16 +00001536choke me
1537#else
1538/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum7f43da71994-08-01 12:15:30 +00001539extern char ${ac_func}(); ${ac_func}();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001540#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00001541; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001542EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001543if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001544 rm -rf conftest*
1545 {
1546test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001547echo " defining ${ac_tr_func}"
1548echo "#define" ${ac_tr_func} "1" >> confdefs.h
1549DEFS="$DEFS -D${ac_tr_func}=1"
1550ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
1551\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
1552\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
1553"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001554}
1555
1556
1557fi
1558rm -f conftest*
1559done
1560
Guido van Rossum7f43da71994-08-01 12:15:30 +00001561for ac_func in dup2 getcwd strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00001562do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001563test -n "$silent" || echo "checking for ${ac_func}"
1564cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001565#include "confdefs.h"
1566#include <ctype.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001567int main() { return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001568int t() {
1569/* The GNU C library defines this for functions which it implements
1570 to always fail with ENOSYS. Some functions are actually named
1571 something starting with __ and the normal name is an alias. */
Guido van Rossum7f43da71994-08-01 12:15:30 +00001572#if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
Guido van Rossum627b2d71993-12-24 10:39:16 +00001573choke me
1574#else
1575/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum7f43da71994-08-01 12:15:30 +00001576extern char ${ac_func}(); ${ac_func}();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001577#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00001578; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001579EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001580if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001581 :
1582else
1583 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001584 LIBOBJS="$LIBOBJS ${ac_func}.o"
1585test -n "$verbose" && echo " using ${ac_func}.o instead"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001586fi
1587rm -f conftest*
1588
1589done
1590
Guido van Rossum7f43da71994-08-01 12:15:30 +00001591test -n "$silent" || echo "checking for getpgrp"
1592cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001593#include "confdefs.h"
1594#include <ctype.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001595int main() { return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001596int t() {
1597/* The GNU C library defines this for functions which it implements
1598 to always fail with ENOSYS. Some functions are actually named
1599 something starting with __ and the normal name is an alias. */
1600#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
1601choke me
1602#else
1603/* Override any gcc2 internal prototype to avoid an error. */
1604extern char getpgrp(); getpgrp();
1605#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00001606; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001607EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001608if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001609 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001610 test -n "$silent" || echo "checking for argument to getpgrp"
1611cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001612#include "confdefs.h"
1613#include <unistd.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001614int main() { return 0; }
1615int t() { getpgrp(0);; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001616EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001617if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001618 rm -rf conftest*
1619
1620{
1621test -n "$verbose" && \
1622echo " defining GETPGRP_HAVE_ARG"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001623echo "#define" GETPGRP_HAVE_ARG "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001624DEFS="$DEFS -DGETPGRP_HAVE_ARG=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001625ac_sed_defs="${ac_sed_defs}\${ac_dA}GETPGRP_HAVE_ARG\${ac_dB}GETPGRP_HAVE_ARG\${ac_dC}1\${ac_dD}
1626\${ac_uA}GETPGRP_HAVE_ARG\${ac_uB}GETPGRP_HAVE_ARG\${ac_uC}1\${ac_uD}
1627\${ac_eA}GETPGRP_HAVE_ARG\${ac_eB}GETPGRP_HAVE_ARG\${ac_eC}1\${ac_eD}
1628"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001629}
1630
1631
1632fi
1633rm -f conftest*
1634
1635
1636fi
1637rm -f conftest*
1638
1639
1640# checks for structures
Guido van Rossum7f43da71994-08-01 12:15:30 +00001641test -n "$silent" || echo "checking for whether time.h and sys/time.h may both be included"
1642cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001643#include "confdefs.h"
1644#include <sys/types.h>
1645#include <sys/time.h>
1646#include <time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001647int main() { return 0; }
1648int t() { struct tm *tp;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001649EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001650if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001651 rm -rf conftest*
1652
1653{
1654test -n "$verbose" && \
1655echo " defining TIME_WITH_SYS_TIME"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001656echo "#define" TIME_WITH_SYS_TIME "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001657DEFS="$DEFS -DTIME_WITH_SYS_TIME=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001658ac_sed_defs="${ac_sed_defs}\${ac_dA}TIME_WITH_SYS_TIME\${ac_dB}TIME_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
1659\${ac_uA}TIME_WITH_SYS_TIME\${ac_uB}TIME_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
1660\${ac_eA}TIME_WITH_SYS_TIME\${ac_eB}TIME_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
1661"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001662}
1663
1664
1665fi
1666rm -f conftest*
1667
Guido van Rossum7f43da71994-08-01 12:15:30 +00001668test -n "$silent" || echo "checking for struct tm in time.h"
1669cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001670#include "confdefs.h"
1671#include <sys/types.h>
1672#include <time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001673int main() { return 0; }
1674int t() { struct tm *tp; tp->tm_sec;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001675EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001676if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001677 :
1678else
1679 rm -rf conftest*
1680
1681{
1682test -n "$verbose" && \
1683echo " defining TM_IN_SYS_TIME"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001684echo "#define" TM_IN_SYS_TIME "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001685DEFS="$DEFS -DTM_IN_SYS_TIME=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001686ac_sed_defs="${ac_sed_defs}\${ac_dA}TM_IN_SYS_TIME\${ac_dB}TM_IN_SYS_TIME\${ac_dC}1\${ac_dD}
1687\${ac_uA}TM_IN_SYS_TIME\${ac_uB}TM_IN_SYS_TIME\${ac_uC}1\${ac_uD}
1688\${ac_eA}TM_IN_SYS_TIME\${ac_eB}TM_IN_SYS_TIME\${ac_eC}1\${ac_eD}
1689"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001690}
1691
1692fi
1693rm -f conftest*
1694
Guido van Rossum7f43da71994-08-01 12:15:30 +00001695ac_decl='#include <sys/types.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001696'
1697case "$DEFS" in
Guido van Rossum7f43da71994-08-01 12:15:30 +00001698 *TM_IN_SYS_TIME*) ac_decl="$ac_decl
Guido van Rossum627b2d71993-12-24 10:39:16 +00001699#include <sys/time.h>
1700" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001701 *) ac_decl="$ac_decl
Guido van Rossum627b2d71993-12-24 10:39:16 +00001702#include <time.h>
1703" ;;
1704esac
Guido van Rossum7f43da71994-08-01 12:15:30 +00001705test -n "$silent" || echo "checking for tm_zone in struct tm"
1706cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001707#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001708$ac_decl
1709int main() { return 0; }
1710int t() { struct tm tm; tm.tm_zone;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001711EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001712if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001713 rm -rf conftest*
1714
1715{
1716test -n "$verbose" && \
1717echo " defining HAVE_TM_ZONE"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001718echo "#define" HAVE_TM_ZONE "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001719DEFS="$DEFS -DHAVE_TM_ZONE=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001720ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TM_ZONE\${ac_dB}HAVE_TM_ZONE\${ac_dC}1\${ac_dD}
1721\${ac_uA}HAVE_TM_ZONE\${ac_uB}HAVE_TM_ZONE\${ac_uC}1\${ac_uD}
1722\${ac_eA}HAVE_TM_ZONE\${ac_eB}HAVE_TM_ZONE\${ac_eC}1\${ac_eD}
1723"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001724}
1725
1726
1727else
1728 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001729 ac_no_tm_zone=1
Guido van Rossum627b2d71993-12-24 10:39:16 +00001730fi
1731rm -f conftest*
1732
Guido van Rossum7f43da71994-08-01 12:15:30 +00001733if test -n "$ac_no_tm_zone"; then
1734test -n "$silent" || echo "checking for tzname"
1735cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001736#include "confdefs.h"
1737#include <time.h>
1738#ifndef tzname /* For SGI. */
1739extern char *tzname[]; /* RS6000 and others want it this way. */
1740#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00001741int main() { return 0; }
1742int t() { atoi(*tzname);; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001743EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001744if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001745 rm -rf conftest*
1746
1747{
1748test -n "$verbose" && \
1749echo " defining HAVE_TZNAME"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001750echo "#define" HAVE_TZNAME "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001751DEFS="$DEFS -DHAVE_TZNAME=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001752ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TZNAME\${ac_dB}HAVE_TZNAME\${ac_dC}1\${ac_dD}
1753\${ac_uA}HAVE_TZNAME\${ac_uB}HAVE_TZNAME\${ac_uC}1\${ac_uD}
1754\${ac_eA}HAVE_TZNAME\${ac_eB}HAVE_TZNAME\${ac_eC}1\${ac_eD}
1755"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001756}
1757
1758
1759fi
1760rm -f conftest*
1761
1762fi
1763
Guido van Rossum7f43da71994-08-01 12:15:30 +00001764test -n "$silent" || echo "checking for whether we have altzone"
1765cat > conftest.${ac_ext} <<EOF
1766#include "confdefs.h"
1767#include <time.h>
1768int main() { return 0; }
1769int t() { return altzone;; return 0; }
1770EOF
1771if eval $ac_compile; then
1772 rm -rf conftest*
1773
1774{
1775test -n "$verbose" && \
1776echo " defining HAVE_ALTZONE"
1777echo "#define" HAVE_ALTZONE "1" >> confdefs.h
1778DEFS="$DEFS -DHAVE_ALTZONE=1"
1779ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALTZONE\${ac_dB}HAVE_ALTZONE\${ac_dC}1\${ac_dD}
1780\${ac_uA}HAVE_ALTZONE\${ac_uB}HAVE_ALTZONE\${ac_uC}1\${ac_uD}
1781\${ac_eA}HAVE_ALTZONE\${ac_eB}HAVE_ALTZONE\${ac_eC}1\${ac_eD}
1782"
1783}
1784
1785
1786fi
1787rm -f conftest*
1788
1789test -n "$silent" || echo "checking for whether sys/select.h and sys/time.h may both be included"
1790cat > conftest.${ac_ext} <<EOF
1791#include "confdefs.h"
1792
1793#include <sys/types.h>
1794#include <sys/select.h>
1795#include <sys/time.h>
1796
1797int main() { return 0; }
1798int t() { ;; return 0; }
1799EOF
1800if eval $ac_compile; then
1801 rm -rf conftest*
1802
1803{
1804test -n "$verbose" && \
1805echo " defining SYS_SELECT_WITH_SYS_TIME"
1806echo "#define" SYS_SELECT_WITH_SYS_TIME "1" >> confdefs.h
1807DEFS="$DEFS -DSYS_SELECT_WITH_SYS_TIME=1"
1808ac_sed_defs="${ac_sed_defs}\${ac_dA}SYS_SELECT_WITH_SYS_TIME\${ac_dB}SYS_SELECT_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
1809\${ac_uA}SYS_SELECT_WITH_SYS_TIME\${ac_uB}SYS_SELECT_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
1810\${ac_eA}SYS_SELECT_WITH_SYS_TIME\${ac_eB}SYS_SELECT_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
1811"
1812}
1813
1814
1815fi
1816rm -f conftest*
1817
Guido van Rossum627b2d71993-12-24 10:39:16 +00001818
1819# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00001820
1821test -n "$silent" || echo "checking for unsigned characters"
1822cat > conftest.${ac_ext} <<EOF
1823#include "confdefs.h"
1824/* volatile prevents gcc2 from optimizing the test away on sparcs. */
1825#if !__STDC__
1826#define volatile
1827#endif
1828main() {
1829#ifdef __CHAR_UNSIGNED__
1830 exit(1); /* No need to redefine it. */
1831#else
1832 volatile char c = 255; exit(c < 0);
1833#endif
1834}
1835EOF
1836eval $ac_compile
1837if test -s conftest && (./conftest; exit) 2>/dev/null; then
1838
1839{
1840test -n "$verbose" && \
1841echo " defining __CHAR_UNSIGNED__"
1842echo "#define" __CHAR_UNSIGNED__ "1" >> confdefs.h
1843DEFS="$DEFS -D__CHAR_UNSIGNED__=1"
1844ac_sed_defs="${ac_sed_defs}\${ac_dA}__CHAR_UNSIGNED__\${ac_dB}__CHAR_UNSIGNED__\${ac_dC}1\${ac_dD}
1845\${ac_uA}__CHAR_UNSIGNED__\${ac_uB}__CHAR_UNSIGNED__\${ac_uC}1\${ac_uD}
1846\${ac_eA}__CHAR_UNSIGNED__\${ac_eB}__CHAR_UNSIGNED__\${ac_eC}1\${ac_eD}
1847"
1848}
1849
1850
1851fi
1852rm -fr conftest*
1853
1854
1855ac_prog='/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00001856typedef int charset[2]; const charset x;
1857/* SunOS 4.1.1 cc rejects this. */
1858char const *const *ccp;
1859char **p;
1860/* AIX XL C 1.02.0.0 rejects this.
1861 It does not let you subtract one const X* pointer from another in an arm
1862 of an if-expression whose if-part is not a constant expression */
1863const char *g = "string";
1864ccp = &g + (g ? g-g : 0);
1865/* HPUX 7.0 cc rejects these. */
1866++ccp;
1867p = (char**) ccp;
1868ccp = (char const *const *) p;
1869{ /* SCO 3.2v4 cc rejects this. */
1870 char *t;
1871 char const *s = 0 ? (char *) 0 : (char const *) 0;
1872
1873 *t++ = 0;
1874}
1875{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1876 int x[] = {25,17};
1877 const int *foo = &x[0];
1878 ++foo;
1879}
1880{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1881 typedef const int *iptr;
1882 iptr p = 0;
1883 ++p;
1884}
1885{ /* AIX XL C 1.02.0.0 rejects this saying
1886 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1887 struct s { int j; const int *ap[3]; };
1888 struct s *b; b->j = 5;
1889}
1890{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1891 const int foo = 10;
1892}'
Guido van Rossum7f43da71994-08-01 12:15:30 +00001893test -n "$silent" || echo "checking for lack of working const"
1894cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001895#include "confdefs.h"
1896
Guido van Rossum7f43da71994-08-01 12:15:30 +00001897int main() { return 0; }
1898int t() { $ac_prog; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001899EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001900if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001901 :
1902else
1903 rm -rf conftest*
1904
1905{
1906test -n "$verbose" && \
1907echo " defining" const to be empty
Guido van Rossum7f43da71994-08-01 12:15:30 +00001908echo "#define" const "" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001909DEFS="$DEFS -Dconst="
Guido van Rossum7f43da71994-08-01 12:15:30 +00001910ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD}
1911\${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD}
1912\${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD}
1913"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001914}
1915
1916fi
1917rm -f conftest*
1918
Guido van Rossum7f43da71994-08-01 12:15:30 +00001919
1920test -n "$silent" || echo "checking for wheter we have signed char"
1921cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001922#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001923
1924int main() { return 0; }
1925int t() { signed char c;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001926EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001927if eval $ac_compile; then
1928 :
1929else
1930 rm -rf conftest*
1931
1932{
1933test -n "$verbose" && \
1934echo " defining" signed to be empty
1935echo "#define" signed "" >> confdefs.h
1936DEFS="$DEFS -Dsigned="
1937ac_sed_defs="${ac_sed_defs}\${ac_dA}signed\${ac_dB}signed\${ac_dC}\${ac_dD}
1938\${ac_uA}signed\${ac_uB}signed\${ac_uC}\${ac_uD}
1939\${ac_eA}signed\${ac_eB}signed\${ac_eC}\${ac_eD}
1940"
1941}
1942
1943fi
1944rm -f conftest*
1945
1946
1947test -n "$silent" || echo "checking for prototypes"
1948cat > conftest.${ac_ext} <<EOF
1949#include "confdefs.h"
1950
1951int foo(int x) { return 0; }
1952int main() { return foo(10); }
1953
1954EOF
1955eval $ac_compile
Guido van Rossum627b2d71993-12-24 10:39:16 +00001956if test -s conftest && (./conftest; exit) 2>/dev/null; then
1957
1958{
1959test -n "$verbose" && \
1960echo " defining HAVE_PROTOTYPES"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001961echo "#define" HAVE_PROTOTYPES "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001962DEFS="$DEFS -DHAVE_PROTOTYPES=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001963ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_PROTOTYPES\${ac_dB}HAVE_PROTOTYPES\${ac_dC}1\${ac_dD}
1964\${ac_uA}HAVE_PROTOTYPES\${ac_uB}HAVE_PROTOTYPES\${ac_uC}1\${ac_uD}
1965\${ac_eA}HAVE_PROTOTYPES\${ac_eB}HAVE_PROTOTYPES\${ac_eC}1\${ac_eD}
1966"
1967}
1968 have_prototypes=1
1969
1970fi
1971rm -fr conftest*
1972
1973test -n "$silent" || echo "checking for variable length prototypes and stdarg.h"
1974cat > conftest.${ac_ext} <<EOF
1975#include "confdefs.h"
1976
1977#include <stdarg.h>
1978int foo(int x, ...) { return 0; }
1979int main() { return foo(10, 11, 12); }
1980
1981EOF
1982eval $ac_compile
1983if test -s conftest && (./conftest; exit) 2>/dev/null; then
1984
1985{
1986test -n "$verbose" && \
1987echo " defining HAVE_STDARG_PROTOTYPES"
1988echo "#define" HAVE_STDARG_PROTOTYPES "1" >> confdefs.h
1989DEFS="$DEFS -DHAVE_STDARG_PROTOTYPES=1"
1990ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_STDARG_PROTOTYPES\${ac_dB}HAVE_STDARG_PROTOTYPES\${ac_dC}1\${ac_dD}
1991\${ac_uA}HAVE_STDARG_PROTOTYPES\${ac_uB}HAVE_STDARG_PROTOTYPES\${ac_uC}1\${ac_uD}
1992\${ac_eA}HAVE_STDARG_PROTOTYPES\${ac_eB}HAVE_STDARG_PROTOTYPES\${ac_eC}1\${ac_eD}
1993"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001994}
1995 have_prototypes=1
1996
1997fi
1998rm -fr conftest*
1999if test "$have_prototypes"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002000test -n "$silent" || echo "checking for "bad exec* prototypes""
2001cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002002#include "confdefs.h"
2003#include <unistd.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002004int main() { return 0; }
2005int t() { char **t;execve("@",t,t);; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002006EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002007if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002008 :
2009else
2010 rm -rf conftest*
2011
2012{
2013test -n "$verbose" && \
2014echo " defining BAD_EXEC_PROTOTYPES"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002015echo "#define" BAD_EXEC_PROTOTYPES "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00002016DEFS="$DEFS -DBAD_EXEC_PROTOTYPES=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002017ac_sed_defs="${ac_sed_defs}\${ac_dA}BAD_EXEC_PROTOTYPES\${ac_dB}BAD_EXEC_PROTOTYPES\${ac_dC}1\${ac_dD}
2018\${ac_uA}BAD_EXEC_PROTOTYPES\${ac_uB}BAD_EXEC_PROTOTYPES\${ac_uC}1\${ac_uD}
2019\${ac_eA}BAD_EXEC_PROTOTYPES\${ac_eB}BAD_EXEC_PROTOTYPES\${ac_eC}1\${ac_eD}
2020"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002021}
2022
2023fi
2024rm -f conftest*
2025
2026fi
2027
Guido van Rossum7f43da71994-08-01 12:15:30 +00002028test -n "$silent" || echo "checking for bad static forward"
2029cat > conftest.${ac_ext} <<EOF
2030#include "confdefs.h"
2031
2032struct s { int a; int b; };
2033static struct s foo;
2034int foobar() { return !foo.a; }
2035static struct s foo = { 1, 2 };
2036main() { exit(foobar()); }
2037
2038EOF
2039eval $ac_compile
2040if test -s conftest && (./conftest; exit) 2>/dev/null; then
2041 :
2042else
2043
2044{
2045test -n "$verbose" && \
2046echo " defining BAD_STATIC_FORWARD"
2047echo "#define" BAD_STATIC_FORWARD "1" >> confdefs.h
2048DEFS="$DEFS -DBAD_STATIC_FORWARD=1"
2049ac_sed_defs="${ac_sed_defs}\${ac_dA}BAD_STATIC_FORWARD\${ac_dB}BAD_STATIC_FORWARD\${ac_dC}1\${ac_dD}
2050\${ac_uA}BAD_STATIC_FORWARD\${ac_uB}BAD_STATIC_FORWARD\${ac_uC}1\${ac_uD}
2051\${ac_eA}BAD_STATIC_FORWARD\${ac_eB}BAD_STATIC_FORWARD\${ac_eC}1\${ac_eD}
2052"
2053}
2054
2055fi
2056rm -fr conftest*
2057
Guido van Rossum627b2d71993-12-24 10:39:16 +00002058# checks for system services
2059# (none yet)
2060
2061# other checks for UNIX variants
Guido van Rossum7f43da71994-08-01 12:15:30 +00002062ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002063LIBS="${LIBS} -lsun"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002064ac_have_lib=""
2065test -n "$silent" || echo "checking for -lsun"
2066cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002067#include "confdefs.h"
2068
Guido van Rossum7f43da71994-08-01 12:15:30 +00002069int main() { return 0; }
2070int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002071EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002072if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002073 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00002074 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002075
2076fi
2077rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00002078LIBS="${ac_save_LIBS}"
2079if test -n "${ac_have_lib}"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002080 :; LIBS="$LIBS -lsun"
2081else
2082 :;
2083fi
2084
2085
Guido van Rossum7f43da71994-08-01 12:15:30 +00002086test -n "$silent" || echo "checking for Xenix"
2087cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002088#include "confdefs.h"
2089#if defined(M_XENIX) && !defined(M_UNIX)
2090 yes
2091#endif
2092
2093EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002094eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002095if egrep "yes" conftest.out >/dev/null 2>&1; then
2096 rm -rf conftest*
2097 XENIX=1
2098
2099fi
2100rm -f conftest*
2101
2102if test -n "$XENIX"; then
2103 LIBS="$LIBS -lx"
2104 case "$DEFS" in
2105 *SYSNDIR*) ;;
2106 *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
2107 esac
2108fi
2109
2110
Guido van Rossum7f43da71994-08-01 12:15:30 +00002111# check for --with-libm=...
2112
2113LIBM=-lm
2114# check whether --with-libm or --without-libm was given.
2115withval="$with_libm"
2116if test -n "$withval"; then
2117 if test "$withval" != yes
2118then LIBM=$withval
2119else echo "configure: proper usage is --with-libm=STRING" >&2; exit 1
2120fi
2121fi
2122
2123
2124# check for --with-libc=...
2125
2126# check whether --with-libc or --without-libc was given.
2127withval="$with_libc"
2128if test -n "$withval"; then
2129 if test "$withval" != yes
2130then LIBC=$withval
2131else echo "configure: proper usage is --with-libc=STRING" >&2; exit 1
2132fi
2133fi
2134
2135
Guido van Rossum627b2d71993-12-24 10:39:16 +00002136# generate output files
2137# Set default prefixes.
2138if test -n "$prefix"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002139 test -z "$exec_prefix" && exec_prefix='${prefix}' # Let make expand it.
2140 ac_prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002141fi
2142if test -n "$exec_prefix"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002143 ac_prsub="$ac_prsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00002144s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
2145fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002146# Any assignment to VPATH causes Sun make to only execute
2147# the first set of double-colon rules, so remove it if not needed.
2148# If there is a colon in the path, we need to keep it.
2149if test "x$srcdir" = x.; then
2150 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2151fi
2152
Guido van Rossum627b2d71993-12-24 10:39:16 +00002153# Quote sed substitution magic chars in DEFS.
2154cat >conftest.def <<EOF
2155$DEFS
2156EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002157ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
2158DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
Guido van Rossum627b2d71993-12-24 10:39:16 +00002159rm -f conftest.def
2160# Substitute for predefined variables.
2161
Guido van Rossum7f43da71994-08-01 12:15:30 +00002162trap 'rm -f config.status; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00002163echo creating config.status
2164rm -f config.status
2165cat > config.status <<EOF
2166#!/bin/sh
2167# Generated automatically by configure.
2168# Run this file to recreate the current configuration.
2169# This directory was configured as follows,
2170# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2171#
2172# $0 $configure_args
2173
Guido van Rossum7f43da71994-08-01 12:15:30 +00002174ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
2175for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00002176do
Guido van Rossum7f43da71994-08-01 12:15:30 +00002177 case "\$ac_option" in
2178 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2179 echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
2180 exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
2181 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2182 echo "config.status generated by autoconf version 1.8"
2183 exit 0 ;;
2184 -help | --help | --hel | --he | --h)
2185 echo "\$ac_cs_usage"; exit 0 ;;
2186 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00002187 esac
2188done
2189
Guido van Rossum7f43da71994-08-01 12:15:30 +00002190trap 'rm -fr Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre config.h conftest*; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00002191CC='$CC'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002192INSTALL='$INSTALL'
2193INSTALL_PROGRAM='$INSTALL_PROGRAM'
2194INSTALL_DATA='$INSTALL_DATA'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002195RANLIB='$RANLIB'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002196AR='$AR'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002197CPP='$CPP'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002198DLINCLDIR='$DLINCLDIR'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002199LIBOBJS='$LIBOBJS'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002200LIBM='$LIBM'
2201LIBC='$LIBC'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002202LIBS='$LIBS'
2203srcdir='$srcdir'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002204top_srcdir='$top_srcdir'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002205prefix='$prefix'
2206exec_prefix='$exec_prefix'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002207ac_prsub='$ac_prsub'
2208ac_vpsub='$ac_vpsub'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002209extrasub='$extrasub'
2210EOF
2211cat >> config.status <<\EOF
2212
Guido van Rossum7f43da71994-08-01 12:15:30 +00002213ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00002214
Guido van Rossum7f43da71994-08-01 12:15:30 +00002215CONFIG_FILES=${CONFIG_FILES-"Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre"}
2216for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002217 # Remove last slash and all that follows it. Not all systems have dirname.
Guido van Rossum7f43da71994-08-01 12:15:30 +00002218 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2219 if test "$ac_dir" != "$ac_file"; then
2220 # The file is in a subdirectory.
2221 test ! -d "$ac_dir" && mkdir "$ac_dir"
2222 ac_dir_suffix="/$ac_dir"
2223 else
2224 ac_dir_suffix=
Guido van Rossum627b2d71993-12-24 10:39:16 +00002225 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002226
2227 # A "../" for each directory in $ac_dir_suffix.
2228 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2229 case "$ac_given_srcdir" in
2230 .) srcdir=.; top_srcdir="$ac_dots." ;;
2231 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2232 *) # Relative path.
2233 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2234 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2235 esac
2236
2237 echo creating "$ac_file"
2238 rm -f "$ac_file"
2239 comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
2240 case "$ac_file" in
2241 *.c | *.h | *.C | *.cc | *.m ) echo "/* $comment_str */" > "$ac_file" ;;
2242 * ) echo "# $comment_str" > "$ac_file" ;;
2243 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00002244 sed -e "
Guido van Rossum7f43da71994-08-01 12:15:30 +00002245$ac_prsub
2246$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00002247$extrasub
2248s%@CC@%$CC%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002249s%@INSTALL@%$INSTALL%g
2250s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
2251s%@INSTALL_DATA@%$INSTALL_DATA%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002252s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002253s%@AR@%$AR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002254s%@CPP@%$CPP%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002255s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002256s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002257s%@LIBM@%$LIBM%g
2258s%@LIBC@%$LIBC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002259s%@LIBS@%$LIBS%g
2260s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002261s%@top_srcdir@%$top_srcdir%g
2262s%@prefix@%$prefix%g
2263s%@exec_prefix@%$exec_prefix%g
2264s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00002265fi; done
2266
Guido van Rossum7f43da71994-08-01 12:15:30 +00002267# These sed commands are put into ac_sed_defs when defining a macro.
2268# They are broken into pieces to make the sed script easier to manage.
2269# They are passed to sed as "A NAME B NAME C VALUE D", where NAME
2270# is the cpp macro being defined and VALUE is the value it is being given.
2271# Each defining turns into a single global substitution command.
2272# Hopefully no one uses "!" as a variable value.
2273# Other candidates for the sed separators, like , and @, do get used.
2274#
2275# ac_d sets the value in "#define NAME VALUE" lines.
2276ac_dA='s!^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2277ac_dB='\([ ][ ]*\)[^ ]*!\1#\2'
2278ac_dC='\3'
2279ac_dD='!g'
2280# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2281ac_uA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2282ac_uB='\([ ]\)!\1#\2define\3'
2283ac_uC=' '
2284ac_uD='\4!g'
2285# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2286ac_eA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2287ac_eB='$!\1#\2define\3'
2288ac_eC=' '
2289ac_eD='!g'
2290rm -f conftest.sed
2291EOF
2292# Turn off quoting long enough to insert the sed commands.
2293rm -f conftest.sh
2294cat > conftest.sh <<EOF
2295$ac_sed_defs
2296EOF
2297
2298# Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
2299# on the size of here documents.
2300
2301# Maximum number of lines to put in a single here document.
2302ac_max_sh_lines=9
2303
2304while :
2305do
2306 # wc gives bogus results for an empty file on some AIX systems.
2307 ac_lines=`grep -c . conftest.sh`
2308 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2309 rm -f conftest.s1 conftest.s2
2310 sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -20.
2311 sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +21.
2312 # Write a limited-size here document to append to conftest.sed.
2313 echo 'cat >> conftest.sed <<CONFEOF' >> config.status
2314 cat conftest.s1 >> config.status
2315 echo 'CONFEOF' >> config.status
2316 rm -f conftest.s1 conftest.sh
2317 mv conftest.s2 conftest.sh
2318done
2319rm -f conftest.sh
2320
2321# Now back to your regularly scheduled config.status.
2322cat >> config.status <<\EOF
2323# This sed command replaces #undef's with comments. This is necessary, for
2324# example, in the case of _POSIX_SOURCE, which is predefined and required
2325# on some systems where configure will not decide to define it in
2326# config.h.
2327cat >> conftest.sed <<\CONFEOF
2328s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
2329CONFEOF
2330rm -f conftest.h
2331# Break up the sed commands because old seds have small limits.
2332ac_max_sed_lines=20
2333
2334CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
2335for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
2336 echo creating $ac_file
2337
2338 cp $ac_given_srcdir/$ac_file.in conftest.h1
2339 while :
2340 do
2341 ac_lines=`grep -c . conftest.sed`
2342 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2343 rm -f conftest.s1 conftest.s2 conftest.h2
2344 sed ${ac_max_sed_lines}q conftest.sed > conftest.s1 # Like head -20.
2345 sed 1,${ac_max_sed_lines}d conftest.sed > conftest.s2 # Like tail +21.
2346 sed -f conftest.s1 < conftest.h1 > conftest.h2
2347 rm -f conftest.s1 conftest.h1 conftest.sed
2348 mv conftest.h2 conftest.h1
2349 mv conftest.s2 conftest.sed
2350 done
2351 rm -f conftest.sed conftest.h
2352 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2353 cat conftest.h1 >> conftest.h
2354 rm -f conftest.h1
2355 if cmp -s $ac_file conftest.h 2>/dev/null; then
2356 # The file exists and we would not be changing it.
2357 echo "$ac_file is unchanged"
2358 rm -f conftest.h
2359 else
2360 rm -f $ac_file
2361 mv conftest.h $ac_file
2362 fi
2363fi; done
2364
2365
Guido van Rossum627b2d71993-12-24 10:39:16 +00002366
2367exit 0
2368EOF
2369chmod +x config.status
Guido van Rossum7f43da71994-08-01 12:15:30 +00002370test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} config.status
Guido van Rossum627b2d71993-12-24 10:39:16 +00002371