]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2628: Need way to override DEFAULT_PID_FILE
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 10 Apr 2009 13:17:22 +0000 (01:17 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 10 Apr 2009 13:17:22 +0000 (01:17 +1200)
Adds ./configure option --with-pidfile=PATH
to set the default name and location of squid.pid

configure.in
doc/release-notes/release-3.1.sgml
src/Makefile.am

index 6da7fc8a8955e875216151f78e0b3a4ec903c887..32166f6932f40beae28c7636e2a8c43450231482 100644 (file)
@@ -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 <Gerben_Wierda@RnA.nl>
 case "$host" in
     mab-next-nextstep3)
index 7910242d4529c8dfa568d7aca2f2ffcc6441a88f..dce25cba7b468d050876e3341e64d527c3aad179 100644 (file)
@@ -1094,6 +1094,9 @@ This section gives an account of those changes in three categories:
         <p>Enable special additions for IPv6 support in Windows XP.
            see the IPv6 details above for a better description.
 
+       <tag>--with-pidfile=PATH</tag>
+       <p>Allow build-time configuration of Default location and name of squid.pid file.
+
        <tag>--with-po2html=PATH</tag>
        <p>Absolute path to po2html executable.
           Default is to automatically detect the binary.
index 050e57d0b76ab8e4e9712b83396fba3e8832fa97..ddfdb7ef3946b997ead5c10497b0c145a3e9f51d 100644 (file)
@@ -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)/'`