Code

configure.in: Activate the cpu and swap plugins if sysctl is available.
authorFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 15 Feb 2009 17:30:20 +0000 (18:30 +0100)
committerFlorian Forster <octo@leeloo.lan.home.verplant.org>
Sun, 15 Feb 2009 17:30:20 +0000 (18:30 +0100)
configure.in

index 6b2adc18e2ee3a891e715528e902c6656151a627..80e7e4053c99434bb0c9af4b3a08afa00447c974 100644 (file)
@@ -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:])