From 67ac031a33b1621fdadb903422de598595cc08d2 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 30 Jun 2016 11:15:14 +0200 Subject: [PATCH] Gcc 6+ use C++14 as default, so there is no need to enforce C++11 Also, use gnu++11 unconditionnally with gcc as we used to do before 67385e69. --- config/lyxinclude.m4 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config/lyxinclude.m4 b/config/lyxinclude.m4 index 629247b3e5..59a375321b 100644 --- a/config/lyxinclude.m4 +++ b/config/lyxinclude.m4 @@ -373,7 +373,9 @@ if test x$GXX = xyes; then 4.6*) dnl Note that this will define __GXX_EXPERIMENTAL_CXX0X__. dnl The source code relies on that. - cxx11_flags="-std=c++0x";; + cxx11_flags="-std=gnu++0x";; + 4.7*|4.8*|4.9*|5.*) + cxx11_flags="-std=gnu++11";; clang-3.0*|clang-3.1*|clang-3.2*|clang-3.3*) dnl presumably all clang versions support c++11. dnl boost contains pragmas that are annoying on older clang versions @@ -383,10 +385,8 @@ if test x$GXX = xyes; then dnl which is very annoying with Qt4.x right now. cxx11_flags="-std=c++11" AM_CXXFLAGS="$AM_CXXFLAGS -Wno-deprecated-register";; - *) - AS_CASE([$host], [*cygwin*], - [cxx11_flags="-std=gnu++11"], - [cxx11_flags="-std=c++11"]);; + *) # gcc 6 and newer use C++14 as default + ;; esac # cxx11_flags is useful when running preprocessor alone # (see detection of regex). -- 2.39.5