[njs] Improved discovery of OpenSSL libraries.

Dmitry Volyntsev xeioex at nginx.com
Thu Dec 30 13:30:38 UTC 2021


details:   https://hg.nginx.org/njs/rev/9b112a44e540
branches:  
changeset: 1798:9b112a44e540
user:      Dmitry Volyntsev <xeioex at nginx.com>
date:      Wed Dec 29 18:26:40 2021 +0000
description:
Improved discovery of OpenSSL libraries.

Trying to link again the library using --cc-opt and --ld-opt before
attempting to use the default.

This change is similar to 9e2e4d04dfc4 (0.7.1) made for PCRE.

diffstat:

 auto/openssl |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (26 lines):

diff -r c714088503bc -r 9b112a44e540 auto/openssl
--- a/auto/openssl	Wed Dec 29 17:20:09 2021 +0000
+++ b/auto/openssl	Wed Dec 29 18:26:40 2021 +0000
@@ -13,7 +13,7 @@ if [ $NJS_OPENSSL = YES ]; then
     njs_feature_name=NJS_HAVE_OPENSSL
     njs_feature_run=yes
     njs_feature_incs=
-    njs_feature_libs="-lcrypto"
+    njs_feature_libs=""
     njs_feature_test="#include <openssl/evp.h>
 
                       int main() {
@@ -24,6 +24,13 @@ if [ $NJS_OPENSSL = YES ]; then
                      }"
     . auto/feature
 
+    if [ $njs_found = no ]; then
+        njs_feature="OpenSSL library -lcrypto"
+        njs_feature_libs="-lcrypto"
+
+        . auto/feature
+    fi
+
 
     if [ $njs_found = yes ]; then
         njs_feature="OpenSSL version"


More information about the nginx-devel mailing list