]> 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 12:55:06 +0000 (00:55 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 10 Apr 2009 12:55:06 +0000 (00:55 +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 4773637a9538daf50e64b922c0db391e65db311c..6e0daca2e98f62188302f899f49131648b610fc8 100644 (file)
@@ -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 <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 3a2a3afd77fbc32814cc4fb26e5d1602177882ef..378b36b348d7b6f9af20d3ec7547b3402862a0a8 100644 (file)
@@ -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)/'`