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: I1447474a97578e74cda028474c1cff830e9a23aa
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/Makefile.am b/Makefile.am
index f63be84..ac68e5e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,8 +5,10 @@
 libethstatscmd_la_SOURCES = main.cpp
 
 libethstatscmd_la_LDFLAGS = \
+	$(LIBIPMID_LIBS) \
 	-lstdc++fs \
 	-version-info 0:0:0 -shared
 
 libethstatscmd_la_CXXFLAGS = \
+	$(LIBIPMID_CFLAGS) \
 	-flto
diff --git a/configure.ac b/configure.ac
index d7987c9..b2fa58d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,7 +17,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])
 AC_CHECK_HEADER(experimental/filesystem, ,[AC_MSG_ERROR([Could not find experimental/filesystem...libstdc++fs developement package required])])
 
 # Checks for library functions.
diff --git a/main.cpp b/main.cpp
index 3c17b37..edac802 100644
--- a/main.cpp
+++ b/main.cpp
@@ -18,15 +18,15 @@
 
 #include "ethstats.hpp"
 
-#include <host-ipmid/ipmid-api.h>
+#include <ipmid/api.h>
 
 #include <cstdint>
 #include <cstring>
 #include <experimental/filesystem>
 #include <fstream>
-#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 <sstream>
 #include <string>