summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-01-30 16:20:35 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-01-30 16:20:41 -0400
commit38fa1e17d73535d80407ea833ffe1474017e62eb (patch)
tree42a5b7c95fb9f96943c91782bed18f6d656adec4 /configure.ac
parentf1257cbc3eaddc075dcb4f9ebff17e4ea416c4ed (diff)
downloadfork-ledger-38fa1e17d73535d80407ea833ffe1474017e62eb.tar.gz
fork-ledger-38fa1e17d73535d80407ea833ffe1474017e62eb.tar.bz2
fork-ledger-38fa1e17d73535d80407ea833ffe1474017e62eb.zip
Added a dependency on mpfr.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 19 insertions, 0 deletions
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],