2
# Guess values for system-dependent variables and create Makefiles.
3
# Generated automatically using autoconf.
4
# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
6
# This program is free software; you can redistribute it and/or modify
7
# it under the terms of the GNU General Public License as published by
8
# the Free Software Foundation; either version 2, or (at your option)
11
# This program is distributed in the hope that it will be useful,
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
# GNU General Public License for more details.
16
# You should have received a copy of the GNU General Public License
17
# along with this program; if not, write to the Free Software
18
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
# Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create]
21
# [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE] [TARGET]
22
# Ignores all args except --srcdir, --prefix, --exec-prefix, --no-create, and
23
# --with-PACKAGE unless this script has special code to handle it.
28
# Handle --exec-prefix with a space before the argument.
29
if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
30
# Handle --host with a space before the argument.
31
elif test x$next_host = xyes; then next_host=
32
# Handle --prefix with a space before the argument.
33
elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
34
# Handle --srcdir with a space before the argument.
35
elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
38
# For backward compatibility, also recognize exact --exec_prefix.
39
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
40
exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
41
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
42
next_exec_prefix=yes ;;
44
-gas | --gas | --ga | --g) ;;
46
-host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
47
-host | --host | --hos | --ho | --h)
50
-nfp | --nfp | --nf) ;;
52
-no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no)
55
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
56
prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
57
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
60
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
61
srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
62
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
66
package=`echo $arg|sed 's/-*with-//'`
67
# Delete all the valid chars; see if any are left.
68
if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then
69
echo "configure: $package: invalid package name" >&2; exit 1
71
eval "with_`echo $package|sed s/-/_/g`=1" ;;
78
trap 'rm -f conftest* core; exit 1' 1 3 15
81
compile='${CC-cc} $CFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
83
# A filename unique to this package, relative to the directory that
84
# configure is in, which we can look for to find out if srcdir is correct.
87
# Find the source files, if location was not specified.
88
if test -z "$srcdir"; then
90
# Try the directory containing this script, then `..'.
92
confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
93
test "X$confdir" = "X$prog" && confdir=.
95
if test ! -r $srcdir/$unique_file; then
99
if test ! -r $srcdir/$unique_file; then
100
if test x$srcdirdefaulted = xyes; then
101
echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
103
echo "configure: Can not find sources in \`${srcdir}'." 1>&2
107
# Preserve a srcdir of `.' to avoid automounter screwups with pwd.
108
# But we can't avoid them for `..', to make subdirectories work.
111
*) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
115
if test -z "$CC"; then
116
echo checking for gcc
117
saveifs="$IFS"; IFS="${IFS}:"
119
test -z "$dir" && dir=.
120
if test -f $dir/gcc; then
127
test -z "$CC" && CC="cc"
129
# Find out if we are using GNU C, under whatever name.
130
cat > conftest.c <<EOF
135
${CC-cc} -E conftest.c > conftest.out 2>&1
136
if egrep yes conftest.out >/dev/null 2>&1; then
137
GCC=1 # For later tests.
141
# Make sure to not get the incompatible SysV /etc/install and
142
# /usr/sbin/install, which might be in PATH before a BSD-like install,
143
# or the SunOS /usr/etc/install directory, or the AIX /bin/install,
144
# or the AFS install, which mishandles nonexistent args. (Sigh.)
145
if test -z "$INSTALL"; then
146
echo checking for install
147
saveifs="$IFS"; IFS="${IFS}:"
149
test -z "$dir" && dir=.
151
/etc|/usr/sbin|/usr/etc|/usr/afsws/bin) ;;
153
if test -f $dir/install; then
154
if grep dspmsg $dir/install >/dev/null 2>&1; then
157
INSTALL="$dir/install -c"
158
INSTALL_PROGRAM='$(INSTALL)'
159
INSTALL_DATA='$(INSTALL) -m 644'
168
INSTALL=${INSTALL-cp}
169
INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
170
INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
173
echo checking for AIX
174
echo checking how to run the C preprocessor
175
if test -z "$CPP"; then
177
cat > conftest.c <<EOF
180
err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
181
if test -z "$err"; then
189
cat > conftest.c <<EOF
195
eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
196
if egrep "yes" conftest.out >/dev/null 2>&1; then
197
DEFS="$DEFS -D_ALL_SOURCE=1"
202
echo checking for DYNIX/ptx libseq
203
cat > conftest.c <<EOF
204
#if defined(_SEQUENT_)
209
eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
210
if egrep "yes" conftest.out >/dev/null 2>&1; then
215
test -n "$SEQUENT" && test -f /usr/lib/libseq.a &&
218
echo checking for POSIXized ISC
219
if test -d /etc/conf/kconfig.d &&
220
grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
222
ISC=1 # If later tests want to check for ISC.
223
DEFS="$DEFS -D_POSIX_SOURCE=1"
224
if test -n "$GCC"; then
231
echo checking for minix/config.h
232
cat > conftest.c <<EOF
233
#include <minix/config.h>
235
err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
236
if test -z "$err"; then
241
# The Minix shell can't assign to the same variable on the same line!
242
if test -n "$MINIX"; then
243
DEFS="$DEFS -D_POSIX_SOURCE=1"
244
DEFS="$DEFS -D_POSIX_1_SOURCE=2"
245
DEFS="$DEFS -D_MINIX=1"
249
echo checking for ANSI C header files
250
cat > conftest.c <<EOF
256
err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
257
if test -z "$err"; then
258
# SunOS string.h does not declare mem*, contrary to ANSI.
259
echo '#include <string.h>' > conftest.c
260
eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
261
if egrep "memchr" conftest.out >/dev/null 2>&1; then
262
# SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
263
cat > conftest.c <<EOF
265
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
266
#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
267
#define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
268
int main () { int i; for (i = 0; i < 256; i++)
269
if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
274
if test -s conftest && (./conftest; exit) 2>/dev/null; then
275
DEFS="$DEFS -DSTDC_HEADERS=1"
286
trhdr=HAVE_`echo $hdr | tr '[a-z]./' '[A-Z]__'`
287
echo checking for ${hdr}
288
cat > conftest.c <<EOF
291
err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
292
if test -z "$err"; then
293
DEFS="$DEFS -D${trhdr}=1"
299
# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
300
# for constant arguments. Useless!
301
echo checking for working alloca.h
302
cat > conftest.c <<EOF
305
t() { char *p = alloca(2 * sizeof(int)); }
307
if eval $compile; then
308
DEFS="$DEFS -DHAVE_ALLOCA_H=1"
312
decl="#ifdef __GNUC__
313
#define alloca __builtin_alloca
326
echo checking for alloca
327
cat > conftest.c <<EOF
330
t() { char *p = (char *) alloca(1); }
332
if eval $compile; then
339
if test -n "$alloca_missing"; then
340
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
341
# that cause trouble. Some versions do not even contain alloca or
342
# contain a buggy version. If you still want to use their alloca,
343
# use ar to extract alloca.o from them instead of compiling alloca.c.
347
prog='/* Ultrix mips cc rejects this. */
348
typedef int charset[2]; const charset x;
349
/* SunOS 4.1.1 cc rejects this. */
350
char const *const *p;
352
/* HPUX 7.0 cc rejects these. */
354
p2 = (char const* const*) p;'
355
echo checking for working const
356
cat > conftest.c <<EOF
361
if eval $compile; then
364
DEFS="$DEFS -Dconst="
371
echo checking for gcc to derive installation directory prefix
372
saveifs="$IFS"; IFS="$IFS:"
374
test -z "$dir" && dir=.
375
if test $dir != . && test -f $dir/gcc; then
376
# Not all systems have dirname.
377
prefix=`echo $dir|sed 's%/[^/][^/]*$%%'`
385
if test -n "$prefix"; then
386
test -z "$exec_prefix" && exec_prefix='${prefix}'
387
prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"
389
if test -n "$exec_prefix"; then
391
s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%\
392
exec_prefix\\1=\\2$exec_prefix%"
395
trap 'rm -f config.status; exit 1' 1 3 15
396
echo creating config.status
398
cat > config.status <<EOF
400
# Generated automatically by configure.
401
# Run this file to recreate the current configuration.
402
# This directory was configured as follows,
403
# on host `(hostname || uname -n) 2>/dev/null`:
410
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
411
exec /bin/sh $0 $* ;;
412
*) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
416
trap 'rm -f Makefile doc/Makefile test/Makefile; exit 1' 1 3 15
419
INSTALL_PROGRAM='$INSTALL_PROGRAM'
420
INSTALL_DATA='$INSTALL_DATA'
427
exec_prefix='$exec_prefix'
430
cat >> config.status <<\EOF
433
for file in .. Makefile doc/Makefile test/Makefile; do if [ "x$file" != "x.." ]; then
435
# Remove last slash and all that follows it. Not all systems have dirname.
436
dir=`echo $file|sed 's%/[^/][^/]*$%%'`
437
if test "$dir" != "$file"; then
438
test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
439
test ! -d $dir && mkdir $dir
443
echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
447
s%@INSTALL@%$INSTALL%g
448
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
449
s%@INSTALL_DATA@%$INSTALL_DATA%g
455
" $top_srcdir/${file}.in >> $file
460
chmod +x config.status
461
test -n "$no_create" || ./config.status