From patchwork Sat Nov 3 11:33:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3/4] Add configure flag to disable NFLOG build Date: Sat, 03 Nov 2012 01:33:00 -0000 From: Eric Leblond X-Patchwork-Id: 196830 Message-Id: <1351942382-24791-4-git-send-email-eric@regit.org> To: netfilter-devel@vger.kernel.org Cc: eric@regit.org --- configure.ac | 8 +++++++- input/packet/Makefile.am | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 5bb8644..930aef0 100644 --- a/configure.ac +++ b/configure.ac @@ -44,7 +44,13 @@ AC_SUBST([regular_CFLAGS]) dnl Check for the right nfnetlink version PKG_CHECK_MODULES([LIBNFNETLINK], [libnfnetlink >= 1.0.1]) PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.3]) -PKG_CHECK_MODULES([LIBNETFILTER_LOG], [libnetfilter_log >= 1.0.0]) +AC_ARG_ENABLE(nflog, + AS_HELP_STRING([--enable-nflog], [Enable nflog module [default=yes]]),,[enable_nflog=yes]) +AS_IF([test "x$enable_nflog" = "xyes"], [ + PKG_CHECK_MODULES([LIBNETFILTER_LOG], [libnetfilter_log >= 1.0.0]) + AC_DEFINE([BUILD_NFLOG], [1], [Building nflog module]) +]) +AM_CONDITIONAL([BUILD_NFLOG], [test "x$enable_nflog" = "xyes"]) AC_ARG_ENABLE(nfct, AS_HELP_STRING([--enable-nfct], [Enable nfct module [default=yes]]),,[enable_nfct=yes]) AS_IF([test "x$enable_nfct" = "xyes"], [ diff --git a/input/packet/Makefile.am b/input/packet/Makefile.am index 250543b..7d278d1 100644 --- a/input/packet/Makefile.am +++ b/input/packet/Makefile.am @@ -2,12 +2,16 @@ AM_CPPFLAGS = -I$(top_srcdir)/include AM_CFLAGS = ${regular_CFLAGS} +if BUILD_NFLOG pkglib_LTLIBRARIES = ulogd_inppkt_NFLOG.la ulogd_inppkt_ULOG.la \ ulogd_inppkt_UNIXSOCK.la ulogd_inppkt_NFLOG_la_SOURCES = ulogd_inppkt_NFLOG.c ulogd_inppkt_NFLOG_la_LDFLAGS = -avoid-version -module $(LIBNETFILTER_LOG_LIBS) ulogd_inppkt_NFLOG_la_CFLAGS = $(AM_CFLAGS) $(LIBNETFILTER_LOG_CFLAGS) +else +pkglib_LTLIBRARIES = ulogd_inppkt_ULOG.la ulogd_inppkt_UNIXSOCK.la +endif ulogd_inppkt_ULOG_la_SOURCES = ulogd_inppkt_ULOG.c ulogd_inppkt_ULOG_la_LDFLAGS = -avoid-version -module