aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/libnetfilter-log/patches/0006-configure-add-without-ipulog-option-to-disable-libip.patch
blob: 839f81bbbd96d94f22faba861074b5b2f224b4a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
From a1b392b4156db984ab2b695a4a70d113f70cb9b8 Mon Sep 17 00:00:00 2001
From: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Date: Wed, 5 Feb 2014 14:18:57 +0100
Subject: [PATCH 6/6] configure: add --without-ipulog option to disable
 libipulog build

This is a compat library used for netfilter ULOG target.
ULOG only works with IPv4. NFLOG has replaced ULOG.

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 configure.ac                         |    5 +++++
 include/libnetfilter_log/Makefile.am |    5 ++++-
 src/Makefile.am                      |    6 +++++-
 utils/Makefile.am                    |    7 +++++--
 4 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 189a753..88ff7ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -24,6 +24,11 @@ case "$host" in
 *) AC_MSG_ERROR([Linux only, dude!]);;
 esac
 
+AC_ARG_WITH([ipulog],
+  AC_HELP_STRING([--without-ipulog], [don't build libipulog compat library]),
+  [ipulog_skip=1], [ipulog_skip=0])
+AM_CONDITIONAL([BUILD_IPULOG], [test $ipulog_skip = 0])
+
 dnl Dependencies
 PKG_CHECK_MODULES([LIBNFNETLINK], [libnfnetlink >= 0.0.41])
 
diff --git a/include/libnetfilter_log/Makefile.am b/include/libnetfilter_log/Makefile.am
index fe934f1..fde1d60 100644
--- a/include/libnetfilter_log/Makefile.am
+++ b/include/libnetfilter_log/Makefile.am
@@ -1,3 +1,6 @@
 
-pkginclude_HEADERS = libnetfilter_log.h libipulog.h linux_nfnetlink_log.h
+pkginclude_HEADERS = libnetfilter_log.h linux_nfnetlink_log.h
 
+if BUILD_IPULOG
+pkginclude_HEADERS += libipulog.h
+endif
diff --git a/src/Makefile.am b/src/Makefile.am
index 10a66e2..33933a4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -22,14 +22,18 @@ LIBVERSION=2:0:1
 
 include ${top_srcdir}/Make_global.am
 
-lib_LTLIBRARIES = libnetfilter_log.la libnetfilter_log_libipulog.la
+lib_LTLIBRARIES = libnetfilter_log.la
 
 libnetfilter_log_la_LDFLAGS = -Wc,-nostartfiles -lnfnetlink	\
 			      -version-info $(LIBVERSION)
 libnetfilter_log_la_SOURCES = libnetfilter_log.c 
 libnetfilter_log_la_LIBADD  = ${LIBNFNETLINK_LIBS}
 
+if BUILD_IPULOG
+lib_LTLIBRARIES += libnetfilter_log_libipulog.la
+
 libnetfilter_log_libipulog_la_LDFLAGS = -Wc,-nostartfiles	\
 					-version-info 1:0:0
 libnetfilter_log_libipulog_la_LIBADD = libnetfilter_log.la
 libnetfilter_log_libipulog_la_SOURCES = libipulog_compat.c
+endif
diff --git a/utils/Makefile.am b/utils/Makefile.am
index ae64c90..f961b6c 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -1,12 +1,15 @@
 include ${top_srcdir}/Make_global.am
 
-check_PROGRAMS = nfulnl_test ulog_test
+check_PROGRAMS = nfulnl_test
 
 nfulnl_test_SOURCES = nfulnl_test.c
 nfulnl_test_LDADD = ../src/libnetfilter_log.la
 nfulnl_test_LDFLAGS = -dynamic
 
+if BUILD_IPULOG
+check_PROGRAMS += ulog_test
+
 ulog_test_SOURCES = ulog_test.c
 ulog_test_LDADD = ../src/libnetfilter_log_libipulog.la ../src/libnetfilter_log.la
 ulog_test_LDFLAGS = -dynamic
-
+endif
-- 
1.7.10.4