summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile5
-rwxr-xr-xconfigure16
2 files changed, 6 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index ad1c1fc..fbb50cc 100644
--- a/Makefile
+++ b/Makefile
@@ -20,10 +20,9 @@ EXTRAVERSION =
NAME = aisatsana
TOOLS ?= $(CONFIG_TOOLS)
-TOOLS ?= netsniff-ng trafgen astraceroute flowtop ifpps bpfc curvetun mausezahn
# For packaging purposes, prefix can define a different path.
-PREFIX ?= /usr/local
+PREFIX ?= $(CONFIG_PREFIX)
# Set to use ccache for compilation
CCACHE ?=
@@ -35,7 +34,7 @@ DESTDIR=
# Location of installation paths.
SBINDIR = $(PREFIX)/sbin
INCDIR = $(PREFIX)/include
-ETCDIR ?= /etc
+ETCDIR ?= $(CONFIG_ETCDIR)
ETCDIRE = $(ETCDIR)/netsniff-ng
MAN8DIR = $(PREFIX)/share/man/man8
diff --git a/configure b/configure
index 572fc6d..72bb574 100755
--- a/configure
+++ b/configure
@@ -25,9 +25,7 @@ DISABLE_ZLIB=0
ENABLE_DEBUG=0
PREFIX="/usr/local"
-HAVE_PREFIX=0
-
-SYSCONF_DIR=""
+SYSCONF_DIR="/etc"
usage()
{
@@ -38,7 +36,7 @@ usage()
echo "Installation directories:"
echo " --prefix=PREFIX install architecture-independent files in PREFIX"
echo " [$PREFIX]"
- echo " --sysconfdir=DIR read-only single-machine data [PREFIX/etc]"
+ echo " --sysconfdir=DIR read-only single-machine data [$SYSCONF_DIR]"
echo ""
echo "By default, \`make install' will install all the files in"
echo "\`$PREFIX/bin', \`$PREFIX/lib' etc. You can specify"
@@ -65,7 +63,6 @@ while [ $# -gt 0 ] ; do
;;
--prefix=*)
PREFIX="${1#*=}"
- HAVE_PREFIX=1
;;
--sysconfdir=*)
SYSCONF_DIR="${1#*=}"
@@ -823,13 +820,8 @@ else
echo "CONFIG_GEOIP=0" >> Config
fi
-if [ "$HAVE_PREFIX" == "1" ] ; then
- echo "PREFIX=$PREFIX" >> Config
-fi
-
-if [ ! -z $SYSCONF_DIR ] ; then
- echo "ETCDIR=$SYSCONF_DIR" >> Config
-fi
+echo "CONFIG_PREFIX=$PREFIX" >> Config
+echo "CONFIG_ETCDIR=$SYSCONF_DIR" >> Config
echo "CONFIG_DEBUG=$ENABLE_DEBUG" >> Config
echo "CONFIG_TOOLS=$TOOLS" >> Config