From cd4dd4f67dea3a0dd7d4f36ea0fc86bb0088599c Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Sat, 11 Dec 2010 16:39:43 +0100 Subject: [PATCH] Simplify determination of whether GMP exists --- src/configure | 6 ++++-- src/configure.in | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/configure b/src/configure index 7b879da2d..cc7d7bf22 100755 --- a/src/configure +++ b/src/configure @@ -1449,7 +1449,7 @@ Optional Packages: --with-cross-config=f supply configuration for a cross compiler --with-system-boehm Deprecated! See --enable-boehm --with-gmp=args supply arguments for configuring GMP library - --with-C-gmp=args configure GMP without in portable C + --with-C-gmp=args configure GMP to build using portable C --with-system-gmp use already installed GMP library (default=auto) --with-gmp-prefix=path prefix for system GMP includes and libraries --with-gmp-incdir=path path to system GMP includes (overrides prefix) @@ -5384,12 +5384,14 @@ if test "x$ac_cv_header_gmp_h" = xyes; then : fi - ac_fn_c_check_header_mongrel "$LINENO" "gmp/gmp.h" "ac_cv_header_gmp_gmp_h" "$ac_includes_default" + if test "x$ECL_GMP_HEADER" = "x"; then + ac_fn_c_check_header_mongrel "$LINENO" "gmp/gmp.h" "ac_cv_header_gmp_gmp_h" "$ac_includes_default" if test "x$ac_cv_header_gmp_gmp_h" = xyes; then : ECL_GMP_HEADER='gmp/gmp.h' fi + fi else SUBDIRS="${SUBDIRS} gmp" CORE_LIBS="-leclgmp ${CORE_LIBS}" diff --git a/src/configure.in b/src/configure.in index 3d82a4f73..7d170b796 100644 --- a/src/configure.in +++ b/src/configure.in @@ -73,7 +73,7 @@ AC_ARG_WITH(gmp, AC_ARG_WITH(C-gmp, AS_HELP_STRING( [--with-C-gmp=args], - [configure GMP without in portable C]), + [configure GMP to build using portable C]), [with_c_gmp=yes; with_system_gmp=no], [with_c_gmp=no]) AC_ARG_WITH(system-gmp, @@ -366,7 +366,9 @@ if test "${with_system_gmp}" = "yes"; then [FASL_LIBS="${FASL_LIBS} -lgmp"], [AC_MSG_ERROR([System gmp library requested but not found.])]) AC_CHECK_HEADER( [gmp.h], [ECL_GMP_HEADER='gmp.h'] ) - AC_CHECK_HEADER( [gmp/gmp.h], [ECL_GMP_HEADER='gmp/gmp.h'] ) + if test "x$ECL_GMP_HEADER" = "x"; then + AC_CHECK_HEADER( [gmp/gmp.h], [ECL_GMP_HEADER='gmp/gmp.h'] ) + fi else SUBDIRS="${SUBDIRS} gmp" CORE_LIBS="-leclgmp ${CORE_LIBS}"