[SSSD] [PATCH] Make ldb lib dir configurable

Sumit Bose sbose at redhat.com
Wed Nov 25 13:03:30 UTC 2009


On Wed, Nov 25, 2009 at 07:37:44AM -0500, Stephen Gallagher wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 11/24/2009 04:43 PM, Sumit Bose wrote:
> > Hi,
> > 
> > this patch makes it possible to configure the place where the ldb
> > modules shall be stored. The command line option has the highest
> > priority, if not given pkg-config is queried. If everything fails we fall
> > back to ${libdir}/ldb.
> > 
> > bye,
> > Sumit
> > 
> > 
> > 
> > _______________________________________________
> > sssd-devel mailing list
> > sssd-devel at lists.fedorahosted.org
> > https://fedorahosted.org/mailman/listinfo/sssd-devel
> 
> Looks good, except I think the message stating the default location
> should read "${libdir}/ldb" instead of "/usr/lib/ldb", since the latter
> is not accurate on a 64-bit system.
> 
> - -- 
> Stephen Gallagher
> RHCE 804006346421761
> 

ok, new version attached.

bye,
Sumit
-------------- next part --------------
>From e56783f3b6162b27757901b478127d8a0f60338d Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose at redhat.com>
Date: Tue, 24 Nov 2009 22:37:10 +0100
Subject: [PATCH] Make ldb lib dir configurable

---
 server/Makefile.am        |    2 +-
 server/external/libldb.m4 |   18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/server/Makefile.am b/server/Makefile.am
index 198d5c4..c029391 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -6,7 +6,7 @@ builddir ?= .
 
 sssdlibexecdir = $(libexecdir)/sssd
 sssdlibdir = $(libdir)/sssd
-ldblibdir = $(libdir)/ldb
+ldblibdir = @ldblibdir@
 if BUILD_KRB5_LOCATOR_PLUGIN
 krb5plugindir = @krb5pluginpath@
 endif
diff --git a/server/external/libldb.m4 b/server/external/libldb.m4
index 150c7ee..d11acb4 100644
--- a/server/external/libldb.m4
+++ b/server/external/libldb.m4
@@ -8,3 +8,21 @@ AC_CHECK_HEADERS(ldb.h ldb_module.h,
    [AC_CHECK_LIB(ldb, ldb_init, [LDB_LIBS="-lldb"], , -ltevent) ],
    [AC_MSG_ERROR([LDB header files are not installed])]
 )
+
+AC_ARG_WITH([ldb-lib-dir],
+            [AC_HELP_STRING([--with-ldb-lib-dir=PATH],
+                            [Path to store ldb modules [${libdir}/ldb]]
+                           )
+            ]
+           )
+
+if test x"$with_ldb_lib_dir" != x; then
+    ldblibdir=$with_ldb_lib_dir
+else
+    ldblibdir="`$PKG_CONFIG --variable=modulesdir ldb`"
+    if test x"$ldblibdir" == x; then
+        ldblibdir="${libdir}/ldb"
+    fi
+fi
+AC_MSG_NOTICE([ldb lib directory: $ldblibdir])
+AC_SUBST(ldblibdir)
-- 
1.6.5.2



More information about the sssd-devel mailing list