[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tlsdate/master] Apparently the Hurd may put clock_gettime in lib rt



commit abdf06d8b25e6af0f48a3f1d057a5cbdcf46e2a3
Author: Jacob Appelbaum <jacob@xxxxxxxxxxxxx>
Date:   Thu Apr 25 15:21:35 2013 -0700

    Apparently the Hurd may put clock_gettime in lib rt
---
 configure.ac |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 92915fd..b520066 100644
--- a/configure.ac
+++ b/configure.ac
@@ -307,10 +307,13 @@ case "$host" in
     ;;
   *-gnu0.*)
     dnl This is a generic catch for GNU/Hurd variants
-    dnl This likely needs to be tuned to catch all
-    dnl clock_gettime is either part of libc or unavailable.
-    AC_CHECK_FUNC([clock_gettime], ,
-                  [AC_MSG_ERROR([Your system lacks clock_gettime])])
+    dnl Check for clock_gettime.  Some systems put it into -lc, while
+    dnl others use -lrt.  Try the first and fallback to the latter.
+    RT_LIB=
+    AC_CHECK_FUNC([clock_gettime], [:],
+                  [AC_CHECK_LIB([rt], [clock_gettime], [RT_LIB="-lrt"],
+                  [AC_MSG_ERROR([Your system lacks clock_gettime])])])
+    AC_SUBST(RT_LIB)
     dnl If the autoconf goo picks up a compiler that runs in pre-POSIX mode,
     dnl the fmemopen prototype is hidden causing the unit tests to segfault.
     dnl This can happen if gcc is a symlink to gcc46 and is preferred to clang.

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits