- 3.3*)
- lyx_flags="$lyx_flags concept-checks"
- dnl FIXME check whether this makes sense with clang/libc++
- AC_DEFINE(_GLIBCPP_CONCEPT_CHECKS, 1, [libstdc++ concept checking])
- ;;
- 3.4*|4.*)
- lyx_flags="$lyx_flags concept-checks"
- AC_DEFINE(_GLIBCXX_CONCEPT_CHECKS, 1, [libstdc++ concept checking])
- ;;
+ 4.0*|4.1*|4.2*)
+ if x$enable_cxx11 = xyes; then
+ AC_ERROR([There is no C++11 support in gcc 4.2 or older])
+ fi;;
+ 4.3*|4.4*|4.5*|4.6*)
+ dnl Note that this will define __GXX_EXPERIMENTAL_CXX0X__.
+ dnl The source code relies on that.
+ AM_CXXFLAGS="$AM_CXXFLAGS -std=c++0x";;
+ clang)
+ dnl presumably all clang version support c++11.
+ dnl the deprecated-register warning is very annoying with Qt4.x right now.
+ AM_CXXFLAGS="$AM_CXXFLAGS -std=c++11 -Wno-deprecated-register";;
+ *)
+ AS_CASE([$host], [*cygwin*],
+ [AM_CXXFLAGS="$AM_CXXFLAGS -std=gnu++11"],
+ [AM_CXXFLAGS="$AM_CXXFLAGS -std=c++11"]);;