[Fedora-directory-commits] ldapserver/ldap/admin/src create_instance.h, 1.12, 1.13

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Wed Nov 15 17:17:41 UTC 2006


Author: rmeggins

Update of /cvs/dirsec/ldapserver/ldap/admin/src
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2981/ldapserver/ldap/admin/src

Modified Files:
	create_instance.h 
Log Message:
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 



Index: create_instance.h
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/admin/src/create_instance.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- create_instance.h	13 Nov 2006 23:45:44 -0000	1.12
+++ create_instance.h	15 Nov 2006 17:17:39 -0000	1.13
@@ -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"




More information about the Fedora-directory-commits mailing list