[Libreoffice-commits] core.git: configure.ac

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Sep 11 18:19:17 UTC 2018


 configure.ac |   16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

New commits:
commit cb13f2ce1675053ecf925c7de20bf22f1249bc5a
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Sep 11 14:48:58 2018 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Sep 11 20:18:50 2018 +0200

    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 at redhat.com>

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)
 


More information about the Libreoffice-commits mailing list