+ if test x$enable_cxx11 = xyes ; then
+ case $gxx_version in
+ 3.*|4.0*|4.1*|4.2*) AC_ERROR([There is no C++11 support in gcc 3.x]);;
+ 4.3*|4.4*|4.5*|4.6*)
+ lyx_flags="$lyx_flags c++11-mode"
+ AM_CXXFLAGS="$AM_CXXFLAGS -std=gnu++0x";;
+ clang)
+ dnl presumably all clang version support c++11.
+ lyx_flags="$lyx_flags c++11-mode"
+ dnl the deprecated-register warning is very annoying with Qt4.x right now.
+ AM_CXXFLAGS="$AM_CXXFLAGS -std=c++11 -Wno-deprecated-register";;
+ *)
+ lyx_flags="$lyx_flags c++11-mode"
+ AM_CXXFLAGS="$AM_CXXFLAGS -std=gnu++11"
+ ;;
+ esac
+ if test x$CLANG = xno || test $lyx_cv_lib_stdcxx = yes; then
+ dnl <regex> in gcc is unusable in versions less than 4.9.0
+ dnl see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53631
+ case $gxx_version in
+ 3.*|4.0*|4.1*|4.2*|4.3*|4.4*|4.5*|4.6*|4.7*|4.8*) ;;
+ *) lyx_flags="$lyx_flags stdregex"
+ lyx_std_regex=yes
+ ;;
+ esac
+ else
+ lyx_flags="$lyx_flags stdregex"
+ lyx_std_regex=yes
+ fi
+
+ if test $lyx_std_regex = yes ; then
+ AC_DEFINE([LYX_USE_STD_REGEX], 1, [define to 1 if std::regex should be preferred to boost::regex])
+ fi
+ fi