diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-09-11 14:48:58 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-09-11 20:18:50 +0200 |
commit | cb13f2ce1675053ecf925c7de20bf22f1249bc5a (patch) | |
tree | b3ba4ab0a5b933349e684986e4a43a0248771b77 /configure.ac | |
parent | 01dc9413e1dbc5206f67ede8c6bb81f0eac73dc2 (diff) |
Consolidate C++11 checks for MSVC and GCC/Clang
Change-Id: I2ca35093d804f85dc44d332b09efed9655dcd40c
Reviewed-on: https://gerrit.libreoffice.org/60311
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index c2f9a22a7892..d6560b1d4073 100644 --- a/configure.ac +++ b/configure.ac @@ -6177,14 +6177,11 @@ libo_FUZZ_ARG_ENABLE(c++17, [Do not attempt to run GCC/Clang in C++17 mode (needed for Coverity).]) ) +AC_MSG_CHECKING([whether $CXX supports C++17, C++14, or C++11]) CXXFLAGS_CXX11= if test "$COM" = MSC -a "$COM_IS_CLANG" != TRUE; then - AC_MSG_CHECKING([whether $CXX supports C++11]) - AC_MSG_RESULT(yes) CXXFLAGS_CXX11=-std:c++17 elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then - HAVE_CXX11= - AC_MSG_CHECKING([whether $CXX supports C++17, C++14, or C++11]) dnl But only use C++17 if the gperf that is being used knows not to emit dnl "register" in C++ output: printf 'foo\n' | $GPERF -L C++ > conftest.inc @@ -6266,16 +6263,15 @@ elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then AC_LANG_POP([C++]) CXXFLAGS=$save_CXXFLAGS if test -n "$CXXFLAGS_CXX11"; then - HAVE_CXX11=TRUE break fi done rm conftest.inc - if test "$HAVE_CXX11" = TRUE; then - AC_MSG_RESULT([yes ($CXXFLAGS_CXX11)]) - else - AC_MSG_ERROR(no) - fi +fi +if test -n "$CXXFLAGS_CXX11"; then + AC_MSG_RESULT([yes ($CXXFLAGS_CXX11)]) +else + AC_MSG_ERROR(no) fi AC_SUBST(CXXFLAGS_CXX11) |