torture: Use system subunit library if available.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 23 Sep 2010 03:18:45 +0000 (20:18 -0700)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 23 Sep 2010 05:29:09 +0000 (22:29 -0700)
lib/subunit/c/wscript [new file with mode: 0644]
lib/torture/wscript_build
source4/wscript

diff --git a/lib/subunit/c/wscript b/lib/subunit/c/wscript
new file mode 100644 (file)
index 0000000..7544912
--- /dev/null
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+
+import Options
+
+def configure(conf):
+       if conf.CHECK_BUNDLED_SYSTEM('subunit', checkfunctions='subunit_test_start', headers='subunit/child.h'):
+               conf.define('USING_SYSTEM_SUBUNIT', 1)
+
+def build(bld):
+       if bld.CONFIG_SET('USING_SYSTEM_SUBUNIT'):
+               return
+
+       bld.SAMBA_LIBRARY('subunit', source='lib/child.c', is_bundled=True,
+                       includes='include')
index 56f17a636d3211e96e4102b7e5a0d16605a45ca6..7830b3a039bc9f11cbd0824301da2e4797616ada 100644 (file)
@@ -3,7 +3,6 @@
 
 bld.SAMBA_LIBRARY('torture',
        source='torture.c subunit.c ../subunit/c/lib/child.c',
-       includes='../subunit/c/include',
        vnum='0.0.1',
        pc_files='torture.pc',
        public_deps='LIBSAMBA-HOSTCONFIG LIBSAMBA-UTIL LIBSAMBA-ERRORS talloc tevent',
index 6bf8663d6c7d04ad63cf2c60e54776f4d4664111..958c058e757f86144e4f4577bbeaeda07d110f10 100644 (file)
@@ -111,6 +111,7 @@ def configure(conf):
     conf.RECURSE('../lib/socket_wrapper')
     conf.RECURSE('../lib/uid_wrapper')
     conf.RECURSE('../lib/popt')
+    conf.RECURSE('../lib/subunit/c')
     conf.RECURSE('lib/smbreadline')
     conf.RECURSE('../pidl')
     conf.RECURSE('selftest')