Skip to content

Commit 857bf9d

Browse files
committed
Allow LuaJIT to be used
1 parent 156527a commit 857bf9d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
v3.0.3 - YYYY-MMM-DD (to be released)
22
-------------------------------------
33

4+
- Allow LuaJIT to be used
5+
[Issue #1809 - @victorhora, @p0pr0ck5]
46
- Implement support for Lua 5.1
57
[Issue #1809 - @p0pr0ck5, @victorhora]
68
- Variable names must match fully, not partially. Match should be case

build/lua.m4

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ AC_DEFUN([CHECK_LUA],
66
[dnl
77
88
# Possible names for the lua library/package (pkg-config)
9-
LUA_POSSIBLE_LIB_NAMES="lua lua53 lua5.3 lua52 lua5.2 lua51 lua5.1"
9+
LUA_POSSIBLE_LIB_NAMES="lua lua53 lua5.3 lua52 lua5.2 lua51 lua5.1 luajit luajit-5.1"
1010
1111
# Possible extensions for the library
1212
LUA_POSSIBLE_EXTENSIONS="so so0 la sl dll dylib so.0.0.0"
@@ -68,6 +68,7 @@ else
6868
case $LUA_PKG_VERSION in
6969
(5.1*) LUA_CFLAGS="-DWITH_LUA_5_1 ${LUA_CFLAGS}" ; lua_5_1=1 ;;
7070
(5.2*) LUA_CFLAGS="-DWITH_LUA_5_2 ${LUA_CFLAGS}" ; lua_5_2=1 ;;
71+
(2.*) LUA_CFLAGS="-DWITH_LUA_5_1 ${LUA_CFLAGS}" ; lua_5_1=1 ;;
7172
esac
7273
AC_MSG_NOTICE([LUA pkg-config version: ${LUA_PKG_VERSION}])
7374
fi
@@ -169,6 +170,9 @@ AC_DEFUN([CHECK_FOR_LUA_AT], [
169170
elif test -e "${path}/include/lua5.1/lua.h"; then
170171
lua_inc_path="${path}/include/lua5.1"
171172
LUA_VERSION=501
173+
elif test -e "${path}/include/luajit-2.0/lua.h"; then
174+
lua_inc_path="${path}/include/luajit-2.0"
175+
LUA_VERSION=501
172176
fi
173177
174178
if test -n "${lua_lib_path}"; then

0 commit comments

Comments
 (0)