#endif
])
+AC_MSG_CHECKING([for sysctl kern.cp_times])
+if test -x /sbin/sysctl
+then
+ /sbin/sysctl kern.cp_times 2>/dev/null
+ if test $? -eq 0
+ then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HAVE_SYSCTL_KERN_CP_TIMES, 1,
+ [Define if sysctl supports kern.cp_times])
+ else
+ AC_MSG_RESULT([no])
+ fi
+else
+ AC_MSG_RESULT([no])
+fi
+
# For hddtemp module
AC_CHECK_HEADERS(linux/major.h libgen.h)
AM_CONDITIONAL(BUILD_WITH_LIBDBI, test "x$with_libdbi" = "xyes")
# }}}
+# --with-erlang {{{
+ERLANG_CPPFLAGS="$ERLANG_CPPFLAGS"
+ERLANG_LDFLAGS="$ERLANG_LDFLAGS"
+ERLANG_LIBS="$ERLANG_LIBS"
+AC_ARG_WITH(erlang, [AS_HELP_STRING([--with-erlang@<:@=PREFIX@:>@], [Path to Erlang / erl_interface.])],
+[
+ if test "x$withval" != "xno" && test "x$withval" != "xyes"
+ then
+ LDFLAGS="$LDFLAGS -L$withval/lib"
+ CPPFLAGS="$CPPFLAGS -I$withval/include -D_THREAD_SAFE"
+ with_erlang="yes"
+ else
+ with_erlang="$withval"
+ fi
+],
+[
+ with_erlang="yes"
+])
+if test "x$ERLANG_CPPFLAGS" = "x"
+then
+ ERLANG_CPPFLAGS="-D_REENTRANT"
+fi
+if test "x$ERLANG_LIBS" = "x"
+then
+ ERLANG_LIBS="-lei -lpthread"
+fi
+
+SAVE_CPPFLAGS="$CPPFLAGS"
+SAVE_LDFLAGS="$LDFLAGS"
+CPPFLAGS="$CPPFLAGS $ERLANG_CPPFLAGS"
+LDFLAGS="$LDFLAGS $ERLANG_LDFLAGS"
+
+if test "x$with_erlang" = "xyes"
+then
+ if test "x$ERLANG_CPPFLAGS" != "x"
+ then
+ AC_MSG_NOTICE([Erlang CPPFLAGS: $ERLANG_CPPFLAGS])
+ fi
+ AC_CHECK_HEADERS(erl_interface.h ei.h,
+ [with_erlang="yes"],
+ [with_erlang="no (Headers not found)"])
+fi
+if test "x$with_erlang" = "xyes"
+then
+ if test "x$ERLANG_LDFLAGS" != "x"
+ then
+ AC_MSG_NOTICE([Erlang LDFLAGS: $ERLANG_LDFLAGS])
+ fi
+ AC_CHECK_LIB(erl_interface, erl_connect_xinit,
+ [with_erlang="yes"],
+ [with_erlang="no (Symbol erl_connect_xinit not found)"],
+ [$ERLANG_LIBS])
+fi
+if test "x$with_erlang" = "xyes"
+then
+ BUILD_WITH_ERLANG_CPPFLAGS="$ERLANG_CPPFLAGS"
+ BUILD_WITH_ERLANG_LDFLAGS="$ERLANG_LDFLAGS"
+ BUILD_WITH_ERLANG_LIBS="-lerl_interface $ERLANG_LIBS"
+ AC_SUBST(BUILD_WITH_ERLANG_CPPFLAGS)
+ AC_SUBST(BUILD_WITH_ERLANG_LDFLAGS)
+ AC_SUBST(BUILD_WITH_ERLANG_LIBS)
+fi
+AM_CONDITIONAL(BUILD_WITH_ERLANG, test "x$with_erlang" = "xyes")
+
+CPPFLAGS="$SAVE_CPPFLAGS"
+LDFLAGS="$SAVE_LDFLAGS"
+# }}}
+
# --with-libesmtp {{{
AC_ARG_WITH(libesmtp, [AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])],
[
plugin_battery="no"
plugin_bind="no"
plugin_conntrack="no"
+plugin_contextswitch="no"
plugin_cpu="no"
plugin_cpufreq="no"
plugin_curl_json="no"
then
plugin_battery="yes"
plugin_conntrack="yes"
+ plugin_contextswitch="yes"
plugin_cpu="yes"
plugin_cpufreq="yes"
plugin_disk="yes"
AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics])
AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics])
+AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics])
AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
AC_PLUGIN([csv], [yes], [CSV output plugin])
AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
AC_PLUGIN([email], [yes], [EMail statistics])
AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
+AC_PLUGIN([erlang], [$with_erlang], [Erlang interoperability])
AC_PLUGIN([exec], [yes], [Execution of external programs])
AC_PLUGIN([filecount], [yes], [Count files in directories])
AC_PLUGIN([fscache], [$plugin_fscache], [fscache statistics])
AC_PLUGIN([logfile], [yes], [File logging plugin])
AC_PLUGIN([madwifi], [$have_linux_wireless_h], [Madwifi wireless statistics])
AC_PLUGIN([match_empty_counter], [yes], [The empty counter match])
+AC_PLUGIN([match_hashed], [yes], [The hashed match])
AC_PLUGIN([match_regex], [yes], [The regex match])
AC_PLUGIN([match_timediff], [yes], [The timediff match])
AC_PLUGIN([match_value], [yes], [The value match])
Libraries:
libcurl . . . . . . . $with_libcurl
libdbi . . . . . . . $with_libdbi
+ liberl_interface . . $with_erlang
libesmtp . . . . . . $with_libesmtp
libganglia . . . . . $with_libganglia
libgcrypt . . . . . . $with_libgcrypt
battery . . . . . . . $enable_battery
bind . . . . . . . . $enable_bind
conntrack . . . . . . $enable_conntrack
+ contextswitch . . . . $enable_contextswitch
cpu . . . . . . . . . $enable_cpu
cpufreq . . . . . . . $enable_cpufreq
csv . . . . . . . . . $enable_csv
dns . . . . . . . . . $enable_dns
email . . . . . . . . $enable_email
entropy . . . . . . . $enable_entropy
+ erlang . . . . . . . $enable_erlang
exec . . . . . . . . $enable_exec
filecount . . . . . . $enable_filecount
fscache . . . . . . . $enable_fscache
logfile . . . . . . . $enable_logfile
madwifi . . . . . . . $enable_madwifi
match_empty_counter . $enable_match_empty_counter
+ match_hashed . . . . $enable_match_hashed
match_regex . . . . . $enable_match_regex
match_timediff . . . $enable_match_timediff
match_value . . . . . $enable_match_value