]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
configure: Fix dcrypt build conditionals
authorAki Tuomi <aki.tuomi@dovecot.fi>
Thu, 11 Aug 2016 11:34:05 +0000 (14:34 +0300)
committerGitLab <gitlab@git.dovecot.net>
Thu, 11 Aug 2016 14:40:48 +0000 (17:40 +0300)
m4/ssl.m4
src/lib-dcrypt/Makefile.am

index 918698f5a4c3e2303d7f76883e9f395a8e32bf81..e1a24dc35180249851139c6060a1d5c01d6ad5bd 100644 (file)
--- 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, [
index fefb3edc3beb8fc0637aa9cebbc0fd5c7f163f3d..80e432ba564a0b5ce513d1617df4a94a9b4c8280 100644 (file)
@@ -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