1From aed16d13d881492e8558f9da21be2dffc4ab2c33 Mon Sep 17 00:00:00 2001 2From: Fabrice Fontaine <fontaine.fabrice@gmail.com> 3Date: Sat, 4 Sep 2021 17:23:58 +0200 4Subject: [PATCH] build/ax_lua.m4: fix cross-compilation 5 6Don't try to "find" and "fix" the script and module directories when 7cross-compiling as this will give unexpected results such as using 8${prefix}/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/host/usr/share/lua/5.3 9instead of 10${prefix}/share/lua/5.3 11if the host machine root directory is /usr 12 13Fixes: 14 - http://autobuild.buildroot.org/results/09fa6dd9844d6d4694801ec59434dad7a56bf290 15 16Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> 17--- 18 build/ax_lua.m4 | 4 ++-- 19 1 file changed, 2 insertions(+), 2 deletions(-) 20 21diff --git a/build/ax_lua.m4 b/build/ax_lua.m4 22index 23ca774..7c25cfd 100644 23--- a/build/ax_lua.m4 24+++ b/build/ax_lua.m4 25@@ -291,7 +291,7 @@ AC_DEFUN([AX_PROG_LUA], 26 27 dnl Try to find a path with the prefix. 28 _AX_LUA_FND_PRFX_PTH([$LUA], [$ax_lua_prefix], [package.path]) 29- AS_IF([test "x$ax_lua_prefixed_path" != 'x'], 30+ AS_IF([test "x$ax_lua_prefixed_path" != 'x' && test "x$cross_compiling" != 'xyes'], 31 [ dnl Fix the prefix. 32 _ax_strip_prefix=`echo "$ax_lua_prefix" | sed 's|.|.|g'` 33 ax_cv_lua_luadir=`echo "$ax_lua_prefixed_path" | \ 34@@ -318,7 +318,7 @@ AC_DEFUN([AX_PROG_LUA], 35 dnl Try to find a path with the prefix. 36 _AX_LUA_FND_PRFX_PTH([$LUA], 37 [$ax_lua_exec_prefix], [package.cpathd]) 38- AS_IF([test "x$ax_lua_prefixed_path" != 'x'], 39+ AS_IF([test "x$ax_lua_prefixed_path" != 'x' && test "x$cross_compiling" != 'xyes'], 40 [ dnl Fix the prefix. 41 _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | sed 's|.|.|g'` 42 ax_cv_lua_luaexecdir=`echo "$ax_lua_prefixed_path" | \ 43-- 442.32.0 45 46