summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/talloc/wscript15
-rw-r--r--lib/tdb/wscript15
-rw-r--r--lib/tevent/wscript13
3 files changed, 30 insertions, 13 deletions
diff --git a/lib/talloc/wscript b/lib/talloc/wscript
index 6d16e15d53..be21bde18c 100644
--- a/lib/talloc/wscript
+++ b/lib/talloc/wscript
@@ -18,15 +18,22 @@ def set_options(opt):
def configure(conf):
conf.sub_config(LIBREPLACE_DIR)
+
+ if conf.CHECK_BUNDLED_SYSTEM('talloc', minversion=VERSION):
+ conf.define('USING_SYSTEM_TALLOC', 1)
+
conf.SAMBA_CONFIG_H()
+
+
def build(bld):
bld.BUILD_SUBDIR(LIBREPLACE_DIR)
- bld.SAMBA_LIBRARY('talloc',
- 'talloc.c',
- deps='replace',
- vnum=VERSION)
+ if not bld.CONFIG_SET('USING_SYSTEM_TALLOC'):
+ bld.SAMBA_LIBRARY('talloc',
+ 'talloc.c',
+ deps='replace',
+ vnum=VERSION)
bld.SAMBA_BINARY('talloc_testsuite',
'testsuite.c testsuite_main.c',
diff --git a/lib/tdb/wscript b/lib/tdb/wscript
index e146ba79b0..365c384201 100644
--- a/lib/tdb/wscript
+++ b/lib/tdb/wscript
@@ -19,6 +19,10 @@ def set_options(opt):
def configure(conf):
conf.sub_config(LIBREPLACE_DIR)
+
+ if conf.CHECK_BUNDLED_SYSTEM('tdb', minversion=VERSION):
+ conf.define('USING_SYSTEM_TDB', 1)
+
conf.SAMBA_CONFIG_H()
def build(bld):
@@ -29,11 +33,12 @@ def build(bld):
freelistcheck.c lock.c dump.c freelist.c
io.c open.c transaction.c''')
- bld.SAMBA_LIBRARY('tdb',
- COMMON_SRC,
- deps='replace rt',
- includes='include',
- vnum=VERSION)
+ if not bld.CONFIG_SET('USING_SYSTEM_TDB'):
+ bld.SAMBA_LIBRARY('tdb',
+ COMMON_SRC,
+ deps='replace rt',
+ includes='include',
+ vnum=VERSION)
bld.SAMBA_BINARY('tdbtorture',
'tools/tdbtorture.c',
diff --git a/lib/tevent/wscript b/lib/tevent/wscript
index f017581fae..e6ef67a8d6 100644
--- a/lib/tevent/wscript
+++ b/lib/tevent/wscript
@@ -22,6 +22,9 @@ def configure(conf):
conf.sub_config(LIBREPLACE_DIR)
conf.sub_config(LIBTALLOC_DIR)
+ if conf.CHECK_BUNDLED_SYSTEM('tevent', minversion=VERSION):
+ conf.define('USING_SYSTEM_TEVENT', 1)
+
if conf.CHECK_FUNCS('epoll_create', headers='sys/epoll.h'):
conf.DEFINE('HAVE_EPOLL', 1)
@@ -38,7 +41,9 @@ def build(bld):
if bld.CONFIG_SET('HAVE_EPOLL'):
SRC += ' tevent_epoll.c'
- bld.SAMBA_LIBRARY('tevent',
- SRC,
- deps='replace talloc',
- vnum=VERSION)
+ if not bld.CONFIG_SET('USING_SYSTEM_TEVENT'):
+ bld.SAMBA_LIBRARY('tevent',
+ SRC,
+ deps='replace talloc',
+ enabled= not bld.CONFIG_SET('USING_SYSTEM_TEVENT'),
+ vnum=VERSION)