summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2016-10-04 17:30:57 +0200
committerTobias Klauser <tklauser@distanz.ch>2016-10-04 17:30:57 +0200
commit2671a349c712ac7d0c0f8cd3f4ede13434859d6d (patch)
tree29bdb5f32491ba822468ba8dd4470f5cf6375f53 /configure
parent70968e7726223664e2d8458773775432cdbee5a6 (diff)
build: Unify default values for PREFIX and ETCDIR in configure
The netsniff-ng make system is no longer usable without the `Config' file generated by the ^configure' script. Thus it's now possible to move default value definitions for PREFIX and ETCDIR to the configure script, so we they're not duplicated in `configure' and the Makefile. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 4 insertions, 12 deletions
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