diff options
author | Michael Gran <spk121@yahoo.com> | 2021-03-01 22:57:30 -0800 |
---|---|---|
committer | Michael Gran <spk121@yahoo.com> | 2021-03-02 06:18:32 -0800 |
commit | 54adbd6f0f173c5c2633c316670793322f08d44d (patch) | |
tree | faec6a86f62f781b962d797160783e6a8875d621 /configure.ac | |
parent | eb1bd8050ef7fe3ef2a0bd07a42f39ad2f278936 (diff) | |
download | guile-54adbd6f0f173c5c2633c316670793322f08d44d.tar.gz |
improve autoconfigury for minigmp
* configure.ac: add SCM_I_GSC_ENABLE_MINI_GMP var and rename
GUILE_MINI_GMP to ENABLE_MINI_GMP
* libguile/bytevectors (GUILE_MINI_GMP): rename to ENABLE_MINI_GMP
* libguile/gen-scmconfig.c: renamed GUILE_MINI_GMP to ENABLE_MINI_GMP.
rename GUILE_MINI_GMP to SCM_ENABLE_MINI_GMP
* libguile/gen-scmconfig.h: add SCM_I_GSC_ENABLE_MINI_GMP
* libguile/init.c [GUILE_MINI_GMP]: prefer ENABLE_MINI_GMP
* libguile/numbers.c [GUILE_MINI_GMP]: prefer ENABLE_MINI_GMP
* libguile/numbers.h: include scmconfig.h
rename GUILE_MINI_GMP to SCM_ENABLE_MINI_GMP
* libguile/random.c [GUILE_MINI_GMP]: prefer ENABLE_MINI_GMP
* libguile/socket.c [GUILE_MINI_GMP]: prefer ENABLE_MINI_GMP
* libguile.h [GUILE_MINI_GMP]: prefer SCM_ENABLE_MINI_GMP
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 9be807ff1..559f0ed50 100644 --- a/configure.ac +++ b/configure.ac @@ -651,19 +651,24 @@ PKG_CHECK_MODULES([GMP],[gmp], [], [$enable_mini_gmp=yes]) +SCM_I_GSC_ENABLE_MINI_GMP=0 AC_ARG_ENABLE(mini-gmp, - [ --enable-mini-gmp use mini-gmp instead of the full GMP library]) -if test "$enable_mini_gmp" = yes; then - AC_DEFINE([GUILE_MINI_GMP], 1, + [AS_HELP_STRING([--enable-mini-gmp], + [use mini-gmp instead of the full GMP library])]) + +if test "$enable_mini_gmp" = yes || test "$enable_mini_gmp" = y; then + SCM_I_GSC_ENABLE_MINI_GMP=1 + AC_DEFINE([ENABLE_MINI_GMP], 1, [Define this if you want to use mini-gmp.]) else LIBS="$GMP_LIBS $LIBS" CFLAGS="$GMP_CFLAGS $CFLAGS" fi +AC_SUBST([SCM_I_GSC_ENABLE_MINI_GMP]) AM_CONDITIONAL([USE_MINI_GMP], [test "x$enable_mini_gmp" = "xyes"]) AC_CHECK_DECLS([mpz_inits], [], [], - [[#if GUILE_MINI_GMP + [[#if ENABLE_MINI_GMP #include "libguile/mini-gmp.h" #else #include <gmp.h> |