[Libreoffice-commits] core.git: configure.ac
LuboÅ¡ LuÅák
l.lunak at suse.cz
Thu Jun 13 11:19:54 PDT 2013
configure.ac | 46 ++++++++++++++++++++++++++++------------------
1 file changed, 28 insertions(+), 18 deletions(-)
New commits:
commit 03af6cb62986cc99995a6bdc5f1fb9a99ff4b7fe
Author: LuboÅ¡ LuÅák <l.lunak at suse.cz>
Date: Thu Jun 13 20:17:51 2013 +0200
do not override C++11 decision made for libc++ on macosx
Removed in 44159c6cdf3127ef8ee628f07f3f2d38a93dc3b2 , but since it's
set in CXX, this either has to pass, or it has to fail (or it shouldn't
be hardcoded the way it is).
Change-Id: If5b7b7096927f5d97c7c744cbbfea08e90f1de55
diff --git a/configure.ac b/configure.ac
index 4b47a3e..d834260 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5564,22 +5564,28 @@ HAVE_CXX11=
if test "$GCC" = "yes"; then
CXXFLAGS_CXX11=
AC_MSG_CHECKING([whether $CXX supports C++11])
- for flag in -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([[void f() {}]])],[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)])
+ if test "$CPP_LIBRARY" = LIBCPP -a $_os = Darwin; then
+ : Already set CXX to contain -std=c++11
+ HAVE_CXX11=TRUE
+ AC_MSG_RESULT(yes)
else
- AC_MSG_RESULT(no)
+ for flag in -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([[void f() {}]])],[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_RESULT(no)
+ fi
fi
if test "$HAVE_CXX11" = TRUE; then
@@ -5684,9 +5690,13 @@ return !(i != 0 && j != 0);
CXXFLAGS=$save_CXXFLAGS
fi
- if test "$HAVE_CXX11" != "TRUE" -a -n "$CXXFLAGS_CXX11"; then
- AC_MSG_NOTICE([Disabling C++11 support])
- CXXFLAGS_CXX11=
+ if test "$HAVE_CXX11" != "TRUE"; then
+ if test -n "$CXXFLAGS_CXX11"; then
+ AC_MSG_NOTICE([Disabling C++11 support])
+ CXXFLAGS_CXX11=
+ elif test "$CPP_LIBRARY" = LIBCPP -a $_os = Darwin; then
+ AC_MSG_ERROR([Selected libc++ but C++11 support broken])
+ fi
fi
fi
More information about the Libreoffice-commits
mailing list