summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac19
-rw-r--r--src/system.hh1
3 files changed, 21 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 8417adb2..859ed24c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -281,7 +281,7 @@ PYLIBS = ledger_util ledger_math ledger_expr \
ledger_data ledger_parse \
ledger_report ledger_extra \
ledger_python \
- gmp \
+ gmp mpfr \
boost_system$(BOOST_SUFFIX) \
boost_date_time$(BOOST_SUFFIX) \
boost_filesystem$(BOOST_SUFFIX) \
diff --git a/configure.ac b/configure.ac
index 9cdb5efe..e1fc2e77 100644
--- a/configure.ac
+++ b/configure.ac
@@ -109,6 +109,25 @@ else
AC_MSG_FAILURE("Could not find gmp library (set CPPFLAGS and LDFLAGS?)")
fi
+# check for mpfr
+AC_CACHE_CHECK(
+ [if libmpfr is available],
+ [libmpfr_avail_cv_],
+ [libmpfr_save_libs=$LIBS
+ LIBS="-lmpfr $LIBS"
+ AC_LANG_PUSH(C++)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <mpfr.h>]], [[mpfr_t bar;
+ mpfr_init(bar);
+ mpfr_clear(bar);]])],[libmpfr_avail_cv_=true],[libmpfr_avail_cv_=false])
+ AC_LANG_POP
+ LIBS=$libmpfr_save_libs])
+
+if [test x$libmpfr_avail_cv_ = xtrue ]; then
+ LIBS="-lmpfr $LIBS"
+else
+ AC_MSG_FAILURE("Could not find mpfr library (set CPPFLAGS and LDFLAGS?)")
+fi
+
# check for boost_regex
AC_CACHE_CHECK(
[if boost_regex is available],
diff --git a/src/system.hh b/src/system.hh
index 7978119f..5f79fb6f 100644
--- a/src/system.hh
+++ b/src/system.hh
@@ -121,6 +121,7 @@ typedef std::ostream::pos_type ostream_pos_type;
#endif
#include <gmp.h>
+#include <mpfr.h>
#include "SHA1.h"
#include "irrXML.h" // XML parser