From 121de172851876c050e867379f5623591b85b7fc Mon Sep 17 00:00:00 2001 From: oxc Date: Sun, 29 Jan 2012 13:07:29 +0100 Subject: Remove automagic dependencies on libgmp and libmpir, let the caller disable them using args. --- configure.ac | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 2b68d71..b45655d 100644 --- a/configure.ac +++ b/configure.ac @@ -10,8 +10,16 @@ AC_CONFIG_HEADERS([src/config.h]) AC_PROG_CC # Checks for libraries. -AC_CHECK_LIB([gmp], [__gmpz_init]) -AC_CHECK_LIB([mpir], [__gmpz_init]) +AC_ARG_WITH([gmp], AS_HELP_STRING([--without-gmp], [Build without gmp library (default: test)])) +AS_IF([test "x$with_gmp" != "xno"], [ + AC_CHECK_LIB([gmp], [__gmpz_init]) +]) + +AC_ARG_WITH([mpir], AS_HELP_STRING([--without-mpir], [Build without mpir library (default: test)])) +AS_IF([test "x$with_mpir" != "xno"], [ + AC_CHECK_LIB([mpir], [__gmpz_init]) +]) + AC_CHECK_DECLS([mpz_powm], [], [], [ [#if HAVE_LIBGMP # include -- cgit v1.2.1