From d1ea95e3c30d4217964c66e135db6e49bac753d5 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Mon, 15 Sep 2014 16:10:16 +1000 Subject: ctdb-build: Check for libpcap AIX and FreeBSD do not support raw sockets. So use libpcap interface to watch for specific TCP messages. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- ctdb/wscript | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'ctdb/wscript') diff --git a/ctdb/wscript b/ctdb/wscript index fd7650a5cf0..96782af56f1 100755 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -93,6 +93,16 @@ def configure(conf): if not conf.CHECK_VARIABLE('ETIME', headers='errno.h'): conf.DEFINE('ETIME', 'ETIMEDOUT') + if sys.platform.startswith('linux'): + conf.SET_TARGET_TYPE('pcap', 'EMPTY') + else: + if not conf.CHECK_HEADERS('pcap.h'): + Logs.error('Need libpcap') + sys.exit(1) + if not conf.CHECK_FUNCS_IN('pcap_open_live', 'pcap', headers='pcap.h'): + Logs.error('Need libpcap') + sys.exit(1) + have_pmda = False if Options.options.ctdb_pmda: pmda_support = True @@ -246,7 +256,7 @@ def build(bld): bld.SAMBA_SUBSYSTEM('ctdb-system', source=CTDB_SYSTEM_SRC, includes='include include/internal', - deps='replace talloc tevent tdb') + deps='replace talloc tevent tdb pcap') bld.SAMBA_SUBSYSTEM('ctdb-client', source=bld.SUBDIR('client', 'ctdb_client.c'), -- cgit v1.2.1