<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7990">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Corey Farrell: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Jenkins2: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">BuildSystem: Detect external library Lua in version 5.3.<br><br>On some platforms, you decide to go for one specific version of Lua, for<br>example in OpenBSD. On other platforms, you are able to install several versions<br>side-by-side, for example in Ubuntu and Fedora. Asterisk already works with<br>Lua 5.3. Asterisk failed to detect Lua 5.3 on those platforms which allow<br>several versions.<br><br>ASTERISK-27592<br><br>Change-Id: If7a4b395d844a464e9a1f4f626c5bff4ee67eed8<br>---<br>M configure<br>M configure.ac<br>2 files changed, 113 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/configure b/configure<br>index 749b2fc..c0225de 100755<br>--- a/configure<br>+++ b/configure<br>@@ -30262,6 +30262,110 @@<br> <br> ast_ext_lib_check_save_CFLAGS="${CFLAGS}"<br> CFLAGS="${CFLAGS} "<br>+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua5.3" >&5<br>+$as_echo_n "checking for luaL_newstate in -llua5.3... " >&6; }<br>+if ${ac_cv_lib_lua5_3_luaL_newstate+:} false; then :<br>+ $as_echo_n "(cached) " >&6<br>+else<br>+ ac_check_lib_save_LIBS=$LIBS<br>+LIBS="-llua5.3 ${pbxlibdir} -lm $LIBS"<br>+cat confdefs.h - <<_ACEOF >conftest.$ac_ext<br>+/* end confdefs.h. */<br>+<br>+/* Override any GCC internal prototype to avoid an error.<br>+ Use char because int might match the return type of a GCC<br>+ builtin and then its argument prototype would still apply. */<br>+#ifdef __cplusplus<br>+extern "C"<br>+#endif<br>+char luaL_newstate ();<br>+int<br>+main ()<br>+{<br>+return luaL_newstate ();<br>+ ;<br>+ return 0;<br>+}<br>+_ACEOF<br>+if ac_fn_c_try_link "$LINENO"; then :<br>+ ac_cv_lib_lua5_3_luaL_newstate=yes<br>+else<br>+ ac_cv_lib_lua5_3_luaL_newstate=no<br>+fi<br>+rm -f core conftest.err conftest.$ac_objext \<br>+ conftest$ac_exeext conftest.$ac_ext<br>+LIBS=$ac_check_lib_save_LIBS<br>+fi<br>+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lua5_3_luaL_newstate" >&5<br>+$as_echo "$ac_cv_lib_lua5_3_luaL_newstate" >&6; }<br>+if test "x$ac_cv_lib_lua5_3_luaL_newstate" = xyes; then :<br>+ AST_LUA_FOUND=yes<br>+else<br>+ AST_LUA_FOUND=no<br>+fi<br>+<br>+ CFLAGS="${ast_ext_lib_check_save_CFLAGS}"<br>+<br>+<br>+ # now check for the header.<br>+ if test "${AST_LUA_FOUND}" = "yes"; then<br>+ LUA_LIB="${pbxlibdir} -llua5.3 -lm"<br>+ # if --with-LUA=DIR has been specified, use it.<br>+ if test "x${LUA_DIR}" != "x"; then<br>+ LUA_INCLUDE="-I${LUA_DIR}/include"<br>+ fi<br>+ LUA_INCLUDE="${LUA_INCLUDE} "<br>+<br>+ # check for the header<br>+ ast_ext_lib_check_saved_CPPFLAGS="${CPPFLAGS}"<br>+ CPPFLAGS="${CPPFLAGS} ${LUA_INCLUDE}"<br>+ ac_fn_c_check_header_mongrel "$LINENO" "lua5.3/lua.h" "ac_cv_header_lua5_3_lua_h" "$ac_includes_default"<br>+if test "x$ac_cv_header_lua5_3_lua_h" = xyes; then :<br>+ LUA_HEADER_FOUND=1<br>+else<br>+ LUA_HEADER_FOUND=0<br>+fi<br>+<br>+<br>+ CPPFLAGS="${ast_ext_lib_check_saved_CPPFLAGS}"<br>+<br>+ if test "x${LUA_HEADER_FOUND}" = "x0" ; then<br>+ LUA_LIB=""<br>+ LUA_INCLUDE=""<br>+ else<br>+<br>+ PBX_LUA=1<br>+ cat >>confdefs.h <<_ACEOF<br>+#define HAVE_LUA 1<br>+_ACEOF<br>+<br>+ fi<br>+ fi<br>+fi<br>+<br>+<br>+if test "x${PBX_LUA}" = "x1" ; then<br>+ if test x"${LUA_DIR}" = x; then<br>+ LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.3"<br>+ else<br>+ LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.3"<br>+ fi<br>+fi<br>+<br>+<br>+if test "x${PBX_LUA}" != "x1" -a "${USE_LUA}" != "no"; then<br>+ pbxlibdir=""<br>+ # if --with-LUA=DIR has been specified, use it.<br>+ if test "x${LUA_DIR}" != "x"; then<br>+ if test -d ${LUA_DIR}/lib; then<br>+ pbxlibdir="-L${LUA_DIR}/lib"<br>+ else<br>+ pbxlibdir="-L${LUA_DIR}"<br>+ fi<br>+ fi<br>+<br>+ ast_ext_lib_check_save_CFLAGS="${CFLAGS}"<br>+ CFLAGS="${CFLAGS} "<br> { $as_echo "$as_me:${as_lineno-$LINENO}: checking for luaL_newstate in -llua5.2" >&5<br> $as_echo_n "checking for luaL_newstate in -llua5.2... " >&6; }<br> if ${ac_cv_lib_lua5_2_luaL_newstate+:} false; then :<br>diff --git a/configure.ac b/configure.ac<br>index f68338b..d206bd3 100644<br>--- a/configure.ac<br>+++ b/configure.ac<br>@@ -2409,6 +2409,15 @@<br> [${PWLIB_INCLUDE}], [${PWLIB_LIB}])<br> fi<br> <br>+AST_EXT_LIB_CHECK([LUA], [lua5.3], [luaL_newstate], [lua5.3/lua.h], [-lm])<br>+if test "x${PBX_LUA}" = "x1" ; then<br>+ if test x"${LUA_DIR}" = x; then<br>+ LUA_INCLUDE="${LUA_INCLUDE} -I/usr/include/lua5.3"<br>+ else<br>+ LUA_INCLUDE="${LUA_INCLUDE} -I${LUA_DIR}/lua5.3"<br>+ fi<br>+fi<br>+<br> AST_EXT_LIB_CHECK([LUA], [lua5.2], [luaL_newstate], [lua5.2/lua.h], [-lm])<br> if test "x${PBX_LUA}" = "x1" ; then<br> if test x"${LUA_DIR}" = x; then<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7990">change 7990</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7990"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: If7a4b395d844a464e9a1f4f626c5bff4ee67eed8 </div>
<div style="display:none"> Gerrit-Change-Number: 7990 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-Reviewer: Corey Farrell <git@cfware.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>