From 22188738ab743f15701bf739b437d83fdb053fe2 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sun, 15 Feb 2009 18:30:20 +0100 Subject: [PATCH] configure.in: Activate the cpu and swap plugins if sysctl is available. --- configure.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 6b2adc18..80e7e405 100644 --- a/configure.in +++ b/configure.in @@ -480,6 +480,7 @@ nanosleep_needs_rt="no" AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep))) AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes") +AC_CHECK_FUNCS(sysctl, [have_sysctl="yes"], [have_sysctl="no"]) AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"]) AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"]) AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"]) @@ -2955,6 +2956,11 @@ if test "x$have_processor_info" = "xyes" then plugin_cpu="yes" fi +if test "x$have_sysctl" = "xyes" +then + plugin_cpu="yes" + plugin_swap="yes" +fi if test "x$have_sysctlbyname" = "xyes" then plugin_cpu="yes" @@ -3031,8 +3037,6 @@ then plugin_users="yes" fi -# FIXME: sysctl for swap plugin - m4_divert_once([HELP_ENABLE], [ collectd plugins:]) -- 2.30.2