Convert host-ipmid -> libipmid
phosphor-host-ipmid now exposes a library along with headers for
interfacing with the ipmi daemon. Compile and link against the new
library.
Change-Id: I4b4ebed47aad96d6a73dec2f8cda52569e8c2e9e
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/Makefile.am b/Makefile.am
index 04e71f7..4be2117 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,6 +6,8 @@
libi2ccmds_la_SOURCES = i2c.cpp
libi2ccmds_la_LDFLAGS = \
+ $(LIBIPMID_LIBS)
-version-info 0:0:0 -shared
-libi2ccmds_la_CXXFLAGS = -flto
+libi2ccmds_la_CXXFLAGS = -flto \
+ $(LIBIPMID_CFLAGS)
diff --git a/configure.ac b/configure.ac
index f742e4e..360e9f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,7 +19,7 @@
AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])
# Checks for libraries.
-AC_CHECK_HEADER([host-ipmid], [AC_MSG_ERROR(["phosphor-host-ipmid required and not found."])])
+PKG_CHECK_MODULES([LIBIPMID], [libipmid])
# We require linux i2c functionality
AC_CHECK_HEADERS([linux/i2c-dev.h], [], [
diff --git a/i2c.cpp b/i2c.cpp
index 10cf617..ff5a66b 100644
--- a/i2c.cpp
+++ b/i2c.cpp
@@ -25,8 +25,8 @@
#include <array>
#include <cerrno>
#include <cstring>
-#include <host-ipmid/iana.hpp>
-#include <host-ipmid/oemopenbmc.hpp>
+#include <ipmid/iana.hpp>
+#include <ipmid/oemopenbmc.hpp>
#include <memory>
namespace oem
diff --git a/i2c.hpp b/i2c.hpp
index 105dfbe..652a678 100644
--- a/i2c.hpp
+++ b/i2c.hpp
@@ -1,9 +1,9 @@
#pragma once
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
#include <cstdint>
-#include <host-ipmid/oemrouter.hpp>
+#include <ipmid/oemrouter.hpp>
using std::uint8_t;