From: Ruben Kerkhof Date: Sat, 19 Nov 2016 10:47:00 +0000 (+0100) Subject: Fix Lua header detection X-Git-Tag: collectd-5.6.2~8 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;ds=sidebyside;h=3eda78360090edab0538f3b54c79d27a7fa1ec22;p=collectd.git Fix Lua header detection checking lua.h usability... yes checking lua.h presence... no configure: WARNING: lua.h: accepted by the compiler, rejected by the preprocessor! configure: WARNING: lua.h: proceeding with the compiler's result checking for lua.h... yes checking lauxlib.h usability... yes checking lauxlib.h presence... no configure: WARNING: lauxlib.h: accepted by the compiler, rejected by the preprocessor! configure: WARNING: lauxlib.h: proceeding with the compiler's result checking for lauxlib.h... yes checking lualib.h usability... yes checking lualib.h presence... no configure: WARNING: lualib.h: accepted by the compiler, rejected by the preprocessor! configure: WARNING: lualib.h: proceeding with the compiler's result checking for lualib.h... yes AC_CHECK_HEADERS uses the preprocessor directly, which doesn't use CFLAGS. Fixes detection of the lua-5.1 compat libs on Fedora Rawhide. --- diff --git a/configure.ac b/configure.ac index b0373ed0..a4603a9b 100644 --- a/configure.ac +++ b/configure.ac @@ -2826,15 +2826,15 @@ fi if test "x$with_liblua" = "xyes" then - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $LUA_CFLAGS" + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $LUA_CFLAGS" AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h], [with_liblua="yes"], [with_liblua="no (header not found)"] ) - CFLAGS="$SAVE_CFLAGS" + CPPFLAGS="$SAVE_CPPFLAGS" fi if test "x$with_liblua" = "xyes"