From 4829ae377acc30222c3866eb67082d7cf15c73f1 Mon Sep 17 00:00:00 2001 From: Vadim Kochan Date: Tue, 23 Aug 2016 00:17:12 +0300 Subject: [PATCH] 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 Signed-off-by: Tobias Klauser --- configure | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure b/configure index db9727cc..5b2afe08 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 -- 2.11.4.GIT