mirror of https://github.com/odrling/Aegisub
Make the configure check for lua more specific
Move the generic lua check to after the checks for lua 5.1 and check for lua < 5.2. Closes #1559.
This commit is contained in:
parent
936598e9f5
commit
fb3500b354
|
@ -395,9 +395,9 @@ AC_ARG_WITH(lua,
|
||||||
|
|
||||||
AS_IF([test x$with_lua = xno], [$with_auto4_lua="no"; lua_disabled="(disabled)"], [
|
AS_IF([test x$with_lua = xno], [$with_auto4_lua="no"; lua_disabled="(disabled)"], [
|
||||||
# First try pkg-config with several names
|
# First try pkg-config with several names
|
||||||
PKG_CHECK_MODULES(LUA, lua >= 5.1, [with_auto4_lua="yes"], [
|
PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1 lua5.1 < 5.2, [with_auto4_lua="yes"], [
|
||||||
PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1, [with_auto4_lua="yes"], [
|
PKG_CHECK_MODULES(LUA, lua-5.1 >= 5.1 lua-5.1 < 5.2, [with_auto4_lua="yes"], [
|
||||||
PKG_CHECK_MODULES(LUA, lua-5.1 >= 5.1, [with_auto4_lua="yes"], [
|
PKG_CHECK_MODULES(LUA, lua >= 5.1 lua < 5.2, [with_auto4_lua="yes"], [
|
||||||
# Still not found so try to autodetect
|
# Still not found so try to autodetect
|
||||||
AS_IF([test -z "$LUA_CFLAGS"],
|
AS_IF([test -z "$LUA_CFLAGS"],
|
||||||
[AGI_FIND_HEADER([LUA], [lua.hpp],
|
[AGI_FIND_HEADER([LUA], [lua.hpp],
|
||||||
|
@ -417,7 +417,7 @@ int main () {
|
||||||
return !res;
|
return !res;
|
||||||
}])
|
}])
|
||||||
AS_IF([test x$agi_cv_with_lua = xno && test x$with_lua = xyes],
|
AS_IF([test x$agi_cv_with_lua = xno && test x$with_lua = xyes],
|
||||||
[AC_MSG_FAILURE([--with-lua was specified, but lua could not be found. Try setting LUA_CLFAGS and LUA_LIBS manually])])
|
[AC_MSG_FAILURE([--with-lua was specified, but lua 5.1 could not be found. Try setting LUA_CLFAGS and LUA_LIBS manually])])
|
||||||
with_auto4_lua=$agi_cv_with_lua
|
with_auto4_lua=$agi_cv_with_lua
|
||||||
])])])
|
])])])
|
||||||
])
|
])
|
||||||
|
|
Loading…
Reference in New Issue