Modified CHECK_SSL to check existence of -ldl and -lz before adding them to

SSL_LIBS on non-pkg-config systems.
This commit is contained in:
Eric J Korpela 2013-02-06 10:32:58 -08:00 committed by Oliver Bock
parent ea1123cad6
commit 348c675592
1 changed files with 9 additions and 1 deletions

View File

@ -46,7 +46,11 @@ if test "x${SSL_LIBS}" = "x" ; then
SSLDIR="${ssldir}" SSLDIR="${ssldir}"
SSL_CFLAGS="-I$ssldir/include -I$ssldir/include/openssl"; SSL_CFLAGS="-I$ssldir/include -I$ssldir/include/openssl";
SSL_CXXFLAGS="-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; break;
fi fi
if test -f "$dir/include/ssl.h"; then 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_CFLAGS="-I$ssldir/include/"
SSL_CXXFLAGS="-I$ssldir/include/" SSL_CXXFLAGS="-I$ssldir/include/"
SSL_LIBS="-L$ssldir -L$ssldir/lib -lssl -lcrypto" 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; break;
fi fi
done done