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:
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"
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)")
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')