Commit 07a02cb6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

configure: detect luac from contribs

parent 638d77f1
......@@ -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.])
])
......
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