build: ensure C++14 is selected
The expectation is that --enable-libsdbusplus is default, but the
configure script had it default in some conditions and not default
in others. As a result, if you left off --enable-libsdbusplus, C++14
support was not enabled.
Fix this by making sure all conditions based on configure flags use
the same logic rather then checking against 'yes' in some cases and
'no' in others.
Change-Id: Ic658047c97aa266456c717fa605a4f4741fe94a7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/configure.ac b/configure.ac
index cb613b8..f1c9995 100644
--- a/configure.ac
+++ b/configure.ac
@@ -36,11 +36,11 @@
AM_CONDITIONAL([WANT_LIBSDBUSPLUS], [test "x$enable_libsdbusplus" != "xno"])
# Checks for header files.
-AS_IF([test "x$enable_libsdbusplus" = "xyes"],
+AS_IF([test "x$enable_libsdbusplus" != "xno"],
[AC_CHECK_HEADER(systemd/sd-bus.h, ,[AC_MSG_ERROR([Could not find systemd/sd-bus.h...systemd developement package required])])])
# Checks for typedefs, structures, and compiler characteristics.
-AS_IF([test "x$enable_libsdbusplus" = "xyes"],
+AS_IF([test "x$enable_libsdbusplus" != "xno"],
[AX_CXX_COMPILE_STDCXX_14([noext])])
AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CFLAGS])
AX_APPEND_COMPILE_FLAGS([-Wall -Werror], [CXXFLAGS])