package/vlc: backport upstream patches to fix compat function for static_assert
[buildroot-gz.git] / package / libpcap / libpcap.mk
blob4c7a66c09d13c5c29545e71c089e797824c27586
1 ################################################################################
3 # libpcap
5 ################################################################################
7 LIBPCAP_VERSION = 1.7.4
8 LIBPCAP_SITE = http://www.tcpdump.org/release
9 LIBPCAP_LICENSE = BSD-3c
10 LIBPCAP_LICENSE_FILES = LICENSE
11 LIBPCAP_INSTALL_STAGING = YES
12 LIBPCAP_DEPENDENCIES = zlib host-flex host-bison
14 # We're patching configure.in
15 LIBPCAP_AUTORECONF = YES
16 LIBPCAP_CONF_ENV = \
17 ac_cv_linux_vers=2 \
18 ac_cv_header_linux_wireless_h=yes \
19 CFLAGS="$(LIBPCAP_CFLAGS)"
20 LIBPCAP_CFLAGS = $(TARGET_CFLAGS)
21 LIBPCAP_CONF_OPTS = --disable-yydebug --with-pcap=linux
22 LIBPCAP_CONFIG_SCRIPTS = pcap-config
24 # Omit -rpath from pcap-config output
25 define LIBPCAP_CONFIG_REMOVE_RPATH
26 $(SED) 's/^V_RPATH_OPT=.*/V_RPATH_OPT=""/g' $(@D)/pcap-config
27 endef
28 LIBPCAP_POST_BUILD_HOOKS = LIBPCAP_CONFIG_REMOVE_RPATH
30 # On purpose, not compatible with bluez5
31 ifeq ($(BR2_PACKAGE_BLUEZ_UTILS),y)
32 LIBPCAP_DEPENDENCIES += bluez_utils
33 else
34 LIBPCAP_CONF_OPTS += --disable-bluetooth
35 endif
37 ifeq ($(BR2_PACKAGE_DBUS),y)
38 LIBPCAP_CONF_OPTS += --enable-dbus
39 LIBPCAP_DEPENDENCIES += dbus
40 else
41 LIBPCAP_CONF_OPTS += --disable-dbus
42 endif
44 ifeq ($(BR2_PACKAGE_LIBUSB),y)
45 LIBPCAP_CONF_OPTS += --enable-canusb
46 LIBPCAP_DEPENDENCIES += libusb
47 else
48 LIBPCAP_CONF_OPTS += --disable-canusb
49 endif
51 ifeq ($(BR2_PACKAGE_LIBNL),y)
52 LIBPCAP_DEPENDENCIES += libnl
53 LIBPCAP_CFLAGS += "-I$(STAGING_DIR)/usr/include/libnl3"
54 else
55 LIBPCAP_CONF_OPTS += --without-libnl
56 endif
58 # microblaze/sparc64 need -fPIC instead of -fpic
59 ifeq ($(BR2_microblaze)$(BR2_sparc64),y)
60 LIBPCAP_CFLAGS += -fPIC
61 endif
63 $(eval $(autotools-package))