blob: 656c5753361e5204a5059f8be2c0ab47109bd1f7 [file] [log] [blame]
Guido van Rossum7f43da71994-08-01 12:15:30 +00001#!/bin/sh
Guido van Rossum0a516c91994-09-12 10:58:40 +00002# From configure.in Revision: 1.6
Guido van Rossum627b2d71993-12-24 10:39:16 +00003#!/bin/sh
4# Guess values for system-dependent variables and create Makefiles.
Guido van Rossum0a516c91994-09-12 10:58:40 +00005# Generated automatically using autoconf version 1.11
Guido van Rossum7f43da71994-08-01 12:15:30 +00006# 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)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000124 with_gas=yes ;; # Obsolete; use --with-gas.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000125
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)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000202 echo "configure generated by autoconf version 1.11"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000203 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
Guido van Rossum0a516c91994-09-12 10:58:40 +0000227 --x) with_x=yes ;; # Obsolete; use --with-x.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000228
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 *)
Guido van Rossum0a516c91994-09-12 10:58:40 +0000247 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000248 echo "configure: warning: $ac_option: invalid host type" >&2
249 fi
Guido van Rossum0a516c91994-09-12 10:58:40 +0000250 if test "x$nonopt" != xNONE; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000251 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 Rossum7f43da71994-08-01 12:15:30 +0000314ac_ext=c
Guido van Rossum0a516c91994-09-12 10:58:40 +0000315# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
316ac_cpp='${CPP}'
Guido van Rossum7f43da71994-08-01 12:15:30 +0000317ac_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 Rossum0a516c91994-09-12 10:58:40 +0000319
Guido van Rossum7f43da71994-08-01 12:15:30 +0000320# Don't suppress compiler output when --verbose is specified
321test -n "$verbose" &&
322 ac_compile=`echo "$ac_compile" | sed "s|>/dev/null 2>&1||"`
323test -n "$verbose" && echo " setting ac_compile to '$ac_compile'"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000324
325# checks for alternative programs
Guido van Rossum7f43da71994-08-01 12:15:30 +0000326test -n "$silent" || echo "checking for --with(out)-gcc"
327# check whether --with-gcc or --without-gcc was given.
328withval="$with_gcc"
329if test -n "$withval"; then
330
331 case $withval in
332 no) withval=cc;;
333 yes) withval=gcc;;
334 esac
335 CC=$withval
336fi
337
Guido van Rossum627b2d71993-12-24 10:39:16 +0000338if test -z "$CC"; then
339 # Extract the first word of `gcc', so it can be a program name with args.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000340 set ac_dummy gcc; ac_word=$2
341 test -n "$silent" || echo "checking for $ac_word"
342 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
343 for ac_dir in $PATH; do
344 test -z "$ac_dir" && ac_dir=.
345 if test -f $ac_dir/$ac_word; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000346 CC="gcc"
347 break
348 fi
349 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000350 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000351fi
352test -z "$CC" && CC="cc"
353test -n "$CC" && test -n "$verbose" && echo " setting CC to $CC"
354
355# Find out if we are using GNU C, under whatever name.
356cat > conftest.c <<EOF
357#ifdef __GNUC__
358 yes
359#endif
360EOF
361${CC-cc} -E conftest.c > conftest.out 2>&1
362if egrep yes conftest.out >/dev/null 2>&1; then
363 GCC=1 # For later tests.
364fi
365rm -f conftest*
366
367if test -z "$RANLIB"; then
368 # Extract the first word of `ranlib', so it can be a program name with args.
Guido van Rossum7f43da71994-08-01 12:15:30 +0000369 set ac_dummy ranlib; ac_word=$2
370 test -n "$silent" || echo "checking for $ac_word"
371 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
372 for ac_dir in $PATH; do
373 test -z "$ac_dir" && ac_dir=.
374 if test -f $ac_dir/$ac_word; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000375 RANLIB="ranlib"
376 break
377 fi
378 done
Guido van Rossum7f43da71994-08-01 12:15:30 +0000379 IFS="$ac_save_ifs"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000380fi
381test -z "$RANLIB" && RANLIB=":"
382test -n "$RANLIB" && test -n "$verbose" && echo " setting RANLIB to $RANLIB"
383
384
Guido van Rossum7f43da71994-08-01 12:15:30 +0000385for ac_prog in ar aal
386do
387if test -z "$AR"; then
388 # Extract the first word of `$ac_prog', so it can be a program name with args.
389 set ac_dummy $ac_prog; ac_word=$2
390 test -n "$silent" || echo "checking for $ac_word"
391 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
392 for ac_dir in $PATH; do
393 test -z "$ac_dir" && ac_dir=.
394 if test -f $ac_dir/$ac_word; then
395 AR="$ac_prog"
396 break
397 fi
398 done
399 IFS="$ac_save_ifs"
400fi
401
402test -n "$AR" && test -n "$verbose" && echo " setting AR to $AR"
403
404test -n "$AR" && break
405done
406test -n "$AR" || AR="ar"
407
408
Guido van Rossumb1ba03f1994-08-19 15:34:50 +0000409# Install just never works :-(
410if test -z "$INSTALL"
411then INSTALL=cp
412fi
413
414# Optimizer/debugger flags passed between Makefiles
415if test -z "$OPT"
416then OPT=-O
417fi
418
Guido van Rossum627b2d71993-12-24 10:39:16 +0000419# checks for UNIX variants that set C preprocessor variables
Guido van Rossum7f43da71994-08-01 12:15:30 +0000420test -n "$silent" || echo "checking for AIX"
421test -n "$silent" || echo "checking how to run the C preprocessor"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000422if test -z "$CPP"; then
423 # This must be in double quotes, not single quotes, because CPP may get
424 # substituted into the Makefile and ``${CC-cc}'' will simply confuse
425 # make. It must be expanded now.
426 CPP="${CC-cc} -E"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000427 cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000428#include "confdefs.h"
429#include <stdio.h>
430Syntax Error
431EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000432# Some shells (Coherent) do redirections in the wrong order, so need
433# the parens.
434ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
435if test -z "$ac_err"; then
436 :
437else
438 rm -rf conftest*
439 CPP="${CC-cc} -E -traditional-cpp"
440 cat > conftest.${ac_ext} <<EOF
441#include "confdefs.h"
442#include <stdio.h>
443Syntax Error
444EOF
445# Some shells (Coherent) do redirections in the wrong order, so need
446# the parens.
447ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
448if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000449 :
450else
451 rm -rf conftest*
452 CPP=/lib/cpp
453fi
454rm -f conftest*
455fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000456rm -f conftest*
457fi
458test -n "$verbose" && echo " setting CPP to $CPP"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000459
Guido van Rossum7f43da71994-08-01 12:15:30 +0000460cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000461#include "confdefs.h"
462#ifdef _AIX
463 yes
464#endif
465
466EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000467eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000468if egrep "yes" conftest.out >/dev/null 2>&1; then
469 rm -rf conftest*
470
471{
472test -n "$verbose" && \
473echo " defining _ALL_SOURCE"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000474echo "#define" _ALL_SOURCE "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000475DEFS="$DEFS -D_ALL_SOURCE=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000476ac_sed_defs="${ac_sed_defs}\${ac_dA}_ALL_SOURCE\${ac_dB}_ALL_SOURCE\${ac_dC}1\${ac_dD}
477\${ac_uA}_ALL_SOURCE\${ac_uB}_ALL_SOURCE\${ac_uC}1\${ac_uD}
478\${ac_eA}_ALL_SOURCE\${ac_eB}_ALL_SOURCE\${ac_eC}1\${ac_eD}
479"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000480}
481
482
483fi
484rm -f conftest*
485
486
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487test -n "$silent" || echo "checking for POSIXized ISC"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000488if test -d /etc/conf/kconfig.d &&
489 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
490then
491 ISC=1 # If later tests want to check for ISC.
492
493{
494test -n "$verbose" && \
495echo " defining _POSIX_SOURCE"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000496echo "#define" _POSIX_SOURCE "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000497DEFS="$DEFS -D_POSIX_SOURCE=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000498ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
499\${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
500\${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
501"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000502}
503
504 if test -n "$GCC"; then
505 CC="$CC -posix"
506 else
507 CC="$CC -Xp"
508 fi
509fi
510
Guido van Rossum7f43da71994-08-01 12:15:30 +0000511test -n "$silent" || echo "checking for minix/config.h"
512cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000513#include "confdefs.h"
514#include <minix/config.h>
515EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000516# Some shells (Coherent) do redirections in the wrong order, so need
517# the parens.
518ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
519if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000520 rm -rf conftest*
521 MINIX=1
522
523fi
524rm -f conftest*
525
526# The Minix shell can't assign to the same variable on the same line!
527if test -n "$MINIX"; then
528
529{
530test -n "$verbose" && \
531echo " defining _POSIX_SOURCE"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000532echo "#define" _POSIX_SOURCE "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000533DEFS="$DEFS -D_POSIX_SOURCE=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000534ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
535\${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
536\${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
537"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000538}
539
540
541{
542test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000543echo " defining" _POSIX_1_SOURCE to be "2"
544echo "#define" _POSIX_1_SOURCE "2" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000545DEFS="$DEFS -D_POSIX_1_SOURCE=2"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000546ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_1_SOURCE\${ac_dB}_POSIX_1_SOURCE\${ac_dC}2\${ac_dD}
547\${ac_uA}_POSIX_1_SOURCE\${ac_uB}_POSIX_1_SOURCE\${ac_uC}2\${ac_uD}
548\${ac_eA}_POSIX_1_SOURCE\${ac_eB}_POSIX_1_SOURCE\${ac_eC}2\${ac_eD}
549"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000550}
551
552
553{
554test -n "$verbose" && \
555echo " defining _MINIX"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000556echo "#define" _MINIX "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000557DEFS="$DEFS -D_MINIX=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000558ac_sed_defs="${ac_sed_defs}\${ac_dA}_MINIX\${ac_dB}_MINIX\${ac_dC}1\${ac_dD}
559\${ac_uA}_MINIX\${ac_uB}_MINIX\${ac_uC}1\${ac_uD}
560\${ac_eA}_MINIX\${ac_eB}_MINIX\${ac_eC}1\${ac_eD}
561"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000562}
563
564fi
565
Guido van Rossum7f43da71994-08-01 12:15:30 +0000566ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000567LIBS="${LIBS} -lseq"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000568ac_have_lib=""
569test -n "$silent" || echo "checking for -lseq"
570cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000571#include "confdefs.h"
572
Guido van Rossum7f43da71994-08-01 12:15:30 +0000573int main() { return 0; }
574int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000575EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000576if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000577 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +0000578 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000579
580fi
581rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +0000582LIBS="${ac_save_LIBS}"
583if test -n "${ac_have_lib}"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000584 :; LIBS="$LIBS -lseq"
585else
586 :;
587fi
588
589
Guido van Rossum7f43da71994-08-01 12:15:30 +0000590test -n "$silent" || echo "checking for NeXT"
591cat > conftest.${ac_ext} <<EOF
592#include "confdefs.h"
593
594#ifdef _NEXT_SOURCE
595main() { exit(0); }
596#endif
597
598EOF
599eval $ac_compile
600if test -s conftest && (./conftest; exit) 2>/dev/null; then
601
602{
603test -n "$verbose" && \
604echo " defining _POSIX_SOURCE"
605echo "#define" _POSIX_SOURCE "1" >> confdefs.h
606DEFS="$DEFS -D_POSIX_SOURCE=1"
607ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_SOURCE\${ac_dB}_POSIX_SOURCE\${ac_dC}1\${ac_dD}
608\${ac_uA}_POSIX_SOURCE\${ac_uB}_POSIX_SOURCE\${ac_uC}1\${ac_uD}
609\${ac_eA}_POSIX_SOURCE\${ac_eB}_POSIX_SOURCE\${ac_eC}1\${ac_eD}
610"
611}
612
613
614fi
615rm -fr conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +0000616
617# checks for header files
Guido van Rossum7f43da71994-08-01 12:15:30 +0000618test -n "$silent" || echo "checking for ANSI C header files"
619cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000620#include "confdefs.h"
621#include <stdlib.h>
622#include <stdarg.h>
623#include <string.h>
624#include <float.h>
625EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000626# Some shells (Coherent) do redirections in the wrong order, so need
627# the parens.
628ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
629if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000630 rm -rf conftest*
631 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
632echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000633#include <string.h>' > conftest.${ac_ext}
634eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000635if egrep "memchr" conftest.out >/dev/null 2>&1; then
636 rm -rf conftest*
637 # 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 +0000638cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000639#include "confdefs.h"
640#include <ctype.h>
641#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
642#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
643#define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
644int main () { int i; for (i = 0; i < 256; i++)
645if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
646exit (0); }
647
648EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000649eval $ac_compile
Guido van Rossum627b2d71993-12-24 10:39:16 +0000650if test -s conftest && (./conftest; exit) 2>/dev/null; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000651 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
652echo '#include "confdefs.h"
653#include <stdlib.h>' > conftest.${ac_ext}
654eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
655if egrep "free" conftest.out >/dev/null 2>&1; then
656 rm -rf conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +0000657
658{
659test -n "$verbose" && \
660echo " defining STDC_HEADERS"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000661echo "#define" STDC_HEADERS "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000662DEFS="$DEFS -DSTDC_HEADERS=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000663ac_sed_defs="${ac_sed_defs}\${ac_dA}STDC_HEADERS\${ac_dB}STDC_HEADERS\${ac_dC}1\${ac_dD}
664\${ac_uA}STDC_HEADERS\${ac_uB}STDC_HEADERS\${ac_uC}1\${ac_uD}
665\${ac_eA}STDC_HEADERS\${ac_eB}STDC_HEADERS\${ac_eC}1\${ac_eD}
666"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000667}
668
669
670fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000671rm -f conftest*
672
673
674fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000675rm -fr conftest*
676
677fi
678rm -f conftest*
679
680
681fi
682rm -f conftest*
683
Guido van Rossum7f43da71994-08-01 12:15:30 +0000684for 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 +0000685do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000686ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./' '[A-Z]__'`
687test -n "$silent" || echo "checking for ${ac_hdr}"
688cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000689#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000690#include <${ac_hdr}>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000691EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000692# Some shells (Coherent) do redirections in the wrong order, so need
693# the parens.
694ac_err=`eval "($ac_cpp conftest.${ac_ext} >/dev/null) 2>&1"`
695if test -z "$ac_err"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000696 rm -rf conftest*
697
698{
699test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000700echo " defining ${ac_tr_hdr}"
701echo "#define" ${ac_tr_hdr} "1" >> confdefs.h
702DEFS="$DEFS -D${ac_tr_hdr}=1"
703ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_hdr}\${ac_dB}${ac_tr_hdr}\${ac_dC}1\${ac_dD}
704\${ac_uA}${ac_tr_hdr}\${ac_uB}${ac_tr_hdr}\${ac_uC}1\${ac_uD}
705\${ac_eA}${ac_tr_hdr}\${ac_eB}${ac_tr_hdr}\${ac_eC}1\${ac_eD}
706"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000707}
708
709
710fi
711rm -f conftest*
712done
713
Guido van Rossum7f43da71994-08-01 12:15:30 +0000714test -n "$silent" || echo "checking for directory library header"
715ac_dir_header=
716if test -z "$ac_dir_header"; then
717 test -n "$silent" || echo "checking for dirent.h"
718cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000719#include "confdefs.h"
720#include <sys/types.h>
721#include <dirent.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000722int main() { return 0; }
723int t() { DIR *dirp = 0;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000724EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000725if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000726 rm -rf conftest*
727
728{
729test -n "$verbose" && \
730echo " defining DIRENT"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000731echo "#define" DIRENT "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000732DEFS="$DEFS -DDIRENT=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000733ac_sed_defs="${ac_sed_defs}\${ac_dA}DIRENT\${ac_dB}DIRENT\${ac_dC}1\${ac_dD}
734\${ac_uA}DIRENT\${ac_uB}DIRENT\${ac_uC}1\${ac_uD}
735\${ac_eA}DIRENT\${ac_eB}DIRENT\${ac_eC}1\${ac_eD}
736"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000737}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000738 ac_dir_header=dirent.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000739
740fi
741rm -f conftest*
742fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000743if test -z "$ac_dir_header"; then
744 test -n "$silent" || echo "checking for sys/ndir.h"
745cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000746#include "confdefs.h"
747#include <sys/types.h>
748#include <sys/ndir.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000749int main() { return 0; }
750int t() { DIR *dirp = 0;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000751EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000752if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000753 rm -rf conftest*
754
755{
756test -n "$verbose" && \
757echo " defining SYSNDIR"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000758echo "#define" SYSNDIR "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000759DEFS="$DEFS -DSYSNDIR=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000760ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSNDIR\${ac_dB}SYSNDIR\${ac_dC}1\${ac_dD}
761\${ac_uA}SYSNDIR\${ac_uB}SYSNDIR\${ac_uC}1\${ac_uD}
762\${ac_eA}SYSNDIR\${ac_eB}SYSNDIR\${ac_eC}1\${ac_eD}
763"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000764}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000765 ac_dir_header=sys/ndir.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000766
767fi
768rm -f conftest*
769fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000770if test -z "$ac_dir_header"; then
771 test -n "$silent" || echo "checking for sys/dir.h"
772cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000773#include "confdefs.h"
774#include <sys/types.h>
775#include <sys/dir.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000776int main() { return 0; }
777int t() { DIR *dirp = 0;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000778EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000779if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000780 rm -rf conftest*
781
782{
783test -n "$verbose" && \
784echo " defining SYSDIR"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000785echo "#define" SYSDIR "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000786DEFS="$DEFS -DSYSDIR=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000787ac_sed_defs="${ac_sed_defs}\${ac_dA}SYSDIR\${ac_dB}SYSDIR\${ac_dC}1\${ac_dD}
788\${ac_uA}SYSDIR\${ac_uB}SYSDIR\${ac_uC}1\${ac_uD}
789\${ac_eA}SYSDIR\${ac_eB}SYSDIR\${ac_eC}1\${ac_eD}
790"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000791}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000792 ac_dir_header=sys/dir.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000793
794fi
795rm -f conftest*
796fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000797if test -z "$ac_dir_header"; then
798 test -n "$silent" || echo "checking for ndir.h"
799cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000800#include "confdefs.h"
801#include <sys/types.h>
802#include <ndir.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803int main() { return 0; }
804int t() { DIR *dirp = 0;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000805EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000806if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000807 rm -rf conftest*
808
809{
810test -n "$verbose" && \
811echo " defining NDIR"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000812echo "#define" NDIR "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000813DEFS="$DEFS -DNDIR=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814ac_sed_defs="${ac_sed_defs}\${ac_dA}NDIR\${ac_dB}NDIR\${ac_dC}1\${ac_dD}
815\${ac_uA}NDIR\${ac_uB}NDIR\${ac_uC}1\${ac_uD}
816\${ac_eA}NDIR\${ac_eB}NDIR\${ac_eC}1\${ac_eD}
817"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000818}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819 ac_dir_header=ndir.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000820
821fi
822rm -f conftest*
823fi
824
Guido van Rossum7f43da71994-08-01 12:15:30 +0000825test -n "$silent" || echo "checking for closedir return value"
826cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000827#include "confdefs.h"
828#include <sys/types.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829#include <$ac_dir_header>
Guido van Rossum627b2d71993-12-24 10:39:16 +0000830int closedir(); main() { exit(closedir(opendir(".")) != 0); }
831EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832eval $ac_compile
Guido van Rossum627b2d71993-12-24 10:39:16 +0000833if test -s conftest && (./conftest; exit) 2>/dev/null; then
834 :
835else
836
837{
838test -n "$verbose" && \
839echo " defining VOID_CLOSEDIR"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840echo "#define" VOID_CLOSEDIR "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000841DEFS="$DEFS -DVOID_CLOSEDIR=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842ac_sed_defs="${ac_sed_defs}\${ac_dA}VOID_CLOSEDIR\${ac_dB}VOID_CLOSEDIR\${ac_dC}1\${ac_dD}
843\${ac_uA}VOID_CLOSEDIR\${ac_uB}VOID_CLOSEDIR\${ac_uC}1\${ac_uD}
844\${ac_eA}VOID_CLOSEDIR\${ac_eB}VOID_CLOSEDIR\${ac_eC}1\${ac_eD}
845"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000846}
847
848fi
849rm -fr conftest*
850
851
852# checks for typedefs
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853test -n "$silent" || echo "checking for clock_t in time.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000854echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855#include <time.h>' > conftest.${ac_ext}
856eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
857if egrep "clock_t" conftest.out >/dev/null 2>&1; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000858 :
859else
860 rm -rf conftest*
861
862{
863test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000864echo " defining" clock_t to be "long"
865echo "#define" clock_t "long" >> confdefs.h
866DEFS="$DEFS -Dclock_t=long"
867ac_sed_defs="${ac_sed_defs}\${ac_dA}clock_t\${ac_dB}clock_t\${ac_dC}long\${ac_dD}
868\${ac_uA}clock_t\${ac_uB}clock_t\${ac_uC}long\${ac_uD}
869\${ac_eA}clock_t\${ac_eB}clock_t\${ac_eC}long\${ac_eD}
870"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000871}
872
873fi
874rm -f conftest*
875
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876test -n "$silent" || echo "checking for mode_t in sys/types.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000877echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878#include <sys/types.h>' > conftest.${ac_ext}
879eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000880if egrep "mode_t" conftest.out >/dev/null 2>&1; then
881 :
882else
883 rm -rf conftest*
884
885{
886test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887echo " defining" mode_t to be "int"
888echo "#define" mode_t "int" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000889DEFS="$DEFS -Dmode_t=int"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000890ac_sed_defs="${ac_sed_defs}\${ac_dA}mode_t\${ac_dB}mode_t\${ac_dC}int\${ac_dD}
891\${ac_uA}mode_t\${ac_uB}mode_t\${ac_uC}int\${ac_uD}
892\${ac_eA}mode_t\${ac_eB}mode_t\${ac_eC}int\${ac_eD}
893"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000894}
895
896fi
897rm -f conftest*
898
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899test -n "$silent" || echo "checking for off_t in sys/types.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000900echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901#include <sys/types.h>' > conftest.${ac_ext}
902eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000903if egrep "off_t" conftest.out >/dev/null 2>&1; then
904 :
905else
906 rm -rf conftest*
907
908{
909test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910echo " defining" off_t to be "long"
911echo "#define" off_t "long" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000912DEFS="$DEFS -Doff_t=long"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000913ac_sed_defs="${ac_sed_defs}\${ac_dA}off_t\${ac_dB}off_t\${ac_dC}long\${ac_dD}
914\${ac_uA}off_t\${ac_uB}off_t\${ac_uC}long\${ac_uD}
915\${ac_eA}off_t\${ac_eB}off_t\${ac_eC}long\${ac_eD}
916"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000917}
918
919fi
920rm -f conftest*
921
Guido van Rossum7f43da71994-08-01 12:15:30 +0000922test -n "$silent" || echo "checking for pid_t in sys/types.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000923echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924#include <sys/types.h>' > conftest.${ac_ext}
925eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000926if egrep "pid_t" conftest.out >/dev/null 2>&1; then
927 :
928else
929 rm -rf conftest*
930
931{
932test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933echo " defining" pid_t to be "int"
934echo "#define" pid_t "int" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000935DEFS="$DEFS -Dpid_t=int"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000936ac_sed_defs="${ac_sed_defs}\${ac_dA}pid_t\${ac_dB}pid_t\${ac_dC}int\${ac_dD}
937\${ac_uA}pid_t\${ac_uB}pid_t\${ac_uC}int\${ac_uD}
938\${ac_eA}pid_t\${ac_eB}pid_t\${ac_eC}int\${ac_eD}
939"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000940}
941
942fi
943rm -f conftest*
944
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945test -n "$silent" || echo "checking for return type of signal handlers"
946cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +0000947#include "confdefs.h"
948#include <sys/types.h>
949#include <signal.h>
950#ifdef signal
951#undef signal
952#endif
953extern void (*signal ()) ();
Guido van Rossum7f43da71994-08-01 12:15:30 +0000954int main() { return 0; }
955int t() { int i;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000956EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000958 rm -rf conftest*
959
960{
961test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962echo " defining" RETSIGTYPE to be "void"
963echo "#define" RETSIGTYPE "void" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000964DEFS="$DEFS -DRETSIGTYPE=void"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}void\${ac_dD}
966\${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}void\${ac_uD}
967\${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}void\${ac_eD}
968"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000969}
970
971
972else
973 rm -rf conftest*
974
975{
976test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +0000977echo " defining" RETSIGTYPE to be "int"
978echo "#define" RETSIGTYPE "int" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +0000979DEFS="$DEFS -DRETSIGTYPE=int"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980ac_sed_defs="${ac_sed_defs}\${ac_dA}RETSIGTYPE\${ac_dB}RETSIGTYPE\${ac_dC}int\${ac_dD}
981\${ac_uA}RETSIGTYPE\${ac_uB}RETSIGTYPE\${ac_uC}int\${ac_uD}
982\${ac_eA}RETSIGTYPE\${ac_eB}RETSIGTYPE\${ac_eC}int\${ac_eD}
983"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000984}
985
986fi
987rm -f conftest*
988
989
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990test -n "$silent" || echo "checking for size_t in sys/types.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000991echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992#include <sys/types.h>' > conftest.${ac_ext}
993eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +0000994if egrep "size_t" conftest.out >/dev/null 2>&1; then
995 :
996else
997 rm -rf conftest*
998
999{
1000test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001echo " defining" size_t to be "unsigned"
1002echo "#define" size_t "unsigned" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001003DEFS="$DEFS -Dsize_t=unsigned"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001004ac_sed_defs="${ac_sed_defs}\${ac_dA}size_t\${ac_dB}size_t\${ac_dC}unsigned\${ac_dD}
1005\${ac_uA}size_t\${ac_uB}size_t\${ac_uC}unsigned\${ac_uD}
1006\${ac_eA}size_t\${ac_eB}size_t\${ac_eC}unsigned\${ac_eD}
1007"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001008}
1009
1010fi
1011rm -f conftest*
1012
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013test -n "$silent" || echo "checking for uid_t in sys/types.h"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001014echo '#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015#include <sys/types.h>' > conftest.${ac_ext}
1016eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001017if egrep "uid_t" conftest.out >/dev/null 2>&1; then
1018 :
1019else
1020 rm -rf conftest*
1021
1022{
1023test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024echo " defining" uid_t to be "int"
1025echo "#define" uid_t "int" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001026DEFS="$DEFS -Duid_t=int"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027ac_sed_defs="${ac_sed_defs}\${ac_dA}uid_t\${ac_dB}uid_t\${ac_dC}int\${ac_dD}
1028\${ac_uA}uid_t\${ac_uB}uid_t\${ac_uC}int\${ac_uD}
1029\${ac_eA}uid_t\${ac_eB}uid_t\${ac_eC}int\${ac_eD}
1030"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001031}
1032
1033{
1034test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001035echo " defining" gid_t to be "int"
1036echo "#define" gid_t "int" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001037DEFS="$DEFS -Dgid_t=int"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038ac_sed_defs="${ac_sed_defs}\${ac_dA}gid_t\${ac_dB}gid_t\${ac_dC}int\${ac_dD}
1039\${ac_uA}gid_t\${ac_uB}gid_t\${ac_uC}int\${ac_uD}
1040\${ac_eA}gid_t\${ac_eB}gid_t\${ac_eC}int\${ac_eD}
1041"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001042}
1043
1044fi
1045rm -f conftest*
1046
1047
Guido van Rossum0a516c91994-09-12 10:58:40 +00001048# Set name for machine-dependent library files
1049
1050if test -z "$MACHDEP"
1051then
1052 ac_system=`uname -s | tr '[A-Z]' '[a-z]'`
1053 ac_release=`uname -r | sed 's/\..*//'`
1054 MACHDEP="$ac_system$ac_release"
1055 case MACHDEP in
1056 '') MACHDEP=unknown;;
1057 esac
1058 test -n "$verbose" && echo " setting MACHDEP to '$MACHDEP'"
1059fi
1060
1061# Set info about shared libraries.
1062# XXX This should try things out instead of testing uname!
1063
1064
1065
1066
1067ac_system=`uname -s`
1068ac_release=`uname -r`
1069# SO is the extension of shared libraries `(including the dot!)
1070# -- usually .so, .sl on HP-UX
1071if test -z "$SO"
1072then
1073 case $ac_system in
1074 hp*|HP*) SO=.sl;;
1075 *) SO=.so;;
1076 esac
1077 test -n "$verbose" && echo " setting SO to '$SO'"
1078fi
1079# LDSHARED is the ld *command* used to create shared library
1080# -- "ld" on SunOS 4.x.x, "ld -G" on SunOS 5.x, "ld -shared" on IRIX 5
1081if test -z "$LDSHARED"
1082then
1083 case $ac_system/$ac_release in
1084 IRIX*) LDSHARED="ld -shared";;
1085 SunOS/4*) LDSHARED="ld";;
1086 SunOS/5*) LDSHARED="ld -G";;
1087 hp*|HP*) LDSHARED="ld -b";;
1088 *) LDSHARED="ld";;
1089 esac
1090 test -n "$verbose" && echo " setting LDSHARED= to '$LDSHARED'"
1091fi
1092# CCSHARED are the C *flags* used to create objects to go into a shared
1093# library -- this is only needed for HP-UX
1094if test -z "$CCSHARED"
1095then
1096 case $ac_system in
1097 hp*|HP*) CCSHARED="+z";;
1098 esac
1099 test -n "$verbose" && echo " setting CCSHARED= to '$CCSHARED'"
1100fi
1101# LINKFORSHARED are the flags passed to the $(CC) command that links
1102# the python executable -- this is only needed for HP-UX
1103if test -z "$LINKFORSHARED"
1104then
1105 case $ac_system in
1106 hp*|HP*) LINKFORSHARED="-Wl,-E";;
1107 esac
1108 test -n "$verbose" && echo " setting LINKFORSHARED to '$LINKFORSHARED'"
1109fi
1110
Guido van Rossum627b2d71993-12-24 10:39:16 +00001111# checks for libraries
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001113LIBS="${LIBS} -ldl"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114ac_have_lib=""
1115test -n "$silent" || echo "checking for -ldl"
1116cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001117#include "confdefs.h"
1118
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119int main() { return 0; }
1120int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001121EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001123 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001125
1126fi
1127rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128LIBS="${ac_save_LIBS}"
1129if test -n "${ac_have_lib}"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001130
1131{
1132test -n "$verbose" && \
1133echo " defining HAVE_LIBDL"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001134echo "#define" HAVE_LIBDL "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001135DEFS="$DEFS -DHAVE_LIBDL=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBDL\${ac_dB}HAVE_LIBDL\${ac_dC}1\${ac_dD}
1137\${ac_uA}HAVE_LIBDL\${ac_uB}HAVE_LIBDL\${ac_uC}1\${ac_uD}
1138\${ac_eA}HAVE_LIBDL\${ac_eB}HAVE_LIBDL\${ac_eC}1\${ac_eD}
1139"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001140}
1141
1142 LIBS="${LIBS} -ldl"
1143fi
1144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145
1146test -n "$silent" || echo "checking for --with-svr4"
1147# check whether --with-svr4 or --without-svr4 was given.
1148withval="$with_svr4"
1149if test -n "$withval"; then
1150
1151ac_save_LIBS="${LIBS}"
1152LIBS="${LIBS} -lsocket"
1153ac_have_lib=""
1154test -n "$silent" || echo "checking for -lsocket"
1155cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001156#include "confdefs.h"
1157
Guido van Rossum7f43da71994-08-01 12:15:30 +00001158int main() { return 0; }
1159int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001160EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001162 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001164
1165fi
1166rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167LIBS="${ac_save_LIBS}"
1168if test -n "${ac_have_lib}"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001169
1170{
1171test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172echo " defining HAVE_LIBSOCKET"
1173echo "#define" HAVE_LIBSOCKET "1" >> confdefs.h
1174DEFS="$DEFS -DHAVE_LIBSOCKET=1"
1175ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBSOCKET\${ac_dB}HAVE_LIBSOCKET\${ac_dC}1\${ac_dD}
1176\${ac_uA}HAVE_LIBSOCKET\${ac_uB}HAVE_LIBSOCKET\${ac_uC}1\${ac_uD}
1177\${ac_eA}HAVE_LIBSOCKET\${ac_eB}HAVE_LIBSOCKET\${ac_eC}1\${ac_eD}
1178"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001179}
1180
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181 LIBS="${LIBS} -lsocket"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001182fi
1183
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184ac_save_LIBS="${LIBS}"
1185LIBS="${LIBS} -linet"
1186ac_have_lib=""
1187test -n "$silent" || echo "checking for -linet"
1188cat > conftest.${ac_ext} <<EOF
1189#include "confdefs.h"
1190
1191int main() { return 0; }
1192int t() { main();; return 0; }
1193EOF
1194if eval $ac_compile; then
1195 rm -rf conftest*
1196 ac_have_lib="1"
1197
1198fi
1199rm -f conftest*
1200LIBS="${ac_save_LIBS}"
1201if test -n "${ac_have_lib}"; then
1202
1203{
1204test -n "$verbose" && \
1205echo " defining HAVE_LIBINET"
1206echo "#define" HAVE_LIBINET "1" >> confdefs.h
1207DEFS="$DEFS -DHAVE_LIBINET=1"
1208ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBINET\${ac_dB}HAVE_LIBINET\${ac_dC}1\${ac_dD}
1209\${ac_uA}HAVE_LIBINET\${ac_uB}HAVE_LIBINET\${ac_uC}1\${ac_uD}
1210\${ac_eA}HAVE_LIBINET\${ac_eB}HAVE_LIBINET\${ac_eC}1\${ac_eD}
1211"
1212}
1213
1214 LIBS="${LIBS} -linet"
1215fi
1216
1217ac_save_LIBS="${LIBS}"
1218LIBS="${LIBS} -lnsl"
1219ac_have_lib=""
1220test -n "$silent" || echo "checking for -lnsl"
1221cat > conftest.${ac_ext} <<EOF
1222#include "confdefs.h"
1223
1224int main() { return 0; }
1225int t() { main();; return 0; }
1226EOF
1227if eval $ac_compile; then
1228 rm -rf conftest*
1229 ac_have_lib="1"
1230
1231fi
1232rm -f conftest*
1233LIBS="${ac_save_LIBS}"
1234if test -n "${ac_have_lib}"; then
1235
1236{
1237test -n "$verbose" && \
1238echo " defining HAVE_LIBNSL"
1239echo "#define" HAVE_LIBNSL "1" >> confdefs.h
1240DEFS="$DEFS -DHAVE_LIBNSL=1"
1241ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_LIBNSL\${ac_dB}HAVE_LIBNSL\${ac_dC}1\${ac_dD}
1242\${ac_uA}HAVE_LIBNSL\${ac_uB}HAVE_LIBNSL\${ac_uC}1\${ac_uD}
1243\${ac_eA}HAVE_LIBNSL\${ac_eB}HAVE_LIBNSL\${ac_eC}1\${ac_eD}
1244"
1245}
1246
1247 LIBS="${LIBS} -lnsl"
1248fi
1249
1250
1251fi
1252
1253
1254test -n "$silent" || echo "checking for --with-readline"
1255# check whether --with-readline or --without-readline was given.
1256withval="$with_readline"
1257if test -n "$withval"; then
1258
1259{
1260test -n "$verbose" && \
1261echo " defining WITH_READLINE"
1262echo "#define" WITH_READLINE "1" >> confdefs.h
1263DEFS="$DEFS -DWITH_READLINE=1"
1264ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_READLINE\${ac_dB}WITH_READLINE\${ac_dC}1\${ac_dD}
1265\${ac_uA}WITH_READLINE\${ac_uB}WITH_READLINE\${ac_uC}1\${ac_uD}
1266\${ac_eA}WITH_READLINE\${ac_eB}WITH_READLINE\${ac_eC}1\${ac_eD}
1267"
1268}
1269
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001270if test ! -d "$withval"
1271then echo "configure: proper usage is --with-readline=DIRECTORY" >&2; exit 1
Guido van Rossum7f43da71994-08-01 12:15:30 +00001272fi
1273termcap=
1274ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275LIBS="${LIBS} -ltermcap"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001276ac_have_lib=""
1277test -n "$silent" || echo "checking for -ltermcap"
1278cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001279#include "confdefs.h"
1280
Guido van Rossum7f43da71994-08-01 12:15:30 +00001281int main() { return 0; }
1282int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001283EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001284if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001285 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001286 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287
1288fi
1289rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001290LIBS="${ac_save_LIBS}"
1291if test -n "${ac_have_lib}"; then
1292 :; termcap=termcap
1293else
1294 :; ac_save_LIBS="${LIBS}"
1295LIBS="${LIBS} -ltermlib"
1296ac_have_lib=""
1297test -n "$silent" || echo "checking for -ltermlib"
1298cat > conftest.${ac_ext} <<EOF
1299#include "confdefs.h"
1300
1301int main() { return 0; }
1302int t() { main();; return 0; }
1303EOF
1304if eval $ac_compile; then
1305 rm -rf conftest*
1306 ac_have_lib="1"
1307
1308fi
1309rm -f conftest*
1310LIBS="${ac_save_LIBS}"
1311if test -n "${ac_have_lib}"; then
1312 :; termcap=termlib
1313else
1314 :;
1315fi
1316
1317fi
1318
1319if test ! -z "$termcap"
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00001320then LIBS="$LIBS $withval/libreadline.a"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001321 # Avoid possible conflict between shared libraries termcap and gl
1322 # on IRIX 5: both contain a routine called clear.
1323 if test -f /usr/lib/lib$termcap.a
1324 then LIBS="$LIBS /usr/lib/lib$termcap.a"
1325 else LIBS="$LIBS -l$termcap"
1326 fi
1327else echo "configure: no working termcap/termlib" >&2; exit 1
1328fi
1329fi
1330
1331
1332test -n "$silent" || echo "checking for --with-thread"
1333# check whether --with-thread or --without-thread was given.
1334withval="$with_thread"
1335if test -n "$withval"; then
1336
1337if test -d "$withval"
1338then LIBS="$LIBS -L$withval"
1339fi
1340ac_save_LIBS="${LIBS}"
1341LIBS="${LIBS} -lpthreads"
1342ac_have_lib=""
1343test -n "$silent" || echo "checking for -lpthreads"
1344cat > conftest.${ac_ext} <<EOF
1345#include "confdefs.h"
1346
1347int main() { return 0; }
1348int t() { main();; return 0; }
1349EOF
1350if eval $ac_compile; then
1351 rm -rf conftest*
1352 ac_have_lib="1"
1353
1354fi
1355rm -f conftest*
1356LIBS="${ac_save_LIBS}"
1357if test -n "${ac_have_lib}"; then
1358 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001359{
1360test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001361echo " defining WITH_THREAD"
1362echo "#define" WITH_THREAD "1" >> confdefs.h
1363DEFS="$DEFS -DWITH_THREAD=1"
1364ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD}
1365\${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD}
1366\${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD}
1367"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001368}
1369
Guido van Rossum7f43da71994-08-01 12:15:30 +00001370
1371{
1372test -n "$verbose" && \
1373echo " defining _POSIX_THREADS"
1374echo "#define" _POSIX_THREADS "1" >> confdefs.h
1375DEFS="$DEFS -D_POSIX_THREADS=1"
1376ac_sed_defs="${ac_sed_defs}\${ac_dA}_POSIX_THREADS\${ac_dB}_POSIX_THREADS\${ac_dC}1\${ac_dD}
1377\${ac_uA}_POSIX_THREADS\${ac_uB}_POSIX_THREADS\${ac_uC}1\${ac_uD}
1378\${ac_eA}_POSIX_THREADS\${ac_eB}_POSIX_THREADS\${ac_eC}1\${ac_eD}
1379"
1380}
1381
1382LIBS="$LIBS -lpthreads"
1383LIBOBJS="$LIBOBJS thread.o"
1384else
1385 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001386fi
1387
Guido van Rossum7f43da71994-08-01 12:15:30 +00001388ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001389LIBS="${LIBS} -lmpc"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001390ac_have_lib=""
1391test -n "$silent" || echo "checking for -lmpc"
1392cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001393#include "confdefs.h"
1394
Guido van Rossum7f43da71994-08-01 12:15:30 +00001395int main() { return 0; }
1396int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001397EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001398if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001399 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001400 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001401
1402fi
1403rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001404LIBS="${ac_save_LIBS}"
1405if test -n "${ac_have_lib}"; then
1406 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001407{
1408test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001409echo " defining WITH_THREAD"
1410echo "#define" WITH_THREAD "1" >> confdefs.h
1411DEFS="$DEFS -DWITH_THREAD=1"
1412ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD}
1413\${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD}
1414\${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD}
1415"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001416}
1417
Guido van Rossum7f43da71994-08-01 12:15:30 +00001418LIBS="$LIBS -lmpc"
1419LIBOBJS="$LIBOBJS thread.o"
1420else
1421 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001422fi
1423
Guido van Rossum7f43da71994-08-01 12:15:30 +00001424ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001425LIBS="${LIBS} -lthread"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001426ac_have_lib=""
1427test -n "$silent" || echo "checking for -lthread"
1428cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001429#include "confdefs.h"
1430
Guido van Rossum7f43da71994-08-01 12:15:30 +00001431int main() { return 0; }
1432int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001433EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001434if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001435 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001436 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001437
1438fi
1439rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001440LIBS="${ac_save_LIBS}"
1441if test -n "${ac_have_lib}"; then
1442 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001443{
1444test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001445echo " defining WITH_THREAD"
1446echo "#define" WITH_THREAD "1" >> confdefs.h
1447DEFS="$DEFS -DWITH_THREAD=1"
1448ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_THREAD\${ac_dB}WITH_THREAD\${ac_dC}1\${ac_dD}
1449\${ac_uA}WITH_THREAD\${ac_uB}WITH_THREAD\${ac_uC}1\${ac_uD}
1450\${ac_eA}WITH_THREAD\${ac_eB}WITH_THREAD\${ac_eC}1\${ac_eD}
1451"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001452}
1453
Guido van Rossum7f43da71994-08-01 12:15:30 +00001454LIBS="$LIBS -lthread"
1455LIBOBJS="$LIBOBJS thread.o"
1456else
1457 :;
Guido van Rossum627b2d71993-12-24 10:39:16 +00001458fi
1459
Guido van Rossum7f43da71994-08-01 12:15:30 +00001460
Guido van Rossum627b2d71993-12-24 10:39:16 +00001461fi
1462
Guido van Rossum7f43da71994-08-01 12:15:30 +00001463
1464# -I${DLINCLDIR} is added to the compile rule for import.o
1465
1466DLINCLDIR=/
1467
1468test -n "$silent" || echo "checking for --with-sgi-dl"
1469# check whether --with-sgi-dl or --without-sgi-dl was given.
1470withval="$with_sgi_dl"
1471if test -n "$withval"; then
1472
1473{
1474test -n "$verbose" && \
1475echo " defining WITH_SGI_DL"
1476echo "#define" WITH_SGI_DL "1" >> confdefs.h
1477DEFS="$DEFS -DWITH_SGI_DL=1"
1478ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_SGI_DL\${ac_dB}WITH_SGI_DL\${ac_dC}1\${ac_dD}
1479\${ac_uA}WITH_SGI_DL\${ac_uB}WITH_SGI_DL\${ac_uC}1\${ac_uD}
1480\${ac_eA}WITH_SGI_DL\${ac_eB}WITH_SGI_DL\${ac_eC}1\${ac_eD}
1481"
1482}
1483
1484dldir=$withval
1485if test -d "$dldir"
1486then LIBS="$LIBS -L$dldir"
1487else echo "configure: proper usage is --with-sgi-dl=DIRECTORY" >&2; exit 1
1488fi
1489DLINCLDIR=${dldir}
1490LIBS="$LIBS -ldl -lmld"
1491fi
1492
1493
1494test -n "$silent" || echo "checking for --with-dl-dld"
1495# check whether --with-dl-dld or --without-dl-dld was given.
1496withval="$with_dl_dld"
1497if test -n "$withval"; then
1498
1499{
1500test -n "$verbose" && \
1501echo " defining WITH_DL_DLD"
1502echo "#define" WITH_DL_DLD "1" >> confdefs.h
1503DEFS="$DEFS -DWITH_DL_DLD=1"
1504ac_sed_defs="${ac_sed_defs}\${ac_dA}WITH_DL_DLD\${ac_dB}WITH_DL_DLD\${ac_dC}1\${ac_dD}
1505\${ac_uA}WITH_DL_DLD\${ac_uB}WITH_DL_DLD\${ac_uC}1\${ac_uD}
1506\${ac_eA}WITH_DL_DLD\${ac_eB}WITH_DL_DLD\${ac_eC}1\${ac_eD}
1507"
1508}
1509
1510dldir=`echo "$withval" | sed 's/,.*//'`
1511dlddir=`echo "$withval" | sed 's/.*,//'`
1512if test -d "$dldir" -a -d "$dlddir"
1513then LIBS="$LIBS -L$dldir -L$dlddir"
1514else echo "configure: proper usage is --with-dl-dld=DL_DIRECTORY" >&2; exit 1
1515fi
1516DLINCLDIR=${dldir}
1517LIBS="$LIBS -ldl -ldld"
1518fi
1519
1520
Guido van Rossum627b2d71993-12-24 10:39:16 +00001521# checks for library functions
Guido van Rossum7f43da71994-08-01 12:15:30 +00001522for 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 +00001523do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001524ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
1525test -n "$silent" || echo "checking for ${ac_func}"
1526cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001527#include "confdefs.h"
1528#include <ctype.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001529int main() { return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001530int t() {
1531/* The GNU C library defines this for functions which it implements
1532 to always fail with ENOSYS. Some functions are actually named
1533 something starting with __ and the normal name is an alias. */
Guido van Rossum7f43da71994-08-01 12:15:30 +00001534#if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
Guido van Rossum627b2d71993-12-24 10:39:16 +00001535choke me
1536#else
1537/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum7f43da71994-08-01 12:15:30 +00001538extern char ${ac_func}(); ${ac_func}();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001539#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00001540; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001541EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001542if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001543 rm -rf conftest*
1544 {
1545test -n "$verbose" && \
Guido van Rossum7f43da71994-08-01 12:15:30 +00001546echo " defining ${ac_tr_func}"
1547echo "#define" ${ac_tr_func} "1" >> confdefs.h
1548DEFS="$DEFS -D${ac_tr_func}=1"
1549ac_sed_defs="${ac_sed_defs}\${ac_dA}${ac_tr_func}\${ac_dB}${ac_tr_func}\${ac_dC}1\${ac_dD}
1550\${ac_uA}${ac_tr_func}\${ac_uB}${ac_tr_func}\${ac_uC}1\${ac_uD}
1551\${ac_eA}${ac_tr_func}\${ac_eB}${ac_tr_func}\${ac_eC}1\${ac_eD}
1552"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001553}
1554
1555
1556fi
1557rm -f conftest*
1558done
1559
Guido van Rossum7f43da71994-08-01 12:15:30 +00001560for ac_func in dup2 getcwd strerror memmove
Guido van Rossum627b2d71993-12-24 10:39:16 +00001561do
Guido van Rossum7f43da71994-08-01 12:15:30 +00001562test -n "$silent" || echo "checking for ${ac_func}"
1563cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001564#include "confdefs.h"
1565#include <ctype.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001566int main() { return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001567int t() {
1568/* The GNU C library defines this for functions which it implements
1569 to always fail with ENOSYS. Some functions are actually named
1570 something starting with __ and the normal name is an alias. */
Guido van Rossum7f43da71994-08-01 12:15:30 +00001571#if defined (__stub_${ac_func}) || defined (__stub___${ac_func})
Guido van Rossum627b2d71993-12-24 10:39:16 +00001572choke me
1573#else
1574/* Override any gcc2 internal prototype to avoid an error. */
Guido van Rossum7f43da71994-08-01 12:15:30 +00001575extern char ${ac_func}(); ${ac_func}();
Guido van Rossum627b2d71993-12-24 10:39:16 +00001576#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00001577; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001578EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001579if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001580 :
1581else
1582 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001583 LIBOBJS="$LIBOBJS ${ac_func}.o"
1584test -n "$verbose" && echo " using ${ac_func}.o instead"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001585fi
1586rm -f conftest*
1587
1588done
1589
Guido van Rossum7f43da71994-08-01 12:15:30 +00001590test -n "$silent" || echo "checking for getpgrp"
1591cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001592#include "confdefs.h"
1593#include <ctype.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001594int main() { return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001595int t() {
1596/* The GNU C library defines this for functions which it implements
1597 to always fail with ENOSYS. Some functions are actually named
1598 something starting with __ and the normal name is an alias. */
1599#if defined (__stub_getpgrp) || defined (__stub___getpgrp)
1600choke me
1601#else
1602/* Override any gcc2 internal prototype to avoid an error. */
1603extern char getpgrp(); getpgrp();
1604#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00001605; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001606EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001607if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001608 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001609 test -n "$silent" || echo "checking for argument to getpgrp"
1610cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001611#include "confdefs.h"
1612#include <unistd.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001613int main() { return 0; }
1614int t() { getpgrp(0);; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001615EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001616if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001617 rm -rf conftest*
1618
1619{
1620test -n "$verbose" && \
1621echo " defining GETPGRP_HAVE_ARG"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001622echo "#define" GETPGRP_HAVE_ARG "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001623DEFS="$DEFS -DGETPGRP_HAVE_ARG=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001624ac_sed_defs="${ac_sed_defs}\${ac_dA}GETPGRP_HAVE_ARG\${ac_dB}GETPGRP_HAVE_ARG\${ac_dC}1\${ac_dD}
1625\${ac_uA}GETPGRP_HAVE_ARG\${ac_uB}GETPGRP_HAVE_ARG\${ac_uC}1\${ac_uD}
1626\${ac_eA}GETPGRP_HAVE_ARG\${ac_eB}GETPGRP_HAVE_ARG\${ac_eC}1\${ac_eD}
1627"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001628}
1629
1630
1631fi
1632rm -f conftest*
1633
1634
1635fi
1636rm -f conftest*
1637
1638
1639# checks for structures
Guido van Rossum7f43da71994-08-01 12:15:30 +00001640test -n "$silent" || echo "checking for whether time.h and sys/time.h may both be included"
1641cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001642#include "confdefs.h"
1643#include <sys/types.h>
1644#include <sys/time.h>
1645#include <time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001646int main() { return 0; }
1647int t() { struct tm *tp;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001648EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001649if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001650 rm -rf conftest*
1651
1652{
1653test -n "$verbose" && \
1654echo " defining TIME_WITH_SYS_TIME"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001655echo "#define" TIME_WITH_SYS_TIME "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001656DEFS="$DEFS -DTIME_WITH_SYS_TIME=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001657ac_sed_defs="${ac_sed_defs}\${ac_dA}TIME_WITH_SYS_TIME\${ac_dB}TIME_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
1658\${ac_uA}TIME_WITH_SYS_TIME\${ac_uB}TIME_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
1659\${ac_eA}TIME_WITH_SYS_TIME\${ac_eB}TIME_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
1660"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001661}
1662
1663
1664fi
1665rm -f conftest*
1666
Guido van Rossum7f43da71994-08-01 12:15:30 +00001667test -n "$silent" || echo "checking for struct tm in time.h"
1668cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001669#include "confdefs.h"
1670#include <sys/types.h>
1671#include <time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001672int main() { return 0; }
1673int t() { struct tm *tp; tp->tm_sec;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001674EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001675if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001676 :
1677else
1678 rm -rf conftest*
1679
1680{
1681test -n "$verbose" && \
1682echo " defining TM_IN_SYS_TIME"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001683echo "#define" TM_IN_SYS_TIME "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001684DEFS="$DEFS -DTM_IN_SYS_TIME=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001685ac_sed_defs="${ac_sed_defs}\${ac_dA}TM_IN_SYS_TIME\${ac_dB}TM_IN_SYS_TIME\${ac_dC}1\${ac_dD}
1686\${ac_uA}TM_IN_SYS_TIME\${ac_uB}TM_IN_SYS_TIME\${ac_uC}1\${ac_uD}
1687\${ac_eA}TM_IN_SYS_TIME\${ac_eB}TM_IN_SYS_TIME\${ac_eC}1\${ac_eD}
1688"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001689}
1690
1691fi
1692rm -f conftest*
1693
Guido van Rossum7f43da71994-08-01 12:15:30 +00001694ac_decl='#include <sys/types.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001695'
1696case "$DEFS" in
Guido van Rossum7f43da71994-08-01 12:15:30 +00001697 *TM_IN_SYS_TIME*) ac_decl="$ac_decl
Guido van Rossum627b2d71993-12-24 10:39:16 +00001698#include <sys/time.h>
1699" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001700 *) ac_decl="$ac_decl
Guido van Rossum627b2d71993-12-24 10:39:16 +00001701#include <time.h>
1702" ;;
1703esac
Guido van Rossum7f43da71994-08-01 12:15:30 +00001704test -n "$silent" || echo "checking for tm_zone in struct tm"
1705cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001706#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001707$ac_decl
1708int main() { return 0; }
1709int t() { struct tm tm; tm.tm_zone;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001710EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001711if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001712 rm -rf conftest*
1713
1714{
1715test -n "$verbose" && \
1716echo " defining HAVE_TM_ZONE"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001717echo "#define" HAVE_TM_ZONE "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001718DEFS="$DEFS -DHAVE_TM_ZONE=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001719ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TM_ZONE\${ac_dB}HAVE_TM_ZONE\${ac_dC}1\${ac_dD}
1720\${ac_uA}HAVE_TM_ZONE\${ac_uB}HAVE_TM_ZONE\${ac_uC}1\${ac_uD}
1721\${ac_eA}HAVE_TM_ZONE\${ac_eB}HAVE_TM_ZONE\${ac_eC}1\${ac_eD}
1722"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001723}
1724
1725
1726else
1727 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001728 ac_no_tm_zone=1
Guido van Rossum627b2d71993-12-24 10:39:16 +00001729fi
1730rm -f conftest*
1731
Guido van Rossum7f43da71994-08-01 12:15:30 +00001732if test -n "$ac_no_tm_zone"; then
1733test -n "$silent" || echo "checking for tzname"
1734cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001735#include "confdefs.h"
1736#include <time.h>
1737#ifndef tzname /* For SGI. */
1738extern char *tzname[]; /* RS6000 and others want it this way. */
1739#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00001740int main() { return 0; }
1741int t() { atoi(*tzname);; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001742EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001743if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001744 rm -rf conftest*
1745
1746{
1747test -n "$verbose" && \
1748echo " defining HAVE_TZNAME"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001749echo "#define" HAVE_TZNAME "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001750DEFS="$DEFS -DHAVE_TZNAME=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001751ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TZNAME\${ac_dB}HAVE_TZNAME\${ac_dC}1\${ac_dD}
1752\${ac_uA}HAVE_TZNAME\${ac_uB}HAVE_TZNAME\${ac_uC}1\${ac_uD}
1753\${ac_eA}HAVE_TZNAME\${ac_eB}HAVE_TZNAME\${ac_eC}1\${ac_eD}
1754"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001755}
1756
1757
1758fi
1759rm -f conftest*
1760
1761fi
1762
Guido van Rossum7f43da71994-08-01 12:15:30 +00001763test -n "$silent" || echo "checking for whether we have altzone"
1764cat > conftest.${ac_ext} <<EOF
1765#include "confdefs.h"
1766#include <time.h>
1767int main() { return 0; }
1768int t() { return altzone;; return 0; }
1769EOF
1770if eval $ac_compile; then
1771 rm -rf conftest*
1772
1773{
1774test -n "$verbose" && \
1775echo " defining HAVE_ALTZONE"
1776echo "#define" HAVE_ALTZONE "1" >> confdefs.h
1777DEFS="$DEFS -DHAVE_ALTZONE=1"
1778ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALTZONE\${ac_dB}HAVE_ALTZONE\${ac_dC}1\${ac_dD}
1779\${ac_uA}HAVE_ALTZONE\${ac_uB}HAVE_ALTZONE\${ac_uC}1\${ac_uD}
1780\${ac_eA}HAVE_ALTZONE\${ac_eB}HAVE_ALTZONE\${ac_eC}1\${ac_eD}
1781"
1782}
1783
1784
1785fi
1786rm -f conftest*
1787
1788test -n "$silent" || echo "checking for whether sys/select.h and sys/time.h may both be included"
1789cat > conftest.${ac_ext} <<EOF
1790#include "confdefs.h"
1791
1792#include <sys/types.h>
1793#include <sys/select.h>
1794#include <sys/time.h>
1795
1796int main() { return 0; }
1797int t() { ;; return 0; }
1798EOF
1799if eval $ac_compile; then
1800 rm -rf conftest*
1801
1802{
1803test -n "$verbose" && \
1804echo " defining SYS_SELECT_WITH_SYS_TIME"
1805echo "#define" SYS_SELECT_WITH_SYS_TIME "1" >> confdefs.h
1806DEFS="$DEFS -DSYS_SELECT_WITH_SYS_TIME=1"
1807ac_sed_defs="${ac_sed_defs}\${ac_dA}SYS_SELECT_WITH_SYS_TIME\${ac_dB}SYS_SELECT_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
1808\${ac_uA}SYS_SELECT_WITH_SYS_TIME\${ac_uB}SYS_SELECT_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
1809\${ac_eA}SYS_SELECT_WITH_SYS_TIME\${ac_eB}SYS_SELECT_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
1810"
1811}
1812
1813
1814fi
1815rm -f conftest*
1816
Guido van Rossum627b2d71993-12-24 10:39:16 +00001817
1818# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00001819
1820test -n "$silent" || echo "checking for unsigned characters"
1821cat > conftest.${ac_ext} <<EOF
1822#include "confdefs.h"
1823/* volatile prevents gcc2 from optimizing the test away on sparcs. */
1824#if !__STDC__
1825#define volatile
1826#endif
1827main() {
1828#ifdef __CHAR_UNSIGNED__
1829 exit(1); /* No need to redefine it. */
1830#else
1831 volatile char c = 255; exit(c < 0);
1832#endif
1833}
1834EOF
1835eval $ac_compile
1836if test -s conftest && (./conftest; exit) 2>/dev/null; then
1837
1838{
1839test -n "$verbose" && \
1840echo " defining __CHAR_UNSIGNED__"
1841echo "#define" __CHAR_UNSIGNED__ "1" >> confdefs.h
1842DEFS="$DEFS -D__CHAR_UNSIGNED__=1"
1843ac_sed_defs="${ac_sed_defs}\${ac_dA}__CHAR_UNSIGNED__\${ac_dB}__CHAR_UNSIGNED__\${ac_dC}1\${ac_dD}
1844\${ac_uA}__CHAR_UNSIGNED__\${ac_uB}__CHAR_UNSIGNED__\${ac_uC}1\${ac_uD}
1845\${ac_eA}__CHAR_UNSIGNED__\${ac_eB}__CHAR_UNSIGNED__\${ac_eC}1\${ac_eD}
1846"
1847}
1848
1849
1850fi
1851rm -fr conftest*
1852
1853
1854ac_prog='/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00001855typedef int charset[2]; const charset x;
1856/* SunOS 4.1.1 cc rejects this. */
1857char const *const *ccp;
1858char **p;
1859/* AIX XL C 1.02.0.0 rejects this.
1860 It does not let you subtract one const X* pointer from another in an arm
1861 of an if-expression whose if-part is not a constant expression */
1862const char *g = "string";
1863ccp = &g + (g ? g-g : 0);
1864/* HPUX 7.0 cc rejects these. */
1865++ccp;
1866p = (char**) ccp;
1867ccp = (char const *const *) p;
1868{ /* SCO 3.2v4 cc rejects this. */
1869 char *t;
1870 char const *s = 0 ? (char *) 0 : (char const *) 0;
1871
1872 *t++ = 0;
1873}
1874{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1875 int x[] = {25,17};
1876 const int *foo = &x[0];
1877 ++foo;
1878}
1879{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1880 typedef const int *iptr;
1881 iptr p = 0;
1882 ++p;
1883}
1884{ /* AIX XL C 1.02.0.0 rejects this saying
1885 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1886 struct s { int j; const int *ap[3]; };
1887 struct s *b; b->j = 5;
1888}
1889{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1890 const int foo = 10;
1891}'
Guido van Rossum7f43da71994-08-01 12:15:30 +00001892test -n "$silent" || echo "checking for lack of working const"
1893cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001894#include "confdefs.h"
1895
Guido van Rossum7f43da71994-08-01 12:15:30 +00001896int main() { return 0; }
1897int t() { $ac_prog; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001898EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001899if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001900 :
1901else
1902 rm -rf conftest*
1903
1904{
1905test -n "$verbose" && \
1906echo " defining" const to be empty
Guido van Rossum7f43da71994-08-01 12:15:30 +00001907echo "#define" const "" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001908DEFS="$DEFS -Dconst="
Guido van Rossum7f43da71994-08-01 12:15:30 +00001909ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD}
1910\${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD}
1911\${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD}
1912"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001913}
1914
1915fi
1916rm -f conftest*
1917
Guido van Rossum7f43da71994-08-01 12:15:30 +00001918
Guido van Rossum0a516c91994-09-12 10:58:40 +00001919test -n "$silent" || echo "checking for signed char"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001920cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001921#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001922
1923int main() { return 0; }
1924int t() { signed char c;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001925EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001926if eval $ac_compile; then
1927 :
1928else
1929 rm -rf conftest*
1930
1931{
1932test -n "$verbose" && \
1933echo " defining" signed to be empty
1934echo "#define" signed "" >> confdefs.h
1935DEFS="$DEFS -Dsigned="
1936ac_sed_defs="${ac_sed_defs}\${ac_dA}signed\${ac_dB}signed\${ac_dC}\${ac_dD}
1937\${ac_uA}signed\${ac_uB}signed\${ac_uC}\${ac_uD}
1938\${ac_eA}signed\${ac_eB}signed\${ac_eC}\${ac_eD}
1939"
1940}
1941
1942fi
1943rm -f conftest*
1944
1945
1946test -n "$silent" || echo "checking for prototypes"
1947cat > conftest.${ac_ext} <<EOF
1948#include "confdefs.h"
1949
1950int foo(int x) { return 0; }
1951int main() { return foo(10); }
1952
1953EOF
1954eval $ac_compile
Guido van Rossum627b2d71993-12-24 10:39:16 +00001955if test -s conftest && (./conftest; exit) 2>/dev/null; then
1956
1957{
1958test -n "$verbose" && \
1959echo " defining HAVE_PROTOTYPES"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001960echo "#define" HAVE_PROTOTYPES "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001961DEFS="$DEFS -DHAVE_PROTOTYPES=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001962ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_PROTOTYPES\${ac_dB}HAVE_PROTOTYPES\${ac_dC}1\${ac_dD}
1963\${ac_uA}HAVE_PROTOTYPES\${ac_uB}HAVE_PROTOTYPES\${ac_uC}1\${ac_uD}
1964\${ac_eA}HAVE_PROTOTYPES\${ac_eB}HAVE_PROTOTYPES\${ac_eC}1\${ac_eD}
1965"
1966}
1967 have_prototypes=1
1968
1969fi
1970rm -fr conftest*
1971
1972test -n "$silent" || echo "checking for variable length prototypes and stdarg.h"
1973cat > conftest.${ac_ext} <<EOF
1974#include "confdefs.h"
1975
1976#include <stdarg.h>
1977int foo(int x, ...) { return 0; }
1978int main() { return foo(10, 11, 12); }
1979
1980EOF
1981eval $ac_compile
1982if test -s conftest && (./conftest; exit) 2>/dev/null; then
1983
1984{
1985test -n "$verbose" && \
1986echo " defining HAVE_STDARG_PROTOTYPES"
1987echo "#define" HAVE_STDARG_PROTOTYPES "1" >> confdefs.h
1988DEFS="$DEFS -DHAVE_STDARG_PROTOTYPES=1"
1989ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_STDARG_PROTOTYPES\${ac_dB}HAVE_STDARG_PROTOTYPES\${ac_dC}1\${ac_dD}
1990\${ac_uA}HAVE_STDARG_PROTOTYPES\${ac_uB}HAVE_STDARG_PROTOTYPES\${ac_uC}1\${ac_uD}
1991\${ac_eA}HAVE_STDARG_PROTOTYPES\${ac_eB}HAVE_STDARG_PROTOTYPES\${ac_eC}1\${ac_eD}
1992"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001993}
1994 have_prototypes=1
1995
1996fi
1997rm -fr conftest*
1998if test "$have_prototypes"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001999test -n "$silent" || echo "checking for "bad exec* prototypes""
2000cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002001#include "confdefs.h"
2002#include <unistd.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002003int main() { return 0; }
2004int t() { char **t;execve("@",t,t);; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002005EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002006if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002007 :
2008else
2009 rm -rf conftest*
2010
2011{
2012test -n "$verbose" && \
2013echo " defining BAD_EXEC_PROTOTYPES"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002014echo "#define" BAD_EXEC_PROTOTYPES "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00002015DEFS="$DEFS -DBAD_EXEC_PROTOTYPES=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002016ac_sed_defs="${ac_sed_defs}\${ac_dA}BAD_EXEC_PROTOTYPES\${ac_dB}BAD_EXEC_PROTOTYPES\${ac_dC}1\${ac_dD}
2017\${ac_uA}BAD_EXEC_PROTOTYPES\${ac_uB}BAD_EXEC_PROTOTYPES\${ac_uC}1\${ac_uD}
2018\${ac_eA}BAD_EXEC_PROTOTYPES\${ac_eB}BAD_EXEC_PROTOTYPES\${ac_eC}1\${ac_eD}
2019"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002020}
2021
2022fi
2023rm -f conftest*
2024
2025fi
2026
Guido van Rossum7f43da71994-08-01 12:15:30 +00002027test -n "$silent" || echo "checking for bad static forward"
2028cat > conftest.${ac_ext} <<EOF
2029#include "confdefs.h"
2030
2031struct s { int a; int b; };
2032static struct s foo;
2033int foobar() { return !foo.a; }
2034static struct s foo = { 1, 2 };
2035main() { exit(foobar()); }
2036
2037EOF
2038eval $ac_compile
2039if test -s conftest && (./conftest; exit) 2>/dev/null; then
2040 :
2041else
2042
2043{
2044test -n "$verbose" && \
2045echo " defining BAD_STATIC_FORWARD"
2046echo "#define" BAD_STATIC_FORWARD "1" >> confdefs.h
2047DEFS="$DEFS -DBAD_STATIC_FORWARD=1"
2048ac_sed_defs="${ac_sed_defs}\${ac_dA}BAD_STATIC_FORWARD\${ac_dB}BAD_STATIC_FORWARD\${ac_dC}1\${ac_dD}
2049\${ac_uA}BAD_STATIC_FORWARD\${ac_uB}BAD_STATIC_FORWARD\${ac_uC}1\${ac_uD}
2050\${ac_eA}BAD_STATIC_FORWARD\${ac_eB}BAD_STATIC_FORWARD\${ac_eC}1\${ac_eD}
2051"
2052}
2053
2054fi
2055rm -fr conftest*
2056
Guido van Rossum627b2d71993-12-24 10:39:16 +00002057# checks for system services
2058# (none yet)
2059
2060# other checks for UNIX variants
Guido van Rossum7f43da71994-08-01 12:15:30 +00002061ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002062LIBS="${LIBS} -lsun"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002063ac_have_lib=""
2064test -n "$silent" || echo "checking for -lsun"
2065cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002066#include "confdefs.h"
2067
Guido van Rossum7f43da71994-08-01 12:15:30 +00002068int main() { return 0; }
2069int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002070EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002071if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002072 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00002073 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002074
2075fi
2076rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00002077LIBS="${ac_save_LIBS}"
2078if test -n "${ac_have_lib}"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002079 :; LIBS="$LIBS -lsun"
2080else
2081 :;
2082fi
2083
2084
Guido van Rossum7f43da71994-08-01 12:15:30 +00002085test -n "$silent" || echo "checking for Xenix"
2086cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002087#include "confdefs.h"
2088#if defined(M_XENIX) && !defined(M_UNIX)
2089 yes
2090#endif
2091
2092EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002093eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002094if egrep "yes" conftest.out >/dev/null 2>&1; then
2095 rm -rf conftest*
2096 XENIX=1
2097
2098fi
2099rm -f conftest*
2100
2101if test -n "$XENIX"; then
2102 LIBS="$LIBS -lx"
2103 case "$DEFS" in
2104 *SYSNDIR*) ;;
2105 *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
2106 esac
2107fi
2108
2109
Guido van Rossum7f43da71994-08-01 12:15:30 +00002110# check for --with-libm=...
2111
2112LIBM=-lm
2113# check whether --with-libm or --without-libm was given.
2114withval="$with_libm"
2115if test -n "$withval"; then
2116 if test "$withval" != yes
2117then LIBM=$withval
2118else echo "configure: proper usage is --with-libm=STRING" >&2; exit 1
2119fi
2120fi
2121
2122
2123# check for --with-libc=...
2124
2125# check whether --with-libc or --without-libc was given.
2126withval="$with_libc"
2127if test -n "$withval"; then
2128 if test "$withval" != yes
2129then LIBC=$withval
2130else echo "configure: proper usage is --with-libc=STRING" >&2; exit 1
2131fi
2132fi
2133
2134
Guido van Rossum627b2d71993-12-24 10:39:16 +00002135# generate output files
Guido van Rossum0a516c91994-09-12 10:58:40 +00002136
2137# The preferred way to propogate these variables is regular @ substitutions.
Guido van Rossum627b2d71993-12-24 10:39:16 +00002138if test -n "$prefix"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002139 ac_prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"
Guido van Rossum0a516c91994-09-12 10:58:40 +00002140else
2141 prefix=/usr/local
Guido van Rossum627b2d71993-12-24 10:39:16 +00002142fi
2143if test -n "$exec_prefix"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002144 ac_prsub="$ac_prsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00002145s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
Guido van Rossum0a516c91994-09-12 10:58:40 +00002146else
2147 exec_prefix='${prefix}' # Let make expand it.
Guido van Rossum627b2d71993-12-24 10:39:16 +00002148fi
Guido van Rossum0a516c91994-09-12 10:58:40 +00002149
Guido van Rossum7f43da71994-08-01 12:15:30 +00002150# Any assignment to VPATH causes Sun make to only execute
2151# the first set of double-colon rules, so remove it if not needed.
2152# If there is a colon in the path, we need to keep it.
2153if test "x$srcdir" = x.; then
2154 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2155fi
2156
Guido van Rossum627b2d71993-12-24 10:39:16 +00002157# Quote sed substitution magic chars in DEFS.
2158cat >conftest.def <<EOF
2159$DEFS
2160EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002161ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
2162DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
Guido van Rossum627b2d71993-12-24 10:39:16 +00002163rm -f conftest.def
2164# Substitute for predefined variables.
2165
Guido van Rossum7f43da71994-08-01 12:15:30 +00002166trap 'rm -f config.status; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00002167echo creating config.status
2168rm -f config.status
2169cat > config.status <<EOF
2170#!/bin/sh
2171# Generated automatically by configure.
2172# Run this file to recreate the current configuration.
2173# This directory was configured as follows,
2174# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2175#
2176# $0 $configure_args
2177
Guido van Rossum7f43da71994-08-01 12:15:30 +00002178ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
2179for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00002180do
Guido van Rossum7f43da71994-08-01 12:15:30 +00002181 case "\$ac_option" in
2182 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2183 echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
2184 exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
2185 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum0a516c91994-09-12 10:58:40 +00002186 echo "config.status generated by autoconf version 1.11"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002187 exit 0 ;;
2188 -help | --help | --hel | --he | --h)
2189 echo "\$ac_cs_usage"; exit 0 ;;
2190 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00002191 esac
2192done
2193
Guido van Rossum7f43da71994-08-01 12:15:30 +00002194trap '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 +00002195CC='$CC'
2196RANLIB='$RANLIB'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002197AR='$AR'
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00002198INSTALL='$INSTALL'
2199OPT='$OPT'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002200CPP='$CPP'
Guido van Rossum0a516c91994-09-12 10:58:40 +00002201MACHDEP='$MACHDEP'
2202SO='$SO'
2203LDSHARED='$LDSHARED'
2204CCSHARED='$CCSHARED'
2205LINKFORSHARED='$LINKFORSHARED'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002206DLINCLDIR='$DLINCLDIR'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002207LIBOBJS='$LIBOBJS'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002208LIBM='$LIBM'
2209LIBC='$LIBC'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002210LIBS='$LIBS'
2211srcdir='$srcdir'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002212top_srcdir='$top_srcdir'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002213prefix='$prefix'
2214exec_prefix='$exec_prefix'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002215ac_prsub='$ac_prsub'
2216ac_vpsub='$ac_vpsub'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002217extrasub='$extrasub'
2218EOF
2219cat >> config.status <<\EOF
2220
Guido van Rossum7f43da71994-08-01 12:15:30 +00002221ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00002222
Guido van Rossum7f43da71994-08-01 12:15:30 +00002223CONFIG_FILES=${CONFIG_FILES-"Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre"}
2224for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002225 # Remove last slash and all that follows it. Not all systems have dirname.
Guido van Rossum7f43da71994-08-01 12:15:30 +00002226 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Guido van Rossum0a516c91994-09-12 10:58:40 +00002227 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002228 # The file is in a subdirectory.
2229 test ! -d "$ac_dir" && mkdir "$ac_dir"
2230 ac_dir_suffix="/$ac_dir"
2231 else
2232 ac_dir_suffix=
Guido van Rossum627b2d71993-12-24 10:39:16 +00002233 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002234
2235 # A "../" for each directory in $ac_dir_suffix.
2236 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2237 case "$ac_given_srcdir" in
Guido van Rossum0a516c91994-09-12 10:58:40 +00002238 .) srcdir=.
2239 if test -z "$ac_dir_suffix"; then top_srcdir=.
2240 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002241 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2242 *) # Relative path.
2243 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2244 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2245 esac
2246
2247 echo creating "$ac_file"
2248 rm -f "$ac_file"
2249 comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
2250 case "$ac_file" in
2251 *.c | *.h | *.C | *.cc | *.m ) echo "/* $comment_str */" > "$ac_file" ;;
2252 * ) echo "# $comment_str" > "$ac_file" ;;
2253 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00002254 sed -e "
Guido van Rossum7f43da71994-08-01 12:15:30 +00002255$ac_prsub
2256$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00002257$extrasub
2258s%@CC@%$CC%g
2259s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002260s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00002261s%@INSTALL@%$INSTALL%g
2262s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002263s%@CPP@%$CPP%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00002264s%@MACHDEP@%$MACHDEP%g
2265s%@SO@%$SO%g
2266s%@LDSHARED@%$LDSHARED%g
2267s%@CCSHARED@%$CCSHARED%g
2268s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002269s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002270s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002271s%@LIBM@%$LIBM%g
2272s%@LIBC@%$LIBC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002273s%@LIBS@%$LIBS%g
2274s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002275s%@top_srcdir@%$top_srcdir%g
2276s%@prefix@%$prefix%g
2277s%@exec_prefix@%$exec_prefix%g
2278s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00002279fi; done
2280
Guido van Rossum7f43da71994-08-01 12:15:30 +00002281# These sed commands are put into ac_sed_defs when defining a macro.
2282# They are broken into pieces to make the sed script easier to manage.
2283# They are passed to sed as "A NAME B NAME C VALUE D", where NAME
2284# is the cpp macro being defined and VALUE is the value it is being given.
2285# Each defining turns into a single global substitution command.
2286# Hopefully no one uses "!" as a variable value.
2287# Other candidates for the sed separators, like , and @, do get used.
2288#
2289# ac_d sets the value in "#define NAME VALUE" lines.
2290ac_dA='s!^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2291ac_dB='\([ ][ ]*\)[^ ]*!\1#\2'
2292ac_dC='\3'
2293ac_dD='!g'
2294# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2295ac_uA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2296ac_uB='\([ ]\)!\1#\2define\3'
2297ac_uC=' '
2298ac_uD='\4!g'
2299# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2300ac_eA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2301ac_eB='$!\1#\2define\3'
2302ac_eC=' '
2303ac_eD='!g'
2304rm -f conftest.sed
2305EOF
2306# Turn off quoting long enough to insert the sed commands.
2307rm -f conftest.sh
2308cat > conftest.sh <<EOF
2309$ac_sed_defs
2310EOF
2311
2312# Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
2313# on the size of here documents.
2314
2315# Maximum number of lines to put in a single here document.
2316ac_max_sh_lines=9
2317
2318while :
2319do
2320 # wc gives bogus results for an empty file on some AIX systems.
2321 ac_lines=`grep -c . conftest.sh`
2322 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2323 rm -f conftest.s1 conftest.s2
Guido van Rossum0a516c91994-09-12 10:58:40 +00002324 sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -9.
2325 sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +10.
Guido van Rossum7f43da71994-08-01 12:15:30 +00002326 # Write a limited-size here document to append to conftest.sed.
2327 echo 'cat >> conftest.sed <<CONFEOF' >> config.status
2328 cat conftest.s1 >> config.status
2329 echo 'CONFEOF' >> config.status
2330 rm -f conftest.s1 conftest.sh
2331 mv conftest.s2 conftest.sh
2332done
2333rm -f conftest.sh
2334
2335# Now back to your regularly scheduled config.status.
2336cat >> config.status <<\EOF
2337# This sed command replaces #undef's with comments. This is necessary, for
2338# example, in the case of _POSIX_SOURCE, which is predefined and required
2339# on some systems where configure will not decide to define it in
2340# config.h.
2341cat >> conftest.sed <<\CONFEOF
2342s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
2343CONFEOF
2344rm -f conftest.h
2345# Break up the sed commands because old seds have small limits.
2346ac_max_sed_lines=20
2347
2348CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
2349for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
2350 echo creating $ac_file
2351
2352 cp $ac_given_srcdir/$ac_file.in conftest.h1
Guido van Rossum0a516c91994-09-12 10:58:40 +00002353 cp conftest.sed conftest.stm
Guido van Rossum7f43da71994-08-01 12:15:30 +00002354 while :
2355 do
Guido van Rossum0a516c91994-09-12 10:58:40 +00002356 ac_lines=`grep -c . conftest.stm`
Guido van Rossum7f43da71994-08-01 12:15:30 +00002357 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2358 rm -f conftest.s1 conftest.s2 conftest.h2
Guido van Rossum0a516c91994-09-12 10:58:40 +00002359 sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20.
2360 sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21.
Guido van Rossum7f43da71994-08-01 12:15:30 +00002361 sed -f conftest.s1 < conftest.h1 > conftest.h2
Guido van Rossum0a516c91994-09-12 10:58:40 +00002362 rm -f conftest.s1 conftest.h1 conftest.stm
Guido van Rossum7f43da71994-08-01 12:15:30 +00002363 mv conftest.h2 conftest.h1
Guido van Rossum0a516c91994-09-12 10:58:40 +00002364 mv conftest.s2 conftest.stm
Guido van Rossum7f43da71994-08-01 12:15:30 +00002365 done
Guido van Rossum0a516c91994-09-12 10:58:40 +00002366 rm -f conftest.stm conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00002367 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2368 cat conftest.h1 >> conftest.h
2369 rm -f conftest.h1
2370 if cmp -s $ac_file conftest.h 2>/dev/null; then
2371 # The file exists and we would not be changing it.
2372 echo "$ac_file is unchanged"
2373 rm -f conftest.h
2374 else
2375 rm -f $ac_file
2376 mv conftest.h $ac_file
2377 fi
2378fi; done
Guido van Rossum0a516c91994-09-12 10:58:40 +00002379rm -f conftest.sed
Guido van Rossum7f43da71994-08-01 12:15:30 +00002380
2381
Guido van Rossum627b2d71993-12-24 10:39:16 +00002382
2383exit 0
2384EOF
2385chmod +x config.status
Guido van Rossum0a516c91994-09-12 10:58:40 +00002386# Some shells look in PATH for config.status without the "./".
2387test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} ./config.status
Guido van Rossum627b2d71993-12-24 10:39:16 +00002388