From: Amos Jeffries Date: Fri, 10 Apr 2009 12:55:06 +0000 (+1200) Subject: Bug 2628: Need way to override DEFAULT_PID_FILE X-Git-Tag: SQUID_3_2_0_1~1069 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a7f6af35b259a7246711be88d5c5ccf34ebbcfc7;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 4773637a95..6e0daca2e9 100644 --- a/configure.in +++ b/configure.in @@ -175,6 +175,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 3a2a3afd77..378b36b348 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -707,7 +707,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)/'`