From 5a124ea01282f27ec28f6ce801dd1a523bc7b1ad Mon Sep 17 00:00:00 2001 From: Joel Stanley Date: Wed, 12 Sep 2018 13:49:22 +0930 Subject: 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 --- configure.ac | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 4613316..10c8d06 100644 --- a/configure.ac +++ b/configure.ac @@ -25,15 +25,6 @@ AX_CXX_COMPILE_STDCXX(17, [noext], [mandatory]) 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 @@ AC_ARG_ENABLE([virtual-pnor], ) 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]) -- cgit v1.2.1