]> sjero.net Git - wget/commitdiff
[svn] configure.in: Christian Fraenkel's tests for -lcrypto and -lssl were in the
authordan <devnull@localhost>
Tue, 27 Mar 2001 09:31:18 +0000 (01:31 -0800)
committerdan <devnull@localhost>
Tue, 27 Mar 2001 09:31:18 +0000 (01:31 -0800)
wrong order, causing a link failure if you're using libcrypto.a and libssl.a
rather than shared libraries.  Also put in checks for -ldl, necessary since the
libcrypto shared library doesn't record its dependency on libdl.

ChangeLog
configure.in

index 1055ca3ac2ba1159dcba8b8403b94e50a2c23a35..69fadae907a5cf5ce7d4afc347dc842ebd0a696b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,12 @@
 
        * INSTALL: Updated to reflect --with-ssl's new optional parameter.
 
+       * configure.in: Christian Fraenkel's tests for -lcrypto and -lssl
+       were in the wrong order, causing a link failure if you're using
+       libcrypto.a and libssl.a rather than shared libraries.  Also put
+       in checks for -ldl, necessary since the libcrypto shared library
+       doesn't record its dependency on libdl.
+
 2001-03-26  Dan Harkless  <wget@harkless.org>
 
        * TODO: -p should probably go "_two_ more hops" on <FRAMESET> pages.
index 1499b21d5448ee48c11dccee8693e041e732f785..92728ce9ff73584967c8221bf282bdf2e062244d 100644 (file)
@@ -204,8 +204,19 @@ if test x"$with_ssl" != x -a x"$with_ssl" != x"no"; then
   LDFLAGS="-L$with_ssl/lib -R$with_ssl/lib $LDFLAGS"
 
   ssl_link_failure=no
-  AC_CHECK_LIB(ssl,SSL_new,,ssl_link_failure=yes,-lcrypto)
+
+  dnl Unfortunately, as of this writing (OpenSSL 0.9.6), the libcrypto shared
+  dnl library doesn't record its dependency on libdl, so we need to check for it
+  dnl ourselves so we won't fail to link due to a lack of -ldl.  Most OSes use
+  dnl dlopen(), but HP-UX uses shl_load().
+  AC_CHECK_LIB(dl,dlopen)
+  AC_CHECK_LIB(dl,shl_load)
+
+  dnl These checks need to be in this order, or you'll get a link failure if you
+  dnl use a static libcrypto.a and libssl.a rather than shared libraries.
   AC_CHECK_LIB(crypto,RSA_new,,ssl_link_failure=yes)
+  AC_CHECK_LIB(ssl,SSL_new,,ssl_link_failure=yes)
+
   if test x"$ssl_link_failure" = x"yes"; then
     echo
     echo "WARNING: Failed to link with OpenSSL libraries in $with_ssl/lib."