From: Amos Jeffries Date: Fri, 10 Apr 2009 13:17:22 +0000 (+1200) Subject: Bug 2628: Need way to override DEFAULT_PID_FILE X-Git-Tag: SQUID_3_1_0_8~48 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2668ed5374728b841b6e7efc8a153bebb6c08a0b;p=thirdparty%2Fsquid.git Bug 2628: Need way to override DEFAULT_PID_FILE Adds ./configure option --with-pidfile=PATH to set the default name and location of squid.pid --- diff --git a/configure.in b/configure.in index 6da7fc8a89..32166f6932 100644 --- a/configure.in +++ b/configure.in @@ -173,6 +173,22 @@ AC_ARG_WITH(logdir, ) AC_SUBST(DEFAULT_LOG_DIR) +DEFAULT_PIDFILE="$localstatedir/squid.pid" +AC_ARG_WITH(pidfile, + AC_HELP_STRING([--with-pidfile=PATH], + Default location for squid PID file. default: $DEFAULT_PIDFILE), + [ case $withval in + yes|no) + AC_MSG_ERROR( --with-pidfile requires a file PATH. --with-pidfile=PATH ) + ;; + *) + DEFAULT_PIDFILE="$withval" + ;; + esac + ] +) +AC_SUBST(DEFAULT_PIDFILE) + dnl Gerben Wierda case "$host" in mab-next-nextstep3) diff --git a/doc/release-notes/release-3.1.sgml b/doc/release-notes/release-3.1.sgml index 7910242d45..dce25cba7b 100644 --- a/doc/release-notes/release-3.1.sgml +++ b/doc/release-notes/release-3.1.sgml @@ -1094,6 +1094,9 @@ This section gives an account of those changes in three categories:

Enable special additions for IPv6 support in Windows XP. see the IPv6 details above for a better description. + --with-pidfile=PATH +

Allow build-time configuration of Default location and name of squid.pid file. + --with-po2html=PATH

Absolute path to po2html executable. Default is to automatically detect the binary. diff --git a/src/Makefile.am b/src/Makefile.am index 050e57d0b7..ddfdb7ef39 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -712,7 +712,7 @@ 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 -DEFAULT_PID_FILE = $(DEFAULT_LOG_PREFIX)/squid.pid +DEFAULT_PID_FILE = @DEFAULT_PIDFILE@ DEFAULT_NETDB_FILE = $(DEFAULT_LOG_PREFIX)/netdb.state DEFAULT_SWAP_DIR = $(localstatedir)/cache DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'`