diff --git a/configure.in b/configure.in
index 595c6c5138bb4ad4959539d717a01fc50d573938..ff3595598871f2aebc02e60a39560d5c9d461084 100644
--- a/configure.in
+++ b/configure.in
@@ -687,6 +687,13 @@ if test $ol_with_tls != no ; then
 			[have_ssleay=no],
 			[-lcrypto])
 			
+		if test $have_ssleay = no ; then
+			AC_CHECK_LIB(ssl, SSL_library_init,
+				[have_ssleay=yes
+				need_rsaref=no], [have_ssleay=no],
+				[-lcrypto])
+		fi
+
 		if test $have_ssleay = no ; then
 			AC_CHECK_LIB(ssl, ssl3_accept, 
 				[have_ssleay=yes