10 # find the buildtools directory
11 buildtools = 'buildtools ../../buildtools'
12 for d in buildtools.split():
14 srcdir = os.path.dirname(d) or '.'
17 sys.path.insert(0, srcdir+"/buildtools/wafsamba")
21 LIBREPLACE_DIR= srcdir + '/lib/replace'
24 opt.BUILTIN_DEFAULT('replace')
25 opt.BUNDLED_EXTENSION_DEFAULT('tdb', noextenion='tdb')
26 opt.recurse(LIBREPLACE_DIR)
29 conf.DIST_DIRS('lib/tdb:. lib/replace:lib/replace buildtools:buildtools')
30 conf.sub_config(LIBREPLACE_DIR)
32 if conf.CHECK_BUNDLED_SYSTEM('tdb', minversion=VERSION,
33 implied_deps='replace'):
34 conf.define('USING_SYSTEM_TDB', 1)
39 bld.BUILD_SUBDIR(LIBREPLACE_DIR)
41 COMMON_SRC = bld.SUBDIR('common',
42 '''check.c error.c tdb.c traverse.c
43 freelistcheck.c lock.c dump.c freelist.c
44 io.c open.c transaction.c''')
46 if not bld.CONFIG_SET('USING_SYSTEM_TDB'):
47 bld.SAMBA_LIBRARY('tdb',
53 bld.SAMBA_BINARY('tdbtorture',
57 bld.SAMBA_BINARY('tdbdump',
61 bld.SAMBA_BINARY('tdbbackup',
65 bld.SAMBA_BINARY('tdbtool',
69 s4_build = getattr(bld.env, '_SAMBA_BUILD_', 0) == 4
71 bld.SAMBA_PYTHON('pytdb',