|
|
|
dnl Process this file with autoconf to produce a configure script.
|
|
|
|
dnl
|
|
|
|
dnl $Id$
|
|
|
|
dnl
|
|
|
|
#AC_INIT(bforce/bforce.c)
|
|
|
|
AC_INIT([bforce],[0.22.8.ugenk2],[ugenk@tut.by])
|
|
|
|
AC_CONFIG_HEADER(include/config.h)
|
|
|
|
AC_CANONICAL_SYSTEM
|
|
|
|
dnl # Minimum Autoconf version required.
|
|
|
|
AC_PREREQ(2.50)
|
|
|
|
|
|
|
|
###############
|
|
|
|
# Setup version
|
|
|
|
###############
|
|
|
|
|
|
|
|
if [ test -f $srcdir/.version ]; then
|
|
|
|
AC_DEFINE_UNQUOTED(RELEASE_VERSION, "`cat $srcdir/.version`")
|
|
|
|
else
|
|
|
|
AC_DEFINE(RELEASE_VERSION, "?.?")
|
|
|
|
fi
|
|
|
|
|
|
|
|
###################
|
|
|
|
# Optional features
|
|
|
|
#
|
|
|
|
OWNER='uucp'
|
|
|
|
GROUP='news'
|
|
|
|
AC_ARG_WITH(owner, dnl
|
|
|
|
--with-owner=USER set possibility to run bforce from a USER (uucp),
|
|
|
|
)
|
|
|
|
AC_SUBST(OWNER)
|
|
|
|
AC_ARG_WITH(group, dnl
|
|
|
|
--with-group=GROUP set possibility to run bforce from a GROUP (news),
|
|
|
|
)
|
|
|
|
AC_SUBST(GROUP)
|
|
|
|
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(debug, [ --enable-debug enable debugging support (default)],
|
|
|
|
[if test $enableval = yes; then
|
|
|
|
AC_DEFINE(DEBUG)
|
|
|
|
fi], [AC_DEFINE(DEBUG)])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(dcd-control, [ --enable-watch-cd enable DCD line control (default)],
|
|
|
|
[if test $enableval = yes; then
|
|
|
|
AC_DEFINE(MODEM_WATCH_CARRIER)
|
|
|
|
fi], [AC_DEFINE(MODEM_WATCH_CARRIER)])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(hangup-watch-cd, [ --enable-hangup-watch-cd hangup watchs for DCD line (default)],
|
|
|
|
[if test $enableval = yes; then
|
|
|
|
AC_DEFINE(MODEM_HANGUP_WATCH_CARRIER)
|
|
|
|
fi], [AC_DEFINE(MODEM_HANGUP_WATCH_CARRIER)])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(log-passwd, [ --enable-log-passwd write session password to log (default)],
|
|
|
|
[if test $enableval = yes; then
|
|
|
|
AC_DEFINE(BFORCE_LOG_PASSWD)
|
|
|
|
fi], [AC_DEFINE(BFORCE_LOG_PASSWD)])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(csy-locks, [ --enable-csy-locks use '.csy' locks while dialing (default)],
|
|
|
|
[if test $enableval = yes; then
|
|
|
|
AC_DEFINE(BFORCE_USE_CSY)
|
|
|
|
fi], [AC_DEFINE(BFORCE_USE_CSY)])
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(syslog, [ --enable-syslog use syslog for logging [experimental] (default)],
|
|
|
|
[if test $enableval = yes; then
|
|
|
|
AC_DEFINE(USE_SYSLOG)
|
|
|
|
fi], [AC_DEFINE(USE_SYSLOG)])
|
|
|
|
|
|
|
|
AC_ARG_WITH(uucp-lockdir, [ --with-uucp-lockdir specify directory for UUCP style locks],
|
|
|
|
[AC_DEFINE_UNQUOTED(BFORCE_LOCK_DIR, "$withval")],
|
|
|
|
[AC_MSG_CHECKING("UUCP lock files directory")
|
|
|
|
if test -d /var/lock/serial ; then
|
|
|
|
lockdir=/var/lock/serial/
|
|
|
|
elif test -d /var/spool/lock ; then
|
|
|
|
lockdir=/var/spool/lock/
|
|
|
|
else
|
|
|
|
lockdir=/var/lock/
|
|
|
|
fi
|
|
|
|
AC_DEFINE_UNQUOTED(BFORCE_LOCK_DIR, "$lockdir")
|
|
|
|
AC_MSG_RESULT("$lockdir")
|
|
|
|
])
|
|
|
|
|
|
|
|
dnl Checks for programs.
|
|
|
|
AC_PROG_YACC
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
|
|
|
|
dnl Checks for libraries.
|
|
|
|
|
|
|
|
dnl Checks for header files.
|
|
|
|
AC_HEADER_DIRENT
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_HEADER_SYS_WAIT
|
|
|
|
AC_CHECK_HEADERS(fcntl.h sys/file.h sys/ioctl.h sys/time.h unistd.h)
|
|
|
|
AC_CHECK_HEADERS(termios.h sys/termiox.h sys/vfs.h sys/statfs.h sys/statvfs.h)
|
|
|
|
AC_CHECK_HEADERS(sys/select.h sys/param.h sys/mount.h)
|
|
|
|
|
|
|
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_C_CONST
|
|
|
|
AC_TYPE_MODE_T
|
|
|
|
AC_TYPE_PID_T
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
AC_HEADER_TIME
|
|
|
|
AC_STRUCT_TM
|
|
|
|
|
|
|
|
dnl Checks for library functions.
|
|
|
|
AC_FUNC_GETPGRP
|
|
|
|
AC_PROG_GCC_TRADITIONAL
|
|
|
|
AC_FUNC_SETVBUF_REVERSED
|
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
AC_FUNC_VPRINTF
|
|
|
|
AC_CHECK_FUNCS(mkdir mktime select socket strspn strcasecmp)
|
|
|
|
AC_CHECK_FUNCS(rename statfs statvfs setproctitle)
|
|
|
|
|
|
|
|
AC_OUTPUT(Makefile)
|
|
|
|
AC_OUTPUT(../debian/Makefile)
|