[Mono-dev] [RFC 02/12] configure: Don't hardcode libm dependency
Andreas Färber
andreas.faerber at web.de
Fri Mar 26 09:29:55 EDT 2010
Haiku has math functions in libroot.so and no libm.so.
A more elegant solution would be an autoconf check for some math function
actually used. That would avoid linking against -lm on Mac OS X as well,
where libm.dylib is a symlink to libSystem.dylib only.
In its present form, the patch does not change behavior of other platforms.
This commit is licensed under the MIT X11 license.
---
configure.in | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/configure.in b/configure.in
index 5cc7e4e..8b0a5c5 100644
--- a/configure.in
+++ b/configure.in
@@ -1509,7 +1509,13 @@ if test x$target_win32 = xno; then
dnl *********************************
dnl *** Checks for math functions ***
dnl *********************************
+ case $host_os in
+ haiku*)
+ ;;
+ *)
LIBS="$LIBS -lm";
+ ;;
+ esac
if test "x$has_broken_apple_cpp" != "xyes"; then
AC_CHECK_FUNCS(finite, , AC_MSG_CHECKING(for finite in math.h)
AC_TRY_LINK([#include <math.h>],
--
1.6.5.3
More information about the Mono-devel-list
mailing list