summaryrefslogtreecommitdiff
path: root/gnulib-local
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-07-06 23:56:05 +0200
committerLudovic Courtès <ludo@gnu.org>2012-07-06 23:56:05 +0200
commit235c280489cea3cc1272f9c9b0f6966791274712 (patch)
tree94d96c0a9b58cec663fac4184ede5903855d9f0d /gnulib-local
parent005de2e8273853e155c21767b1c8bdb4f3f3ca53 (diff)
Use `clock-time' directly from Gnulib, but with a local patch.
This is equivalent to the previous situation, but more easily maintainable. * acinclude.m4 (gl_CLOCK_TIME): Remove. * configure.ac: Remove explicit use of `gl_CLOCK_TIME'. * m4/gnulib-cache.m4 (gl_MODULES): Add `clock-time'. * gnulib-local/m4/clock_time.m4.diff: New file. * Makefile.am (EXTRA_DIST): Add it.
Diffstat (limited to 'gnulib-local')
-rw-r--r--gnulib-local/m4/clock_time.m4.diff28
1 files changed, 28 insertions, 0 deletions
diff --git a/gnulib-local/m4/clock_time.m4.diff b/gnulib-local/m4/clock_time.m4.diff
new file mode 100644
index 000000000..57d34e19c
--- /dev/null
+++ b/gnulib-local/m4/clock_time.m4.diff
@@ -0,0 +1,28 @@
+Remove when clock-gettime is fixed for clock_getcpuclockid.
+
+See <http://lists.gnu.org/archive/html/bug-gnulib/2011-06/msg00227.html>
+for details.
+
+diff --git a/m4/clock_time.m4 b/m4/clock_time.m4
+index 0bec0ef..fb3a17a 100644
+--- a/m4/clock_time.m4
++++ b/m4/clock_time.m4
+@@ -24,8 +24,15 @@ AC_DEFUN([gl_CLOCK_TIME],
+ AC_SUBST([LIB_CLOCK_GETTIME])
+ gl_saved_libs=$LIBS
+ AC_SEARCH_LIBS([clock_gettime], [rt posix4],
+- [test "$ac_cv_search_clock_gettime" = "none required" ||
+- LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
+- AC_CHECK_FUNCS([clock_gettime clock_settime])
++ [if test "$ac_cv_search_clock_gettime" = "none required"; then
++ AC_SEARCH_LIBS([clock_getcpuclockid], [rt posix4],
++ [test "$ac_cv_search_clock_getcpuclockid" = "none required" \
++ || LIB_CLOCK_GETTIME=$ac_cv_search_clock_getcpuclockid],
++ [test "$ac_cv_search_clock_gettime" = "none required" \
++ || LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime])
++ else
++ LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
++ fi])
++ AC_CHECK_FUNCS([clock_gettime clock_settime clock_getcpuclockid])
+ LIBS=$gl_saved_libs
+ ])