From 1b7c9907af7530d118f886d4844b0c9a8d2950ca Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Thu, 21 Dec 2000 14:25:06 +0000 Subject: [PATCH] configuration.pl.in configured --- helm/configuration/configure.in | 2 +- helm/configuration/lib/configuration.pl.in | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/helm/configuration/configure.in b/helm/configuration/configure.in index 9a4d94cfd..c96778800 100644 --- a/helm/configuration/configure.in +++ b/helm/configuration/configure.in @@ -18,4 +18,4 @@ HELM_ETC_DIR=$RESOLVED_PREFIX/etc/helm AC_SUBST(HELM_LIB_DIR) AC_SUBST(HELM_ETC_DIR) -AC_OUTPUT([Makefile]) +AC_OUTPUT([Makefile lib/configuration.pl]) diff --git a/helm/configuration/lib/configuration.pl.in b/helm/configuration/lib/configuration.pl.in index e88d8fbe7..6c101d79e 100644 --- a/helm/configuration/lib/configuration.pl.in +++ b/helm/configuration/lib/configuration.pl.in @@ -1,11 +1,13 @@ use XML::Parser; use Env; -my $HELM_CONFIGURATION_PREFIX = $ENV{"HELM_CONFIGURATION_PREFIX"}; +my $HELM_CONFIGURATION_DIR = $ENV{"HELM_CONFIGURATION_DIR"}; +my $DEFAULT_HELM_CONFIGURATION_DIR = @HELM_ETC_DIR@; # this should be the only fixed constant -if (defined ($HELM_CONFIGURATION_PREFIX) { - $configuration_file = - $HELM_CONFIGURATION_PREFIX."/etc/helm/configuration.xml"; +if (defined ($HELM_CONFIGURATION_DIR) { + $configuration_file = $HELM_CONFIGURATION_DIR."/configuration.xml"; +} else { + $configuration_file = $DEFAULT_HELM_CONFIGURATION_DIR."/configuration.xml"; } $parser = new XML::Parser(Handlers => {Start => \&handle_start, -- 2.39.2