perf: optionally enable clockid and use_clockid

Some kernels to not have this feature yet, so check for support in
linux/perf_event.h and optionally enable the struct field.
This commit is contained in:
Christian Hergert
2016-04-16 16:07:11 -07:00
parent de572f4ed6
commit 06aaff90e5
4 changed files with 41 additions and 9 deletions

View File

@ -80,6 +80,16 @@ GOBJECT_INTROSPECTION_CHECK([1.42.0])
VAPIGEN_CHECK
dnl ***********************************************************************
dnl Check for recent perf improvements
dnl ***********************************************************************
AC_CHECK_MEMBERS([struct perf_event_attr.use_clockid, struct perf_event_attr.clockid],
[AC_DEFINE([HAVE_PERF_CLOCKID],[1],[Define if perf supports clockid])],
[],
[[#include <linux/perf_event.h>]])
dnl ***********************************************************************
dnl Check for required packages
dnl ***********************************************************************