From a84b7698b7a320fd883cbb9b96703475e9ac6fa9 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Tue, 16 Mar 2021 13:29:57 -0300 Subject: configure: check that version of lua.h matches This is to match the behavior of luarocks.deps --- configure | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 7c593462..88d035a1 100755 --- a/configure +++ b/configure @@ -435,11 +435,14 @@ check_incdir() { "$incdir/lua.h" \ $("$LUA_BINDIR/$LUA_INTERPRETER" -e 'print(jit and [['"$incdir"'/luajit-]]..jit.version:match("(%d+%.%d+)")..[[/lua.h]] or "")') do - [ -f "$lua_h" ] && return + if [ -f "$lua_h" ] + then + grep "LUA_VERSION_NUM.*$LUA_VERSION" $lua_h &> /dev/null && return + fi tried="$tried $lua_h" done - echo "$(RED "lua.h not found") (tried$tried)" + echo "$(RED "lua.h for Lua $LUA_VERSION not found") (tried$tried)" echo echo "If the development files for Lua (headers and libraries)" echo "are installed in your system, you may need to use the" -- cgit v1.2.3-55-g6feb