Use default config file when none is provided

Add config option to set a default config file path. If
none given, the default config file path is /etc/clixon.xml.
This commit is contained in:
Matthew Smith 2018-01-14 21:25:17 -06:00
parent 363bd5d19d
commit 6a9697c2ff
4 changed files with 32 additions and 2 deletions

19
configure vendored
View file

@ -709,6 +709,7 @@ with_cligen
with_restconf
with_keyvalue
with_qdbm
with_configfile
'
ac_precious_vars='build_alias
host_alias
@ -1347,6 +1348,7 @@ Optional Packages:
--without-restconf disable support for restconf
--with-keyvalue enable support for key-value xmldb datastore
--with-qdbm=dir Use QDBM here, if keyvalue
--with-configfile set default path to config file
Some influential environment variables:
CC C compiler command
@ -4045,6 +4047,16 @@ fi
fi
# Set default config file location
# Check whether --with-configfile was given.
if test "${with_configfile+set}" = set; then :
withval=$with_configfile; DEFAULT_CONFIG="$withval"
else
DEFAULT_CONFIG="/etc/clixon.xml"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
$as_echo_n "checking for crypt in -lcrypt... " >&6; }
if ${ac_cv_lib_crypt_crypt+:} false; then :
@ -4290,6 +4302,13 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
# Default location for config file
cat >>confdefs.h <<_ACEOF
#define CLIXON_DEFAULT_CONFIG "${DEFAULT_CONFIG}"
_ACEOF
# See also datastore/keyvalue/Makefile in with_keyvalue clause above