From: Ruben Kerkhof Date: Thu, 11 Oct 2018 11:00:35 +0000 (+0200) Subject: Fix detection of xmmsctrl.h X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=8c311d6cd43c3517847ca0ad664ddd593ddb67b5;p=collectd.git Fix detection of xmmsctrl.h checking xmmsctrl.h usability... yes checking xmmsctrl.h presence... no configure: WARNING: xmmsctrl.h: accepted by the compiler, rejected by the preprocessor! configure: WARNING: xmmsctrl.h: proceeding with the compiler's result checking for xmmsctrl.h... yes checking for xmms_remote_get_info in -lxmms... yes AC_CHECK_HEADER uses the preprocessor, which doesn't look at CFLAGS. Use CPPFLAGS so it uses the right include path to look for xmmsctrl.h --- diff --git a/configure.ac b/configure.ac index e869a6a0..f39096e7 100644 --- a/configure.ac +++ b/configure.ac @@ -5524,15 +5524,15 @@ if test "x$with_libxmms" = "xyes"; then fi if test "x$with_libxmms" = "xyes"; then - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$with_xmms_cflags" + SAVE_CPPFLAGS="$CFLAGS" + CPPFLAGS="$with_xmms_cflags" AC_CHECK_HEADER([xmmsctrl.h], [with_libxmms="yes"], [with_libxmms="no"], ) - CFLAGS="$SAVE_CFLAGS" + CPPFLAGS="$SAVE_CPPFLAGS" fi if test "x$with_libxmms" = "xyes"; then