reaver: fix static link build issue
authorGuillaume W. Bres <guillaume.bressaix@gmail.com>
Sun, 22 Apr 2018 15:51:59 +0000 (17:51 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Wed, 25 Apr 2018 20:21:46 +0000 (22:21 +0200)
When libpcap itself is linked against other libraries, reaver fails to
build as it doesn't link with libpcap dependencies. This patch fixes
that by using the pcap-config program.

Fixes:

  http://autobuild.buildroot.net/results/899fd633288d5cd5aa221413cded857e4f743194/

Signed-off-by: Guillaume W. Bres <guillaume.bressaix@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/reaver/reaver.mk

index 90d1727bad6d13349be2ace233bfd75578200f7c..d9a621a847880e0f721317beb2132e5bd0570987 100644 (file)
@@ -14,4 +14,10 @@ REAVER_LICENSE_FILES = docs/LICENSE
 REAVER_SUBDIR = src
 REAVER_DEPENDENCIES = libpcap
 
+ifeq ($(BR2_STATIC_LIBS),y)
+REAVER_CONF_ENV += \
+       LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`" \
+       LDFLAGS="$(TARGET_LDFLAGS) `$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`"
+endif
+
 $(eval $(autotools-package))