diff --git a/ChangeLog b/ChangeLog
index 31b22249..abf36c49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-03-26  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+	* configure.ac: Fix the gnutls detection.
+
 2011-03-21  Giuseppe Scrivano  <gscrivano@gnu.org>
 
 	* bootstrap: Update from gnulib.
diff --git a/configure.ac b/configure.ac
index 4eb958a2..2c01089f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -268,7 +268,7 @@ AS_IF([test x"$with_ssl" = xopenssl], [
     AC_CHECK_LIB(gcrypt, gcry_control)
     AC_CHECK_LIB(gnutls, main)
 
-    if test x"$ac_cv_lib_gnutls_main" != x
+    if test x"$ac_cv_lib_gnutls_main" != xno
     then
       AC_MSG_NOTICE([compiling in support for SSL via GnuTLS])
       AC_LIBOBJ([gnutls])