[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Add support for configure option --without-gmp.
From: |
James Youngman |
Subject: |
[PATCH] Add support for configure option --without-gmp. |
Date: |
Wed, 30 Jul 2008 10:25:28 +0100 |
2008-07-30 James Youngman <address@hidden>
* m4/gmp.m4: Add support for --without-gmp.
---
m4/gmp.m4 | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/m4/gmp.m4 b/m4/gmp.m4
index c0d1091..1efecd8 100644
--- a/m4/gmp.m4
+++ b/m4/gmp.m4
@@ -11,10 +11,17 @@ dnl Written by James Youngman.
dnl Check for libgmp. We avoid use of AC_CHECK_LIBS because we don't want to
dnl add this to $LIBS for all targets.
AC_DEFUN([cu_GMP],
-[
- AC_CHECK_LIB(gmp, __gmpz_init,
- [
- AC_DEFINE(HAVE_GMP,1,[Define if you have GNU libgmp (or
replacement)])
- AC_SUBST(LIB_GMP,[-lgmp])
- ],)
+[AC_ARG_WITH(gmp,
+ AS_HELP_STRING([--without-gmp],
+ [do not use the GNU MP library for arbitrary
precision calculation (the default is to use it if it is available)]),
+ [cu_use_gmp=$withval],
+ [cu_use_gmp=auto])
+
+ if test"$cu_use_gmp" = auto; then
+ AC_CHECK_LIB(gmp, __gmpz_init, [cu_use_gmp=yes])
+ fi
+ if test "$cu_use_gmp" = yes; then
+ AC_DEFINE(HAVE_GMP,1,[Define if you have GNU libgmp (or replacement) and
want to use it])
+ AC_SUBST(LIB_GMP,[-lgmp])
+ fi
])
--
1.5.6.3
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Add support for configure option --without-gmp.,
James Youngman <=