Allow to disable std::regex manually with autoconf

Update INSTALL and remove mention of --disable-cxx11.
This commit is contained in:
Jean-Marc Lasgouttes 2016-06-10 11:58:11 +02:00
parent 2047ea5eb4
commit 6f585055d9
2 changed files with 10 additions and 7 deletions

View File

@ -205,8 +205,9 @@ The following options allow you to tweak the generated code more precisely (see
optimization of LyX. The compile may be much quicker with some optimization of LyX. The compile may be much quicker with some
compilers, but LyX will run more slowly. compilers, but LyX will run more slowly.
o --disable-cxx11 forces the compiler in C++98 mode. The default is o --disable-std-regex forces the compiler to use boost::regex. The default is
to use C++11 mode for known good compilers. to use std::regex for known good C++ libraries, but the test is not robust for clang.
--enable-std-regex will force the use of std::regex.
o --enable-debug will add debug information to your binary. This o --enable-debug will add debug information to your binary. This
requires a lot more disk space, but is a must if you want to try requires a lot more disk space, but is a must if you want to try

View File

@ -176,8 +176,10 @@ dnl the extra cxx11 flags have to be passed to the preprocessor. They are
dnl not plainly added to AM_CPPFLAGS because then the objc compiler (mac) dnl not plainly added to AM_CPPFLAGS because then the objc compiler (mac)
dnl would fail. dnl would fail.
AC_DEFUN([LYX_CXX_USE_REGEX], AC_DEFUN([LYX_CXX_USE_REGEX],
[lyx_std_regex=no [AC_ARG_ENABLE(std-regex,
save_CPPFLAGS=$CPPFLAGS AC_HELP_STRING([--enable-std-regex],[use std::regex instead of boost::regex (default is autodetected)]),
[lyx_std_regex=$enableval],
[save_CPPFLAGS=$CPPFLAGS
# we want to pass -std=c++11 to clang/cpp if necessary # we want to pass -std=c++11 to clang/cpp if necessary
CPPFLAGS="$AM_CPPFLAGS $1 $CPPFLAGS" CPPFLAGS="$AM_CPPFLAGS $1 $CPPFLAGS"
save_CXXFLAGS=$CXXFLAGS save_CXXFLAGS=$CXXFLAGS
@ -197,8 +199,8 @@ AC_DEFUN([LYX_CXX_USE_REGEX],
*) ;; *) ;;
esac esac
fi fi
fi AC_MSG_RESULT([$lyx_std_regex])
AC_MSG_RESULT([$lyx_std_regex]) fi])
if test $lyx_std_regex = yes ; then if test $lyx_std_regex = yes ; then
lyx_flags="$lyx_flags std-regex" lyx_flags="$lyx_flags std-regex"