build: split up package checks by what is being built

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I932c4c7d6470aa785778f016324c8ccb188ec338
diff --git a/configure.ac b/configure.ac
index 1393041..5e37e59 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,8 +60,8 @@
 )
 AM_CONDITIONAL([BUILD_BMC_HANDLER], [test "x$enable_build_bmc_blob_handler" != "xno"])
 
-# If not building the host-tool, we're building the BMC.
-AS_IF([test "x$enable_build_host_tool" != "xyes"], [
+# Build the BMC by default, so check if set to no.
+AS_IF([test "x$enable_build_bmc_blob_handler" != "xno"], [
     PKG_CHECK_MODULES(
         [SDBUSPLUS],
         [sdbusplus],
@@ -78,6 +78,16 @@
     )
 ])
 
+# If not building the host-tool, we're building the BMC.
+AS_IF([test "x$enable_build_host_tool" != "xno"], [
+    PKG_CHECK_MODULES(
+        [PCILIB],
+        [libpci],
+        [],
+        [AC_MSG_ERROR([Could not find libpci... pciutils package required])]
+    )
+])
+
 # These packages are required for both the BMC and the host-tool.
 PKG_CHECK_MODULES(
     [IPMIBLOB],
@@ -87,12 +97,6 @@
         [Could not find ipmiblob...openbmc/ipmi-blob-tool package required])
     ]
 )
-PKG_CHECK_MODULES(
-    [PCILIB],
-    [libpci],
-    [],
-    [AC_MSG_ERROR([Could not find libpci... pciutils package required])]
-)
 AX_PTHREAD([], [AC_MSG_ERROR(["pthread required and not found"])])
 
 # Configurability