package/ulogd: add optional support for libpcap
authorBernd Kuhls <bernd.kuhls@t-online.de>
Wed, 10 Feb 2016 20:58:55 +0000 (21:58 +0100)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 16 Feb 2016 22:11:34 +0000 (23:11 +0100)
When libpcap was compiled before, ulogd will use it as optional
dependency:

$ output/host/usr/bin/i586-buildroot-linux-uclibc-readelf -a output/target/usr/lib/ulogd/ulogd_output_PCAP.so | grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [libpcap.so.1]
 0x00000001 (NEEDED)                     Shared library: [libc.so.1]

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/ulogd/ulogd.mk

index 363b8c818e9ef58fe42f75a8e50c8cea5f428da2..4017edc7bf6394a8128186f74ed7e1c31aef3256 100644 (file)
@@ -29,6 +29,13 @@ else
 ULOGD_CONF_OPTS += --with-mysql=no --without-sqlite
 endif
 
+ifeq ($(BR2_PACKAGE_LIBPCAP),y)
+ULOGD_CONF_OPTS += --with-pcap
+ULOGD_DEPENDENCIES += libpcap
+else
+ULOGD_CONF_OPTS += --without-pcap
+endif
+
 ifeq ($(BR2_PACKAGE_JANSSON),y)
 ULOGD_CONF_OPTS += --with-jansson
 ULOGD_DEPENDENCIES += jansson