]> git.kaiwu.me - njs.git/commitdiff
Improved discovery of OpenSSL libraries.
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 29 Dec 2021 18:26:40 +0000 (18:26 +0000)
committerDmitry Volyntsev <xeioex@nginx.com>
Wed, 29 Dec 2021 18:26:40 +0000 (18:26 +0000)
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.

auto/openssl

index adca588798b4f70782989a17accff12a18e53b9f..a61daa2904dafca4202876a5a11bbb4d8c5567ec 100644 (file)
@@ -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"