AC_DEFUN([DOVECOT_SSL], [
have_ssl=no
+ build_dcrypt_openssl=no
if test $want_openssl != no && test $have_ssl = no; then
if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists openssl 2>/dev/null; then
AC_CHECK_LIB(ssl, SSL_COMP_free_compression_methods, [
AC_DEFINE(HAVE_SSL_COMP_FREE_COMPRESSION_METHODS,, [Build with SSL_COMP_free_compression_methods() support])
],, $SSL_LIBS)
+ AC_CHECK_LIB(ssl, [EC_KEY_new],
+ [build_dcrypt_openssl="yes"],
+ AC_MSG_WARN([No ECC support in OpenSSL - not enabling dcrypt]),
+ $SSL_LIBS)
fi
fi
AM_CONDITIONAL(BUILD_OPENSSL, test "$have_openssl" = "yes")
-
+ AM_CONDITIONAL(BUILD_DCRYPT_OPENSSL, test "$build_dcrypt_openssl" = "yes")
+
if test $want_gnutls != no && test $have_ssl = no; then
AC_CHECK_LIB(gnutls, gnutls_global_init, [
AC_CHECK_HEADER(gnutls/gnutls.h, [
libdcrypt_la_CFLAGS = $(AM_CPPFLAGS) \
-DDCRYPT_MODULE_DIR=\"$(pkglibdir)\"
-if BUILD_OPENSSL
+if BUILD_DCRYPT_OPENSSL
pkglib_LTLIBRARIES += libdcrypt_openssl.la
libdcrypt_openssl_la_SOURCES = dcrypt-openssl.c dcrypt.c
libdcrypt_openssl_la_LDFLAGS = -module -avoid-version -shared ../lib-ssl-iostream/libdovecot_openssl_common.la ../lib/liblib.la