summaryrefslogtreecommitdiffstats
path: root/source3/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'source3/wscript')
-rw-r--r--source3/wscript14
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/wscript b/source3/wscript
index 17cc17b835d..c1fadef79f7 100644
--- a/source3/wscript
+++ b/source3/wscript
@@ -1438,8 +1438,9 @@ main() {
else:
- if Options.options.ctdb_dir:
- conf.ADD_EXTRA_INCLUDES(Options.options.ctdb_dir + '/include')
+ have_cluster_support = True
+ ctdb_broken = ""
+ CTDB_CFLAGS = ""
srcdir = os.path.realpath(conf.srcdir)
if 'EXTRA_INCLUDES' in conf.env:
@@ -1447,15 +1448,16 @@ main() {
else:
includes = ''
+ if Options.options.ctdb_dir:
+ CTDB_CFLAGS = '-I' + Options.options.ctdb_dir + '/include'
+ includes = includes + ' ' + Options.options.ctdb_dir + '/include'
+
if not conf.env.USING_SYSTEM_TDB:
includes = includes + ' ' + srcdir + '/lib/tdb/include'
if not conf.env.USING_SYSTEM_TALLOC:
includes = includes + ' ' + srcdir + '/lib/talloc'
- have_cluster_support = True
- ctdb_broken = ""
-
conf.CHECK_CODE('''
#define NO_CONFIG_H
#include "replace.h"
@@ -1691,6 +1693,7 @@ main() {
if have_cluster_support:
Logs.info("building with cluster support")
conf.DEFINE('CLUSTER_SUPPORT', 1);
+ conf.env['CTDB_CFLAGS'] = CTDB_CFLAGS
else:
if Options.options.with_cluster_support == False:
Logs.info("building without cluster support (--without-cluster-support)")
@@ -1699,6 +1702,7 @@ main() {
conf.fatal("Cluster support not found, but --with-cluster-support was specified")
else:
Logs.info("building without cluster support: " + ctdb_broken)
+ conf.env['CTDB_CFLAGS'] = ''
conf.undefine('CLUSTER_SUPPORT')