From 348c6755923d7cc3e15d90b135651a205f8ec440 Mon Sep 17 00:00:00 2001 From: Eric J Korpela Date: Wed, 6 Feb 2013 10:32:58 -0800 Subject: [PATCH] Modified CHECK_SSL to check existence of -ldl and -lz before adding them to SSL_LIBS on non-pkg-config systems. --- m4/check_ssl.m4 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/m4/check_ssl.m4 b/m4/check_ssl.m4 index 0dc1f3bf00..49b64c3f9f 100644 --- a/m4/check_ssl.m4 +++ b/m4/check_ssl.m4 @@ -46,7 +46,11 @@ if test "x${SSL_LIBS}" = "x" ; then SSLDIR="${ssldir}" SSL_CFLAGS="-I$ssldir/include -I$ssldir/include/openssl"; SSL_CXXFLAGS="-I$ssldir/include -I$ssldir/include/openssl"; - SSL_LIBS="-L$ssldir -L$ssldir/lib -lssl -lcrypto -ldl -lz" + SSL_LIBS="-L$ssldir -L$ssldir/lib -lssl -lcrypto" + AC_CHECK_LIB([dl], [dlopen], + [SSL_LIBS="${SSL_LIBS} ${sah_lib_last}"]) + AC_CHECK_LIB([z], [gzopen], + [SSL_LIBS="${SSL_LIBS} ${sah_lib_last}"]) break; fi if test -f "$dir/include/ssl.h"; then @@ -55,6 +59,10 @@ if test "x${SSL_LIBS}" = "x" ; then SSL_CFLAGS="-I$ssldir/include/" SSL_CXXFLAGS="-I$ssldir/include/" SSL_LIBS="-L$ssldir -L$ssldir/lib -lssl -lcrypto" + AC_CHECK_LIB([dl], [dlopen], + [SSL_LIBS="${SSL_LIBS} ${sah_lib_last}"]) + AC_CHECK_LIB([z], [gzopen], + [SSL_LIBS="${SSL_LIBS} ${sah_lib_last}"]) break; fi done