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" ;;
73 -v |
-verbose |
--verbose |
--verbos |
--verbo |
--verb |
--ver |
--ve |
--v)
81 trap 'rm -f conftest* core; exit 1' 1 3 15
84 compile
='${CC-cc} $CFLAGS $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
86 # A filename unique to this package, relative to the directory that
87 # configure is in, which we can look for to find out if srcdir is correct.
90 # Find the source files, if location was not specified.
91 if test -z "$srcdir"; then
93 # Try the directory containing this script, then `..'.
95 confdir
=`echo $prog|sed 's%/[^/][^/]*$%%'`
96 test "X$confdir" = "X$prog" && confdir
=.
98 if test ! -r $srcdir/$unique_file; then
102 if test ! -r $srcdir/$unique_file; then
103 if test x
$srcdirdefaulted = xyes
; then
104 echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
106 echo "configure: Can not find sources in \`${srcdir}'." 1>&2
110 # Preserve a srcdir of `.' to avoid automounter screwups with pwd.
111 # But we can't avoid them for `..', to make subdirectories work.
114 *) srcdir
=`cd $srcdir; pwd` ;; # Make relative path absolute.
117 if test -z "$CC"; then
118 echo checking
for gcc
119 saveifs
="$IFS"; IFS
="${IFS}:"
121 test -z "$dir" && dir
=.
122 if test -f $dir/gcc
; then
129 test -z "$CC" && CC
="cc"
131 # Find out if we are using GNU C, under whatever name.
132 cat > conftest.c
<<EOF
137 ${CC-cc} -E conftest.c
> conftest.out
2>&1
138 if egrep yes conftest.out
>/dev
/null
2>&1; then
139 GCC
=1 # For later tests.
143 echo checking how to run the C preprocessor
144 if test -z "$CPP"; then
146 cat > conftest.c
<<EOF
149 err
=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"`
150 if test -z "$err"; then
158 # Make sure to not get the incompatible SysV /etc/install and
159 # /usr/sbin/install, which might be in PATH before a BSD-like install,
160 # or the SunOS /usr/etc/install directory, or the AIX /bin/install,
161 # or the AFS install, which mishandles nonexistent args. (Sigh.)
162 if test -z "$INSTALL"; then
163 echo checking
for install
164 saveifs
="$IFS"; IFS
="${IFS}:"
166 test -z "$dir" && dir
=.
168 /etc|
/usr
/sbin|
/usr
/etc|
/usr
/afsws
/bin
) ;;
170 if test -f $dir/installbsd
; then
171 INSTALL
="$dir/installbsd -c" # OSF1
172 INSTALL_PROGRAM
='$(INSTALL)'
173 INSTALL_DATA
='$(INSTALL) -m 644'
176 if test -f $dir/install; then
177 if grep dspmsg
$dir/install >/dev
/null
2>&1; then
180 INSTALL
="$dir/install -c"
181 INSTALL_PROGRAM
='$(INSTALL)'
182 INSTALL_DATA
='$(INSTALL) -m 644'
191 INSTALL
=${INSTALL-cp}
192 INSTALL_PROGRAM
=${INSTALL_PROGRAM-'$(INSTALL)'}
193 INSTALL_DATA
=${INSTALL_DATA-'$(INSTALL)'}
197 trhdr
=HAVE_
`echo $hdr | tr '[a-z]./' '[A-Z]__'`
198 echo checking
for ${hdr}
199 cat > conftest.c
<<EOF
202 err
=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"`
203 if test -z "$err"; then
205 test -n "$verbose" && \
206 echo ' defining' ${trhdr}
207 DEFS
="$DEFS -D${trhdr}=1"
214 echo checking
for unistd.h
215 cat > conftest.c
<<EOF
218 err
=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"`
219 if test -z "$err"; then
221 test -n "$verbose" && \
222 echo ' defining' HAVE_UNISTD_H
223 DEFS
="$DEFS -DHAVE_UNISTD_H=1"
229 echo checking
for ANSI C header files
230 cat > conftest.c
<<EOF
236 err
=`eval "($CPP $DEFS conftest.c >/dev/null) 2>&1"`
237 if test -z "$err"; then
238 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
239 echo '#include <string.h>' > conftest.c
240 eval "$CPP $DEFS conftest.c > conftest.out 2>&1"
241 if egrep "memchr" conftest.out
>/dev
/null
2>&1; then
242 # SGI's /bin/cc from Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
243 cat > conftest.c
<<EOF
245 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
246 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
247 #define XOR(e,f) (((e) && !(f)) || (!(e) && (f)))
248 int main () { int i; for (i = 0; i < 256; i++)
249 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
254 if test -s conftest
&& (.
/conftest
; exit) 2>/dev
/null
; then
256 test -n "$verbose" && \
257 echo ' defining' STDC_HEADERS
258 DEFS
="$DEFS -DSTDC_HEADERS=1"
269 if test -n "$prefix"; then
270 test -z "$exec_prefix" && exec_prefix
='${prefix}'
271 prsub
="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"
273 if test -n "$exec_prefix"; then
275 s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%\
276 exec_prefix\\1=\\2$exec_prefix%"
279 trap 'rm -f config.status; exit 1' 1 3 15
280 echo creating config.status
282 cat > config.status
<<EOF
284 # Generated automatically by configure.
285 # Run this file to recreate the current configuration.
286 # This directory was configured as follows,
287 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
294 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
295 exec /bin/sh $0 $* ;;
296 *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
300 trap 'rm -f Makefile; exit 1' 1 3 15
305 INSTALL_PROGRAM='$INSTALL_PROGRAM'
306 INSTALL_DATA='$INSTALL_DATA'
311 exec_prefix='$exec_prefix'
314 cat >> config.status
<<\EOF
317 for file in .. Makefile
; do if [ "x$file" != "x.." ]; then
319 # Remove last slash and all that follows it. Not all systems have dirname.
320 dir
=`echo $file|sed 's%/[^/][^/]*$%%'`
321 if test "$dir" != "$file"; then
322 test "$top_srcdir" != .
&& srcdir
=$top_srcdir/$dir
323 test ! -d $dir && mkdir
$dir
327 echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
333 s%@INSTALL@%$INSTALL%g
334 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
335 s%@INSTALL_DATA@%$INSTALL_DATA%g
339 " $top_srcdir/${file}.
in >> $file
344 chmod +x config.status
345 test -n "$no_create" || .
/config.status