]> www.ginac.de Git - cln.git/commitdiff
- Fixed a logic error in the checks of gmp3.
authorRichard Kreckel <kreckel@ginac.de>
Tue, 9 May 2000 16:23:03 +0000 (16:23 +0000)
committerRichard Kreckel <kreckel@ginac.de>
Tue, 9 May 2000 16:23:03 +0000 (16:23 +0000)
configure
configure.in

index 22e99454b72df2a258e2324d7190b62cf4023155..c33d27cee270d4129fa2937d3f370180870491ee 100755 (executable)
--- 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 <<EOF
-#line 2782 "configure"
+#line 2784 "configure"
 #include "confdefs.h"
 #include <gmp.h>
 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
index c594a342fce32e6ad54bd0528fd77a7ddffa9841..5576f36a4e86ad85a12f22e83cee1f97fc3ae9b2 100644 (file)
@@ -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 <gmp.h>],[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)