Thrift-1296: SSL detection is broken
Patch: jfarrell
Updated configure to check for crypto and then ssl and error along the way if unavailable.
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1162925 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/configure.ac b/configure.ac
index b55d601..36b6751 100644
--- a/configure.ac
+++ b/configure.ac
@@ -312,7 +312,16 @@
dnl and we haven't yet found a system where this is a problem.
AC_CHECK_LIB(rt, clock_gettime)
AC_CHECK_LIB(socket, setsockopt)
-AC_CHECK_LIB(ssl, SSL_ctrl)
+AC_CHECK_LIB(crypto,
+ BN_init,
+ [AC_CHECK_LIB(ssl,
+ SSL_ctrl,
+ [LIBS="-lssl -lcrypto $LIBS"],
+ [AC_MSG_ERROR(["Error: libssl required"])],
+ -lcrypto
+ )],
+ [AC_MSG_ERROR(["Error: libcrypto required."])]
+)
AC_TYPE_INT16_T
AC_TYPE_INT32_T