From: Bart Van Assche Date: Mon, 28 Apr 2008 16:22:53 +0000 (+0000) Subject: Added configure test for CLOCK_MONOTONIC. X-Git-Tag: svn/VALGRIND_3_4_0~671 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0223f8f02733a54583e80aa108f44181a25a18b3;p=thirdparty%2Fvalgrind.git Added configure test for CLOCK_MONOTONIC. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7953 --- diff --git a/configure.in b/configure.in index e689205b8b..56cb4bc0af 100644 --- a/configure.in +++ b/configure.in @@ -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 +], [ + 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])