summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorMartin Hebnes Pedersen <martin.h.pedersen@gmail.com>2011-12-17 14:30:41 +0100
committerNick Mathewson <nickm@torproject.org>2011-12-19 11:27:08 -0500
commitf783a326b82518bf75b1d3952332b05aac7ffd9b (patch)
tree44a83bb7b7470029d5e6dd061459f6779b5a59fa /configure.in
parent37504b5efae2e1423ec09eae6fc6d1e229987e3d (diff)
downloadtor-f783a326b82518bf75b1d3952332b05aac7ffd9b.tar.gz
tor-f783a326b82518bf75b1d3952332b05aac7ffd9b.zip
-lm should not be hardcoded.
On some platforms (Haiku/BeOS) libm lives in libcore. Also added 'network' to the list of libraries to search for connect().
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in16
1 files changed, 15 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index b05e935343..d1b7c4441c 100644
--- a/configure.in
+++ b/configure.in
@@ -279,7 +279,7 @@ fi
AC_C_BIGENDIAN
-AC_SEARCH_LIBS(socket, [socket])
+AC_SEARCH_LIBS(socket, [socket network])
AC_SEARCH_LIBS(gethostbyname, [nsl])
AC_SEARCH_LIBS(dlopen, [dl])
AC_SEARCH_LIBS(inet_aton, [resolv])
@@ -483,6 +483,20 @@ fi
AC_SUBST(TOR_LIBEVENT_LIBS)
dnl ------------------------------------------------------
+dnl Where do you live, libm?
+
+dnl On some platforms (Haiku/BeOS) the math library is
+dnl part of libroot. In which case don't link against lm
+TOR_LIB_MATH=""
+save_LIBS="$LIBS"
+AC_SEARCH_LIBS(cos, [m], , AC_MSG_ERROR([Could not find libm and libcore does not provide the functions.]))
+if test "$ac_cv_search_cos" != "none required"; then
+ TOR_LIB_MATH="$ac_cv_search_cos"
+fi
+LIBS="$save_LIBS"
+AC_SUBST(TOR_LIB_MATH)
+
+dnl ------------------------------------------------------
dnl Where do you live, openssl? And how do we call you?
tor_openssl_pkg_redhat="openssl"