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: I7dfdf4ce6364a29b5bbc0696adc1e695651fbe1c
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/Makefile.am b/Makefile.am
index 4090b70..0bc2b36 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,10 +12,12 @@
libsyscmds_la_LDFLAGS = \
$(SDBUSPLUS_LIBS) \
$(PHOSPHOR_LOGGING_LIBS) \
+ $(LIBIPMID_LIBS) \
-lstdc++fs \
-version-info 0:0:0 -shared
libsyscmds_la_CXXFLAGS = \
$(SDBUSPLUS_CFLAGS) \
$(PHOSPHOR_LOGGING_CFLAGS) \
+ $(LIBIPMID_CFLAGS) \
-flto
diff --git a/cable.hpp b/cable.hpp
index 6ed5418..ce20226 100644
--- a/cable.hpp
+++ b/cable.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
namespace google
{
diff --git a/configure.ac b/configure.ac
index d09a891..47931f2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,16 +29,18 @@
[],
[AC_MSG_ERROR([The openbmc/phosphor-logging package is required])]
)
+PKG_CHECK_MODULES(
+ [LIBIPMID],
+ [libipmid],
+ [],
+ [AC_MSG_ERROR([Could not find libipmid...openbmc/phosphor-host-ipmid package required])]
+)
AC_CHECK_HEADER(
experimental/filesystem,
[],
[AC_MSG_ERROR([Could not find experimental/filesystem...libstdc++fs developement package required])]
)
AC_CHECK_HEADER(
- [host-ipmid],
- [AC_MSG_ERROR(["phosphor-host-ipmid required and not found."])]
-)
-AC_CHECK_HEADER(
nlohmann/json.hpp,
[],
[AC_MSG_ERROR([Could not find nlohmann/json.hpp])]
diff --git a/cpld.hpp b/cpld.hpp
index 8c8604f..01550fe 100644
--- a/cpld.hpp
+++ b/cpld.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
namespace google
{
diff --git a/entity_name.hpp b/entity_name.hpp
index 3b4cd89..a1bc9f4 100644
--- a/entity_name.hpp
+++ b/entity_name.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
namespace google
{
diff --git a/eth.hpp b/eth.hpp
index d9ddf95..fbd06ca 100644
--- a/eth.hpp
+++ b/eth.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
namespace google
{
diff --git a/main.cpp b/main.cpp
index 673174a..fce8c54 100644
--- a/main.cpp
+++ b/main.cpp
@@ -23,12 +23,12 @@
#include "pcie_i2c.hpp"
#include "psu.hpp"
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
#include <cstdint>
#include <cstdio>
-#include <host-ipmid/iana.hpp>
-#include <host-ipmid/oemrouter.hpp>
+#include <ipmid/iana.hpp>
+#include <ipmid/oemrouter.hpp>
namespace oem
{
diff --git a/pcie_i2c.hpp b/pcie_i2c.hpp
index 6150226..3985698 100644
--- a/pcie_i2c.hpp
+++ b/pcie_i2c.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
namespace google
{
diff --git a/psu.hpp b/psu.hpp
index b2c7fbb..bbbc963 100644
--- a/psu.hpp
+++ b/psu.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
namespace google
{