srcdir = srcdir + '/..'
sys.path.insert(0, srcdir + '/buildtools/wafsamba')
-import wafsamba, samba_dist, Options, Logs
+import wafsamba, samba_dist, Options, Logs, Utils
import samba_utils, samba_version
env = samba_utils.LOAD_ENVIRONMENT()
Options.options.disable_python = True
conf.RECURSE('lib/replace')
- conf.RECURSE('lib/popt')
+ if conf.CHECK_FOR_THIRD_PARTY():
+ conf.RECURSE('third_party/popt')
+ else:
+ if not conf.CHECK_POPT():
+ raise Utils.WafError('popt development packages have not been found\nIf third_party is installed, check that it is in the proper place.')
+ else:
+ conf.define('USING_SYSTEM_POPT', 1)
+
conf.RECURSE('lib/talloc')
conf.RECURSE('lib/tevent')
conf.RECURSE('lib/tdb')
def build(bld):
bld.RECURSE('lib/replace')
- bld.RECURSE('lib/popt')
+ if bld.CHECK_FOR_THIRD_PARTY():
+ bld.RECURSE('third_party/popt')
+
bld.RECURSE('lib/talloc')
bld.RECURSE('lib/tevent')
bld.RECURSE('lib/tdb')