Skip to content

Commit 451618e

Browse files
committed
Lua autodetection: allow 'lua' command without suffix
Gentoo does have 'lua' but does not have 'lua5.1' for lua 5.1
1 parent f38deab commit 451618e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build/lua-detect.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ LUA_VERSION ?= $(or $(shell $(PKG_CONFIG) --variable=V $(LUA_PKG)),5.0)
2828
# prior to 5.1 the lib didn't include version in name.
2929
LUA_SUFFIX := $(if $(findstring $(LUA_VERSION),5.0),,$(LUA_VERSION))
3030

31-
LUA_LIBS := $(or $(shell $(PKG_CONFIG) --libs $(LUA_PKG)), $(error "pkg-config couldn't find linker flags for lua$(LUA_SUFFIX)!"))
31+
LUA_LIBS := $(or $(shell $(PKG_CONFIG) --libs $(LUA_PKG)), $(error "pkg-config couldn't find linker flags for lua$(LUA_SUFFIX)!"))
3232
LUA_INCLUDES := $(shell $(PKG_CONFIG) --cflags $(LUA_PKG))
33-
LUA := $(or $(shell which lua$(LUA_SUFFIX)), $(error No lua$(LUA_SUFFIX) interpreter found!))
34-
LUAC := $(or $(shell which luac$(LUA_SUFFIX)), $(error No lua$(LUA_SUFFIX) compiler found!))
33+
LUA := $(or $(shell which lua$(LUA_SUFFIX)), $(shell which lua), $(error No lua$(LUA_SUFFIX) interpreter found!))
34+
LUAC := $(or $(shell which luac$(LUA_SUFFIX)), $(shell which luac), $(error No lua$(LUA_SUFFIX) compiler found!))

0 commit comments

Comments
 (0)