Skip to content

Commit

Permalink
ICU-21107 Update configure files from configure.ac using autoreconf.
Browse files Browse the repository at this point in the history
  • Loading branch information
roubert authored and markusicu committed Dec 14, 2023
1 parent 7ec1765 commit 1bc059e
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions icu4c/source/configure
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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. */
Expand All @@ -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
Expand Down

0 comments on commit 1bc059e

Please sign in to comment.