From: Vincent Brillault Date: Fri, 17 Apr 2015 15:18:06 +0000 (+0200) Subject: Turbostat: build only if requirements are met X-Git-Tag: collectd-5.5.0~24^2~9 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=6b9773c7735fa3ff454b57a62f75a5b32b7ed4d5;p=collectd.git Turbostat: build only if requirements are met --- diff --git a/configure.ac b/configure.ac index 82019819..35ce32ba 100644 --- a/configure.ac +++ b/configure.ac @@ -590,6 +590,12 @@ have_termios_h="no" AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"]) # For the turbostat plugin +have_asm_msrindex_h="no" +AC_CHECK_HEADERS(asm/msr-index.h, [have_asm_msrindex_h="yes"]) + +have_cpuid_h="no" +AC_CHECK_HEADERS(cpuid.h, [have_cpuid_h="yes"]) + AC_CHECK_HEADERS(sys/capability.h) # # Checks for typedefs, structures, and compiler characteristics. @@ -5177,7 +5183,6 @@ then plugin_swap="yes" plugin_tcpconns="yes" plugin_thermal="yes" - plugin_turbostat="yes" plugin_uptime="yes" plugin_vmem="yes" plugin_vserver="yes" @@ -5188,6 +5193,10 @@ then then plugin_ipvs="yes" fi + if test "x$have_asm_msrindex_h" = "xyes" && test "x$have_cpuid_h" = "xyes" + then + plugin_turbostat="yes" + fi fi if test "x$ac_system" = "xOpenBSD"