blob: b864617f7089ab7190359e5c6650cf5863a245f6 [file] [log] [blame]
Guido van Rossum7f43da71994-08-01 12:15:30 +00001#!/bin/sh
Guido van Rossum8eee56f1994-10-20 22:18:37 +00002# From configure.in Revision: 1.9
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 Rossum8eee56f1994-10-20 22:18:37 +0000684for ac_hdr in dlfcn.h fcntl.h limits.h signal.h stdarg.h stddef.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
Guido van Rossum8eee56f1994-10-20 22:18:37 +00001638+ test -n "$silent" || echo "checking for setpgrp"
1639cat > conftest.${ac_ext} <<EOF
1640#include "confdefs.h"
1641#include <ctype.h>
1642int main() { return 0; }
1643int t() {
1644/* The GNU C library defines this for functions which it implements
1645 to always fail with ENOSYS. Some functions are actually named
1646 something starting with __ and the normal name is an alias. */
1647#if defined (__stub_setpgrp) || defined (__stub___setpgrp)
1648choke me
1649#else
1650/* Override any gcc2 internal prototype to avoid an error. */
1651extern char setpgrp(); setpgrp();
1652#endif
1653; return 0; }
1654EOF
1655if eval $ac_compile; then
1656 rm -rf conftest*
1657 test -n "$silent" || echo "checking for arguments to setpgrp"
1658cat > conftest.${ac_ext} <<EOF
1659#include "confdefs.h"
1660#include <unistd.h>
1661int main() { return 0; }
1662int t() { setpgrp(0,0);; return 0; }
1663EOF
1664if eval $ac_compile; then
1665 rm -rf conftest*
1666
1667{
1668test -n "$verbose" && \
1669echo " defining SETPGRP_HAVE_ARG"
1670echo "#define" SETPGRP_HAVE_ARG "1" >> confdefs.h
1671DEFS="$DEFS -DSETPGRP_HAVE_ARG=1"
1672ac_sed_defs="${ac_sed_defs}\${ac_dA}SETPGRP_HAVE_ARG\${ac_dB}SETPGRP_HAVE_ARG\${ac_dC}1\${ac_dD}
1673\${ac_uA}SETPGRP_HAVE_ARG\${ac_uB}SETPGRP_HAVE_ARG\${ac_uC}1\${ac_uD}
1674\${ac_eA}SETPGRP_HAVE_ARG\${ac_eB}SETPGRP_HAVE_ARG\${ac_eC}1\${ac_eD}
1675"
1676}
1677
1678
1679fi
1680rm -f conftest*
1681
1682
1683fi
1684rm -f conftest*
1685
Guido van Rossum627b2d71993-12-24 10:39:16 +00001686
1687# checks for structures
Guido van Rossum7f43da71994-08-01 12:15:30 +00001688test -n "$silent" || echo "checking for whether time.h and sys/time.h may both be included"
1689cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001690#include "confdefs.h"
1691#include <sys/types.h>
1692#include <sys/time.h>
1693#include <time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001694int main() { return 0; }
1695int t() { struct tm *tp;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001696EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001697if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001698 rm -rf conftest*
1699
1700{
1701test -n "$verbose" && \
1702echo " defining TIME_WITH_SYS_TIME"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001703echo "#define" TIME_WITH_SYS_TIME "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001704DEFS="$DEFS -DTIME_WITH_SYS_TIME=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001705ac_sed_defs="${ac_sed_defs}\${ac_dA}TIME_WITH_SYS_TIME\${ac_dB}TIME_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
1706\${ac_uA}TIME_WITH_SYS_TIME\${ac_uB}TIME_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
1707\${ac_eA}TIME_WITH_SYS_TIME\${ac_eB}TIME_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
1708"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001709}
1710
1711
1712fi
1713rm -f conftest*
1714
Guido van Rossum7f43da71994-08-01 12:15:30 +00001715test -n "$silent" || echo "checking for struct tm in time.h"
1716cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001717#include "confdefs.h"
1718#include <sys/types.h>
1719#include <time.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00001720int main() { return 0; }
1721int t() { struct tm *tp; tp->tm_sec;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001722EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001723if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001724 :
1725else
1726 rm -rf conftest*
1727
1728{
1729test -n "$verbose" && \
1730echo " defining TM_IN_SYS_TIME"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001731echo "#define" TM_IN_SYS_TIME "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001732DEFS="$DEFS -DTM_IN_SYS_TIME=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001733ac_sed_defs="${ac_sed_defs}\${ac_dA}TM_IN_SYS_TIME\${ac_dB}TM_IN_SYS_TIME\${ac_dC}1\${ac_dD}
1734\${ac_uA}TM_IN_SYS_TIME\${ac_uB}TM_IN_SYS_TIME\${ac_uC}1\${ac_uD}
1735\${ac_eA}TM_IN_SYS_TIME\${ac_eB}TM_IN_SYS_TIME\${ac_eC}1\${ac_eD}
1736"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001737}
1738
1739fi
1740rm -f conftest*
1741
Guido van Rossum7f43da71994-08-01 12:15:30 +00001742ac_decl='#include <sys/types.h>
Guido van Rossum627b2d71993-12-24 10:39:16 +00001743'
1744case "$DEFS" in
Guido van Rossum7f43da71994-08-01 12:15:30 +00001745 *TM_IN_SYS_TIME*) ac_decl="$ac_decl
Guido van Rossum627b2d71993-12-24 10:39:16 +00001746#include <sys/time.h>
1747" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001748 *) ac_decl="$ac_decl
Guido van Rossum627b2d71993-12-24 10:39:16 +00001749#include <time.h>
1750" ;;
1751esac
Guido van Rossum7f43da71994-08-01 12:15:30 +00001752test -n "$silent" || echo "checking for tm_zone in struct tm"
1753cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001754#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001755$ac_decl
1756int main() { return 0; }
1757int t() { struct tm tm; tm.tm_zone;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001758EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001759if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001760 rm -rf conftest*
1761
1762{
1763test -n "$verbose" && \
1764echo " defining HAVE_TM_ZONE"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001765echo "#define" HAVE_TM_ZONE "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001766DEFS="$DEFS -DHAVE_TM_ZONE=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001767ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TM_ZONE\${ac_dB}HAVE_TM_ZONE\${ac_dC}1\${ac_dD}
1768\${ac_uA}HAVE_TM_ZONE\${ac_uB}HAVE_TM_ZONE\${ac_uC}1\${ac_uD}
1769\${ac_eA}HAVE_TM_ZONE\${ac_eB}HAVE_TM_ZONE\${ac_eC}1\${ac_eD}
1770"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001771}
1772
1773
1774else
1775 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00001776 ac_no_tm_zone=1
Guido van Rossum627b2d71993-12-24 10:39:16 +00001777fi
1778rm -f conftest*
1779
Guido van Rossum7f43da71994-08-01 12:15:30 +00001780if test -n "$ac_no_tm_zone"; then
1781test -n "$silent" || echo "checking for tzname"
1782cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001783#include "confdefs.h"
1784#include <time.h>
1785#ifndef tzname /* For SGI. */
1786extern char *tzname[]; /* RS6000 and others want it this way. */
1787#endif
Guido van Rossum7f43da71994-08-01 12:15:30 +00001788int main() { return 0; }
1789int t() { atoi(*tzname);; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001790EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001791if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001792 rm -rf conftest*
1793
1794{
1795test -n "$verbose" && \
1796echo " defining HAVE_TZNAME"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001797echo "#define" HAVE_TZNAME "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001798DEFS="$DEFS -DHAVE_TZNAME=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001799ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_TZNAME\${ac_dB}HAVE_TZNAME\${ac_dC}1\${ac_dD}
1800\${ac_uA}HAVE_TZNAME\${ac_uB}HAVE_TZNAME\${ac_uC}1\${ac_uD}
1801\${ac_eA}HAVE_TZNAME\${ac_eB}HAVE_TZNAME\${ac_eC}1\${ac_eD}
1802"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001803}
1804
1805
1806fi
1807rm -f conftest*
1808
1809fi
1810
Guido van Rossum7f43da71994-08-01 12:15:30 +00001811test -n "$silent" || echo "checking for whether we have altzone"
1812cat > conftest.${ac_ext} <<EOF
1813#include "confdefs.h"
1814#include <time.h>
1815int main() { return 0; }
1816int t() { return altzone;; return 0; }
1817EOF
1818if eval $ac_compile; then
1819 rm -rf conftest*
1820
1821{
1822test -n "$verbose" && \
1823echo " defining HAVE_ALTZONE"
1824echo "#define" HAVE_ALTZONE "1" >> confdefs.h
1825DEFS="$DEFS -DHAVE_ALTZONE=1"
1826ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_ALTZONE\${ac_dB}HAVE_ALTZONE\${ac_dC}1\${ac_dD}
1827\${ac_uA}HAVE_ALTZONE\${ac_uB}HAVE_ALTZONE\${ac_uC}1\${ac_uD}
1828\${ac_eA}HAVE_ALTZONE\${ac_eB}HAVE_ALTZONE\${ac_eC}1\${ac_eD}
1829"
1830}
1831
1832
1833fi
1834rm -f conftest*
1835
1836test -n "$silent" || echo "checking for whether sys/select.h and sys/time.h may both be included"
1837cat > conftest.${ac_ext} <<EOF
1838#include "confdefs.h"
1839
1840#include <sys/types.h>
1841#include <sys/select.h>
1842#include <sys/time.h>
1843
1844int main() { return 0; }
1845int t() { ;; return 0; }
1846EOF
1847if eval $ac_compile; then
1848 rm -rf conftest*
1849
1850{
1851test -n "$verbose" && \
1852echo " defining SYS_SELECT_WITH_SYS_TIME"
1853echo "#define" SYS_SELECT_WITH_SYS_TIME "1" >> confdefs.h
1854DEFS="$DEFS -DSYS_SELECT_WITH_SYS_TIME=1"
1855ac_sed_defs="${ac_sed_defs}\${ac_dA}SYS_SELECT_WITH_SYS_TIME\${ac_dB}SYS_SELECT_WITH_SYS_TIME\${ac_dC}1\${ac_dD}
1856\${ac_uA}SYS_SELECT_WITH_SYS_TIME\${ac_uB}SYS_SELECT_WITH_SYS_TIME\${ac_uC}1\${ac_uD}
1857\${ac_eA}SYS_SELECT_WITH_SYS_TIME\${ac_eB}SYS_SELECT_WITH_SYS_TIME\${ac_eC}1\${ac_eD}
1858"
1859}
1860
1861
1862fi
1863rm -f conftest*
1864
Guido van Rossum627b2d71993-12-24 10:39:16 +00001865
1866# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +00001867
1868test -n "$silent" || echo "checking for unsigned characters"
1869cat > conftest.${ac_ext} <<EOF
1870#include "confdefs.h"
1871/* volatile prevents gcc2 from optimizing the test away on sparcs. */
1872#if !__STDC__
1873#define volatile
1874#endif
1875main() {
1876#ifdef __CHAR_UNSIGNED__
1877 exit(1); /* No need to redefine it. */
1878#else
1879 volatile char c = 255; exit(c < 0);
1880#endif
1881}
1882EOF
1883eval $ac_compile
1884if test -s conftest && (./conftest; exit) 2>/dev/null; then
1885
1886{
1887test -n "$verbose" && \
1888echo " defining __CHAR_UNSIGNED__"
1889echo "#define" __CHAR_UNSIGNED__ "1" >> confdefs.h
1890DEFS="$DEFS -D__CHAR_UNSIGNED__=1"
1891ac_sed_defs="${ac_sed_defs}\${ac_dA}__CHAR_UNSIGNED__\${ac_dB}__CHAR_UNSIGNED__\${ac_dC}1\${ac_dD}
1892\${ac_uA}__CHAR_UNSIGNED__\${ac_uB}__CHAR_UNSIGNED__\${ac_uC}1\${ac_uD}
1893\${ac_eA}__CHAR_UNSIGNED__\${ac_eB}__CHAR_UNSIGNED__\${ac_eC}1\${ac_eD}
1894"
1895}
1896
1897
1898fi
1899rm -fr conftest*
1900
1901
1902ac_prog='/* Ultrix mips cc rejects this. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00001903typedef int charset[2]; const charset x;
1904/* SunOS 4.1.1 cc rejects this. */
1905char const *const *ccp;
1906char **p;
1907/* AIX XL C 1.02.0.0 rejects this.
1908 It does not let you subtract one const X* pointer from another in an arm
1909 of an if-expression whose if-part is not a constant expression */
1910const char *g = "string";
1911ccp = &g + (g ? g-g : 0);
1912/* HPUX 7.0 cc rejects these. */
1913++ccp;
1914p = (char**) ccp;
1915ccp = (char const *const *) p;
1916{ /* SCO 3.2v4 cc rejects this. */
1917 char *t;
1918 char const *s = 0 ? (char *) 0 : (char const *) 0;
1919
1920 *t++ = 0;
1921}
1922{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
1923 int x[] = {25,17};
1924 const int *foo = &x[0];
1925 ++foo;
1926}
1927{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
1928 typedef const int *iptr;
1929 iptr p = 0;
1930 ++p;
1931}
1932{ /* AIX XL C 1.02.0.0 rejects this saying
1933 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
1934 struct s { int j; const int *ap[3]; };
1935 struct s *b; b->j = 5;
1936}
1937{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
1938 const int foo = 10;
1939}'
Guido van Rossum7f43da71994-08-01 12:15:30 +00001940test -n "$silent" || echo "checking for lack of working const"
1941cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001942#include "confdefs.h"
1943
Guido van Rossum7f43da71994-08-01 12:15:30 +00001944int main() { return 0; }
1945int t() { $ac_prog; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00001946EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00001947if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001948 :
1949else
1950 rm -rf conftest*
1951
1952{
1953test -n "$verbose" && \
1954echo " defining" const to be empty
Guido van Rossum7f43da71994-08-01 12:15:30 +00001955echo "#define" const "" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00001956DEFS="$DEFS -Dconst="
Guido van Rossum7f43da71994-08-01 12:15:30 +00001957ac_sed_defs="${ac_sed_defs}\${ac_dA}const\${ac_dB}const\${ac_dC}\${ac_dD}
1958\${ac_uA}const\${ac_uB}const\${ac_uC}\${ac_uD}
1959\${ac_eA}const\${ac_eB}const\${ac_eC}\${ac_eD}
1960"
Guido van Rossum627b2d71993-12-24 10:39:16 +00001961}
1962
1963fi
1964rm -f conftest*
1965
Guido van Rossum7f43da71994-08-01 12:15:30 +00001966
Guido van Rossumdabb11b1994-10-11 15:04:27 +00001967test -n "$silent" || echo "checking for lack of working volatile"
1968cat > conftest.${ac_ext} <<EOF
1969#include "confdefs.h"
1970
1971int main() { return 0; }
1972int t() { volatile int x; x = 0;; return 0; }
1973EOF
1974if eval $ac_compile; then
1975 :
1976else
1977 rm -rf conftest*
1978
1979{
1980test -n "$verbose" && \
1981echo " defining" volatile to be empty
1982echo "#define" volatile "" >> confdefs.h
1983DEFS="$DEFS -Dvolatile="
1984ac_sed_defs="${ac_sed_defs}\${ac_dA}volatile\${ac_dB}volatile\${ac_dC}\${ac_dD}
1985\${ac_uA}volatile\${ac_uB}volatile\${ac_uC}\${ac_uD}
1986\${ac_eA}volatile\${ac_eB}volatile\${ac_eC}\${ac_eD}
1987"
1988}
1989
1990fi
1991rm -f conftest*
1992
1993
1994test -n "$silent" || echo "checking for lack of working signed char"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001995cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00001996#include "confdefs.h"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001997
1998int main() { return 0; }
1999int t() { signed char c;; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002000EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002001if eval $ac_compile; then
2002 :
2003else
2004 rm -rf conftest*
2005
2006{
2007test -n "$verbose" && \
2008echo " defining" signed to be empty
2009echo "#define" signed "" >> confdefs.h
2010DEFS="$DEFS -Dsigned="
2011ac_sed_defs="${ac_sed_defs}\${ac_dA}signed\${ac_dB}signed\${ac_dC}\${ac_dD}
2012\${ac_uA}signed\${ac_uB}signed\${ac_uC}\${ac_uD}
2013\${ac_eA}signed\${ac_eB}signed\${ac_eC}\${ac_eD}
2014"
2015}
2016
2017fi
2018rm -f conftest*
2019
2020
2021test -n "$silent" || echo "checking for prototypes"
2022cat > conftest.${ac_ext} <<EOF
2023#include "confdefs.h"
2024
2025int foo(int x) { return 0; }
2026int main() { return foo(10); }
2027
2028EOF
2029eval $ac_compile
Guido van Rossum627b2d71993-12-24 10:39:16 +00002030if test -s conftest && (./conftest; exit) 2>/dev/null; then
2031
2032{
2033test -n "$verbose" && \
2034echo " defining HAVE_PROTOTYPES"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002035echo "#define" HAVE_PROTOTYPES "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00002036DEFS="$DEFS -DHAVE_PROTOTYPES=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002037ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_PROTOTYPES\${ac_dB}HAVE_PROTOTYPES\${ac_dC}1\${ac_dD}
2038\${ac_uA}HAVE_PROTOTYPES\${ac_uB}HAVE_PROTOTYPES\${ac_uC}1\${ac_uD}
2039\${ac_eA}HAVE_PROTOTYPES\${ac_eB}HAVE_PROTOTYPES\${ac_eC}1\${ac_eD}
2040"
2041}
2042 have_prototypes=1
2043
2044fi
2045rm -fr conftest*
2046
2047test -n "$silent" || echo "checking for variable length prototypes and stdarg.h"
2048cat > conftest.${ac_ext} <<EOF
2049#include "confdefs.h"
2050
2051#include <stdarg.h>
2052int foo(int x, ...) { return 0; }
2053int main() { return foo(10, 11, 12); }
2054
2055EOF
2056eval $ac_compile
2057if test -s conftest && (./conftest; exit) 2>/dev/null; then
2058
2059{
2060test -n "$verbose" && \
2061echo " defining HAVE_STDARG_PROTOTYPES"
2062echo "#define" HAVE_STDARG_PROTOTYPES "1" >> confdefs.h
2063DEFS="$DEFS -DHAVE_STDARG_PROTOTYPES=1"
2064ac_sed_defs="${ac_sed_defs}\${ac_dA}HAVE_STDARG_PROTOTYPES\${ac_dB}HAVE_STDARG_PROTOTYPES\${ac_dC}1\${ac_dD}
2065\${ac_uA}HAVE_STDARG_PROTOTYPES\${ac_uB}HAVE_STDARG_PROTOTYPES\${ac_uC}1\${ac_uD}
2066\${ac_eA}HAVE_STDARG_PROTOTYPES\${ac_eB}HAVE_STDARG_PROTOTYPES\${ac_eC}1\${ac_eD}
2067"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002068}
2069 have_prototypes=1
2070
2071fi
2072rm -fr conftest*
2073if test "$have_prototypes"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002074test -n "$silent" || echo "checking for "bad exec* prototypes""
2075cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002076#include "confdefs.h"
2077#include <unistd.h>
Guido van Rossum7f43da71994-08-01 12:15:30 +00002078int main() { return 0; }
2079int t() { char **t;execve("@",t,t);; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002080EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002081if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002082 :
2083else
2084 rm -rf conftest*
2085
2086{
2087test -n "$verbose" && \
2088echo " defining BAD_EXEC_PROTOTYPES"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002089echo "#define" BAD_EXEC_PROTOTYPES "1" >> confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00002090DEFS="$DEFS -DBAD_EXEC_PROTOTYPES=1"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002091ac_sed_defs="${ac_sed_defs}\${ac_dA}BAD_EXEC_PROTOTYPES\${ac_dB}BAD_EXEC_PROTOTYPES\${ac_dC}1\${ac_dD}
2092\${ac_uA}BAD_EXEC_PROTOTYPES\${ac_uB}BAD_EXEC_PROTOTYPES\${ac_uC}1\${ac_uD}
2093\${ac_eA}BAD_EXEC_PROTOTYPES\${ac_eB}BAD_EXEC_PROTOTYPES\${ac_eC}1\${ac_eD}
2094"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002095}
2096
2097fi
2098rm -f conftest*
2099
2100fi
2101
Guido van Rossum7f43da71994-08-01 12:15:30 +00002102test -n "$silent" || echo "checking for bad static forward"
2103cat > conftest.${ac_ext} <<EOF
2104#include "confdefs.h"
2105
2106struct s { int a; int b; };
2107static struct s foo;
2108int foobar() { return !foo.a; }
2109static struct s foo = { 1, 2 };
2110main() { exit(foobar()); }
2111
2112EOF
2113eval $ac_compile
2114if test -s conftest && (./conftest; exit) 2>/dev/null; then
2115 :
2116else
2117
2118{
2119test -n "$verbose" && \
2120echo " defining BAD_STATIC_FORWARD"
2121echo "#define" BAD_STATIC_FORWARD "1" >> confdefs.h
2122DEFS="$DEFS -DBAD_STATIC_FORWARD=1"
2123ac_sed_defs="${ac_sed_defs}\${ac_dA}BAD_STATIC_FORWARD\${ac_dB}BAD_STATIC_FORWARD\${ac_dC}1\${ac_dD}
2124\${ac_uA}BAD_STATIC_FORWARD\${ac_uB}BAD_STATIC_FORWARD\${ac_uC}1\${ac_uD}
2125\${ac_eA}BAD_STATIC_FORWARD\${ac_eB}BAD_STATIC_FORWARD\${ac_eC}1\${ac_eD}
2126"
2127}
2128
2129fi
2130rm -fr conftest*
2131
Guido van Rossum627b2d71993-12-24 10:39:16 +00002132# checks for system services
2133# (none yet)
2134
2135# other checks for UNIX variants
Guido van Rossum7f43da71994-08-01 12:15:30 +00002136ac_save_LIBS="${LIBS}"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002137LIBS="${LIBS} -lsun"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002138ac_have_lib=""
2139test -n "$silent" || echo "checking for -lsun"
2140cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002141#include "confdefs.h"
2142
Guido van Rossum7f43da71994-08-01 12:15:30 +00002143int main() { return 0; }
2144int t() { main();; return 0; }
Guido van Rossum627b2d71993-12-24 10:39:16 +00002145EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002146if eval $ac_compile; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002147 rm -rf conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00002148 ac_have_lib="1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002149
2150fi
2151rm -f conftest*
Guido van Rossum7f43da71994-08-01 12:15:30 +00002152LIBS="${ac_save_LIBS}"
2153if test -n "${ac_have_lib}"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002154 :; LIBS="$LIBS -lsun"
2155else
2156 :;
2157fi
2158
2159
Guido van Rossum7f43da71994-08-01 12:15:30 +00002160test -n "$silent" || echo "checking for Xenix"
2161cat > conftest.${ac_ext} <<EOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00002162#include "confdefs.h"
2163#if defined(M_XENIX) && !defined(M_UNIX)
2164 yes
2165#endif
2166
2167EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002168eval "$ac_cpp conftest.${ac_ext} > conftest.out 2>&1"
Guido van Rossum627b2d71993-12-24 10:39:16 +00002169if egrep "yes" conftest.out >/dev/null 2>&1; then
2170 rm -rf conftest*
2171 XENIX=1
2172
2173fi
2174rm -f conftest*
2175
2176if test -n "$XENIX"; then
2177 LIBS="$LIBS -lx"
2178 case "$DEFS" in
2179 *SYSNDIR*) ;;
2180 *) LIBS="-ldir $LIBS" ;; # Make sure -ldir precedes any -lx.
2181 esac
2182fi
2183
2184
Guido van Rossum7f43da71994-08-01 12:15:30 +00002185# check for --with-libm=...
2186
2187LIBM=-lm
2188# check whether --with-libm or --without-libm was given.
2189withval="$with_libm"
2190if test -n "$withval"; then
2191 if test "$withval" != yes
2192then LIBM=$withval
2193else echo "configure: proper usage is --with-libm=STRING" >&2; exit 1
2194fi
2195fi
2196
2197
2198# check for --with-libc=...
2199
2200# check whether --with-libc or --without-libc was given.
2201withval="$with_libc"
2202if test -n "$withval"; then
2203 if test "$withval" != yes
2204then LIBC=$withval
2205else echo "configure: proper usage is --with-libc=STRING" >&2; exit 1
2206fi
2207fi
2208
2209
Guido van Rossum627b2d71993-12-24 10:39:16 +00002210# generate output files
Guido van Rossum0a516c91994-09-12 10:58:40 +00002211
2212# The preferred way to propogate these variables is regular @ substitutions.
Guido van Rossum627b2d71993-12-24 10:39:16 +00002213if test -n "$prefix"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002214 ac_prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"
Guido van Rossum0a516c91994-09-12 10:58:40 +00002215else
2216 prefix=/usr/local
Guido van Rossum627b2d71993-12-24 10:39:16 +00002217fi
2218if test -n "$exec_prefix"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002219 ac_prsub="$ac_prsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00002220s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
Guido van Rossum0a516c91994-09-12 10:58:40 +00002221else
2222 exec_prefix='${prefix}' # Let make expand it.
Guido van Rossum627b2d71993-12-24 10:39:16 +00002223fi
Guido van Rossum0a516c91994-09-12 10:58:40 +00002224
Guido van Rossum7f43da71994-08-01 12:15:30 +00002225# Any assignment to VPATH causes Sun make to only execute
2226# the first set of double-colon rules, so remove it if not needed.
2227# If there is a colon in the path, we need to keep it.
2228if test "x$srcdir" = x.; then
2229 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
2230fi
2231
Guido van Rossum627b2d71993-12-24 10:39:16 +00002232# Quote sed substitution magic chars in DEFS.
2233cat >conftest.def <<EOF
2234$DEFS
2235EOF
Guido van Rossum7f43da71994-08-01 12:15:30 +00002236ac_escape_ampersand_and_backslash='s%[&\\]%\\&%g'
2237DEFS=`sed "$ac_escape_ampersand_and_backslash" <conftest.def`
Guido van Rossum627b2d71993-12-24 10:39:16 +00002238rm -f conftest.def
2239# Substitute for predefined variables.
2240
Guido van Rossum7f43da71994-08-01 12:15:30 +00002241trap 'rm -f config.status; exit 1' 1 2 15
Guido van Rossum627b2d71993-12-24 10:39:16 +00002242echo creating config.status
2243rm -f config.status
2244cat > config.status <<EOF
2245#!/bin/sh
2246# Generated automatically by configure.
2247# Run this file to recreate the current configuration.
2248# This directory was configured as follows,
2249# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2250#
2251# $0 $configure_args
2252
Guido van Rossum7f43da71994-08-01 12:15:30 +00002253ac_cs_usage="Usage: config.status [--recheck] [--version] [--help]"
2254for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +00002255do
Guido van Rossum7f43da71994-08-01 12:15:30 +00002256 case "\$ac_option" in
2257 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
2258 echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create
2259 exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args --no-create ;;
2260 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
Guido van Rossum0a516c91994-09-12 10:58:40 +00002261 echo "config.status generated by autoconf version 1.11"
Guido van Rossum7f43da71994-08-01 12:15:30 +00002262 exit 0 ;;
2263 -help | --help | --hel | --he | --h)
2264 echo "\$ac_cs_usage"; exit 0 ;;
2265 *) echo "\$ac_cs_usage"; exit 1 ;;
Guido van Rossum627b2d71993-12-24 10:39:16 +00002266 esac
2267done
2268
Guido van Rossum7f43da71994-08-01 12:15:30 +00002269trap '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 +00002270CC='$CC'
2271RANLIB='$RANLIB'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002272AR='$AR'
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00002273INSTALL='$INSTALL'
2274OPT='$OPT'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002275CPP='$CPP'
Guido van Rossum0a516c91994-09-12 10:58:40 +00002276MACHDEP='$MACHDEP'
2277SO='$SO'
2278LDSHARED='$LDSHARED'
2279CCSHARED='$CCSHARED'
2280LINKFORSHARED='$LINKFORSHARED'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002281DLINCLDIR='$DLINCLDIR'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002282LIBOBJS='$LIBOBJS'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002283LIBM='$LIBM'
2284LIBC='$LIBC'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002285LIBS='$LIBS'
2286srcdir='$srcdir'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002287top_srcdir='$top_srcdir'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002288prefix='$prefix'
2289exec_prefix='$exec_prefix'
Guido van Rossum7f43da71994-08-01 12:15:30 +00002290ac_prsub='$ac_prsub'
2291ac_vpsub='$ac_vpsub'
Guido van Rossum627b2d71993-12-24 10:39:16 +00002292extrasub='$extrasub'
2293EOF
2294cat >> config.status <<\EOF
2295
Guido van Rossum7f43da71994-08-01 12:15:30 +00002296ac_given_srcdir=$srcdir
Guido van Rossum627b2d71993-12-24 10:39:16 +00002297
Guido van Rossum7f43da71994-08-01 12:15:30 +00002298CONFIG_FILES=${CONFIG_FILES-"Makefile Objects/Makefile Parser/Makefile Python/Makefile Modules/Makefile.pre"}
2299for ac_file in .. ${CONFIG_FILES}; do if test "x$ac_file" != x..; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00002300 # Remove last slash and all that follows it. Not all systems have dirname.
Guido van Rossum7f43da71994-08-01 12:15:30 +00002301 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
Guido van Rossum0a516c91994-09-12 10:58:40 +00002302 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00002303 # The file is in a subdirectory.
2304 test ! -d "$ac_dir" && mkdir "$ac_dir"
2305 ac_dir_suffix="/$ac_dir"
2306 else
2307 ac_dir_suffix=
Guido van Rossum627b2d71993-12-24 10:39:16 +00002308 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00002309
2310 # A "../" for each directory in $ac_dir_suffix.
2311 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
2312 case "$ac_given_srcdir" in
Guido van Rossum0a516c91994-09-12 10:58:40 +00002313 .) srcdir=.
2314 if test -z "$ac_dir_suffix"; then top_srcdir=.
2315 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002316 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
2317 *) # Relative path.
2318 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
2319 top_srcdir="$ac_dots$ac_given_srcdir" ;;
2320 esac
2321
2322 echo creating "$ac_file"
2323 rm -f "$ac_file"
2324 comment_str="Generated automatically from `echo $ac_file|sed 's|.*/||'`.in by configure."
2325 case "$ac_file" in
2326 *.c | *.h | *.C | *.cc | *.m ) echo "/* $comment_str */" > "$ac_file" ;;
2327 * ) echo "# $comment_str" > "$ac_file" ;;
2328 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00002329 sed -e "
Guido van Rossum7f43da71994-08-01 12:15:30 +00002330$ac_prsub
2331$ac_vpsub
Guido van Rossum627b2d71993-12-24 10:39:16 +00002332$extrasub
2333s%@CC@%$CC%g
2334s%@RANLIB@%$RANLIB%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002335s%@AR@%$AR%g
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00002336s%@INSTALL@%$INSTALL%g
2337s%@OPT@%$OPT%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002338s%@CPP@%$CPP%g
Guido van Rossum0a516c91994-09-12 10:58:40 +00002339s%@MACHDEP@%$MACHDEP%g
2340s%@SO@%$SO%g
2341s%@LDSHARED@%$LDSHARED%g
2342s%@CCSHARED@%$CCSHARED%g
2343s%@LINKFORSHARED@%$LINKFORSHARED%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002344s%@DLINCLDIR@%$DLINCLDIR%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002345s%@LIBOBJS@%$LIBOBJS%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002346s%@LIBM@%$LIBM%g
2347s%@LIBC@%$LIBC%g
Guido van Rossum627b2d71993-12-24 10:39:16 +00002348s%@LIBS@%$LIBS%g
2349s%@srcdir@%$srcdir%g
Guido van Rossum7f43da71994-08-01 12:15:30 +00002350s%@top_srcdir@%$top_srcdir%g
2351s%@prefix@%$prefix%g
2352s%@exec_prefix@%$exec_prefix%g
2353s%@DEFS@%-DHAVE_CONFIG_H%" $ac_given_srcdir/${ac_file}.in >> $ac_file
Guido van Rossum627b2d71993-12-24 10:39:16 +00002354fi; done
2355
Guido van Rossum7f43da71994-08-01 12:15:30 +00002356# These sed commands are put into ac_sed_defs when defining a macro.
2357# They are broken into pieces to make the sed script easier to manage.
2358# They are passed to sed as "A NAME B NAME C VALUE D", where NAME
2359# is the cpp macro being defined and VALUE is the value it is being given.
2360# Each defining turns into a single global substitution command.
2361# Hopefully no one uses "!" as a variable value.
2362# Other candidates for the sed separators, like , and @, do get used.
2363#
2364# ac_d sets the value in "#define NAME VALUE" lines.
2365ac_dA='s!^\([ ]*\)#\([ ]*define[ ][ ]*\)'
2366ac_dB='\([ ][ ]*\)[^ ]*!\1#\2'
2367ac_dC='\3'
2368ac_dD='!g'
2369# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
2370ac_uA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2371ac_uB='\([ ]\)!\1#\2define\3'
2372ac_uC=' '
2373ac_uD='\4!g'
2374# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
2375ac_eA='s!^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
2376ac_eB='$!\1#\2define\3'
2377ac_eC=' '
2378ac_eD='!g'
2379rm -f conftest.sed
2380EOF
2381# Turn off quoting long enough to insert the sed commands.
2382rm -f conftest.sh
2383cat > conftest.sh <<EOF
2384$ac_sed_defs
2385EOF
2386
2387# Break up $ac_sed_defs (now in conftest.sh) because some shells have a limit
2388# on the size of here documents.
2389
2390# Maximum number of lines to put in a single here document.
2391ac_max_sh_lines=9
2392
2393while :
2394do
2395 # wc gives bogus results for an empty file on some AIX systems.
2396 ac_lines=`grep -c . conftest.sh`
2397 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2398 rm -f conftest.s1 conftest.s2
Guido van Rossum0a516c91994-09-12 10:58:40 +00002399 sed ${ac_max_sh_lines}q conftest.sh > conftest.s1 # Like head -9.
2400 sed 1,${ac_max_sh_lines}d conftest.sh > conftest.s2 # Like tail +10.
Guido van Rossum7f43da71994-08-01 12:15:30 +00002401 # Write a limited-size here document to append to conftest.sed.
2402 echo 'cat >> conftest.sed <<CONFEOF' >> config.status
2403 cat conftest.s1 >> config.status
2404 echo 'CONFEOF' >> config.status
2405 rm -f conftest.s1 conftest.sh
2406 mv conftest.s2 conftest.sh
2407done
2408rm -f conftest.sh
2409
2410# Now back to your regularly scheduled config.status.
2411cat >> config.status <<\EOF
2412# This sed command replaces #undef's with comments. This is necessary, for
2413# example, in the case of _POSIX_SOURCE, which is predefined and required
2414# on some systems where configure will not decide to define it in
2415# config.h.
2416cat >> conftest.sed <<\CONFEOF
2417s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
2418CONFEOF
2419rm -f conftest.h
2420# Break up the sed commands because old seds have small limits.
2421ac_max_sed_lines=20
2422
2423CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
2424for ac_file in .. ${CONFIG_HEADERS}; do if test "x$ac_file" != x..; then
2425 echo creating $ac_file
2426
2427 cp $ac_given_srcdir/$ac_file.in conftest.h1
Guido van Rossum0a516c91994-09-12 10:58:40 +00002428 cp conftest.sed conftest.stm
Guido van Rossum7f43da71994-08-01 12:15:30 +00002429 while :
2430 do
Guido van Rossum0a516c91994-09-12 10:58:40 +00002431 ac_lines=`grep -c . conftest.stm`
Guido van Rossum7f43da71994-08-01 12:15:30 +00002432 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
2433 rm -f conftest.s1 conftest.s2 conftest.h2
Guido van Rossum0a516c91994-09-12 10:58:40 +00002434 sed ${ac_max_sed_lines}q conftest.stm > conftest.s1 # Like head -20.
2435 sed 1,${ac_max_sed_lines}d conftest.stm > conftest.s2 # Like tail +21.
Guido van Rossum7f43da71994-08-01 12:15:30 +00002436 sed -f conftest.s1 < conftest.h1 > conftest.h2
Guido van Rossum0a516c91994-09-12 10:58:40 +00002437 rm -f conftest.s1 conftest.h1 conftest.stm
Guido van Rossum7f43da71994-08-01 12:15:30 +00002438 mv conftest.h2 conftest.h1
Guido van Rossum0a516c91994-09-12 10:58:40 +00002439 mv conftest.s2 conftest.stm
Guido van Rossum7f43da71994-08-01 12:15:30 +00002440 done
Guido van Rossum0a516c91994-09-12 10:58:40 +00002441 rm -f conftest.stm conftest.h
Guido van Rossum7f43da71994-08-01 12:15:30 +00002442 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
2443 cat conftest.h1 >> conftest.h
2444 rm -f conftest.h1
2445 if cmp -s $ac_file conftest.h 2>/dev/null; then
2446 # The file exists and we would not be changing it.
2447 echo "$ac_file is unchanged"
2448 rm -f conftest.h
2449 else
2450 rm -f $ac_file
2451 mv conftest.h $ac_file
2452 fi
2453fi; done
Guido van Rossum0a516c91994-09-12 10:58:40 +00002454rm -f conftest.sed
Guido van Rossum7f43da71994-08-01 12:15:30 +00002455
2456
Guido van Rossum627b2d71993-12-24 10:39:16 +00002457
2458exit 0
2459EOF
2460chmod +x config.status
Guido van Rossum0a516c91994-09-12 10:58:40 +00002461# Some shells look in PATH for config.status without the "./".
2462test -n "$no_create" || ${CONFIG_SHELL-/bin/sh} ./config.status
Guido van Rossum627b2d71993-12-24 10:39:16 +00002463