aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/bug51033
-rw-r--r--configure.in7
2 files changed, 9 insertions, 1 deletions
diff --git a/changes/bug5103 b/changes/bug5103
new file mode 100644
index 0000000000..dbc462ca79
--- /dev/null
+++ b/changes/bug5103
@@ -0,0 +1,3 @@
+ o Minor bugfixes (build):
+ - When building with --enable-static-tor on OpenBSD, do not
+ erroneously attempt to link -lrt.
diff --git a/configure.in b/configure.in
index ef571b84d6..b37a89dc07 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])