From 8f31b7024621f1be7dfc998c1a6dfd714a3b6197 Mon Sep 17 00:00:00 2001 From: Alexander Traud Date: Wed, 17 Jan 2018 09:51:29 +0100 Subject: BuildSystem: Detect external library Lua in version 5.3. On some platforms, you decide to go for one specific version of Lua, for example in OpenBSD. On other platforms, you are able to install several versions side-by-side, for example in Ubuntu and Fedora. Asterisk already works with Lua 5.3. Asterisk failed to detect Lua 5.3 on those platforms which allow several versions. ASTERISK-27592 Change-Id: If7a4b395d844a464e9a1f4f626c5bff4ee67eed8 --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index f68338b2d..d206bd33e 100644 --- a/configure.ac +++ b/configure.ac @@ -2409,6 +2409,15 @@ if test "${PBX_PWLIB}" = "1" -a "${USE_OPENH323}" != "no" ; then [${PWLIB_INCLUDE}], [${PWLIB_LIB}]) fi +AST_EXT_LIB_CHECK([LUA], [lua5.3], [luaL_newstate], [lua5.3/lua.h], [-lm]) +if test "x${PBX_LUA}" = "x1" ; then + if test x"${LUA_DIR}" = x; then + LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.3" + else + LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.3" + fi +fi + AST_EXT_LIB_CHECK([LUA], [lua5.2], [luaL_newstate], [lua5.2/lua.h], [-lm]) if test "x${PBX_LUA}" = "x1" ; then if test x"${LUA_DIR}" = x; then -- cgit v1.2.3