s4-waf: don't try to use the system lib for the library build
authorAndrew Tridgell <tridge@samba.org>
Tue, 13 Apr 2010 11:33:04 +0000 (21:33 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 13 Apr 2010 13:03:27 +0000 (23:03 +1000)
when building library FOO, don't try to find the system library FOO

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

lib/talloc/wscript
lib/tdb/wscript
source4/lib/ldb/wscript

index bd47be8eaab243b09dd946379869a111f758525b..f6170effe4717fde9558751e1a0afec3024a1044 100644 (file)
@@ -33,12 +33,13 @@ def set_options(opt):
 def configure(conf):
     conf.RECURSE('lib/replace')
 
-    if conf.CHECK_BUNDLED_SYSTEM('talloc', minversion=VERSION,
-                                 implied_deps='replace'):
-        conf.define('USING_SYSTEM_TALLOC', 1)
-
     conf.env.standalone_talloc = conf.IN_LAUNCH_DIR()
 
+    if not conf.env.standalone_talloc:
+        if conf.CHECK_BUNDLED_SYSTEM('talloc', minversion=VERSION,
+                                     implied_deps='replace'):
+            conf.define('USING_SYSTEM_TALLOC', 1)
+
     conf.env.TALLOC_COMPAT1 = Options.options.TALLOC_COMPAT1
 
     if conf.env.standalone_talloc:
index c5706a2f16192111112a7d837cad8a50b65f557b..de62d4a75818f8c213ee7377ddb21dae12e42741 100644 (file)
@@ -30,11 +30,13 @@ def set_options(opt):
 def configure(conf):
     conf.RECURSE('lib/replace')
 
-    if conf.CHECK_BUNDLED_SYSTEM('tdb', minversion=VERSION,
-                                 implied_deps='replace'):
-        conf.define('USING_SYSTEM_TDB', 1)
-
     conf.env.standalone_tdb = conf.IN_LAUNCH_DIR()
+
+    if not conf.env.standalone_tdb:
+        if conf.CHECK_BUNDLED_SYSTEM('tdb', minversion=VERSION,
+                                     implied_deps='replace'):
+            conf.define('USING_SYSTEM_TDB', 1)
+
     conf.env.disable_python = getattr(Options.options, 'disable_python', False)
 
     if conf.env.standalone_tdb:
@@ -93,7 +95,6 @@ def build(bld):
 
     if bld.env.standalone_tdb:
         bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
-        bld.env.TALLOC_VERSION = VERSION
         bld.PKG_CONFIG_FILES('tdb.pc', vnum=VERSION)
         bld.INSTALL_FILES('${INCLUDEDIR}', 'include/tdb.h', flat=True)
 
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