blob: 4bd72288fcfd249d439f2221f201a4e777a48e02 [file] [log] [blame]
Guido van Rossum7f43da71994-08-01 12:15:30 +00001#!/bin/sh
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00002# From configure.in Revision: 1.5
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 +0000319# Don't suppress compiler output when --verbose is specified
320test -n "$verbose" &&
321 ac_compile=`echo "$ac_compile" | sed "s|>/dev/null 2>&1||"`
322test -n "$verbose" && echo " setting ac_compile to '$ac_compile'"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000323
324# checks for alternative programs
Guido van Rossum7f43da71994-08-01 12:15:30 +0000325test -n "$silent" || echo "checking for --with(out)-gcc"
326# check whether --with-gcc or --without-gcc was given.
327withval="$with_gcc"
328if test -n "$withval"; then
329
330 case $withval in
331 no) withval=cc;;
332 yes) withval=gcc;;
333 esac
334 CC=$withval
335fi
336
Guido van Rossum627b2d71993-12-24 10:39:16 +0000337if test -z "$CC"; then
338 # Extract the first word of `gcc', so it can be a program name with args.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000339 set ac_dummy gcc; ac_word=$2
340 test -n "$silent" || echo "checking for $ac_word"
341 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
342 for ac_dir in $PATH; do
343 test -z "$ac_dir" && ac_dir=.
344 if test -f $ac_dir/$ac_word; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000345 CC="gcc"
346 break
347 fi
348 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000349 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000350fi
351test -z "$CC" && CC="cc"
352test -n "$CC" && test -n "$verbose" && echo " setting CC to $CC"
353
354# Find out if we are using GNU C, under whatever name.
355cat > conftest.c <<EOF
356#ifdef __GNUC__
357 yes
358#endif
359EOF
360${CC-cc} -E conftest.c > conftest.out 2>&1
361if egrep yes conftest.out >/dev/null 2>&1; then
362 GCC=1 # For later tests.
363fi
364rm -f conftest*
365
366if test -z "$RANLIB"; then
367 # Extract the first word of `ranlib', so it can be a program name with args.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000368 set ac_dummy ranlib; ac_word=$2
369 test -n "$silent" || echo "checking for $ac_word"
370 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
371 for ac_dir in $PATH; do
372 test -z "$ac_dir" && ac_dir=.
373 if test -f $ac_dir/$ac_word; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000374 RANLIB="ranlib"
375 break
376 fi
377 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000378 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000379fi
380test -z "$RANLIB" && RANLIB=":"
381test -n "$RANLIB" && test -n "$verbose" && echo " setting RANLIB to $RANLIB"
382
383
Guido van Rossum7f43da71994-08-01 12:15:30 +0000384for ac_prog in ar aal
385do
386if test -z "$AR"; then
387 # Extract the first word of `$ac_prog', so it can be a program name with args.
388 set ac_dummy $ac_prog; ac_word=$2
389 test -n "$silent" || echo "checking for $ac_word"
390 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
391 for ac_dir in $PATH; do
392 test -z "$ac_dir" && ac_dir=.
393 if test -f $ac_dir/$ac_word; then
394 AR="$ac_prog"
395 break
396 fi
397 done
398 IFS="$ac_save_ifs"
399fi
400
401test -n "$AR" && test -n "$verbose" && echo " setting AR to $AR"
402
403test -n "$AR" && break
404done
405test -n "$AR" || AR="ar"
406
407
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000408# Install just never works :-(
409if test -z "$INSTALL"
410then INSTALL=cp
411fi
412
413# Optimizer/debugger flags passed between Makefiles
414if test -z "$OPT"
415then OPT=-O
416fi
417
Guido van Rossum627b2d71993-12-24 10:39:16 +0000418# checks for UNIX variants that set C preprocessor variables
Guido van Rossum7f43da71994-08-01 12:15:30 +0000419test -n "$silent" || echo "checking for AIX"
420test -n "$silent" || echo "checking how to run the C preprocessor"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000421if test -z "$CPP"; then
422 # This must be in double quotes, not single quotes, because CPP may get
423 # substituted into the Makefile and ``${CC-cc}'' will simply confuse
424 # make. It must be expanded now.
425 CPP="${CC-cc} -E"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000426 cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000427#include "confdefs.h"
428#include <stdio.h>
429Syntax Error
430EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000431# Some shells (Coherent) do redirections in the wrong order, so need
432# the parens.
433ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
434if test -z "$ac_err"; then
435 :
436else
437 rm -rf conftest*
438 CPP="${CC-cc} -E -traditional-cpp"
439 cat > conftest.${ac_ext} <<EOF
440#include "confdefs.h"
441#include <stdio.h>
442Syntax Error
443EOF
444# Some shells (Coherent) do redirections in the wrong order, so need
445# the parens.
446ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
447if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000448 :
449else
450 rm -rf conftest*
451 CPP=/lib/cpp
452fi
453rm -f conftest*
454fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000455rm -f conftest*
456fi
457test -n "$verbose" && echo " setting CPP to $CPP"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000458
Guido van Rossum7f43da71994-08-01 12:15:30 +0000459cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000460#include "confdefs.h"
461#ifdef _AIX
462 yes
463#endif
464
465EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000466eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000467if egrep "yes" conftest.out >/dev/null 2>&1; then
468 rm -rf conftest*
469
470{
471test -n "$verbose" && \
472echo " defining _ALL_SOURCE"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000473echo "#define" _ALL_SOURCE "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000474DEFS="$DEFS -D_ALL_SOURCE=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000475ac_sed_defs="${ac_sed_defs}\${ac_dA}_ALL_SOURCE\${ac_dB}_ALL_SOURCE\${ac_dC}1\${ac_dD}
476\${ac_uA}_ALL_SOURCE\${ac_uB}_ALL_SOURCE\${ac_uC}1\${ac_uD}
477\${ac_eA}_ALL_SOURCE\${ac_eB}_ALL_SOURCE\${ac_eC}1\${ac_eD}
478"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000479}
480
481
482fi
483rm -f conftest*
484
485
Guido van Rossum7f43da71994-08-01 12:15:30 +0000486test -n "$silent" || echo "checking for POSIXized ISC"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000487if test -d /etc/conf/kconfig.d &&
488 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
489then
490 ISC=1 # If later tests want to check for ISC.
491
492{
493test -n "$verbose" && \
494echo " defining _POSIX_SOURCE"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000495echo "#define" _POSIX_SOURCE "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000496DEFS="$DEFS -D_POSIX_SOURCE=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000497ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
498\${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
499\${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
500"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000501}
502
503 if test -n "$GCC"; then
504 CC="$CC -posix"
505 else
506 CC="$CC -Xp"
507 fi
508fi
509
Guido van Rossum7f43da71994-08-01 12:15:30 +0000510test -n "$silent" || echo "checking for minix/config.h"
511cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000512#include "confdefs.h"
513#include <minix/config.h>
514EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000515# Some shells (Coherent) do redirections in the wrong order, so need
516# the parens.
517ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
518if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000519 rm -rf conftest*
520 MINIX=1
521
522fi
523rm -f conftest*
524
525# The Minix shell can't assign to the same variable on the same line!
526if test -n "$MINIX"; then
527
528{
529test -n "$verbose" && \
530echo " defining _POSIX_SOURCE"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000531echo "#define" _POSIX_SOURCE "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000532DEFS="$DEFS -D_POSIX_SOURCE=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000533ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
534\${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
535\${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
536"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000537}
538
539
540{
541test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000542echo " defining" _POSIX_1_SOURCE to be "2"
543echo "#define" _POSIX_1_SOURCE "2" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000544DEFS="$DEFS -D_POSIX_1_SOURCE=2"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000545ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_1_SOURCE\${ac_dB}_POSIX_1_SOURCE\${ac_dC}2\${ac_dD}
546\${ac_uA}_POSIX_1_SOURCE\${ac_uB}_POSIX_1_SOURCE\${ac_uC}2\${ac_uD}
547\${ac_eA}_POSIX_1_SOURCE\${ac_eB}_POSIX_1_SOURCE\${ac_eC}2\${ac_eD}
548"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000549}
550
551
552{
553test -n "$verbose" && \
554echo " defining _MINIX"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000555echo "#define" _MINIX "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000556DEFS="$DEFS -D_MINIX=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000557ac_sed_defs="${ac_sed_defs}\${ac_dA}_MINIX\${ac_dB}_MINIX\${ac_dC}1\${ac_dD}
558\${ac_uA}_MINIX\${ac_uB}_MINIX\${ac_uC}1\${ac_uD}
559\${ac_eA}_MINIX\${ac_eB}_MINIX\${ac_eC}1\${ac_eD}
560"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000561}
562
563fi
564
Guido van Rossum7f43da71994-08-01 12:15:30 +0000565ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000566LIBS="${LIBS} -lseq"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000567ac_have_lib=""
568test -n "$silent" || echo "checking for -lseq"
569cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000570#include "confdefs.h"
571
Guido van Rossum7f43da71994-08-01 12:15:30 +0000572int main() { return 0; }
573int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000574EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000575if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000576 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +0000577 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000578
579fi
580rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +0000581LIBS="${ac_save_LIBS}"
582if test -n "${ac_have_lib}"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000583 :; LIBS="$LIBS -lseq"
584else
585 :;
586fi
587
588
Guido van Rossum7f43da71994-08-01 12:15:30 +0000589test -n "$silent" || echo "checking for NeXT"
590cat > conftest.${ac_ext} <<EOF
591#include "confdefs.h"
592
593#ifdef _NEXT_SOURCE
594main() { exit(0); }
595#endif
596
597EOF
598eval $ac_compile
599if test -s conftest && (./conftest; exit) 2>/dev/null; then
600
601{
602test -n "$verbose" && \
603echo " defining _POSIX_SOURCE"
604echo "#define" _POSIX_SOURCE "1" >> confdefs.h
605DEFS="$DEFS -D_POSIX_SOURCE=1"
606ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
607\${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
608\${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
609"
610}
611
612
613fi
614rm -fr conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +0000615
616# checks for header files
Guido van Rossum7f43da71994-08-01 12:15:30 +0000617test -n "$silent" || echo "checking for ANSI C header files"
618cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000619#include "confdefs.h"
620#include <stdlib.h>
621#include <stdarg.h>
622#include <string.h>
623#include <float.h>
624EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000625# Some shells (Coherent) do redirections in the wrong order, so need
626# the parens.
627ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
628if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000629 rm -rf conftest*
630 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
631echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000632#include <string.h>' > conftest.${ac_ext}
633eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000634if egrep "memchr" conftest.out >/dev/null 2>&1; then
635 rm -rf conftest*
636 # 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 +0000637cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000638#include "confdefs.h"
639#include <ctype.h>
640#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
641#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
642#define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
643int main () { int i; for (i = 0; i < 256; i++)
644if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
645exit (0); }
646
647EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000648eval $ac_compile
Guido van Rossum627b2d71993-12-24 10:39:16 +0000649if test -s conftest && (./conftest; exit) 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000650 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
651echo '#include "confdefs.h"
652#include <stdlib.h>' > conftest.${ac_ext}
653eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
654if egrep "free" conftest.out >/dev/null 2>&1; then
655 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +0000656
657{
658test -n "$verbose" && \
659echo " defining STDC_HEADERS"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000660echo "#define" STDC_HEADERS "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000661DEFS="$DEFS -DSTDC_HEADERS=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000662ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD}
663\${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD}
664\${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD}
665"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000666}
667
668
669fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000670rm -f conftest*
671
672
673fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000674rm -fr conftest*
675
676fi
677rm -f conftest*
678
679
680fi
681rm -f conftest*
682
Guido van Rossum7f43da71994-08-01 12:15:30 +0000683for 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 +0000684do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000685ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
686test -n "$silent" || echo "checking for ${ac_hdr}"
687cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000688#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000689#include <${ac_hdr}>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000690EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000691# Some shells (Coherent) do redirections in the wrong order, so need
692# the parens.
693ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
694if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000695 rm -rf conftest*
696
697{
698test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000699echo " defining ${ac_tr_hdr}"
700echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
701DEFS="$DEFS -D${ac_tr_hdr}=1"
702ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
703\${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
704\${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
705"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000706}
707
708
709fi
710rm -f conftest*
711done
712
Guido van Rossum7f43da71994-08-01 12:15:30 +0000713test -n "$silent" || echo "checking for directory library header"
714ac_dir_header=
715if test -z "$ac_dir_header"; then
716 test -n "$silent" || echo "checking for dirent.h"
717cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000718#include "confdefs.h"
719#include <sys/types.h>
720#include <dirent.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000721int main() { return 0; }
722int t() { DIR *dirp = 0;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000723EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000724if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000725 rm -rf conftest*
726
727{
728test -n "$verbose" && \
729echo " defining DIRENT"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000730echo "#define" DIRENT "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000731DEFS="$DEFS -DDIRENT=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000732ac_sed_defs="${ac_sed_defs}\${ac_dA}DIRENT\${ac_dB}DIRENT\${ac_dC}1\${ac_dD}
733\${ac_uA}DIRENT\${ac_uB}DIRENT\${ac_uC}1\${ac_uD}
734\${ac_eA}DIRENT\${ac_eB}DIRENT\${ac_eC}1\${ac_eD}
735"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000736}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000737 ac_dir_header=dirent.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000738
739fi
740rm -f conftest*
741fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000742if test -z "$ac_dir_header"; then
743 test -n "$silent" || echo "checking for sys/ndir.h"
744cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000745#include "confdefs.h"
746#include <sys/types.h>
747#include <sys/ndir.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000748int main() { return 0; }
749int t() { DIR *dirp = 0;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000750EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000751if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000752 rm -rf conftest*
753
754{
755test -n "$verbose" && \
756echo " defining SYSNDIR"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000757echo "#define" SYSNDIR "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000758DEFS="$DEFS -DSYSNDIR=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000759ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSNDIR\${ac_dB}SYSNDIR\${ac_dC}1\${ac_dD}
760\${ac_uA}SYSNDIR\${ac_uB}SYSNDIR\${ac_uC}1\${ac_uD}
761\${ac_eA}SYSNDIR\${ac_eB}SYSNDIR\${ac_eC}1\${ac_eD}
762"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000763}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000764 ac_dir_header=sys/ndir.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000765
766fi
767rm -f conftest*
768fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000769if test -z "$ac_dir_header"; then
770 test -n "$silent" || echo "checking for sys/dir.h"
771cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000772#include "confdefs.h"
773#include <sys/types.h>
774#include <sys/dir.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000775int main() { return 0; }
776int t() { DIR *dirp = 0;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000777EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000778if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000779 rm -rf conftest*
780
781{
782test -n "$verbose" && \
783echo " defining SYSDIR"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000784echo "#define" SYSDIR "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000785DEFS="$DEFS -DSYSDIR=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000786ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSDIR\${ac_dB}SYSDIR\${ac_dC}1\${ac_dD}
787\${ac_uA}SYSDIR\${ac_uB}SYSDIR\${ac_uC}1\${ac_uD}
788\${ac_eA}SYSDIR\${ac_eB}SYSDIR\${ac_eC}1\${ac_eD}
789"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000790}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000791 ac_dir_header=sys/dir.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000792
793fi
794rm -f conftest*
795fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000796if test -z "$ac_dir_header"; then
797 test -n "$silent" || echo "checking for ndir.h"
798cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000799#include "confdefs.h"
800#include <sys/types.h>
801#include <ndir.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000802int main() { return 0; }
803int t() { DIR *dirp = 0;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000806 rm -rf conftest*
807
808{
809test -n "$verbose" && \
810echo " defining NDIR"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000811echo "#define" NDIR "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000812DEFS="$DEFS -DNDIR=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813ac_sed_defs="${ac_sed_defs}\${ac_dA}NDIR\${ac_dB}NDIR\${ac_dC}1\${ac_dD}
814\${ac_uA}NDIR\${ac_uB}NDIR\${ac_uC}1\${ac_uD}
815\${ac_eA}NDIR\${ac_eB}NDIR\${ac_eC}1\${ac_eD}
816"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000817}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818 ac_dir_header=ndir.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000819
820fi
821rm -f conftest*
822fi
823
Guido van Rossum7f43da71994-08-01 12:15:30 +0000824test -n "$silent" || echo "checking for closedir return value"
825cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000826#include "confdefs.h"
827#include <sys/types.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828#include <$ac_dir_header>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000829int closedir(); main() { exit(closedir(opendir(".")) != 0); }
830EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000831eval $ac_compile
Guido van Rossum627b2d71993-12-24 10:39:16 +0000832if test -s conftest && (./conftest; exit) 2>/dev/null; then
833 :
834else
835
836{
837test -n "$verbose" && \
838echo " defining VOID_CLOSEDIR"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839echo "#define" VOID_CLOSEDIR "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000840DEFS="$DEFS -DVOID_CLOSEDIR=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841ac_sed_defs="${ac_sed_defs}\${ac_dA}VOID_CLOSEDIR\${ac_dB}VOID_CLOSEDIR\${ac_dC}1\${ac_dD}
842\${ac_uA}VOID_CLOSEDIR\${ac_uB}VOID_CLOSEDIR\${ac_uC}1\${ac_uD}
843\${ac_eA}VOID_CLOSEDIR\${ac_eB}VOID_CLOSEDIR\${ac_eC}1\${ac_eD}
844"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000845}
846
847fi
848rm -fr conftest*
849
850
851# checks for typedefs
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852test -n "$silent" || echo "checking for clock_t in time.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000853echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854#include <time.h>' > conftest.${ac_ext}
855eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
856if egrep "clock_t" conftest.out >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000857 :
858else
859 rm -rf conftest*
860
861{
862test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863echo " defining" clock_t to be "long"
864echo "#define" clock_t "long" >> confdefs.h
865DEFS="$DEFS -Dclock_t=long"
866ac_sed_defs="${ac_sed_defs}\${ac_dA}clock_t\${ac_dB}clock_t\${ac_dC}long\${ac_dD}
867\${ac_uA}clock_t\${ac_uB}clock_t\${ac_uC}long\${ac_uD}
868\${ac_eA}clock_t\${ac_eB}clock_t\${ac_eC}long\${ac_eD}
869"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000870}
871
872fi
873rm -f conftest*
874
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875test -n "$silent" || echo "checking for mode_t in sys/types.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000876echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877#include <sys/types.h>' > conftest.${ac_ext}
878eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000879if egrep "mode_t" conftest.out >/dev/null 2>&1; then
880 :
881else
882 rm -rf conftest*
883
884{
885test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000886echo " defining" mode_t to be "int"
887echo "#define" mode_t "int" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000888DEFS="$DEFS -Dmode_t=int"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889ac_sed_defs="${ac_sed_defs}\${ac_dA}mode_t\${ac_dB}mode_t\${ac_dC}int\${ac_dD}
890\${ac_uA}mode_t\${ac_uB}mode_t\${ac_uC}int\${ac_uD}
891\${ac_eA}mode_t\${ac_eB}mode_t\${ac_eC}int\${ac_eD}
892"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000893}
894
895fi
896rm -f conftest*
897
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898test -n "$silent" || echo "checking for off_t in sys/types.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000899echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000900#include <sys/types.h>' > conftest.${ac_ext}
901eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000902if egrep "off_t" conftest.out >/dev/null 2>&1; then
903 :
904else
905 rm -rf conftest*
906
907{
908test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909echo " defining" off_t to be "long"
910echo "#define" off_t "long" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000911DEFS="$DEFS -Doff_t=long"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000912ac_sed_defs="${ac_sed_defs}\${ac_dA}off_t\${ac_dB}off_t\${ac_dC}long\${ac_dD}
913\${ac_uA}off_t\${ac_uB}off_t\${ac_uC}long\${ac_uD}
914\${ac_eA}off_t\${ac_eB}off_t\${ac_eC}long\${ac_eD}
915"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000916}
917
918fi
919rm -f conftest*
920
Guido van Rossum7f43da71994-08-01 12:15:30 +0000921test -n "$silent" || echo "checking for pid_t in sys/types.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000922echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000923#include <sys/types.h>' > conftest.${ac_ext}
924eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000925if egrep "pid_t" conftest.out >/dev/null 2>&1; then
926 :
927else
928 rm -rf conftest*
929
930{
931test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932echo " defining" pid_t to be "int"
933echo "#define" pid_t "int" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000934DEFS="$DEFS -Dpid_t=int"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000935ac_sed_defs="${ac_sed_defs}\${ac_dA}pid_t\${ac_dB}pid_t\${ac_dC}int\${ac_dD}
936\${ac_uA}pid_t\${ac_uB}pid_t\${ac_uC}int\${ac_uD}
937\${ac_eA}pid_t\${ac_eB}pid_t\${ac_eC}int\${ac_eD}
938"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000939}
940
941fi
942rm -f conftest*
943
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944test -n "$silent" || echo "checking for return type of signal handlers"
945cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000946#include "confdefs.h"
947#include <sys/types.h>
948#include <signal.h>
949#ifdef signal
950#undef signal
951#endif
952extern void (*signal ()) ();
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953int main() { return 0; }
954int t() { int i;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000955EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000956if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000957 rm -rf conftest*
958
959{
960test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961echo " defining" RETSIGTYPE to be "void"
962echo "#define" RETSIGTYPE "void" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000963DEFS="$DEFS -DRETSIGTYPE=void"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD}
965\${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD}
966\${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD}
967"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000968}
969
970
971else
972 rm -rf conftest*
973
974{
975test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976echo " defining" RETSIGTYPE to be "int"
977echo "#define" RETSIGTYPE "int" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000978DEFS="$DEFS -DRETSIGTYPE=int"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000979ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD}
980\${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD}
981\${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD}
982"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000983}
984
985fi
986rm -f conftest*
987
988
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989test -n "$silent" || echo "checking for size_t in sys/types.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000990echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991#include <sys/types.h>' > conftest.${ac_ext}
992eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000993if egrep "size_t" conftest.out >/dev/null 2>&1; then
994 :
995else
996 rm -rf conftest*
997
998{
999test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001000echo " defining" size_t to be "unsigned"
1001echo "#define" size_t "unsigned" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001002DEFS="$DEFS -Dsize_t=unsigned"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003ac_sed_defs="${ac_sed_defs}\${ac_dA}size_t\${ac_dB}size_t\${ac_dC}unsigned\${ac_dD}
1004\${ac_uA}size_t\${ac_uB}size_t\${ac_uC}unsigned\${ac_uD}
1005\${ac_eA}size_t\${ac_eB}size_t\${ac_eC}unsigned\${ac_eD}
1006"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001007}
1008
1009fi
1010rm -f conftest*
1011
Guido van Rossum7f43da71994-08-01 12:15:30 +00001012test -n "$silent" || echo "checking for uid_t in sys/types.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001013echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001014#include <sys/types.h>' > conftest.${ac_ext}
1015eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001016if egrep "uid_t" conftest.out >/dev/null 2>&1; then
1017 :
1018else
1019 rm -rf conftest*
1020
1021{
1022test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023echo " defining" uid_t to be "int"
1024echo "#define" uid_t "int" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001025DEFS="$DEFS -Duid_t=int"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026ac_sed_defs="${ac_sed_defs}\${ac_dA}uid_t\${ac_dB}uid_t\${ac_dC}int\${ac_dD}
1027\${ac_uA}uid_t\${ac_uB}uid_t\${ac_uC}int\${ac_uD}
1028\${ac_eA}uid_t\${ac_eB}uid_t\${ac_eC}int\${ac_eD}
1029"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001030}
1031
1032{
1033test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034echo " defining" gid_t to be "int"
1035echo "#define" gid_t "int" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001036DEFS="$DEFS -Dgid_t=int"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001037ac_sed_defs="${ac_sed_defs}\${ac_dA}gid_t\${ac_dB}gid_t\${ac_dC}int\${ac_dD}
1038\${ac_uA}gid_t\${ac_uB}gid_t\${ac_uC}int\${ac_uD}
1039\${ac_eA}gid_t\${ac_eB}gid_t\${ac_eC}int\${ac_eD}
1040"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001041}
1042
1043fi
1044rm -f conftest*
1045
1046
1047# checks for libraries
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001049LIBS="${LIBS} -ldl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050ac_have_lib=""
1051test -n "$silent" || echo "checking for -ldl"
1052cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001053#include "confdefs.h"
1054
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055int main() { return 0; }
1056int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001057EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001058if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001059 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001061
1062fi
1063rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064LIBS="${ac_save_LIBS}"
1065if test -n "${ac_have_lib}"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001066
1067{
1068test -n "$verbose" && \
1069echo " defining HAVE_LIBDL"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070echo "#define" HAVE_LIBDL "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001071DEFS="$DEFS -DHAVE_LIBDL=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBDL\${ac_dB}HAVE_LIBDL\${ac_dC}1\${ac_dD}
1073\${ac_uA}HAVE_LIBDL\${ac_uB}HAVE_LIBDL\${ac_uC}1\${ac_uD}
1074\${ac_eA}HAVE_LIBDL\${ac_eB}HAVE_LIBDL\${ac_eC}1\${ac_eD}
1075"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001076}
1077
1078 LIBS="${LIBS} -ldl"
1079fi
1080
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082test -n "$silent" || echo "checking for --with-svr4"
1083# check whether --with-svr4 or --without-svr4 was given.
1084withval="$with_svr4"
1085if test -n "$withval"; then
1086
1087ac_save_LIBS="${LIBS}"
1088LIBS="${LIBS} -lsocket"
1089ac_have_lib=""
1090test -n "$silent" || echo "checking for -lsocket"
1091cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001092#include "confdefs.h"
1093
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094int main() { return 0; }
1095int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001096EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001097if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001098 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001099 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001100
1101fi
1102rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001103LIBS="${ac_save_LIBS}"
1104if test -n "${ac_have_lib}"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001105
1106{
1107test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001108echo " defining HAVE_LIBSOCKET"
1109echo "#define" HAVE_LIBSOCKET "1" >> confdefs.h
1110DEFS="$DEFS -DHAVE_LIBSOCKET=1"
1111ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBSOCKET\${ac_dB}HAVE_LIBSOCKET\${ac_dC}1\${ac_dD}
1112\${ac_uA}HAVE_LIBSOCKET\${ac_uB}HAVE_LIBSOCKET\${ac_uC}1\${ac_uD}
1113\${ac_eA}HAVE_LIBSOCKET\${ac_eB}HAVE_LIBSOCKET\${ac_eC}1\${ac_eD}
1114"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001115}
1116
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117 LIBS="${LIBS} -lsocket"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001118fi
1119
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120ac_save_LIBS="${LIBS}"
1121LIBS="${LIBS} -linet"
1122ac_have_lib=""
1123test -n "$silent" || echo "checking for -linet"
1124cat > conftest.${ac_ext} <<EOF
1125#include "confdefs.h"
1126
1127int main() { return 0; }
1128int t() { main();; return 0; }
1129EOF
1130if eval $ac_compile; then
1131 rm -rf conftest*
1132 ac_have_lib="1"
1133
1134fi
1135rm -f conftest*
1136LIBS="${ac_save_LIBS}"
1137if test -n "${ac_have_lib}"; then
1138
1139{
1140test -n "$verbose" && \
1141echo " defining HAVE_LIBINET"
1142echo "#define" HAVE_LIBINET "1" >> confdefs.h
1143DEFS="$DEFS -DHAVE_LIBINET=1"
1144ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBINET\${ac_dB}HAVE_LIBINET\${ac_dC}1\${ac_dD}
1145\${ac_uA}HAVE_LIBINET\${ac_uB}HAVE_LIBINET\${ac_uC}1\${ac_uD}
1146\${ac_eA}HAVE_LIBINET\${ac_eB}HAVE_LIBINET\${ac_eC}1\${ac_eD}
1147"
1148}
1149
1150 LIBS="${LIBS} -linet"
1151fi
1152
1153ac_save_LIBS="${LIBS}"
1154LIBS="${LIBS} -lnsl"
1155ac_have_lib=""
1156test -n "$silent" || echo "checking for -lnsl"
1157cat > conftest.${ac_ext} <<EOF
1158#include "confdefs.h"
1159
1160int main() { return 0; }
1161int t() { main();; return 0; }
1162EOF
1163if eval $ac_compile; then
1164 rm -rf conftest*
1165 ac_have_lib="1"
1166
1167fi
1168rm -f conftest*
1169LIBS="${ac_save_LIBS}"
1170if test -n "${ac_have_lib}"; then
1171
1172{
1173test -n "$verbose" && \
1174echo " defining HAVE_LIBNSL"
1175echo "#define" HAVE_LIBNSL "1" >> confdefs.h
1176DEFS="$DEFS -DHAVE_LIBNSL=1"
1177ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBNSL\${ac_dB}HAVE_LIBNSL\${ac_dC}1\${ac_dD}
1178\${ac_uA}HAVE_LIBNSL\${ac_uB}HAVE_LIBNSL\${ac_uC}1\${ac_uD}
1179\${ac_eA}HAVE_LIBNSL\${ac_eB}HAVE_LIBNSL\${ac_eC}1\${ac_eD}
1180"
1181}
1182
1183 LIBS="${LIBS} -lnsl"
1184fi
1185
1186
1187fi
1188
1189
1190test -n "$silent" || echo "checking for --with-readline"
1191# check whether --with-readline or --without-readline was given.
1192withval="$with_readline"
1193if test -n "$withval"; then
1194
1195{
1196test -n "$verbose" && \
1197echo " defining WITH_READLINE"
1198echo "#define" WITH_READLINE "1" >> confdefs.h
1199DEFS="$DEFS -DWITH_READLINE=1"
1200ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_READLINE\${ac_dB}WITH_READLINE\${ac_dC}1\${ac_dD}
1201\${ac_uA}WITH_READLINE\${ac_uB}WITH_READLINE\${ac_uC}1\${ac_uD}
1202\${ac_eA}WITH_READLINE\${ac_eB}WITH_READLINE\${ac_eC}1\${ac_eD}
1203"
1204}
1205
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001206if test ! -d "$withval"
1207then echo "configure: proper usage is --with-readline=DIRECTORY" >&2; exit 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208fi
1209termcap=
1210ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001211LIBS="${LIBS} -ltermcap"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212ac_have_lib=""
1213test -n "$silent" || echo "checking for -ltermcap"
1214cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001215#include "confdefs.h"
1216
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217int main() { return 0; }
1218int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001219EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001221 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001222 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001223
1224fi
1225rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226LIBS="${ac_save_LIBS}"
1227if test -n "${ac_have_lib}"; then
1228 :; termcap=termcap
1229else
1230 :; ac_save_LIBS="${LIBS}"
1231LIBS="${LIBS} -ltermlib"
1232ac_have_lib=""
1233test -n "$silent" || echo "checking for -ltermlib"
1234cat > conftest.${ac_ext} <<EOF
1235#include "confdefs.h"
1236
1237int main() { return 0; }
1238int t() { main();; return 0; }
1239EOF
1240if eval $ac_compile; then
1241 rm -rf conftest*
1242 ac_have_lib="1"
1243
1244fi
1245rm -f conftest*
1246LIBS="${ac_save_LIBS}"
1247if test -n "${ac_have_lib}"; then
1248 :; termcap=termlib
1249else
1250 :;
1251fi
1252
1253fi
1254
1255if test ! -z "$termcap"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001256then LIBS="$LIBS $withval/libreadline.a"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001257 # Avoid possible conflict between shared libraries termcap and gl
1258 # on IRIX 5: both contain a routine called clear.
1259 if test -f /usr/lib/lib$termcap.a
1260 then LIBS="$LIBS /usr/lib/lib$termcap.a"
1261 else LIBS="$LIBS -l$termcap"
1262 fi
1263else echo "configure: no working termcap/termlib" >&2; exit 1
1264fi
1265fi
1266
1267
1268test -n "$silent" || echo "checking for --with-thread"
1269# check whether --with-thread or --without-thread was given.
1270withval="$with_thread"
1271if test -n "$withval"; then
1272
1273if test -d "$withval"
1274then LIBS="$LIBS -L$withval"
1275fi
1276ac_save_LIBS="${LIBS}"
1277LIBS="${LIBS} -lpthreads"
1278ac_have_lib=""
1279test -n "$silent" || echo "checking for -lpthreads"
1280cat > conftest.${ac_ext} <<EOF
1281#include "confdefs.h"
1282
1283int main() { return 0; }
1284int t() { main();; return 0; }
1285EOF
1286if eval $ac_compile; then
1287 rm -rf conftest*
1288 ac_have_lib="1"
1289
1290fi
1291rm -f conftest*
1292LIBS="${ac_save_LIBS}"
1293if test -n "${ac_have_lib}"; then
1294 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295{
1296test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001297echo " defining WITH_THREAD"
1298echo "#define" WITH_THREAD "1" >> confdefs.h
1299DEFS="$DEFS -DWITH_THREAD=1"
1300ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD}
1301\${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD}
1302\${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD}
1303"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001304}
1305
Guido van Rossum7f43da71994-08-01 12:15:30 +00001306
1307{
1308test -n "$verbose" && \
1309echo " defining _POSIX_THREADS"
1310echo "#define" _POSIX_THREADS "1" >> confdefs.h
1311DEFS="$DEFS -D_POSIX_THREADS=1"
1312ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_THREADS\${ac_dB}_POSIX_THREADS\${ac_dC}1\${ac_dD}
1313\${ac_uA}_POSIX_THREADS\${ac_uB}_POSIX_THREADS\${ac_uC}1\${ac_uD}
1314\${ac_eA}_POSIX_THREADS\${ac_eB}_POSIX_THREADS\${ac_eC}1\${ac_eD}
1315"
1316}
1317
1318LIBS="$LIBS -lpthreads"
1319LIBOBJS="$LIBOBJS thread.o"
1320else
1321 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322fi
1323
Guido van Rossum7f43da71994-08-01 12:15:30 +00001324ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325LIBS="${LIBS} -lmpc"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001326ac_have_lib=""
1327test -n "$silent" || echo "checking for -lmpc"
1328cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001329#include "confdefs.h"
1330
Guido van Rossum7f43da71994-08-01 12:15:30 +00001331int main() { return 0; }
1332int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001333EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001334if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001335 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001336 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001337
1338fi
1339rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001340LIBS="${ac_save_LIBS}"
1341if test -n "${ac_have_lib}"; then
1342 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001343{
1344test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001345echo " defining WITH_THREAD"
1346echo "#define" WITH_THREAD "1" >> confdefs.h
1347DEFS="$DEFS -DWITH_THREAD=1"
1348ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD}
1349\${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD}
1350\${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD}
1351"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001352}
1353
Guido van Rossum7f43da71994-08-01 12:15:30 +00001354LIBS="$LIBS -lmpc"
1355LIBOBJS="$LIBOBJS thread.o"
1356else
1357 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001358fi
1359
Guido van Rossum7f43da71994-08-01 12:15:30 +00001360ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001361LIBS="${LIBS} -lthread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001362ac_have_lib=""
1363test -n "$silent" || echo "checking for -lthread"
1364cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001365#include "confdefs.h"
1366
Guido van Rossum7f43da71994-08-01 12:15:30 +00001367int main() { return 0; }
1368int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001369EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001370if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001371 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001372 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001373
1374fi
1375rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001376LIBS="${ac_save_LIBS}"
1377if test -n "${ac_have_lib}"; then
1378 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001379{
1380test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001381echo " defining WITH_THREAD"
1382echo "#define" WITH_THREAD "1" >> confdefs.h
1383DEFS="$DEFS -DWITH_THREAD=1"
1384ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD}
1385\${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD}
1386\${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD}
1387"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001388}
1389
Guido van Rossum7f43da71994-08-01 12:15:30 +00001390LIBS="$LIBS -lthread"
1391LIBOBJS="$LIBOBJS thread.o"
1392else
1393 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001394fi
1395
Guido van Rossum7f43da71994-08-01 12:15:30 +00001396
Guido van Rossum627b2d71993-12-24 10:39:16 +00001397fi
1398
Guido van Rossum7f43da71994-08-01 12:15:30 +00001399
1400# -I${DLINCLDIR} is added to the compile rule for import.o
1401
1402DLINCLDIR=/
1403
1404test -n "$silent" || echo "checking for --with-sgi-dl"
1405# check whether --with-sgi-dl or --without-sgi-dl was given.
1406withval="$with_sgi_dl"
1407if test -n "$withval"; then
1408
1409{
1410test -n "$verbose" && \
1411echo " defining WITH_SGI_DL"
1412echo "#define" WITH_SGI_DL "1" >> confdefs.h
1413DEFS="$DEFS -DWITH_SGI_DL=1"
1414ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_SGI_DL\${ac_dB}WITH_SGI_DL\${ac_dC}1\${ac_dD}
1415\${ac_uA}WITH_SGI_DL\${ac_uB}WITH_SGI_DL\${ac_uC}1\${ac_uD}
1416\${ac_eA}WITH_SGI_DL\${ac_eB}WITH_SGI_DL\${ac_eC}1\${ac_eD}
1417"
1418}
1419
1420dldir=$withval
1421if test -d "$dldir"
1422then LIBS="$LIBS -L$dldir"
1423else echo "configure: proper usage is --with-sgi-dl=DIRECTORY" >&2; exit 1
1424fi
1425DLINCLDIR=${dldir}
1426LIBS="$LIBS -ldl -lmld"
1427fi
1428
1429
1430test -n "$silent" || echo "checking for --with-dl-dld"
1431# check whether --with-dl-dld or --without-dl-dld was given.
1432withval="$with_dl_dld"
1433if test -n "$withval"; then
1434
1435{
1436test -n "$verbose" && \
1437echo " defining WITH_DL_DLD"
1438echo "#define" WITH_DL_DLD "1" >> confdefs.h
1439DEFS="$DEFS -DWITH_DL_DLD=1"
1440ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_DL_DLD\${ac_dB}WITH_DL_DLD\${ac_dC}1\${ac_dD}
1441\${ac_uA}WITH_DL_DLD\${ac_uB}WITH_DL_DLD\${ac_uC}1\${ac_uD}
1442\${ac_eA}WITH_DL_DLD\${ac_eB}WITH_DL_DLD\${ac_eC}1\${ac_eD}
1443"
1444}
1445
1446dldir=`echo "$withval" | sed 's/,.*//'`
1447dlddir=`echo "$withval" | sed 's/.*,//'`
1448if test -d "$dldir" -a -d "$dlddir"
1449then LIBS="$LIBS -L$dldir -L$dlddir"
1450else echo "configure: proper usage is --with-dl-dld=DL_DIRECTORY" >&2; exit 1
1451fi
1452DLINCLDIR=${dldir}
1453LIBS="$LIBS -ldl -ldld"
1454fi
1455
1456
Guido van Rossum627b2d71993-12-24 10:39:16 +00001457# checks for library functions
Guido van Rossum7f43da71994-08-01 12:15:30 +00001458for 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 +00001459do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001460ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1461test -n "$silent" || echo "checking for ${ac_func}"
1462cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001463#include "confdefs.h"
1464#include <ctype.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001465int main() { return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001466int t() {
1467/* The GNU C library defines this for functions which it implements
1468 to always fail with ENOSYS. Some functions are actually named
1469 something starting with __ and the normal name is an alias. */
Guido van Rossum7f43da71994-08-01 12:15:30 +00001470#if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
Guido van Rossum627b2d71993-12-24 10:39:16 +00001471choke me
1472#else
1473/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum7f43da71994-08-01 12:15:30 +00001474extern char ${ac_func}(); ${ac_func}();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001475#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00001476; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001477EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001478if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001479 rm -rf conftest*
1480 {
1481test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001482echo " defining ${ac_tr_func}"
1483echo "#define" ${ac_tr_func} "1" >> confdefs.h
1484DEFS="$DEFS -D${ac_tr_func}=1"
1485ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
1486\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
1487\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
1488"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001489}
1490
1491
1492fi
1493rm -f conftest*
1494done
1495
Guido van Rossum7f43da71994-08-01 12:15:30 +00001496for ac_func in dup2 getcwd strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00001497do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001498test -n "$silent" || echo "checking for ${ac_func}"
1499cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001500#include "confdefs.h"
1501#include <ctype.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001502int main() { return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001503int t() {
1504/* The GNU C library defines this for functions which it implements
1505 to always fail with ENOSYS. Some functions are actually named
1506 something starting with __ and the normal name is an alias. */
Guido van Rossum7f43da71994-08-01 12:15:30 +00001507#if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
Guido van Rossum627b2d71993-12-24 10:39:16 +00001508choke me
1509#else
1510/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum7f43da71994-08-01 12:15:30 +00001511extern char ${ac_func}(); ${ac_func}();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001512#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00001513; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001514EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001515if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001516 :
1517else
1518 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001519 LIBOBJS="$LIBOBJS ${ac_func}.o"
1520test -n "$verbose" && echo " using ${ac_func}.o instead"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001521fi
1522rm -f conftest*
1523
1524done
1525
Guido van Rossum7f43da71994-08-01 12:15:30 +00001526test -n "$silent" || echo "checking for getpgrp"
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. */
1535#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
1536choke me
1537#else
1538/* Override any gcc2 internal prototype to avoid an error. */
1539extern char getpgrp(); getpgrp();
1540#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*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001545 test -n "$silent" || echo "checking for argument to getpgrp"
1546cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001547#include "confdefs.h"
1548#include <unistd.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001549int main() { return 0; }
1550int t() { getpgrp(0);; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001551EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001552if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001553 rm -rf conftest*
1554
1555{
1556test -n "$verbose" && \
1557echo " defining GETPGRP_HAVE_ARG"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001558echo "#define" GETPGRP_HAVE_ARG "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001559DEFS="$DEFS -DGETPGRP_HAVE_ARG=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001560ac_sed_defs="${ac_sed_defs}\${ac_dA}GETPGRP_HAVE_ARG\${ac_dB}GETPGRP_HAVE_ARG\${ac_dC}1\${ac_dD}
1561\${ac_uA}GETPGRP_HAVE_ARG\${ac_uB}GETPGRP_HAVE_ARG\${ac_uC}1\${ac_uD}
1562\${ac_eA}GETPGRP_HAVE_ARG\${ac_eB}GETPGRP_HAVE_ARG\${ac_eC}1\${ac_eD}
1563"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001564}
1565
1566
1567fi
1568rm -f conftest*
1569
1570
1571fi
1572rm -f conftest*
1573
1574
1575# checks for structures
Guido van Rossum7f43da71994-08-01 12:15:30 +00001576test -n "$silent" || echo "checking for whether time.h and sys/time.h may both be included"
1577cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001578#include "confdefs.h"
1579#include <sys/types.h>
1580#include <sys/time.h>
1581#include <time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001582int main() { return 0; }
1583int t() { struct tm *tp;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001584EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001585if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001586 rm -rf conftest*
1587
1588{
1589test -n "$verbose" && \
1590echo " defining TIME_WITH_SYS_TIME"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001591echo "#define" TIME_WITH_SYS_TIME "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001592DEFS="$DEFS -DTIME_WITH_SYS_TIME=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001593ac_sed_defs="${ac_sed_defs}\${ac_dA}TIME_WITH_SYS_TIME\${ac_dB}TIME_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
1594\${ac_uA}TIME_WITH_SYS_TIME\${ac_uB}TIME_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
1595\${ac_eA}TIME_WITH_SYS_TIME\${ac_eB}TIME_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
1596"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001597}
1598
1599
1600fi
1601rm -f conftest*
1602
Guido van Rossum7f43da71994-08-01 12:15:30 +00001603test -n "$silent" || echo "checking for struct tm in time.h"
1604cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001605#include "confdefs.h"
1606#include <sys/types.h>
1607#include <time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001608int main() { return 0; }
1609int t() { struct tm *tp; tp->tm_sec;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001610EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001611if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001612 :
1613else
1614 rm -rf conftest*
1615
1616{
1617test -n "$verbose" && \
1618echo " defining TM_IN_SYS_TIME"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001619echo "#define" TM_IN_SYS_TIME "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001620DEFS="$DEFS -DTM_IN_SYS_TIME=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001621ac_sed_defs="${ac_sed_defs}\${ac_dA}TM_IN_SYS_TIME\${ac_dB}TM_IN_SYS_TIME\${ac_dC}1\${ac_dD}
1622\${ac_uA}TM_IN_SYS_TIME\${ac_uB}TM_IN_SYS_TIME\${ac_uC}1\${ac_uD}
1623\${ac_eA}TM_IN_SYS_TIME\${ac_eB}TM_IN_SYS_TIME\${ac_eC}1\${ac_eD}
1624"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001625}
1626
1627fi
1628rm -f conftest*
1629
Guido van Rossum7f43da71994-08-01 12:15:30 +00001630ac_decl='#include <sys/types.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001631'
1632case "$DEFS" in
Guido van Rossum7f43da71994-08-01 12:15:30 +00001633 *TM_IN_SYS_TIME*) ac_decl="$ac_decl
Guido van Rossum627b2d71993-12-24 10:39:16 +00001634#include <sys/time.h>
1635" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001636 *) ac_decl="$ac_decl
Guido van Rossum627b2d71993-12-24 10:39:16 +00001637#include <time.h>
1638" ;;
1639esac
Guido van Rossum7f43da71994-08-01 12:15:30 +00001640test -n "$silent" || echo "checking for tm_zone in struct tm"
1641cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001642#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001643$ac_decl
1644int main() { return 0; }
1645int t() { struct tm tm; tm.tm_zone;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001646EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001647if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001648 rm -rf conftest*
1649
1650{
1651test -n "$verbose" && \
1652echo " defining HAVE_TM_ZONE"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001653echo "#define" HAVE_TM_ZONE "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001654DEFS="$DEFS -DHAVE_TM_ZONE=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001655ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TM_ZONE\${ac_dB}HAVE_TM_ZONE\${ac_dC}1\${ac_dD}
1656\${ac_uA}HAVE_TM_ZONE\${ac_uB}HAVE_TM_ZONE\${ac_uC}1\${ac_uD}
1657\${ac_eA}HAVE_TM_ZONE\${ac_eB}HAVE_TM_ZONE\${ac_eC}1\${ac_eD}
1658"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001659}
1660
1661
1662else
1663 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001664 ac_no_tm_zone=1
Guido van Rossum627b2d71993-12-24 10:39:16 +00001665fi
1666rm -f conftest*
1667
Guido van Rossum7f43da71994-08-01 12:15:30 +00001668if test -n "$ac_no_tm_zone"; then
1669test -n "$silent" || echo "checking for tzname"
1670cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001671#include "confdefs.h"
1672#include <time.h>
1673#ifndef tzname /* For SGI. */
1674extern char *tzname[]; /* RS6000 and others want it this way. */
1675#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00001676int main() { return 0; }
1677int t() { atoi(*tzname);; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001678EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001679if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001680 rm -rf conftest*
1681
1682{
1683test -n "$verbose" && \
1684echo " defining HAVE_TZNAME"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001685echo "#define" HAVE_TZNAME "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001686DEFS="$DEFS -DHAVE_TZNAME=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001687ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TZNAME\${ac_dB}HAVE_TZNAME\${ac_dC}1\${ac_dD}
1688\${ac_uA}HAVE_TZNAME\${ac_uB}HAVE_TZNAME\${ac_uC}1\${ac_uD}
1689\${ac_eA}HAVE_TZNAME\${ac_eB}HAVE_TZNAME\${ac_eC}1\${ac_eD}
1690"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001691}
1692
1693
1694fi
1695rm -f conftest*
1696
1697fi
1698
Guido van Rossum7f43da71994-08-01 12:15:30 +00001699test -n "$silent" || echo "checking for whether we have altzone"
1700cat > conftest.${ac_ext} <<EOF
1701#include "confdefs.h"
1702#include <time.h>
1703int main() { return 0; }
1704int t() { return altzone;; return 0; }
1705EOF
1706if eval $ac_compile; then
1707 rm -rf conftest*
1708
1709{
1710test -n "$verbose" && \
1711echo " defining HAVE_ALTZONE"
1712echo "#define" HAVE_ALTZONE "1" >> confdefs.h
1713DEFS="$DEFS -DHAVE_ALTZONE=1"
1714ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALTZONE\${ac_dB}HAVE_ALTZONE\${ac_dC}1\${ac_dD}
1715\${ac_uA}HAVE_ALTZONE\${ac_uB}HAVE_ALTZONE\${ac_uC}1\${ac_uD}
1716\${ac_eA}HAVE_ALTZONE\${ac_eB}HAVE_ALTZONE\${ac_eC}1\${ac_eD}
1717"
1718}
1719
1720
1721fi
1722rm -f conftest*
1723
1724test -n "$silent" || echo "checking for whether sys/select.h and sys/time.h may both be included"
1725cat > conftest.${ac_ext} <<EOF
1726#include "confdefs.h"
1727
1728#include <sys/types.h>
1729#include <sys/select.h>
1730#include <sys/time.h>
1731
1732int main() { return 0; }
1733int t() { ;; return 0; }
1734EOF
1735if eval $ac_compile; then
1736 rm -rf conftest*
1737
1738{
1739test -n "$verbose" && \
1740echo " defining SYS_SELECT_WITH_SYS_TIME"
1741echo "#define" SYS_SELECT_WITH_SYS_TIME "1" >> confdefs.h
1742DEFS="$DEFS -DSYS_SELECT_WITH_SYS_TIME=1"
1743ac_sed_defs="${ac_sed_defs}\${ac_dA}SYS_SELECT_WITH_SYS_TIME\${ac_dB}SYS_SELECT_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
1744\${ac_uA}SYS_SELECT_WITH_SYS_TIME\${ac_uB}SYS_SELECT_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
1745\${ac_eA}SYS_SELECT_WITH_SYS_TIME\${ac_eB}SYS_SELECT_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
1746"
1747}
1748
1749
1750fi
1751rm -f conftest*
1752
Guido van Rossum627b2d71993-12-24 10:39:16 +00001753
1754# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00001755
1756test -n "$silent" || echo "checking for unsigned characters"
1757cat > conftest.${ac_ext} <<EOF
1758#include "confdefs.h"
1759/* volatile prevents gcc2 from optimizing the test away on sparcs. */
1760#if !__STDC__
1761#define volatile
1762#endif
1763main() {
1764#ifdef __CHAR_UNSIGNED__
1765 exit(1); /* No need to redefine it. */
1766#else
1767 volatile char c = 255; exit(c < 0);
1768#endif
1769}
1770EOF
1771eval $ac_compile
1772if test -s conftest && (./conftest; exit) 2>/dev/null; then
1773
1774{
1775test -n "$verbose" && \
1776echo " defining __CHAR_UNSIGNED__"
1777echo "#define" __CHAR_UNSIGNED__ "1" >> confdefs.h
1778DEFS="$DEFS -D__CHAR_UNSIGNED__=1"
1779ac_sed_defs="${ac_sed_defs}\${ac_dA}__CHAR_UNSIGNED__\${ac_dB}__CHAR_UNSIGNED__\${ac_dC}1\${ac_dD}
1780\${ac_uA}__CHAR_UNSIGNED__\${ac_uB}__CHAR_UNSIGNED__\${ac_uC}1\${ac_uD}
1781\${ac_eA}__CHAR_UNSIGNED__\${ac_eB}__CHAR_UNSIGNED__\${ac_eC}1\${ac_eD}
1782"
1783}
1784
1785
1786fi
1787rm -fr conftest*
1788
1789
1790ac_prog='/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00001791typedef int charset[2]; const charset x;
1792/* SunOS 4.1.1 cc rejects this. */
1793char const *const *ccp;
1794char **p;
1795/* AIX XL C 1.02.0.0 rejects this.
1796 It does not let you subtract one const X* pointer from another in an arm
1797 of an if-expression whose if-part is not a constant expression */
1798const char *g = "string";
1799ccp = &g + (g ? g-g : 0);
1800/* HPUX 7.0 cc rejects these. */
1801++ccp;
1802p = (char**) ccp;
1803ccp = (char const *const *) p;
1804{ /* SCO 3.2v4 cc rejects this. */
1805 char *t;
1806 char const *s = 0 ? (char *) 0 : (char const *) 0;
1807
1808 *t++ = 0;
1809}
1810{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1811 int x[] = {25,17};
1812 const int *foo = &x[0];
1813 ++foo;
1814}
1815{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1816 typedef const int *iptr;
1817 iptr p = 0;
1818 ++p;
1819}
1820{ /* AIX XL C 1.02.0.0 rejects this saying
1821 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1822 struct s { int j; const int *ap[3]; };
1823 struct s *b; b->j = 5;
1824}
1825{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1826 const int foo = 10;
1827}'
Guido van Rossum7f43da71994-08-01 12:15:30 +00001828test -n "$silent" || echo "checking for lack of working const"
1829cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001830#include "confdefs.h"
1831
Guido van Rossum7f43da71994-08-01 12:15:30 +00001832int main() { return 0; }
1833int t() { $ac_prog; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001834EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001835if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001836 :
1837else
1838 rm -rf conftest*
1839
1840{
1841test -n "$verbose" && \
1842echo " defining" const to be empty
Guido van Rossum7f43da71994-08-01 12:15:30 +00001843echo "#define" const "" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001844DEFS="$DEFS -Dconst="
Guido van Rossum7f43da71994-08-01 12:15:30 +00001845ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD}
1846\${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD}
1847\${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD}
1848"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001849}
1850
1851fi
1852rm -f conftest*
1853
Guido van Rossum7f43da71994-08-01 12:15:30 +00001854
1855test -n "$silent" || echo "checking for wheter we have signed char"
1856cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001857#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001858
1859int main() { return 0; }
1860int t() { signed char c;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001861EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001862if eval $ac_compile; then
1863 :
1864else
1865 rm -rf conftest*
1866
1867{
1868test -n "$verbose" && \
1869echo " defining" signed to be empty
1870echo "#define" signed "" >> confdefs.h
1871DEFS="$DEFS -Dsigned="
1872ac_sed_defs="${ac_sed_defs}\${ac_dA}signed\${ac_dB}signed\${ac_dC}\${ac_dD}
1873\${ac_uA}signed\${ac_uB}signed\${ac_uC}\${ac_uD}
1874\${ac_eA}signed\${ac_eB}signed\${ac_eC}\${ac_eD}
1875"
1876}
1877
1878fi
1879rm -f conftest*
1880
1881
1882test -n "$silent" || echo "checking for prototypes"
1883cat > conftest.${ac_ext} <<EOF
1884#include "confdefs.h"
1885
1886int foo(int x) { return 0; }
1887int main() { return foo(10); }
1888
1889EOF
1890eval $ac_compile
Guido van Rossum627b2d71993-12-24 10:39:16 +00001891if test -s conftest && (./conftest; exit) 2>/dev/null; then
1892
1893{
1894test -n "$verbose" && \
1895echo " defining HAVE_PROTOTYPES"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001896echo "#define" HAVE_PROTOTYPES "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001897DEFS="$DEFS -DHAVE_PROTOTYPES=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001898ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_PROTOTYPES\${ac_dB}HAVE_PROTOTYPES\${ac_dC}1\${ac_dD}
1899\${ac_uA}HAVE_PROTOTYPES\${ac_uB}HAVE_PROTOTYPES\${ac_uC}1\${ac_uD}
1900\${ac_eA}HAVE_PROTOTYPES\${ac_eB}HAVE_PROTOTYPES\${ac_eC}1\${ac_eD}
1901"
1902}
1903 have_prototypes=1
1904
1905fi
1906rm -fr conftest*
1907
1908test -n "$silent" || echo "checking for variable length prototypes and stdarg.h"
1909cat > conftest.${ac_ext} <<EOF
1910#include "confdefs.h"
1911
1912#include <stdarg.h>
1913int foo(int x, ...) { return 0; }
1914int main() { return foo(10, 11, 12); }
1915
1916EOF
1917eval $ac_compile
1918if test -s conftest && (./conftest; exit) 2>/dev/null; then
1919
1920{
1921test -n "$verbose" && \
1922echo " defining HAVE_STDARG_PROTOTYPES"
1923echo "#define" HAVE_STDARG_PROTOTYPES "1" >> confdefs.h
1924DEFS="$DEFS -DHAVE_STDARG_PROTOTYPES=1"
1925ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_STDARG_PROTOTYPES\${ac_dB}HAVE_STDARG_PROTOTYPES\${ac_dC}1\${ac_dD}
1926\${ac_uA}HAVE_STDARG_PROTOTYPES\${ac_uB}HAVE_STDARG_PROTOTYPES\${ac_uC}1\${ac_uD}
1927\${ac_eA}HAVE_STDARG_PROTOTYPES\${ac_eB}HAVE_STDARG_PROTOTYPES\${ac_eC}1\${ac_eD}
1928"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001929}
1930 have_prototypes=1
1931
1932fi
1933rm -fr conftest*
1934if test "$have_prototypes"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001935test -n "$silent" || echo "checking for "bad exec* prototypes""
1936cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001937#include "confdefs.h"
1938#include <unistd.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001939int main() { return 0; }
1940int t() { char **t;execve("@",t,t);; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001941EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001942if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001943 :
1944else
1945 rm -rf conftest*
1946
1947{
1948test -n "$verbose" && \
1949echo " defining BAD_EXEC_PROTOTYPES"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001950echo "#define" BAD_EXEC_PROTOTYPES "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001951DEFS="$DEFS -DBAD_EXEC_PROTOTYPES=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001952ac_sed_defs="${ac_sed_defs}\${ac_dA}BAD_EXEC_PROTOTYPES\${ac_dB}BAD_EXEC_PROTOTYPES\${ac_dC}1\${ac_dD}
1953\${ac_uA}BAD_EXEC_PROTOTYPES\${ac_uB}BAD_EXEC_PROTOTYPES\${ac_uC}1\${ac_uD}
1954\${ac_eA}BAD_EXEC_PROTOTYPES\${ac_eB}BAD_EXEC_PROTOTYPES\${ac_eC}1\${ac_eD}
1955"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001956}
1957
1958fi
1959rm -f conftest*
1960
1961fi
1962
Guido van Rossum7f43da71994-08-01 12:15:30 +00001963test -n "$silent" || echo "checking for bad static forward"
1964cat > conftest.${ac_ext} <<EOF
1965#include "confdefs.h"
1966
1967struct s { int a; int b; };
1968static struct s foo;
1969int foobar() { return !foo.a; }
1970static struct s foo = { 1, 2 };
1971main() { exit(foobar()); }
1972
1973EOF
1974eval $ac_compile
1975if test -s conftest && (./conftest; exit) 2>/dev/null; then
1976 :
1977else
1978
1979{
1980test -n "$verbose" && \
1981echo " defining BAD_STATIC_FORWARD"
1982echo "#define" BAD_STATIC_FORWARD "1" >> confdefs.h
1983DEFS="$DEFS -DBAD_STATIC_FORWARD=1"
1984ac_sed_defs="${ac_sed_defs}\${ac_dA}BAD_STATIC_FORWARD\${ac_dB}BAD_STATIC_FORWARD\${ac_dC}1\${ac_dD}
1985\${ac_uA}BAD_STATIC_FORWARD\${ac_uB}BAD_STATIC_FORWARD\${ac_uC}1\${ac_uD}
1986\${ac_eA}BAD_STATIC_FORWARD\${ac_eB}BAD_STATIC_FORWARD\${ac_eC}1\${ac_eD}
1987"
1988}
1989
1990fi
1991rm -fr conftest*
1992
Guido van Rossum627b2d71993-12-24 10:39:16 +00001993# checks for system services
1994# (none yet)
1995
1996# other checks for UNIX variants
Guido van Rossum7f43da71994-08-01 12:15:30 +00001997ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001998LIBS="${LIBS} -lsun"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001999ac_have_lib=""
2000test -n "$silent" || echo "checking for -lsun"
2001cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002002#include "confdefs.h"
2003
Guido van Rossum7f43da71994-08-01 12:15:30 +00002004int main() { return 0; }
2005int t() { main();; 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 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00002009 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002010
2011fi
2012rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00002013LIBS="${ac_save_LIBS}"
2014if test -n "${ac_have_lib}"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002015 :; LIBS="$LIBS -lsun"
2016else
2017 :;
2018fi
2019
2020
Guido van Rossum7f43da71994-08-01 12:15:30 +00002021test -n "$silent" || echo "checking for Xenix"
2022cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002023#include "confdefs.h"
2024#if defined(M_XENIX) && !defined(M_UNIX)
2025 yes
2026#endif
2027
2028EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002029eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002030if egrep "yes" conftest.out >/dev/null 2>&1; then
2031 rm -rf conftest*
2032 XENIX=1
2033
2034fi
2035rm -f conftest*
2036
2037if test -n "$XENIX"; then
2038 LIBS="$LIBS -lx"
2039 case "$DEFS" in
2040 *SYSNDIR*) ;;
2041 *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
2042 esac
2043fi
2044
2045
Guido van Rossum7f43da71994-08-01 12:15:30 +00002046# check for --with-libm=...
2047
2048LIBM=-lm
2049# check whether --with-libm or --without-libm was given.
2050withval="$with_libm"
2051if test -n "$withval"; then
2052 if test "$withval" != yes
2053then LIBM=$withval
2054else echo "configure: proper usage is --with-libm=STRING" >&2; exit 1
2055fi
2056fi
2057
2058
2059# check for --with-libc=...
2060
2061# check whether --with-libc or --without-libc was given.
2062withval="$with_libc"
2063if test -n "$withval"; then
2064 if test "$withval" != yes
2065then LIBC=$withval
2066else echo "configure: proper usage is --with-libc=STRING" >&2; exit 1
2067fi
2068fi
2069
2070
Guido van Rossum627b2d71993-12-24 10:39:16 +00002071# generate output files
2072# Set default prefixes.
2073if test -n "$prefix"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002074 test -z "$exec_prefix" && exec_prefix='${prefix}' # Let make expand it.
2075 ac_prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002076fi
2077if test -n "$exec_prefix"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002078 ac_prsub="$ac_prsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00002079s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
2080fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002081# Any assignment to VPATH causes Sun make to only execute
2082# the first set of double-colon rules, so remove it if not needed.
2083# If there is a colon in the path, we need to keep it.
2084if test "x$srcdir" = x.; then
2085 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2086fi
2087
Guido van Rossum627b2d71993-12-24 10:39:16 +00002088# Quote sed substitution magic chars in DEFS.
2089cat >conftest.def <<EOF
2090$DEFS
2091EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002092ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
2093DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
Guido van Rossum627b2d71993-12-24 10:39:16 +00002094rm -f conftest.def
2095# Substitute for predefined variables.
2096
Guido van Rossum7f43da71994-08-01 12:15:30 +00002097trap 'rm -f config.status; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00002098echo creating config.status
2099rm -f config.status
2100cat > config.status <<EOF
2101#!/bin/sh
2102# Generated automatically by configure.
2103# Run this file to recreate the current configuration.
2104# This directory was configured as follows,
2105# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2106#
2107# $0 $configure_args
2108
Guido van Rossum7f43da71994-08-01 12:15:30 +00002109ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
2110for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00002111do
Guido van Rossum7f43da71994-08-01 12:15:30 +00002112 case "\$ac_option" in
2113 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2114 echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
2115 exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
2116 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
2117 echo "config.status generated by autoconf version 1.8"
2118 exit 0 ;;
2119 -help | --help | --hel | --he | --h)
2120 echo "\$ac_cs_usage"; exit 0 ;;
2121 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00002122 esac
2123done
2124
Guido van Rossum7f43da71994-08-01 12:15:30 +00002125trap '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 +00002126CC='$CC'
2127RANLIB='$RANLIB'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002128AR='$AR'
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00002129INSTALL='$INSTALL'
2130OPT='$OPT'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002131CPP='$CPP'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002132DLINCLDIR='$DLINCLDIR'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002133LIBOBJS='$LIBOBJS'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002134LIBM='$LIBM'
2135LIBC='$LIBC'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002136LIBS='$LIBS'
2137srcdir='$srcdir'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002138top_srcdir='$top_srcdir'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002139prefix='$prefix'
2140exec_prefix='$exec_prefix'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002141ac_prsub='$ac_prsub'
2142ac_vpsub='$ac_vpsub'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002143extrasub='$extrasub'
2144EOF
2145cat >> config.status <<\EOF
2146
Guido van Rossum7f43da71994-08-01 12:15:30 +00002147ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00002148
Guido van Rossum7f43da71994-08-01 12:15:30 +00002149CONFIG_FILES=${CONFIG_FILES-"Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre"}
2150for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002151 # Remove last slash and all that follows it. Not all systems have dirname.
Guido van Rossum7f43da71994-08-01 12:15:30 +00002152 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
2153 if test "$ac_dir" != "$ac_file"; then
2154 # The file is in a subdirectory.
2155 test ! -d "$ac_dir" && mkdir "$ac_dir"
2156 ac_dir_suffix="/$ac_dir"
2157 else
2158 ac_dir_suffix=
Guido van Rossum627b2d71993-12-24 10:39:16 +00002159 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002160
2161 # A "../" for each directory in $ac_dir_suffix.
2162 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2163 case "$ac_given_srcdir" in
2164 .) srcdir=.; top_srcdir="$ac_dots." ;;
2165 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2166 *) # Relative path.
2167 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2168 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2169 esac
2170
2171 echo creating "$ac_file"
2172 rm -f "$ac_file"
2173 comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
2174 case "$ac_file" in
2175 *.c | *.h | *.C | *.cc | *.m ) echo "/* $comment_str */" > "$ac_file" ;;
2176 * ) echo "# $comment_str" > "$ac_file" ;;
2177 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00002178 sed -e "
Guido van Rossum7f43da71994-08-01 12:15:30 +00002179$ac_prsub
2180$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00002181$extrasub
2182s%@CC@%$CC%g
2183s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002184s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00002185s%@INSTALL@%$INSTALL%g
2186s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002187s%@CPP@%$CPP%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002188s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002189s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002190s%@LIBM@%$LIBM%g
2191s%@LIBC@%$LIBC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002192s%@LIBS@%$LIBS%g
2193s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002194s%@top_srcdir@%$top_srcdir%g
2195s%@prefix@%$prefix%g
2196s%@exec_prefix@%$exec_prefix%g
2197s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00002198fi; done
2199
Guido van Rossum7f43da71994-08-01 12:15:30 +00002200# These sed commands are put into ac_sed_defs when defining a macro.
2201# They are broken into pieces to make the sed script easier to manage.
2202# They are passed to sed as "A NAME B NAME C VALUE D", where NAME
2203# is the cpp macro being defined and VALUE is the value it is being given.
2204# Each defining turns into a single global substitution command.
2205# Hopefully no one uses "!" as a variable value.
2206# Other candidates for the sed separators, like , and @, do get used.
2207#
2208# ac_d sets the value in "#define NAME VALUE" lines.
2209ac_dA='s!^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2210ac_dB='\([ ][ ]*\)[^ ]*!\1#\2'
2211ac_dC='\3'
2212ac_dD='!g'
2213# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2214ac_uA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2215ac_uB='\([ ]\)!\1#\2define\3'
2216ac_uC=' '
2217ac_uD='\4!g'
2218# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2219ac_eA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2220ac_eB='$!\1#\2define\3'
2221ac_eC=' '
2222ac_eD='!g'
2223rm -f conftest.sed
2224EOF
2225# Turn off quoting long enough to insert the sed commands.
2226rm -f conftest.sh
2227cat > conftest.sh <<EOF
2228$ac_sed_defs
2229EOF
2230
2231# Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
2232# on the size of here documents.
2233
2234# Maximum number of lines to put in a single here document.
2235ac_max_sh_lines=9
2236
2237while :
2238do
2239 # wc gives bogus results for an empty file on some AIX systems.
2240 ac_lines=`grep -c . conftest.sh`
2241 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2242 rm -f conftest.s1 conftest.s2
2243 sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -20.
2244 sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +21.
2245 # Write a limited-size here document to append to conftest.sed.
2246 echo 'cat >> conftest.sed <<CONFEOF' >> config.status
2247 cat conftest.s1 >> config.status
2248 echo 'CONFEOF' >> config.status
2249 rm -f conftest.s1 conftest.sh
2250 mv conftest.s2 conftest.sh
2251done
2252rm -f conftest.sh
2253
2254# Now back to your regularly scheduled config.status.
2255cat >> config.status <<\EOF
2256# This sed command replaces #undef's with comments. This is necessary, for
2257# example, in the case of _POSIX_SOURCE, which is predefined and required
2258# on some systems where configure will not decide to define it in
2259# config.h.
2260cat >> conftest.sed <<\CONFEOF
2261s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
2262CONFEOF
2263rm -f conftest.h
2264# Break up the sed commands because old seds have small limits.
2265ac_max_sed_lines=20
2266
2267CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
2268for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
2269 echo creating $ac_file
2270
2271 cp $ac_given_srcdir/$ac_file.in conftest.h1
2272 while :
2273 do
2274 ac_lines=`grep -c . conftest.sed`
2275 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2276 rm -f conftest.s1 conftest.s2 conftest.h2
2277 sed ${ac_max_sed_lines}q conftest.sed > conftest.s1 # Like head -20.
2278 sed 1,${ac_max_sed_lines}d conftest.sed > conftest.s2 # Like tail +21.
2279 sed -f conftest.s1 < conftest.h1 > conftest.h2
2280 rm -f conftest.s1 conftest.h1 conftest.sed
2281 mv conftest.h2 conftest.h1
2282 mv conftest.s2 conftest.sed
2283 done
2284 rm -f conftest.sed conftest.h
2285 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2286 cat conftest.h1 >> conftest.h
2287 rm -f conftest.h1
2288 if cmp -s $ac_file conftest.h 2>/dev/null; then
2289 # The file exists and we would not be changing it.
2290 echo "$ac_file is unchanged"
2291 rm -f conftest.h
2292 else
2293 rm -f $ac_file
2294 mv conftest.h $ac_file
2295 fi
2296fi; done
2297
2298
Guido van Rossum627b2d71993-12-24 10:39:16 +00002299
2300exit 0
2301EOF
2302chmod +x config.status
Guido van Rossum7f43da71994-08-01 12:15:30 +00002303test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} config.status
Guido van Rossum627b2d71993-12-24 10:39:16 +00002304