aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2018-08-12 01:06:15 -0700
committerPaul Eggert2018-08-12 01:07:02 -0700
commit3fc948a36c0f70f73d2e8eb688b1599fa6b73036 (patch)
tree09dd9b830125434834d6d4b965d353392bd889bd
parentd64c1be99036d083d1d0db97ed1f41b1dd1005bc (diff)
downloademacs-3fc948a36c0f70f73d2e8eb688b1599fa6b73036.tar.gz
emacs-3fc948a36c0f70f73d2e8eb688b1599fa6b73036.zip
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.
-rw-r--r--configure.ac35
-rw-r--r--etc/NEWS7
2 files changed, 29 insertions, 13 deletions
diff --git a/configure.ac b/configure.ac
index 690b999125f..58bdefab6d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4302,19 +4302,32 @@ AC_SUBST(KRB5LIB)
4302AC_SUBST(DESLIB) 4302AC_SUBST(DESLIB)
4303AC_SUBST(KRB4LIB) 4303AC_SUBST(KRB4LIB)
4304 4304
4305AC_ARG_WITH([mini-gmp],
4306 [AS_HELP_STRING([--without-mini-gmp],
4307 [don't compile and use mini-gmp, a substitute for the
4308 GNU Multiple Precision (GMP) library; this is the
4309 default on systems with recent-enough GMP.])])
4305GMP_LIB= 4310GMP_LIB=
4306GMP_OBJ= 4311GMP_OBJ=mini-gmp.o
4307HAVE_GMP=no 4312HAVE_GMP=no
4308AC_CHECK_LIB(gmp, __gmpz_roinit_n, [ 4313case $with_mini_gmp in
4309 AC_CHECK_HEADERS(gmp.h, [ 4314 yes) ;;
4310 GMP_LIB=-lgmp 4315 no) HAVE_GMP=yes;;
4311 HAVE_GMP=yes 4316 *) AC_CHECK_HEADERS([gmp.h],
4312 AC_DEFINE(HAVE_GMP, 1, [Define to 1 if you have gmp.h and -lgmp])])]) 4317 [OLIBS=$LIBS
4313if test $HAVE_GMP = no; then 4318 AC_SEARCH_LIBS([__gmpz_roinit_n], [gmp])
4314 GMP_OBJ=mini-gmp.o 4319 LIBS=$OLIBS
4315fi 4320 case $ac_cv_search___gmpz_roinit_n in
4316AC_SUBST(GMP_LIB) 4321 'none needed') HAVE_GMP=yes;;
4317AC_SUBST(GMP_OBJ) 4322 -*) HAVE_GMP=yes GMP_LIB=$ac_cv_search___gmpz_roinit_n;;
4323 esac]);;
4324esac
4325if test "$HAVE_GMP" = yes; then
4326 GMP_OBJ=
4327 AC_DEFINE([HAVE_GMP], 1, [Define to 1 if you have recent-enough GMP.])
4328fi
4329AC_SUBST([GMP_LIB])
4330AC_SUBST([GMP_OBJ])
4318 4331
4319AC_CHECK_HEADERS(valgrind/valgrind.h) 4332AC_CHECK_HEADERS(valgrind/valgrind.h)
4320 4333
diff --git a/etc/NEWS b/etc/NEWS
index d684e355244..decc5e39541 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,
24 24
25* Installation Changes in Emacs 27.1 25* Installation Changes in Emacs 27.1
26 26
27** configure now checks for the GMP library. If not found, the 27** Emacs now uses GMP, the GNU Multiple Precision library.
28included "mini-gmp" library is used instead. 28By default, if 'configure' does not find a suitable libgmp, it
29arranges for the included mini-gmp library to be built and used.
30The new 'configure' option --with-mini-gmp uses mini-gmp even if a
31suitable libgmp is available.
29 32
30** The new configure option '--with-json' adds support for JSON using 33** The new configure option '--with-json' adds support for JSON using
31the Jansson library. It is on by default; use 'configure 34the Jansson library. It is on by default; use 'configure