diff -urN old//gmp-5.0.1/configure.in new//gmp-5.0.1/configure.in
--- old//gmp-5.0.1/configure.in	2010-02-06 07:43:13.000000000 -0500
+++ new//gmp-5.0.1/configure.in	2010-05-03 21:09:35.958500000 -0400
@@ -26,7 +26,7 @@
 AH_TOP(/*GMP_COPYRIGHT*/)
 
 AC_REVISION($Revision$)
-AC_PREREQ(2.59)
+AC_PREREQ(2.65)
 AC_INIT(GNU MP, GMP_VERSION, gmp-bugs@gmplib.org, gmp)
 AC_CONFIG_SRCDIR(gmp-impl.h)
 m4_pattern_forbid([^[ \t]*GMP_])
@@ -65,7 +65,7 @@
 dnl  Note that there's a copy of these options in the top-level Makefile.am,
 dnl  so update there too if changing anything.
 dnl
-AM_INIT_AUTOMAKE([1.8 gnu no-dependencies $(top_builddir)/ansi2knr])
+AM_INIT_AUTOMAKE([1.11 silent-rules gnu no-dependencies $(top_builddir)/ansi2knr])
 AM_CONFIG_HEADER(config.h:config.in)
 AM_MAINTAINER_MODE
 
@@ -2169,11 +2169,9 @@
 
 # Configs for Windows DLLs.
 
-AC_LIBTOOL_WIN32_DLL
-
 AC_SUBST(LIBGMP_DLL,0)
 case $host in
-  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+  *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-pw32* | *-*-os2*)
     # By default, build only static.
     if test -z "$enable_shared"; then
       enable_shared=no
@@ -2259,7 +2257,7 @@
 #
 AC_PROVIDE([AC_PROG_F77])
 
-AC_PROG_LIBTOOL
+LT_INIT([win32-dll])
 
 # Generate an error here if attempting to build both shared and static when
 # $libname.a is in $library_names_spec (as mentioned above), rather than
diff -urN old//gmp-5.0.1/Makefile.am new//gmp-5.0.1/Makefile.am
--- old//gmp-5.0.1/Makefile.am	2010-02-06 07:43:13.000000000 -0500
+++ new//gmp-5.0.1/Makefile.am	2010-05-03 21:10:07.583500000 -0400
@@ -25,7 +25,7 @@
 # Makefiles in subdirectories, but here we must omit it so automake gives
 # the actual ansi2knr build rule, not "cd $(top_builddir) && make ansi2knr".
 #
-AUTOMAKE_OPTIONS = 1.8 gnu no-dependencies ansi2knr
+AUTOMAKE_OPTIONS = 1.11 silent-rules gnu no-dependencies ansi2knr
 
 
 # Libtool -version-info for libgmp.la and libmp.la.  See "Versioning" in the
diff -urN old//gmp-5.0.1/mpn/x86/fat/fat.c new//gmp-5.0.1/mpn/x86/fat/fat.c
--- old//gmp-5.0.1/mpn/x86/fat/fat.c	2010-02-06 07:43:14.000000000 -0500
+++ new//gmp-5.0.1/mpn/x86/fat/fat.c	2010-05-03 21:11:29.870500000 -0400
@@ -27,6 +27,7 @@
 
 #include "gmp.h"
 #include "gmp-impl.h"
+#include "fat.h"
 
 /* Change this to "#define TRACE(x) x" for some traces. */
 #define TRACE(x)
diff -urN old//gmp-5.0.1/nextprime.c new//gmp-5.0.1/nextprime.c
--- old//gmp-5.0.1/nextprime.c	2010-02-06 07:43:14.000000000 -0500
+++ new//gmp-5.0.1/nextprime.c	2010-05-03 21:45:12.075500000 -0400
@@ -42,6 +42,7 @@
 */
 
 #include "gmp.h"
+#include <limits.h>
 #include "gmp-impl.h"
 #include <string.h>		/* for memset */
 
diff -urN old//gmp-5.0.1/tests/tests.h new//gmp-5.0.1/tests/tests.h
--- old//gmp-5.0.1/tests/tests.h	2010-02-06 07:43:14.000000000 -0500
+++ new//gmp-5.0.1/tests/tests.h	2010-05-03 21:10:25.989500000 -0400
@@ -24,6 +24,7 @@
 
 #include "config.h"
 
+#include <limits.h>
 #include <setjmp.h>  /* for jmp_buf */
 
 #if defined (__cplusplus)
