aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-12-03 23:06:41 +0000
committerMatthew Wild <mwild1@gmail.com>2018-12-03 23:06:41 +0000
commitf1ada80c232b4c2ddcd0b4f3eaec9594a993bcec (patch)
tree85219eed22ebb9a088c4fe1eb5f3b0d9c137659e /configure
parentd2b0158dcc2b91122089072feccaaaa34dd9bf61 (diff)
downloadprosody-f1ada80c232b4c2ddcd0b4f3eaec9594a993bcec.tar.gz
prosody-f1ada80c232b4c2ddcd0b4f3eaec9594a993bcec.zip
configure: Refactor header search to make it more portable
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure17
1 files changed, 10 insertions, 7 deletions
diff --git a/configure b/configure
index 4a816364..dec7b60d 100755
--- a/configure
+++ b/configure
@@ -463,12 +463,13 @@ then
LUA_LIBDIR="$LUA_DIR/lib"
fi
-echo_n "Checking Lua includes... "
lua_h="$LUA_INCDIR/lua.h"
+echo_n "Looking for lua.h at $lua_h..."
if [ -f "$lua_h" ]
then
- echo "lua.h found in $lua_h"
+ echo found
else
+ echo "not found"
for postfix in "$LUA_VERSION" "$LUA_SUFFIX"; do
if ! [ "$postfix" = "" ]; then
v_dir="$LUA_INCDIR/lua/$postfix";
@@ -476,27 +477,29 @@ else
v_dir="$LUA_INCDIR/lua";
fi
lua_h="$v_dir/lua.h"
+ echo_n "Looking for lua.h at $lua_h..."
if [ -f "$lua_h" ]
then
- echo "lua.h found in $lua_h"
LUA_INCDIR="$v_dir"
+ echo found
break;
else
+ echo "not found"
d_dir="$LUA_INCDIR/lua$postfix"
lua_h="$d_dir/lua.h"
+ echo_n "Looking for lua.h at $lua_h..."
if [ -f "$lua_h" ]
then
- echo "lua.h found in $lua_h"
+ echo found
LUA_INCDIR="$d_dir"
break;
else
- lua_h_search="$lua_h_search\n $v_dir/lua.h\n $d_dir/lua.h"
+ echo "not found"
fi
fi
done
if [ ! -f "$lua_h" ]; then
- echo "lua.h not found. Looked for:"
- echo "$lua_h_search" | uniq
+ echo "lua.h not found."
echo
die "You may want to use the flag --with-lua or --with-lua-include. See --help."
fi