summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c8a4558)
raw | patch | inline | side by side (parent: c8a4558)
author | Rinigus <rinigus.git@gmail.com> | |
Tue, 5 Jul 2016 19:57:11 +0000 (22:57 +0300) | ||
committer | Rinigus <rinigus.git@gmail.com> | |
Tue, 5 Jul 2016 19:57:11 +0000 (22:57 +0300) |
configure.ac | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 2a4d98d2f47ce5080e7bf2d667cd4acd4167caba..8be837f91a027647fd761df55ef0937de6e18682 100644 (file)
--- a/configure.ac
+++ b/configure.ac
have_termios_h="no"
AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
+# For cpusleep plugin
+AC_CACHE_CHECK([whether clock_boottime and clock_monotonic are supported],
+ [c_cv_have_clock_boottime_monotonic],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+[[[
+#include <time.h>
+]]],
+[[[
+ struct timespec b, m;
+ clock_gettime(CLOCK_BOOTTIME, &b );
+ clock_gettime(CLOCK_MONOTONIC, &m );
+]]]
+ )],
+ [c_cv_have_clock_boottime_monotonic="yes"],
+ [c_cv_have_clock_boottime_monotonic="no"]))
+
+
# For the turbostat plugin
have_asm_msrindex_h="no"
AC_CHECK_HEADERS(asm/msr-index.h, [have_asm_msrindex_h="yes"])
plugin_contextswitch="yes"
plugin_cpu="yes"
plugin_cpufreq="yes"
- plugin_cpusleep="yes"
plugin_disk="yes"
plugin_drbd="yes"
plugin_entropy="yes"
then
plugin_turbostat="yes"
fi
+
+ if test "x$c_cv_have_clock_boottime_monotonic" = "xyes"
+ then
+ plugin_cpusleep="yes"
+ fi
fi
if test "x$ac_system" = "xOpenBSD"