summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2012-03-03 23:29:20 +0000
committerMorgan Deters <mdeters@gmail.com>2012-03-03 23:29:20 +0000
commit323090e50edd5da02292e76a5510d4d6ae2d7f94 (patch)
tree96bd77ed552b5a80edb3dae88837caa688a4858e
parent41483ef432845445816409454a2ea09872ed1afd (diff)
Changing the dependency checking; GMP is required (and sometimes must be explicitly linked in with -l) when using CLN. Fixes a bug on recent Debian that Francois reported. Hopefully this doesn't break anything..
-rw-r--r--configure.ac13
1 files changed, 10 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index e8960111a..ee6975034 100644
--- a/configure.ac
+++ b/configure.ac
@@ -259,6 +259,10 @@ if test $cvc4_use_cln = 1 && test $cvc4_use_gmp = 1; then
AC_MSG_ERROR([You cannot use both CLN and GMP. Please pick one.])
fi
+# try GMP, fail if not found; GMP is required for both CLN and for GMP
+# versions of CVC4
+AC_CHECK_LIB(gmp, __gmpz_init, , [AC_MSG_ERROR([GNU MP (libgmp) not found, see http://gmplib.org/])])
+
if test $cvc4_use_cln = 1; then
# [mdeters] The PKG_CHECK_MODULES macro isn't customizable and doesn't fail
# gracefully. You can only specify it once for a given library name. That
@@ -266,7 +270,11 @@ if test $cvc4_use_cln = 1; then
# PKG_CHECK_MODULES([CLN], ...). That's why things are so convoluted here,
# we have to have PKG_CHECK_MODULES _exactly_ once in configure.ac !
PKG_CHECK_MODULES([CLN], [cln >= 1.2.2],
- [cvc4_use_cln=1],
+ [cvc4_use_cln=1
+ AC_LANG_PUSH([C++])
+ AC_LINK_IFELSE(AC_LANG_PROGRAM([[#include <cln/cln.h>]], [[cln::cl_F pi = "3.1415926";]]))
+ AC_LANG_POP([C++])
+ ],
[if test $cvc4_use_cln = 0; then
# fall back to GMP
AC_MSG_NOTICE([CLN not installed (or too old) or pkgconfig missing, will use gmp])
@@ -278,8 +286,7 @@ if test $cvc4_use_cln = 1; then
)
fi
if test $cvc4_use_cln = 0; then
- # try GMP, fail if not found
- AC_CHECK_LIB(gmp, __gmpz_init, , [AC_MSG_ERROR([GNU MP (libgmp) not found, see http://gmplib.org/])])
+ # try GMPXX, fail if not found
AC_CHECK_LIB(gmpxx, __gmpz_init, , [AC_MSG_ERROR([GNU MP C++ library (libgmpxx) not found, see http://gmplib.org/])])
cvc4_cln_or_gmp=gmp
else
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback