tcpdump: fix static build
authorBaruch Siach <baruch@tkos.co.il>
Tue, 11 Nov 2014 10:23:03 +0000 (12:23 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 11 Nov 2014 21:40:55 +0000 (22:40 +0100)
Commit 746116d1eb2e (tcpdump: use libpcap shared library) broke static build
of tcpdump, because its configure script doesn't take into account indirect
dependencies of libpcap. Add these dependencies to the LIBS configure
parameter.

Fixes:
http://autobuild.buildroot.net/results/fd231d34e4bb0306609b021e9e74eb862b7bd6bd/

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/tcpdump/tcpdump.mk

index e62dfaf44a89b984d6f7d1a6caae854caabacc5f..1acf7d9e30658998a45a9a3e8bb68c6f98cc1aeb 100644 (file)
@@ -16,6 +16,10 @@ TCPDUMP_DEPENDENCIES = zlib libpcap
 # Patching aclocal.m4
 TCPDUMP_AUTORECONF = YES
 
+ifeq ($(BR2_PREFER_STATIC_LIB),y)
+TCPDUMP_CONF_OPTS += LIBS="$(shell $(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs)"
+endif
+
 # make install installs an unneeded extra copy of the tcpdump binary
 define TCPDUMP_REMOVE_DUPLICATED_BINARY
        rm -f $(TARGET_DIR)/usr/sbin/tcpdump.$(TCPDUMP_VERSION)