--- a/configure.ac
+++ b/configure.ac
@@ -630,6 +630,7 @@ then
     AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.])
   fi
 else
+ if test x"$ENABLE_NTLM" != xno; then
   PKG_CHECK_MODULES([NETTLE], nettle, [
     HAVE_NETTLE=yes
     LIBS="$NETTLE_LIBS $LIBS"
@@ -651,6 +652,7 @@ else
     ENABLE_NTLM=yes
     AC_DEFINE([ENABLE_NTLM], 1, [Define if you want the NTLM authorization support compiled in.])
   fi
+ fi
 fi
 
 dnl **********************************************************************
