summaryrefslogtreecommitdiffstats
path: root/patches/nginx-1.16.0/0006-auto-lib-openssl-conf-use-pkg-config.patch
blob: 00b450eb8179f3aa6a96f99adad003c48076caf2 (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
From: Martin Bark <martin@barkynet.com>
Date: Fri, 6 May 2016 14:48:31 +0100
Subject: [PATCH] auto/lib/openssl/conf: use pkg-config

Change to using pkg-config to find the path to openssl and its
dependencies.

Signed-off-by: Martin Bark <martin@barkynet.com>
---
 auto/lib/openssl/conf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/auto/lib/openssl/conf b/auto/lib/openssl/conf
index 4fb52df7fe17..32ab2a045209 100644
--- a/auto/lib/openssl/conf
+++ b/auto/lib/openssl/conf
@@ -59,8 +59,8 @@ else
         ngx_feature_name="NGX_OPENSSL"
         ngx_feature_run=no
         ngx_feature_incs="#include <openssl/ssl.h>"
-        ngx_feature_path=
-        ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL $NGX_LIBPTHREAD"
+        ngx_feature_path="$(${PKG_CONFIG:=pkg-config} --cflags-only-I openssl|sed -re 's/(^|\s)-I\s*(\S+)/\1\2/g')"
+        ngx_feature_libs="$(${PKG_CONFIG:=pkg-config} --libs openssl) $NGX_LIBDL $NGX_LIBPTHREAD"
         ngx_feature_test="SSL_CTX_set_options(NULL, 0)"
         . auto/feature