snort plugin: Add a bounady check when reading from the metrics array.
[collectd.git] / configure.in
index ea9fc6c..b07712e 100644 (file)
@@ -24,7 +24,7 @@ m4_ifdef([LT_PACKAGE_VERSION],
        ]
 )
 
-AM_INIT_AUTOMAKE(dist-bzip2)
+AM_INIT_AUTOMAKE([tar-pax dist-bzip2])
 AC_LANG(C)
 
 AC_PREFIX_DEFAULT("/opt/collectd")
@@ -327,6 +327,15 @@ else
        have_linux_raid_md_u_h="no"
 fi
 
+# For the snort module
+have_mman_h="no"
+AC_CHECK_HEADERS(sys/mman.h,
+    [have_mman_h="yes"],
+    [have_mman_h="no"],
+[
+#include <sys/stat.h>
+])
+
 # For the swap module
 have_linux_wireless_h="no"
 if test "x$ac_system" = "xLinux"
@@ -537,7 +546,20 @@ AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
 AC_CHECK_HEADERS(netinet/ip_compat.h)
 
 have_net_pfvar_h="no"
-AC_CHECK_HEADERS(net/pfvar.h, [have_net_pfvar_h="yes"])
+AC_CHECK_HEADERS(net/pfvar.h,
+               [have_net_pfvar_h="yes"],
+               [have_net_pfvar_h="no"],
+[
+#if HAVE_SYS_IOCTL_H
+# include <sys/ioctl.h>
+#endif
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+#if HAVE_NET_IF_H
+# include <net/if.h>
+#endif
+])
 
 # For the multimeter plugin
 have_termios_h="no"
@@ -4939,6 +4961,7 @@ AC_PLUGIN([rrdtool],     [$with_librrd],       [RRDTool output plugin])
 AC_PLUGIN([sensors],     [$with_libsensors],   [lm_sensors statistics])
 AC_PLUGIN([serial],      [$plugin_serial],     [serial port traffic])
 AC_PLUGIN([snmp],        [$with_libnetsnmp],   [SNMP querying plugin])
+AC_PLUGIN([snort],       [$have_mman_h],       [Snort perfmon plugin])
 AC_PLUGIN([swap],        [$plugin_swap],       [Swap usage statistics])
 AC_PLUGIN([syslog],      [$have_syslog],       [Syslog logging plugin])
 AC_PLUGIN([table],       [yes],                [Parsing of tabular data])
@@ -5273,6 +5296,7 @@ Configuration:
     sensors . . . . . . . $enable_sensors
     serial  . . . . . . . $enable_serial
     snmp  . . . . . . . . $enable_snmp
+    snort . . . . . . . . $enable_snort
     swap  . . . . . . . . $enable_swap
     syslog  . . . . . . . $enable_syslog
     table . . . . . . . . $enable_table