Added configure test for CLOCK_MONOTONIC.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7953 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/configure.in b/configure.in
index e689205..56cb4bc 100644
--- a/configure.in
+++ b/configure.in
@@ -560,6 +560,26 @@
fi
+# Check for CLOCK_MONOTONIC
+
+AC_MSG_CHECKING([for CLOCK_MONOTONIC])
+
+AC_TRY_COMPILE(
+[
+#include <time.h>
+], [
+ struct timespec t;
+ clock_gettime(CLOCK_MONOTONIC, &t);
+ return 0;
+],
+[
+AC_MSG_RESULT([yes])
+AC_DEFINE([HAVE_CLOCK_MONOTONIC], 1,
+ [Define to 1 if you have the `CLOCK_MONOTONIC' constant.])
+], [
+AC_MSG_RESULT([no])
+])
+
# Check whether pthread_mutex_t has a member called __m_kind.
AC_MSG_CHECKING([for pthread_mutex_t::__m_kind])