summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2012-02-03 16:22:50 +0100
committerAndy Wingo <wingo@pobox.com>2012-02-04 00:10:14 +0100
commitbc02028b52297bd33247435a573b76a873b2f4ba (patch)
tree8997f93a8188bd6f6f65a16beacad4ee803d1b0f /acinclude.m4
parent5f6ffd66523e4777ed90348b86296ca6715013bf (diff)
fix check for when libc already has clock_gettime / clock_getcpuclockid
* acinclude.m4 (gl_CLOCK_TIME): If both clock_gettime and clock_getcpuclockid are present without -lrt and -lposix4, don't add any libs to LIB_CLOCK_GETTIME. Thanks to taylanbarirli@gmail.com.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m43
1 files changed, 2 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index f9603d97d..0edd4b8b2 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -614,7 +614,8 @@ AC_DEFUN([gl_CLOCK_TIME],
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])
+ [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])