]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Added configure test for CLOCK_MONOTONIC.
authorBart Van Assche <bvanassche@acm.org>
Mon, 28 Apr 2008 16:22:53 +0000 (16:22 +0000)
committerBart Van Assche <bvanassche@acm.org>
Mon, 28 Apr 2008 16:22:53 +0000 (16:22 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7953

configure.in

index e689205b8b6d3f7603a9e871be2dc48fd6ddb50c..56cb4bc0af551e0744d14788b229eba26e3d480f 100644 (file)
@@ -560,6 +560,26 @@ if test "${no_x}" != 'yes' ; then
 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])