From 86e1bef85084b5bf09688bd19077a8eaa82ae15c Mon Sep 17 00:00:00 2001 From: Hisham Date: Wed, 26 Oct 2016 15:19:42 -0200 Subject: Check if header matches interpreter. --- configure | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/configure b/configure index 15cc21f8..ae2696d2 100755 --- a/configure +++ b/configure @@ -361,6 +361,18 @@ else fi fi +echo_n "Checking if Lua header version matches that of the interpreter... " +header_version=$(sed -n 's/.*LUA_VERSION_NUM.*5.\(.\).*/5.\1/p' "$lua_h") +if [ "$header_version" = "$LUA_VERSION" ] +then + echo "yes" +else + echo "no" + echo "lua.h version mismatch (interpreter: $LUA_VERSION; lua.h: $header_version)." + die "You may want to use the flag --with-lua or --with-lua-include. See --help." +fi + + if [ "$LUAROCKS_DOWNLOADER_SET" != "yes" ] then find_helper "a downloader helper program" curl wget fetch -- cgit v1.2.3-55-g6feb