added OpenSSL handler
[NeonServV5.git] / configure.ac
index becfda3886de82b6984996c38275453995b69323..95d0bdd0afa00fcf59a1539a542d51f125f3c35e 100644 (file)
@@ -31,6 +31,15 @@ AC_ARG_WITH([winsock],
   [WINSOCK_LIBS=''])
 AC_SUBST([WINSOCK_LIBS])
 
+AC_CHECK_LIB(ssl, SSL_read, [
+  AC_CHECK_LIB(crypto, X509_new, [
+    AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h openssl/rand.h, [
+      LIBS="$LIBS -lssl -lcrypto"
+      AC_DEFINE([HAVE_SSL], 1, [Define if you are using SSL])
+    ])
+  ])
+])
+
 # Checks for header files.
 AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h windows.h winsock2.h])