]> git.lyx.org Git - lyx.git/commitdiff
Allow to disable std::regex manually with autoconf
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 10 Jun 2016 09:58:11 +0000 (11:58 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Fri, 10 Jun 2016 10:01:53 +0000 (12:01 +0200)
Update INSTALL and remove mention of --disable-cxx11.

INSTALL
config/lyxinclude.m4

diff --git a/INSTALL b/INSTALL
index e3d3ee0ff7a182f2c99e05d7c4e2cc3137dd058b..0059087c39625b05f2be7687f95af01b8314fe39 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -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
     compilers, but LyX will run more slowly.
 
-  o --disable-cxx11 forces the compiler in C++98 mode. The default is
-    to use C++11 mode for known good compilers.
+  o --disable-std-regex forces the compiler to use boost::regex. The default is
+    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
     requires a lot more disk space, but is a must if you want to try
index 2d60cc1fe8c860550d3c96359e8c7fba87863b94..07153ec0e8c4c6efaf5ffc3648355fa3b56b2b30 100644 (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 would fail.
 AC_DEFUN([LYX_CXX_USE_REGEX],
-[lyx_std_regex=no
-   save_CPPFLAGS=$CPPFLAGS
+[AC_ARG_ENABLE(std-regex,
+  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
    CPPFLAGS="$AM_CPPFLAGS $1 $CPPFLAGS"
    save_CXXFLAGS=$CXXFLAGS
@@ -197,8 +199,8 @@ AC_DEFUN([LYX_CXX_USE_REGEX],
          *) ;;
        esac
      fi
-   fi
-   AC_MSG_RESULT([$lyx_std_regex])
+     AC_MSG_RESULT([$lyx_std_regex])
+   fi])
 
  if test $lyx_std_regex = yes ; then
   lyx_flags="$lyx_flags std-regex"
@@ -367,7 +369,7 @@ if test x$GXX = xyes; then
                 [cxx11_flags="-std=gnu++11"],
                 [cxx11_flags="-std=c++11"]);;
     esac
-    # cxx11_flags is useful when running preprocessor alone 
+    # cxx11_flags is useful when running preprocessor alone
     # (see detection of regex).
     AM_CXXFLAGS="$cxx11_flags $AM_CXXFLAGS"
 fi