ldb: Support using system pyldb library.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 23 Oct 2010 18:41:27 +0000 (20:41 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 23 Oct 2010 19:24:25 +0000 (19:24 +0000)
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Oct 23 19:24:25 UTC 2010 on sn-devel-104

source4/lib/ldb/wscript

index 7a233d4a9dd2977a75ebd2687c3391231176088c..e67ff9482fce8c935e14a87437abecb4661a9605 100644 (file)
@@ -46,6 +46,10 @@ def configure(conf):
                                      onlyif='talloc tdb tevent',
                                      implied_deps='replace talloc tdb tevent'):
             conf.define('USING_SYSTEM_LDB', 1)
+        if conf.CHECK_BUNDLED_SYSTEM('pyldb', minversion=VERSION,
+                                     onlyif='talloc tdb tevent ldb',
+                                     implied_deps='replace talloc tdb tevent ldb'):
+            conf.define('USING_SYSTEM_PYLDB', 1)
 
     if conf.env.standalone_ldb:
         conf.CHECK_XSLTPROC_MANPAGES()
@@ -101,14 +105,14 @@ def build(bld):
         bld.env.PACKAGE_VERSION = VERSION
         bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
 
-
-    bld.SAMBA_LIBRARY('pyldb_util',
-                      deps='ldb',
-                      source='pyldb_util.c',
-                      public_headers='pyldb.h',
-                      vnum=VERSION,
-                      pc_files='pyldb.pc',
-                      pyext=True)
+    if not bld.CONFIG_SET('USING_SYSTEM_PYLDB'):
+        bld.SAMBA_LIBRARY('pyldb_util',
+                          deps='ldb',
+                          source='pyldb_util.c',
+                          public_headers='pyldb.h',
+                          vnum=VERSION,
+                          pc_files='pyldb.pc',
+                          pyext=True)
 
     if not bld.CONFIG_SET('USING_SYSTEM_LDB'):
         if Options.is_install: