Get rid of including ../.config in Makefile

Now all configuration is done in configure.
Renamed CONFIG_CTRLCONF to CONFIG_ISDNCTRL_CONF and
added documentation for it.
This commit is contained in:
Fritz Elfert 1997-10-26 22:58:48 +00:00
parent ffeba2ecfb
commit 02ca09ba27
4 changed files with 126 additions and 29 deletions

View File

@ -125,6 +125,11 @@ CONFIG_ISDNCTRL_DEBUG
of the linklevel part. This feature may be helpful when debugging
drivers or the linklevel itself.
Enable config file option isdnctrl
CONFIG_ISDNCTRL_CONF
If enabled, an option to read/write configfiles is build into isdnctrl.
The manpage is extended automatically.
Build iprofd
CONFIG_IPROFD
If enabled, iprofd, a special daemon will be built. This daemon is

View File

@ -7,15 +7,10 @@
SHELL = /bin/sh
AWK = @AWK@
SED = @SED@
MANDIR = @CONFIG_MANDIR@
MANPAGES = ttyI.4 isdninfo.4 isdn_audio.4 isdn_cause.7
INSTALL_MAN = @INSTALL@ -o 0 -g 0 -m 0644
prefix = @prefix@
ifeq (../.config,$(wildcard ../.config))
include ../.config
mandir = $(CONFIG_MANDIR)
else
mandir = @mandir@
endif
%.4: %.man
MANDATE=`grep CHECKIN $< | $(AWK) '{print $$4}'`; \
@ -34,19 +29,25 @@ all: $(MANPAGES)
config:
@./configure
install:
Makefile: Makefile.in config.status
./config.status
config.status: configure
./config.status --recheck
install: $(MANPAGES) Makefile
@for i in $(MANPAGES) ; do \
MANSECT=`echo $$i | cut -d. -f2` ;\
MANDIR=$(mandir)/man$$MANSECT ;\
mkdir -p $$MANDIR ;\
$(INSTALL_MAN) $$i $$MANDIR/$$i ;\
DEST=$(MANDIR)/man$$MANSECT ;\
mkdir -p $$DEST ;\
$(INSTALL_MAN) $$i $$DEST/$$i ;\
done
uninstall:
uninstall: Makefile
for i in $(MANPAGES) ; do \
MANSECT=`echo $$i | cut -d. -f2` ;\
MANDIR=$(mandir)/man$$MANSECT ;\
rm -f $$MANDIR/$$i ;\
DEST=$(MANDIR)/man$$MANSECT ;\
rm -f $$DEST/$$i ;\
done
clean:

114
doc/configure vendored
View File

@ -1,7 +1,7 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf version 2.10
# Generated automatically using autoconf version 2.12
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
#
# This configure script is free software; the Free Software Foundation
@ -12,6 +12,8 @@ ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
ac_default_prefix=/usr
ac_help="$ac_help
--with-man=DIR Set manpage dir. [/usr/man]"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@ -50,6 +52,8 @@ mandir='${prefix}/man'
# Initialize some other variables.
subdirs=
MFLAGS= MAKEFLAGS=
# Maximum number of lines to put in a shell here document.
ac_max_here_lines=12
ac_prev=
for ac_option
@ -331,7 +335,7 @@ EOF
verbose=yes ;;
-version | --version | --versio | --versi | --vers)
echo "configure generated by autoconf version 2.10"
echo "configure generated by autoconf version 2.12"
exit 0 ;;
-with-* | --with-*)
@ -433,11 +437,14 @@ do
done
# NLS nuisances.
# Only set LANG and LC_ALL to C if already set.
# 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
# Only set these to C if already set. These must not be set unconditionally
# because not all systems understand e.g. LANG=C (notably SCO).
# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
# Non-C LC_CTYPE values break the ctype check.
if test "${LANG+set}" = set; then LANG=C; export LANG; fi
if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
@ -499,6 +506,7 @@ ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
@ -517,6 +525,7 @@ fi
I4LCONFDIR=${I4LCONFDIR:-"/etc/isdn"}
I4LVERSION=${I4LVERSION:-"?.?"}
CONFIG_MANDIR=${CONFIG_MANDIR:-"/usr/man"}
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
@ -548,11 +557,12 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:561: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
# Account for people who put trailing slashes in PATH elements.
case "$ac_dir/" in
@ -575,7 +585,7 @@ else
;;
esac
done
IFS="$ac_save_ifs"
IFS="$ac_save_IFS"
fi
if test "${ac_cv_path_install+set}" = set; then
@ -601,6 +611,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:615: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -631,6 +642,7 @@ done
# Extract the first word of "sed", so it can be a program name with args.
set dummy sed; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:646: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_SED'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -659,6 +671,18 @@ else
fi
# Check whether --with-man or --without-man was given.
if test "${with_man+set}" = set; then
withval="$with_man"
CONFIG_MANDIR="${withval}"
cat >> confdefs.h <<\EOF
#define CONFIG_MANDIR "${withval}"
EOF
fi
@ -681,11 +705,25 @@ cat > confcache <<\EOF
# --recheck option to rerun configure.
#
EOF
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
(set) 2>&1 |
sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
>> confcache
case `(ac_space=' '; set) 2>&1` in
*ac_space=\ *)
# `set' does not quote correctly, so add quotes (double-quote substitution
# turns \\\\ into \\, and sed turns \\ into \).
sed -n \
-e "s/'/'\\\\''/g" \
-e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
;;
*)
# `set' quotes correctly as required by POSIX, so do not add quotes.
sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
;;
esac >> confcache
if cmp -s $cache_file confcache; then
:
else
@ -752,7 +790,7 @@ do
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
echo "$CONFIG_STATUS generated by autoconf version 2.10"
echo "$CONFIG_STATUS generated by autoconf version 2.12"
exit 0 ;;
-help | --help | --hel | --he | --h)
echo "\$ac_cs_usage"; exit 0 ;;
@ -800,23 +838,60 @@ s%@SED@%$SED%g
s%@INSTALL@%$INSTALL%g
s%@I4LCONFDIR@%$I4LCONFDIR%g
s%@I4LVERSION@%$I4LVERSION%g
s%@CONFIG_MANDIR@%$CONFIG_MANDIR%g
CEOF
EOF
cat >> $CONFIG_STATUS <<\EOF
# Split the substitutions into bite-sized pieces for seds with
# small command number limits, like on Digital OSF/1 and HP-UX.
ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
ac_file=1 # Number of current file.
ac_beg=1 # First line for current file.
ac_end=$ac_max_sed_cmds # Line after last line for current file.
ac_more_lines=:
ac_sed_cmds=""
while $ac_more_lines; do
if test $ac_beg -gt 1; then
sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
else
sed "${ac_end}q" conftest.subs > conftest.s$ac_file
fi
if test ! -s conftest.s$ac_file; then
ac_more_lines=false
rm -f conftest.s$ac_file
else
if test -z "$ac_sed_cmds"; then
ac_sed_cmds="sed -f conftest.s$ac_file"
else
ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
fi
ac_file=`expr $ac_file + 1`
ac_beg=$ac_end
ac_end=`expr $ac_end + $ac_max_sed_cmds`
fi
done
if test -z "$ac_sed_cmds"; then
ac_sed_cmds=cat
fi
EOF
cat >> $CONFIG_STATUS <<EOF
CONFIG_FILES=\${CONFIG_FILES-"Makefile ttyI.man isdninfo.man isdn_cause.man isdn_audio.man"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
# Support "outfile[:infile]", defaulting infile="outfile.in".
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case "$ac_file" in
*:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
*:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
*) ac_file_in="${ac_file}.in" ;;
esac
# Adjust relative srcdir, etc. for subdirectories.
# Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
# Remove last slash and all that follows it. Not all systems have dirname.
ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
@ -844,6 +919,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
[/$]*) INSTALL="$ac_given_INSTALL" ;;
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
esac
echo creating "$ac_file"
rm -f "$ac_file"
configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
@ -852,16 +928,22 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
# $configure_input" ;;
*) ac_comsub= ;;
esac
ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
sed -e "$ac_comsub
s%@configure_input@%$configure_input%g
s%@srcdir@%$srcdir%g
s%@top_srcdir@%$top_srcdir%g
s%@INSTALL@%$INSTALL%g
" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
fi; done
rm -f conftest.subs
rm -f conftest.s*
EOF
cat >> $CONFIG_STATUS <<EOF
EOF
cat >> $CONFIG_STATUS <<\EOF
exit 0
EOF

View File

@ -4,15 +4,24 @@ AC_PREFIX_DEFAULT(/usr)
I4LCONFDIR=${I4LCONFDIR:-"/etc/isdn"}
I4LVERSION=${I4LVERSION:-"?.?"}
CONFIG_MANDIR=${CONFIG_MANDIR:-"/usr/man"}
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_AWK
AC_PATH_PROG(SED,sed)
dnl Optional man directory
AC_ARG_WITH(man,
[ --with-man=DIR Set manpage dir. [/usr/man]],
CONFIG_MANDIR="${withval}"
AC_DEFINE(CONFIG_MANDIR,"${withval}"),
)
AC_SUBST(INSTALL)
AC_SUBST(AWK)
AC_SUBST(SED)
AC_SUBST(I4LCONFDIR)
AC_SUBST(I4LVERSION)
AC_SUBST(CONFIG_MANDIR)
AC_OUTPUT(Makefile ttyI.man isdninfo.man isdn_cause.man isdn_audio.man)