]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
daq: libpcap is optional not mandatory
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Thu, 4 Jan 2018 19:17:39 +0000 (20:17 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sat, 6 Jan 2018 14:20:54 +0000 (15:20 +0100)
daq can be compiled without libpcap thanks to --enable-pcap-module and
 --disable-pcap-module options.
libpcap is just a mandadory dependency of snort.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/daq/Config.in
package/daq/daq.mk

index 78000616421144d84a935b470c8c2595f520fcfa..1d24c6d11a930237f69da1b661b8d0d4b4b7c5ea 100644 (file)
@@ -1,7 +1,6 @@
 config BR2_PACKAGE_DAQ
        bool "daq"
        depends on !BR2_STATIC_LIBS # dlfcn.h
-       select BR2_PACKAGE_LIBPCAP
        select BR2_PACKAGE_LIBDNET
        help
          DAQ is a Data Acquisition library for packet I/O from the
index c4b4c881f1aaa1d492c72aad73efb42f4ba992ae..4499fb4b68eaa0d38620c7ac74f580561a96c451 100644 (file)
@@ -10,16 +10,22 @@ DAQ_SOURCE = daq-$(DAQ_VERSION).tar.gz
 DAQ_LICENSE = GPL-2.0
 DAQ_LICENSE_FILES = COPYING
 DAQ_INSTALL_STAGING = YES
-DAQ_DEPENDENCIES = libpcap libdnet
+DAQ_DEPENDENCIES = libdnet
 
 # package does not build in parallel due to improper make rules
 # related to the generation of the tokdefs.h header file
 DAQ_MAKE = $(MAKE1)
 
+ifeq ($(BR2_PACKAGE_LIBPCAP),y)
+DAQ_DEPENDENCIES += libpcap
 # assume these flags are available to prevent configure from running
 # test programs while cross compiling
-DAQ_CONF_ENV = \
+DAQ_CONF_ENV += \
        ac_cv_lib_pcap_pcap_lib_version=yes \
        daq_cv_libpcap_version_1x=yes
+DAQ_CONF_OPTS += --enable-pcap-module
+else
+DAQ_CONF_OPTS += --disable-pcap-module
+endif
 
 $(eval $(autotools-package))