# 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)
AC_DEFINE_UNQUOTED(COLLECTD_HEARTBEAT, "$collectd_heartbeat", [Interval in which plugins are queried.])
fi
-#
+dnl Check for regex
+AC_ARG_WITH(regex, [AS_HELP_STRING([--with-regex], [Use POSIX regular expression in config.])],
+[
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"
+ then
+ with_regex="yes"
+ fi
+],
+[
+ with_regex="no"
+])
+if test "x$with_regex" = "xyes"
+then
+ AC_CHECK_FUNCS([regcomp regexec],
+ [with_regfuncs="yes"],
+ [with_regfuncs="no (regcomp & regexec not found)"])
+fi
+if test "x$with_regex" = "xyes"
+then
+ AC_CHECK_HEADERS(regex.h,
+ [with_regexh="yes"],
+ [with_regexh="no (regex.h not found)"])
+fi
+if test "x$with_regex" = "xyes" -a "x$with_regfuncs" = "xyes" -a "x$with_regexh" = "xyes"
+then
+ collect_regex=1
+else
+ collect_regex=0
+fi
+AC_DEFINE_UNQUOTED(COLLECT_REGEX, [$collect_regex],
+ [Wether or not to use regular expressions])
+AM_CONDITIONAL(BUILD_WITH_REGEX, test "x$with_regex" = "xyes")
+
# Check for enabled/disabled features
#
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([email], [disable], [module], [email statistics])
AC_COLLECTD([quota], [enable], [module], [quota statistics (experimental)])
AC_COLLECTD([hddtemp], [disable], [module], [hdd temperature statistics])
AC_COLLECTD([load], [disable], [module], [system load statistics])
libstatgrab . . . . $with_libstatgrab
libkstat . . . . . $with_kstat
libmysql . . . . . $with_libmysql
+ regex . . . . . . . $with_regex
Features:
debug . . . . . . . $enable_debug
cpufreq . . . . . . $enable_cpufreq
df . . . . . . . . $enable_df
disk . . . . . . . $enable_disk
+ email . . . . . . . $enable_email
hddtemp . . . . . . $enable_hddtemp
load . . . . . . . $enable_load
memory . . . . . . $enable_memory