[C++11] Switch autoconf and make to use C++11 by default. Now both build
authorChandler Carruth <chandlerc@gmail.com>
Fri, 28 Feb 2014 21:47:41 +0000 (21:47 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 28 Feb 2014 21:47:41 +0000 (21:47 +0000)
systems have the default as C++11, but retain the ability to build with
C++98.

Again, please restrain your enthusiasm a bit in case this needs to be
reverted. =]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202546 91177308-0d34-0410-b5e6-96231b3b80d8

autoconf/configure.ac
configure

index 1b9555f25d2aac3a352900abae3f65d14deff9cb..018321591c2501df4ef28b09bcfeec0a2841fa80 100644 (file)
@@ -592,12 +592,12 @@ esac
 dnl --enable-cxx11 : check whether or not to use -std=c++11 on the command line
 AC_ARG_ENABLE(cxx11,
               AS_HELP_STRING([--enable-cxx11],
-                             [Use c++11 if available (default is NO)]),,
+                             [Use c++11 if available (default is YES)]),,
                              enableval=default)
 case "$enableval" in
   yes) AC_SUBST(ENABLE_CXX11,[1]) ;;
   no)  AC_SUBST(ENABLE_CXX11,[0]) ;;
-  default) AC_SUBST(ENABLE_CXX11,[0]);;
+  default) AC_SUBST(ENABLE_CXX11,[1]);;
   *) AC_MSG_ERROR([Invalid setting for --enable-cxx11. Use "yes" or "no"]) ;;
 esac
 
index 57cf95d638f636efafcccc095680708deddb72dd..deab9899d95b673b4e9a06fe8cf4288edfcff329 100755 (executable)
--- a/configure
+++ b/configure
@@ -1402,7 +1402,7 @@ Optional Features:
   --enable-compiler-version-checks
                           Check the version of the host compiler (default is
                           YES)
-  --enable-cxx11          Use c++11 if available (default is NO)
+  --enable-cxx11          Use c++11 if available (default is YES)
   --enable-split-dwarf    Use split-dwarf if available (default is NO)
   --enable-clang-arcmt    Enable building of clang ARCMT (default is YES)
   --enable-clang-static-analyzer
@@ -4816,7 +4816,7 @@ case "$enableval" in
  ;;
   no)  ENABLE_CXX11=0
  ;;
-  default) ENABLE_CXX11=0
+  default) ENABLE_CXX11=1
 ;;
   *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-cxx11. Use \"yes\" or \"no\"" >&5
 echo "$as_me: error: Invalid setting for --enable-cxx11. Use \"yes\" or \"no\"" >&2;}