diff -up M2/configure.ac.mpir M2/configure.ac
--- M2/configure.ac.mpir 2013-05-20 13:49:54.384139899 -0500
+++ M2/configure.ac 2013-05-20 13:51:10.492356267 -0500
@@ -840,7 +840,7 @@ AC_SUBST(BUILTLIBS,)
# we always build it, and every program should link with it
# "gdbm" calls sync(), so its test programs need to link with it
AC_SUBST(PROGLIST, "4ti2 gfan normaliz nauty cddplus lrslib")
-AC_SUBST(LIBLIST, " missing gc gdbm mpir mpfr pari readline ntl factory libfac lapack frobby glpk cddlib fplll givaro fflas_ffpack linbox boost mpc qd mpack flint gtest memtailor mathic mathicgb ")
+AC_SUBST(LIBLIST, " missing gc gdbm gmp mpfr pari readline ntl factory libfac lapack frobby glpk cddlib fplll givaro fflas_ffpack linbox boost mpc qd mpack flint gtest memtailor mathic mathicgb ")
# a library is listed in BUILD_ALWAYS if and only if we *always* build it,
# even if the option "--disable-building" is specified:
@@ -999,16 +999,7 @@ dnl then BUILTLIBS="-lgmpxx -lgmp $BUILT
dnl else LIBS="-lgmpxx $LIBS"
dnl fi
-if test $BUILD_mpir = no
-then AC_LANG(C)
- AC_SEARCH_LIBS(__mpir_version,mpir,,BUILD_mpir=yes)
- AC_CHECK_HEADER(mpir.h,,BUILD_mpir=yes)
-fi
-dnl frobby uses mpirxx
-if test $BUILD_mpir = yes
-then BUILTLIBS="-lmpirxx -lmpir $BUILTLIBS"
-else LIBS="-lmpirxx $LIBS"
-fi
+LIBS="-lgmp -lgmpxx $LIBS"
if test "$PARI" = yes
then if test $BUILD_pari = no