NetBSD/gnu/usr.bin/send-pr/configure

360 lines
11 KiB
Bash
Executable File

#!/bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf.
# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp]
# [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE[=VALUE]]
# Ignores all args except --srcdir, --prefix, --exec-prefix, and
# --with-PACKAGE[=VALUE] unless this script has special code to handle it.
for arg
do
# Handle --exec-prefix with a space before the argument.
if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
# Handle --host with a space before the argument.
elif test x$next_host = xyes; then next_host=
# Handle --prefix with a space before the argument.
elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
# Handle --srcdir with a space before the argument.
elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
else
case $arg in
# For backward compatibility, recognize -exec-prefix and --exec_prefix.
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
next_exec_prefix=yes ;;
-gas | --gas | --ga | --g) ;;
-host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
-host | --host | --hos | --ho | --h)
next_host=yes ;;
-nfp | --nfp | --nf) ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
next_prefix=yes ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
next_srcdir=yes ;;
-with-* | --with-*)
package=`echo $arg|sed -e 's/-*with-//' -e 's/=.*//'`
# Reject names that aren't valid shell variable names.
if test -n "`echo $package| sed 's/[-a-zA-Z0-9_]//g'`"; then
echo "configure: $package: invalid package name" >&2; exit 1
fi
package=`echo $package| sed 's/-/_/g'`
case "$arg" in
*=*) val="`echo $arg|sed 's/[^=]*=//'`" ;;
*) val=1 ;;
esac
eval "with_$package='$val'" ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v)
verbose=yes ;;
*) ;;
esac
fi
done
trap 'rm -fr conftest* confdefs* core; exit 1' 1 3 15
trap 'rm -f confdefs*' 0
# NLS nuisances.
# These must not be set unconditionally because not all systems understand
# e.g. LANG=C (notably SCO).
if test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi
if test "${LANG+set}" = 'set' ; then LANG=C; export LANG; fi
rm -f conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
compile='${CC-cc} $CFLAGS conftest.c -o conftest $LIBS >/dev/null 2>&1'
# A filename unique to this package, relative to the directory that
# configure is in, which we can look for to find out if srcdir is correct.
unique_file=send-pr.sh
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
srcdirdefaulted=yes
# Try the directory containing this script, then `..'.
prog=$0
confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
test "X$confdir" = "X$prog" && confdir=.
srcdir=$confdir
if test ! -r $srcdir/$unique_file; then
srcdir=..
fi
fi
if test ! -r $srcdir/$unique_file; then
if test x$srcdirdefaulted = xyes; then
echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
else
echo "configure: Can not find sources in \`${srcdir}'." 1>&2
fi
exit 1
fi
# Preserve a srcdir of `.' to avoid automounter screwups with pwd.
# But we can't avoid them for `..', to make subdirectories work.
case $srcdir in
.|/*|~*) ;;
*) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
esac
# Save the original args to write them into config.status later.
configure_args="$*"
echo checking for echo -n
if test "`echo -n foo`" = foo ; then
ECHON=bsd
test -n "$verbose" && echo ' using echo -n'
elif test "`echo 'foo\c'`" = foo ; then
ECHON=sysv
test -n "$verbose" && echo ' using echo ...\\c'
else
ECHON=none
test -n "$verbose" && echo ' using plain echo'
fi
echo checking for Emacs Lisp files
if test -n "$with_lispdir"; then
LISPDIR=${with_lispdir}
else
for f in ${prefix-/usr/local}/lib/emacs/site-lisp \
${prefix-/usr/local}/lib/emacs/lisp; do
if test -d $f; then
LISPDIR=$f
break
fi
done
fi
if test -z "$LISPDIR"; then
LISPDIR='$(prefix)/lib/emacs/lisp'
fi
test -n "$verbose" && echo " setting LISPDIR to ${LISPDIR}"
echo checking how to access passwd database
PASSWD="cat /etc/passwd"
if test -f /bin/domainname && test -n "`/bin/domainname`"; then
if test -f /usr/bin/niscat &&
/usr/bin/niscat passwd.org_dir > /dev/null 2>&1; then
PASSWD="/usr/bin/niscat passwd.org_dir"
elif test -f /usr/bin/ypcat && /usr/bin/ypcat passwd > /dev/null 2>&1; then
PASSWD="/usr/bin/ypcat passwd"
fi
fi
test -n "$verbose" && echo " setting PASSWD to ${PASSWD}"
GNATS_SITE=netbsd
GNATS_ADDR=gnats-bugs@NetBSD.ORG
SUBMITTER=net
DEFAULT_ORGANIZATION=
DEFAULT_RELEASE=
if test x/usr/lib:/usr/sbin:/usr/ucblib = x; then _PATH=$PATH; else _PATH=/usr/lib:/usr/sbin:/usr/ucblib; fi
if test -z "$SENDMAIL"; then
# Extract the first word of `sendmail', so it can be a program name with args.
set dummy sendmail; word=$2
echo checking for $word
IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:"
for dir in $_PATH; do
test -z "$dir" && dir=.
if test -f $dir/$word; then
SENDMAIL=$dir/$word
break
fi
done
IFS="$saveifs"
fi
test -n "$SENDMAIL" && test -n "$verbose" && echo " setting SENDMAIL to $SENDMAIL"
if test -n "$SENDMAIL" ; then
MAIL_AGENT="$SENDMAIL -oi -t"
else
MAIL_AGENT=false
fi
# Get GNATS_ROOT from environment, if possible
if test -n "$with_gnats_root"; then
GNATS_ROOT=$with_gnats_root
fi
if test -z "${GNATS_ROOT}"; then
GNATS_ROOT=${prefix-/usr/local}/lib/gnats/gnats-root
_PR=${GNATS_ROOT}
fi
if test x = x; then _PATH=$PATH; else _PATH=; fi
if test -z "$SEND_PR"; then
# Extract the first word of `send-pr', so it can be a program name with args.
set dummy send-pr; word=$2
echo checking for $word
IFS="${IFS= }"; saveifs="$IFS"; IFS="${IFS}:"
for dir in $_PATH; do
test -z "$dir" && dir=.
if test -f $dir/$word; then
SEND_PR=$dir/$word
break
fi
done
IFS="$saveifs"
fi
test -n "$SEND_PR" && test -n "$verbose" && echo " setting SEND_PR to $SEND_PR"
if test -n "${SEND_PR}"; then
test -n "${_PR}" && eval `grep '^GNATS_ROOT=' ${SEND_PR}`
eval `grep '^SUBMITTER=' ${SEND_PR}`
eval `egrep '^GNATS_(ADDR|SITE)=' ${SEND_PR}`
eval `egrep '^DEFAULT_ORGANIZATION=' ${SEND_PR}`
fi
# If the config file exists, it may have more recent info than send-pr
echo checking for GNATS configuration file
test -f ${GNATS_ROOT}/gnats-adm/config && . ${GNATS_ROOT}/gnats-adm/config
if test -n "${_PR}" -a "${GNATS_ROOT}" = "${_PR}"; then
GNATS_ROOT=
fi
if test -n "$verbose"; then
echo " setting GNATS_ROOT to $GNATS_ROOT"
echo " setting GNATS_SITE to $GNATS_SITE"
echo " setting GNATS_ADDR to $GNATS_ADDR"
echo " setting SUBMITTER to $SUBMITTER"
echo " setting DEFAULT_RELEASE to $DEFAULT_RELEASE"
echo " setting DEFAULT_ORGANIZATION to $DEFAULT_ORGANIZATION"
echo " setting MAIL_AGENT to $MAIL_AGENT"
fi
# Set default prefixes.
if test -n "$prefix"; then
test -z "$exec_prefix" && exec_prefix='${prefix}'
prsub="s%^prefix\\([ ]*\\)=\\([ ]*\\).*$%prefix\\1=\\2$prefix%"
fi
if test -n "$exec_prefix"; then
prsub="$prsub
s%^exec_prefix\\([ ]*\\)=\\([ ]*\\).*$%exec_prefix\\1=\\2$exec_prefix%"
fi
# Quote sed substitution magic chars in DEFS.
cat >conftest.def <<EOF
$DEFS
EOF
escape_ampersand_and_backslash='s%[&\\]%\\&%g'
DEFS=`sed "$escape_ampersand_and_backslash" <conftest.def`
rm -f conftest.def
# Substitute for predefined variables.
trap 'rm -f config.status; exit 1' 1 3 15
echo creating config.status
rm -f config.status
cat > config.status <<EOF
#!/bin/sh
# Generated automatically by configure.
# Run this file to recreate the current configuration.
# This directory was configured as follows,
# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
#
# $0 $configure_args
for arg
do
case "\$arg" in
-recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
echo running \${CONFIG_SHELL-/bin/sh} $0 $configure_args
exec \${CONFIG_SHELL-/bin/sh} $0 $configure_args ;;
*) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
esac
done
trap 'rm -f Makefile; exit 1' 1 3 15
GNATS_ROOT='$GNATS_ROOT'
GNATS_ADDR='$GNATS_ADDR'
GNATS_SITE='$GNATS_SITE'
DEFAULT_RELEASE='$DEFAULT_RELEASE'
DEFAULT_ORGANIZATION='$DEFAULT_ORGANIZATION'
MAIL_AGENT='$MAIL_AGENT'
SUBMITTER='$SUBMITTER'
ECHON='$ECHON'
LISPDIR='$LISPDIR'
PASSWD='$PASSWD'
SENDMAIL='$SENDMAIL'
SEND_PR='$SEND_PR'
LIBS='$LIBS'
srcdir='$srcdir'
DEFS='$DEFS'
prefix='$prefix'
exec_prefix='$exec_prefix'
prsub='$prsub'
extrasub='$extrasub'
EOF
cat >> config.status <<\EOF
top_srcdir=$srcdir
CONFIG_FILES=${CONFIG_FILES-"Makefile"}
for file in .. ${CONFIG_FILES}; do if test "x$file" != x..; then
srcdir=$top_srcdir
# Remove last slash and all that follows it. Not all systems have dirname.
dir=`echo $file|sed 's%/[^/][^/]*$%%'`
if test "$dir" != "$file"; then
test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
test ! -d $dir && mkdir $dir
fi
echo creating $file
rm -f $file
echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file
sed -e "
$prsub
$extrasub
s%@GNATS_ROOT@%$GNATS_ROOT%g
s%@GNATS_ADDR@%$GNATS_ADDR%g
s%@GNATS_SITE@%$GNATS_SITE%g
s%@DEFAULT_RELEASE@%$DEFAULT_RELEASE%g
s%@DEFAULT_ORGANIZATION@%$DEFAULT_ORGANIZATION%g
s%@MAIL_AGENT@%$MAIL_AGENT%g
s%@SUBMITTER@%$SUBMITTER%g
s%@ECHON@%$ECHON%g
s%@LISPDIR@%$LISPDIR%g
s%@PASSWD@%$PASSWD%g
s%@SENDMAIL@%$SENDMAIL%g
s%@SEND_PR@%$SEND_PR%g
s%@LIBS@%$LIBS%g
s%@srcdir@%$srcdir%g
s%@DEFS@%$DEFS%
" $top_srcdir/${file}.in >> $file
fi; done
exit 0
EOF
chmod +x config.status
${CONFIG_SHELL-/bin/sh} config.status