build: split out BMC dependencies
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ic891cbaa7c6b9c10afefc74fa62860e120f13b7d
diff --git a/configure.ac b/configure.ac
index ddf605d..e931713 100644
--- a/configure.ac
+++ b/configure.ac
@@ -48,14 +48,25 @@
# Checks for library functions.
LT_INIT # Required for systemd linking
-# Checks for libraries.
-PKG_CHECK_MODULES(
- [SDBUSPLUS],
- [sdbusplus],
- [AC_DEFINE(HAVE_SDBUSPLUS, [1], [Found openbmc/sdbusplus package])],
- [AC_MSG_ERROR([The openbmc/sdbusplus package is required])]
+# Enable building the host tool (default: yes)
+AC_ARG_ENABLE([build-host-tool],
+ AC_HELP_STRING([--disable-build-host-tool], [Disable building the host tool])
)
-PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging])
+AM_CONDITIONAL([BUILD_HOST_TOOL], [test "x$enable_build_host_tool" != "xno"])
+
+# If not building the host-tool, we're building the BMC.
+AS_IF([test "x$enable_build_host_tool" != "xyes"], [
+ PKG_CHECK_MODULES(
+ [SDBUSPLUS],
+ [sdbusplus],
+ [AC_DEFINE(HAVE_SDBUSPLUS, [1], [Found openbmc/sdbusplus package])],
+ [AC_MSG_ERROR([The openbmc/sdbusplus package is required])]
+ )
+
+ PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging])
+])
+
+# These packages are required for both the BMC and the host-tool.
PKG_CHECK_MODULES(
[IPMIBLOB],
[ipmiblob],
@@ -79,12 +90,6 @@
# Configurability
-# Enable building the host tool (default: yes)
-AC_ARG_ENABLE([build-host-tool],
- AC_HELP_STRING([--disable-build-host-tool], [Disable building the host tool])
-)
-AM_CONDITIONAL([BUILD_HOST_TOOL], [test "x$enable_build_host_tool" != "xno"])
-
# Enable the reboot update mechanism
AC_ARG_ENABLE([reboot-update],
AS_HELP_STRING([--enable-reboot-update],