knock: fix static build
authorBaruch Siach <baruch@tkos.co.il>
Sun, 22 Jun 2014 17:23:16 +0000 (20:23 +0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 22 Jun 2014 19:53:35 +0000 (21:53 +0200)
Use pcap-config to determine link dependencies of libpcap.

Fixes:
http://autobuild.buildroot.net/results/1eb/1eb877ebd9469c9261bf114fc7733819ae3fd562/

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/knock/knock.mk

index 8d2b41e859f4d6eb96fe8e020a5c2b1cbc242654..682d0316c402bf594241d40631b5118d8c5e5f32 100644 (file)
@@ -10,4 +10,8 @@ KNOCK_LICENSE = GPLv2+
 KNOCK_LICENSE_FILES = COPYING
 KNOCK_DEPENDENCIES = libpcap
 
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+KNOCK_CONF_OPT = LIBS="$(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)"
+endif
+
 $(eval $(autotools-package))