diff configure.ac @ 23664:af611609c6a4

configure: ensure that the C++ compiler supports C++11 * configure.ac: Ensure that AC_PROG_CXX detects that the compiler fully supports C++11, exit with an error if not.
author Mike Miller <mtmiller@octave.org>
date Tue, 20 Jun 2017 18:02:54 -0700
parents 9da88b901984
children 94a4ba7b0d94
line wrap: on
line diff
--- a/configure.ac	Tue Jun 20 18:28:23 2017 -0400
+++ b/configure.ac	Tue Jun 20 18:02:54 2017 -0700
@@ -398,6 +398,14 @@
 AC_PROG_CPP
 AC_PROG_GCC_TRADITIONAL
 
+## Ensure that the C++ compiler fully supports C++11.
+dnl Test must occur after calling AC_PROG_CXX, which tests for language features
+dnl and sets the shell variable ac_cv_prog_cxx_cxx11 appropriately.
+
+if test x"$ac_cv_prog_cxx_cxx11" = xno; then
+  AC_MSG_ERROR([a compiler that fully supports C++11 is required to build Octave])
+fi
+
 ## Save and restore CFLAGS and CXXFLAGS globally.  These variables
 ## are for users, so we shouldn't be touching them.  Instead, we should
 ## set the corresponding AM_ flags (currently by way of the XTRA_ variables).