summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-12-16 11:36:52 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-12-16 11:36:52 +0000
commit1c1bfbe71037e9b5a925a547e590e3628df00c7b (patch)
tree24a6b53a5a438ac19c36758b0c1ee4a56f81a40f /configure.ac
parentf2bfd33806f1339ecd16eb76b0146544b65dc68e (diff)
downloadhaskell-1c1bfbe71037e9b5a925a547e590e3628df00c7b.tar.gz
fix up libm detection and use (#3724)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 2 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac
index 15b3c8547a..a751e17a85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -728,11 +728,8 @@ dnl Keep that check as early as possible.
dnl as we need to know whether we need libm
dnl for math functions or not
dnl (see http://hackage.haskell.org/trac/ghc/ticket/3730)
-AC_CHECK_FUNC(atan,[fp_libm_not_needed=yes;LIBM=],[fp_libm_not_needed=dunno])
-if test x"$fp_libm_not_needed" = xdunno; then
- AC_CHECK_LIB([m], [atan], [LIBS="-lm $LIBS"; LIBM="-lm"],[LIBM=])
-fi
-AC_SUBST([LIBM])
+AC_SEARCH_LIBS(atan, m,
+ [AC_DEFINE([HAVE_LIBM], [1], [Define to 1 if you need to link with libm])])
dnl ** check whether this machine has BFD and liberty installed (used for debugging)
dnl the order of these tests matters: bfd needs liberty