details:   https://hg.nginx.org/njs/rev/834096122cef
branches:  
changeset: 2311:834096122cef
user:      Dmitry Volyntsev <xei...@nginx.com>
date:      Thu Apr 04 16:07:46 2024 -0700
description:
Configure: improved QuickJS discovery.

At the first try do not assume the exact library and includes location.

diffstat:

 auto/quickjs |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (43 lines):

diff -r b83e2ae81937 -r 834096122cef auto/quickjs
--- a/auto/quickjs      Thu Apr 04 16:07:39 2024 -0700
+++ b/auto/quickjs      Thu Apr 04 16:07:46 2024 -0700
@@ -9,11 +9,11 @@ NJS_HAVE_QUICKJS=NO
 if [ $NJS_QUICKJS = YES ]; then
     njs_found=no
 
-    njs_feature="QuickJS library"
+    njs_feature="QuickJS library -lquickjs.lto"
     njs_feature_name=NJS_HAVE_QUICKJS
     njs_feature_run=yes
     njs_feature_incs=
-    njs_feature_libs=""
+    njs_feature_libs="-lquickjs.lto -lm -ldl -lpthread"
     njs_feature_test="#if defined(__GNUC__) && (__GNUC__ >= 8)
                       #pragma GCC diagnostic push
                       #pragma GCC diagnostic ignored \"-Wcast-function-type\"
@@ -31,7 +31,14 @@ if [ $NJS_QUICKJS = YES ]; then
     . auto/feature
 
     if [ $njs_found = no ]; then
-        njs_feature="QuickJS library -lquickjs.lto"
+        njs_feature="QuickJS library -lquickjs"
+        njs_feature_libs="-lquickjs -lm -ldl -lpthread"
+
+        . auto/feature
+    fi
+
+    if [ $njs_found = no ]; then
+        njs_feature="QuickJS library -I/usr/include/quickjs/ 
-L/usr/lib/quickjs/ -lquickjs.lto"
         njs_feature_incs="/usr/include/quickjs/"
         njs_feature_libs="-L/usr/lib/quickjs/ -lquickjs.lto -lm -ldl -lpthread"
 
@@ -39,7 +46,8 @@ if [ $NJS_QUICKJS = YES ]; then
     fi
 
     if [ $njs_found = no ]; then
-        njs_feature="QuickJS library -lquickjs"
+        njs_feature="QuickJS library -I/usr/include/quickjs/ 
-L/usr/lib/quickjs/ -lquickjs"
+        njs_feature_incs="/usr/include/quickjs/"
         njs_feature_libs="-L/usr/lib/quickjs/ -lquickjs -lm -ldl -lpthread"
 
         . auto/feature
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel

Reply via email to