diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2021-03-16 13:29:57 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2021-03-16 13:29:57 -0300 |
commit | a84b7698b7a320fd883cbb9b96703475e9ac6fa9 (patch) | |
tree | 8245e31140e0292d37690c09ba1a0fac75812d4a | |
parent | 5a33a5e7526e7bdd69c2e232b91cce6e73c68292 (diff) | |
download | luarocks-a84b7698b7a320fd883cbb9b96703475e9ac6fa9.tar.gz luarocks-a84b7698b7a320fd883cbb9b96703475e9ac6fa9.tar.bz2 luarocks-a84b7698b7a320fd883cbb9b96703475e9ac6fa9.zip |
configure: check that version of lua.h matches
This is to match the behavior of luarocks.deps
-rwxr-xr-x | configure | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -435,11 +435,14 @@ check_incdir() { | |||
435 | "$incdir/lua.h" \ | 435 | "$incdir/lua.h" \ |
436 | $("$LUA_BINDIR/$LUA_INTERPRETER" -e 'print(jit and [['"$incdir"'/luajit-]]..jit.version:match("(%d+%.%d+)")..[[/lua.h]] or "")') | 436 | $("$LUA_BINDIR/$LUA_INTERPRETER" -e 'print(jit and [['"$incdir"'/luajit-]]..jit.version:match("(%d+%.%d+)")..[[/lua.h]] or "")') |
437 | do | 437 | do |
438 | [ -f "$lua_h" ] && return | 438 | if [ -f "$lua_h" ] |
439 | then | ||
440 | grep "LUA_VERSION_NUM.*$LUA_VERSION" $lua_h &> /dev/null && return | ||
441 | fi | ||
439 | tried="$tried $lua_h" | 442 | tried="$tried $lua_h" |
440 | done | 443 | done |
441 | 444 | ||
442 | echo "$(RED "lua.h not found") (tried$tried)" | 445 | echo "$(RED "lua.h for Lua $LUA_VERSION not found") (tried$tried)" |
443 | echo | 446 | echo |
444 | echo "If the development files for Lua (headers and libraries)" | 447 | echo "If the development files for Lua (headers and libraries)" |
445 | echo "are installed in your system, you may need to use the" | 448 | echo "are installed in your system, you may need to use the" |