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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Sep 6 09:41:37 UTC 2018


 configure.ac |   45 ++++++++++++++++++++++++++-------------------
 1 file changed, 26 insertions(+), 19 deletions(-)

New commits:
commit 247d0795312fdb8b1bfc68bf9e0d33459dbfeb63
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Sep 6 10:03:36 2018 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Sep 6 11:41:10 2018 +0200

    Make AC_LINK_IFELSE (to check HAVE_CPP_INLINE_VARIABLES) work on Windows
    
    Change-Id: I6c71e079f21093d5f8dc4dbca20624e9fc927882
    Reviewed-on: https://gerrit.libreoffice.org/60072
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/configure.ac b/configure.ac
index ebf8b01ac657..9861188660e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6433,25 +6433,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
 CXXFLAGS=$save_CXXFLAGS
 AC_LANG_POP([C++])
 
-AC_MSG_CHECKING([whether $CXX supports inline variables])
-AC_LANG_PUSH([C++])
-save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
-AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-        #if !defined __cpp_inline_variables
-        // This tests for one specific aspect of inline variables that is actually used by
-        // ORegistry::ROOT (registry/source/regimpl.cxx):
-        struct S { constexpr S() {} };
-        struct T { static constexpr S s{}; };
-        S const * f() { return &T::s; }
-        #endif
-    ]])], [
-        AC_DEFINE([HAVE_CPP_INLINE_VARIABLES],[1])
-        AC_MSG_RESULT([yes])
-    ], [AC_MSG_RESULT([no])])
-CXXFLAGS=$save_CXXFLAGS
-AC_LANG_POP([C++])
-
 AC_MSG_CHECKING([whether $CXX has a fix for CWG1579])
 AC_LANG_PUSH([C++])
 save_CXXFLAGS=$CXXFLAGS
@@ -12435,6 +12416,32 @@ if test "$build_os" = "cygwin"; then
     AC_SUBST(ILIB)
 fi
 
+AC_MSG_CHECKING([whether $CXX supports inline variables])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+if test "$build_os" = cygwin; then
+    save_LIB=$LIB
+    export LIB=$ILIB
+fi
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+        #if !defined __cpp_inline_variables
+        // This tests for one specific aspect of inline variables that is actually used by
+        // ORegistry::ROOT (registry/source/regimpl.cxx):
+        struct S { constexpr S() {} };
+        struct T { static constexpr S s{}; };
+        S const * f() { return &T::s; }
+        #endif
+    ]])], [
+        AC_DEFINE([HAVE_CPP_INLINE_VARIABLES],[1])
+        AC_MSG_RESULT([yes])
+    ], [AC_MSG_RESULT([no])])
+CXXFLAGS=$save_CXXFLAGS
+if test "$build_os" = cygwin; then
+    LIB=$save_LIB
+fi
+AC_LANG_POP([C++])
+
 dnl We should be able to drop the below check when bumping the GCC baseline to
 dnl 4.9, as <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54577>
 dnl "deque<T>::erase() still takes iterator instead of const_iterator" should be


More information about the Libreoffice-commits mailing list