You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bforce/source/configure.in

147 lines
4.7 KiB
Plaintext

dnl Process this file with autoconf to produce a configure script.
dnl
dnl $Id$
dnl
#AC_INIT(bforce/bforce.c)
AC_INIT([bforce],[0.24.1],[zx@zxalexis.ru])
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'
SPOOLDIR=/var/spool/bforce
LOGDIR=/var/log/bforce
AC_ARG_WITH(owner, dnl
--with-owner=USER set possibility to run bforce from a USER (uucp),
[OWNER=$with_owner
])
AC_SUBST(OWNER)
AC_ARG_WITH(group, dnl
--with-group=GROUP set possibility to run bforce from a GROUP (news),
[GROUP=$with_group
])
AC_SUBST(GROUP)
AC_ARG_WITH(spooldir, dnl
--with-spooldir=SPOOLDIR set directory for spooler files (/var/spool/bforce),
[SPOOLDIR=$with_spooldir
])
AC_SUBST(SPOOLDIR)
AC_ARG_WITH(logdir, dnl
--with-logdir=LOGDIR set directory for logs (/var/log/bforce),
[LOGDIR=$with_logdir
])
AC_SUBST(LOGDIR)
AC_ARG_ENABLE(debug, [ --enable-debug enable debugging support (default)],
[if test $enableval = yes; then
AC_DEFINE([DEBUG], [1], [Enable debugging support])
fi], [AC_DEFINE([DEBUG], [1], [Enable debugging support])])
AC_ARG_ENABLE(dcd-control, [ --enable-watch-cd enable DCD line control (default)],
[if test $enableval = yes; then
AC_DEFINE([MODEM_WATCH_CARRIER], [1], [enable DCD line control])
fi], [AC_DEFINE([MODEM_WATCH_CARRIER], [1], [enable DCD line control])])
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], [1], [Hangup watchs for DCD line])
fi], [AC_DEFINE([MODEM_HANGUP_WATCH_CARRIER], [1], [Hangup watchs for DCD line])])
AC_ARG_ENABLE(log-passwd, [ --enable-log-passwd write session password to log (default)],
[if test $enableval = yes; then
AC_DEFINE([BFORCE_LOG_PASSWD], [1], [Write session password to log])
fi], [AC_DEFINE([BFORCE_LOG_PASSWD], [1], [Write session password to log])])
AC_ARG_ENABLE(csy-locks, [ --enable-csy-locks use '.csy' locks while dialing (default)],
[if test $enableval = yes; then
AC_DEFINE([BFORCE_USE_CSY], [1], [Use '.csy' locks while dialing])
fi], [AC_DEFINE([BFORCE_USE_CSY], [1], [Use '.csy' locks while dialing])])
AC_ARG_ENABLE(syslog, [ --enable-syslog use syslog for logging [experimental] (default)],
[if test $enableval = yes; then
AC_DEFINE([USE_SYSLOG], [1], [Use syslog for logging])
fi], [AC_DEFINE([USE_SYSLOG], [1], [Use syslog for logging])])
AC_ARG_ENABLE(netspool, [ --enable-netspool network attached inbound/outbound],
[if test $enableval = yes; then
AC_DEFINE([NETSPOOL], [1], [Use netspool])
fi], [AC_DEFINE([NETSPOOL], [1], [Use netspool])])
AC_ARG_ENABLE(buggy_emsi, [ --disable-buggy-emsi disable buggy emsi support (default)],
[if test $enableval = yes; then
AC_DEFINE([BUGGY_EMSI], [1], [Disable buggy emsi])
fi], [AC_DEFINE([BUGGY_EMSI], [0], [Enable buggy emsi])])
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"], [Directory for UUCP style locks])
AC_MSG_RESULT($lockdir)
])
dnl Some defaults
AC_PREFIX_DEFAULT(/usr/local/fido)
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 mkstemp)
AC_CHECK_FUNCS(rename statfs statvfs setproctitle)
AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=],[AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt])])
AC_SUBST([CLOCK_LIB])
AC_OUTPUT(Makefile)
dnl AC_OUTPUT(../debian/Makefile)