diff options
author | Vladimir Kobal <vlad@prokk.net> | 2019-07-04 18:17:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-04 18:17:00 +0300 |
commit | f711c5fde7ce22325e750836f8cf980354c5942a (patch) | |
tree | ba3321ba808e607ffb20cd110383ce92c2257fca /configure.ac | |
parent | 1f51a653289745f11b0fe746c5af04fca2748994 (diff) |
Add a check for a macro declaration for the perf plugin (#6382)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index aaa071618a..b922ad5bfe 100644 --- a/configure.ac +++ b/configure.ac @@ -737,8 +737,19 @@ AM_CONDITIONAL([ENABLE_PLUGIN_XENSTAT], [test "${enable_plugin_xenstat}" = "yes" # ----------------------------------------------------------------------------- # perf.plugin +AC_CHECK_HEADER( + [linux/perf_event.h], + [AC_CHECK_DECL( + [PERF_COUNT_HW_REF_CPU_CYCLES], + [have_perf_event=yes], + [have_perf_event=no], + [#include <linux/perf_event.h>] + )], + [have_perf_event=no] +) + AC_MSG_CHECKING([if perf.plugin should be enabled]) -if test "${build_target}" == "linux" ; then +if test "${build_target}" == "linux" -a "${have_perf_event}" = "yes"; then enable_plugin_perf="yes" else enable_plugin_perf="no" |