summaryrefslogtreecommitdiffstats
path: root/ctdb/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'ctdb/wscript')
-rwxr-xr-xctdb/wscript15
1 files changed, 12 insertions, 3 deletions
diff --git a/ctdb/wscript b/ctdb/wscript
index 389afbbc5e..5014f056e5 100755
--- a/ctdb/wscript
+++ b/ctdb/wscript
@@ -12,7 +12,7 @@ while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
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()
@@ -66,7 +66,14 @@ def configure(conf):
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')
@@ -155,7 +162,9 @@ def configure(conf):
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')