diff --git a/configure.in b/configure.in
index 8fd825be156a9b4d4c7c3ad2655a13bf0f947117..26309adf76559620d538c886bc57f3cdd1f0f0ad 100644
--- a/configure.in
+++ b/configure.in
@@ -2,13 +2,13 @@ dnl -*- mode: shell-script; sh-indentation: 2; -*-
 dnl $Id$
 
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT([lsh], [1.3.1], [bug-lsh@gnu.org]) 
+AC_INIT([lsh], [1.3.7], [bug-lsh@gnu.org]) 
 
 AC_PREREQ(2.50)
 
 AC_CONFIG_SRCDIR([src/lsh_types.h])
 
-AM_INIT_AUTOMAKE(lsh, 1.3.6)
+AM_INIT_AUTOMAKE(lsh, 1.3.7)
 
 AM_CONFIG_HEADER(config.h)
 # AC_CONFIG_HEADERS(config.h)
@@ -249,14 +249,9 @@ AC_PATH_PROG(M4, m4, m4)
 # Checks for header files.
 AC_HEADER_STDC
 
-# Some debian systems have both gmp and gmp2.
-# This will probably not work right if both gmp.h and gmp2/gmp.h exists,
-# and gmp.h is too old (i.e GMP-1.x).
-gmp_header_found=no
-AC_CHECK_HEADERS(gmp.h gmp2/gmp.h, [gmp_header_found=yes; break])
-if test "$gmp_header_found" = no; then
-  AC_MSG_ERROR([Neither gmp.h nor gmp2/gmp.h found])
-fi
+# We don't look in gmp2 anymore, as we need gmp-3.1 or better.
+AC_CHECK_HEADERS(gmp.h,,
+  AC_MSG_ERROR([gmp.h not found]))
   
 AC_CHECK_HEADERS(fcntl.h strings.h sys/time.h unistd.h)
 AC_CHECK_HEADERS(shadow.h)
@@ -278,6 +273,10 @@ if test x$have_utmp_h = xyes; then
   AC_CHECK_MEMBERS([struct utmp.ut_host,
 		    struct utmp.ut_name,
 		    struct utmp.ut_user,
+		    struct utmp.ut_time,
+		    struct utmp.ut_tv,
+		    struct utmp.ut_pid,
+		    struct utmp.ut_exit,
 		    struct utmp.ut_addr,
 		    struct utmp.ut_addr_v6],,,
 [# if HAVE_UTMP_H
@@ -308,9 +307,13 @@ fi
 
 AC_TYPE_SOCKLEN_T
 
-AC_SEARCH_LIBGMP(gmp gmp2,
-  [LSH_RPATH_FIX],
-  [AC_MSG_ERROR([GMP is missing. Get gmp-2.0.2 or better from ftp://ftp.gnu.org/pub/gnu/gmp]) ])
+AC_CHECK_LIB(gmp, __gmpz_getlimbn,,
+    [AC_MSG_ERROR(
+    [GNU MP not found, or not 3.1 or up, see http://www.swox.com/gmp.])])
+
+# AC_SEARCH_LIBGMP(gmp gmp2,
+#   [LSH_RPATH_FIX],
+#   [AC_MSG_ERROR([GMP is missing. Get gmp-2.0.2 or better from ftp://ftp.gnu.org/pub/gnu/gmp]) ])
 
 AC_CHECK_LIB([oop], [oop_sys_new],,
   [AC_MSG_ERROR([liboop is missing. Get liboop from http://www.liboop.org])])