[vlc-devel] lua: found host luac5.3 instead of luac from contrib

Andrey Gursky andrey.gursky at e-mail.ua
Fri Apr 8 02:15:18 CEST 2016

Hi Rémi,

> commit e018379644de6c8208163800dfeb9ac44036d4ee
> Author: Rémi Denis-Courmont <remi at remlab.net>
> Date:   Mon Apr 4 21:24:30 2016 +0300
>     configure: detect hosted Lua 5.3
> ---
> diff --git a/configure.ac b/configure.ac
> index dfcc075..1842021 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1557,7 +1550,7 @@ then
>        AC_MSG_ERROR([Could not find lua. Lua is needed for some interfaces (rc, telnet, http) as well as many other custom scripts. Use --disable-lua to ignore this error.])
>    fi
>    AC_ARG_VAR([LUAC], [LUA byte compiler])
> -  AC_CHECK_PROGS(LUAC, [${LUAC} luac], [false])
> +  AC_CHECK_PROGS(LUAC, [${LUAC} luac5.3 luac], [false])
>    AS_IF([test "${LUAC}" = "false"], [
>      AC_MSG_ERROR([Could not find the LUA byte compiler.])
>    ])

I discovered this issue by building vlc-android.

If the host has luac5.3 this patch breaks searching for luac in
contrib. But reverting would introduce another issue: If the host has
liblua5.3-dev while default luac is luac5.2 (like now in Debian
Testing), then a wrong bytecode compiler will be discovered.

What do you think about merging the AC_CHECK_PROGS logic into
PKG_CHECK_MODULES? Once particular version of lua has been found, one
should search for the corresponding bytecode compiler at that place.
Since the same must be done also for manual detection, it looks like it
will be a mess. Another idea is to set have_lua to a version number and
then make an appropriate check. Or maybe better just to set LUAC
together with have_lua?


More information about the vlc-devel mailing list