diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | Makefile.am | 15 | ||||
-rw-r--r-- | configure.ac | 35 |
3 files changed, 41 insertions, 18 deletions
@@ -1,3 +1,12 @@ +2002-05-02 Robert James Kaes <rjkaes@flarenet.com> + + * configure.ac: Added code to figure out exactly where to install + the configuration file. + + * Makefile.am (install-data-local): Added a new install run to + install the configuration file to the location specified in + DEFAULT_CONF_FILE. + 2002-04-28 Robert James Kaes <rjkaes@flarenet.com> * src/reqs.c (process_client_headers): diff --git a/Makefile.am b/Makefile.am index 4f71b3c..460f952 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,2 +1,17 @@ EXTRA_DIST = TODO SUBDIRS = src doc + +install-data-local: + mkdir -p @TINYPROXY_CONFIG_DIR@ + $(INSTALL) doc/tinyproxy.conf @TINYPROXY_CONFIG@-dist + test ! -f @TINYPROXY_CONFIG@ && $(INSTALL) doc/tinyproxy.conf @TINYPROXY_CONFIG@ + echo "" + echo "A configuration file has been copied to:" + echo "@TINYPROXY_CONFIG@-dist" + echo "You will need to rename this file to:" + echo "@TINYPROXY_CONFIG@" + echo "and modify the values to suit your local system." + echo "" + echo "All the configuration directives are commented in the file, so" + echo "you should not have any problems configuring your system." + echo ""
\ No newline at end of file diff --git a/configure.ac b/configure.ac index 1fe1d57..db5c810 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -dnl $Id: configure.ac,v 2.23 2002-04-29 16:32:20 rjkaes Exp $ +dnl $Id: configure.ac,v 2.24 2002-05-02 04:44:03 rjkaes Exp $ dnl Devlopers, please strive to achieve this order: dnl @@ -37,30 +37,29 @@ dnl Command line options dnl dnl Set the URL name for find the statistics of tinyproxy -AH_VERBATIM([DEFAULT_STATHOST], -[/* - * This controls remote proxy stats deplay. For example, the default - * DEFAULT_STATHOST of "tinyproxy.stats" means that where you access - * "http://tinyproxy.stats/" you will be shown the proxy stats. Use "" to - * disable. - */ -#ifndef DEFAULT_STATHOST -# define DEFAULT_STATHOST "tinyproxy.stats" -#endif]) +AH_TEMPLATE([DEFAULT_STATHOST], + [This controls remote proxy stats display.]) AC_ARG_WITH(stathost, [AC_HELP_STRING([--with-stathost=HOST], [Default status host])], - [AC_DEFINE_UNQUOTED(DEFAULT_STATHOST, ["$withval"])]) + [AC_DEFINE_UNQUOTED(DEFAULT_STATHOST, "$withval")], + [AC_DEFINE_UNQUOTED(DEFAULT_STATHOST, "tinyproxy.stats")]) dnl Set the default configuration file location -AH_VERBATIM([DEFAULT_CONF_FILE], -[/* This is the default location of the configuation file. */ -#ifndef DEFAULT_CONF_FILE -# define DEFAULT_CONF_FILE "/etc/tinyproxy/tinyproxy.conf" -#endif]) +test "$prefix" = "NONE" && prefix=/usr/local +TINYPROXY_CONFIG_DIR=`eval echo $sysconfdir/tinyproxy` +AC_SUBST(TINYPROXY_CONFIG_DIR) + +AH_TEMPLATE([DEFAULT_CONF_FILE], + [This is the default location of the configuration file.]) AC_ARG_WITH(config, [AC_HELP_STRING([--with-config=FILE], [Set the default location of the config file])], - [AC_DEFINE_UNQUOTED(DEFAULT_CONF_FILE, ["$withval"])]) + [TINYPROXY_CONFIG="$withval"], + [TINYPROXY_CONFIG="$TINYPROXY_CONFIG_DIR/tinyproxy.conf"]) +AC_DEFINE_UNQUOTED(DEFAULT_CONF_FILE, "$TINYPROXY_CONFIG") +AC_SUBST(TINYPROXY_CONFIG) +# [AC_DEFINE_UNQUOTED(DEFAULT_CONF_FILE, "$withval")], +# [AC_DEFINE_UNQUOTED(DEFAULT_CONF_FILE, "/etc/tinyproxy/tinyproxy.conf")]) dnl Add compiler-specific optimization flags AC_ARG_ENABLE(debug, |