Fix behavior in selecting PGP MIME signature on Windows.
[claws.git] / configure.ac
index 4e38388bd25b45409a533f7e9af73825048ea2e4..d9e07327912964a43131946758dbf2de3720a7cc 100644 (file)
@@ -523,13 +523,14 @@ AC_ARG_WITH(password-encryption, [  --with-password-encryption=PROVIDER    Which
                                                pwd_crypto="$withval", pwd_crypto="default")
 
 if test x"$pwd_crypto" = xdefault; then
-dnl ===Default set to "old" for testing, remove the dnls to restore
-dnl ===intended functionality.
-dnl    if test x"$enable_gnutls" = xyes; then
-dnl            pwd_crypto="gnutls"
-dnl    else
-               pwd_crypto="old"
-dnl    fi
+       if test x"$enable_gnutls" = xyes; then
+               if `$PKG_CONFIG --atleast-version=3.0 gnutls`; then
+                       pwd_crypto="gnutls"
+               fi
+       fi
+fi
+if test x"$pwd_crypto" = xdefault; then
+       pwd_crypto="old"
 fi
 
 case $pwd_crypto in
@@ -537,6 +538,9 @@ case $pwd_crypto in
                if test x"$enable_gnutls" = xno; then
                        AC_MSG_ERROR([GnuTLS password encryption requested but GnuTLS is not available.])
                fi
+               if ! `$PKG_CONFIG --atleast-version=3.0 gnutls`; then
+                       AC_MSG_ERROR([GnuTLS version at least 3.0 is required for password encryption.])
+               fi
                AC_DEFINE(PASSWORD_CRYPTO_GNUTLS, 1, Use GnuTLS for stored password encryption)
                ;;
        old)