* [PATCH 0/4] build system improvements
@ 2012-11-03 11:32 Eric Leblond
2012-11-03 11:32 ` [PATCH 1/4] Add configure flag to disable NFACCT build Eric Leblond
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Eric Leblond @ 2012-11-03 11:32 UTC (permalink / raw)
To: netfilter-devel; +Cc: eric
Hello,
Here's a small patchset containing some build system improvements.
The first three patches add a flag to disable the build of some
input plugins that depends on library. The last patch adds a message
at the end of configure run to indicate what will be build.
Patchset statistic:
configure.ac | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
input/flow/Makefile.am | 2 ++
input/packet/Makefile.am | 4 ++++
input/sum/Makefile.am | 4 ++--
output/ulogd_output_XML.c | 7 ++++++-
5 files changed, 75 insertions(+), 8 deletions(-)
BR,
--
Eric
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/4] Add configure flag to disable NFACCT build
2012-11-03 11:32 [PATCH 0/4] build system improvements Eric Leblond
@ 2012-11-03 11:32 ` Eric Leblond
2012-11-03 14:40 ` Jan Engelhardt
2012-11-03 11:32 ` [PATCH 2/4] Add configure flag to disable NFCT build Eric Leblond
` (2 subsequent siblings)
3 siblings, 1 reply; 10+ messages in thread
From: Eric Leblond @ 2012-11-03 11:32 UTC (permalink / raw)
To: netfilter-devel; +Cc: eric
It is now possible to pass the --disable-nfacct flag to disable
compilation of NFACCT input plugin. Doing this the build of ulogd
is possible on system where nfacct is not available.
---
configure.ac | 8 +++++++-
input/sum/Makefile.am | 4 ++--
output/ulogd_output_XML.c | 7 ++++++-
3 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 0f21cf1..159cb0b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,9 +44,15 @@ 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_ACCT], [libnetfilter_acct >= 1.0.1])
PKG_CHECK_MODULES([LIBNETFILTER_CONNTRACK], [libnetfilter_conntrack >= 1.0.2])
PKG_CHECK_MODULES([LIBNETFILTER_LOG], [libnetfilter_log >= 1.0.0])
+AC_ARG_ENABLE(nfacct,
+ AS_HELP_STRING([--enable-nfacct], [Enable nfacct module [default=yes]]),,[enable_nfacct=yes])
+AS_IF([test "x$enable_nfacct" = "xyes"], [
+ PKG_CHECK_MODULES([LIBNETFILTER_ACCT], [libnetfilter_acct >= 1.0.1])
+ AC_DEFINE([BUILD_NFACCT], [1], [Building nfacct module])
+])
+AM_CONDITIONAL([BUILD_NFACCT], [test "x$enable_nfacct" = "xyes"])
CT_CHECK_POSTGRES_DB()
AM_CONDITIONAL(HAVE_PGSQL, test "x$PQLIBPATH" != "x")
diff --git a/input/sum/Makefile.am b/input/sum/Makefile.am
index 33fa849..b6ddb4d 100644
--- a/input/sum/Makefile.am
+++ b/input/sum/Makefile.am
@@ -1,8 +1,8 @@
AM_CPPFLAGS = -I$(top_srcdir)/include $(LIBNETFILTER_ACCT_CFLAGS) $(LIBMNL_CFLAGS)
AM_CFLAGS = ${regular_CFLAGS}
-
+if BUILD_NFACCT
pkglib_LTLIBRARIES = ulogd_inpflow_NFACCT.la
-
ulogd_inpflow_NFACCT_la_SOURCES = ulogd_inpflow_NFACCT.c
ulogd_inpflow_NFACCT_la_LDFLAGS = -avoid-version -module
ulogd_inpflow_NFACCT_la_LIBADD = $(LIBMNL_LIBS) $(LIBNETFILTER_ACCT_LIBS)
+endif
diff --git a/output/ulogd_output_XML.c b/output/ulogd_output_XML.c
index e9c3974..616e6c0 100644
--- a/output/ulogd_output_XML.c
+++ b/output/ulogd_output_XML.c
@@ -20,7 +20,10 @@
#include <libnetfilter_conntrack/libnetfilter_conntrack.h>
#include <libnetfilter_log/libnetfilter_log.h>
+#include "../config.h"
+#ifdef BUILD_NFACCT
#include <libnetfilter_acct/libnetfilter_acct.h>
+#endif
#include <ulogd/ulogd.h>
#include <sys/param.h>
#include <time.h>
@@ -118,6 +121,7 @@ xml_output_packet(struct ulogd_key *inp, char *buf, ssize_t size)
static int
xml_output_sum(struct ulogd_key *inp, char *buf, ssize_t size)
{
+#ifdef BUILD_NFACCT
struct nfacct *nfacct = ikey_get_ptr(&inp[KEY_SUM]);
int tmp;
@@ -125,10 +129,11 @@ xml_output_sum(struct ulogd_key *inp, char *buf, ssize_t size)
NFACCT_SNPRINTF_F_TIME);
if (tmp < 0 || tmp >= size)
return -1;
-
+#endif
return 0;
}
+
static int xml_output(struct ulogd_pluginstance *upi)
{
struct ulogd_key *inp = upi->input.keys;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/4] Add configure flag to disable NFCT build
2012-11-03 11:32 [PATCH 0/4] build system improvements Eric Leblond
2012-11-03 11:32 ` [PATCH 1/4] Add configure flag to disable NFACCT build Eric Leblond
@ 2012-11-03 11:32 ` Eric Leblond
2012-11-03 11:33 ` [PATCH 3/4] Add configure flag to disable NFLOG build Eric Leblond
2012-11-03 11:33 ` [PATCH 4/4] configure: display info about build plugins Eric Leblond
3 siblings, 0 replies; 10+ messages in thread
From: Eric Leblond @ 2012-11-03 11:32 UTC (permalink / raw)
To: netfilter-devel; +Cc: eric
---
configure.ac | 8 +++++++-
input/flow/Makefile.am | 2 ++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 159cb0b..5bb8644 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,8 +44,14 @@ 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_CONNTRACK], [libnetfilter_conntrack >= 1.0.2])
PKG_CHECK_MODULES([LIBNETFILTER_LOG], [libnetfilter_log >= 1.0.0])
+AC_ARG_ENABLE(nfct,
+ AS_HELP_STRING([--enable-nfct], [Enable nfct module [default=yes]]),,[enable_nfct=yes])
+AS_IF([test "x$enable_nfct" = "xyes"], [
+ PKG_CHECK_MODULES([LIBNETFILTER_CONNTRACK], [libnetfilter_conntrack >= 1.0.2])
+ AC_DEFINE([BUILD_NFCT], [1], [Building nfct module])
+])
+AM_CONDITIONAL([BUILD_NFCT], [test "x$enable_nfct" = "xyes"])
AC_ARG_ENABLE(nfacct,
AS_HELP_STRING([--enable-nfacct], [Enable nfacct module [default=yes]]),,[enable_nfacct=yes])
AS_IF([test "x$enable_nfacct" = "xyes"], [
diff --git a/input/flow/Makefile.am b/input/flow/Makefile.am
index 127caf6..36c34ca 100644
--- a/input/flow/Makefile.am
+++ b/input/flow/Makefile.am
@@ -2,11 +2,13 @@
AM_CPPFLAGS = -I$(top_srcdir)/include
AM_CFLAGS = ${regular_CFLAGS}
+if BUILD_NFCT
pkglib_LTLIBRARIES = ulogd_inpflow_NFCT.la # ulogd_inpflow_IPFIX.la
ulogd_inpflow_NFCT_la_SOURCES = ulogd_inpflow_NFCT.c
ulogd_inpflow_NFCT_la_LDFLAGS = -avoid-version -module $(LIBNETFILTER_CONNTRACK_LIBS)
ulogd_inpflow_NFCT_la_CFLAGS = $(AM_CFLAGS) $(LIBNETFILTER_CONNTRACK_CFLAGS)
+endif
#ulogd_inpflow_IPFIX_la_SOURCES = ulogd_inpflow_IPFIX.c
#ulogd_inpflow_IPFIX_la_LDFLAGS = -avoid-version -module
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/4] Add configure flag to disable NFLOG build
2012-11-03 11:32 [PATCH 0/4] build system improvements Eric Leblond
2012-11-03 11:32 ` [PATCH 1/4] Add configure flag to disable NFACCT build Eric Leblond
2012-11-03 11:32 ` [PATCH 2/4] Add configure flag to disable NFCT build Eric Leblond
@ 2012-11-03 11:33 ` Eric Leblond
2012-11-03 14:41 ` Jan Engelhardt
2012-11-03 11:33 ` [PATCH 4/4] configure: display info about build plugins Eric Leblond
3 siblings, 1 reply; 10+ messages in thread
From: Eric Leblond @ 2012-11-03 11:33 UTC (permalink / raw)
To: netfilter-devel; +Cc: eric
---
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
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 4/4] configure: display info about build plugins
2012-11-03 11:32 [PATCH 0/4] build system improvements Eric Leblond
` (2 preceding siblings ...)
2012-11-03 11:33 ` [PATCH 3/4] Add configure flag to disable NFLOG build Eric Leblond
@ 2012-11-03 11:33 ` Eric Leblond
3 siblings, 0 replies; 10+ messages in thread
From: Eric Leblond @ 2012-11-03 11:33 UTC (permalink / raw)
To: netfilter-devel; +Cc: eric
This patch modifies configure to display the list of plugins that
will be built.
---
configure.ac | 42 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 40 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 930aef0..c70887d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,6 +22,11 @@ AC_SUBST([libdl_LIBS])
AC_SEARCH_LIBS([pcap_close], [pcap], [libpcap_LIBS="-lpcap"; LIBS=""])
AC_SUBST([libpcap_LIBS])
AM_CONDITIONAL([HAVE_PCAP], [test -n "$libpcap_LIBS"])
+if test "x$libpcap_LIBS" != "x"; then
+ enable_pcap="yes"
+else
+ enable_pcap="no"
+fi
dnl Checks for header files.
AC_HEADER_DIRENT
@@ -68,17 +73,35 @@ AM_CONDITIONAL([BUILD_NFACCT], [test "x$enable_nfacct" = "xyes"])
CT_CHECK_POSTGRES_DB()
AM_CONDITIONAL(HAVE_PGSQL, test "x$PQLIBPATH" != "x")
+if test "x$PQLIBPATH" != "x"; then
+ enable_pgsql="yes"
+else
+ enable_pgsql="no"
+fi
CT_CHECK_MYSQL_DB()
AM_CONDITIONAL(HAVE_MYSQL, test "x$MYSQL_LIB" != "x")
+if test "x$MYSQL_LIB" != "x"; then
+ enable_mysql="yes"
+else
+ enable_mysql="no"
+fi
PKG_CHECK_MODULES([libsqlite3], [sqlite3], [], [:])
AM_CONDITIONAL([HAVE_SQLITE3], [test -n "$libsqlite3_LIBS"])
+if test "x$libsqlite3_LIBS" != "x"; then
+ enable_sqlite3="yes"
+else
+ enable_sqlite3="no"
+fi
CT_CHECK_DBI()
AM_CONDITIONAL(HAVE_DBI, test "x$DBI_LIB" != "x")
-
-
+if test "x$DBI_LIB" != "x"; then
+ enable_dbi="yes"
+else
+ enable_dbi="no"
+fi
dnl AC_SUBST(DATABASE_DIR)
dnl AC_SUBST(DATABASE_LIB)
@@ -102,3 +125,18 @@ AC_CONFIG_FILES(include/Makefile include/ulogd/Makefile include/libipulog/Makefi
output/dbi/Makefile \
src/Makefile Makefile Rules.make)
AC_OUTPUT
+
+echo "
+Ulogd configuration:
+ Input plugins:
+ NFLOG plugin: ${enable_nflog}
+ NFCT plugin: ${enable_nfct}
+ NFACCT plugin: ${enable_nfacct}
+ Output plugins:
+ PCAP plugin: ${enable_pcap}
+ PGSQL plugin: ${enable_pgsql}
+ MySQL plugin: ${enable_mysql}
+ SQLITE3 plugin: ${enable_sqlite3}
+ DBI plugin: ${enable_dbi}
+"
+echo "You can now run 'make' and 'make install'"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] Add configure flag to disable NFACCT build
2012-11-03 11:32 ` [PATCH 1/4] Add configure flag to disable NFACCT build Eric Leblond
@ 2012-11-03 14:40 ` Jan Engelhardt
2012-11-03 16:01 ` Eric Leblond
0 siblings, 1 reply; 10+ messages in thread
From: Jan Engelhardt @ 2012-11-03 14:40 UTC (permalink / raw)
To: Eric Leblond; +Cc: netfilter-devel
On Saturday 2012-11-03 12:32, Eric Leblond wrote:
>diff --git a/configure.ac b/configure.ac
>index 0f21cf1..159cb0b 100644
>--- a/configure.ac
>+++ b/configure.ac
>@@ -44,9 +44,15 @@ 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_ACCT], [libnetfilter_acct >= 1.0.1])
> PKG_CHECK_MODULES([LIBNETFILTER_CONNTRACK], [libnetfilter_conntrack >= 1.0.2])
> PKG_CHECK_MODULES([LIBNETFILTER_LOG], [libnetfilter_log >= 1.0.0])
>+AC_ARG_ENABLE(nfacct,
>+ AS_HELP_STRING([--enable-nfacct], [Enable nfacct module [default=yes]]),,[enable_nfacct=yes])
>+AS_IF([test "x$enable_nfacct" = "xyes"], [
>+ PKG_CHECK_MODULES([LIBNETFILTER_ACCT], [libnetfilter_acct >= 1.0.1])
>+ AC_DEFINE([BUILD_NFACCT], [1], [Building nfacct module])
>+])
>+AM_CONDITIONAL([BUILD_NFACCT], [test "x$enable_nfacct" = "xyes"])
>
> CT_CHECK_POSTGRES_DB()
> AM_CONDITIONAL(HAVE_PGSQL, test "x$PQLIBPATH" != "x")
>diff --git a/input/sum/Makefile.am b/input/sum/Makefile.am
>index 33fa849..b6ddb4d 100644
>--- a/input/sum/Makefile.am
>+++ b/input/sum/Makefile.am
>@@ -1,8 +1,8 @@
> AM_CPPFLAGS = -I$(top_srcdir)/include $(LIBNETFILTER_ACCT_CFLAGS) $(LIBMNL_CFLAGS)
> AM_CFLAGS = ${regular_CFLAGS}
>-
>+if BUILD_NFACCT
> pkglib_LTLIBRARIES = ulogd_inpflow_NFACCT.la
>-
> ulogd_inpflow_NFACCT_la_SOURCES = ulogd_inpflow_NFACCT.c
> ulogd_inpflow_NFACCT_la_LDFLAGS = -avoid-version -module
> ulogd_inpflow_NFACCT_la_LIBADD = $(LIBMNL_LIBS) $(LIBNETFILTER_ACCT_LIBS)
>+endif
As far as I remember, AM conditionals do not automatically
become C macros. Can you check config.h?
So you will likely have to add the following line into the if..endif
block:
AM_CPPFLAGS += -DBUILD_NFACCT
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/4] Add configure flag to disable NFLOG build
2012-11-03 11:33 ` [PATCH 3/4] Add configure flag to disable NFLOG build Eric Leblond
@ 2012-11-03 14:41 ` Jan Engelhardt
2012-11-03 16:02 ` Eric Leblond
0 siblings, 1 reply; 10+ messages in thread
From: Jan Engelhardt @ 2012-11-03 14:41 UTC (permalink / raw)
To: Eric Leblond; +Cc: netfilter-devel
On Saturday 2012-11-03 12:33, Eric Leblond wrote:
>
>+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
You can use
pkglib_LTLIBRARIES = ulogd_inppkt_ULOG.la ulogd_inppkt_UNIXSOCK.la
if BUILD_NFLOG
pkglib_LTLIBRARIES += ulogd_inppkt_NFLOG.la
...
endif
So that ulogd_inppkt_ULOG.la ulogd_inppkt_UNIXSOCK.la
does not have to be listed twice.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] Add configure flag to disable NFACCT build
2012-11-03 14:40 ` Jan Engelhardt
@ 2012-11-03 16:01 ` Eric Leblond
2012-11-03 16:02 ` Jan Engelhardt
0 siblings, 1 reply; 10+ messages in thread
From: Eric Leblond @ 2012-11-03 16:01 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter-devel
Hi,
Le samedi 03 novembre 2012 à 15:40 +0100, Jan Engelhardt a écrit :
>
> On Saturday 2012-11-03 12:32, Eric Leblond wrote:
>
> >diff --git a/configure.ac b/configure.ac
> >index 0f21cf1..159cb0b 100644
> >--- a/configure.ac
> >+++ b/configure.ac
> >@@ -44,9 +44,15 @@ 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_ACCT], [libnetfilter_acct >= 1.0.1])
> > PKG_CHECK_MODULES([LIBNETFILTER_CONNTRACK], [libnetfilter_conntrack >= 1.0.2])
> > PKG_CHECK_MODULES([LIBNETFILTER_LOG], [libnetfilter_log >= 1.0.0])
> >+AC_ARG_ENABLE(nfacct,
> >+ AS_HELP_STRING([--enable-nfacct], [Enable nfacct module [default=yes]]),,[enable_nfacct=yes])
> >+AS_IF([test "x$enable_nfacct" = "xyes"], [
> >+ PKG_CHECK_MODULES([LIBNETFILTER_ACCT], [libnetfilter_acct >= 1.0.1])
> >+ AC_DEFINE([BUILD_NFACCT], [1], [Building nfacct module])
> >+])
> >+AM_CONDITIONAL([BUILD_NFACCT], [test "x$enable_nfacct" = "xyes"])
> >
> > CT_CHECK_POSTGRES_DB()
> > AM_CONDITIONAL(HAVE_PGSQL, test "x$PQLIBPATH" != "x")
> >diff --git a/input/sum/Makefile.am b/input/sum/Makefile.am
> >index 33fa849..b6ddb4d 100644
> >--- a/input/sum/Makefile.am
> >+++ b/input/sum/Makefile.am
> >@@ -1,8 +1,8 @@
> > AM_CPPFLAGS = -I$(top_srcdir)/include $(LIBNETFILTER_ACCT_CFLAGS) $(LIBMNL_CFLAGS)
> > AM_CFLAGS = ${regular_CFLAGS}
> >-
> >+if BUILD_NFACCT
> > pkglib_LTLIBRARIES = ulogd_inpflow_NFACCT.la
> >-
> > ulogd_inpflow_NFACCT_la_SOURCES = ulogd_inpflow_NFACCT.c
> > ulogd_inpflow_NFACCT_la_LDFLAGS = -avoid-version -module
> > ulogd_inpflow_NFACCT_la_LIBADD = $(LIBMNL_LIBS) $(LIBNETFILTER_ACCT_LIBS)
> >+endif
>
> As far as I remember, AM conditionals do not automatically
> become C macros. Can you check config.h?
Yeah, that's why I've added AC_DEFINE when the module is built.
BR,
> So you will likely have to add the following line into the if..endif
> block:
>
> AM_CPPFLAGS += -DBUILD_NFACCT
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/4] Add configure flag to disable NFLOG build
2012-11-03 14:41 ` Jan Engelhardt
@ 2012-11-03 16:02 ` Eric Leblond
0 siblings, 0 replies; 10+ messages in thread
From: Eric Leblond @ 2012-11-03 16:02 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter-devel
Hi,
Le samedi 03 novembre 2012 à 15:41 +0100, Jan Engelhardt a écrit :
>
> On Saturday 2012-11-03 12:33, Eric Leblond wrote:
> >
> >+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
>
> You can use
>
> pkglib_LTLIBRARIES = ulogd_inppkt_ULOG.la ulogd_inppkt_UNIXSOCK.la
> if BUILD_NFLOG
> pkglib_LTLIBRARIES += ulogd_inppkt_NFLOG.la
> ...
> endif
>
> So that ulogd_inppkt_ULOG.la ulogd_inppkt_UNIXSOCK.la
> does not have to be listed twice.
You're right that's a better construction.
BR,
--
Eric
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/4] Add configure flag to disable NFACCT build
2012-11-03 16:01 ` Eric Leblond
@ 2012-11-03 16:02 ` Jan Engelhardt
0 siblings, 0 replies; 10+ messages in thread
From: Jan Engelhardt @ 2012-11-03 16:02 UTC (permalink / raw)
To: Eric Leblond; +Cc: netfilter-devel
On Saturday 2012-11-03 17:01, Eric Leblond wrote:
>> >+AS_IF([test "x$enable_nfacct" = "xyes"], [
>> >+ PKG_CHECK_MODULES([LIBNETFILTER_ACCT], [libnetfilter_acct >= 1.0.1])
>> >+ AC_DEFINE([BUILD_NFACCT], [1], [Building nfacct module])
>> >+])
>> >+AM_CONDITIONAL([BUILD_NFACCT], [test "x$enable_nfacct" = "xyes"])
>> As far as I remember, AM conditionals do not automatically
>> become C macros. Can you check config.h?
>
>Yeah, that's why I've added AC_DEFINE when the module is built.
I completely missed that. Sorry for the noise.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-11-03 16:02 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-03 11:32 [PATCH 0/4] build system improvements Eric Leblond
2012-11-03 11:32 ` [PATCH 1/4] Add configure flag to disable NFACCT build Eric Leblond
2012-11-03 14:40 ` Jan Engelhardt
2012-11-03 16:01 ` Eric Leblond
2012-11-03 16:02 ` Jan Engelhardt
2012-11-03 11:32 ` [PATCH 2/4] Add configure flag to disable NFCT build Eric Leblond
2012-11-03 11:33 ` [PATCH 3/4] Add configure flag to disable NFLOG build Eric Leblond
2012-11-03 14:41 ` Jan Engelhardt
2012-11-03 16:02 ` Eric Leblond
2012-11-03 11:33 ` [PATCH 4/4] configure: display info about build plugins Eric Leblond
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).