Issue #1971 - Part 2: Update ICU source to 63.2.

This commit is contained in:
Job Bautista 2022-07-24 21:03:27 +08:00 committed by roytam1
commit 1e69214382
3160 changed files with 275815 additions and 234203 deletions

View file

@ -100,6 +100,16 @@ UCONFIG_CPPFLAGS=""
# such as -std
UCONFIG_CFLAGS=""
# Check whether to install icu-config
AC_ARG_ENABLE([icu-config],
AS_HELP_STRING([--enable-icu-config], [install icu-config]),
[case "${enableval}" in
yes) enable_icu_config=true ;;
no) enable_icu_config=false ;;
*) AC_MSG_ERROR([bad value '${enableval}' for --enable-icu-config]) ;;
esac], [enable_icu_config=true])
AC_SUBST(INSTALL_ICU_CONFIG, [$enable_icu_config])
# Check whether to build debug libraries
AC_MSG_CHECKING([whether to build debug libraries])
enabled=no
@ -185,6 +195,8 @@ fi
#AC_CHECK_PROG(AUTOCONF, autoconf, autoconf, true)
#AC_CHECK_PROG(STRIP, strip, strip, true)
AC_CHECK_PROGS(PYTHON3, python3)
# Check for the platform make
AC_PATH_PROGS(U_MAKE, gmake gnumake, make)
AC_SUBST(U_MAKE)
@ -365,12 +377,15 @@ AC_ARG_ENABLE(draft,
AC_MSG_RESULT($enabled)
# Make sure that we can use draft API in ICU.
if test "$U_DEFAULT_SHOW_DRAFT" = 0; then
CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_SHOW_DRAFT_API"
CONFIG_CPPFLAGS="$CONFIG_CPPFLAGS -DU_SHOW_DRAFT_API -DU_SHOW_INTERNAL_API"
fi
AC_SUBST(U_DEFAULT_SHOW_DRAFT)
AC_PROG_RANLIB
# need sed
AC_PROG_SED
# look for 'ar' the proper way
AC_CHECK_TOOL(AR, ar, false)
@ -492,17 +507,17 @@ else
fi
if [[ "$GXX" = yes ]]; then
# if CXXFLAGS does not have a "-std=" setting, set it now to -std=c++0x,
# if CXXFLAGS does not have a "-std=" setting, set it now to -std=c++11,
# and check that the compiler still works.
if ! echo "$CXXFLAGS" | grep '\-std=' >/dev/null 2>&1; then
OLD_CXXFLAGS="${CXXFLAGS}"
CXXFLAGS="$CXXFLAGS --std=c++0x"
CXXFLAGS="$CXXFLAGS -std=c++11"
AC_MSG_CHECKING([[if we have a C++11 compiler]])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[cxx11_okay=yes],[cxx11_okay=no])
AC_MSG_RESULT($cxx11_okay)
if [[ $cxx11_okay = yes ]]; then
AC_MSG_NOTICE([Adding CXXFLAGS option --std=c++0x])
UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} --std=c++0x"
AC_MSG_NOTICE([Adding CXXFLAGS option -std=c++11])
UCONFIG_CXXFLAGS="${UCONFIG_CXXFLAGS} -std=c++11"
else
CXXFLAGS="$OLD_CXXFLAGS"
fi
@ -514,32 +529,6 @@ if [[ "$GXX" = yes ]]; then
fi
fi
AC_MSG_CHECKING([[if #include <string> works]])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <string>]], [[]])], [ac_cv_header_stdstring=yes], [ac_cv_header_stdstring=no])
AC_MSG_RESULT($ac_cv_header_stdstring)
if test $ac_cv_header_stdstring = yes
then
U_HAVE_STD_STRING=1
else
U_HAVE_STD_STRING=0
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STD_STRING=0"
fi
AC_SUBST(U_HAVE_STD_STRING)
AC_MSG_CHECKING([[if #include <atomic> works]])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <atomic>]], [[]])], [ac_cv_header_atomic=yes], [ac_cv_header_atomic=no])
AC_MSG_RESULT($ac_cv_header_atomic)
if test $ac_cv_header_atomic = yes
then
U_HAVE_ATOMIC=1
else
U_HAVE_ATOMIC=0
fi
# Make this available via CPPFLAGS
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_ATOMIC=${U_HAVE_ATOMIC}"
AC_SUBST(U_HAVE_ATOMIC)
AC_LANG_POP([C++])
# Always build ICU with multi-threading support.
@ -893,11 +882,18 @@ AC_SUBST(U_TIMEZONE)
AC_CHECK_FUNC(strtod_l)
if test x$ac_cv_func_strtod_l = xyes
then
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=1"
U_HAVE_STRTOD_L=1
U_HAVE_STRTOD_L=1
AC_CHECK_HEADER(xlocale.h)
if test "$ac_cv_header_xlocale_h" = yes; then
U_HAVE_XLOCALE_H=1
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=1"
else
U_HAVE_XLOCALE_H=0
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=1 -DU_HAVE_XLOCALE_H=0"
fi
else
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0"
U_HAVE_STRTOD_L=0
CONFIG_CPPFLAGS="${CONFIG_CPPFLAGS} -DU_HAVE_STRTOD_L=0"
U_HAVE_STRTOD_L=0
fi
AC_SUBST(U_HAVE_STRTOD_L)
@ -1041,19 +1037,14 @@ case "${host}" in
;;
esac
# GCC >= 4.4 supports UTF16 string literals. The CFLAGS and CXXFLAGS may change in the future.
# GCC >= 4.4 supports UTF16 string literals. As of ICU 62, both C and C++ files require them.
if test "$CHECK_UTF16_STRING_RESULT" = "unknown"; then
if test "$GCC" = yes; then
OLD_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} -std=gnu99"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
static const char16_t test[] = u"This is a UTF16 literal string.";
static const unsigned short test[] = u"This is a UTF16 literal string.";
]], [[]])],[CC_UTF16_STRING=1],[CC_UTF16_STRING=0])
if test "$CC_UTF16_STRING" = 1; then
UCONFIG_CFLAGS="${UCONFIG_CFLAGS} -std=gnu99"
CHECK_UTF16_STRING_RESULT="C only";
else
CFLAGS="${OLD_CFLAGS}"
fi
fi
if test "$GXX" = yes; then
@ -1362,6 +1353,7 @@ AC_CONFIG_FILES([icudefs.mk \
tools/pkgdata/Makefile \
tools/tzcode/Makefile \
tools/gencfu/Makefile \
tools/escapesrc/Makefile \
test/Makefile \
test/compat/Makefile \
test/testdata/Makefile \
@ -1472,4 +1464,17 @@ then
echo "## Expect build failures in the 'data', 'test', and other directories."
fi
if test -z "$PYTHON3";
then
echo ""
echo "NOTICE: Unable to find Python 3. ICU versions 64 and later will require Python 3 to build."
echo "See ICU-10923 for more information: https://unicode-org.atlassian.net/browse/ICU-10923"
echo ""
else
echo ""
echo "Found Python 3. You are all set for ICU 64, which will require Python 3 to build."
echo "For more info on Python 3 requirement, see: https://unicode-org.atlassian.net/browse/ICU-10923"
echo ""
fi
$as_unset _CXX_CXXSUFFIX