diff options
| author | Paul Eggert | 2018-08-12 01:06:15 -0700 |
|---|---|---|
| committer | Paul Eggert | 2018-08-12 01:07:02 -0700 |
| commit | 3fc948a36c0f70f73d2e8eb688b1599fa6b73036 (patch) | |
| tree | 09dd9b830125434834d6d4b965d353392bd889bd | |
| parent | d64c1be99036d083d1d0db97ed1f41b1dd1005bc (diff) | |
| download | emacs-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.ac | 35 | ||||
| -rw-r--r-- | etc/NEWS | 7 |
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) | |||
| 4302 | AC_SUBST(DESLIB) | 4302 | AC_SUBST(DESLIB) |
| 4303 | AC_SUBST(KRB4LIB) | 4303 | AC_SUBST(KRB4LIB) |
| 4304 | 4304 | ||
| 4305 | AC_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.])]) | ||
| 4305 | GMP_LIB= | 4310 | GMP_LIB= |
| 4306 | GMP_OBJ= | 4311 | GMP_OBJ=mini-gmp.o |
| 4307 | HAVE_GMP=no | 4312 | HAVE_GMP=no |
| 4308 | AC_CHECK_LIB(gmp, __gmpz_roinit_n, [ | 4313 | case $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 |
| 4313 | if test $HAVE_GMP = no; then | 4318 | AC_SEARCH_LIBS([__gmpz_roinit_n], [gmp]) |
| 4314 | GMP_OBJ=mini-gmp.o | 4319 | LIBS=$OLIBS |
| 4315 | fi | 4320 | case $ac_cv_search___gmpz_roinit_n in |
| 4316 | AC_SUBST(GMP_LIB) | 4321 | 'none needed') HAVE_GMP=yes;; |
| 4317 | AC_SUBST(GMP_OBJ) | 4322 | -*) HAVE_GMP=yes GMP_LIB=$ac_cv_search___gmpz_roinit_n;; |
| 4323 | esac]);; | ||
| 4324 | esac | ||
| 4325 | if test "$HAVE_GMP" = yes; then | ||
| 4326 | GMP_OBJ= | ||
| 4327 | AC_DEFINE([HAVE_GMP], 1, [Define to 1 if you have recent-enough GMP.]) | ||
| 4328 | fi | ||
| 4329 | AC_SUBST([GMP_LIB]) | ||
| 4330 | AC_SUBST([GMP_OBJ]) | ||
| 4318 | 4331 | ||
| 4319 | AC_CHECK_HEADERS(valgrind/valgrind.h) | 4332 | AC_CHECK_HEADERS(valgrind/valgrind.h) |
| 4320 | 4333 | ||
| @@ -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. |
| 28 | included "mini-gmp" library is used instead. | 28 | By default, if 'configure' does not find a suitable libgmp, it |
| 29 | arranges for the included mini-gmp library to be built and used. | ||
| 30 | The new 'configure' option --with-mini-gmp uses mini-gmp even if a | ||
| 31 | suitable 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 |
| 31 | the Jansson library. It is on by default; use 'configure | 34 | the Jansson library. It is on by default; use 'configure |