dnl
dnl initialize all the info variables
- curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls} )"
+ curl_ssl_msg="no (--with-{ssl,gnutls,nss,polarssl,cyassl,axtls,winssl} )"
curl_ssh_msg="no (--with-libssh2)"
curl_zlib_msg="no (--with-zlib)"
curl_krb4_msg="no (--with-krb4*)"
CPPFLAGS="$save_CPPFLAGS"
fi
+dnl -------------------------------------------------
+dnl check winssl option before other SSL libraries
+dnl -------------------------------------------------
+
+OPT_WINSSL=no
+AC_ARG_WITH(winssl,dnl
+AC_HELP_STRING([--with-winssl],[enable Windows native SSL/TLS])
+AC_HELP_STRING([--without-winssl], [disable Windows native SSL/TLS]),
+ OPT_WINSSL=$withval)
+
+AC_MSG_CHECKING([whether to enable Windows native SSL/TLS (Windows native builds only)])
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
+ if test "x$OPT_WINSSL" != "xno" &&
+ test "x$ac_cv_native_windows" = "xyes"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(USE_SCHANNEL, 1, [to enable Windows native SSL/TLS support])
+ AC_SUBST(USE_SCHANNEL, [1])
+ curl_ssl_msg="enabled (Windows-native)"
+ WINSSL_ENABLED=1
+ # --with-winssl implies --enable-sspi
+ AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
+ AC_SUBST(USE_WINDOWS_SSPI, [1])
+ curl_sspi_msg="enabled"
+ else
+ AC_MSG_RESULT(no)
+ fi
+else
+ AC_MSG_RESULT(no)
+fi
+
dnl **********************************************************************
dnl Check for the presence of SSL libraries and headers
dnl **********************************************************************
AC_HELP_STRING([--without-ssl], [disable OpenSSL]),
OPT_SSL=$withval)
-if test X"$OPT_SSL" != Xno; then
+if test "$curl_ssl_msg" = "$init_ssl_msg" && test X"$OPT_SSL" != Xno; then
dnl backup the pre-ssl variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
AC_HELP_STRING([--without-gnutls], [disable GnuTLS detection]),
OPT_GNUTLS=$withval)
-if test "$OPENSSL_ENABLED" != "1"; then
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
if test X"$OPT_GNUTLS" != Xno; then
fi dnl GNUTLS not disabled
-fi dnl OPENSSL != 1
+fi
dnl ---
dnl Check which crypto backend GnuTLS uses
AC_HELP_STRING([--without-polarssl], [disable PolarSSL detection]),
OPT_POLARSSL=$withval)
-if test "$OPENSSL_ENABLED" != "1"; then
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
if test X"$OPT_POLARSSL" != Xno; then
fi dnl PolarSSL not disabled
-fi dnl OPENSSL != 1
+fi
dnl ----------------------------------------------------
dnl check for CyaSSL
AC_HELP_STRING([--without-cyassl], [disable CyaSSL detection]),
OPT_CYASSL=$withval)
-if test "$OPENSSL_ENABLED" != "1"; then
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
if test X"$OPT_CYASSL" != Xno; then
fi dnl CyaSSL not disabled
-fi dnl OPENSSL != 1
+fi
dnl ----------------------------------------------------
dnl NSS. Only check if GnuTLS and OpenSSL are not enabled
AC_HELP_STRING([--without-nss], [disable NSS detection]),
OPT_NSS=$withval)
-if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
+if test "$curl_ssl_msg" = "$init_ssl_msg"; then
if test X"$OPT_NSS" != Xno; then
if test "x$OPT_NSS" = "xyes"; then
fi dnl NSS not disabled
-fi dnl OPENSSL != 1 -a GNUTLS_ENABLED != 1
+fi dnl curl_ssl_msg = init_ssl_msg
OPT_AXTLS=off
fi
fi
-if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED" = "x"; then
+if test "x$OPENSSL_ENABLED$GNUTLS_ENABLED$NSS_ENABLED$POLARSSL_ENABLED$AXTLS_ENABLED$CYASSL_ENABLED$WINSSL_ENABLED" = "x"; then
AC_MSG_WARN([SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.])
- AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss or --with-axtls to address this.])
+ AC_MSG_WARN([Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-axtls or --with-winssl to address this.])
else
# SSL is enabled, genericly
AC_SUBST(SSL_ENABLED)
versioned_symbols_flavour="CYASSL_"
elif test "x$AXTLS_ENABLED" == "x1"; then
versioned_symbols_flavour="AXTLS_"
+ elif test "x$WINSSL_ENABLED" == "x1"; then
+ versioned_symbols_flavour="WINSSL_"
else
versioned_symbols_flavour=""
fi
fi
;;
*)
- AC_MSG_RESULT(no)
+ if test "x$WINSSL_ENABLED" = "x1"; then
+ # --with-winssl implies --enable-sspi
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
;;
esac ],
- AC_MSG_RESULT(no)
+ if test "x$WINSSL_ENABLED" = "x1"; then
+ # --with-winssl implies --enable-sspi
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
)
dnl ************************************************************
dnl
dnl For keeping supported features and protocols also in pkg-config file
-dnl since it is more cross-compile frient than curl-config
+dnl since it is more cross-compile friendly than curl-config
dnl
if test "x$USE_SSLEAY" = "x1"; then