clock_time.m4.diff 1.4 KB

123456789101112131415161718192021222324252627282930
  1. Remove when clock-gettime is fixed for clock_getcpuclockid.
  2. See <http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00227.html>
  3. for details.
  4. diff --git a/m4/clock_time.m4 b/m4/clock_time.m4
  5. index d624a73d35..7b2f5bf1ab 100644
  6. --- a/m4/clock_time.m4
  7. +++ b/m4/clock_time.m4
  8. @@ -25,9 +25,18 @@ AC_DEFUN([gl_CLOCK_TIME],
  9. AC_SUBST([CLOCK_TIME_LIB])
  10. gl_saved_libs=$LIBS
  11. AC_SEARCH_LIBS([clock_gettime], [rt posix4],
  12. + [if test "$ac_cv_search_clock_gettime" = "none required"; then
  13. + AC_SEARCH_LIBS([clock_getcpuclockid], [rt posix4],
  14. + [test "$ac_cv_search_clock_getcpuclockid" = "none required" \
  15. + || CLOCK_TIME_LIB=$ac_cv_search_clock_getcpuclockid],
  16. + [test "$ac_cv_search_clock_gettime" = "none required" \
  17. + || CLOCK_TIME_LIB=$ac_cv_search_clock_gettime])
  18. + else
  19. + CLOCK_TIME_LIB=$ac_cv_search_clock_gettime
  20. + fi]
  21. [test "$ac_cv_search_clock_gettime" = "none required" ||
  22. CLOCK_TIME_LIB=$ac_cv_search_clock_gettime])
  23. - AC_CHECK_FUNCS([clock_getres clock_gettime clock_settime])
  24. + AC_CHECK_FUNCS([clock_getres clock_gettime clock_settime clock_getcpuclockid])
  25. LIBS=$gl_saved_libs
  26. # For backward compatibility.
  27. LIB_CLOCK_GETTIME="$CLOCK_TIME_LIB"