]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Fix --enable-static-tor on OpenBSD
authorNick Mathewson <nickm@torproject.org>
Mon, 13 Feb 2012 00:54:13 +0000 (19:54 -0500)
committerNick Mathewson <nickm@torproject.org>
Mon, 13 Feb 2012 00:54:13 +0000 (19:54 -0500)
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.

changes/bug5103 [new file with mode: 0644]
configure.in

diff --git a/changes/bug5103 b/changes/bug5103
new file mode 100644 (file)
index 0000000..dbc462c
--- /dev/null
@@ -0,0 +1,3 @@
+  o Minor bugfixes (build):
+    - When building with --enable-static-tor on OpenBSD, do not
+      erroneously attempt to link -lrt.
index ef571b84d6acb91899d171246af74064e45f0323..b37a89dc079010b67c268825bec69c3a38a0085c 100644 (file)
@@ -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])