diff options
| author | Rich Megginson <rmeggins@redhat.com> | 2006-11-15 17:17:39 +0000 |
|---|---|---|
| committer | Rich Megginson <rmeggins@redhat.com> | 2006-11-15 17:17:39 +0000 |
| commit | a269b9cabbf0e5fc8a5ff8f8d9becba784879ba0 (patch) | |
| tree | cd868c366b937992a5601aee8e1070f1654e66fc /ldap/admin/src/create_instance.h | |
| parent | b45519e60e6b6461c97163780534df715dc1a2b5 (diff) | |
| download | ds-a269b9cabbf0e5fc8a5ff8f8d9becba784879ba0.tar.gz ds-a269b9cabbf0e5fc8a5ff8f8d9becba784879ba0.tar.xz ds-a269b9cabbf0e5fc8a5ff8f8d9becba784879ba0.zip | |
Resolves: bug 215669
Bug Description: Define LIBDIR, BINDIR, etc. in Makefile
Reviewed by: nkinder (Thanks!)
Fix Description: The paths LIBDIR, BINDIR, et. al. are #define'd in create_instance.h to hard coded values. We should be able to set these values in configure and override the built in values. We can't simply set them via AC_DEFINE in configure.ac because we are using config.h and this would render the definition like this:
#define BINDIR "${exec_prefix}/bin"
instead of
#define BINDIR "/usr/bin"
So we instead define them in Makefile.am and add their definitions to AM_CPPFLAGS, and quote them properly to make sure the value includes the quotation marks when expanded in the C code. I tested this with both an rpmbuild and a regular developer type build.
Platforms tested: RHEL4/FC5
Flag Day: no
Doc impact: no
Diffstat (limited to 'ldap/admin/src/create_instance.h')
| -rw-r--r-- | ldap/admin/src/create_instance.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/ldap/admin/src/create_instance.h b/ldap/admin/src/create_instance.h index 3616dc48..f3eac0ea 100644 --- a/ldap/admin/src/create_instance.h +++ b/ldap/admin/src/create_instance.h @@ -54,23 +54,45 @@ extern "C" { /* Assume C declarations for C++ */ #endif /* __cplusplus */ +#ifndef BRAND_DS #define BRAND_DS "fedora-ds" +#endif #ifdef XP_UNIX #define PRODUCT_NAME "slapd" #define PRODUCT_BIN "ns-slapd" +#ifndef LOCALSTATEDIR #define LOCALSTATEDIR "/var" +#endif +#ifndef SYSCONFDIR #define SYSCONFDIR "/etc" +#endif #if defined (IS_FHS) +#ifndef LIBDIR #define LIBDIR "/usr/lib" +#endif +#ifndef BINDIR #define BINDIR "/usr/bin" +#endif +#ifndef DATADIR #define DATADIR "/usr/share" +#endif +#ifndef DOCDIR #define DOCDIR "/usr/doc" +#endif #else /* RPM */ +#ifndef LIBDIR #define LIBDIR "/lib" +#endif +#ifndef BINDIR #define BINDIR "/bin" +#endif +#ifndef DATADIR #define DATADIR "/share" +#endif +#ifndef DOCDIR #define DOCDIR "/doc" +#endif #endif /* IS_FHS */ #else /* Windows */ #define PRODUCT_NAME "slapd" |
