]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Add configure option --with-logdir=PATH for change of the log directory
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 13 Oct 2008 09:41:25 +0000 (22:41 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 13 Oct 2008 09:41:25 +0000 (22:41 +1300)
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.

configure.in
src/Makefile.am

index 1587484b17e28f70eac03c642ada5abcc4a18997..00dc1f5f201a93f09087914f605824a7ca080079 100755 (executable)
@@ -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 <Gerben_Wierda@RnA.nl>
 case "$host" in
     mab-next-nextstep3)
index 1b20279161dd178cc0a6ebc3df0e1136cd2c1f29..4bfb3f4182b06a570f851b77bd4a3bafe3d04acd 100644 (file)
@@ -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