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: I747c3a585d646c7ff54efb14968c8f04daafe071
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/Makefile.am b/Makefile.am
index 0484a89..264ae1c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -91,11 +91,13 @@
 	$(SYSTEMD_LIBS) \
 	$(PHOSPHOR_DBUS_INTERFACES_LIBS) \
 	$(PHOSPHOR_LOGGING_LIBS) \
+	$(LIBIPMID_LIBS) \
 	-version-info 0:0:0 -shared
 libmanualcmds_la_CXXFLAGS = \
 	$(SYSTEMD_CFLAGS) \
 	$(PHOSPHOR_DBUS_INTERFACES_CFLAGS) \
 	$(PHOSPHOR_LOGGING_CFLAGS) \
+	$(LIBIPMID_CFLAGS) \
 	-flto
 
 SUBDIRS = . test
diff --git a/configure.ac b/configure.ac
index 1cc46ce..63b6dec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,9 +45,11 @@
     [],
     [AC_MSG_ERROR(["phosphor-dbus-interfaces required and not found."])]
 )
-AC_CHECK_HEADER(
-    [host-ipmid],
-    [AC_MSG_ERROR(["phosphor-host-ipmid required and not found."])]
+PKG_CHECK_MODULES(
+    [LIBIPMID],
+    [libipmid],
+    [],
+    [AC_MSG_ERROR([Could not find libipmid...openbmc/phosphor-host-ipmid package required])]
 )
 AC_CHECK_HEADER(
     experimental/filesystem,
diff --git a/ipmi/manualcmds.cpp b/ipmi/manualcmds.cpp
index 652f947..415262e 100644
--- a/ipmi/manualcmds.cpp
+++ b/ipmi/manualcmds.cpp
@@ -14,11 +14,11 @@
  * limitations under the License.
  */
 
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
 
-#include <host-ipmid/iana.hpp>
-#include <host-ipmid/oemopenbmc.hpp>
-#include <host-ipmid/oemrouter.hpp>
+#include <ipmid/iana.hpp>
+#include <ipmid/oemopenbmc.hpp>
+#include <ipmid/oemrouter.hpp>
 #include <map>
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/message.hpp>