summaryrefslogtreecommitdiff
path: root/autoconf
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2012-08-03 19:47:14 +0000
committerEric Christopher <echristo@apple.com>2012-08-03 19:47:14 +0000
commit82120023861a85427f436dcb6f21a741e32a7896 (patch)
tree5f231bf8d876f6e91d0698a440047cdfaf144238 /autoconf
parent07dc609c37663ee0d4179c7de605a841517f4525 (diff)
downloadllvm-82120023861a85427f436dcb6f21a741e32a7896.tar.gz
llvm-82120023861a85427f436dcb6f21a741e32a7896.tar.bz2
llvm-82120023861a85427f436dcb6f21a741e32a7896.tar.xz
Add a configure option to pass -std=c++11 on the command line.
rdar://11366674 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161251 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf')
-rw-r--r--autoconf/configure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 7d36a06f14..48ebc62255 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -463,6 +463,18 @@ case "$enableval" in
*) AC_MSG_ERROR([Invalid setting for --enable-libcpp. Use "yes" or "no"]) ;;
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)]),,
+ enableval=default)
+case "$enableval" in
+ yes) AC_SUBST(ENABLE_CXX11,[1]) ;;
+ no) AC_SUBST(ENABLE_CXX11,[0]) ;;
+ default) AC_SUBST(ENABLE_CXX11,[0]);;
+ *) AC_MSG_ERROR([Invalid setting for --enable-cxx11. Use "yes" or "no"]) ;;
+esac
+
dnl --enable-optimized : check whether they want to do an optimized build:
AC_ARG_ENABLE(optimized, AS_HELP_STRING(
--enable-optimized,[Compile with optimizations enabled (default is NO)]),,enableval=$optimize)