mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 09:46:17 +01:00
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.
This commit is contained in:
parent
284678d239
commit
37df9c784d
@ -1,5 +1,9 @@
|
||||
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)
|
||||
|
||||
|
45
configure.in
45
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 <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 ********************************
|
||||
|
Loading…
Reference in New Issue
Block a user