File: discover-luajit-2.1.patch

package info (click to toggle)
nginx 1.18.0-6.1%2Bdeb11u3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 19,344 kB
  • sloc: ansic: 250,653; perl: 7,548; sh: 1,408; ruby: 879; python: 358; makefile: 338; awk: 36; cpp: 18
file content (47 lines) | stat: -rw-r--r-- 1,370 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 0bb37a210d165870f7c4c9ad85e1751bdc1aec8f Mon Sep 17 00:00:00 2001
From: Christos Trochalakis <yatiohi@ideopolis.gr>
Date: Mon, 28 Aug 2017 13:48:08 +0300
Subject: [PATCH] Inventorize LuaJIT 2.1

---
 config | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/config b/config
index 01a6b3c3..5819c00f 100644
--- a/config
+++ b/config
@@ -281,6 +281,30 @@ END
             fi
             . auto/feature
         fi
+
+        if [ $ngx_found = no ]; then
+            # LuaJIT-2.1, try with -ldl
+            ngx_feature="LuaJIT 2.1 library in /usr/"
+            ngx_feature_path="/usr/include/luajit-2.1"
+            if [ $NGX_RPATH = YES ]; then
+                ngx_feature_libs="-R/usr/lib -L/usr/lib -lm -lluajit-5.1 -ldl"
+            else
+                ngx_feature_libs="-L/usr/lib -lm -lluajit-5.1 -ldl"
+            fi
+            . auto/feature
+        fi
+
+        if [ $ngx_found = no ]; then
+            # Gentoo with LuaJIT 2.1
+            ngx_feature="LuaJIT library in /usr/"
+            ngx_feature_path="/usr/include/luajit-2.1"
+            if [ $NGX_RPATH = YES ]; then
+                ngx_feature_libs="-R/usr/lib -L/usr/lib -lm -lluajit-5.1"
+            else
+                ngx_feature_libs="-L/usr/lib -lm -lluajit-5.1"
+            fi
+            . auto/feature
+        fi
     fi
 fi
 
-- 
2.14.1