added basic ssl support to ircu
[ircu2.10.12-pk.git] / configure.in
index e07e2b34a6873e585fa279aced6ef4701e5c02d0..d4205cfa3cf51734f64d3e7680d763c0a87094e2 100644 (file)
@@ -226,6 +226,24 @@ else
 fi
 AC_SUBST(ENGINE_C)
 
+have_gnutls="no"
+AC_CHECK_LIB(gnutls, gnutls_init, [
+  AC_CHECK_HEADERS(gnutls/gnutls.h, [
+    LIBS="$LIBS -lgnutls"
+    have_gnutls="yes"
+  ])
+])
+if test x"$have_gnutls" = xno; then
+  if test x$is_win32 = xyes ; then
+    openssl_deps="-lcrypto -lgdi32"
+  else
+    openssl_deps="-lcrypto"
+  fi
+  AC_CHECK_LIB([ssl],[SSL_library_init], [
+    LIBS="$LIBS -lssl $openssl_deps"
+  ], [], $openssl_deps)
+fi
+
 dnl Now look for --enable-debug
 AC_MSG_CHECKING([whether to enable debug mode])
 AC_ARG_ENABLE([debug],