From a83e9ca696a37b00231ce40cca5a043beb9b5590 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 23 Jul 2021 14:39:05 +1000 Subject: [PATCH] ctdb-build: Use pcap-config when available The build currently fails on AIX, which can't find the pcap headers because they're installed in a non-standard place. However, there is a pcap-config script available. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- ctdb/wscript | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ctdb/wscript b/ctdb/wscript index c082c3b7a7d..8f6e2bb5203 100644 --- a/ctdb/wscript +++ b/ctdb/wscript @@ -204,6 +204,12 @@ def configure(conf): if sys.platform.startswith('linux'): conf.SET_TARGET_TYPE('pcap', 'EMPTY') else: + conf.find_program('pcap-config', var='PCAP_CONFIG') + if conf.env.PCAP_CONFIG: + conf.CHECK_CFG(path=conf.env.PCAP_CONFIG, + args="--cflags --libs", + package="", + uselib_store="PCAP") if not conf.CHECK_HEADERS('pcap.h'): Logs.error('Need libpcap') sys.exit(1)