From 1e7a6b6e31171d6cf6e1f425ea7033acddacdef7 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 18 May 2019 17:12:27 +0200 Subject: [PATCH] build system: test for and use -std=c++17 compiler flag if supported --- ac/c++-features.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ac/c++-features.m4 b/ac/c++-features.m4 index d7c0963af..6081624f7 100644 --- a/ac/c++-features.m4 +++ b/ac/c++-features.m4 @@ -1,10 +1,10 @@ AC_DEFUN([AX_CXX_STD_CXX_FLAG],[ - AC_CACHE_CHECK([for support for the "-std=c++14" flag], [ax_cv_std_cxx_flag],[ + AC_CACHE_CHECK([for support for the "-std=c++17" flag], [ax_cv_std_cxx_flag],[ AC_LANG_PUSH(C++) CXXFLAGS_SAVED="$CXXFLAGS" - for flag in gnu++14 c++14 gnu++11 c++11 c++0x; do + for flag in c++17 gnu++14 c++14 gnu++11 c++11 c++0x; do CXXFLAGS="$CXXFLAGS_SAVED -std=$flag" AC_TRY_COMPILE([], [true;], [ax_cv_std_cxx_flag="-std=$flag"], [ax_cv_std_cxx_flag="undecided"])