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: Ib222df1605afe277457f34eb69a3d65c663325b7
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/Makefile.am b/Makefile.am
index 41daebb..1dd50c3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -28,15 +28,18 @@
libwritefrudata_la_CXXFLAGS = $(SYSTEMD_CFLAGS) \
$(libmapper_CFLAGS) \
$(SDBUSPLUS_CFLAGS) \
- $(PHOSPHOR_LOGGING_CFLAGS)
+ $(PHOSPHOR_LOGGING_CFLAGS) \
+ $(LIBIPMID_CFLAGS)
libstrgfnhandlerdir = ${libdir}/ipmid-providers
libstrgfnhandler_LTLIBRARIES = libstrgfnhandler.la
libstrgfnhandler_la_SOURCES = strgfnhandler.cpp
libstrgfnhandler_la_LDFLAGS = $(PHOSPHOR_LOGGING_LIBS) \
+ $(LIBIPMID_LIBS) \
-version-info 1:0:0 -shared
libstrgfnhandler_la_LIBADD = libwritefrudata.la
-libstrgfnhandler_la_CXXFLAGS = $(PHOSPHOR_LOGGING_CFLAGS)
+libstrgfnhandler_la_CXXFLAGS = $(PHOSPHOR_LOGGING_CFLAGS) \
+ $(LIBIPMID_CFLAGS)
fru-gen.cpp:
$(AM_V_GEN)@FRUGEN@ -o $(top_builddir) generate-cpp
diff --git a/configure.ac b/configure.ac
index 4796d73..7ee9a75 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,10 +23,10 @@
PKG_CHECK_MODULES([SYSTEMD], [libsystemd >= 221])
PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus])
PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging])
+PKG_CHECK_MODULES([LIBIPMID], [libipmid])
# 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])])
# Checks for typedefs, structures, and compiler characteristics.
AX_CXX_COMPILE_STDCXX_17([noext])
diff --git a/strgfnhandler.cpp b/strgfnhandler.cpp
index 1c7e047..9ba2ad3 100644
--- a/strgfnhandler.cpp
+++ b/strgfnhandler.cpp
@@ -1,6 +1,6 @@
#include "writefrudata.hpp"
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
#include <unistd.h>
#include <cstdio>
diff --git a/writefrudata.cpp b/writefrudata.cpp
index dbf96cb..b351c57 100644
--- a/writefrudata.cpp
+++ b/writefrudata.cpp
@@ -4,7 +4,7 @@
#include "frup.hpp"
#include "types.hpp"
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
#include <unistd.h>
#include <algorithm>