bug 1244743 - Replace MOZ_NATIVE_X with MOZ_SYSTEM_X. r=gps
authorTed Mielczarek <ted@mielczarek.org>
Mon, 01 Feb 2016 10:49:34 -0500
changeset 288573 ec1879bdc5dc04d4a810c5177be94eb9b3218b9b
parent 288572 116882b45609d0ceac5cb80fe71c04889e6ec187
child 288574 2b83147ead2695427cd346eb80cf8c33a2210ba7
push id30087
push usercbook@mozilla.com
push dateTue, 15 Mar 2016 09:43:43 +0000
treeherdermozilla-central@5e14887312d4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs1244743
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1244743 - Replace MOZ_NATIVE_X with MOZ_SYSTEM_X. r=gps MozReview-Commit-ID: 9ip3qeAXFEe
b2g/installer/Makefile.in
b2g/installer/package-manifest.in
browser/installer/Makefile.in
browser/installer/package-manifest.in
build/autoconf/ffi.m4
build/autoconf/icu.m4
build/autoconf/jemalloc.m4
build/autoconf/nspr-build.m4
build/autoconf/zlib.m4
config/Makefile.in
config/external/ffi/Makefile.in
config/external/ffi/moz.build
config/external/icu/Makefile.in
config/external/icu/moz.build
config/external/moz.build
config/external/nss/Makefile.in
config/external/nss/crmf/moz.build
config/external/nss/moz.build
config/external/sqlite/moz.build
config/external/zlib/moz.build
config/system-headers
extensions/spellcheck/hunspell/moz.build
ipc/chromium/moz.build
ipc/chromium/src/third_party/libeventcommon.mozbuild
ipc/chromium/src/third_party/moz.build
js/src/moz.build
js/src/old-configure.in
media/webrtc/signaling/test/common.build
memory/build/jemalloc_config.cpp
memory/build/moz.build
memory/build/mozjemalloc_compat.c
memory/build/mozmemory_wrap.h
memory/build/replace_malloc.c
memory/moz.build
mozglue/build/moz.build
old-configure.in
other-licenses/bsdiff/moz.build
services/crypto/modules/WeaveCrypto.js
storage/SQLiteMutex.h
storage/moz.build
toolkit/library/moz.build
toolkit/modules/AppConstants.jsm
toolkit/modules/moz.build
toolkit/mozapps/installer/upload-files.mk
toolkit/mozapps/update/updater/updater-common.build
--- a/b2g/installer/Makefile.in
+++ b/b2g/installer/Makefile.in
@@ -94,18 +94,18 @@ ifneq (,$(filter WINNT Darwin Android,$(
 DEFINES += -DMOZ_SHARED_MOZGLUE=1
 endif
 
 ifneq (,$(filter rtsp,$(NECKO_PROTOCOLS)))
 DEFINES += -DMOZ_RTSP
 endif
 
 DEFINES += -DMOZ_ICU_VERSION=$(MOZ_ICU_VERSION)
-ifdef MOZ_NATIVE_ICU
-DEFINES += -DMOZ_NATIVE_ICU
+ifdef MOZ_SYSTEM_ICU
+DEFINES += -DMOZ_SYSTEM_ICU
 endif
 ifdef MOZ_SHARED_ICU
 DEFINES += -DMOZ_SHARED_ICU
 endif
 DEFINES += -DMOZ_ICU_DBG_SUFFIX=$(MOZ_ICU_DBG_SUFFIX)
 
 ifdef MOZ_WIDGET_GTK
 DEFINES += -DMOZ_GTK=1
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -66,17 +66,17 @@
 @BINPATH@/@MSVC_C_RUNTIME_DLL@
 @BINPATH@/@MSVC_CXX_RUNTIME_DLL@
 #endif
 #if MOZ_PACKAGE_WIN_UCRT_DLLS
 @BINPATH@/api-ms-win-*.dll
 @BINPATH@/ucrtbase.dll
 #endif
 #endif
-#ifndef MOZ_NATIVE_ICU
+#ifndef MOZ_SYSTEM_ICU
 #ifdef MOZ_SHARED_ICU
 #ifdef XP_WIN
 @BINPATH@/icudt@MOZ_ICU_DBG_SUFFIX@@MOZ_ICU_VERSION@.dll
 @BINPATH@/icuin@MOZ_ICU_DBG_SUFFIX@@MOZ_ICU_VERSION@.dll
 @BINPATH@/icuuc@MOZ_ICU_DBG_SUFFIX@@MOZ_ICU_VERSION@.dll
 #elif defined(XP_MACOSX)
 @BINPATH@/libicudata.@MOZ_ICU_VERSION@.dylib
 @BINPATH@/libicui18n.@MOZ_ICU_VERSION@.dylib
--- a/browser/installer/Makefile.in
+++ b/browser/installer/Makefile.in
@@ -26,22 +26,22 @@ endif
 
 ifdef MOZ_WIDGET_GTK
 DEFINES += -DMOZ_GTK=1
 ifdef MOZ_ENABLE_GTK3
 DEFINES += -DMOZ_GTK3=1
 endif
 endif
 
-ifdef MOZ_NATIVE_NSPR
-DEFINES += -DMOZ_NATIVE_NSPR=1
+ifdef MOZ_SYSTEM_NSPR
+DEFINES += -DMOZ_SYSTEM_NSPR=1
 endif
 
-ifdef MOZ_NATIVE_NSS
-DEFINES += -DMOZ_NATIVE_NSS=1
+ifdef MOZ_SYSTEM_NSS
+DEFINES += -DMOZ_SYSTEM_NSS=1
 endif
 
 ifdef NSS_DISABLE_DBM
 DEFINES += -DNSS_DISABLE_DBM=1
 endif
 
 DEFINES += -DJAREXT=
 
@@ -113,18 +113,18 @@ LPROJ_ROOT = $(firstword $(subst -, ,$(A
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 ifeq (zh-TW,$(AB_CD))
 LPROJ_ROOT := $(subst -,_,$(AB_CD))
 endif
 endif
 DEFINES += -DLPROJ_ROOT=$(LPROJ_ROOT)
 
 DEFINES += -DMOZ_ICU_VERSION=$(MOZ_ICU_VERSION)
-ifdef MOZ_NATIVE_ICU
-DEFINES += -DMOZ_NATIVE_ICU
+ifdef MOZ_SYSTEM_ICU
+DEFINES += -DMOZ_SYSTEM_ICU
 endif
 ifdef MOZ_SHARED_ICU
 DEFINES += -DMOZ_SHARED_ICU
 endif
 DEFINES += -DMOZ_ICU_DBG_SUFFIX=$(MOZ_ICU_DBG_SUFFIX)
 ifdef CLANG_CXX
 DEFINES += -DCLANG_CXX
 endif
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -63,17 +63,17 @@
 @BINPATH@/@DLL_PREFIX@mozglue@DLL_SUFFIX@
 #endif
 #ifndef MOZ_STATIC_JS
 @BINPATH@/@DLL_PREFIX@mozjs@DLL_SUFFIX@
 #endif
 #ifdef MOZ_DMD
 @BINPATH@/@DLL_PREFIX@dmd@DLL_SUFFIX@
 #endif
-#ifndef MOZ_NATIVE_NSPR
+#ifndef MOZ_SYSTEM_NSPR
 #ifndef MOZ_FOLD_LIBS
 @BINPATH@/@DLL_PREFIX@nspr4@DLL_SUFFIX@
 @BINPATH@/@DLL_PREFIX@plc4@DLL_SUFFIX@
 @BINPATH@/@DLL_PREFIX@plds4@DLL_SUFFIX@
 #endif
 #endif
 #ifdef XP_MACOSX
 @BINPATH@/XUL
@@ -92,17 +92,17 @@
 @BINPATH@/@MSVC_C_RUNTIME_DLL@
 @BINPATH@/@MSVC_CXX_RUNTIME_DLL@
 #endif
 #if MOZ_PACKAGE_WIN_UCRT_DLLS
 @BINPATH@/api-ms-win-*.dll
 @BINPATH@/ucrtbase.dll
 #endif
 #endif
-#ifndef MOZ_NATIVE_ICU
+#ifndef MOZ_SYSTEM_ICU
 #ifdef MOZ_SHARED_ICU
 #ifdef XP_WIN
 @BINPATH@/icudt@MOZ_ICU_DBG_SUFFIX@@MOZ_ICU_VERSION@.dll
 @BINPATH@/icuin@MOZ_ICU_DBG_SUFFIX@@MOZ_ICU_VERSION@.dll
 @BINPATH@/icuuc@MOZ_ICU_DBG_SUFFIX@@MOZ_ICU_VERSION@.dll
 #elif defined(XP_MACOSX)
 @BINPATH@/libicudata.@MOZ_ICU_VERSION@.dylib
 @BINPATH@/libicui18n.@MOZ_ICU_VERSION@.dylib
@@ -127,17 +127,17 @@
 @BINPATH@/@MOZ_APP_NAME@-bin
 @BINPATH@/@MOZ_APP_NAME@
 #endif
 @RESPATH@/application.ini
 #ifdef MOZ_UPDATER
 @RESPATH@/update-settings.ini
 #endif
 @RESPATH@/platform.ini
-#ifndef MOZ_NATIVE_SQLITE
+#ifndef MOZ_SYSTEM_SQLITE
 #ifndef MOZ_FOLD_LIBS
 @BINPATH@/@DLL_PREFIX@mozsqlite3@DLL_SUFFIX@
 #endif
 #endif
 @BINPATH@/@DLL_PREFIX@lgpllibs@DLL_SUFFIX@
 #ifdef MOZ_FFVPX
 @BINPATH@/@DLL_PREFIX@mozavutil@DLL_SUFFIX@
 @BINPATH@/@DLL_PREFIX@mozavcodec@DLL_SUFFIX@
@@ -759,17 +759,17 @@
 @RESPATH@/components/dom_svg.xpt
 @RESPATH@/components/dom_smil.xpt
 
 ; [Personal Security Manager]
 ;
 ; NSS libraries are signed in the staging directory,
 ; meaning their .chk files are created there directly.
 ;
-#ifndef MOZ_NATIVE_NSS
+#ifndef MOZ_SYSTEM_NSS
 @BINPATH@/@DLL_PREFIX@freebl3@DLL_SUFFIX@
 @BINPATH@/@DLL_PREFIX@nss3@DLL_SUFFIX@
 @BINPATH@/@DLL_PREFIX@nssckbi@DLL_SUFFIX@
 #ifndef NSS_DISABLE_DBM
 @BINPATH@/@DLL_PREFIX@nssdbm3@DLL_SUFFIX@
 #endif
 #ifndef MOZ_FOLD_LIBS
 @BINPATH@/@DLL_PREFIX@nssutil3@DLL_SUFFIX@
--- a/build/autoconf/ffi.m4
+++ b/build/autoconf/ffi.m4
@@ -1,36 +1,36 @@
 dnl This Source Code Form is subject to the terms of the Mozilla Public
 dnl License, v. 2.0. If a copy of the MPL was not distributed with this
 dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 AC_DEFUN([MOZ_CONFIG_FFI], [
 
 MOZ_ARG_ENABLE_BOOL(system-ffi,
 [  --enable-system-ffi       Use system libffi (located with pkgconfig)],
-    MOZ_NATIVE_FFI=1 )
+    MOZ_SYSTEM_FFI=1 )
 
-if test -n "$MOZ_NATIVE_FFI"; then
+if test -n "$MOZ_SYSTEM_FFI"; then
     # Vanilla libffi 3.0.9 needs a few patches from upcoming version 3.0.10
     # for non-GCC compilers.
     if test -z "$GNU_CC"; then
         PKG_CHECK_MODULES(MOZ_FFI, libffi > 3.0.9)
     else
         PKG_CHECK_MODULES(MOZ_FFI, libffi >= 3.0.9)
     fi
 fi
 
-AC_SUBST(MOZ_NATIVE_FFI)
+AC_SUBST(MOZ_SYSTEM_FFI)
 
 ])
 
 AC_DEFUN([MOZ_SUBCONFIGURE_FFI], [
 if test -z "$BUILDING_JS" -o -n "$JS_STANDALONE"; then
 
-  if test "$BUILD_CTYPES" -a -z "$MOZ_NATIVE_FFI"; then
+  if test "$BUILD_CTYPES" -a -z "$MOZ_SYSTEM_FFI"; then
     # Run the libffi 'configure' script.
     ac_configure_args="--disable-shared --enable-static --disable-raw-api"
     if test "$MOZ_DEBUG"; then
       ac_configure_args="$ac_configure_args --enable-debug"
     fi
     if test "$DSO_PIC_CFLAGS"; then
       ac_configure_args="$ac_configure_args --with-pic"
     fi
--- a/build/autoconf/icu.m4
+++ b/build/autoconf/icu.m4
@@ -5,31 +5,31 @@ dnl file, You can obtain one at http://m
 dnl Set the MOZ_ICU_VERSION variable to denote the current version of the
 dnl ICU library, and also the MOZ_SHARED_ICU which would be true if we are
 dnl linking against a shared library of ICU, either one that we build from
 dnl our copy of ICU or the system provided library.
 
 AC_DEFUN([MOZ_CONFIG_ICU], [
 
 ICU_LIB_NAMES=
-MOZ_NATIVE_ICU=
+MOZ_SYSTEM_ICU=
 MOZ_ARG_WITH_BOOL(system-icu,
 [  --with-system-icu
                           Use system ICU (located with pkgconfig)],
-    MOZ_NATIVE_ICU=1)
+    MOZ_SYSTEM_ICU=1)
 
-if test -n "$MOZ_NATIVE_ICU"; then
+if test -n "$MOZ_SYSTEM_ICU"; then
     PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 50.1)
     MOZ_SHARED_ICU=1
 else
     MOZ_ICU_INCLUDES="/intl/icu/source/common /intl/icu/source/i18n"
 fi
 
 AC_SUBST_LIST(MOZ_ICU_INCLUDES)
-AC_SUBST(MOZ_NATIVE_ICU)
+AC_SUBST(MOZ_SYSTEM_ICU)
 
 MOZ_ARG_WITH_STRING(intl-api,
 [  --with-intl-api, --with-intl-api=build, --without-intl-api
     Determine the status of the ECMAScript Internationalization API.  The first
     (or lack of any of these) builds and exposes the API.  The second builds it
     but doesn't use ICU or expose the API to script.  The third doesn't build
     ICU at all.],
     _INTL_API=$withval)
@@ -78,24 +78,24 @@ if test -n "$USE_ICU"; then
        AC_MSG_ERROR([cannot determine icu version number from uvernum.h header file $lineno])
     fi
     MOZ_ICU_VERSION="$version"
 
     if test "$OS_TARGET" = WINNT; then
         MOZ_SHARED_ICU=1
     fi
 
-    if test -z "${JS_STANDALONE}" -a -n "${JS_SHARED_LIBRARY}${MOZ_NATIVE_ICU}"; then
+    if test -z "${JS_STANDALONE}" -a -n "${JS_SHARED_LIBRARY}${MOZ_SYSTEM_ICU}"; then
         MOZ_SHARED_ICU=1
     fi
 
     AC_SUBST(MOZ_ICU_VERSION)
     AC_SUBST(MOZ_SHARED_ICU)
 
-    if test -z "$MOZ_NATIVE_ICU"; then
+    if test -z "$MOZ_SYSTEM_ICU"; then
         case "$OS_TARGET" in
             WINNT)
                 ICU_LIB_NAMES="icuin icuuc icudt"
                 MOZ_ICU_DBG_SUFFIX=
                 if test -n "$MOZ_DEBUG" -a -z "$MOZ_NO_DEBUG_RTL"; then
                     MOZ_ICU_DBG_SUFFIX=d
                 fi
                 ;;
@@ -108,34 +108,34 @@ if test -n "$USE_ICU"; then
     fi
 fi
 
 AC_SUBST(MOZ_ICU_DBG_SUFFIX)
 AC_SUBST(ENABLE_INTL_API)
 AC_SUBST(USE_ICU)
 AC_SUBST_LIST(ICU_LIB_NAMES)
 
-if test -n "$USE_ICU" -a -z "$MOZ_NATIVE_ICU"; then
+if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM_ICU"; then
     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
         AC_DEFINE(U_STATIC_IMPLEMENTATION)
     fi
     dnl Source files that use ICU should have control over which parts of the ICU
     dnl namespace they want to use.
     AC_DEFINE(U_USING_ICU_NAMESPACE,0)
 fi
 
 
 ])
 
 AC_DEFUN([MOZ_SUBCONFIGURE_ICU], [
 
 if test -z "$BUILDING_JS" -o -n "$JS_STANDALONE"; then
 
-    if test -n "$USE_ICU" -a -z "$MOZ_NATIVE_ICU"; then
+    if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM_ICU"; then
         # Set ICU compile options
         ICU_CPPFLAGS=""
         # don't use icu namespace automatically in client code
         ICU_CPPFLAGS="$ICU_CPPFLAGS -DU_USING_ICU_NAMESPACE=0"
         # don't include obsolete header files
         ICU_CPPFLAGS="$ICU_CPPFLAGS -DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1"
         # remove chunks of the library that we don't need (yet)
         ICU_CPPFLAGS="$ICU_CPPFLAGS -DUCONFIG_NO_LEGACY_CONVERSION"
--- a/build/autoconf/jemalloc.m4
+++ b/build/autoconf/jemalloc.m4
@@ -3,17 +3,17 @@ dnl License, v. 2.0. If a copy of the MP
 dnl file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 AC_DEFUN([MOZ_SUBCONFIGURE_JEMALLOC], [
 
 if test -z "$BUILDING_JS" -o -n "$JS_STANDALONE"; then
 
   # Run jemalloc configure script
 
-  if test -z "$MOZ_NATIVE_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC4" -o -n "$MOZ_REPLACE_MALLOC"; then
+  if test -z "$MOZ_SYSTEM_JEMALLOC" -a "$MOZ_MEMORY" && test -n "$MOZ_JEMALLOC4" -o -n "$MOZ_REPLACE_MALLOC"; then
     ac_configure_args="--build=$build --host=$target --enable-stats --with-jemalloc-prefix=je_ --disable-valgrind"
     # We're using memalign for _aligned_malloc in memory/build/mozmemory_wrap.c
     # on Windows, so just export memalign on all platforms.
     ac_configure_args="$ac_configure_args ac_cv_func_memalign=yes"
     if test -n "$MOZ_REPLACE_MALLOC"; then
       # When using replace_malloc, we always want valloc exported from jemalloc.
       ac_configure_args="$ac_configure_args ac_cv_func_valloc=yes"
       if test "${OS_ARCH}" = Darwin; then
--- a/build/autoconf/nspr-build.m4
+++ b/build/autoconf/nspr-build.m4
@@ -132,20 +132,20 @@ if test -n "$BUILDING_JS"; then
 fi
 
 # A (sub)configure invoked by the toplevel configure will always receive
 # --with-nspr-libs on the command line. It will never need to figure out
 # anything itself.
 if test -n "$_IS_OUTER_CONFIGURE"; then
 
 if test -n "$_USE_SYSTEM_NSPR"; then
-    AM_PATH_NSPR($NSPR_MINVER, [MOZ_NATIVE_NSPR=1], [AC_MSG_ERROR([you do not have NSPR installed or your version is older than $NSPR_MINVER.])])
+    AM_PATH_NSPR($NSPR_MINVER, [MOZ_SYSTEM_NSPR=1], [AC_MSG_ERROR([you do not have NSPR installed or your version is older than $NSPR_MINVER.])])
 fi
 
-if test -n "$MOZ_NATIVE_NSPR" -o -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
+if test -n "$MOZ_SYSTEM_NSPR" -o -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
     _SAVE_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS $NSPR_CFLAGS"
     AC_TRY_COMPILE([#include "prtypes.h"],
                 [#ifndef PR_STATIC_ASSERT
                  #error PR_STATIC_ASSERT not defined or requires including prtypes.h
                  #endif],
                 ,
                 AC_MSG_ERROR([system NSPR does not support PR_STATIC_ASSERT or including prtypes.h does not provide it]))
@@ -173,18 +173,18 @@ elif test -z "$JS_POSIX_NSPR"; then
     fi
 fi
 
 AC_SUBST_LIST(NSPR_CFLAGS)
 AC_SUBST(NSPR_INCLUDE_DIR)
 AC_SUBST(NSPR_LIB_DIR)
 
 NSPR_PKGCONF_CHECK="nspr"
-if test -n "$MOZ_NATIVE_NSPR"; then
-    # piggy back on $MOZ_NATIVE_NSPR to set a variable for the nspr check for js.pc
+if test -n "$MOZ_SYSTEM_NSPR"; then
+    # piggy back on $MOZ_SYSTEM_NSPR to set a variable for the nspr check for js.pc
     NSPR_PKGCONF_CHECK="nspr >= $NSPR_MINVER"
 
     _SAVE_CFLAGS=$CFLAGS
     CFLAGS="$CFLAGS $NSPR_CFLAGS"
     AC_TRY_COMPILE([#include "prlog.h"],
                 [#ifndef PR_STATIC_ASSERT
                  #error PR_STATIC_ASSERT not defined
                  #endif],
--- a/build/autoconf/zlib.m4
+++ b/build/autoconf/zlib.m4
@@ -21,34 +21,34 @@ if test -z "$MOZ_ZLIB_LIBS$MOZ_ZLIB_CFLA
 
     if test -n "${ZLIB_DIR}" -a "${ZLIB_DIR}" != "yes"; then
         MOZ_ZLIB_CFLAGS="-I${ZLIB_DIR}/include"
         MOZ_ZLIB_LIBS="-L${ZLIB_DIR}/lib"
         CFLAGS="$MOZ_ZLIB_CFLAGS $CFLAGS"
         LDFLAGS="$MOZ_ZLIB_LIBS $LDFLAGS"
     fi
     if test -z "$ZLIB_DIR" -o "$ZLIB_DIR" = no; then
-        MOZ_NATIVE_ZLIB=
+        MOZ_SYSTEM_ZLIB=
     else
-        AC_CHECK_LIB(z, gzread, [MOZ_NATIVE_ZLIB=1 MOZ_ZLIB_LIBS="$MOZ_ZLIB_LIBS -lz"],
-            [MOZ_NATIVE_ZLIB=])
-        if test "$MOZ_NATIVE_ZLIB" = 1; then
+        AC_CHECK_LIB(z, gzread, [MOZ_SYSTEM_ZLIB=1 MOZ_ZLIB_LIBS="$MOZ_ZLIB_LIBS -lz"],
+            [MOZ_SYSTEM_ZLIB=])
+        if test "$MOZ_SYSTEM_ZLIB" = 1; then
             MOZZLIBNUM=`echo $MOZZLIB | awk -F. changequote(<<, >>)'{printf "0x%x\n", (((<<$>>1 * 16 + <<$>>2) * 16) + <<$>>3) * 16 + <<$>>4}'changequote([, ])`
             AC_TRY_COMPILE([ #include <stdio.h>
                              #include <string.h>
                              #include <zlib.h> ],
                            [ #if ZLIB_VERNUM < $MOZZLIBNUM
                              #error "Insufficient zlib version ($MOZZLIBNUM required)."
                              #endif ],
-                           MOZ_NATIVE_ZLIB=1,
+                           MOZ_SYSTEM_ZLIB=1,
                            AC_MSG_ERROR([Insufficient zlib version for --with-system-zlib ($MOZZLIB required)]))
         fi
     fi
     CFLAGS=$_SAVE_CFLAGS
     LDFLAGS=$_SAVE_LDFLAGS
     LIBS=$_SAVE_LIBS
 fi
 
 AC_SUBST_LIST(MOZ_ZLIB_CFLAGS)
 AC_SUBST_LIST(MOZ_ZLIB_LIBS)
-AC_SUBST(MOZ_NATIVE_ZLIB)
+AC_SUBST(MOZ_SYSTEM_ZLIB)
 
 ])
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -36,24 +36,24 @@ ifdef WRAP_SYSTEM_INCLUDES
 export-preqs = \
   $(call mkdir_deps,system_wrappers) \
   $(NULL)
 
 export:: $(export-preqs)
 	$(PYTHON) -m mozbuild.action.preprocessor $(DEFINES) $(ACDEFINES) \
 		-DMOZ_TREE_CAIRO=$(MOZ_TREE_CAIRO) \
 		-DMOZ_TREE_PIXMAN=$(MOZ_TREE_PIXMAN) \
-		-DMOZ_NATIVE_HUNSPELL=$(MOZ_NATIVE_HUNSPELL) \
-		-DMOZ_NATIVE_BZ2=$(MOZ_NATIVE_BZ2) \
-		-DMOZ_NATIVE_ZLIB=$(MOZ_NATIVE_ZLIB) \
-		-DMOZ_NATIVE_PNG=$(MOZ_NATIVE_PNG) \
-		-DMOZ_NATIVE_JPEG=$(MOZ_NATIVE_JPEG) \
-		-DMOZ_NATIVE_LIBEVENT=$(MOZ_NATIVE_LIBEVENT) \
-		-DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \
-		-DMOZ_NATIVE_ICU=$(MOZ_NATIVE_ICU) \
+		-DMOZ_SYSTEM_HUNSPELL=$(MOZ_SYSTEM_HUNSPELL) \
+		-DMOZ_SYSTEM_BZ2=$(MOZ_SYSTEM_BZ2) \
+		-DMOZ_SYSTEM_ZLIB=$(MOZ_SYSTEM_ZLIB) \
+		-DMOZ_SYSTEM_PNG=$(MOZ_SYSTEM_PNG) \
+		-DMOZ_SYSTEM_JPEG=$(MOZ_SYSTEM_JPEG) \
+		-DMOZ_SYSTEM_LIBEVENT=$(MOZ_SYSTEM_LIBEVENT) \
+		-DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \
+		-DMOZ_SYSTEM_ICU=$(MOZ_SYSTEM_ICU) \
 		$(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
 	$(INSTALL) system_wrappers $(DIST)
 
 GARBAGE_DIRS += system_wrappers
 endif
 
 ifdef WRAP_STL_INCLUDES
 ifdef GNU_CXX
--- a/config/external/ffi/Makefile.in
+++ b/config/external/ffi/Makefile.in
@@ -1,12 +1,12 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-ifndef MOZ_NATIVE_FFI
+ifndef MOZ_SYSTEM_FFI
 
 include $(topsrcdir)/config/config.mk
 
 $(STATIC_LIBS):
 	$(MAKE) -C $(DEPTH)/js/src/ctypes/libffi
 
 endif
--- a/config/external/ffi/moz.build
+++ b/config/external/ffi/moz.build
@@ -1,17 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 Library('ffi')
 
-if CONFIG['MOZ_NATIVE_FFI']:
+if CONFIG['MOZ_SYSTEM_FFI']:
     OS_LIBS += CONFIG['MOZ_FFI_LIBS']
 else:
     if CONFIG['_MSC_VER']:
         prefix = 'lib'
     else:
         prefix = ''
     USE_LIBS += [
         'static:/js/src/ctypes/libffi/.libs/%sffi' % prefix,
--- a/config/external/icu/Makefile.in
+++ b/config/external/icu/Makefile.in
@@ -1,15 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # Ensure that this happens before including rules.mk
 ifdef USE_ICU
-  ifndef MOZ_NATIVE_ICU
+  ifndef MOZ_SYSTEM_ICU
   # Library names: On Windows, ICU uses modified library names for static
   # and debug libraries.
     ifdef MOZ_SHARED_ICU
       ifeq ($(OS_ARCH),WINNT)
         ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(libname)$(MOZ_ICU_DBG_SUFFIX)$(MOZ_ICU_VERSION).dll)
       else # ! WINNT
         ifeq ($(OS_ARCH),Darwin)
           ICU_FILES := $(foreach libname,$(ICU_LIB_NAMES),$(DEPTH)/intl/icu/target/lib/$(DLL_PREFIX)$(libname).$(MOZ_ICU_VERSION)$(DLL_SUFFIX))
@@ -24,23 +24,23 @@ ifdef USE_ICU
         ICU_TARGET := target
       endif
     else # !MOZ_SHARED_ICU
       ifeq ($(OS_ARCH),WINNT)
         ICU_LIB_RENAME = $(foreach libname,$(ICU_LIB_NAMES),\
                              cp -p $(DEPTH)/intl/icu/target/lib/s$(libname)$(MOZ_ICU_DBG_SUFFIX).lib $(DEPTH)/intl/icu/target/lib/$(libname)$(MOZ_ICU_DBG_SUFFIX).lib;)
       endif
     endif # MOZ_SHARED_ICU
-  endif # !MOZ_NATIVE_ICU
+  endif # !MOZ_SYSTEM_ICU
 endif # USE_ICU
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef USE_ICU
-ifndef MOZ_NATIVE_ICU
+ifndef MOZ_SYSTEM_ICU
 target:: buildicu
 $(STATIC_LIBS): buildicu
 
 # - Force ICU to use the standard suffix for object files because expandlibs
 #   will discard all files with a non-standard suffix (bug 857450).
 # - Options for genrb: -k strict parsing; -R omit collation tailoring rules.
 buildicu::
 # ICU's build system is full of races, so force non-parallel build.
--- a/config/external/icu/moz.build
+++ b/config/external/icu/moz.build
@@ -1,17 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 Library('icu')
 
-if CONFIG['MOZ_NATIVE_ICU']:
+if CONFIG['MOZ_SYSTEM_ICU']:
     OS_LIBS += CONFIG['MOZ_ICU_LIBS']
 else:
     # Order needs to be preserved
     for l in CONFIG['ICU_LIB_NAMES']:
         USE_LIBS += ['%s/intl/icu/target/lib/%s%s' % (
             'static:' if not CONFIG['MOZ_SHARED_ICU'] else '',
             l,
             CONFIG['MOZ_ICU_DBG_SUFFIX']
--- a/config/external/moz.build
+++ b/config/external/moz.build
@@ -5,40 +5,40 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 external_dirs = []
 
 DIRS += [
     'lgpllibs',
     'sqlite',
 ]
-if not CONFIG['MOZ_NATIVE_JPEG']:
+if not CONFIG['MOZ_SYSTEM_JPEG']:
     external_dirs += ['media/libjpeg']
 
 if CONFIG['MOZ_UPDATER']:
-    if not CONFIG['MOZ_NATIVE_BZ2']:
+    if not CONFIG['MOZ_SYSTEM_BZ2']:
         external_dirs += ['modules/libbz2']
 
 # There's no "native" brotli or woff2 yet, but probably in the future...
 external_dirs += ['modules/brotli']
 external_dirs += ['modules/woff2']
 
 if CONFIG['MOZ_VORBIS']:
     external_dirs += ['media/libvorbis']
 
 if CONFIG['MOZ_TREMOR']:
     external_dirs += ['media/libtremor']
 
 if CONFIG['MOZ_WEBM_ENCODER']:
     external_dirs += ['media/libmkv']
 
-if not CONFIG['MOZ_NATIVE_LIBVPX']:
+if not CONFIG['MOZ_SYSTEM_LIBVPX']:
     external_dirs += ['media/libvpx']
 
-if not CONFIG['MOZ_NATIVE_PNG']:
+if not CONFIG['MOZ_SYSTEM_PNG']:
     external_dirs += ['media/libpng']
 
 if CONFIG['CPU_ARCH'] == 'arm':
     external_dirs += ['media/openmax_dl']
 
 if CONFIG['MOZ_WEBSPEECH_POCKETSPHINX']:
     external_dirs += [
         'media/sphinxbase',
--- a/config/external/nss/Makefile.in
+++ b/config/external/nss/Makefile.in
@@ -1,14 +1,14 @@
 #
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-ifndef MOZ_NATIVE_NSS
+ifndef MOZ_SYSTEM_NSS
 
 CC_WRAPPER =
 CXX_WRAPPER =
 
 default::
 
 include $(topsrcdir)/config/makefiles/functions.mk
 
@@ -114,17 +114,17 @@ DEFAULT_GMAKE_FLAGS += DIST=$(ABS_DIST)
 DEFAULT_GMAKE_FLAGS += NSPR_INCLUDE_DIR=$(NSPR_INCLUDE_DIR)
 DEFAULT_GMAKE_FLAGS += NSPR_LIB_DIR=$(NSPR_LIB_DIR)
 DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1
 DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1
 DEFAULT_GMAKE_FLAGS += NSS_ENABLE_ECC=1
 ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_1)
 DEFAULT_GMAKE_FLAGS += OS_DLLFLAGS='-static-libgcc' NSPR31_LIB_PREFIX=lib
 endif
-ifndef MOZ_NATIVE_SQLITE
+ifndef MOZ_SYSTEM_SQLITE
 ifdef MOZ_FOLD_LIBS
 DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=nss3
 else
 DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=mozsqlite3
 DEFAULT_GMAKE_FLAGS += SQLITE_LIB_DIR=$(ABS_DIST)/../config/external/sqlite
 endif # MOZ_FOLD_LIBS
 DEFAULT_GMAKE_FLAGS += SQLITE_INCLUDE_DIR=$(ABS_DIST)/include
 endif
--- a/config/external/nss/crmf/moz.build
+++ b/config/external/nss/crmf/moz.build
@@ -1,17 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 Library('crmf')
 
-if CONFIG['MOZ_NATIVE_NSS']:
+if CONFIG['MOZ_SYSTEM_NSS']:
     OS_LIBS += [l for l in CONFIG['NSS_LIBS'] if l.startswith('-L')]
     OS_LIBS += ['-lcrmf']
 else:
     USE_LIBS += [
         # The dependency on nss is not real, but is required to force the
         # parent directory being built before this one. This has no
         # practical effect on linkage, since the only thing linking crmf
         # will need nss anyways.
--- a/config/external/nss/moz.build
+++ b/config/external/nss/moz.build
@@ -1,17 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['crmf']
 
-if CONFIG['MOZ_NATIVE_NSS']:
+if CONFIG['MOZ_SYSTEM_NSS']:
     Library('nss')
     OS_LIBS += CONFIG['NSS_LIBS']
 elif CONFIG['MOZ_FOLD_LIBS']:
     GeckoSharedLibrary('nss', linkage=None)
     # TODO: The library name can be changed when bug 845217 is fixed.
     SHARED_LIBRARY_NAME = 'nss3'
 
     SDK_LIBRARY = True
--- a/config/external/sqlite/moz.build
+++ b/config/external/sqlite/moz.build
@@ -1,15 +1,15 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-if CONFIG['MOZ_NATIVE_SQLITE']:
+if CONFIG['MOZ_SYSTEM_SQLITE']:
     Library('sqlite')
     OS_LIBS += CONFIG['SQLITE_LIBS']
 else:
     DIRS += ['../../../db/sqlite3/src']
     if CONFIG['MOZ_FOLD_LIBS']:
         Library('sqlite')
         # When folding libraries, sqlite is actually in the nss library.
         USE_LIBS += [
--- a/config/external/zlib/moz.build
+++ b/config/external/zlib/moz.build
@@ -1,17 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 Library('zlib')
 
-if CONFIG['MOZ_NATIVE_ZLIB']:
+if CONFIG['MOZ_SYSTEM_ZLIB']:
     OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
 else:
     if CONFIG['ZLIB_IN_MOZGLUE']:
         # Can't do this until mozglue is handled by moz.build instead of
         # config/rules.mk.
         # USE_LIBS += [
         #     'mozglue'
         # ]
--- a/config/system-headers
+++ b/config/system-headers
@@ -569,17 +569,17 @@ iostream.h
 istream
 iterator
 JavaControl.h
 JavaEmbedding/JavaControl.h
 JavaVM/jni.h
 JManager.h
 JNIEnvTests.h
 jni.h
-#if MOZ_NATIVE_JPEG==1
+#if MOZ_SYSTEM_JPEG==1
 jpeglib.h
 #endif
 JVMManagerTests.h
 Kerberos/Kerberos.h
 kernel/image.h
 kernel/OS.h
 LAction.h
 langinfo.h
@@ -1258,40 +1258,40 @@ X11/Xlocale.h
 X11/Xos.h
 X11/Xutil.h
 zmouse.h
 soundtouch/SoundTouch.h
 soundtouch/SoundTouchFactory.h
 #if MOZ_LIBAV_FFT==1
 libavcodec/avfft.h
 #endif
-#if MOZ_NATIVE_PNG==1
+#if MOZ_SYSTEM_PNG==1
 png.h
 #endif
-#if MOZ_NATIVE_ZLIB==1
+#if MOZ_SYSTEM_ZLIB==1
 zlib.h
 #endif
 #ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
 libsn/sn.h
 libsn/sn-common.h
 libsn/sn-launchee.h
 libsn/sn-launcher.h
 libsn/sn-monitor.h
 libsn/sn-util.h
 #endif
-#if MOZ_NATIVE_HUNSPELL==1
+#if MOZ_SYSTEM_HUNSPELL==1
 hunspell.hxx
 #endif
-#if MOZ_NATIVE_BZ2==1
+#if MOZ_SYSTEM_BZ2==1
 bzlib.h
 #endif
 #ifdef MOZ_ENABLE_GIO
 gio/gio.h
 #endif
-#if MOZ_NATIVE_LIBEVENT==1
+#if MOZ_SYSTEM_LIBEVENT==1
 event.h
 #else
 sys/event.h
 #endif
 #ifdef MOZ_ENABLE_LIBPROXY
 proxy.h
 #endif
 #ifdef MOZ_ENABLE_CONTENTMANAGER
@@ -1300,17 +1300,17 @@ SelectMultipleContentItemsPage.h
 QtSparql/qsparqlconnection.h
 QtSparql/qsparqlquery.h
 QtSparql/qsparqlresult.h
 #endif
 
 #if MOZ_TREE_PIXMAN!=1
 pixman.h
 #endif
-#if MOZ_NATIVE_LIBVPX==1
+#if MOZ_SYSTEM_LIBVPX==1
 vpx/svc_context.h
 vpx/vpx_codec.h
 vpx/vpx_decoder.h
 vpx/vpx_encoder.h
 vpx/vp8cx.h
 vpx/vp8dx.h
 vpx_mem/vpx_mem.h
 #endif
--- a/extensions/spellcheck/hunspell/moz.build
+++ b/extensions/spellcheck/hunspell/moz.build
@@ -1,12 +1,12 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['glue']
-if not CONFIG['MOZ_NATIVE_HUNSPELL']:
+if not CONFIG['MOZ_SYSTEM_HUNSPELL']:
     DIRS += ['src']
 
 if CONFIG['ENABLE_TESTS']:
     XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']    
--- a/ipc/chromium/moz.build
+++ b/ipc/chromium/moz.build
@@ -68,17 +68,17 @@ if os_win:
         'src/base/time_win.cc',
         'src/base/waitable_event_watcher_win.cc',
         'src/base/waitable_event_win.cc',
         'src/base/win_util.cc',
         'src/chrome/common/ipc_channel_win.cc',
         'src/chrome/common/process_watcher_win.cc',
         'src/chrome/common/transport_dib_win.cc',
     ]
-elif not CONFIG['MOZ_NATIVE_LIBEVENT']:
+elif not CONFIG['MOZ_SYSTEM_LIBEVENT']:
     DIRS += ['src/third_party']
 
 if os_posix:
     UNIFIED_SOURCES += [
         'src/base/condition_variable_posix.cc',
         'src/base/file_descriptor_shuffle.cc',
         'src/base/file_util_posix.cc',
         'src/base/lock_impl_posix.cc',
--- a/ipc/chromium/src/third_party/libeventcommon.mozbuild
+++ b/ipc/chromium/src/third_party/libeventcommon.mozbuild
@@ -23,15 +23,15 @@ else:
         libevent_include_suffix = 'bsd'
     else:
         os_linux = 1
         if CONFIG['OS_TARGET'] == 'Android':
             libevent_include_suffix = 'android'
         else:
             libevent_include_suffix = 'linux'
 
-if os_posix and not CONFIG['MOZ_NATIVE_LIBEVENT']:
+if os_posix and not CONFIG['MOZ_SYSTEM_LIBEVENT']:
     DEFINES['HAVE_CONFIG_H'] = True
     LOCAL_INCLUDES += sorted([
         'libevent',
         'libevent/include',
         'libevent/' + libevent_include_suffix,
     ])
--- a/ipc/chromium/src/third_party/moz.build
+++ b/ipc/chromium/src/third_party/moz.build
@@ -5,17 +5,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 libevent_path_prefix = '.'
 include(libevent_path_prefix + '/libeventcommon.mozbuild')
 
 if os_win:
     error('should not reach here on Windows')
 
-if CONFIG['MOZ_NATIVE_LIBEVENT']:
+if CONFIG['MOZ_SYSTEM_LIBEVENT']:
     error('should not reach here if we are using a native libevent')
 
 UNIFIED_SOURCES += [
     'libevent/buffer.c',
     'libevent/bufferevent.c',
     'libevent/bufferevent_ratelim.c',
     'libevent/bufferevent_sock.c',
     'libevent/event.c',
--- a/js/src/moz.build
+++ b/js/src/moz.build
@@ -553,17 +553,17 @@ else:
         'threading/posix/Mutex.cpp',
     ]
 
 if CONFIG['JS_HAS_CTYPES']:
     SOURCES += [
         'ctypes/CTypes.cpp',
         'ctypes/Library.cpp',
     ]
-    if not CONFIG['MOZ_NATIVE_FFI']:
+    if not CONFIG['MOZ_SYSTEM_FFI']:
         LOCAL_INCLUDES += [
             '!ctypes/libffi/include',
         ]
 
 if CONFIG['MOZ_VTUNE']:
     SOURCES += [
         'vtune/jitprofiling.c'
     ]
@@ -721,17 +721,17 @@ selfhosted.inputs = [
     'builtin/Set.js',
     'builtin/Sorting.js',
     'builtin/TypedArray.js',
     'builtin/TypedObject.js',
     'builtin/WeakSet.js'
 ]
 
 if CONFIG['JS_HAS_CTYPES']:
-    if CONFIG['MOZ_NATIVE_FFI']:
+    if CONFIG['MOZ_SYSTEM_FFI']:
         CXXFLAGS += CONFIG['MOZ_FFI_CFLAGS']
     else:
         # Windows needs this to be linked with a static library.
         DEFINES['FFI_BUILDING'] = True
 
 # Suppress warnings in third-party code.
 if CONFIG['CLANG_CXX']:
     SOURCES['jsdtoa.cpp'].flags += ['-Wno-implicit-fallthrough']
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -3366,17 +3366,17 @@ COMPILE_CXXFLAGS=`echo \
 
 HOST_CFLAGS=`echo \
     $HOST_CFLAGS`
 
 HOST_CXXFLAGS=`echo \
     $HOST_CXXFLAGS`
 
 AC_SUBST(_DEPEND_CFLAGS)
-AC_SUBST(MOZ_NATIVE_NSPR)
+AC_SUBST(MOZ_SYSTEM_NSPR)
 
 if test -n "$MOZ_NUWA_PROCESS"; then
     AC_DEFINE(MOZ_NUWA_PROCESS)
 fi
 
 OS_CFLAGS="$CFLAGS"
 OS_CXXFLAGS="$CXXFLAGS"
 OS_CPPFLAGS="$CPPFLAGS"
--- a/media/webrtc/signaling/test/common.build
+++ b/media/webrtc/signaling/test/common.build
@@ -100,20 +100,20 @@ if CONFIG['JS_SHARED_LIBRARY']:
 USE_LIBS += ['mozglue']
 
 OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS']
 OS_LIBS += CONFIG['REALTIME_LIBS']
 
 if CONFIG['MOZ_ALSA']:
     OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
 
-if CONFIG['MOZ_NATIVE_JPEG']:
+if CONFIG['MOZ_SYSTEM_JPEG']:
     OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
 
-if CONFIG['MOZ_NATIVE_LIBVPX']:
+if CONFIG['MOZ_SYSTEM_LIBVPX']:
     OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS']
 
 if not CONFIG['MOZ_TREE_PIXMAN']:
     OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2':
     OS_LIBS += CONFIG['XLIBS']
     OS_LIBS += CONFIG['MOZ_GTK2_LIBS']
--- a/memory/build/jemalloc_config.cpp
+++ b/memory/build/jemalloc_config.cpp
@@ -6,17 +6,17 @@
 
 #define MOZ_JEMALLOC_IMPL
 
 /* mozmemory_wrap.h needs to be included before MFBT headers */
 #include "mozmemory_wrap.h"
 #include <mozilla/Assertions.h>
 #include "mozilla/Types.h"
 
-#if defined(MOZ_NATIVE_JEMALLOC)
+#if defined(MOZ_SYSTEM_JEMALLOC)
 #include MALLOC_H
 #else
 #define DLLEXPORT
 #include "jemalloc/jemalloc.h"
 #endif
 
 #ifdef XP_WIN
 #include <windows.h>
--- a/memory/build/moz.build
+++ b/memory/build/moz.build
@@ -36,32 +36,32 @@ if CONFIG['MOZ_JEMALLOC4']:
 if CONFIG['MOZ_REPLACE_MALLOC']:
     SOURCES += [
         'replace_malloc.c',
     ]
 
 Library('memory')
 
 if CONFIG['MOZ_JEMALLOC4']:
-    if not CONFIG['MOZ_NATIVE_JEMALLOC']:
+    if not CONFIG['MOZ_SYSTEM_JEMALLOC']:
         USE_LIBS += [
             'jemalloc',
         ]
 else:
     USE_LIBS += [
         'mozjemalloc',
     ]
 
 if CONFIG['MOZ_GLUE_IN_PROGRAM']:
     SDK_LIBRARY = True
     DIST_INSTALL = True
 
 # Keep jemalloc separated when mozglue is statically linked
 if CONFIG['MOZ_MEMORY'] and (CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') or
-                             CONFIG['MOZ_NATIVE_JEMALLOC']):
+                             CONFIG['MOZ_SYSTEM_JEMALLOC']):
     FINAL_LIBRARY = 'mozglue'
 
 if CONFIG['MOZ_REPLACE_MALLOC'] and CONFIG['OS_TARGET'] == 'Darwin':
     # The zone allocator for OSX needs some jemalloc internal functions
     LOCAL_INCLUDES += ['/memory/jemalloc/src/include']
 
 if CONFIG['GNU_CC']:
     CFLAGS += ['-Wshadow']
--- a/memory/build/mozjemalloc_compat.c
+++ b/memory/build/mozjemalloc_compat.c
@@ -9,17 +9,17 @@
 #define MOZ_JEMALLOC_IMPL
 
 #include "mozmemory_wrap.h"
 #include "jemalloc_types.h"
 #include "mozilla/Types.h"
 
 #include <stdbool.h>
 
-#if defined(MOZ_NATIVE_JEMALLOC)
+#if defined(MOZ_SYSTEM_JEMALLOC)
 #  include MALLOC_H
 #else
 #  include "jemalloc/jemalloc.h"
 #endif
 
 /*
  *  CTL_* macros are from memory/jemalloc/src/src/stats.c with changes:
  *  - drop `t' argument to avoid redundancy in calculating type size
--- a/memory/build/mozmemory_wrap.h
+++ b/memory/build/mozmemory_wrap.h
@@ -120,17 +120,17 @@
 #  ifdef MFBT_API /* mozilla/Types.h was already included */
 #    error mozmemory_wrap.h has to be included before mozilla/Types.h when MOZ_MEMORY_IMPL is set and IMPL_MFBT is not.
 #  endif
 #  define IMPL_MFBT
 #endif
 
 #include "mozilla/Types.h"
 
-#if !defined(MOZ_NATIVE_JEMALLOC)
+#if !defined(MOZ_SYSTEM_JEMALLOC)
 #  ifdef MOZ_MEMORY_IMPL
 #    if defined(MOZ_JEMALLOC_IMPL) && defined(MOZ_REPLACE_MALLOC) && !defined(MOZ_REPLACE_JEMALLOC)
 #      define mozmem_malloc_impl(a)     je_ ## a
 #      define mozmem_jemalloc_impl(a)   je_ ## a
 #    else
 #      define MOZ_JEMALLOC_API MFBT_API
 #      ifdef MOZ_REPLACE_JEMALLOC
 #        define MOZ_MEMORY_API MFBT_API
@@ -152,21 +152,21 @@
 #    ifdef XP_WIN
 #      define mozmem_dup_impl(a)      wrap_ ## a
 #    endif
 #  endif
 
 /* All other jemalloc3 functions are prefixed with "je_", except when
  * building against an unprefixed system jemalloc library */
 #  define je_(a) je_ ## a
-#else /* defined(MOZ_NATIVE_JEMALLOC) */
+#else /* defined(MOZ_SYSTEM_JEMALLOC) */
 #  define je_(a) a
 #endif
 
-#if !defined(MOZ_MEMORY_IMPL) || defined(MOZ_NATIVE_JEMALLOC)
+#if !defined(MOZ_MEMORY_IMPL) || defined(MOZ_SYSTEM_JEMALLOC)
 #  define MOZ_MEMORY_API MFBT_API
 #  define MOZ_JEMALLOC_API MFBT_API
 #endif
 
 #ifndef MOZ_MEMORY_API
 #  define MOZ_MEMORY_API
 #endif
 #ifndef MOZ_JEMALLOC_API
--- a/memory/build/replace_malloc.c
+++ b/memory/build/replace_malloc.c
@@ -5,17 +5,17 @@
 #ifndef MOZ_MEMORY
 #  error Should not compile this file when MOZ_MEMORY is not set
 #endif
 
 #ifndef MOZ_REPLACE_MALLOC
 #  error Should not compile this file when replace-malloc is disabled
 #endif
 
-#ifdef MOZ_NATIVE_JEMALLOC
+#ifdef MOZ_SYSTEM_JEMALLOC
 #  error Should not compile this file when we want to use native jemalloc
 #endif
 
 #include "mozmemory_wrap.h"
 
 /* Declare all je_* functions */
 #define MALLOC_DECL(name, return_type, ...) \
   return_type je_ ## name(__VA_ARGS__);
--- a/memory/moz.build
+++ b/memory/moz.build
@@ -14,13 +14,13 @@ if not CONFIG['JS_STANDALONE']:
 
 if CONFIG['MOZ_MEMORY']:
     DIRS += [
         'build',
         'mozjemalloc',
     ]
 
     if CONFIG['MOZ_JEMALLOC4'] or CONFIG['MOZ_REPLACE_MALLOC']:
-        if not CONFIG['MOZ_NATIVE_JEMALLOC']:
+        if not CONFIG['MOZ_SYSTEM_JEMALLOC']:
             DIRS += ['jemalloc']
 
     if CONFIG['MOZ_REPLACE_MALLOC']:
         DIRS += ['replace']
--- a/mozglue/build/moz.build
+++ b/mozglue/build/moz.build
@@ -28,17 +28,17 @@ if CONFIG['OS_TARGET'] == 'WINNT':
     DEFFILE = 'mozglue.def'
     # We'll break the DLL blocklist if we immediately load user32.dll
     DELAYLOAD_DLLS += [
         'user32.dll',
     ]
 
 if not CONFIG['JS_STANDALONE']:
 
-    if CONFIG['MOZ_MEMORY'] and (CONFIG['MOZ_NATIVE_JEMALLOC'] or FORCE_SHARED_LIB):
+    if CONFIG['MOZ_MEMORY'] and (CONFIG['MOZ_SYSTEM_JEMALLOC'] or FORCE_SHARED_LIB):
         pass
         # TODO: SHARED_LIBRARY_LIBS go here
     else:
         # Temporary, until bug 662814 lands
         NO_VISIBILITY_FLAGS = True
         SOURCES += [
             'dummy.cpp',
         ]
--- a/old-configure.in
+++ b/old-configure.in
@@ -3259,55 +3259,55 @@ MOZ_ARG_WITH_STRING(system-libevent,
                           Use system libevent [installed at prefix PFX]],
     LIBEVENT_DIR=$withval)
 
 _SAVE_CFLAGS=$CFLAGS
 _SAVE_LDFLAGS=$LDFLAGS
 _SAVE_LIBS=$LIBS
 if test "$LIBEVENT_DIR" = yes; then
     PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent,
-        MOZ_NATIVE_LIBEVENT=1,
+        MOZ_SYSTEM_LIBEVENT=1,
         LIBEVENT_DIR=/usr)
 fi
 if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then
-    MOZ_NATIVE_LIBEVENT=
-elif test -z "$MOZ_NATIVE_LIBEVENT"; then
+    MOZ_SYSTEM_LIBEVENT=
+elif test -z "$MOZ_SYSTEM_LIBEVENT"; then
     CFLAGS="-I${LIBEVENT_DIR}/include $CFLAGS"
     LDFLAGS="-L${LIBEVENT_DIR}/lib $LDFLAGS"
     MOZ_CHECK_HEADER(event.h,
         [if test ! -f "${LIBEVENT_DIR}/include/event.h"; then
              AC_MSG_ERROR([event.h found, but is not in ${LIBEVENT_DIR}/include])
          fi],
         AC_MSG_ERROR([--with-system-libevent requested but event.h not found]))
     AC_CHECK_LIB(event, event_init,
-                 [MOZ_NATIVE_LIBEVENT=1
+                 [MOZ_SYSTEM_LIBEVENT=1
                   MOZ_LIBEVENT_CFLAGS="-I${LIBEVENT_DIR}/include"
                   MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"],
-                 [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_CFLAGS= MOZ_LIBEVENT_LIBS=])
+                 [MOZ_SYSTEM_LIBEVENT= MOZ_LIBEVENT_CFLAGS= MOZ_LIBEVENT_LIBS=])
 fi
 CFLAGS=$_SAVE_CFLAGS
 LDFLAGS=$_SAVE_LDFLAGS
 LIBS=$_SAVE_LIBS
 
-AC_SUBST(MOZ_NATIVE_LIBEVENT)
+AC_SUBST(MOZ_SYSTEM_LIBEVENT)
 
 dnl ========================================================
 dnl = If NSS was not detected in the system,
 dnl = use the one in the source tree (mozilla/security/nss)
 dnl ========================================================
 
 MOZ_ARG_WITH_BOOL(system-nss,
 [  --with-system-nss       Use system installed NSS],
     _USE_SYSTEM_NSS=1 )
 
 if test -n "$_USE_SYSTEM_NSS"; then
-    AM_PATH_NSS(3.23, [MOZ_NATIVE_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
-fi
-
-if test -n "$MOZ_NATIVE_NSS"; then
+    AM_PATH_NSS(3.23, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
+fi
+
+if test -n "$MOZ_SYSTEM_NSS"; then
    NSS_LIBS="$NSS_LIBS -lcrmf"
 else
    NSS_CFLAGS="-I${DIST}/include/nss"
 fi
 
 dnl ======================
 dnl Detect yasm
 dnl ======================
@@ -3372,50 +3372,50 @@ MOZ_ARG_WITH_STRING(system-jpeg,
 _SAVE_CFLAGS=$CFLAGS
 _SAVE_LDFLAGS=$LDFLAGS
 _SAVE_LIBS=$LIBS
 if test -n "${JPEG_DIR}" -a "${JPEG_DIR}" != "yes"; then
     CFLAGS="-I${JPEG_DIR}/include $CFLAGS"
     LDFLAGS="-L${JPEG_DIR}/lib $LDFLAGS"
 fi
 if test -z "$JPEG_DIR" -o "$JPEG_DIR" = no; then
-    MOZ_NATIVE_JPEG=
+    MOZ_SYSTEM_JPEG=
 else
-    AC_CHECK_LIB(jpeg, jpeg_destroy_compress, [MOZ_NATIVE_JPEG=1 MOZ_JPEG_LIBS="-ljpeg"], MOZ_NATIVE_JPEG=)
-fi
-
-if test "$MOZ_NATIVE_JPEG" = 1; then
+    AC_CHECK_LIB(jpeg, jpeg_destroy_compress, [MOZ_SYSTEM_JPEG=1 MOZ_JPEG_LIBS="-ljpeg"], MOZ_SYSTEM_JPEG=)
+fi
+
+if test "$MOZ_SYSTEM_JPEG" = 1; then
     AC_TRY_COMPILE([ #include <stdio.h>
                      #include <sys/types.h>
                      #include <jpeglib.h> ],
                    [ #if JPEG_LIB_VERSION < $MOZJPEG
                      #error "Insufficient JPEG library version ($MOZJPEG required)."
                      #endif
                      #ifndef JCS_EXTENSIONS
                      #error "libjpeg-turbo JCS_EXTENSIONS required"
                      #endif
                      ],
-                   MOZ_NATIVE_JPEG=1,
+                   MOZ_SYSTEM_JPEG=1,
                    AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg]))
 fi
 CFLAGS=$_SAVE_CFLAGS
 LDFLAGS=$_SAVE_LDFLAGS
 LIBS=$_SAVE_LIBS
 
-if test -n "${JPEG_DIR}" -a -d "${JPEG_DIR}" -a "$MOZ_NATIVE_JPEG" = 1; then
+if test -n "${JPEG_DIR}" -a -d "${JPEG_DIR}" -a "$MOZ_SYSTEM_JPEG" = 1; then
     MOZ_JPEG_CFLAGS="-I${JPEG_DIR}/include"
     MOZ_JPEG_LIBS="-L${JPEG_DIR}/lib ${MOZ_JPEG_LIBS}"
 fi
 fi # SKIP_LIBRARY_CHECKS
 
 dnl system ZLIB support
 dnl ========================================================
 MOZ_ZLIB_CHECK([1.2.3])
 
-if test "$MOZ_LINKER" = 1 -a "$MOZ_NATIVE_ZLIB" != 1; then
+if test "$MOZ_LINKER" = 1 -a "$MOZ_SYSTEM_ZLIB" != 1; then
     AC_MSG_ERROR([Custom dynamic linker requires --with-system-zlib])
 fi
 
 MOZ_PNG_ARM_NEON=
 
 if test -z "$SKIP_LIBRARY_CHECKS"; then
 dnl system BZIP2 Support
 dnl ========================================================
@@ -3427,26 +3427,26 @@ MOZ_ARG_WITH_STRING(system-bz2,
 _SAVE_CFLAGS=$CFLAGS
 _SAVE_LDFLAGS=$LDFLAGS
 _SAVE_LIBS=$LIBS
 if test -n "${BZ2_DIR}" -a "${BZ2_DIR}" != "yes"; then
     CFLAGS="-I${BZ2_DIR}/include $CFLAGS"
     LDFLAGS="-L${BZ2_DIR}/lib $LDFLAGS"
 fi
 if test -z "$BZ2_DIR" -o "$BZ2_DIR" = no; then
-    MOZ_NATIVE_BZ2=
+    MOZ_SYSTEM_BZ2=
 else
-    AC_CHECK_LIB(bz2, BZ2_bzread, [MOZ_NATIVE_BZ2=1 MOZ_BZ2_LIBS="-lbz2"],
-    [MOZ_NATIVE_BZ2= MOZ_BZ2_CFLAGS= MOZ_BZ2_LIBS=])
+    AC_CHECK_LIB(bz2, BZ2_bzread, [MOZ_SYSTEM_BZ2=1 MOZ_BZ2_LIBS="-lbz2"],
+    [MOZ_SYSTEM_BZ2= MOZ_BZ2_CFLAGS= MOZ_BZ2_LIBS=])
 fi
 CFLAGS=$_SAVE_CFLAGS
 LDFLAGS=$_SAVE_LDFLAGS
 LIBS=$_SAVE_LIBS
 
-if test "${BZ2_DIR}" -a -d "${BZ2_DIR}" -a "$MOZ_NATIVE_BZ2" = 1; then
+if test "${BZ2_DIR}" -a -d "${BZ2_DIR}" -a "$MOZ_SYSTEM_BZ2" = 1; then
     MOZ_BZ2_CFLAGS="-I${BZ2_DIR}/include"
     MOZ_BZ2_LIBS="-L${BZ2_DIR}/lib ${MOZ_BZ2_LIBS}"
 fi
 
 dnl ========================================================
 dnl system PNG Support
 dnl ========================================================
 MOZ_ARG_WITH_STRING(system-png,
@@ -3457,47 +3457,47 @@ MOZ_ARG_WITH_STRING(system-png,
 _SAVE_CFLAGS=$CFLAGS
 _SAVE_LDFLAGS=$LDFLAGS
 _SAVE_LIBS=$LIBS
 if test -n "${PNG_DIR}" -a "${PNG_DIR}" != "yes"; then
     CFLAGS="-I${PNG_DIR}/include $CFLAGS"
     LDFLAGS="-L${PNG_DIR}/lib $LDFLAGS"
 fi
 if test -z "$PNG_DIR" -o "$PNG_DIR" = no; then
-    MOZ_NATIVE_PNG=
+    MOZ_SYSTEM_PNG=
 else
-    AC_CHECK_LIB(png, png_get_valid, [MOZ_NATIVE_PNG=1 MOZ_PNG_LIBS="-lpng"],
+    AC_CHECK_LIB(png, png_get_valid, [MOZ_SYSTEM_PNG=1 MOZ_PNG_LIBS="-lpng"],
                  AC_MSG_ERROR([--with-system-png requested but no working libpng found]))
     AC_CHECK_LIB(png, png_get_acTL, ,
                  AC_MSG_ERROR([--with-system-png won't work because the system's libpng doesn't have APNG support]))
 fi
-if test "$MOZ_NATIVE_PNG" = 1; then
+if test "$MOZ_SYSTEM_PNG" = 1; then
     AC_TRY_COMPILE([ #include <stdio.h>
                      #include <sys/types.h>
                      #include <png.h> ],
                    [ #if PNG_LIBPNG_VER < $MOZPNG
                      #error "Insufficient libpng version ($MOZPNG required)."
                      #endif
                      #ifndef PNG_UINT_31_MAX
                      #error "Insufficient libpng version."
                      #endif ],
-                   MOZ_NATIVE_PNG=1,
+                   MOZ_SYSTEM_PNG=1,
                    AC_MSG_ERROR([--with-system-png requested but no working libpng found]))
 fi
 CFLAGS=$_SAVE_CFLAGS
 LDFLAGS=$_SAVE_LDFLAGS
 LIBS=$_SAVE_LIBS
 
-if test "${PNG_DIR}" -a -d "${PNG_DIR}" -a "$MOZ_NATIVE_PNG" = 1; then
+if test "${PNG_DIR}" -a -d "${PNG_DIR}" -a "$MOZ_SYSTEM_PNG" = 1; then
     MOZ_PNG_CFLAGS="-I${PNG_DIR}/include"
     MOZ_PNG_LIBS="-L${PNG_DIR}/lib ${MOZ_PNG_LIBS}"
 fi
 
 MOZ_PNG_ARM_NEON_CHECK=
-if test "$MOZ_NATIVE_PNG" != 1 -a "$CPU_ARCH" = "arm" ; then
+if test "$MOZ_SYSTEM_PNG" != 1 -a "$CPU_ARCH" = "arm" ; then
     MOZ_ARG_ENABLE_STRING(png-arm-neon-support,
         [  --enable-png-arm-neon-support=TYPE
              Options include:
                  no
                  check (default)
                  nocheck (faster but unsafe)],
         [MOZ_PNG_ARM_NEON_SUPPORT=$enableval ] )
     case "$MOZ_PNG_ARM_NEON_SUPPORT" in
@@ -3522,23 +3522,23 @@ fi # SKIP_LIBRARY_CHECKS
 AC_SUBST(MOZ_PNG_ARM_NEON)
 
 dnl ========================================================
 dnl system HunSpell Support
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(system-hunspell,
 [  --enable-system-hunspell
                           Use system hunspell (located with pkgconfig)],
-    MOZ_NATIVE_HUNSPELL=1 )
-
-if test -n "$MOZ_NATIVE_HUNSPELL"; then
+    MOZ_SYSTEM_HUNSPELL=1 )
+
+if test -n "$MOZ_SYSTEM_HUNSPELL"; then
     PKG_CHECK_MODULES(MOZ_HUNSPELL, hunspell)
 fi
 
-AC_SUBST(MOZ_NATIVE_HUNSPELL)
+AC_SUBST(MOZ_SYSTEM_HUNSPELL)
 
 dnl ========================================================
 dnl system libffi Support
 dnl ========================================================
 MOZ_CONFIG_FFI()
 
 dnl ========================================================
 dnl Java SDK support
@@ -5211,28 +5211,28 @@ if test -n "$MOZ_BUILD_MOBILE_ANDROID_WI
         AC_MSG_ERROR([Can only build mobile/android with Gradle])
     fi
 fi
 
 dnl system libvpx Support
 dnl ========================================================
 MOZ_ARG_WITH_BOOL(system-libvpx,
 [  --with-system-libvpx    Use system libvpx (located with pkgconfig)],
-    MOZ_NATIVE_LIBVPX=1)
+    MOZ_SYSTEM_LIBVPX=1)
 
 MOZ_LIBVPX_CFLAGS=
 MOZ_LIBVPX_LIBS=
 
 if test -n "$MOZ_VPX_ERROR_CONCEALMENT" ; then
     AC_DEFINE(MOZ_VPX_ERROR_CONCEALMENT)
 fi
 
 _SAVE_CFLAGS=$CFLAGS
 _SAVE_LIBS=$LIBS
-if test -n "$MOZ_NATIVE_LIBVPX"; then
+if test -n "$MOZ_SYSTEM_LIBVPX"; then
     dnl ============================
     dnl === libvpx Version check ===
     dnl ============================
     dnl Check to see if we have a system libvpx package.
     PKG_CHECK_MODULES(MOZ_LIBVPX, vpx >= 1.3.0)
 
     CFLAGS="$CFLAGS $MOZ_LIBVPX_CFLAGS"
     LIBS="$LIBS $MOZ_LIBVPX_LIBS"
@@ -5248,27 +5248,27 @@ if test -n "$MOZ_NATIVE_LIBVPX"; then
     if test "$ac_cv_header_vpx_mem_vpx_mem_h" = no -o \
             "$ac_cv_func_vpx_mem_set_functions" = no; then
         AC_DEFINE(MOZ_VPX_NO_MEM_REPORTING)
     fi
 fi
 CFLAGS=$_SAVE_CFLAGS
 LIBS=$_SAVE_LIBS
 
-AC_SUBST(MOZ_NATIVE_LIBVPX)
+AC_SUBST(MOZ_SYSTEM_LIBVPX)
 AC_SUBST_LIST(MOZ_LIBVPX_CFLAGS)
 AC_SUBST_LIST(MOZ_LIBVPX_LIBS)
 
 if test "$MOZ_SAMPLE_TYPE_FLOAT32"; then
     MOZ_VORBIS=1
 else
     MOZ_TREMOR=1
 fi
 
-if test -z "$MOZ_NATIVE_LIBVPX"; then
+if test -z "$MOZ_SYSTEM_LIBVPX"; then
 
     dnl Detect if we can use an assembler to compile optimized assembly for libvpx.
     dnl We currently require yasm on all x86 platforms and require yasm 1.1.0 on Win32.
     dnl We currently require gcc on all arm platforms.
     VPX_NEED_OBJ_INT_EXTRACT=
 
     dnl See if we have assembly on this platform.
     case "$OS_ARCH:$CPU_ARCH" in
@@ -5878,26 +5878,26 @@ if test -z "$MOZ_CRASHREPORTER_ENABLE_PE
 fi
 AC_DEFINE_UNQUOTED(MOZ_CRASHREPORTER_ENABLE_PERCENT, $MOZ_CRASHREPORTER_ENABLE_PERCENT)
 
 dnl ========================================================
 dnl = libjpeg-turbo configuration
 dnl ========================================================
 MOZ_LIBJPEG_TURBO=
 LIBJPEG_TURBO_USE_YASM=
-if test -z "$MOZ_NATIVE_JPEG"; then
+if test -z "$MOZ_SYSTEM_JPEG"; then
     MOZ_LIBJPEG_TURBO=1
 fi
 
 MOZ_ARG_DISABLE_BOOL(libjpeg_turbo,
 [ --disable-libjpeg-turbo  Disable optimized jpeg decoding routines],
     MOZ_LIBJPEG_TURBO=,
     MOZ_LIBJPEG_TURBO=1)
 
-if test "$MOZ_NATIVE_JPEG" = 1 -a "$MOZ_LIBJPEG_TURBO" = 1; then
+if test "$MOZ_SYSTEM_JPEG" = 1 -a "$MOZ_LIBJPEG_TURBO" = 1; then
     AC_MSG_ERROR([cannot use --with-system-jpeg with --enable-libjpeg-turbo.])
 fi
 
 dnl Detect if we can use yasm to compile libjpeg-turbo's optimized assembly
 dnl files.
 
 if test -n "$MOZ_LIBJPEG_TURBO"; then
 
@@ -6444,23 +6444,23 @@ else
         AC_MSG_ERROR([Cannot build Firefox with --disable-feeds.])
     fi
 fi
 
 dnl ========================================================
 dnl Check for sqlite
 dnl ========================================================
 
-MOZ_NATIVE_SQLITE=
+MOZ_SYSTEM_SQLITE=
 MOZ_ARG_ENABLE_BOOL(system-sqlite,
 [  --enable-system-sqlite  Use system sqlite (located with pkgconfig)],
-MOZ_NATIVE_SQLITE=1,
-MOZ_NATIVE_SQLITE= )
-
-if test -n "$MOZ_NATIVE_SQLITE"
+MOZ_SYSTEM_SQLITE=1,
+MOZ_SYSTEM_SQLITE= )
+
+if test -n "$MOZ_SYSTEM_SQLITE"
 then
     dnl ============================
     dnl === SQLite Version check ===
     dnl ============================
     dnl Check to see if the system SQLite package is new enough.
     PKG_CHECK_MODULES(SQLITE, sqlite3 >= $SQLITE_VERSION)
 
     dnl ==================================
@@ -6604,20 +6604,20 @@ then
     AC_MSG_RESULT($ac_cv_sqlite_dbstat_vtab)
     CFLAGS="$_SAVE_CFLAGS"
     LIBS="$_SAVE_LIBS"
     if test "x$ac_cv_sqlite_dbstat_vtab" = "xno"; then
         AC_MSG_ERROR([System SQLite library is not compiled with SQLITE_ENABLE_DBSTAT_VTAB.])
     fi
 fi
 
-if test -n "$MOZ_NATIVE_SQLITE"; then
-    AC_DEFINE(MOZ_NATIVE_SQLITE)
-fi
-AC_SUBST(MOZ_NATIVE_SQLITE)
+if test -n "$MOZ_SYSTEM_SQLITE"; then
+    AC_DEFINE(MOZ_SYSTEM_SQLITE)
+fi
+AC_SUBST(MOZ_SYSTEM_SQLITE)
 
 dnl ========================================================
 dnl = Enable help viewer (off by default)
 dnl ========================================================
 if test -n "$MOZ_HELP_VIEWER"; then
      dnl Do this if defined in confvars.sh
      AC_DEFINE(MOZ_HELP_VIEWER)
 fi
@@ -6897,17 +6897,17 @@ MOZ_ARG_ENABLE_BOOL(replace-malloc,
     MOZ_REPLACE_MALLOC= )
 
 if test -n "$MOZ_REPLACE_MALLOC" -a -z "$MOZ_MEMORY"; then
     dnl We don't want to enable jemalloc unconditionally because it may be a
     dnl deliberate choice not to enable it (bug 702250, for instance)
     AC_MSG_ERROR([--enable-replace-malloc requires --enable-jemalloc])
 elif test -n "$MOZ_REPLACE_MALLOC"; then
     AC_DEFINE(MOZ_REPLACE_MALLOC)
-    MOZ_NATIVE_JEMALLOC=
+    MOZ_SYSTEM_JEMALLOC=
 
     dnl Replace-malloc Mac linkage quirks
     if test -n "$MACOSX_DEPLOYMENT_TARGET"; then
         AC_CACHE_CHECK([how to do weak dynamic linking],
             ac_cv_weak_dynamic_linking,
             [echo 'extern void foo() __attribute__((weak_import));int bar() { if (foo) foo(); return 0; }' > conftest.c
              if AC_TRY_COMMAND([${CC-cc} -o conftest${DLL_SUFFIX} $CFLAGS -dynamiclib $LDFLAGS -Wl,-U,_foo conftest.c $LIBS 1>&5]) &&
                 test -s conftest${DLL_SUFFIX}; then
@@ -6959,25 +6959,25 @@ fi
 AC_SUBST(MOZ_REPLACE_MALLOC)
 AC_SUBST(MOZ_REPLACE_MALLOC_LINKAGE)
 
 dnl ========================================================
 dnl = Jemalloc build setup
 dnl ========================================================
 if test -z "$MOZ_MEMORY"; then
   if test -n "$MOZ_JEMALLOC4" -a -z "$MOZ_REPLACE_MALLOC"; then
-    MOZ_NATIVE_JEMALLOC=1
+    MOZ_SYSTEM_JEMALLOC=1
     AC_CHECK_FUNCS(mallctl nallocx,,
-      [MOZ_NATIVE_JEMALLOC=
+      [MOZ_SYSTEM_JEMALLOC=
        break])
-    if test -n "$MOZ_NATIVE_JEMALLOC"; then
+    if test -n "$MOZ_SYSTEM_JEMALLOC"; then
       MOZ_MEMORY=1
       AC_DEFINE(MOZ_MEMORY)
       AC_DEFINE(MOZ_JEMALLOC4)
-      AC_DEFINE(MOZ_NATIVE_JEMALLOC)
+      AC_DEFINE(MOZ_SYSTEM_JEMALLOC)
     fi
   fi
   case "${target}" in
     *-mingw*)
       if test -z "$WIN32_REDIST_DIR" -a -z "$MOZ_DEBUG"; then
         AC_MSG_WARN([When not building jemalloc, you need to set WIN32_REDIST_DIR to the path to the Visual C++ Redist (usually VCINSTALLDIR\redist\x86\Microsoft.VC80.CRT, for VC++ v8) if you intend to distribute your build.])
       fi
       ;;
@@ -7032,17 +7032,17 @@ else
     ;;
   *)
     AC_MSG_ERROR([--enable-jemalloc not supported on ${target}])
     ;;
   esac
 fi # MOZ_MEMORY
 AC_SUBST(MOZ_MEMORY)
 AC_SUBST(MOZ_JEMALLOC4)
-AC_SUBST(MOZ_NATIVE_JEMALLOC)
+AC_SUBST(MOZ_SYSTEM_JEMALLOC)
 AC_SUBST(MOZ_CRT)
 export MOZ_CRT
 AC_SUBST(MOZ_GLUE_IN_PROGRAM)
 AC_SUBST_LIST(WIN32_CRT_LIBS)
 
 # Allow the application to provide a subconfigure script.
 # This should be after 'export MOZ_NO_DEBUG_RTL=1' since
 # ldap/c-sdk/configure refers to the enviroment value.
@@ -7746,17 +7746,17 @@ fi
 
 dnl ========================================================
 dnl =
 dnl = Static Build Options
 dnl =
 dnl ========================================================
 MOZ_ARG_HEADER(Static build options)
 
-if test -z "$MOZ_NATIVE_ZLIB"; then
+if test -z "$MOZ_SYSTEM_ZLIB"; then
 if test -n "$JS_SHARED_LIBRARY"; then
   ZLIB_IN_MOZGLUE=1
   AC_DEFINE(ZLIB_IN_MOZGLUE)
 fi
 fi
 
 AC_SUBST(ZLIB_IN_MOZGLUE)
 
@@ -8590,19 +8590,19 @@ COMPILE_CXXFLAGS=`echo \
 
 HOST_CFLAGS=`echo \
     $HOST_CFLAGS`
 
 HOST_CXXFLAGS=`echo \
     $HOST_CXXFLAGS`
 
 AC_SUBST(_DEPEND_CFLAGS)
-AC_SUBST(MOZ_NATIVE_JPEG)
-AC_SUBST(MOZ_NATIVE_PNG)
-AC_SUBST(MOZ_NATIVE_BZ2)
+AC_SUBST(MOZ_SYSTEM_JPEG)
+AC_SUBST(MOZ_SYSTEM_PNG)
+AC_SUBST(MOZ_SYSTEM_BZ2)
 
 AC_SUBST_LIST(MOZ_JPEG_CFLAGS)
 AC_SUBST_LIST(MOZ_JPEG_LIBS)
 AC_SUBST_LIST(MOZ_BZ2_CFLAGS)
 AC_SUBST_LIST(MOZ_BZ2_LIBS)
 AC_SUBST_LIST(MOZ_PNG_CFLAGS)
 AC_SUBST_LIST(MOZ_PNG_LIBS)
 
@@ -8615,19 +8615,19 @@ if test "$MOZ_WIDGET_TOOLKIT" = gonk -a 
     if test -z "$MOZ_NUWA_PROCESS"; then
        AC_MSG_ERROR([B2G loader works with Nuwa]);
     fi
     export MOZ_B2G_LOADER
     AC_DEFINE(MOZ_B2G_LOADER)
 fi
 AC_SUBST(MOZ_B2G_LOADER)
 
-AC_SUBST(MOZ_NATIVE_NSPR)
-
-AC_SUBST(MOZ_NATIVE_NSS)
+AC_SUBST(MOZ_SYSTEM_NSPR)
+
+AC_SUBST(MOZ_SYSTEM_NSS)
 AC_SUBST(NSS_DISABLE_DBM)
 
 HOST_CMFLAGS=-fobjc-exceptions
 HOST_CMMFLAGS=-fobjc-exceptions
 OS_COMPILE_CMFLAGS=-fobjc-exceptions
 OS_COMPILE_CMMFLAGS=-fobjc-exceptions
 if test "$MOZ_WIDGET_TOOLKIT" = uikit; then
   OS_COMPILE_CMFLAGS="$OS_COMPILE_CMFLAGS -fobjc-abi-version=2 -fobjc-legacy-dispatch"
@@ -8915,17 +8915,17 @@ fi
 
 if test "$MOZ_TREE_FREETYPE"; then
    export CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS -std=c99"
    export CPPFLAGS="$CPPFLAGS $MOZ_DEBUG_FLAGS"
    export CXXFLAGS="$CXXFLAGS $MOZ_DEBUG_FLAGS"
    export LDFLAGS="$LDFLAGS $MOZ_DEBUG_LDFLAGS"
    # Spaces in the *_CFLAGS and *_LIBS variables are intentionally placed
    # to force freetype to use our settings rather than autodetecting
-   if test -n "$MOZ_NATIVE_PNG"; then
+   if test -n "$MOZ_SYSTEM_PNG"; then
      export LIBPNG_CFLAGS="$MOZ_PNG_CFLAGS "
    else
      export LIBPNG_CFLAGS="-I$_objdir/dist/include"
    fi
    export LIBPNG_LIBS="$MOZ_PNG_LIBS "
    export ZLIB_CFLAGS="$MOZ_ZLIB_CFLAGS "
    export ZLIB_LIBS="$MOZ_ZLIB_LIBS "
    export CONFIG_FILES="unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config freetype2.pc:freetype2.in"
@@ -9015,17 +9015,17 @@ if test -n "$NSPR_CFLAGS" -o -n "$NSPR_L
 fi
 ac_configure_args="$ac_configure_args --prefix=$dist"
 if test "$MOZ_MEMORY"; then
    ac_configure_args="$ac_configure_args --enable-jemalloc"
 fi
 if test -n "$ZLIB_IN_MOZGLUE"; then
    MOZ_ZLIB_LIBS=
 fi
-export MOZ_NATIVE_ZLIB
+export MOZ_SYSTEM_ZLIB
 export MOZ_ZLIB_CFLAGS
 export MOZ_ZLIB_LIBS
 export MOZ_APP_NAME
 export MOZ_APP_REMOTINGNAME
 export RUSTC
 export MOZILLA_CENTRAL_PATH=$_topsrcdir
 export STLPORT_CPPFLAGS
 export STLPORT_LIBS
--- a/other-licenses/bsdiff/moz.build
+++ b/other-licenses/bsdiff/moz.build
@@ -5,17 +5,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 HOST_SOURCES += [
     'bsdiff.c',
 ]
 
 HostProgram('mbsdiff')
 
-if CONFIG['MOZ_NATIVE_BZ2']:
+if CONFIG['MOZ_SYSTEM_BZ2']:
     HOST_OS_LIBS += CONFIG['MOZ_BZ2_LIBS']
 else:
     HOST_USE_LIBS += [
         'hostbz2',
     ]
 
 if CONFIG['HOST_OS_ARCH'] == 'WINNT':
     HOST_OS_LIBS += [
--- a/services/crypto/modules/WeaveCrypto.js
+++ b/services/crypto/modules/WeaveCrypto.js
@@ -126,17 +126,17 @@ WeaveCrypto.prototype = {
         // implicitly initialize NSS.
         Cc["@mozilla.org/psm;1"].getService(Ci.nsISupports);
 
         // Open the NSS library.
         let path = ctypes.libraryName("nss3");
 
         // XXX really want to be able to pass specific dlopen flags here.
         var nsslib;
-        if (AppConstants.MOZ_NATIVE_NSS) {
+        if (AppConstants.MOZ_SYSTEM_NSS) {
             // Search platform-dependent library paths for system NSS.
             this.log("Trying NSS library without path");
             nsslib = ctypes.open(path);
         } else {
             let file = Services.dirsvc.get("GreBinD", Ci.nsILocalFile);
             file.append(path);
             this.log("Trying NSS library with path " + file.path);
             nsslib = ctypes.open(file.path);
--- a/storage/SQLiteMutex.h
+++ b/storage/SQLiteMutex.h
@@ -45,17 +45,17 @@ public:
    */
   void initWithMutex(sqlite3_mutex *aMutex)
   {
     NS_ASSERTION(aMutex, "You must pass in a valid mutex!");
     NS_ASSERTION(!mMutex, "A mutex has already been set for this!");
     mMutex = aMutex;
   }
 
-#if !defined(DEBUG) || defined(MOZ_NATIVE_SQLITE)
+#if !defined(DEBUG) || defined(MOZ_SYSTEM_SQLITE)
   /**
    * Acquires the mutex.
    */
   void lock()
   {
     sqlite3_mutex_enter(mMutex);
   }
 
--- a/storage/moz.build
+++ b/storage/moz.build
@@ -93,18 +93,18 @@ FINAL_LIBRARY = 'xul'
 # of memory using the default allocator, prior to the storage service
 # registering its allocator, causing memory management failures (bug 938730).
 # However, this is not an issue if both the jemalloc allocator and the default
 # allocator are the same thing.
 #
 # Note: On Windows our sqlite build assumes we use jemalloc.  If you disable
 # MOZ_STORAGE_MEMORY on Windows, you will also need to change the "ifdef
 # MOZ_MEMORY" options in db/sqlite3/src/Makefile.in.
-if CONFIG['MOZ_MEMORY'] and (not CONFIG['MOZ_NATIVE_SQLITE']
-                             or CONFIG['MOZ_NATIVE_JEMALLOC']):
+if CONFIG['MOZ_MEMORY'] and (not CONFIG['MOZ_SYSTEM_SQLITE']
+                             or CONFIG['MOZ_SYSTEM_JEMALLOC']):
     if CONFIG['OS_TARGET'] != 'Android':
         DEFINES['MOZ_STORAGE_MEMORY'] = True
 
 # This is the default value.  If we ever change it when compiling sqlite, we
 # will need to change it here as well.
 DEFINES['SQLITE_MAX_LIKE_PATTERN_LENGTH'] = 50000
 
 LOCAL_INCLUDES += [
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -209,29 +209,29 @@ if CONFIG['OS_ARCH'] == 'Linux' and CONF
     OS_LIBS += [
         'rt',
     ]
 
 OS_LIBS += CONFIG['MOZ_CAIRO_OSLIBS']
 OS_LIBS += CONFIG['MOZ_WEBRTC_X11_LIBS']
 OS_LIBS += CONFIG['MOZ_SERVO_LIBS']
 
-if CONFIG['MOZ_NATIVE_JPEG']:
+if CONFIG['MOZ_SYSTEM_JPEG']:
     OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
 
-if CONFIG['MOZ_NATIVE_PNG']:
+if CONFIG['MOZ_SYSTEM_PNG']:
     OS_LIBS += CONFIG['MOZ_PNG_LIBS']
 
-if CONFIG['MOZ_NATIVE_HUNSPELL']:
+if CONFIG['MOZ_SYSTEM_HUNSPELL']:
     OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
 
-if CONFIG['MOZ_NATIVE_LIBEVENT']:
+if CONFIG['MOZ_SYSTEM_LIBEVENT']:
     OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
 
-if CONFIG['MOZ_NATIVE_LIBVPX']:
+if CONFIG['MOZ_SYSTEM_LIBVPX']:
     OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS']
 
 if not CONFIG['MOZ_TREE_PIXMAN']:
     OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']
 
 if CONFIG['MOZ_ALSA']:
     OS_LIBS += CONFIG['MOZ_ALSA_LIBS']
 
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -229,18 +229,18 @@ this.AppConstants = Object.freeze({
 
   MOZ_GRAPHENE:
 #ifdef MOZ_GRAPHENE
   true,
 #else
   false,
 #endif
 
-  MOZ_NATIVE_NSS:
-#ifdef MOZ_NATIVE_NSS
+  MOZ_SYSTEM_NSS:
+#ifdef MOZ_SYSTEM_NSS
   true,
 #else
   false,
 #endif
 
   MOZ_PLACES:
 #ifdef MOZ_PLACES
   true,
--- a/toolkit/modules/moz.build
+++ b/toolkit/modules/moz.build
@@ -118,14 +118,14 @@ for var in ('ANDROID_PACKAGE_NAME',
             'MOZ_WIDGET_TOOLKIT',
             'DLL_PREFIX',
             'DLL_SUFFIX',
             'DEBUG_JS_MODULES'):
             DEFINES[var] = CONFIG[var]
 
 for var in ('MOZ_TOOLKIT_SEARCH',
             'MOZ_REQUIRE_SIGNING',
-            'MOZ_NATIVE_NSS',
+            'MOZ_SYSTEM_NSS',
             'MOZ_UPDATER'):
     if CONFIG[var]:
         DEFINES[var] = True
 
 DEFINES['TOPOBJDIR'] = TOPOBJDIR
--- a/toolkit/mozapps/installer/upload-files.mk
+++ b/toolkit/mozapps/installer/upload-files.mk
@@ -57,33 +57,33 @@ ifdef UNIVERSAL_BINARY
 SDK           = $(SDK_PATH)$(PKG_BASENAME)-$(TARGET_CPU).sdk$(SDK_SUFFIX)
 endif
 
 # JavaScript Shell packaging
 JSSHELL_BINS  = \
   js$(BIN_SUFFIX) \
   $(DLL_PREFIX)mozglue$(DLL_SUFFIX) \
   $(NULL)
-ifndef MOZ_NATIVE_NSPR
+ifndef MOZ_SYSTEM_NSPR
 ifdef MSVC_C_RUNTIME_DLL
 JSSHELL_BINS += $(MSVC_C_RUNTIME_DLL)
 endif
 ifdef MSVC_CXX_RUNTIME_DLL
 JSSHELL_BINS += $(MSVC_CXX_RUNTIME_DLL)
 endif
 ifdef MOZ_FOLD_LIBS
 JSSHELL_BINS += $(DLL_PREFIX)nss3$(DLL_SUFFIX)
 else
 JSSHELL_BINS += \
   $(DLL_PREFIX)nspr4$(DLL_SUFFIX) \
   $(DLL_PREFIX)plds4$(DLL_SUFFIX) \
   $(DLL_PREFIX)plc4$(DLL_SUFFIX) \
   $(NULL)
 endif # MOZ_FOLD_LIBS
-endif # MOZ_NATIVE_NSPR
+endif # MOZ_SYSTEM_NSPR
 ifdef MOZ_SHARED_ICU
 ifeq ($(OS_TARGET), WINNT)
 JSSHELL_BINS += \
   icudt$(MOZ_ICU_DBG_SUFFIX)$(MOZ_ICU_VERSION).dll \
   icuin$(MOZ_ICU_DBG_SUFFIX)$(MOZ_ICU_VERSION).dll \
   icuuc$(MOZ_ICU_DBG_SUFFIX)$(MOZ_ICU_VERSION).dll \
   $(NULL)
 else
--- a/toolkit/mozapps/update/updater/updater-common.build
+++ b/toolkit/mozapps/update/updater/updater-common.build
@@ -55,17 +55,17 @@ else:
     USE_LIBS += [
         'updatecommon',
     ]
 
 USE_LIBS += [
     'mar',
 ]
 
-if CONFIG['MOZ_NATIVE_BZ2']:
+if CONFIG['MOZ_SYSTEM_BZ2']:
     OS_LIBS += CONFIG['MOZ_BZ2_LIBS']
 else:
     USE_LIBS += [
         'bz2',
     ]
 
 if CONFIG['MOZ_ENABLE_GTK']:
     have_progressui = 1