build: rename and simplify the -std checks for C++

Too much code duplication.

* m4/bison-cxx-std.m4: s/BISON_CXX_COMPILE_STDCXX/BISON_CXXSTD/.
(BISON_CXXSTD): New.
* configure.ac: Use it.
This commit is contained in:
Akim Demaille
2018-09-23 09:42:50 +02:00
parent 41ded58286
commit 5d0764d23b
2 changed files with 52 additions and 113 deletions

View File

@@ -73,12 +73,12 @@ AC_CACHE_CHECK([whether pragma GCC diagnostic push works],
AC_LANG_PUSH([C++])
gl_WARN_ADD([-fno-exceptions], [NO_EXCEPTIONS_CXXFLAGS])
BISON_CXX_COMPILE_STDCXX_98
BISON_CXX_COMPILE_STDCXX_03
BISON_CXX_COMPILE_STDCXX_11
BISON_CXX_COMPILE_STDCXX_14
BISON_CXX_COMPILE_STDCXX_17
BISON_CXX_COMPILE_STDCXX_2A
BISON_CXXSTD([98])
BISON_CXXSTD([03])
BISON_CXXSTD([11])
BISON_CXXSTD([14])
BISON_CXXSTD([17])
BISON_CXXSTD([2a])
AM_CONDITIONAL([ENABLE_CXX11], [test x"$CXX11_CXXFLAGS" != x])
AC_LANG_POP([C++])