Software /
code /
prosody
Comparison
configure @ 9678:6178b491fe28
configure: Also look for lua.h in a directory with the same suffix as the interpreter (FreeBSD-friendly)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 03 Dec 2018 19:38:19 +0000 |
parent | 9658:597653fe8ea4 |
child | 9679:4f02aaf40ee9 |
comparison
equal
deleted
inserted
replaced
9677:d0cc1c4e1a1c | 9678:6178b491fe28 |
---|---|
467 lua_h="$LUA_INCDIR/lua.h" | 467 lua_h="$LUA_INCDIR/lua.h" |
468 if [ -f "$lua_h" ] | 468 if [ -f "$lua_h" ] |
469 then | 469 then |
470 echo "lua.h found in $lua_h" | 470 echo "lua.h found in $lua_h" |
471 else | 471 else |
472 v_dir="$LUA_INCDIR/lua/$LUA_VERSION" | 472 for postfix in "$LUA_VERSION" "$LUA_SUFFIX"; do |
473 lua_h="$v_dir/lua.h" | 473 if ! [ "$postfix" = "" ]; then |
474 if [ -f "$lua_h" ] | 474 v_dir="$LUA_INCDIR/lua/$postfix"; |
475 then | 475 else |
476 v_dir="$LUA_INCDIR/lua"; | |
477 fi | |
478 lua_h="$v_dir/lua.h" | |
479 if [ -f "$lua_h" ] | |
480 then | |
476 echo "lua.h found in $lua_h" | 481 echo "lua.h found in $lua_h" |
477 LUA_INCDIR="$v_dir" | 482 LUA_INCDIR="$v_dir" |
478 else | 483 break; |
479 d_dir="$LUA_INCDIR/lua$LUA_VERSION" | 484 else |
485 d_dir="$LUA_INCDIR/lua$postfix" | |
480 lua_h="$d_dir/lua.h" | 486 lua_h="$d_dir/lua.h" |
481 if [ -f "$lua_h" ] | 487 if [ -f "$lua_h" ] |
482 then | 488 then |
483 echo "lua.h found in $lua_h (Debian/Ubuntu)" | 489 echo "lua.h found in $lua_h" |
484 LUA_INCDIR="$d_dir" | 490 LUA_INCDIR="$d_dir" |
491 break; | |
485 else | 492 else |
486 echo "lua.h not found (looked in $LUA_INCDIR, $v_dir, $d_dir)" | 493 lua_h_search="$lua_h_search\n $v_dir/lua.h\n $d_dir/lua.h" |
487 die "You may want to use the flag --with-lua or --with-lua-include. See --help." | 494 fi |
488 fi | 495 fi |
489 fi | 496 done |
497 if [ ! -f "$lua_h" ]; then | |
498 echo "lua.h not found. Looked for:" | |
499 echo "$lua_h_search" | uniq | |
500 echo | |
501 die "You may want to use the flag --with-lua or --with-lua-include. See --help." | |
502 fi | |
490 fi | 503 fi |
491 | 504 |
492 if [ "$lua_interp_found" = "yes" ] | 505 if [ "$lua_interp_found" = "yes" ] |
493 then | 506 then |
494 echo_n "Checking if Lua header version matches that of the interpreter... " | 507 echo_n "Checking if Lua header version matches that of the interpreter... " |