dnl Process this file with autoconf to produce a configure script.
AC_INIT(avmcapictrl.c)
AC_PREFIX_DEFAULT(/usr)

dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL

I4LCONFDIR=${I4LCONFDIR:-"/etc/isdn"}
I4LVERSION=${I4LVERSION:-"?.?"}
MANDATE=`grep CHECKIN avmcapictrl.man.in | awk '{print $4}'`

dnl Checks for libraries.

dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(fcntl.h sys/ioctl.h unistd.h)
AC_CHECK_HEADER(linux/isdn.h,,AC_MSG_ERROR("\nMissing linux/isdn.h. Kernel source installed?"))
AC_CHECK_HEADER(linux/b1lli.h,,AC_MSG_ERROR("\nMissing linux/b1lli.h. Kernel source installed?"))
AC_CHECK_HEADER(linux/capi.h,,AC_MSG_ERROR("\nMissing linux/capi.h. Kernel source installed?"))

dnl Checks for typedefs, structures, and compiler characteristics.

dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL
AC_CHECK_FUNCS(mmap)

AC_SUBST(INSTALL)
AC_SUBST(MANDATE)
AC_SUBST(I4LVERSION)
AC_OUTPUT(Makefile avmcapictrl.man)
