diff options
author | Ian Lynagh <igloo@earth.li> | 2010-08-05 14:25:08 +0000 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2010-08-05 14:25:08 +0000 |
commit | 8e93ec542c3e0a5fac054a30cef807ead6d61ecb (patch) | |
tree | defea6ff1ea62e9cb8bb10150098a2f28c9970fc /configure.ac | |
parent | ddec0ec0a7772c434f2c7b4d284e9280067ed26b (diff) | |
download | haskell-8e93ec542c3e0a5fac054a30cef807ead6d61ecb.tar.gz |
Fix the -lm configure test; fixes #4155
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index f277367289..33614e0dca 100644 --- a/configure.ac +++ b/configure.ac @@ -780,8 +780,11 @@ 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_SEARCH_LIBS(atan, m, - [AC_DEFINE([HAVE_LIBM], [1], [Define to 1 if you need to link with libm])]) +AC_CHECK_LIB(m, atan, HaveLibM=YES, HaveLibM=NO) +if test $HaveLibM = YES +then + AC_DEFINE([HAVE_LIBM], [1], [Define to 1 if you need to link with libm]) +fi dnl ** check whether this machine has BFD and liberty installed (used for debugging) dnl the order of these tests matters: bfd needs liberty |