Backward compatible to older driver versions.
This commit is contained in:
parent
f2babb0690
commit
afe9f2a1e5
|
@ -23,7 +23,7 @@ INSTALL_PROGRAM = $(INSTALL) -o 0 -g 0 -m 0750
|
|||
INSTALL_DATA = $(INSTALL) -o 0 -g 0 -m 0644
|
||||
INSTALL_MAN = $(INSTALL) -o 0 -g 0 -m 0644
|
||||
CC = @CC@
|
||||
COPTS = -D__DATADIR__=\"$(shell echo $(DESTDIR)$(CONFIG_DATADIR))\"
|
||||
COPTS = -D__DATADIR__=\"$(shell echo $(DESTDIR)$(DATADIR))\"
|
||||
|
||||
ifeq ("@CONFIG_EICONCTRL_DEBUG@","y")
|
||||
COPTS += -D__DEBUGVAR__
|
||||
|
@ -70,4 +70,4 @@ clean:
|
|||
rm -f *.o *~ $(PROGRAM)
|
||||
|
||||
distclean: clean
|
||||
rm -f config.status config.cache config.log Makefile eiconctrl.man
|
||||
rm -f config.status config.cache config.log config.h Makefile eiconctrl.man
|
||||
|
|
|
@ -1 +1,21 @@
|
|||
sinclude(../etc/ackernel.m4)dnl
|
||||
|
||||
dnl
|
||||
dnl Check for XLOG
|
||||
dnl
|
||||
|
||||
AC_DEFUN(AC_CHECK_XLOG, [
|
||||
OLD_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="-nostdinc -I${CONFIG_KERNELDIR} -I/usr/include"
|
||||
have_xlog="no"
|
||||
AC_MSG_CHECKING([for XLOG in ${CONFIG_KERNELDIR}/drivers/isdn/eicon/eicon.h])
|
||||
AC_TRY_COMPILE([#include <linux/types.h>
|
||||
#include <drivers/isdn/eicon/eicon.h>],int x = XLOG_OK;,have_xlog="yes",)
|
||||
AC_MSG_RESULT("${have_xlog}")
|
||||
CPPFLAGS="$OLD_CPPFLAGS"
|
||||
if test "$have_xlog" != "no" ; then
|
||||
AC_DEFINE(HAVE_XLOG)
|
||||
fi
|
||||
AC_SUBST(HAVE_XLOG)
|
||||
])
|
||||
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
/* define if we have XLOG capability */
|
||||
#undef HAVE_XLOG
|
||||
|
||||
/* Define if you have the <curses.h> header file. */
|
||||
#undef HAVE_CURSES_H
|
||||
|
||||
/* Define if you have the <curses/ncurses.h> header file. */
|
||||
#undef HAVE_CURSES_NCURSES_H
|
||||
|
||||
/* Define if you have the <ncurses.h> header file. */
|
||||
#undef HAVE_NCURSES_H
|
||||
|
||||
/* Define if you have the <ncurses/curses.h> header file. */
|
||||
#undef HAVE_NCURSES_CURSES_H
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -15,21 +15,30 @@ AC_PROG_INSTALL
|
|||
AC_PROG_CC
|
||||
|
||||
dnl Checks for libraries.
|
||||
AC_CHECK_LIB(ncurses, newpad,,
|
||||
AC_CHECK_LIB(curses, newpad,,
|
||||
AC_MSG_ERROR("Missing ncurses library")))
|
||||
|
||||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
|
||||
AC_CHECK_HEADERS(ncurses.h,,
|
||||
AC_CHECK_HEADERS(ncurses/curses.h,,
|
||||
AC_CHECK_HEADERS(curses/ncurses.h,,
|
||||
AC_CHECK_HEADERS(curses.h,,
|
||||
AC_MSG_ERROR("Missing \(n\)curses.h")))))
|
||||
|
||||
dnl Find current kernel source
|
||||
AC_FIND_KERNEL
|
||||
AC_CHECK_HEADERS($CONFIG_KERNELDIR/include/linux/isdn.h,,
|
||||
AC_CHECK_HEADER($CONFIG_KERNELDIR/include/linux/isdn.h,,
|
||||
AC_MSG_ERROR("$CONFIG_KERNELDIR/include/linux/isdn.h missing. Kernel installed?")
|
||||
)
|
||||
AC_CHECK_HEADERS($CONFIG_KERNELDIR/drivers/isdn/eicon/eicon.h,,
|
||||
AC_CHECK_HEADER($CONFIG_KERNELDIR/drivers/isdn/eicon/eicon.h,,
|
||||
AC_MSG_ERROR("$CONFIG_KERNELDIR/drivers/isdn/eicon/eicon.h missing. Kernel installed?")
|
||||
)
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_CHECK_XLOG
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_PROG_GCC_TRADITIONAL
|
||||
|
@ -70,4 +79,5 @@ AC_SUBST(CONFIG_KERNELDIR)
|
|||
AC_SUBST(CONFIG_SBINDIR)
|
||||
AC_SUBST(CONFIG_MANDIR)
|
||||
AC_SUBST(I4LVERSION)
|
||||
AC_CONFIG_HEADER(config.h)
|
||||
AC_OUTPUT(Makefile eiconctrl.man)
|
||||
|
|
|
@ -21,6 +21,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*
|
||||
* $Log$
|
||||
* Revision 1.7 1999/09/06 08:03:24 fritz
|
||||
* Changed my mail-address.
|
||||
*
|
||||
* Revision 1.6 1999/08/18 20:20:45 armin
|
||||
* Added XLOG functions for all cards.
|
||||
*
|
||||
|
@ -45,6 +48,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
@ -55,7 +60,18 @@
|
|||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include <signal.h>
|
||||
#include <ncurses.h>
|
||||
#ifdef HAVE_NCURSES_H
|
||||
# include <ncurses.h>
|
||||
#endif
|
||||
#ifdef HAVE_CURSES_H
|
||||
# include <curses.h>
|
||||
#endif
|
||||
#ifdef HAVE_CURSES_NCURSES_H
|
||||
# include <curses/ncurses.h>
|
||||
#endif
|
||||
#ifdef HAVE_NCURSES_CURSES_H
|
||||
# include <ncurses/curses.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <linux/types.h>
|
||||
|
@ -119,6 +135,7 @@ char *spid_state[] =
|
|||
};
|
||||
|
||||
|
||||
#ifdef HAVE_XLOG
|
||||
/*********** XLOG stuff **********/
|
||||
|
||||
#define byte __u8
|
||||
|
@ -1144,7 +1161,7 @@ void spid_event(FILE * stream, struct msg_s * message, word code)
|
|||
}
|
||||
|
||||
/*********** XLOG stuff end **********/
|
||||
|
||||
#endif
|
||||
|
||||
void usage() {
|
||||
fprintf(stderr,"usage: %s add <DriverID> <membase> <irq> (add card)\n",cmd);
|
||||
|
@ -1153,7 +1170,9 @@ void usage() {
|
|||
fprintf(stderr," or: %s [-d <DriverID>] [-v] load <protocol> [options]\n",cmd);
|
||||
fprintf(stderr," or: %s [-d <DriverID>] debug [<debug value>]\n",cmd);
|
||||
fprintf(stderr," or: %s [-d <DriverID>] manage [read|exec <path>] (management-tool)\n",cmd);
|
||||
#ifdef HAVE_XLOG
|
||||
fprintf(stderr," or: %s [-d <DriverID>] xlog [cont] (request XLOG)\n",cmd);
|
||||
#endif
|
||||
fprintf(stderr,"load firmware:\n");
|
||||
fprintf(stderr," basics : -d <DriverID> ID defined when eicon module was loaded/card added\n");
|
||||
fprintf(stderr," : -v verbose\n");
|
||||
|
@ -2460,6 +2479,7 @@ int main(int argc, char **argv) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef HAVE_XLOG
|
||||
if (!strcmp(argv[arg_ofs], "xlog")) {
|
||||
int cont = 0;
|
||||
int ii;
|
||||
|
@ -2579,6 +2599,7 @@ int main(int argc, char **argv) {
|
|||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!strcmp(argv[arg_ofs], "manage")) {
|
||||
mb = malloc(sizeof(eicon_manifbuf));
|
||||
|
|
Loading…
Reference in New Issue