iptables plugin: Adds a plugin to collect iptables'-counters.
[collectd.git] / configure.in
index 348552e..49f6ac3 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(collectd, 3.10.3)
+AC_INIT(collectd, 3.11.2)
 AC_CONFIG_SRCDIR(src/collectd.c)
 AC_CONFIG_HEADERS(src/config.h)
 AM_INIT_AUTOMAKE(dist-bzip2)
@@ -149,6 +149,23 @@ AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
 # include <netinet/ip6.h>
 #endif
 ])
+AC_CHECK_HEADERS(netinet/udp.h, [], [],
+[#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_NETINET_IN_SYSTM_H
+# include <netinet/in_systm.h>
+#endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP_H
+# include <netinet/ip.h>
+#endif
+])
 
 # For cpu modules
 AC_CHECK_HEADERS(sys/sysctl.h sys/dkstat.h)
@@ -269,6 +286,16 @@ AC_CHECK_HEADERS(sys/vfstab.h)
 # For the swap plugin, FreeBSD
 AC_CHECK_HEADERS(kvm.h)
 
+# For the email plugin
+AC_CHECK_HEADERS(linux/un.h, [], [],
+[
+#if HAVE_SYS_SOCKET_H
+#      include <sys/socket.h>
+#endif
+])
+AC_CHECK_HEADERS(sys/un.h)
+AC_CHECK_HEADERS(grp.h)
+
 # For debugging interface (variable number of arguments)
 AC_CHECK_HEADERS(stdarg.h)
 
@@ -276,9 +303,11 @@ AC_CHECK_HEADERS(stdarg.h)
 AC_CHECK_HEADERS(regex.h)
 
 # For the dns plugin
-AC_CHECK_HEADERS(arpa/nameser.h)
-AC_CHECK_HEADERS(pthread.h)
+AC_CHECK_HEADERS(arpa/nameser.h arpa/nameser_compat.h)
+
+AC_CHECK_HEADERS(net/if_arp.h)
 AC_CHECK_HEADERS(net/if_ppp.h)
+AC_CHECK_HEADERS(netinet/if_ether.h)
 
 dnl Checking for libraries
 AC_CHECK_LIB(m, ext)
@@ -439,6 +468,47 @@ AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_p
        #include <linux/netdevice.h>
        ])
 
+AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
+[#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_NETINET_IN_SYSTM_H
+# include <netinet/in_systm.h>
+#endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP_H
+# include <netinet/ip.h>
+#endif
+#if HAVE_NETINET_UDP_H
+# include <netinet/udp.h>
+#endif
+])
+AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
+[#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_NETINET_IN_SYSTM_H
+# include <netinet/in_systm.h>
+#endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP_H
+# include <netinet/ip.h>
+#endif
+#if HAVE_NETINET_UDP_H
+# include <netinet/udp.h>
+#endif
+])
+
 AC_MSG_CHECKING([for kernel type ($host_os)])
 case $host_os in
        *linux*)
@@ -497,24 +567,28 @@ AC_DEFINE_UNQUOTED(COLLECT_RRDTOOL, [$collect_rrdtool],
        [Wether or not to use rrdtool library])
 AM_CONDITIONAL(BUILD_WITH_RRDTOOL, test "x$with_rrdtool" = "xyes")
 
-with_pthread="yes"
-AC_ARG_WITH(pthread, [AS_HELP_STRING([--with-pthread=@<:@=PREFIX@:>@], [Path to pthread (experimental).])],
-[      if test "x$withval" != "xno" && test "x$withval" != "xyes"
+AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
+[      if test "x$withval" != "xno" -a "x$withval" != "xyes"
        then
                LDFLAGS="$LDFLAGS -L$withval/lib"
                CPPFLAGS="$CPPFLAGS -I$withval/include"
-               with_pthread="yes"
+               with_libpthread="yes"
+       else
+               if test "x$withval" = "xno"
+               then
+                       with_libpthread="no (disabled)"
+               fi
        fi
-], [with_pthread="no"])
-if test "x$with_pthread" = "xyes"
+], [with_libpthread="yes"])
+if test "x$with_libpthread" = "xyes"
 then
