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: I4f01c2d658b75d27e11f90013198a4951c62b1f5
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/Makefile.am b/Makefile.am
index ede9703..a59ec07 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,12 +15,16 @@
liboemhandler_la_LDFLAGS = $(SYSTEMD_LIBS)\
$(SDBUSPLUS_LIBS) \
+ $(LIBIPMID_LIBS) \
+ $(LIBIPMID_HOST_LIBS) \
$(OPENPOWER_DBUS_INTERFACES_LIBS) \
$(PHOSPHOR_LOGGING_LIBS) \
-version-info 0:0:0 -shared
liboemhandler_la_CXXFLAGS = $(SYSTEMD_CFLAGS) \
$(SDBUSPLUS_CFLAGS) \
+ $(LIBIPMID_CFLAGS) \
+ $(LIBIPMID_HOST_CFLAGS) \
$(OPENPOWER_DBUS_INTERFACES_CFLAGS) \
$(PHOSPHOR_LOGGING_CFLAGS) \
$(AM_CXXFLAGS)
diff --git a/configure.ac b/configure.ac
index a73fd96..6aca76d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,7 @@
# Checks for header files.
AC_CHECK_HEADER(systemd/sd-bus.h, ,[AC_MSG_ERROR([Could not find systemd/sd-bus.h...systemd development package required])])
-AC_CHECK_HEADER(host-ipmid/ipmid-api.h, ,[AC_MSG_ERROR([Could not find host-ipmid/ipmid-api.h...host-ipmid package required])])
+PKG_CHECK_MODULES([LIBIPMID], [libipmid])
PKG_CHECK_MODULES([OPENPOWER_DBUS_INTERFACES], [openpower-dbus-interfaces])
PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus])
PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging])
diff --git a/host-interface.cpp b/host-interface.cpp
index e2c3cad..27d5e99 100644
--- a/host-interface.cpp
+++ b/host-interface.cpp
@@ -3,8 +3,8 @@
#include <chrono>
#include <functional>
#include <host-interface.hpp>
-#include <host-ipmid/ipmid-host-cmd-utils.hpp>
-#include <host-ipmid/ipmid-host-cmd.hpp>
+#include <ipmid-host/cmd-utils.hpp>
+#include <ipmid-host/cmd.hpp>
#include <oemhandler.hpp>
#include <phosphor-logging/log.hpp>
namespace open_power
diff --git a/host-interface.hpp b/host-interface.hpp
index c54e6ae..c4d3500 100644
--- a/host-interface.hpp
+++ b/host-interface.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include <host-ipmid/ipmid-host-cmd-utils.hpp>
+#include <ipmid-host/cmd-utils.hpp>
#include <org/open_power/Control/Host/server.hpp>
#include <sdbusplus/bus.hpp>
namespace open_power
diff --git a/local_users.cpp b/local_users.cpp
index d3ea159..ecf6024 100644
--- a/local_users.cpp
+++ b/local_users.cpp
@@ -2,7 +2,7 @@
#include "local_users.hpp"
-#include <host-ipmid/ipmid-host-cmd.hpp>
+#include <ipmid-host/cmd.hpp>
#include <phosphor-logging/log.hpp>
namespace local
diff --git a/local_users.hpp b/local_users.hpp
index ac9294f..b04156e 100644
--- a/local_users.hpp
+++ b/local_users.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
namespace local
{
diff --git a/oemhandler.cpp b/oemhandler.cpp
index bf40275..e35de77 100644
--- a/oemhandler.cpp
+++ b/oemhandler.cpp
@@ -6,7 +6,7 @@
#include "local_users.hpp"
#include <endian.h>
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
#include <stdio.h>
#include <string.h>
#include <systemd/sd-bus.h>
@@ -14,7 +14,7 @@
#include <fstream>
#include <functional>
#include <host-interface.hpp>
-#include <host-ipmid/ipmid-host-cmd.hpp>
+#include <ipmid-host/cmd.hpp>
#include <memory>
#include <org/open_power/Host/error.hpp>
#include <org/open_power/OCC/Metrics/error.hpp>
diff --git a/oemhandler.hpp b/oemhandler.hpp
index 01d5046..c6794b8 100644
--- a/oemhandler.hpp
+++ b/oemhandler.hpp
@@ -1,6 +1,6 @@
#pragma once
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
#include <stdint.h>
#include <map>