s4-waf: don't try to use the system lib for the library build
[samba.git] / source4 / lib / ldb / wscript
index d796bc00116d1c04db121d605b3361c8ae603e09..ea0219ff4bb1a547ba2ff4a13432b9a30a5b667e 100644 (file)
@@ -37,12 +37,14 @@ def configure(conf):
 
     s4_build = getattr(conf.env, '_SAMBA_BUILD_', 0) == 4
 
+    conf.env.standalone_ldb = conf.IN_LAUNCH_DIR()
 
     if not s4_build:
-        if conf.CHECK_BUNDLED_SYSTEM('ldb', minversion=VERSION,
-                                     onlyif='talloc tdb tevent',
-                                     implied_deps='replace talloc tdb tevent'):
-            conf.define('USING_SYSTEM_LDB', 1)
+        if not conf.env.standalone_ldb:
+            if conf.CHECK_BUNDLED_SYSTEM('ldb', minversion=VERSION,
+                                         onlyif='talloc tdb tevent',
+                                         implied_deps='replace talloc tdb tevent'):
+                conf.define('USING_SYSTEM_LDB', 1)
         # we need this for the ldap backend
         if conf.CHECK_FUNCS_IN('ber_flush ldap_open', 'lber ldap', headers='lber.h ldap.h'):
             conf.env.ENABLE_LDAP_BACKEND = True