Browse Source

- Fixed a logic error in the checks of gmp3.

master
Richard Kreckel 25 years ago
parent
commit
45fdbe6718
  1. 14
      configure
  2. 10
      configure.in

14
configure

@ -2763,14 +2763,16 @@ else
echo "configure: failed program was:" >&5 echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
rm -rf conftest* rm -rf conftest*
cl_cv_new_gmp_h="no"; with_gmp="no"
cl_cv_new_gmp_h="no"
fi fi
rm -f conftest* rm -f conftest*
fi fi
echo "$ac_t""$cl_cv_new_gmp_h" 1>&6 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 $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 if eval "test \"`echo '$''{'cl_cv_new_libgmp'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -2778,26 +2780,28 @@ else
SAVELIBS=$LIBS SAVELIBS=$LIBS
LIBS="$LIBS -lgmp" LIBS="$LIBS -lgmp"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2782 "configure"
#line 2784 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <gmp.h> #include <gmp.h>
int main() { int main() {
mpn_divexact_by3(0,0,0) mpn_divexact_by3(0,0,0)
; return 0; } ; return 0; }
EOF 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* rm -rf conftest*
cl_cv_new_libgmp="yes" cl_cv_new_libgmp="yes"
else else
echo "configure: failed program was:" >&5 echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
rm -rf conftest* rm -rf conftest*
cl_cv_new_libgmp="no"; with_gmp="no"; LIBS=$SAVELIBS
cl_cv_new_libgmp="no"; LIBS=$SAVELIBS
fi fi
rm -f conftest* rm -f conftest*
fi fi
echo "$ac_t""$cl_cv_new_libgmp" 1>&6 echo "$ac_t""$cl_cv_new_libgmp" 1>&6
if test "$cl_cv_new_libgmp" = no; then with_gmp="no"; fi
fi
fi fi
if test "$with_gmp" = yes; then if test "$with_gmp" = yes; then
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF

10
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) #if !defined(__GNU_MP_VERSION) || (__GNU_MP_VERSION < 3)
#error "ancient gmp.h" #error "ancient gmp.h"
#endif], #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? dnl Does the library match the header file have 3.0 features?
AC_CACHE_CHECK([for working libgmp], cl_cv_new_libgmp, [ AC_CACHE_CHECK([for working libgmp], cl_cv_new_libgmp, [
SAVELIBS=$LIBS SAVELIBS=$LIBS
LIBS="$LIBS -lgmp" LIBS="$LIBS -lgmp"
AC_TRY_LINK([#include <gmp.h>],[mpn_divexact_by3(0,0,0)], 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 fi
if test "$with_gmp" = yes; then if test "$with_gmp" = yes; then
AC_DEFINE(CL_USE_GMP) AC_DEFINE(CL_USE_GMP)

Loading…
Cancel
Save