[Spice-devel] [spice-streaming-agent PATCH] build: Error out on missing AX_CXX_COMPILE_STDCXX_11

Uri Lublin uril at redhat.com
Thu May 31 23:42:30 UTC 2018


From: Christophe Fergeau <cfergeau at redhat.com>

A missing AX_CXX_COMPILE_STDCXX_11 at autoreconf time will only trigger
a non-fatal "command not found" when configure runs, but then
compilation will unexpectedly fail unless -std=c++11 is added to the
CXXFLAGS.
This commit makes sure we error out at autoreconf time when the macro
is unknown.

Acked-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Uri Lublin <uril at redhat.com>
---
 configure.ac | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index 699dc3b..407f17b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,6 +18,7 @@ if test x"$ac_cv_prog_cc_c99" = xno; then
 fi
 AC_PROG_CXX
 AC_LANG(C++)
+m4_ifndef([AX_CXX_COMPILE_STDCXX_11], [m4_fatal([Missing AX_CXX_COMPILE_STDCXX_11, install autoconf-archive])])
 AX_CXX_COMPILE_STDCXX_11
 AC_PROG_INSTALL
 AC_CANONICAL_HOST
-- 
2.17.0



More information about the Spice-devel mailing list