[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 3fc948a: New 'configure' arg --with-mini-gmp
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 3fc948a: New 'configure' arg --with-mini-gmp |
Date: |
Sun, 12 Aug 2018 04:07:07 -0400 (EDT) |
branch: master
commit 3fc948a36c0f70f73d2e8eb688b1599fa6b73036
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
New 'configure' arg --with-mini-gmp
* configure.ac: It lets the builder override default of whther
mini-gmp is used. Use AC_SEARCH_LIBS as per Autoconf manual.
---
configure.ac | 35 ++++++++++++++++++++++++-----------
etc/NEWS | 7 +++++--
2 files changed, 29 insertions(+), 13 deletions(-)
diff --git a/configure.ac b/configure.ac
index 690b999..58bdefa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4302,19 +4302,32 @@ AC_SUBST(KRB5LIB)
AC_SUBST(DESLIB)
AC_SUBST(KRB4LIB)
+AC_ARG_WITH([mini-gmp],
+ [AS_HELP_STRING([--without-mini-gmp],
+ [don't compile and use mini-gmp, a substitute for the
+ GNU Multiple Precision (GMP) library; this is the
+ default on systems with recent-enough GMP.])])
GMP_LIB=
-GMP_OBJ=
+GMP_OBJ=mini-gmp.o
HAVE_GMP=no
-AC_CHECK_LIB(gmp, __gmpz_roinit_n, [
- AC_CHECK_HEADERS(gmp.h, [
- GMP_LIB=-lgmp
- HAVE_GMP=yes
- AC_DEFINE(HAVE_GMP, 1, [Define to 1 if you have gmp.h and -lgmp])])])
-if test $HAVE_GMP = no; then
- GMP_OBJ=mini-gmp.o
-fi
-AC_SUBST(GMP_LIB)
-AC_SUBST(GMP_OBJ)
+case $with_mini_gmp in
+ yes) ;;
+ no) HAVE_GMP=yes;;
+ *) AC_CHECK_HEADERS([gmp.h],
+ [OLIBS=$LIBS
+ AC_SEARCH_LIBS([__gmpz_roinit_n], [gmp])
+ LIBS=$OLIBS
+ case $ac_cv_search___gmpz_roinit_n in
+ 'none needed') HAVE_GMP=yes;;
+ -*) HAVE_GMP=yes GMP_LIB=$ac_cv_search___gmpz_roinit_n;;
+ esac]);;
+esac
+if test "$HAVE_GMP" = yes; then
+ GMP_OBJ=
+ AC_DEFINE([HAVE_GMP], 1, [Define to 1 if you have recent-enough GMP.])
+fi
+AC_SUBST([GMP_LIB])
+AC_SUBST([GMP_OBJ])
AC_CHECK_HEADERS(valgrind/valgrind.h)
diff --git a/etc/NEWS b/etc/NEWS
index d684e35..decc5e3 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -24,8 +24,11 @@ When you add a new item, use the appropriate mark if you are
sure it applies,
* Installation Changes in Emacs 27.1
-** configure now checks for the GMP library. If not found, the
-included "mini-gmp" library is used instead.
+** Emacs now uses GMP, the GNU Multiple Precision library.
+By default, if 'configure' does not find a suitable libgmp, it
+arranges for the included mini-gmp library to be built and used.
+The new 'configure' option --with-mini-gmp uses mini-gmp even if a
+suitable libgmp is available.
** The new configure option '--with-json' adds support for JSON using
the Jansson library. It is on by default; use 'configure
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 3fc948a: New 'configure' arg --with-mini-gmp,
Paul Eggert <=