diff mbox

[3/3,v2] kismet: Fix static build

Message ID 0595c07a5d923887ee61e9a3a5084da616b92329.1419627979.git.yann.morin.1998@free.fr
State Accepted
Headers show

Commit Message

Yann E. MORIN Dec. 26, 2014, 9:08 p.m. UTC
From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

Use pcap-config to list optional libpcap dependencies needed for static
link. Otherwise we will see errors like this one:

/br/output/host/usr/mipsel-buildroot-linux-uclibc/sysroot/usr/lib/libpcap.a(pcap-canusb-linux.o):
In function `canusb_close':
pcap-canusb-linux.c:(.text+0xec): undefined reference to `libusb_close'

Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
[yann.morin.1998@free.fr: remove the ncurses bits (done differently in
 another patch), fix BR2_PREFER_STATIC_LIB -> BR2_STATIC_LIBS]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
 package/kismet/kismet.mk | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/package/kismet/kismet.mk b/package/kismet/kismet.mk
index a71414e..117d182 100644
--- a/package/kismet/kismet.mk
+++ b/package/kismet/kismet.mk
@@ -15,6 +15,10 @@  KISMET_LICENSE_FILES = debian/copyright
 # We touch configure.in:
 KISMET_AUTORECONF = YES
 
+ifeq ($(BR2_STATIC_LIBS),y)
+KISMET_CONF_ENV = LIBS="-lpcap $(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)"
+endif
+
 ifeq ($(BR2_PACKAGE_PCRE),y)
 	KISMET_DEPENDENCIES += pcre
 endif