From 6be593578a26854bbc2e373b562520412916c202 Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Wed, 24 Jan 2018 15:06:33 -0800 Subject: configure: Use pkg-config for CPPFLAGS If you build phosphor-dbus-interfaces against an sdbusplus that resides in a non-standard include location the configure system should still be able to locate the headers based on the pkg-config information. Since AC_CHECK_HEADERS uses the CPPFLAGS variable when calling `cpp` to check for headers, we need to temporarily add the CFLAGS provide by the sdbusplus module. This populates CPPFLAGS with the include prefixes necessary to find the headers for sdpbusplus. Change-Id: I1e3fc50daf5aa5e3025441d469db20fcc0f7f0b4 Signed-off-by: William A. Kennington III --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index ee42dbe..92b9b73 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,10 @@ AS_IF([test "x$enable_libphosphor_dbus" != "xno"], [ AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS]) # Checks for header files. + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$SDBUSPLUS_CFLAGS $CPPFLAGS" AC_CHECK_HEADER(sdbusplus/server.hpp, ,[AC_MSG_ERROR([Could not find sdbusplus/server.hpp...sdbusplus package required])]) + CPPFLAGS="$old_CPPFLAGS" # Checks for library functions. LT_INIT([dlopen disable-static shared]) -- cgit v1.2.1