From e805bf52c9ed32bd53759996b5700c5d582a2a58 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 4 Oct 2010 13:38:39 +0200 Subject: tdb: Support using system pytdb. --- lib/tdb/wscript | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'lib/tdb/wscript') diff --git a/lib/tdb/wscript b/lib/tdb/wscript index d9c0ceb41b..bbd270095c 100644 --- a/lib/tdb/wscript +++ b/lib/tdb/wscript @@ -36,6 +36,8 @@ def configure(conf): if conf.CHECK_BUNDLED_SYSTEM('tdb', minversion=VERSION, implied_deps='replace'): conf.define('USING_SYSTEM_TDB', 1) + if conf.CHECK_BUNDLED_SYSTEM_PYTHON('pytdb', 'tdb', minversion=VERSION): + conf.define('USING_SYSTEM_PYTDB', 1) conf.env.disable_python = getattr(Options.options, 'disable_python', False) @@ -92,14 +94,13 @@ def build(bld): 'tools/tdbtool.c', 'tdb', manpages='manpages/tdbtool.8') - s4_build = getattr(bld.env, '_SAMBA_BUILD_', 0) == 4 - - bld.SAMBA_PYTHON('pytdb', - 'pytdb.c', - deps='tdb', - enabled=not bld.env.disable_python, - realname='tdb.so', - cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION) + if not bld.CONFIG_SET('USING_SYSTEM_PYTDB'): + bld.SAMBA_PYTHON('pytdb', + 'pytdb.c', + deps='tdb', + enabled=not bld.env.disable_python, + realname='tdb.so', + cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION) if bld.env.standalone_tdb: bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' -- cgit