Commit 37df9c78 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Make montonic clock test work again. Does AC_COMPILE_IFELSE not get

2006-12-17  Matthias Clasen  <mclasen@redhat.com>

        * configure.in: Make montonic clock test work again. Does
        AC_COMPILE_IFELSE not get confdefs ? Also, move the clock
        tests below the thread checks to fix #364663.
parent 284678d2
2006-12-17 Matthias Clasen <mclasen@redhat.com>
* configure.in: Make montonic clock test work again. Does
AC_COMPILE_IFELSE not get confdefs ? Also, move the clock
tests below the thread checks to fix #364663.
* tests/run-markup-tests.sh: Don't use diff -u (#380801,
Marek Rouchal)
......
......@@ -859,29 +859,6 @@ AC_CHECK_FUNCS(lstat strerror strsignal memmove vsnprintf stpcpy strcasecmp strn
# Check for high-resolution sleep functions
AC_CHECK_FUNCS(nanosleep nsleep)
AC_CHECK_FUNCS(clock_gettime, [], [
AC_CHECK_LIB(rt, clock_gettime, [
AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
LIBS="$LIBS -lrt"
])
])
AC_CACHE_CHECK(for monotonic clocks,
glib_cv_monotonic_clock,AC_COMPILE_IFELSE([
#include <time.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
int main() {
#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC))
#error No monotonic clock
#endif
return 0;
}],glib_cv_monotonic_clock=yes,glib_cv_monotonic_clock=no))
if test "$glib_cv_monotonic_clock" = "yes"; then
AC_DEFINE(HAVE_MONOTONIC_CLOCK,1,[Have a monotonic clock])
fi
AC_CHECK_HEADERS(crt_externs.h)
AC_CHECK_FUNCS(_NSGetEnviron)
......@@ -2015,6 +1992,28 @@ if test $mutex_has_default = yes ; then
LIBS="$glib_save_LIBS"
fi
AC_CHECK_FUNCS(clock_gettime, [], [
AC_CHECK_LIB(rt, clock_gettime, [
AC_DEFINE(HAVE_CLOCK_GETTIME, 1)
LIBS="$LIBS -lrt"
])
])
AC_CACHE_CHECK(for monotonic clocks,
glib_cv_monotonic_clock,AC_COMPILE_IFELSE([
#include <time.h>
#include <unistd.h>
int main() {
#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC))
#error No monotonic clock
#endif
return 0;
}],glib_cv_monotonic_clock=yes,glib_cv_monotonic_clock=no))
if test "$glib_cv_monotonic_clock" = "yes"; then
AC_DEFINE(HAVE_MONOTONIC_CLOCK,1,[Have a monotonic clock])
fi
dnl ********************************
dnl *** g_atomic_* tests for gcc ***
dnl ********************************
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment