]> sjero.net Git - wget/commitdiff
Fix openssl detection under Windows.
authorGiuseppe Scrivano <gscrivano@gnu.org>
Sun, 3 Apr 2011 22:13:53 +0000 (00:13 +0200)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Sun, 3 Apr 2011 22:13:53 +0000 (00:13 +0200)
ChangeLog
configure.ac
src/ChangeLog
src/Makefile.am
tests/ChangeLog
tests/Makefile.am

index 27e1d068f6bd3f7d67d0a2b2e49dbcb00585827e..70894d43bea3cf70310aa3ec1e09cdf29b6281e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-04-04  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+       * configure.ac: Use AC_CHECK_LIB to look for the openssl library.
+
 2011-04-03  Giuseppe Scrivano  <gscrivano@gnu.org>
 
        * bootstrap.conf (gnulib_modules): Add `fcntl'.
index 205b6533853aca5c1c48da214b194c6b04d1a217..e16f2cb310419eefff1fabdbf1020990d7b93fad 100644 (file)
@@ -223,11 +223,12 @@ WGET_NSL_SOCKET
 dnl Deal with specific hosts
 case $host_os in
   *mingw32* )
-    AC_SUBST(W32LIBS, '-lws2_32 -lgdi32')
+    LIBS+='-lws2_32 -lgdi32'
     AC_LIBOBJ([mswindows])
     ;;
 esac
 
+
 dnl
 dnl Checks for libraries.
 dnl
@@ -241,29 +242,17 @@ AS_IF([test x"$with_ssl" = xopenssl], [
       AC_CHECK_LIB(dl, shl_load)
     ])
 
-    dnl Now actually check for -lssl
-    AC_LIB_HAVE_LINKFLAGS([ssl], [crypto], [
-  #include <openssl/ssl.h>
-  #include <openssl/x509.h>
-  #include <openssl/err.h>
-  #include <openssl/rand.h>
-  #include <openssl/des.h>
-  #include <openssl/md4.h>
-  #include <openssl/md5.h>
-    ], [SSL_library_init ()])
-    if test x"$LIBSSL" != x
-    then
-      AC_MSG_NOTICE([compiling in support for SSL via OpenSSL])
-      AC_LIBOBJ([openssl])
-    elif test x"$with_ssl" != x
-    then
-      AC_MSG_ERROR([--with-ssl=openssl was given, but SSL is not available.])
-    fi
+    AC_CHECK_LIB(z, compress)
+    AC_CHECK_LIB(crypto, EVP_MD_CTX_init)
+    AC_CHECK_LIB(ssl, ERR_func_error_string,,
+                AC_MSG_ERROR([openssl development libraries not found]))
+   AC_LIBOBJ([openssl])
 ], [
   # --with-ssl is not gnutls: check if it's no
   AS_IF([test x"$with_ssl" != xno], [
     dnl Now actually check for -lssl
 
+    AC_CHECK_LIB(z, compress)
     AC_CHECK_LIB(gpg-error, gpg_err_init)
     AC_CHECK_LIB(gcrypt, gcry_control)
     AC_CHECK_LIB(gnutls, main)
index 4c0ff9cdfb88914e541b8ef4c28b78638c832420..5186f0c04bd184b355c60abf9a5750d0da4f15f1 100644 (file)
@@ -1,3 +1,7 @@
+2011-04-04  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+       * Makefile.am (LIBS): Remove  @LIBSSL@ @W32LIBS@
+
 2011-04-03  Giuseppe Scrivano  <gscrivano@gnu.org>
 
        * gnutls.c: Include <fcntl.h>.
index ba429b1d5270e01d8bd0e3db23acf230065c949d..6a3e9947c849befd8b8102e0fd74dc1b01534ab3 100644 (file)
@@ -37,7 +37,7 @@ endif
 
 # The following line is losing on some versions of make!
 DEFS     = @DEFS@ -DSYSTEM_WGETRC=\"$(sysconfdir)/wgetrc\" -DLOCALEDIR=\"$(localedir)\"
-LIBS     = @LIBSSL@ @LIBICONV@ @LIBINTL@ @LIBS@ @W32LIBS@
+LIBS     = @LIBICONV@ @LIBINTL@ @LIBS@
 
 bin_PROGRAMS = wget
 wget_SOURCES = cmpt.c connect.c convert.c cookies.c ftp.c                \
index 2345566437d51b1624df828400842a2dedcf532f..9c8531642187a8dc54d982c214a6559788859b8e 100644 (file)
@@ -1,3 +1,7 @@
+2011-04-04  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+       * Makefile.am (LIBS): Remove  @LIBSSL@ @W32LIBS@
+
 2010-10-23  Giuseppe Scrivano  <gscrivano@gnu.org>
 
        * Makefile.am (LIBS): Remove @LIBGNUTLS@ and use @W32LIBS@ as last
index 2bd27f34451251fe77907eba9d5d180a5f334511..c27e3903dbdbf94ec44bc39d5fc50c28c4ac7be8 100644 (file)
@@ -34,7 +34,7 @@
 PERL     = perl
 PERLRUN = $(PERL) -I$(srcdir)
 
-LIBS     = @LIBSSL@ @LIBICONV@ @LIBINTL@ @LIBS@ @W32LIBS@
+LIBS     = @LIBICONV@ @LIBINTL@ @LIBS@
 
 .PHONY: test run-unit-tests run-px-tests