tools/pci: refactor PCI bridge

Use polymorphism to handle the differences between Aspeed and Nuvoton
PCI devices.

Add unit tests (now at 100% line coverage for tools/pci.cpp).

Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Change-Id: I43e63ec5eb9fce5fb0fc74e0e69667dd13b7433f
diff --git a/configure.ac b/configure.ac
index 94ed8b7..0ed6517 100644
--- a/configure.ac
+++ b/configure.ac
@@ -128,6 +128,18 @@
         [],
         [AC_MSG_ERROR([Could not find libpciaccess... pciaccess package required])]
     )
+    PKG_CHECK_MODULES(
+        [STDPLUS],
+        [stdplus],
+        [],
+        [AC_MSG_ERROR([Could not find stdplus... openbmc/stdplus package required])]
+    )
+    PKG_CHECK_MODULES(
+        [FMT],
+        [fmt],
+        [],
+        [AC_MSG_ERROR([Could not find fmt... fmtlib/fmt package required])]
+    )
 ])
 
 # These packages are required for both the BMC and the host-tool.