Commit 1c1bfbe7 authored by Simon Marlow's avatar Simon Marlow
Browse files

fix up libm detection and use (#3724)

parent f2bfd338
......@@ -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
......
......@@ -302,9 +302,6 @@ SupportsSplitObjs=$(strip $(if $(filter YES,$(ArchSupportsSplitObjs)),\
# By default, enable SplitObjs for the libraries if this build supports it
SplitObjs=$(SupportsSplitObjs)
# Math library
LIBM=@LIBM@
# .NET interop support?
#
DotnetSupport=NO
......
......@@ -27,7 +27,10 @@ library-dirs: TOP"/rts/dist/build" PAPI_LIB_DIR
hs-libraries: "HSrts"
extra-libraries: "m" /* for ldexp() */
extra-libraries:
#ifdef HAVE_LIBM
"m" /* for ldexp() */
#endif
#ifdef HAVE_LIBRT
, "rt"
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment