Improved the code to install all the files into their properly locations.
This commit is contained in:
parent
0a1f83bbe5
commit
6004eca8c6
33
Makefile.am
33
Makefile.am
@ -2,16 +2,23 @@ EXTRA_DIST = TODO
|
|||||||
SUBDIRS = src doc
|
SUBDIRS = src doc
|
||||||
|
|
||||||
install-data-local:
|
install-data-local:
|
||||||
mkdir -p @TINYPROXY_CONFIG_DIR@
|
$(mkinstalldirs) $(DESTDIR)@TINYPROXY_CONFIG_DIR@
|
||||||
$(INSTALL) doc/tinyproxy.conf @TINYPROXY_CONFIG@-dist
|
$(INSTALL) -m 600 doc/tinyproxy.conf \
|
||||||
test ! -f @TINYPROXY_CONFIG@ && $(INSTALL) doc/tinyproxy.conf @TINYPROXY_CONFIG@
|
$(DESTDIR)@TINYPROXY_CONFIG_DIR@/@TINYPROXY_CONFIG_FILE@-dist
|
||||||
echo ""
|
test ! -f $(DESTDIR)@TINYPROXY_CONFIG_DIR@/@TINYPROXY_CONFIG_FILE@ \
|
||||||
echo "A configuration file has been copied to:"
|
&& $(INSTALL) -m 600 doc/tinyproxy.conf \
|
||||||
echo "@TINYPROXY_CONFIG@-dist"
|
$(DESTDIR)@TINYPROXY_CONFIG_DIR@/@TINYPROXY_CONFIG_FILE@
|
||||||
echo "You will need to rename this file to:"
|
@echo ""
|
||||||
echo "@TINYPROXY_CONFIG@"
|
@echo "A configuration file has been copied to:"
|
||||||
echo "and modify the values to suit your local system."
|
@echo ""
|
||||||
echo ""
|
@echo "@TINYPROXY_CONFIG_DIR@/@TINYPROXY_CONFIG_FILE@-dist"
|
||||||
echo "All the configuration directives are commented in the file, so"
|
@echo ""
|
||||||
echo "you should not have any problems configuring your system."
|
@echo "You will need to rename this file to:"
|
||||||
echo ""
|
@echo ""
|
||||||
|
@echo "@TINYPROXY_CONFIG_DIR@/@TINYPROXY_CONFIG_FILE@"
|
||||||
|
@echo ""
|
||||||
|
@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 ""
|
23
configure.ac
23
configure.ac
@ -1,4 +1,4 @@
|
|||||||
dnl $Id: configure.ac,v 2.24 2002-05-02 04:44:03 rjkaes Exp $
|
dnl $Id: configure.ac,v 2.25 2002-05-02 17:35:27 rjkaes Exp $
|
||||||
|
|
||||||
dnl Devlopers, please strive to achieve this order:
|
dnl Devlopers, please strive to achieve this order:
|
||||||
dnl
|
dnl
|
||||||
@ -46,20 +46,25 @@ AC_ARG_WITH(stathost,
|
|||||||
|
|
||||||
dnl Set the default configuration file location
|
dnl Set the default configuration file location
|
||||||
test "$prefix" = "NONE" && prefix=/usr/local
|
test "$prefix" = "NONE" && prefix=/usr/local
|
||||||
TINYPROXY_CONFIG_DIR=`eval echo $sysconfdir/tinyproxy`
|
|
||||||
|
# If sysconfdir is /usr/etc, change it to /etc (since /usr/etc doesn't exist)
|
||||||
|
if [[ "/usr/etc" = `eval echo $sysconfdir` -a "/usr" = "$prefix" ]]; then
|
||||||
|
TINYPROXY_CONFIG_DIR="/etc/tinyproxy"
|
||||||
|
else
|
||||||
|
TINYPROXY_CONFIG_DIR=`eval echo $sysconfdir/tinyproxy`
|
||||||
|
fi
|
||||||
AC_SUBST(TINYPROXY_CONFIG_DIR)
|
AC_SUBST(TINYPROXY_CONFIG_DIR)
|
||||||
|
|
||||||
AH_TEMPLATE([DEFAULT_CONF_FILE],
|
AH_TEMPLATE([DEFAULT_CONF_FILE],
|
||||||
[This is the default location of the configuration file.])
|
[This is the default file name for the configuration file.])
|
||||||
AC_ARG_WITH(config,
|
AC_ARG_WITH(config,
|
||||||
[AC_HELP_STRING([--with-config=FILE],
|
[AC_HELP_STRING([--with-config=FILE],
|
||||||
[Set the default location of the config file])],
|
[Set the default location of the config file])],
|
||||||
[TINYPROXY_CONFIG="$withval"],
|
[TINYPROXY_CONFIG_FILE="$withval"],
|
||||||
[TINYPROXY_CONFIG="$TINYPROXY_CONFIG_DIR/tinyproxy.conf"])
|
[TINYPROXY_CONFIG_FILE="tinyproxy.conf"])
|
||||||
AC_DEFINE_UNQUOTED(DEFAULT_CONF_FILE, "$TINYPROXY_CONFIG")
|
AC_DEFINE_UNQUOTED(DEFAULT_CONF_FILE, "$TINYPROXY_CONFIG_DIR/$TINYPROXY_CONFIG_FILE")
|
||||||
AC_SUBST(TINYPROXY_CONFIG)
|
AC_SUBST(TINYPROXY_CONFIG_FILE)
|
||||||
# [AC_DEFINE_UNQUOTED(DEFAULT_CONF_FILE, "$withval")],
|
AC_MSG_NOTICE([Default config location and file is: $TINYPROXY_CONFIG_DIR/$TINYPROXY_CONFIG_FILE])
|
||||||
# [AC_DEFINE_UNQUOTED(DEFAULT_CONF_FILE, "/etc/tinyproxy/tinyproxy.conf")])
|
|
||||||
|
|
||||||
dnl Add compiler-specific optimization flags
|
dnl Add compiler-specific optimization flags
|
||||||
AC_ARG_ENABLE(debug,
|
AC_ARG_ENABLE(debug,
|
||||||
|
Loading…
Reference in New Issue
Block a user