From 82120023861a85427f436dcb6f21a741e32a7896 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Fri, 3 Aug 2012 19:47:14 +0000 Subject: 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 --- autoconf/configure.ac | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'autoconf/configure.ac') 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) -- cgit v1.2.3-18-g5258