diff --git a/ChangeLog b/ChangeLog index 2719e9699..081be9f8d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-12-17 Matthias Clasen + * 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) diff --git a/configure.in b/configure.in index 2a063e7a2..4aeed1f20 100644 --- a/configure.in +++ b/configure.in @@ -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 -#ifdef HAVE_UNISTD_H -#include -#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 +#include + 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 ********************************