Get rid of including ../.config in Makefile
Now all configuration is done in configure. Updated manpage.
This commit is contained in:
parent
05c7c2164d
commit
8b8e2b0e94
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile.in,v 1.3 1997/03/24 01:34:43 fritz Exp $
|
||||
# $Id: Makefile.in,v 1.4 1997/10/26 23:02:52 fritz Exp $
|
||||
#
|
||||
# Makefile for iMON
|
||||
#
|
||||
|
@ -8,32 +8,26 @@
|
|||
#
|
||||
SHELL = /bin/sh
|
||||
CFLAGS = -Wall -O2
|
||||
INCLUDES = -I. $(ISDN_INCLUDE)
|
||||
INCLUDES = -I. -I@CONFIG_KERNELDIR@/include
|
||||
LDFLAGS = -L../lib @LIBS@
|
||||
PROGRAM = imon
|
||||
MODULES = imon.o
|
||||
MANPAGE = imon.8
|
||||
HEADERS = config.h
|
||||
MANDIR = @CONFIG_MANDIR@
|
||||
SBINDIR = @CONFIG_SBINDIR@
|
||||
MAN8DIR = $(MANDIR)/man8
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = $(INSTALL) -o 0 -g 0 -m 0750
|
||||
INSTALL_MAN = $(INSTALL) -o 0 -g 0 -m 0644
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
ifeq (../.config,$(wildcard ../.config))
|
||||
include ../.config
|
||||
SBINDIR = $(CONFIG_SBINDIR)
|
||||
mandir = $(CONFIG_MANDIR)
|
||||
else
|
||||
SBINDIR = /sbin
|
||||
mandir = @mandir@
|
||||
endif
|
||||
MAN8DIR = $(mandir)/man8
|
||||
CC = @CC@
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o
|
||||
|
||||
%.o: %.c
|
||||
%.o: %.c Makefile
|
||||
$(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $<
|
||||
|
||||
all: $(PROGRAM)
|
||||
|
@ -44,6 +38,12 @@ config:
|
|||
config.h: config.h.in
|
||||
@./configure
|
||||
|
||||
Makefile: Makefile.in config.status
|
||||
./config.status
|
||||
|
||||
config.status: configure
|
||||
./config.status --recheck
|
||||
|
||||
$(MODULES): $(HEADERS)
|
||||
|
||||
$(PROGRAM): $(MODULES)
|
||||
|
@ -66,4 +66,4 @@ clean:
|
|||
rm -f *.o *~ $(PROGRAM)
|
||||
|
||||
distclean: clean
|
||||
rm -f config.h config.status config.cache config.log Makefile
|
||||
rm -f config.h config.status config.cache config.log *.man Makefile
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
dnl
|
||||
dnl Try finding linux sourcetree
|
||||
dnl
|
||||
|
||||
AC_DEFUN(AC_FIND_KERNEL, [
|
||||
OLD_CPPFLAGS="$CPPFLAGS"
|
||||
lxdir="no"
|
||||
eval tst_kerneldir=$CONFIG_KERNELDIR
|
||||
|
||||
AC_ARG_WITH(kernel,
|
||||
[ --with-kernel=DIR Set kernel source directory [/usr/src/linux]],
|
||||
DOTEST="y"; tst_kerneldir="${withval}")
|
||||
|
||||
if test "$DOTEST" = "y" || test "$CONFIG_KERNELDIR" != "" ; then
|
||||
AC_MSG_CHECKING([for linux kernel source in ${tst_kerneldir}])
|
||||
CPPFLAGS="-nostdinc -I${tst_kerneldir}/drivers/isdn"
|
||||
AC_TRY_CPP([#include <isdn_common.h>], lxdir=${tst_kerneldir},
|
||||
AC_MSG_RESULT("no"))
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
AC_MSG_CHECKING([for linux kernel source in /usr/src/linux])
|
||||
CPPFLAGS="-nostdinc -I/usr/src/linux/drivers/isdn"
|
||||
AC_TRY_CPP([#include <isdn_common.h>], lxdir=/usr/src/linux)
|
||||
fi
|
||||
if test "$lxdir" = "no" ; then
|
||||
AC_MSG_RESULT("$lxdir")
|
||||
AC_MSG_CHECKING([for linux kernel source in /usr/local/src/linux])
|
||||
CPPFLAGS="-nostdinc -I/usr/local/src/linux/drivers/isdn"
|
||||
AC_TRY_CPP([#include <isdn_common.h>], lxdir=/usr/local/src/linux)
|
||||
fi
|
||||
if test "$lxdir" != "no" ; then
|
||||
AC_MSG_RESULT("yes")
|
||||
else
|
||||
lxdir=""
|
||||
AC_MSG_ERROR("Kernel source not found. You MUST specify a correct path to the linux source in the configuration.")
|
||||
fi
|
||||
CONFIG_KERNELDIR="$lxdir"
|
||||
CPPFLAGS="$OLD_CPPFLAGS"
|
||||
AC_DEFINE_UNQUOTED(CONFIG_KERNELDIR,"$lxdir")
|
||||
AC_SUBST(CONFIG_KERNELDIR)
|
||||
])
|
File diff suppressed because it is too large
Load Diff
|
@ -3,6 +3,12 @@ AC_INIT(imon.c)
|
|||
AC_CONFIG_HEADER(config.h)
|
||||
AC_PREFIX_DEFAULT(/usr)
|
||||
|
||||
I4LVERSION=${I4LVERSION:-"?.?"}
|
||||
CONFIG_MANDIR=`eval echo ${CONFIG_MANDIR:-"/usr/man"}`
|
||||
CONFIG_SBINDIR=`eval echo ${CONFIG_SBINDIR:-"/sbin"}`
|
||||
CONFIG_KERNELDIR=`eval echo ${CONFIG_KERNELDIR:-"/usr/src/linux"}`
|
||||
MANDATE=`grep CHECKIN imon.man.in | awk '{print $4}'`
|
||||
|
||||
dnl Checks for programs.
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_CC
|
||||
|
@ -22,7 +28,10 @@ AC_CHECK_HEADERS(ncurses.h,,
|
|||
AC_MSG_ERROR("Missing \(n\)curses.h")))))
|
||||
|
||||
dnl Check for linux/isdn.h, give up if not found.
|
||||
AC_CHECK_HEADER(linux/isdn.h,,AC_MSG_ERROR("Missing linux/isdn.h. Kernel source installed?"))
|
||||
AC_FIND_KERNEL
|
||||
AC_CHECK_HEADER($CONFIG_KERNELDIR/include/linux/isdn.h,,
|
||||
AC_MSG_ERROR("Missing $CONFIG_KERNELDIR/include/linux/isdn.h. Kernel source installed?")
|
||||
)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_HEADER_TIME
|
||||
|
@ -32,5 +41,24 @@ dnl Checks for library functions.
|
|||
AC_TYPE_SIGNAL
|
||||
AC_CHECK_FUNCS(select)
|
||||
|
||||
dnl Optional sbin directory
|
||||
AC_ARG_WITH(sbin,
|
||||
[ --with-sbin=DIR Set dir where binary is istalled. [/sbin]],
|
||||
CONFIG_SBINDIR="${withval}"
|
||||
AC_DEFINE(CONFIG_SBINDIR,"${withval}"),
|
||||
)
|
||||
|
||||
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_OUTPUT(Makefile)
|
||||
AC_SUBST(MANDATE)
|
||||
AC_SUBST(CONFIG_KERNELDIR)
|
||||
AC_SUBST(CONFIG_SBINDIR)
|
||||
AC_SUBST(CONFIG_MANDIR)
|
||||
AC_SUBST(I4LVERSION)
|
||||
AC_OUTPUT(Makefile imon.man)
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
.TH IMON 8 "15 January 1997"
|
||||
.UC 4
|
||||
.SH NAME
|
||||
imon \- watch ISDN activities
|
||||
.SH SYNOPSIS
|
||||
imon [-q] [-p phonebook]
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
.I imon
|
||||
is tty based utility for watching ISDN activity.
|
||||
.LP
|
||||
.SH OPTIONS
|
||||
.TP 5
|
||||
.B -q
|
||||
If this option is given, the facility of terminatig the program by
|
||||
pressing 'Q' is disabled and the signals SIGHUP and SIGINT are caught.
|
||||
This option is intended for starting imon from within an rc script
|
||||
at boot time.
|
||||
.LP
|
||||
.TP 5
|
||||
.B -p phonebook
|
||||
is used to supply imon with a phonebook file. A phonebook file is very
|
||||
simple. Every line has two elements separated by a TAB. The first element
|
||||
is a phone number which can contain wildcards. The second element is a
|
||||
descriptive string. For each active connection, this string is shown
|
||||
instead the phone number. Pressing 'S' toggles between display of strings
|
||||
and phone numbers. Pressing 'R' rereads the phonebook.
|
||||
.LP
|
||||
.SH AUTHOR
|
||||
Fritz Elfert <fritz@wuemaus.franken.de>
|
||||
.LP
|
||||
.SH SEE ALSO
|
||||
.I ttyI\c
|
||||
\&(4),
|
||||
.I isdnctrl\c
|
||||
\&(8),
|
||||
.I telesctrl\c
|
||||
\&(8),
|
||||
.I isdninfo\c
|
||||
\&(4).
|
|
@ -0,0 +1,52 @@
|
|||
.\" $Id: imon.man.in,v 1.1 1997/10/26 23:02:56 fritz Exp $
|
||||
.\"
|
||||
.\" CHECKIN $Date: 1997/10/26 23:02:56 $
|
||||
.\"
|
||||
.\" Process this file with
|
||||
.\" groff -man -Tascii imon.8 for ASCII output, or
|
||||
.\" groff -man -Tps imon.8 for PostScript output
|
||||
.\"
|
||||
.TH IMON 8 "@MANDATE@" isdn4k-utils-@I4LVERSION@ "Linux System Administration"
|
||||
.SH NAME
|
||||
imon \- watch ISDN activities
|
||||
.SH SYNOPSIS
|
||||
.BI "imon [ -q] [-p " phonebook ]
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
.I imon
|
||||
is a ncurses based utility for watching ISDN activity.
|
||||
.LP
|
||||
.SH OPTIONS
|
||||
.TP 5
|
||||
.B -q
|
||||
If this option is given, the facility of terminatig the program by
|
||||
pressing 'Q' is disabled and the signals SIGHUP and SIGINT are caught.
|
||||
This option is intended for starting imon from within an rc script
|
||||
with redirecting input/output to some otherwise unused virtual console
|
||||
at boot time.
|
||||
.LP
|
||||
.TP 5
|
||||
.BI -p " phonebook"
|
||||
is used to supply imon with a
|
||||
.I phonebook
|
||||
file. The format of a
|
||||
.I phonebook
|
||||
file is very
|
||||
simple: Every line has two elements separated by a
|
||||
.BR TAB .
|
||||
The first element is a phone number which can contain wildcards.
|
||||
The second element is a descriptive string. For each active connection,
|
||||
this string is shown instead the phone number. Pressing 'S' toggles
|
||||
between display of strings and phone numbers. Pressing 'R' rereads the
|
||||
phonebook file in case of changes during program execution.
|
||||
.LP
|
||||
.SH AUTHOR
|
||||
Fritz Elfert <fritz@wuemaus.franken.de>
|
||||
.LP
|
||||
.SH SEE ALSO
|
||||
.I ttyI\c
|
||||
\&(4),
|
||||
.I isdnctrl\c
|
||||
\&(8),
|
||||
.I isdninfo\c
|
||||
\&(4).
|
Loading…
Reference in New Issue