Use AC_LANG_SOURCE for the clock test.

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

        * configure.in: Use AC_LANG_SOURCE for the clock test.
This commit is contained in:
Matthias Clasen
2006-12-18 01:13:47 +00:00
committed by Matthias Clasen
parent 815367a003
commit cba7bcc9cd
2 changed files with 9 additions and 4 deletions

View File

@@ -1,5 +1,7 @@
2006-12-17 Matthias Clasen <mclasen@redhat.com> 2006-12-17 Matthias Clasen <mclasen@redhat.com>
* configure.in: Use AC_LANG_SOURCE for the clock test.
* glib/gthreadpool.h: * glib/gthreadpool.h:
* glib/gthreadpool.c (g_thread_pool_free): Don't use "wait" * glib/gthreadpool.c (g_thread_pool_free): Don't use "wait"
as parameter name. (#379207, Christian Biere) as parameter name. (#379207, Christian Biere)

View File

@@ -2000,15 +2000,18 @@ AC_CHECK_FUNCS(clock_gettime, [], [
]) ])
AC_CACHE_CHECK(for monotonic clocks, AC_CACHE_CHECK(for monotonic clocks,
glib_cv_monotonic_clock,AC_COMPILE_IFELSE([ glib_cv_monotonic_clock,AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#include <time.h> #include <time.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h> #include <unistd.h>
int main() { #endif
int main (int argc, char *argv[]) {
#if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC)) #if !(defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0 && defined(CLOCK_MONOTONIC))
#error No monotonic clock #error No monotonic clock
#endif #endif
return 0; return 0;
}],glib_cv_monotonic_clock=yes,glib_cv_monotonic_clock=no)) }
]])],glib_cv_monotonic_clock=yes,glib_cv_monotonic_clock=no))
if test "$glib_cv_monotonic_clock" = "yes"; then if test "$glib_cv_monotonic_clock" = "yes"; then
AC_DEFINE(HAVE_MONOTONIC_CLOCK,1,[Have a monotonic clock]) AC_DEFINE(HAVE_MONOTONIC_CLOCK,1,[Have a monotonic clock])
fi fi