diff options
author | William A. Kennington III <wak@google.com> | 2018-01-24 15:06:33 -0800 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-02-01 05:17:23 +0000 |
commit | 6be593578a26854bbc2e373b562520412916c202 (patch) | |
tree | c15c9f76a9aab54d8069c49fae5edf617375895c /configure.ac | |
parent | 862ac59a52945ada1a6e641ab625dc18ec614192 (diff) | |
download | phosphor-dbus-interfaces-6be593578a26854bbc2e373b562520412916c202.tar.gz phosphor-dbus-interfaces-6be593578a26854bbc2e373b562520412916c202.zip |
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 <wak@google.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 3 |
1 files changed, 3 insertions, 0 deletions
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]) |