[vlc-commits] configure: detect luac from contribs
Rémi Denis-Courmont
git at videolan.org
Sun Aug 7 22:33:53 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Aug 7 23:22:31 2016 +0300| [07a02cb61ffe2ccc245463a5a19d54290a1b2ad7] | committer: Rémi Denis-Courmont
configure: detect luac from contribs
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=07a02cb61ffe2ccc245463a5a19d54290a1b2ad7
---
configure.ac | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4c66987..e83b0a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -436,8 +436,17 @@ AS_IF([test -n "${CONTRIB_DIR}"], [
export PKG_CONFIG_PATH="${CONTRIB_DIR}/lib/pkgconfig:$PKG_CONFIG_PATH"
LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
- dnl Tempting, but needs to be set during bootstrap and make too...
- dnl export PATH="$PATH:${CONTRIB_DIR}/../bin"
+ AS_IF([test -z "$LUAC"], [
+ dnl Old contribs mixed cross-tools and cross-compiled executables
+ AS_IF([test -x "${CONTRIB_DIR}/bin/luac"], [
+ LUAC="${CONTRIB_DIR}/bin/luac"
+ ])
+
+ dnl Newer contribs follow usual name space rules
+ AS_IF([test -x "${CONTRIB_DIR}/../bin/${host}-luac"], [
+ LUAC="${CONTRIB_DIR}/../bin/${host}-luac"
+ ])
+ ])
AS_IF([test "${SYS}" = "darwin"], [
export LD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH"
@@ -1564,7 +1573,9 @@ 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_TOOLS(LUAC, [${LUAC} luac], [false])
+ AS_IF([test -z "$LUAC"], [
+ AC_CHECK_TOOL(LUAC, [luac], [false])
+ ])
AS_IF([test "${LUAC}" = "false"], [
AC_MSG_ERROR([Could not find the LUA byte compiler.])
])
More information about the vlc-commits
mailing list