summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-12-05 11:46:42 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-12-05 18:14:33 +0100
commitea4964ed25d24f83b01628766d5908e1ff4a346b (patch)
tree7881e3381328f2550a9969312330c56b794491cb /configure.ac
parent306ddfb1b87d94a343e8e2b6b9270ca682f92ac3 (diff)
Disable C++17 when system libcmis headers contain dynamic exception specs
Change-Id: I7b94e784a3e145aa7c8a910ee08034d6ff9b2693 Reviewed-on: https://gerrit.libreoffice.org/45869 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac40
1 files changed, 28 insertions, 12 deletions
diff --git a/configure.ac b/configure.ac
index 841428971511..2e3785e30b8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5980,6 +5980,18 @@ fi
AC_SUBST(GPERF)
dnl ===================================================================
+dnl Check for system libcmis
+dnl ===================================================================
+# libcmis requires curl and we can't build curl for iOS
+if test $_os != iOS; then
+ libo_CHECK_SYSTEM_MODULE([libcmis],[LIBCMIS],[libcmis-0.5 >= 0.5.0])
+ ENABLE_LIBCMIS=TRUE
+else
+ ENABLE_LIBCMIS=
+fi
+AC_SUBST(ENABLE_LIBCMIS)
+
+dnl ===================================================================
dnl C++11
dnl ===================================================================
@@ -6007,6 +6019,9 @@ elif test "$GCC" = "yes"; then
for flag in $my_flags; do
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $flag -Werror"
+ if test "$SYSTEM_LIBCMIS" = TRUE; then
+ CXXFLAGS="$CXXFLAGS -DSYSTEM_LIBCMIS $LIBCMIS_CFLAGS"
+ fi
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <algorithm>
@@ -6022,6 +6037,19 @@ elif test "$GCC" = "yes"; then
#include "conftest.inc"
#pragma GCC diagnostic pop
+ #if defined SYSTEM_LIBCMIS
+ // See ucb/source/ucp/cmis/auth_provider.hxx:
+ #if __GNUC__ >= 7
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wdeprecated"
+ #pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
+ #endif
+ #include <libcmis/libcmis.hxx>
+ #if __GNUC__ >= 7
+ #pragma GCC diagnostic pop
+ #endif
+ #endif
+
void f(std::vector<int> & v, std::function<bool(int, int)> fn) {
std::sort(v.begin(), v.end(), fn);
}
@@ -7743,18 +7771,6 @@ libo_CHECK_SYSTEM_MODULE([libstaroffice],[STAROFFICE],[libstaroffice-0.0])
libo_PKG_VERSION([STAROFFICE], [libstaroffice-0.0], [0.0.4])
dnl ===================================================================
-dnl Check for system libcmis
-dnl ===================================================================
-# libcmis requires curl and we can't build curl for iOS
-if test $_os != iOS; then
- libo_CHECK_SYSTEM_MODULE([libcmis],[LIBCMIS],[libcmis-0.5 >= 0.5.0])
- ENABLE_LIBCMIS=TRUE
-else
- ENABLE_LIBCMIS=
-fi
-AC_SUBST(ENABLE_LIBCMIS)
-
-dnl ===================================================================
dnl Check for system lcms2
dnl ===================================================================
if test "$with_system_lcms2" != "yes"; then