diff --git a/configure b/configure index 22e9945..c33d27c 100755 --- a/configure +++ b/configure @@ -2763,14 +2763,16 @@ else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - cl_cv_new_gmp_h="no"; with_gmp="no" + cl_cv_new_gmp_h="no" fi rm -f conftest* fi echo "$ac_t""$cl_cv_new_gmp_h" 1>&6 +if test "$cl_cv_new_gmp_h" = no; then with_gmp="no"; fi +if test "$with_gmp" = yes; then echo $ac_n "checking for working libgmp""... $ac_c" 1>&6 -echo "configure:2774: checking for working libgmp" >&5 +echo "configure:2776: checking for working libgmp" >&5 if eval "test \"`echo '$''{'cl_cv_new_libgmp'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2778,26 +2780,28 @@ else SAVELIBS=$LIBS LIBS="$LIBS -lgmp" cat > conftest.$ac_ext < int main() { mpn_divexact_by3(0,0,0) ; return 0; } EOF -if { (eval echo configure:2789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* cl_cv_new_libgmp="yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - cl_cv_new_libgmp="no"; with_gmp="no"; LIBS=$SAVELIBS + cl_cv_new_libgmp="no"; LIBS=$SAVELIBS fi rm -f conftest* fi echo "$ac_t""$cl_cv_new_libgmp" 1>&6 +if test "$cl_cv_new_libgmp" = no; then with_gmp="no"; fi +fi fi if test "$with_gmp" = yes; then cat >> confdefs.h <<\EOF diff --git a/configure.in b/configure.in index c594a34..5576f36 100644 --- a/configure.in +++ b/configure.in @@ -143,17 +143,19 @@ dnl Is the gmp header file new enough? (i.e. >= 3.0) #if !defined(__GNU_MP_VERSION) || (__GNU_MP_VERSION < 3) #error "ancient gmp.h" #endif], -cl_cv_new_gmp_h="yes", -cl_cv_new_gmp_h="no"; with_gmp="no") +cl_cv_new_gmp_h="yes", cl_cv_new_gmp_h="no") ]) +if test "$cl_cv_new_gmp_h" = no; then with_gmp="no"; fi +if test "$with_gmp" = yes; then dnl Does the library match the header file have 3.0 features? AC_CACHE_CHECK([for working libgmp], cl_cv_new_libgmp, [ SAVELIBS=$LIBS LIBS="$LIBS -lgmp" AC_TRY_LINK([#include ],[mpn_divexact_by3(0,0,0)], -cl_cv_new_libgmp="yes", -cl_cv_new_libgmp="no"; with_gmp="no"; LIBS=$SAVELIBS) +cl_cv_new_libgmp="yes", cl_cv_new_libgmp="no"; LIBS=$SAVELIBS) ]) +if test "$cl_cv_new_libgmp" = no; then with_gmp="no"; fi +fi fi if test "$with_gmp" = yes; then AC_DEFINE(CL_USE_GMP)