configure: put c++ cruft behind virtual pnor check
When building outside of OpenBMC, none of the C++ libraries are
required.
Change-Id: I0677b13c373492977301cd6f1db9753a3a0fcb54
Signed-off-by: Joel Stanley <joel@jms.id.au>
diff --git a/configure.ac b/configure.ac
index 4613316..10c8d06 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,15 +25,6 @@
AX_APPEND_COMPILE_FLAGS([-fpic -Wall], [CFLAGS])
AX_APPEND_COMPILE_FLAGS([-fpic -Wall], [CXXFLAGS])
-PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],,\
-AC_MSG_ERROR(["Requires sdbusplus package."]))
-
-PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\
-AC_MSG_ERROR(["Requires phosphor-logging package."]))
-
-AX_PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [],[phosphor-dbus-interfaces],\
-[], [AC_MSG_ERROR(["phosphor-dbus-interfaces required and not found."])])
-
# Checks for library functions.
LT_INIT # Removes 'unrecognized options: --with-libtool-sysroot'
@@ -60,6 +51,15 @@
)
AS_IF([test "x$enable_virtual_pnor" == "xyes"],
[
+ PKG_CHECK_MODULES([SDBUSPLUS], [sdbusplus],,\
+ AC_MSG_ERROR(["Requires sdbusplus package."]))
+
+ PKG_CHECK_MODULES([PHOSPHOR_LOGGING], [phosphor-logging],,\
+ AC_MSG_ERROR(["Requires phosphor-logging package."]))
+
+ AX_PKG_CHECK_MODULES([PHOSPHOR_DBUS_INTERFACES], [],[phosphor-dbus-interfaces],\
+ [], [AC_MSG_ERROR(["phosphor-dbus-interfaces required and not found."])])
+
AM_CONDITIONAL(VIRTUAL_PNOR_ENABLED, true)
AX_APPEND_COMPILE_FLAGS([-DVIRTUAL_PNOR_ENABLED], [CXXFLAGS])
AX_APPEND_COMPILE_FLAGS([-DVIRTUAL_PNOR_ENABLED], [CFLAGS])