X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=configure.ac;h=e8fe1974c948e87770561c8d19a834246ea73ed9;hb=fa57c9e50d49f3b51dcd9a5f7ec8798153af5992;hp=ddbc28e44fa2736d94eaa473a44fd12f8c9773c4;hpb=f8b1735657379fc2fbc46516fd27aad74847350c;p=netdata.git diff --git a/configure.ac b/configure.ac index ddbc28e4..e8fe1974 100644 --- a/configure.ac +++ b/configure.ac @@ -51,11 +51,11 @@ AC_ARG_ENABLE( [plugin-nfacct], [AS_HELP_STRING([--enable-plugin-nfacct], [enable nfacct plugin, requires root])], , - [enable_plugin_nfacct="no"] + [enable_plugin_nfacct="detect"] ) AC_ARG_ENABLE( [plugin-freeipmi], - [AS_HELP_STRING([--enable-plugin-freeipmi], [freeipmi plugin, requires root])], + [AS_HELP_STRING([--enable-plugin-freeipmi], [enable freeipmi plugin])], , [enable_plugin_freeipmi="detect"] ) @@ -363,12 +363,21 @@ AM_CONDITIONAL([ENABLE_PLUGIN_FREEIPMI], [test "${enable_plugin_freeipmi}" = "ye # ----------------------------------------------------------------------------- # nfacct.plugin - libmnl, libnetfilter_acct +AC_CHECK_HEADERS_ONCE([linux/netfilter/nfnetlink_conntrack.h]) + PKG_CHECK_MODULES( [NFACCT], [libnetfilter_acct], [have_libnetfilter_acct=yes], [have_libnetfilter_acct=no] ) + +if test "${have_libnetfilter_acct}" = "yes"; then + AC_DEFINE([HAVE_LIBNETFILTER_ACCT], [1], [libnetfilter_acct usability]) + OPTIONAL_NFACCT_CLFAGS="${OPTIONAL_NFACCT_CLFAGS} ${NFACCT_CFLAGS}" + OPTIONAL_NFACCT_LIBS="${OPTIONAL_NFACCT_LIBS} ${NFACCT_LIBS}" +fi + PKG_CHECK_MODULES( [LIBMNL], [libmnl], @@ -376,6 +385,12 @@ PKG_CHECK_MODULES( [have_libmnl=no] ) +if test "${have_libmnl}" = "yes"; then + AC_DEFINE([HAVE_LIBMNL], [1], [libmnl usability]) + OPTIONAL_NFACCT_CLFAGS="${OPTIONAL_NFACCT_CLFAGS} ${LIBMNL_CFLAGS}" + OPTIONAL_NFACCT_LIBS="${OPTIONAL_NFACCT_LIBS} ${LIBMNL_LIBS}" +fi + test "${enable_plugin_nfacct}" = "yes" -a "${have_libnetfilter_acct}" != "yes" && \ AC_MSG_ERROR([netfilter_acct required but not found])