From d670b6af8af4f0c8d4e60c0e434b149a18abf717 Mon Sep 17 00:00:00 2001 From: Renato Botelho do Couto Date: Tue, 6 Feb 2018 05:54:05 -0600 Subject: [PATCH] Make default config to respect sysconfdir Instead of hardcode default config to /etc/clixon.xml, make it to respect sysconfdir variable. Since autoconf doesn't expand variables on header substitution it would end up being defined on clixon_config.h as "${prefix}/etc/clixon.xml" what makes no sense for the header file. Use eval to expand ${sysconfdir} and make .h file to be defined with final directory name. --- configure | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index a3b0392f..1b6ffc9e 100755 --- a/configure +++ b/configure @@ -4053,7 +4053,7 @@ fi if test "${with_configfile+set}" = set; then : withval=$with_configfile; DEFAULT_CONFIG="$withval" else - DEFAULT_CONFIG="/etc/clixon.xml" + DEFAULT_CONFIG="$(eval echo ${sysconfdir}/clixon.xml)" fi diff --git a/configure.ac b/configure.ac index 941f8e3d..503bc9b8 100644 --- a/configure.ac +++ b/configure.ac @@ -165,7 +165,7 @@ fi AC_ARG_WITH([configfile], [AS_HELP_STRING([--with-configfile=FILE],[set default path to config file])], [DEFAULT_CONFIG="$withval"], - [DEFAULT_CONFIG="/etc/clixon.xml"]) + [DEFAULT_CONFIG="$(eval echo ${sysconfdir}/clixon.xml)"]) AC_CHECK_LIB(crypt, crypt) AC_CHECK_HEADERS(crypt.h)