From patchwork Sat Nov 3 11:33:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Leblond X-Patchwork-Id: 196830 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 119882C00BE for ; Sat, 3 Nov 2012 23:03:23 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755578Ab2KCMDT (ORCPT ); Sat, 3 Nov 2012 08:03:19 -0400 Received: from ks28632.kimsufi.com ([91.121.96.152]:49001 "EHLO ks28632.kimsufi.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755590Ab2KCMDT (ORCPT ); Sat, 3 Nov 2012 08:03:19 -0400 Received: from ip-37-24-162-232.unitymediagroup.de ([37.24.162.232] helo=localhost.localdomain) by ks28632.kimsufi.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1TUbyn-0008OX-D5; Sat, 03 Nov 2012 12:33:33 +0100 From: Eric Leblond To: netfilter-devel@vger.kernel.org Cc: eric@regit.org Subject: [PATCH 3/4] Add configure flag to disable NFLOG build Date: Sat, 3 Nov 2012 12:33:00 +0100 Message-Id: <1351942382-24791-4-git-send-email-eric@regit.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1351942382-24791-1-git-send-email-eric@regit.org> References: <1351942382-24791-1-git-send-email-eric@regit.org> Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.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