@cryptotaxi247 / netdata-1 / commits / f711c5fde

Add a check for a macro declaration for the perf plugin (#6382)

Vladimir Kobal committed Jul 4, 2019 at 18:17 UTC f711c5fde7ce22325e750836f8cf980354c5942a
1 file changed +12 -1
configure.ac
+12 -1
@@ -737,8 +737,19 @@ AM_CONDITIONAL([ENABLE_PLUGIN_XENSTAT], [test "${enable_plugin_xenstat}" = "yes"
737 # -----------------------------------------------------------------------------
738 # perf.plugin
739
740 +AC_CHECK_HEADER(
741 + [linux/perf_event.h],
742 + [AC_CHECK_DECL(
743 + [PERF_COUNT_HW_REF_CPU_CYCLES],
744 + [have_perf_event=yes],
745 + [have_perf_event=no],
746 + [#include <linux/perf_event.h>]
747 + )],
748 + [have_perf_event=no]
749 +)
750 +
751 AC_MSG_CHECKING([if perf.plugin should be enabled])
741 -if test "${build_target}" == "linux" ; then
752 +if test "${build_target}" == "linux" -a "${have_perf_event}" = "yes"; then
753 enable_plugin_perf="yes"
754 else
755 enable_plugin_perf="no"