From: Matthias Clasen Date: Sat, 16 Dec 2006 22:11:23 +0000 (+0000) Subject: Use AC_COMPILE_IFELSE for the monotonic clock test. (#362918, Han-Wen X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=d4dc24fc1bd987172bbf2f47f03e985c94ac0399;p=dana%2Fcg-glib.git Use AC_COMPILE_IFELSE for the monotonic clock test. (#362918, Han-Wen 2006-12-16 Matthias Clasen * configure.in: Use AC_COMPILE_IFELSE for the monotonic clock test. (#362918, Han-Wen Nienhuys, Jeremy Lainé) --- diff --git a/ChangeLog b/ChangeLog index 91171970..24ae24f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2006-12-16 Matthias Clasen + * configure.in: Use AC_COMPILE_IFELSE for the monotonic + clock test. (#362918, Han-Wen Nienhuys, Jeremy Lainé) + * glib/gstring.c: Move documentation inline. 2006-12-15 Matthias Clasen diff --git a/configure.in b/configure.in index 2de62880..2a063e7a 100644 --- a/configure.in +++ b/configure.in @@ -867,20 +867,17 @@ AC_CHECK_FUNCS(clock_gettime, [], [ ]) AC_CACHE_CHECK(for monotonic clocks, - glib_cv_monotonic_clock,AC_TRY_RUN([ + 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) - return 0; -#else - return 1; +#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)) - -GLIB_ASSERT_SET(glib_cv_monotonic_clock) if test "$glib_cv_monotonic_clock" = "yes"; then AC_DEFINE(HAVE_MONOTONIC_CLOCK,1,[Have a monotonic clock]) fi