diff options
author | Petr Vaněk <pv@excello.cz> | 2019-10-22 16:29:03 +0200 |
---|---|---|
committer | Vladimir Kobal <vlad@prokk.net> | 2019-10-22 17:29:03 +0300 |
commit | 31116639d6a9f9fd731502150207371b892dc4e6 (patch) | |
tree | 4c3dcdfa1cbffbd348bd8badfe026c800e131f46 /configure.ac | |
parent | 509882ea3b533114ea6e271b0a2281e5f9dd092e (diff) |
xenstat.plugin: check xenstat_vbd_error presence (#7103)
The xenstat_vbd_error function is going to be part of the xen 4.13
release. The workaround here is to check if the function is already
present in configuration phase and set vbd_m->error always to 0 if
xenstat_vbd_error does not exist.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index ea91a72991..35147b0e92 100644 --- a/configure.ac +++ b/configure.ac @@ -748,6 +748,22 @@ fi AC_MSG_RESULT([${enable_plugin_xenstat}]) AM_CONDITIONAL([ENABLE_PLUGIN_XENSTAT], [test "${enable_plugin_xenstat}" = "yes"]) +if test "${enable_plugin_xenstat}" == "yes"; then + AC_MSG_CHECKING([for xenstat_vbd_error in -lxenstat]) + AC_TRY_LINK( + [ #include <xenstat.h> ], + [ + xenstat_vbd * vbd; + int out = xenstat_vbd_error(vbd); + ], + [ + have_xenstat_vbd_error=yes + AC_DEFINE([HAVE_XENSTAT_VBD_ERROR], [1], [xenstat_vbd_error usability]) + ], + [ have_xenstat_vbd_error=no ] + ) + AC_MSG_RESULT([${have_xenstat_vbd_error}]) +fi # ----------------------------------------------------------------------------- # perf.plugin |