Commit 5a124ea0 authored by Joel Stanley's avatar Joel Stanley

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: default avatarJoel Stanley <joel@jms.id.au>
parent fab672bd
......@@ -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])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment