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

Stephan Bergmann sbergman at redhat.com
Thu Feb 23 11:52:03 UTC 2017


 configure.ac |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

New commits:
commit cd23b010a2531c86ee7ec70c80ca6afb01f85ab8
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Feb 23 12:50:19 2017 +0100

    Don't check HAVE_GCC_ATTRIBUTE_WARN_UNUSED on MSVC
    
    ...where -Werror -Wunknown-pragmas command line arguments will trivially make
    the test always fail, anyway
    
    Change-Id: Iae5534054331d41508f39d5cf141803ab5bc8ba7

diff --git a/configure.ac b/configure.ac
index d7532cb..7f2bfb7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6041,20 +6041,20 @@ if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
             AC_MSG_RESULT([yes])])
     CXXFLAGS=$save_CXXFLAGS
     AC_LANG_POP([C++])
-fi
 
-AC_MSG_CHECKING([whether $CXX supports __attribute__((warn_unused))])
-AC_LANG_PUSH([C++])
-save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="$CXXFLAGS -Werror -Wunknown-pragmas"
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-        struct __attribute__((warn_unused)) dummy {};
-    ])], [
-        AC_DEFINE([HAVE_GCC_ATTRIBUTE_WARN_UNUSED],[1])
-        AC_MSG_RESULT([yes])
-    ], [AC_MSG_RESULT([no])])
-CXXFLAGS=$save_CXXFLAGS
+    AC_MSG_CHECKING([whether $CXX supports __attribute__((warn_unused))])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS -Werror -Wunknown-pragmas"
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            struct __attribute__((warn_unused)) dummy {};
+        ])], [
+            AC_DEFINE([HAVE_GCC_ATTRIBUTE_WARN_UNUSED],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    CXXFLAGS=$save_CXXFLAGS
 AC_LANG_POP([C++])
+fi
 
 AC_SUBST(HAVE_GCC_AVX)
 AC_SUBST(HAVE_GCC_STACK_PROTECTOR_STRONG)


More information about the Libreoffice-commits mailing list