Commit c957debc authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Configure: support for lua5.2

Close #8339

Patch from ll2 on trac
parent 1c757f0a
......@@ -1506,28 +1506,35 @@ AC_ARG_ENABLE(lua,
[disable LUA scripting support (default enabled)])])
if test "${enable_lua}" != "no"
then
PKG_CHECK_MODULES(LUA, lua5.1,
PKG_CHECK_MODULES(LUA, lua5.2,
[ have_lua=yes ],
[
AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead])
PKG_CHECK_MODULES(LUA, lua >= 5.1,
AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua 5.1 instead])
PKG_CHECK_MODULES(LUA, lua5.1,
[ have_lua=yes ],
[
AC_MSG_WARN([${LUA_PKG_ERRORS}, trying manual detection instead])
have_lua=yes
AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h],
[],
[ have_lua=no ] )
AC_CHECK_LIB( lua5.1 , luaL_newstate,
[LUA_LIBS="-llua5.1"],
AC_CHECK_LIB( lua51 , luaL_newstate,
[LUA_LIBS="-llua51"],
AC_CHECK_LIB( lua , luaL_newstate,
[LUA_LIBS="-llua"],
[ have_lua=no
], [-lm])
)
)
AC_MSG_WARN([${LUA_PKG_ERRORS}, trying lua >= 5.1 instead])
PKG_CHECK_MODULES(LUA, lua >= 5.1,
[ have_lua=yes ],
[
AC_MSG_WARN([${LUA_PKG_ERRORS}, trying manual detection instead])
have_lua=yes
AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h],
[],
[ have_lua=no ] )
AC_CHECK_LIB( lua5.2 , luaL_newstate,
[LUA_LIBS="-llua5.2"],
AC_CHECK_LIB( lua5.1 , luaL_newstate,
[LUA_LIBS="-llua5.1"],
AC_CHECK_LIB( lua51 , luaL_newstate,
[LUA_LIBS="-llua51"],
AC_CHECK_LIB( lua , luaL_newstate,
[LUA_LIBS="-llua"],
[ have_lua=no
], [-lm])
)))
])
])
])
if test "x${have_lua}" = "xyes" ; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment