summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-05-20 18:48:33 +0200
committerAndy Wingo <wingo@pobox.com>2011-06-17 11:31:12 +0200
commit074f39c7bc86386fd2d3ce9f4657451e6621e511 (patch)
treec08911b716994cd3e38aece19df32ef7e83414aa /acinclude.m4
parent933c6eb795d2a427d469cf94957e4cdb2758ecd2 (diff)
downloadguile-074f39c7bc86386fd2d3ce9f4657451e6621e511.tar.gz
check for clock_getcpuclockid in gl_CLOCK_TIME
* acinclude.m4 (gl_CLOCK_TIME): It could be that clock_gettime is in libc but clock_getcpuclockid is not, so check for that explicitly.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m412
1 files changed, 9 insertions, 3 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index ba8b09031..5bd1cedab 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -529,8 +529,14 @@ 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],
+ [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
])