1c110d7956
The regular expression that drops the -I flag from the output of pkg-config --cflags-only-I doesn't work properly as it is too naive: it breaks a path if it contains -I: $ echo "-I/usr/Some-Install-Location/include" | sed 's/-I//g' /usr/Somenstall-Location/include $ echo "-I/usr/Some-Install-Location/include" | sed -re 's/(^|\s)-I\s*(\S+)/\1\2/g' /usr/Some-Install-Location/include Signed-off-by: Ignacy Gawędzki <ignacy.gawedzki@green-communications.fr> [Thomas: improved commit log.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From 756556d127da291cad8a2c007a89124a692aef7f Mon Sep 17 00:00:00 2001
|
|
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 39d9602..995c6f3 100644
|
|
--- a/auto/lib/openssl/conf
|
|
+++ b/auto/lib/openssl/conf
|
|
@@ -58,8 +58,9 @@ 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_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_feature_test="SSL_CTX_set_options(NULL, 0)"
|
|
. auto/feature
|
|
|
|
--
|
|
2.8.2
|
|
|