summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2023-11-16 22:47:20 +0800
committerruki <[email protected]>2023-11-16 22:47:20 +0800
commitd7cac5b8d0cde98ab4979c6e7602042511a27833 (patch)
tree6b1bea56eb4609bf349cdc6dcdd23683893f1782
parentd933a0446e6650c83ce7e37ee01bef39980002ca (diff)
improve to detect lua
-rwxr-xr-xcore/xmake.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/xmake.sh b/core/xmake.sh
index b21e34efe..51dbbf30a 100755
--- a/core/xmake.sh
+++ b/core/xmake.sh
@@ -87,8 +87,16 @@ option_find_lua() {
local ldflags=""
local cflags=""
option "lua"
+ # detect lua5.4 on debian
cflags=`pkg-config --cflags lua5.4 2>/dev/null`
ldflags=`pkg-config --libs lua5.4 2>/dev/null`
+ # detect it on fedora
+ if test_z "${cflags}"; then
+ cflags=`pkg-config --cflags lua 2>/dev/null`
+ fi
+ if test_z "${ldflags}"; then
+ ldflags=`pkg-config --libs lua 2>/dev/null`
+ fi
if test_z "${cflags}"; then
cflags="-I/usr/include/lua5.4"
fi