configure
changeset 9683 4f02aaf40ee9
parent 9682 6178b491fe28
child 9864 2cf3dcf93d74
equal deleted inserted replaced
9682:6178b491fe28 9683:4f02aaf40ee9
   461 if [ "$LUA_LIBDIR_SET" != "yes" ]
   461 if [ "$LUA_LIBDIR_SET" != "yes" ]
   462 then
   462 then
   463    LUA_LIBDIR="$LUA_DIR/lib"
   463    LUA_LIBDIR="$LUA_DIR/lib"
   464 fi
   464 fi
   465 
   465 
   466 echo_n "Checking Lua includes... "
       
   467 lua_h="$LUA_INCDIR/lua.h"
   466 lua_h="$LUA_INCDIR/lua.h"
       
   467 echo_n "Looking for lua.h at $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 found
   471 else
   471 else
       
   472   echo "not found"
   472   for postfix in "$LUA_VERSION" "$LUA_SUFFIX"; do
   473   for postfix in "$LUA_VERSION" "$LUA_SUFFIX"; do
   473     if ! [ "$postfix" = "" ]; then
   474     if ! [ "$postfix" = "" ]; then
   474       v_dir="$LUA_INCDIR/lua/$postfix";
   475       v_dir="$LUA_INCDIR/lua/$postfix";
   475     else
   476     else
   476       v_dir="$LUA_INCDIR/lua";
   477       v_dir="$LUA_INCDIR/lua";
   477     fi
   478     fi
   478     lua_h="$v_dir/lua.h"
   479     lua_h="$v_dir/lua.h"
       
   480     echo_n "Looking for lua.h at $lua_h..."
   479     if [ -f "$lua_h" ]
   481     if [ -f "$lua_h" ]
   480     then
   482     then
   481       echo "lua.h found in $lua_h"
       
   482       LUA_INCDIR="$v_dir"
   483       LUA_INCDIR="$v_dir"
       
   484       echo found
   483       break;
   485       break;
   484     else
   486     else
       
   487       echo "not found"
   485       d_dir="$LUA_INCDIR/lua$postfix"
   488       d_dir="$LUA_INCDIR/lua$postfix"
   486       lua_h="$d_dir/lua.h"
   489       lua_h="$d_dir/lua.h"
       
   490       echo_n "Looking for lua.h at $lua_h..."
   487       if [ -f "$lua_h" ]
   491       if [ -f "$lua_h" ]
   488       then
   492       then
   489         echo "lua.h found in $lua_h"
   493         echo found
   490         LUA_INCDIR="$d_dir"
   494         LUA_INCDIR="$d_dir"
   491         break;
   495         break;
   492       else
   496       else
   493         lua_h_search="$lua_h_search\n  $v_dir/lua.h\n  $d_dir/lua.h"
   497         echo "not found"
   494       fi
   498       fi
   495     fi
   499     fi
   496   done
   500   done
   497   if [ ! -f "$lua_h" ]; then
   501   if [ ! -f "$lua_h" ]; then
   498     echo "lua.h not found. Looked for:"
   502     echo "lua.h not found."
   499     echo "$lua_h_search" | uniq
       
   500     echo
   503     echo
   501     die "You may want to use the flag --with-lua or --with-lua-include. See --help."
   504     die "You may want to use the flag --with-lua or --with-lua-include. See --help."
   502   fi
   505   fi
   503 fi
   506 fi
   504 
   507