Fix failure to detect lua.h on some systems

Fixes "present but cannot be compiled" autoconf failure looking for lua.h
This commit is contained in:
William S Fulton 2016-05-28 10:37:19 +01:00
commit eaf74df22f

View file

@ -2347,7 +2347,10 @@ if test "$LUABIN"; then
AC_CHECK_FILE($LUAINCLUDE/lua.h,[LUAFLAGS="$ISYSTEM$LUAINCLUDE"],[LUABIN=])
else
LUA_OK="1"
AC_CHECK_HEADER(lua.h,[LUAFLAGS=""],[LUA_OK=""])
CFLAGS_SAVED=$CFLAGS
CFLAGS= # Use empty CFLAGS to avoid failure: "present but cannot be compiled"
AC_CHECK_HEADER([lua.h],[LUAFLAGS=""],[LUA_OK=""])
CFLAGS=$CFLAGS_SAVED
# if we didn't get it, going to have to look elsewhere (the hard way)
if test -z "$LUA_OK"; then
AC_MSG_CHECKING(for lua.h in other locations)