diff --git a/icu4c/source/configure b/icu4c/source/configure index e2613cb8d386..a3be30f44ff1 100755 --- a/icu4c/source/configure +++ b/icu4c/source/configure @@ -3515,8 +3515,8 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Make sure that we try clang++ first, which provides C++11 support. -# The g++ compiler is less likely to support C++11. +# Make sure that we try clang++ first, which provides C++17 support. +# The g++ compiler is less likely to support C++17. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6128,13 +6128,13 @@ $as_echo "no" >&6; } fi if [ "$GXX" = yes ]; then - # if CXXFLAGS does not have a "-std=" setting, set it now to -std=c++11, + # if CXXFLAGS does not have a "-std=" setting, set it now to -std=c++17, # and check that the compiler still works. if ! echo "$CXXFLAGS" | grep '\-std=' >/dev/null 2>&1; then OLD_CXXFLAGS="${CXXFLAGS}" - CXXFLAGS="$CXXFLAGS -std=c++11" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have a C++11 compiler" >&5 -$as_echo_n "checking if we have a C++11 compiler... " >&6; } + CXXFLAGS="$CXXFLAGS -std=c++17" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have a C++17 compiler" >&5 +$as_echo_n "checking if we have a C++17 compiler... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6147,17 +6147,17 @@ main () } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : - cxx11_okay=yes + cxx17_okay=yes else - cxx11_okay=no + cxx17_okay=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cxx11_okay" >&5 -$as_echo "$cxx11_okay" >&6; } - if [ $cxx11_okay = yes ]; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Adding CXXFLAGS option -std=c++11" >&5 -$as_echo "$as_me: Adding CXXFLAGS option -std=c++11" >&6;} - UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -std=c++11" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cxx17_okay" >&5 +$as_echo "$cxx17_okay" >&6; } + if [ $cxx17_okay = yes ]; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Adding CXXFLAGS option -std=c++17" >&5 +$as_echo "$as_me: Adding CXXFLAGS option -std=c++17" >&6;} + UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -std=c++17" else CXXFLAGS="$OLD_CXXFLAGS" fi