From: Aki Tuomi Date: Thu, 11 Aug 2016 11:34:05 +0000 (+0300) Subject: configure: Fix dcrypt build conditionals X-Git-Tag: 2.3.0.rc1~3174 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd24dc2196f7480d4793ca5d5f9f8d70741bc103;p=thirdparty%2Fdovecot%2Fcore.git configure: Fix dcrypt build conditionals --- diff --git a/m4/ssl.m4 b/m4/ssl.m4 index 918698f5a4..e1a24dc351 100644 --- a/m4/ssl.m4 +++ b/m4/ssl.m4 @@ -1,5 +1,6 @@ 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 @@ -37,10 +38,15 @@ AC_DEFUN([DOVECOT_SSL], [ 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, [ diff --git a/src/lib-dcrypt/Makefile.am b/src/lib-dcrypt/Makefile.am index fefb3edc3b..80e432ba56 100644 --- a/src/lib-dcrypt/Makefile.am +++ b/src/lib-dcrypt/Makefile.am @@ -14,7 +14,7 @@ libdcrypt_la_SOURCES = \ 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