-       AC_CHECK_LIB(pthread, pthread_create, [with_pthread="yes"], [with_pthread="no (libpthread not found)"], [])
+       AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
 fi
-if test "x$with_pthread" = "xyes"
+if test "x$with_libpthread" = "xyes"
 then
-       AC_CHECK_HEADERS(pthread.h,, [with_pthread="no (pthread.h not found)"])
+       AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
 fi
-if test "x$with_pthread" = "xyes"
+if test "x$with_libpthread" = "xyes"
 then
        collect_pthread=1
 else
@@ -522,7 +596,7 @@ else
 fi
 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
        [Wether or not to use pthread (POSIX threads) library])
-AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_pthread" = "xyes")
+AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
 
 if test "$ac_system" = "Solaris"
 then
@@ -535,11 +609,11 @@ fi
 
 if test "x$with_kstat" = "xyes"
 then
-       AC_CHECK_LIB(kstat, kstat_open,, [with_kstat="no (libkstat not found)"])
+       AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
 fi
 if test "x$with_kstat" = "xyes"
 then
-       AC_CHECK_LIB(devinfo, di_init,, [with_devinfo="no (not found)"])
+       AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
        AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
 fi
 if test "x$with_kstat" = "xyes"
@@ -969,9 +1043,12 @@ AC_COLLECTD([cpufreq],   [disable], [module], [system cpu frequency statistics])
 AC_COLLECTD([disk],      [disable], [module], [disk/partition statistics])
 AC_COLLECTD([df],        [disable], [module], [df statistics])
 AC_COLLECTD([dns],       [disable], [module], [dns statistics])
+AC_COLLECTD([email],     [disable], [module], [email statistics])
 AC_COLLECTD([quota],     [enable],  [module], [quota statistics (experimental)])
 AC_COLLECTD([hddtemp],   [disable], [module], [hdd temperature statistics])
+AC_COLLECTD([iptables],  [disable], [module], [IPtables statistics])
 AC_COLLECTD([load],      [disable], [module], [system load statistics])
+AC_COLLECTD([mbmon],     [disable], [module], [motherboard monitor statistics])
 AC_COLLECTD([memory],    [disable], [module], [memory statistics])
 AC_COLLECTD([multimeter],[disable], [module], [multimeter statistics])
 AC_COLLECTD([mysql],     [disable], [module], [mysql statistics])
@@ -988,7 +1065,7 @@ AC_COLLECTD([users],     [disable], [module], [user count statistics])
 AC_COLLECTD([vserver],   [disable], [module], [vserver statistics])
 AC_COLLECTD([wireless],  [disable], [module], [wireless link statistics])
 
-AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libconfig/Makefile src/liboping/Makefile)
+AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libconfig/Makefile src/liboping/Makefile src/libiptc/Makefile )
 
 cat <<EOF;
 
@@ -1003,6 +1080,7 @@ Configuration:
     libkstat  . . . . . $with_kstat
     libmysql  . . . . . $with_libmysql
     libpcap . . . . . . $with_libpcap
+    libpthread  . . . . $with_libpthread
 
   Features:
     debug . . . . . . . $enable_debug
@@ -1020,8 +1098,10 @@ Configuration:
     df  . . . . . . . . $enable_df
     disk  . . . . . . . $enable_disk
     dns . . . . . . . . $enable_dns
+    email . . . . . . . $enable_email
     hddtemp . . . . . . $enable_hddtemp
     load  . . . . . . . $enable_load
+    mbmon . . . . . . . $enable_mbmon
     memory  . . . . . . $enable_memory
     multimeter  . . . . $enable_multimeter
     mysql . . . . . . . $enable_mysql