8 # find the buildtools directory
10 buildtools = 'buildtools ../../buildtools'
11 for d in buildtools.split():
13 srcdir = os.path.dirname(d) or '.'
17 LIBREPLACE_DIR= srcdir + '/lib/replace'
20 sys.path.insert(0, srcdir+"/buildtools/wafsamba")
21 import wafsamba, samba_dist
24 opt.BUILTIN_DEFAULT('replace')
25 opt.BUNDLED_EXTENSION_DEFAULT('talloc', noextenion='talloc')
26 opt.recurse(LIBREPLACE_DIR)
29 conf.DIST_DIRS('lib/talloc:. lib/replace:lib/replace buildtools:buildtools')
30 conf.sub_config(LIBREPLACE_DIR)
32 if conf.CHECK_BUNDLED_SYSTEM('talloc', minversion=VERSION,
33 implied_deps='replace'):
34 conf.define('USING_SYSTEM_TALLOC', 1)
36 conf.env.standalone_talloc = conf.IN_LAUNCH_DIR()
43 bld.BUILD_SUBDIR(LIBREPLACE_DIR)
45 if not bld.CONFIG_SET('USING_SYSTEM_TALLOC'):
46 bld.SAMBA_LIBRARY('talloc',
51 if not getattr(bld.env, '_SAMBA_BUILD_', 0) == 4:
52 # s4 already has the talloc testsuite builtin to smbtorture
53 bld.SAMBA_BINARY('talloc_testsuite',
54 'testsuite_main.c testsuite.c',
58 if bld.env.standalone_talloc:
59 bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
60 bld.env.TALLOC_VERSION = VERSION
61 bld.PKG_CONFIG_FILES('talloc.pc', vnum=VERSION)
65 '''makes a tarball for distribution'''