summaryrefslogtreecommitdiff
blob: 97037cee724a0635e7d76218603a806d0a596b64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
detect openssl via pkg-config if it's available

--- a/configure.ac
+++ b/configure.ac
@@ -234,7 +234,17 @@ dnl
 dnl Checks for libraries.
 dnl
 
+PKG_PROG_PKG_CONFIG
+
 AS_IF([test x"$with_ssl" = xopenssl], [
+    PKG_CHECK_MODULES([OPENSSL], [openssl], [
+        AC_MSG_NOTICE([compiling in support for SSL via OpenSSL])
+        AC_LIBOBJ([openssl])
+        LIBS="$OPENSSL_LIBS $LIBS"
+        CFLAGS="$OPENSSL_CFLAGS -DHAVE_LIBSSL $CFLAGS"
+        LIBSSL=" " # ntlm check below wants this #395349
+    ], [
+
     dnl some versions of openssl use zlib compression
     AC_CHECK_LIB(z, compress)
 
@@ -294,6 +303,8 @@ AS_IF([test x$ssl_found != xyes],
 
 ])
 
+])
+
 ], [
   # --with-ssl is not gnutls: check if it's no
   AS_IF([test x"$with_ssl" != xno], [