From: Amos Jeffries Date: Mon, 13 Oct 2008 09:41:25 +0000 (+1300) Subject: Add configure option --with-logdir=PATH for change of the log directory X-Git-Tag: SQUID_3_2_0_1~1410 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=c8d2dc9bca4a6878cd22224deb945b8ce015b548;p=thirdparty%2Fsquid.git Add configure option --with-logdir=PATH for change of the log directory Not all OS and builds can cope with the BSD /var/logs default. This lets users and maintainers set OS-dependant log location without needing to patch and bootstrap the code. --- diff --git a/configure.in b/configure.in index 1587484b17..00dc1f5f20 100755 --- a/configure.in +++ b/configure.in @@ -167,6 +167,21 @@ AC_ARG_WITH(default-user, ) AC_SUBST(CACHE_EFFECTIVE_USER) +DEFAULT_LOG_DIR="$localstatedir/logs" +AC_ARG_WITH(logdir, + [ --with-logdir=PATH Default location for squid logs. default: $DEFAULT_LOG_DIR], + [ case $withval in + yes|no) + AC_MSG_ERROR( --with-logdir requires a directory PATH. --with-logdir=PATH ) + ;; + *) + DEFAULT_LOG_DIR="$withval" + ;; + esac + ] +) +AC_SUBST(DEFAULT_LOG_DIR) + dnl Gerben Wierda case "$host" in mab-next-nextstep3) diff --git a/src/Makefile.am b/src/Makefile.am index 1b20279161..4bfb3f4182 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1043,7 +1043,7 @@ DEFAULT_PREFIX = $(prefix) DEFAULT_CONFIG_FILE = $(sysconfdir)/squid.conf DEFAULT_MIME_TABLE = $(sysconfdir)/mime.conf DEFAULT_DNSSERVER = $(libexecdir)/`echo dnsserver | sed '$(transform);s/$$/$(EXEEXT)/'` -DEFAULT_LOG_PREFIX = $(localstatedir)/logs +DEFAULT_LOG_PREFIX = @DEFAULT_LOG_DIR@ DEFAULT_CACHE_LOG = $(DEFAULT_LOG_PREFIX)/cache.log DEFAULT_ACCESS_LOG = $(DEFAULT_LOG_PREFIX)/access.log DEFAULT_STORE_LOG = $(DEFAULT_LOG_PREFIX)/store.log