[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - configure.ac

Jan Holesovsky kendy at collabora.com
Thu Aug 10 10:18:17 UTC 2017


 configure.ac |   38 ++++++++++++++++++++++++++++++--------
 1 file changed, 30 insertions(+), 8 deletions(-)

New commits:
commit 8508e78f6b114570a9900eb23ee4af185db249d0
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu Aug 10 09:50:36 2017 +0200

    We don't need that new autoconf.
    
    Also check for C++11 support, and remove an unneeded dlopen check (we check for
    dlopen earlier in the configure.ac).
    
    Change-Id: I76c25a25d22987ad6a1de309c3edd6ef2ea2b64d
    Reviewed-on: https://gerrit.libreoffice.org/40951
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/configure.ac b/configure.ac
index f187e78a..ddd46b8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,12 +1,12 @@
 # -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil -*-
 # Process this file with autoconf to produce a configure script.
 
-AC_PREREQ([2.69])
+AC_PREREQ([2.63])
 
 AC_INIT([loolwsd], [2.1.3], [libreoffice at lists.freedesktop.org])
 LT_INIT([shared, disable-static, dlopen])
 
-AM_INIT_AUTOMAKE([1.11 silent-rules subdir-objects tar-pax -Wno-portability])
+AM_INIT_AUTOMAKE([1.10 subdir-objects tar-pax -Wno-portability])
 
 AC_CONFIG_MACRO_DIR([m4])
 
@@ -165,6 +165,34 @@ CXXFLAGS="$CXXFLAGS -std=c++11"
 CXXFLAGS="$CXXFLAGS -Wall -Wextra -Werror -Wshadow"
 CFLAGS="$CFLAGS -Wall -Wextra -Werror"
 
+# check for C++11 support
+HAVE_CXX11=
+AC_MSG_CHECKING([whether $CXX supports C++14 or C++11])
+for flag in -std=gnu++14 -std=gnu++1y -std=c++14 -std=c++1y -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x ; do
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS $flag -Werror"
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+        #include <algorithm>
+        #include <functional>
+        #include <vector>
+        void f(std::vector<int> & v, std::function<bool(int, int)> fn) {
+            std::sort(v.begin(), v.end(), fn);
+        }
+        ]])],[CXXFLAGS_CXX11=$flag])
+    AC_LANG_POP([C++])
+    CXXFLAGS=$save_CXXFLAGS
+    if test -n "$CXXFLAGS_CXX11"; then
+        HAVE_CXX11=TRUE
+        break
+    fi
+done
+if test "$HAVE_CXX11" = TRUE; then
+    AC_MSG_RESULT([yes ($CXXFLAGS_CXX11)])
+else
+    AC_MSG_ERROR(no)
+fi
+
 with_lokit_path=`readlink -f $with_lokit_path`
 AS_IF([test -n "$with_lokit_path"],
       [CPPFLAGS="$CPPFLAGS -I${with_lokit_path}"])
@@ -224,12 +252,6 @@ AS_IF([test `uname -s` = Linux],
       [AS_IF([test -n "$with_cppunit_libs"],
              [LDFLAGS="$LDFLAGS -Wl,-rpath,${with_cppunit_libs}"])])
 
-AS_IF([test `uname -s` != Darwin],
-      [AC_SEARCH_LIBS([dlopen],
-                      [dl dld],
-                      [],
-                      [AC_MSG_ERROR([dlopen not found])])])
-
 AC_SEARCH_LIBS([png_create_write_struct],
                [png],
                [],


More information about the Libreoffice-commits mailing list