Thrift-1296: SSL detection is broken
authorJake Farrell <jfarrell@apache.org>
Mon, 29 Aug 2011 18:18:55 +0000 (18:18 +0000)
committerJake Farrell <jfarrell@apache.org>
Mon, 29 Aug 2011 18:18:55 +0000 (18:18 +0000)
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

configure.ac

index b55d601..36b6751 100644 (file)
@@ -312,7 +312,16 @@ dnl of the POSIX Real-Time Extensions.  This seems necessary on Linux,
 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