dovecot-1.1: When checking for -lssl, include -ldl if it exists....

dovecot at dovecot.org dovecot at dovecot.org
Fri Jun 27 09:45:28 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.1/rev/ab9b68b5426c
changeset: 7718:ab9b68b5426c
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jun 27 09:45:07 2008 +0300
description:
When checking for -lssl, include -ldl if it exists. OpenSSL 0.9.8 uses it.

diffstat:

1 file changed, 16 insertions(+), 14 deletions(-)
configure.in |   30 ++++++++++++++++--------------

diffs (63 lines):

diff -r e4fe468ab0a9 -r ab9b68b5426c configure.in
--- a/configure.in	Fri Jun 27 08:18:41 2008 +0300
+++ b/configure.in	Fri Jun 27 09:45:07 2008 +0300
@@ -1479,6 +1479,19 @@ if test "x$lib_cv_va_val_copy" = "xno"; 
   AC_DEFINE(VA_COPY_AS_ARRAY,1, ['va_lists' cannot be copies as values])
 fi
 
+dnl * dynamic modules?
+have_modules=no
+AC_CHECK_FUNC(dlopen, [
+  have_modules=yes
+  MODULE_LIBS="-export-dynamic"
+], [
+  AC_CHECK_LIB(dl, dlopen, [
+    have_modules=yes
+    MODULE_LIBS="-export-dynamic -ldl"
+    DLLIB=-ldl
+  ])
+])
+
 dnl **
 dnl ** SSL
 dnl **
@@ -1491,9 +1504,10 @@ if test $want_openssl != no && test $hav
     CFLAGS="$CFLAGS $SSL_CFLAGS"
     have_openssl=yes
   else
+    # openssl 0.9.8 wants -ldl and it's required if there's only .a lib
     AC_CHECK_LIB(ssl, SSL_read, [
       AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h, [
-        SSL_LIBS="-lssl -lcrypto"
+        SSL_LIBS="-lssl -lcrypto $DLLIB"
         AC_SUBST(SSL_LIBS)
 	have_openssl=yes
       ], [
@@ -1505,7 +1519,7 @@ if test $want_openssl != no && test $hav
       if test $want_openssl = yes; then
         AC_ERROR([Can't build with OpenSSL: libssl not found])
       fi
-    ], -lcrypto)
+    ], -lcrypto $DLLIB)
   fi
   if test "$have_openssl" = "yes"; then
     AC_DEFINE(HAVE_OPENSSL,, Build with OpenSSL support)
@@ -1995,18 +2009,6 @@ AC_CHECK_FUNC(crypt,, [
     AUTH_LIBS="-lcrypt $AUTH_LIBS"
   ], [
     AC_MSG_ERROR([crypt() wasn't found])
-  ])
-])
-
-dnl * dynamic modules?
-have_modules=no
-AC_CHECK_FUNC(dlopen, [
-  have_modules=yes
-  MODULE_LIBS="-export-dynamic"
-], [
-  AC_CHECK_LIB(dl, dlopen, [
-    have_modules=yes
-    MODULE_LIBS="-export-dynamic -ldl"
   ])
 ])
 


More information about the dovecot-cvs mailing list