kumquat-buildroot/package/tcpreplay/tcpreplay.mk
Baruch Siach ae1e6320e2 tcpreplay: fix static link with libpcap
The tcpreplay configure script does not look for static libpcap.a unless
dynamic link is disabled.

Fixes:
http://autobuild.buildroot.net/results/e7e/e7e7744ac0a22eded05f237e40b0cdaeec4ce005/
http://autobuild.buildroot.net/results/3e3/3e33a67965eb37471ec3303ee26f6a66a82383a2/
http://autobuild.buildroot.net/results/fff/fff0d6a814b765699cba803ececbc00d77e5d8fc/

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-03-29 20:26:28 +02:00

34 lines
1.1 KiB
Makefile

################################################################################
#
# tcpreplay
#
################################################################################
TCPREPLAY_VERSION = 4.1.1
TCPREPLAY_SITE = https://github.com/appneta/tcpreplay/releases/download/v$(TCPREPLAY_VERSION)
TCPREPLAY_LICENSE = GPLv3
TCPREPLAY_LICENSE_FILES = docs/LICENSE
TCPREPLAY_CONF_ENV = \
tr_cv_libpcap_version=">= 0.7.0" \
ac_cv_have_bpf=no \
$(call AUTOCONF_AC_CHECK_FILE_VAL,$(STAGING_DIR)/usr/include/pcap-netmap.c)=no
TCPREPLAY_CONF_OPTS = --with-libpcap=$(STAGING_DIR)/usr
TCPREPLAY_DEPENDENCIES = libpcap
# libpcap may depend on symbols in other libs
TCPREPLAY_LIBS = $(STAGING_DIR)/usr/bin/pcap-config --static --libs
TCPREPLAY_CONF_ENV += ac_cv_search_pcap_close="`$(TCPREPLAY_LIBS)`" \
LIBS="`$(TCPREPLAY_LIBS)`"
ifeq ($(BR2_STATIC_LIBS),y)
TCPREPLAY_CONF_OPTS += --enable-dynamic-link=no
endif
ifeq ($(BR2_PACKAGE_TCPDUMP),y)
TCPREPLAY_CONF_ENV += ac_cv_path_tcpdump_path=/usr/sbin/tcpdump
else
TCPREPLAY_CONF_ENV += ac_cv_path_tcpdump_path=no
endif
$(eval $(autotools-package))