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.
This commit is contained in:
parent
933c6eb795
commit
074f39c7bc
2 changed files with 11 additions and 4 deletions
12
acinclude.m4
12
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
|
||||
])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue