* Makefile.am (instantiate): Substitute the sysconfdir value. * modules/dmd/config.scm.in (%sysconfdir): New variable. * modules/dmd/support.scm (default-config-file): Use %sysconfdir in place of prefix+"/etc". ---
Hi, As is, using "./configure --prefix=/usr --sysconfdir=/etc" will try to read /usr/etc/dmdconf.scm by default. Can it be adjusted to read dmdconf.scm from the configured sysconfdir? Thanks. David Makefile.am | 1 + modules/dmd/config.scm.in | 2 ++ modules/dmd/support.scm | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 5e6ff05..3329382 100644 --- a/Makefile.am +++ b/Makefile.am @@ -86,6 +86,7 @@ instantiate = \ -e 's,%modsrcdir%,${abs_top_srcdir}/modules,g' \ -e 's,%modbuilddir%,${abs_top_builddir}/modules,g' \ -e 's,%localstatedir%,${localstatedir},g' \ + -e 's,%sysconfdir%,${sysconfdir},g' \ -e 's,%VERSION%,@VERSION@,g' \ -e 's,%PACKAGE_BUGREPORT%,@PACKAGE_BUGREPORT@,g' \ -e 's,%PACKAGE_NAME%,@PACKAGE_NAME@,g' \ diff --git a/modules/dmd/config.scm.in b/modules/dmd/config.scm.in index dd2db9b..0ee9340 100644 --- a/modules/dmd/config.scm.in +++ b/modules/dmd/config.scm.in @@ -4,6 +4,7 @@ #:export (Version Prefix-dir %localstatedir + %sysconfdir copyright bug-address package-name @@ -12,6 +13,7 @@ (define Version "%VERSION%") (define Prefix-dir "%PREFIX%") (define %localstatedir "%localstatedir%") +(define %sysconfdir "%sysconfdir%") (define copyright "Copyright (C) 2002, 2003 Wolfgang Jährling") (define bug-address "%PACKAGE_BUGREPORT%") diff --git a/modules/dmd/support.scm b/modules/dmd/support.scm index 8ca1597..7eacc70 100644 --- a/modules/dmd/support.scm +++ b/modules/dmd/support.scm @@ -217,7 +217,7 @@ TARGET should be a string representing a filepath + name." global system configuration file when running as 'root'. As a side effect, create a template configuration file if non exists." (if (zero? (getuid)) - (string-append Prefix-dir "/etc/dmdconf.scm") + (string-append %sysconfdir "/dmdconf.scm") (let ((config-file (string-append user-dmddir "/init.scm"))) (catch-system-error (mkdir user-dmddir)) (if (not (file-exists? config-file)) -- 1.9.3