0009-auto-lib-openssl-conf-use-pkg-config.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. From 232ac61984720401b0c3854da1644ec20ed218e0 Mon Sep 17 00:00:00 2001
  2. From: Martin Bark <martin@barkynet.com>
  3. Date: Thu, 15 Aug 2024 19:47:23 +0200
  4. Subject: [PATCH] auto/lib/openssl/conf: use pkg-config
  5. Change to using pkg-config to find the path to openssl and its
  6. dependencies.
  7. Signed-off-by: Martin Bark <martin@barkynet.com>
  8. Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
  9. Upstream: not suitable
  10. ---
  11. auto/lib/openssl/conf | 5 +++--
  12. 1 file changed, 3 insertions(+), 2 deletions(-)
  13. diff --git a/auto/lib/openssl/conf b/auto/lib/openssl/conf
  14. index fdf430dff..c9fe4c8bf 100644
  15. --- a/auto/lib/openssl/conf
  16. +++ b/auto/lib/openssl/conf
  17. @@ -63,8 +63,9 @@ else
  18. ngx_feature_name="NGX_OPENSSL"
  19. ngx_feature_run=no
  20. ngx_feature_incs="#include <openssl/ssl.h>"
  21. - ngx_feature_path=
  22. - ngx_feature_libs="-lssl -lcrypto $NGX_LIBDL $NGX_LIBPTHREAD"
  23. + ngx_feature_path="$(${PKG_CONFIG:=pkg-config} --cflags-only-I openssl|
  24. + sed -re 's/(^|\s)-I\s*(\S+)/\1\2/g')"
  25. + ngx_feature_libs="$(${PKG_CONFIG:=pkg-config} --libs openssl)"
  26. ngx_feature_test="SSL_CTX_set_options(NULL, 0)"
  27. . auto/feature
  28. --
  29. 2.39.2