From 9f20e906f87e9e187b6aaa4e35caf1951de3deca Mon Sep 17 00:00:00 2001 From: Evgeniy Kozhuhovskiy Date: Sun, 5 Jun 2005 16:56:42 +0000 Subject: [PATCH] added spooldir and logdir to configure --- source/ChangeLog | 5 +++++ source/Makefile.in | 4 ++-- source/configure | 37 ++++++++++++++++++++++++++++++++----- source/configure.in | 22 ++++++++++++++++++---- 4 files changed, 57 insertions(+), 11 deletions(-) diff --git a/source/ChangeLog b/source/ChangeLog index 055a490..afae3bb 100644 --- a/source/ChangeLog +++ b/source/ChangeLog @@ -1,3 +1,8 @@ +2005-06-05 Evgeniy Kozhuhovskiy + + * configure.in: added logdir and spooldir to ./configure + (thnx to max boyarov) + 2005-06-03 Evgeniy Kozhuhovskiy * configure.in: fixed warnings under *bsd (removed sys/mount.h diff --git a/source/Makefile.in b/source/Makefile.in index db412ee..bdad7d4 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -25,8 +25,8 @@ OWNER = @OWNER@ GROUP = @GROUP@ CONFDIR = @sysconfdir@ BINDIR = @bindir@ -LOGDIR = /var/log/bforce -SPOOLDIR = /var/spool/bforce +LOGDIR = @LOGDIR@ +SPOOLDIR = @SPOOLDIR@ DAEMON_LOGFILE = $(LOGDIR)/bf-daemon BFORCE_LOGFILE = $(LOGDIR)/bf-log diff --git a/source/configure b/source/configure index 3e99e95..c0282cb 100755 --- a/source/configure +++ b/source/configure @@ -311,7 +311,7 @@ ac_includes_default="\ # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OWNER GROUP YACC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os OWNER GROUP SPOOLDIR LOGDIR YACC CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CPP EGREP LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -854,13 +854,15 @@ Optional Features: --enable-hangup-watch-cd hangup watchs for DCD line (default) --enable-log-passwd write session password to log (default) --enable-csy-locks use '.csy' locks while dialing (default) - --disable-syslog use syslog for logging (experimental) (default) + --enable-syslog use syslog for logging experimental (default) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-owner=USER set possibility to run bforce from a USER (uucp) --with-group=GROUP set possibility to run bforce from a GROUP (news) + --with-spooldir=SPOOLDIR set directory for spooler files (/var/spool/bforce) + --with-logdir=LOGDIR set directory for logs (/var/log/bforce) --with-uucp-lockdir specify directory for UUCP style locks Some influential environment variables: @@ -1453,6 +1455,9 @@ fi # OWNER='uucp' GROUP='news' +SPOOLDIR=/var/spool/bforce +LOGDIR=/var/log/bforce + # Check whether --with-owner or --without-owner was given. if test "${with_owner+set}" = set; then @@ -1471,6 +1476,23 @@ fi; +# Check whether --with-spooldir or --without-spooldir was given. +if test "${with_spooldir+set}" = set; then + withval="$with_spooldir" + SPOOLDIR=$with_spooldir + +fi; + + + +# Check whether --with-logdir or --without-logdir was given. +if test "${with_logdir+set}" = set; then + withval="$with_logdir" + LOGDIR=$with_logdir + +fi; + + # Check whether --enable-debug or --disable-debug was given. if test "${enable_debug+set}" = set; then enableval="$enable_debug" @@ -1566,7 +1588,7 @@ fi; # Check whether --enable-syslog or --disable-syslog was given. if test "${enable_syslog+set}" = set; then enableval="$enable_syslog" - if test $enableval = no; then + if test $enableval = yes; then cat >>confdefs.h <<\_ACEOF #define USE_SYSLOG 1 @@ -1576,7 +1598,7 @@ _ACEOF else cat >>confdefs.h <<\_ACEOF -#define USE_SYSLOG 0 +#define USE_SYSLOG 1 _ACEOF fi; @@ -3847,7 +3869,8 @@ done -for ac_header in sys/select.h sys/param.h + +for ac_header in sys/select.h sys/param.h sys/mount.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then @@ -5821,6 +5844,8 @@ s,@target_vendor@,$target_vendor,;t t s,@target_os@,$target_os,;t t s,@OWNER@,$OWNER,;t t s,@GROUP@,$GROUP,;t t +s,@SPOOLDIR@,$SPOOLDIR,;t t +s,@LOGDIR@,$LOGDIR,;t t s,@YACC@,$YACC,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t @@ -6955,6 +6980,8 @@ s,@target_vendor@,$target_vendor,;t t s,@target_os@,$target_os,;t t s,@OWNER@,$OWNER,;t t s,@GROUP@,$GROUP,;t t +s,@SPOOLDIR@,$SPOOLDIR,;t t +s,@LOGDIR@,$LOGDIR,;t t s,@YACC@,$YACC,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t diff --git a/source/configure.in b/source/configure.in index 95f027a..6f1f4d3 100644 --- a/source/configure.in +++ b/source/configure.in @@ -24,6 +24,9 @@ fi # 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 @@ -35,6 +38,17 @@ AC_ARG_WITH(group, dnl ]) 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 @@ -63,10 +77,10 @@ AC_ARG_ENABLE(csy-locks, [ --enable-csy-locks use '.csy' locks while 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, [ --disable-syslog use syslog for logging (experimental) (default)], - [if test $enableval = no; then +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], [0], [Use syslog for logging])]) + fi], [AC_DEFINE([USE_SYSLOG], [1], [Use syslog for logging])]) AC_ARG_WITH(uucp-lockdir, [ --with-uucp-lockdir specify directory for UUCP style locks], [AC_DEFINE_UNQUOTED(BFORCE_LOCK_DIR, "$withval")], @@ -98,7 +112,7 @@ 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) +AC_CHECK_HEADERS(sys/select.h sys/param.h sys/mount.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST