Bug 1080910 - Add USE_ICU variable separated from ENABLE_INTL_API. r=glandium

This commit is contained in:
Tooru Fujisawa 2014-10-10 02:55:00 -04:00
parent 7384b63f51
commit dbd0aadeb5
5 changed files with 21 additions and 16 deletions

View File

@ -51,14 +51,20 @@ yes)
;; ;;
esac esac
if test -n "$ENABLE_INTL_API"; then
USE_ICU=1
fi
if test -n "$EXPOSE_INTL_API"; then if test -n "$EXPOSE_INTL_API"; then
AC_DEFINE(EXPOSE_INTL_API) AC_DEFINE(EXPOSE_INTL_API)
fi fi
dnl Settings for the implementation of the ECMAScript Internationalization API
if test -n "$ENABLE_INTL_API"; then if test -n "$ENABLE_INTL_API"; then
AC_DEFINE(ENABLE_INTL_API) AC_DEFINE(ENABLE_INTL_API)
fi
dnl Settings for the implementation of the ECMAScript Internationalization API
if test -n "$USE_ICU"; then
icudir="$_topsrcdir/intl/icu/source" icudir="$_topsrcdir/intl/icu/source"
if test ! -d "$icudir"; then if test ! -d "$icudir"; then
icudir="$_topsrcdir/../../intl/icu/source" icudir="$_topsrcdir/../../intl/icu/source"
@ -100,9 +106,10 @@ fi
AC_SUBST(MOZ_ICU_DBG_SUFFIX) AC_SUBST(MOZ_ICU_DBG_SUFFIX)
AC_SUBST(ENABLE_INTL_API) AC_SUBST(ENABLE_INTL_API)
AC_SUBST(USE_ICU)
AC_SUBST_LIST(ICU_LIB_NAMES) AC_SUBST_LIST(ICU_LIB_NAMES)
if test -n "$ENABLE_INTL_API" -a -z "$MOZ_NATIVE_ICU"; then if test -n "$USE_ICU" -a -z "$MOZ_NATIVE_ICU"; then
dnl We build ICU as a static library for non-shared js builds and as a shared library for shared js builds. dnl We build ICU as a static library for non-shared js builds and as a shared library for shared js builds.
if test -z "$MOZ_SHARED_ICU"; then if test -z "$MOZ_SHARED_ICU"; then
AC_DEFINE(U_STATIC_IMPLEMENTATION) AC_DEFINE(U_STATIC_IMPLEMENTATION)
@ -119,7 +126,7 @@ AC_DEFUN([MOZ_SUBCONFIGURE_ICU], [
if test -z "$BUILDING_JS" -o -n "$JS_STANDALONE"; then if test -z "$BUILDING_JS" -o -n "$JS_STANDALONE"; then
if test -n "$ENABLE_INTL_API" -a -z "$MOZ_NATIVE_ICU"; then if test -n "$USE_ICU" -a -z "$MOZ_NATIVE_ICU"; then
# Set ICU compile options # Set ICU compile options
ICU_CPPFLAGS="" ICU_CPPFLAGS=""
# don't use icu namespace automatically in client code # don't use icu namespace automatically in client code

View File

@ -3,7 +3,7 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Ensure that this happens before including rules.mk # Ensure that this happens before including rules.mk
ifdef ENABLE_INTL_API ifdef USE_ICU
ifndef MOZ_NATIVE_ICU ifndef MOZ_NATIVE_ICU
# Library names: On Windows, ICU uses modified library names for static # Library names: On Windows, ICU uses modified library names for static
# and debug libraries. # and debug libraries.
@ -36,11 +36,11 @@ ifdef ENABLE_INTL_API
endif endif
endif # MOZ_SHARED_ICU endif # MOZ_SHARED_ICU
endif # !MOZ_NATIVE_ICU endif # !MOZ_NATIVE_ICU
endif # ENABLE_INTL_API endif # USE_ICU
include $(topsrcdir)/config/rules.mk include $(topsrcdir)/config/rules.mk
ifdef ENABLE_INTL_API ifdef USE_ICU
ifndef MOZ_NATIVE_ICU ifndef MOZ_NATIVE_ICU
target:: buildicu target:: buildicu
$(STATIC_LIBS): buildicu $(STATIC_LIBS): buildicu

View File

@ -9018,19 +9018,17 @@ dnl ========================================================
# Android: bug 864843 # Android: bug 864843
# B2G: bug 866301 # B2G: bug 866301
if test "$MOZ_WIDGET_TOOLKIT" = "android"; then if test "$MOZ_WIDGET_TOOLKIT" = "android" ||
test "$MOZ_BUILD_APP" = "b2g"; then
_INTL_API=no _INTL_API=no
elif test "$MOZ_BUILD_APP" = "b2g"; then
if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then
# nsCollationMacUC needs ICU
_INTL_API=yes
else
_INTL_API=no
fi
else else
_INTL_API=yes _INTL_API=yes
fi fi
if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then
USE_ICU=1
fi
MOZ_CONFIG_ICU() MOZ_CONFIG_ICU()
if test -z "$JS_SHARED_LIBRARY"; then if test -z "$JS_SHARED_LIBRARY"; then

View File

@ -60,7 +60,7 @@ if CONFIG['COMPILE_ENVIRONMENT'] and not CONFIG['LIBXUL_SDK']:
if CONFIG['BUILD_CTYPES']: if CONFIG['BUILD_CTYPES']:
DIRS += ['config/external/ffi'] DIRS += ['config/external/ffi']
if CONFIG['ENABLE_INTL_API']: if CONFIG['USE_ICU']:
DIRS += ['config/external/icu'] DIRS += ['config/external/icu']
DIRS += ['js/src'] DIRS += ['js/src']

View File

@ -125,7 +125,7 @@ USE_LIBS += [
'zlib', 'zlib',
] ]
if CONFIG['ENABLE_INTL_API']: if CONFIG['USE_ICU']:
USE_LIBS += [ USE_LIBS += [
'icu', 'icu',
] ]