Skip to contentSkip to conversation

configure: add --without-ipulog option to disable libipulog build

RFC PATCH In review Matthieu Crapet 2 participants 2 messages Feb 5, 2014 – Feb 12, 2014 netfilter

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 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.

---
 configure.ac                         |    5 +++++
 include/libnetfilter_log/Makefile.am |    4 ++++
 src/Makefile.am                      |    6 +++++-
 utils/Makefile.am                    |    7 +++++--
 4 files changed, 19 insertions(+), 3 deletions(-)
configure.ac +5 -0
index fe6e75f..01f6890 100644
@@ -23,6 +23,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])
 
include/libnetfilter_log/Makefile.am +4 -0
index fe934f1..0305357 100644
@@ -1,3 +1,7 @@
 
+if BUILD_IPULOG
 pkginclude_HEADERS = libnetfilter_log.h libipulog.h linux_nfnetlink_log.h
+else
+pkginclude_HEADERS = libnetfilter_log.h linux_nfnetlink_log.h
+endif
 
src/Makefile.am +5 -1
index 10a66e2..33933a4 100644
@@ -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
utils/Makefile.am +5 -2
index ae64c90..f961b6c 100644
@@ -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
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 2 lines · Matthieu Crapet

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

Applied minor glitch, thanks.

Quoted 29 lines
---
 configure.ac                         |    5 +++++
 include/libnetfilter_log/Makefile.am |    4 ++++
 src/Makefile.am                      |    6 +++++-
 utils/Makefile.am                    |    7 +++++--
 4 files changed, 19 insertions(+), 3 deletions(-)
configure.ac +5 -0
index fe6e75f..01f6890 100644
@@ -23,6 +23,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])
 
include/libnetfilter_log/Makefile.am +0 -0
index fe934f1..0305357 100644

include/libnetfilter_log/Makefile.am line 6

Quoted 6 lines
include/libnetfilter_log/Makefile.am +4 -0
@@ -1,3 +1,7 @@
 
+if BUILD_IPULOG
 pkginclude_HEADERS = libnetfilter_log.h libipulog.h linux_nfnetlink_log.h
+else
+pkginclude_HEADERS = libnetfilter_log.h linux_nfnetlink_log.h
+endif

Just to avoid redundancy:

@@ -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