diff options
author | Rich Megginson <rmeggins@redhat.com> | 2007-02-12 19:39:09 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2007-02-12 19:39:09 +0000 |
commit | 9d36662cfb331ef0a7c452086daa4ba96849d991 (patch) | |
tree | 0630576ac77aee299c9de0d6a8040eeeaf42533a /configure.ac | |
parent | 2cbacc63087fc045f18b4dff451d7c98d4782f57 (diff) | |
download | ds-9d36662cfb331ef0a7c452086daa4ba96849d991.tar.gz ds-9d36662cfb331ef0a7c452086daa4ba96849d991.tar.xz ds-9d36662cfb331ef0a7c452086daa4ba96849d991.zip |
Resolves: bug 227771
Bug Description: FHS: use sysconfdir (/etc) as config file location - allow builders to set dynamic config directory location at configure time
Reviewed by: nhosoi, nkinder, prowley (Thanks!)
Fix Description: I've added a new configure switch: --with-instconfigdir. This switch will allow the user to specify a different location to store the dynamic instance specific config files rather than the default $sysconfdir/$package_name (e.g. /etc/fedora-ds). This is the directory which will contain the slapd-instance directories which contain the instance specific config, schema, and security files. Even though the user could override this with ds_newinst.pl ([slapd] section config_dir), we needed to be able to set the default so that the user would not have to remember to do this every time, and so that packagers could set a reasonable default value for their platform.
Platforms tested: FC6, RHEL4
Flag Day: no
Doc impact: no
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index a2f2fad9..2f22342c 100644 --- a/configure.ac +++ b/configure.ac @@ -74,6 +74,8 @@ AM_CONDITIONAL(BUNDLE,test "$bundle" = "1") AC_PREFIX_DEFAULT([/opt/$PACKAGE_NAME]) +m4_include(m4/fhs.m4) + # installation paths - by default, configure will just # use /usr as the prefix for everything, which means # /usr/etc and /usr/var. FHS sez to use /etc and /var. @@ -101,6 +103,7 @@ serverdir=/$PACKAGE_NAME serverplugindir=/$PACKAGE_NAME/plugins # relative to datadir scripttemplatedir=/$PACKAGE_NAME/script-templates + AC_SUBST(configdir) AC_SUBST(sampledatadir) AC_SUBST(propertydir) @@ -109,6 +112,23 @@ AC_SUBST(serverdir) AC_SUBST(serverplugindir) AC_SUBST(scripttemplatedir) +AC_CHECKING(for instconfigdir) + +# check for --with-instconfigdir +AC_MSG_CHECKING(for --with-instconfigdir) +AC_ARG_WITH(instconfigdir, [ --with-instconfigdir=/path Base directory for instance specific writable configuration directories (default $sysconfdir/$PACKAGE_NAME)], +[ + if test $withval = yes ; then + AC_ERROR([Please specify a full path with --with-instconfigdir]) + fi + instconfigdir="$withval" +], +[ + dnl this value is expanded out in Makefile.am + instconfigdir='$(sysconfdir)/$(PACKAGE_NAME)' +]) +AC_SUBST(instconfigdir) + # WINNT should be true if building on Windows system not using # cygnus, mingw, or the like and using cmd.exe as the shell AM_CONDITIONAL([WINNT], false) @@ -187,7 +207,6 @@ m4_include(m4/sasl.m4) m4_include(m4/svrcore.m4) m4_include(m4/icu.m4) m4_include(m4/netsnmp.m4) -m4_include(m4/fhs.m4) # write out paths for binary components AC_SUBST(nspr_inc) |