Merge branch 'master' into collectd-4
[collectd.git] / configure.in
index 39c7e98..ff12f68 100644 (file)
@@ -331,7 +331,9 @@ AC_CHECK_HEADERS(netinet/if_ether.h)
 AC_CHECK_HEADERS(termios.h)
 AC_CHECK_HEADERS(sys/ioctl.h)
 
-dnl Checking for libraries
+#
+# Checking for libraries
+#
 AC_CHECK_LIB(m, ext)
 
 #
@@ -1041,6 +1043,45 @@ AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
        [Wether or not to use the pcap library])
 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
 
+AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
+[
+       if test "x$withval" != "xno" && test "x$withval" != "xyes"
+       then
+               LDFLAGS="$LDFLAGS -L$withval/lib"
+               CPPFLAGS="$CPPFLAGS -I$withval/include"
+               with_libiptc="yes"
+       fi
+],
+[
+       if test "x$ac_system" = "xLinux"
+       then
+               with_libiptc="yes"
+       else
+               with_libiptc="no (Linux only)"
+       fi
+])
+if test "x$with_libiptc" = "xyes"
+then
+       AC_CHECK_LIB(iptc, iptc_init,
+       [
+               AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
+       ], [with_libiptc="no (libiptc not found)"])
+fi
+if test "x$with_libiptc" = "xyes"
+then
+       AC_CHECK_HEADERS(libiptc/libiptc.h,
+       [
+               AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
+       ], [with_libiptc="no (libiptc/libiptc.h not found)"])
+fi
+if test "x$with_libiptc" = "xyes"
+then
+       collect_libiptc=1
+else
+       collect_libiptc=0
+fi
+AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
+
 # Define `step' and `hearbeat' values..
 declare -i collectd_step=10
 declare -i collectd_heartbeat=25
@@ -1162,6 +1203,7 @@ AC_COLLECTD([email],     [disable], [module], [email statistics])
 AC_COLLECTD([entropy],   [disable], [module], [entropy statistics])
 AC_COLLECTD([exec],      [disable], [module], [exec of external programs])
 AC_COLLECTD([hddtemp],   [disable], [module], [hdd temperature statistics])
+AC_COLLECTD([iptables],  [disable], [module], [IPtables statistics])
 AC_COLLECTD([irq],       [disable], [module], [irq statistics])
 AC_COLLECTD([load],      [disable], [module], [system load statistics])
 AC_COLLECTD([mbmon],     [disable], [module], [motherboard monitor statistics])
@@ -1199,6 +1241,7 @@ Configuration:
     libkstat  . . . . . $with_kstat
     libmysql  . . . . . $with_libmysql
     libpcap . . . . . . $with_libpcap
+    libiptc . . . . . . $with_libiptc
     libpthread  . . . . $with_libpthread
 
   Features:
@@ -1223,6 +1266,7 @@ Configuration:
     exec  . . . . . . . $enable_exec
     hddtemp . . . . . . $enable_hddtemp
     irq . . . . . . . . $enable_irq
+    iptables  . . . . . $enable_iptables
     load  . . . . . . . $enable_load
     mbmon . . . . . . . $enable_mbmon
     memory  . . . . . . $enable_memory