[hybrid] [PATCH] Fix autoconf script for SSL support
brad at comstyle.com
Sun Jul 1 20:27:34 EDT 2012
On Sun, Jul 01, 2012 at 06:07:14PM +0200, Michael Wobst wrote:
> Prepending "-lcrypto -ssl" to LIBS as well as defining
> "HAVE_LIBCRYPTO" is already done by the AC_CHECK_LIB macro calls
> when the ssl and crypto libraries are tested for existence.
> So adding these two lines just makes things redundant, because this
> is exactly what AC_CHECK_LIB's job is.
> Anyway, I'll take a look on how the configure script behaves on OpenBSD.
> You could also send me the configure.log of the original, unmodified
> configure script.
I see you're right about the setting of HAVE_LIBCRYPTO.
The issue is when you link libssl you have to include libcrypto
otherwise there are undefined symbols from the libcrypto functions
utilized within libssl.
Here is a more appropriate diff to fix the autoconf script.
--- configure.ac.orig Mon May 28 09:47:48 2012
+++ configure.ac Sun Jul 1 20:19:58 2012
@@ -131,7 +131,7 @@ AS_IF([test "$cf_enable_openssl" != "no"],
AS_IF([test "$cf_openssl_version_ok" = "yes"],
- AC_CHECK_LIB(ssl, SSL_connect)
+ AC_CHECK_LIB(ssl, SSL_connect,,, -lcrypto)
AS_IF([test "$ac_cv_lib_ssl_SSL_connect" = "yes"],
],[AC_MSG_RESULT(no - OpenSSL support disabled)
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the hybrid