X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=configure.ac;h=949f04071f47b0a3d928e5aea87bcc9d91d15bf7;hp=c69842cc3ccf14fee6c7becc0be5248729379688;hb=73a6f82a63747f088352a61e201beac2d185b2ac;hpb=6cf795578e3f29efbaeea974fdcd1049105dd7ff diff --git a/configure.ac b/configure.ac index c69842cc..949f0407 100644 --- a/configure.ac +++ b/configure.ac @@ -755,6 +755,23 @@ AC_CHECK_HEADERS(net/pfvar.h, 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 +]]], +[[[ + 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"]) @@ -5537,6 +5554,7 @@ plugin_conntrack="no" plugin_contextswitch="no" plugin_cpu="no" plugin_cpufreq="no" +plugin_cpusleep="no" plugin_curl_json="no" plugin_curl_xml="no" plugin_df="no" @@ -5620,6 +5638,11 @@ then 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" @@ -5952,6 +5975,7 @@ AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statis AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics]) AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics]) AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics]) +AC_PLUGIN([cpusleep], [$plugin_cpusleep], [CPU sleep statistics]) AC_PLUGIN([csv], [yes], [CSV output plugin]) AC_PLUGIN([curl], [$with_libcurl], [CURL generic web statistics]) AC_PLUGIN([curl_json], [$plugin_curl_json], [CouchDB statistics]) @@ -6363,6 +6387,7 @@ AC_MSG_RESULT([ conntrack . . . . . . $enable_conntrack]) AC_MSG_RESULT([ contextswitch . . . . $enable_contextswitch]) AC_MSG_RESULT([ cpu . . . . . . . . . $enable_cpu]) AC_MSG_RESULT([ cpufreq . . . . . . . $enable_cpufreq]) +AC_MSG_RESULT([ cpusleep . . . . . . $enable_cpusleep]) AC_MSG_RESULT([ csv . . . . . . . . . $enable_csv]) AC_MSG_RESULT([ curl . . . . . . . . $enable_curl]) AC_MSG_RESULT([ curl_json . . . . . . $enable_curl_json])