--- a/configure.ac
+++ b/configure.ac
@@ -119,7 +119,7 @@ AS_IF([test "x$with_ssl" != xno],
 	  [AC_CHECK_HEADERS([openssl/err.h \
 	                     openssl/ssl.h], [], [LIBSSL=_missing_header])
 	   AC_CHECK_LIB([ssl${LIBSSL}], [SSL_connect],
-					[LIBSSL="-lssl"
+					[LIBSSL="-lssl -lcrypto"
 					AC_DEFINE([HAVE_SSL], [1], [Define if you have ssl])
 					AC_CHECK_LIB([crypto],
 								 [OPENSSL_add_all_algorithms_noconf],
