capifax/configure.ac: updated from configure.in

* rename configure.in to configure.ac for recent autotools
* require autoconf 2.68
* update obsolete macros
* quote arguments to AC_../AM_.. macros
* remove unneeded options --with-sbin / --with-man:
  --sbindir / --mandir serve exactly the same purpose
This commit is contained in:
Peter Marschall 2012-04-21 09:53:22 +02:00
parent 9c0455514d
commit dfe464fba2
2 changed files with 31 additions and 47 deletions

31
capifax/configure.ac Normal file
View File

@ -0,0 +1,31 @@
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ([2.68])
AC_INIT([capifax], [1.0])
AM_INIT_AUTOMAKE
AC_PREFIX_DEFAULT([/usr])
CONFIG_SBINDIR=${sbindir:-"/sbin"}
CONFIG_MANDIR=${mandir:-"/usr/man"}
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(sys/ioctl.h unistd.h)
AC_CHECK_FILE([../capi20/capi20.h], CPPFLAGS="-I ../capi20 $CPPFLAGS")
AC_CHECK_HEADER([capi20.h],[],[AC_MSG_ERROR([capi20.h not found])])
dnl Checks for typedefs, structures, and compiler characteristics.
CS_TEST_ALERT
CS_TEST_GLOBALCONFIG
dnl Define which variables to substitute & which files to generate
AC_SUBST(CONFIG_SBINDIR)
AC_SUBST(CONFIG_MANDIR)
AM_CONFIG_HEADER(config.h)
AC_OUTPUT(Makefile)

View File

@ -1,47 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(capifax.c)
AM_INIT_AUTOMAKE(capifax, 1.0)
AC_PREFIX_DEFAULT(/usr)
CONFIG_SBINDIR=${CONFIG_SBINDIR:-"/sbin"}
CONFIG_MANDIR=${CONFIG_MANDIR:-"/usr/man"}
#MANDATE=`grep CHECKIN isdnctrl.man.in | awk '{print $4}'`
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
dnl Checks for libraries.
dnl Checks for header files.
AC_HEADER_STDC
dnl capi20.h not used AC_CHECK_HEADERS(sys/ioctl.h unistd.h capi20.h)
AC_CHECK_HEADERS(sys/ioctl.h unistd.h)
dnl Checks for typedefs, structures, and compiler characteristics.
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}", [capifax sbin directory]),
)
dnl Optional man directory
AC_ARG_WITH(man,
[ --with-man=DIR Set manpage dir. [/usr/man]],
CONFIG_MANDIR="${withval}"
AC_DEFINE(CONFIG_MANDIR,"${withval}", [capifax manual directory]),
)
AC_CHECK_FILE([../capi20/capi20.h],CPPFLAGS="-I ../capi20 $CPPFLAGS")
AC_CHECK_HEADER([capi20.h],[],[AC_MSG_ERROR([capi20.h not found])])
CS_TEST_ALERT
CS_TEST_GLOBALCONFIG
AC_SUBST(INSTALL)
AC_SUBST(CONFIG_SBINDIR)
AC_SUBST(CONFIG_MANDIR)
AM_CONFIG_HEADER(config.h)
AC_OUTPUT(Makefile)