* [Buildroot] [PATCH v2,1/1] daq: libpcap is optional not mandatory
@ 2018-01-04 19:17 Fabrice Fontaine
2018-01-06 14:27 ` [Buildroot] [PATCH v2, 1/1] " Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2018-01-04 19:17 UTC (permalink / raw)
To: buildroot
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>
---
Changes v1 -> v2 (after review of Baruch Siach):
- Change DAQ_CONF_ENV assignment from = to += as it is now in a ifeq
statement to avoid issues later when someone will want to update
DAQ_CONF_ENV before this ifeq statement
package/daq/Config.in | 1 -
package/daq/daq.mk | 12 ++++++++++--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/package/daq/Config.in b/package/daq/Config.in
index 7800061642..1d24c6d11a 100644
--- a/package/daq/Config.in
+++ b/package/daq/Config.in
@@ -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
diff --git a/package/daq/daq.mk b/package/daq/daq.mk
index c4b4c881f1..15ddcc9763 100644
--- a/package/daq/daq.mk
+++ b/package/daq/daq.mk
@@ -10,16 +10,24 @@ 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))
--
2.14.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH v2, 1/1] daq: libpcap is optional not mandatory
2018-01-04 19:17 [Buildroot] [PATCH v2,1/1] daq: libpcap is optional not mandatory Fabrice Fontaine
@ 2018-01-06 14:27 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2018-01-06 14:27 UTC (permalink / raw)
To: buildroot
Hello,
On Thu, 4 Jan 2018 20:17:39 +0100, Fabrice Fontaine wrote:
> 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>
> ---
> Changes v1 -> v2 (after review of Baruch Siach):
> - Change DAQ_CONF_ENV assignment from = to += as it is now in a ifeq
> statement to avoid issues later when someone will want to update
> DAQ_CONF_ENV before this ifeq statement
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-06 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-04 19:17 [Buildroot] [PATCH v2,1/1] daq: libpcap is optional not mandatory Fabrice Fontaine
2018-01-06 14:27 ` [Buildroot] [PATCH v2, 1/1] " Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox