aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-02-12 19:54:13 -0500
committerNick Mathewson <nickm@torproject.org>2012-02-12 19:54:13 -0500
commitb3abf153428b8f0bbcaeb245207742f7df5fad38 (patch)
treefa88d2e5098c18b5ce5bc42c68068b3185f51fcc /configure.in
parent61452299d1067298a2865deb6398b1fb269b2a81 (diff)
downloadtor-b3abf153428b8f0bbcaeb245207742f7df5fad38.tar
tor-b3abf153428b8f0bbcaeb245207742f7df5fad38.tar.gz
Fix --enable-static-tor on OpenBSD
Previously we'd been using "we have clock_gettime()" as a proxy for "we need -lrt to link a static libevent". But that's not really accurate: we should only add -lrt if searching for clock_gettime function adds -lrt to our libraries.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in7
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index ef571b84d..b37a89dc0 100644
--- a/configure.in
+++ b/configure.in
@@ -280,7 +280,12 @@ AC_SEARCH_LIBS(socket, [socket network])
AC_SEARCH_LIBS(gethostbyname, [nsl])
AC_SEARCH_LIBS(dlopen, [dl])
AC_SEARCH_LIBS(inet_aton, [resolv])
-AC_SEARCH_LIBS([clock_gettime], [rt], [have_rt=yes])
+saved_LIBS="$LIBS"
+AC_SEARCH_LIBS([clock_gettime], [rt])
+if test "$LIBS" != "$saved_LIBS"; then
+ # Looks like we need -lrt for clock_gettime().
+ have_rt=yes
+fi
if test "$enable_threads" = "yes"; then
AC_SEARCH_LIBS(pthread_create, [pthread])