summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2016-08-23 00:17:12 +0300
committerTobias Klauser <tklauser@distanz.ch>2016-09-15 18:48:49 +0200
commit4829ae377acc30222c3866eb67082d7cf15c73f1 (patch)
tree6c7750dd9b85bbdf0f70b727e2012f3fa4c49e0e /configure
parentba85243ef4f90c022502604a8faadbc4e7d8f439 (diff)
build: configure: Add option to specify install path for /etc files
Add new '--sysconfdir=PREFIX' option to control installation of config files, files will be installed into PREFIX/etc path. Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure b/configure
index db9727c..5b2afe0 100755
--- a/configure
+++ b/configure
@@ -27,6 +27,8 @@ ENABLE_DEBUG=0
PREFIX="/usr/local"
HAVE_PREFIX=0
+SYSCONF_DIR=""
+
usage()
{
echo "Usage: ./configure [OPTION]... [VAR=VALUE]..."
@@ -36,6 +38,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 ""
echo "By default, \`make install' will install all the files in"
echo "\`$PREFIX/bin', \`$PREFIX/lib' etc. You can specify"
@@ -64,6 +67,9 @@ while [ $# -gt 0 ] ; do
PREFIX="${1#*=}"
HAVE_PREFIX=1
;;
+ --sysconfdir=*)
+ SYSCONF_DIR="${1#*=}"
+ ;;
--disable-libnl)
DISABLE_LIBNL=1
;;
@@ -814,6 +820,10 @@ if [ "$HAVE_PREFIX" == "1" ] ; then
echo "PREFIX=$PREFIX" >> Config
fi
+if [ ! -z $SYSCONF_DIR ] ; then
+ echo "ETCDIR=$SYSCONF_DIR" >> Config
+fi
+
echo "CONFIG_DEBUG=$ENABLE_DEBUG" >> Config
echo "CONFIG_TOOLS=$TOOLS" >> Config
echo "CONFIG_OK=1" >> Config