From eaf74df22f738b7ee8e65c6aaaa506e1a523e0f0 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 28 May 2016 10:37:19 +0100 Subject: [PATCH] Fix failure to detect lua.h on some systems Fixes "present but cannot be compiled" autoconf failure looking for lua.h --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2954d40b9..808ff21be 100644 --- a/configure.ac +++ b/configure.ac @@ -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)