--- configure.ac.orig	2016-01-01 01:42:01 UTC
+++ configure.ac
@@ -81,10 +81,12 @@ AM_COND_IF(OP_WIN32,
 AS_IF([test "$enable_http" != "no"], [
    openssl="openssl"
    AC_DEFINE([OP_ENABLE_HTTP], [1], [Enable HTTP support])
-   PKG_CHECK_MODULES([URL_DEPS], [openssl])
 ])
 AM_CONDITIONAL(OP_ENABLE_HTTP, [test "$enable_http" != "no"])
 AC_SUBST([openssl])
+AC_CHECK_LIB(ssl, SSL_read,
+	[AC_CHECK_HEADERS(openssl/ssl.h, LIBS="$LIBS -lssl -lcrypto",,)],,
+	-lcrypto -lssl)
 
 PKG_CHECK_MODULES([DEPS], [ogg >= 1.3 opus >= 1.0.1])
 
