]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
--enable-default-hostsfile configure option by Guido
authorhno <>
Sun, 1 Sep 2002 21:13:08 +0000 (21:13 +0000)
committerhno <>
Sun, 1 Sep 2002 21:13:08 +0000 (21:13 +0000)
Tells the default /etc/hosts file location

configure.in
src/Makefile.am
src/cf.data.pre

index 8ccbf0be1607b90dfa1356528b1dde39e3042dc3..a47b4234ea02932eece679a6cf1be90ffe93a0ac 100644 (file)
@@ -3,7 +3,7 @@ dnl  Configuration input file for Squid
 dnl
 dnl  Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
 dnl
-dnl  $Id: configure.in,v 1.281 2002/08/12 22:23:01 hno Exp $
+dnl  $Id: configure.in,v 1.282 2002/09/01 15:13:08 hno Exp $
 dnl
 dnl
 dnl
@@ -11,7 +11,7 @@ AC_INIT(src/main.c)
 AC_CONFIG_AUX_DIR(cfgaux)
 AM_INIT_AUTOMAKE(squid, 2.6-DEVEL)
 AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.281 $)dnl
+AC_REVISION($Revision: 1.282 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AM_MAINTAINER_MODE
 
@@ -866,6 +866,26 @@ AC_ARG_ENABLE(underscores,
   fi
 ])
 
+dnl Select Default hosts file location
+AC_ARG_ENABLE(default-hostsfile,
+[  --enable-default-hostsfile=path
+                          Select default location for hosts file.
+                          See hosts_file directive in squid.conf for details],
+[
+    if test "$enableval" != "none" ; then
+       if test -f $enableval; then
+           OPT_DEFAULT_HOSTS=$enableval
+       else
+           echo "Warning Unable to find $enableval"
+           sleep 5
+       fi
+    else
+       OPT_DEFAULT_HOSTS="none"    
+    fi
+    echo "Default hosts file set to: $enableval"
+],[OPT_DEFAULT_HOSTS="/etc/hosts"])
+AC_SUBST(OPT_DEFAULT_HOSTS)
+
 
 dnl Select auth schemes modules to build
 AC_ARG_ENABLE(auth,
index 6bfddc6a83e15e2ac94ad7ea040a7bcd96cb8e46..46abd11c8c596c4b5815e30056308aa196acbda6 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.am,v 1.27 2002/07/12 15:00:10 hno Exp $
+#  $Id: Makefile.am,v 1.28 2002/09/01 15:13:08 hno Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
@@ -283,6 +283,7 @@ DEFAULT_DISKD               = $(libexecdir)/@OPT_DISKD_EXE@
 DEFAULT_ICON_DIR       = $(datadir)/icons
 DEFAULT_ERROR_DIR      = $(datadir)/errors/@ERR_DEFAULT_LANGUAGE@
 DEFAULT_MIB_PATH       = $(datadir)/mib.txt
+DEFAULT_HOSTS          = @OPT_DEFAULT_HOSTS@
 
 DEFS = @DEFS@ -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\"
 
@@ -332,7 +333,8 @@ cf.data: cf.data.pre Makefile
        s%@DEFAULT_ICON_DIR@%$(DEFAULT_ICON_DIR)%g;\
        s%@DEFAULT_MIB_PATH@%$(DEFAULT_MIB_PATH)%g;\
        s%@DEFAULT_ERROR_DIR@%$(DEFAULT_ERROR_DIR)%g;\
-       s%@DEFAULT_PREFIX@%$(DEFAULT_PREFIX)%g;"\
+       s%@DEFAULT_PREFIX@%$(DEFAULT_PREFIX)%g;\
+       s%@DEFAULT_HOSTS@%$(DEFAULT_HOSTS)%g;"\
        < $(srcdir)/cf.data.pre >$@
 
 store_modules.c: store_modules.sh Makefile
index f53268db2d76493ff86270455a3240796041ffaa..ae5103685524daf10ed34f807691a001c85a1909 100644 (file)
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.280 2002/09/01 14:14:16 hno Exp $
+# $Id: cf.data.pre,v 1.281 2002/09/01 15:13:08 hno Exp $
 #
 #
 # SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -1180,25 +1180,31 @@ DOC_END
 
 NAME: hosts_file
 TYPE: string
-DEFAULT: /etc/hosts
+DEFAULT: @DEFAULT_HOSTS@
 LOC: Config.etcHostsPath
 DOC_START
        Location of the host-local IP name-address associations
-       database.  Most Operating Systems have such a file: under
-       Un*X it's by default in /etc/hosts MS-Windows NT/2000 places
-       that in %SystemRoot%(by default
-       c:\winnt)\system32\drivers\etc\hosts, while Windows 9x/ME
-       places that in %windir%(usually c:\windows)\hosts
+       database. Most Operating Systems have such a file on different
+       default locations: 
+       - Un*X & Linux:    /etc/hosts
+       - Windows NT/2000: %SystemRoot%\system32\drivers\etc\hosts
+                          (%SystemRoot% value install default is c:\winnt)
+       - Windows XP:      %SystemRoot%\system32\drivers\etc\hosts
+                          (%SystemRoot% value install default is c:\windows)
+       - Windows 9x/Me:   %windir%\hosts
+                          (%windir% value is usually c:\windows)
+       - Cygwin:          /etc/hosts
 
        The file contains newline-separated definitions, in the
        form ip_address_in_dotted_form name [name ...] names are
-       whitespace-separated.  lines beginnng with an hash (#)
+       whitespace-separated. Lines beginnng with an hash (#)
        character are comments.
 
-       The file is checked at startup and upon configuration.  If
-       set to 'none', it won't be checked.  If append_domain is
-       used, that domain will be added to domain-local (i.e. not
-       containing any dot character) host definitions.
+       The file is checked at startup and upon configuration. 
+       If set to 'none', it won't be checked.
+       If append_domain is used, that domain will be added to 
+       domain-local (i.e. not containing any dot character) host
+       definitions.
 DOC_END
 
 NAME: diskd_program