diff options
author | Björn Baumbach <bb@sernet.de> | 2012-10-30 16:04:10 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2012-11-02 13:47:35 +0100 |
commit | d551b4ab4bb06dac7d90389febbc21c2afae8bca (patch) | |
tree | 15dbcd49fc5550802229e3596e7e64e8df74bf38 /source3/wscript | |
parent | 5f1b5404b8e642dd18b55e37793068216f668242 (diff) | |
download | samba-d551b4ab4bb06dac7d90389febbc21c2afae8bca.tar.gz samba-d551b4ab4bb06dac7d90389febbc21c2afae8bca.tar.bz2 samba-d551b4ab4bb06dac7d90389febbc21c2afae8bca.zip |
build(waf): Fail "configure --with-cluster-support" if ctdb support is not available.
Currently, configure only warns if cluster support is not found.
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/wscript')
-rw-r--r-- | source3/wscript | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source3/wscript b/source3/wscript index 157a8c9d16..96ab4deb2c 100644 --- a/source3/wscript +++ b/source3/wscript @@ -43,7 +43,7 @@ def set_options(opt): opt.SAMBA3_ADD_OPTION('aio-support') opt.SAMBA3_ADD_OPTION('profiling-data', default=False) - opt.SAMBA3_ADD_OPTION('cluster-support') + opt.SAMBA3_ADD_OPTION('cluster-support', default=None) opt.add_option('--with-ctdb-dir', help=("Directory under which ctdb is installed"), @@ -1288,7 +1288,9 @@ main() { # # checking for clustering extensions (CTDB) # - if not Options.options.with_cluster_support: + if Options.options.with_cluster_support == False: + # configure is called with --without-cluster-support, + # so don't check for and build w/o ctdb support. have_cluster_support = False else: @@ -1519,14 +1521,16 @@ main() { Logs.info("building with cluster support") conf.DEFINE('CLUSTER_SUPPORT', 1); else: - if not Options.options.with_cluster_support: - Logs.info("building without cluster support") + if Options.options.with_cluster_support == False: + Logs.info("building without cluster support (--without-cluster-support)") + elif Options.options.with_cluster_support == True: + Logs.error("Cluster support not available: " + ctdb_broken) + conf.fatal("Cluster support not found, but --with-cluster-support was specified") else: - Logs.warn("building without cluster support: " + ctdb_broken) + Logs.info("building without cluster support: " + ctdb_broken) conf.undefine('CLUSTER_SUPPORT') - conf.CHECK_CODE('__attribute__((destructor)) static void cleanup(void) { }', 'HAVE_FUNCTION_ATTRIBUTE_DESTRUCTOR', addmain=False, |