diff options
author | Matthew Wild <mwild1@gmail.com> | 2018-12-03 19:38:19 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2018-12-03 19:38:19 +0000 |
commit | f6cb6c1fed62059341d1b10aa9bb8b9720833fde (patch) | |
tree | 20992c416cb8a13e9ae72d12c602017ece7159ee | |
parent | aa3cfe1ea0241eeb60d09ad11bd2727d28887a7d (diff) | |
download | prosody-f6cb6c1fed62059341d1b10aa9bb8b9720833fde.tar.gz prosody-f6cb6c1fed62059341d1b10aa9bb8b9720833fde.zip |
configure: Also look for lua.h in a directory with the same suffix as the interpreter (FreeBSD-friendly)
-rwxr-xr-x | configure | 35 |
1 files changed, 24 insertions, 11 deletions
@@ -469,24 +469,37 @@ if [ -f "$lua_h" ] then echo "lua.h found in $lua_h" else - v_dir="$LUA_INCDIR/lua/$LUA_VERSION" - lua_h="$v_dir/lua.h" - if [ -f "$lua_h" ] - then + for postfix in "$LUA_VERSION" "$LUA_SUFFIX"; do + if ! [ "$postfix" = "" ]; then + v_dir="$LUA_INCDIR/lua/$postfix"; + else + v_dir="$LUA_INCDIR/lua"; + fi + lua_h="$v_dir/lua.h" + if [ -f "$lua_h" ] + then echo "lua.h found in $lua_h" LUA_INCDIR="$v_dir" - else - d_dir="$LUA_INCDIR/lua$LUA_VERSION" + break; + else + d_dir="$LUA_INCDIR/lua$postfix" lua_h="$d_dir/lua.h" if [ -f "$lua_h" ] then - echo "lua.h found in $lua_h (Debian/Ubuntu)" - LUA_INCDIR="$d_dir" + echo "lua.h found in $lua_h" + LUA_INCDIR="$d_dir" + break; else - echo "lua.h not found (looked in $LUA_INCDIR, $v_dir, $d_dir)" - die "You may want to use the flag --with-lua or --with-lua-include. See --help." + lua_h_search="$lua_h_search\n $v_dir/lua.h\n $d_dir/lua.h" fi - fi + fi + done + if [ ! -f "$lua_h" ]; then + echo "lua.h not found. Looked for:" + echo "$lua_h_search" | uniq + echo + die "You may want to use the flag --with-lua or --with-lua-include. See --help." + fi fi if [ "$lua_interp_found" = "yes" ] |