configure.ac | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-)
New commits: commit 4be7a6cb166161a5c981f706b460a191984a4c80 Author: Jan Holesovsky <ke...@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/40952 Reviewed-by: Jan Holesovsky <ke...@collabora.com> Tested-by: Jan Holesovsky <ke...@collabora.com> diff --git a/configure.ac b/configure.ac index 2c22e887..8fbe8e9c 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], [master], [libreoffice@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}"]) @@ -225,12 +253,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], [], _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits