Remove support for critical system libraries.

master
Fedor 2020-03-12 20:41:16 +03:00
parent 5bed5f8005
commit 1d5989be3d
26 changed files with 52 additions and 508 deletions

View File

@ -8,19 +8,6 @@ dnl ICU library, as well as a few other things.
AC_DEFUN([MOZ_CONFIG_ICU], [
ICU_LIB_NAMES=
MOZ_SYSTEM_ICU=
MOZ_ARG_WITH_BOOL(system-icu,
[ --with-system-icu
Use system ICU (located with pkgconfig)],
MOZ_SYSTEM_ICU=1)
if test -n "$MOZ_SYSTEM_ICU"; then
PKG_CHECK_MODULES(MOZ_ICU, icu-i18n >= 58.1)
CFLAGS="$CFLAGS $MOZ_ICU_CFLAGS"
CXXFLAGS="$CXXFLAGS $MOZ_ICU_CFLAGS"
fi
AC_SUBST(MOZ_SYSTEM_ICU)
dnl We always use ICU.
USE_ICU=1
@ -51,7 +38,7 @@ if test -n "$USE_ICU"; then
dnl We also don't do it on Windows because sometimes the file goes
dnl missing -- possibly due to overzealous antivirus software? --
dnl which prevents the browser from starting up :(
if test -z "$JS_STANDALONE" -a -z "$MOZ_SYSTEM_ICU" -a "$OS_TARGET" != WINNT -a "$MOZ_WIDGET_TOOLKIT" != "android"; then
if test -z "$JS_STANDALONE" -a "$OS_TARGET" != WINNT -a "$MOZ_WIDGET_TOOLKIT" != "android"; then
MOZ_ICU_DATA_ARCHIVE=1
else
MOZ_ICU_DATA_ARCHIVE=
@ -64,7 +51,7 @@ AC_SUBST(USE_ICU)
AC_SUBST(ICU_DATA_FILE)
AC_SUBST(MOZ_ICU_DATA_ARCHIVE)
if test -n "$USE_ICU" -a -z "$MOZ_SYSTEM_ICU"; then
if test -n "$USE_ICU"; then
if test -z "$YASM" -a -z "$GNU_AS" -a "$COMPILE_ENVIRONMENT"; then
AC_MSG_ERROR([Building ICU requires either yasm or a GNU assembler. If you do not have either of those available for this platform you must use --without-intl-api])
fi

View File

@ -42,15 +42,6 @@ if test "$MOZ_BUILD_APP" != js || test -n "$JS_STANDALONE"; then
_IS_OUTER_CONFIGURE=1
fi
MOZ_ARG_WITH_BOOL(system-nspr,
[ --with-system-nspr Use an NSPR that is already built and installed.
Use the 'nspr-config' script in the current path,
or look for the script in the directories given with
--with-nspr-exec-prefix or --with-nspr-prefix.
(Those flags are only checked if you specify
--with-system-nspr.)],
_USE_SYSTEM_NSPR=1 )
JS_POSIX_NSPR=unset
ifdef([CONFIGURING_JS],[
if test -n "$JS_STANDALONE"; then
@ -71,7 +62,6 @@ ifdef([CONFIGURING_JS],[
])
dnl Pass at most one of
dnl --with-system-nspr
dnl --with-nspr-cflags/libs
dnl --enable-nspr-build
dnl --enable-posix-nspr-emulation
@ -79,10 +69,6 @@ dnl --enable-posix-nspr-emulation
AC_MSG_CHECKING([NSPR selection])
nspr_opts=
which_nspr=default
if test -n "$_USE_SYSTEM_NSPR"; then
nspr_opts="x$nspr_opts"
which_nspr="system"
fi
if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
nspr_opts="x$nspr_opts"
which_nspr="command-line"
@ -136,11 +122,7 @@ fi
# anything itself.
if test -n "$_IS_OUTER_CONFIGURE"; then
if test -n "$_USE_SYSTEM_NSPR"; then
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_SYSTEM_NSPR" -o -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
if test -n "$NSPR_CFLAGS" -o -n "$NSPR_LIBS"; then
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $NSPR_CFLAGS"
AC_TRY_COMPILE([#include "prtypes.h"],
@ -178,19 +160,7 @@ AC_SUBST(NSPR_INCLUDE_DIR)
AC_SUBST(NSPR_LIB_DIR)
PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr"
if test -n "$MOZ_SYSTEM_NSPR"; then
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $NSPR_CFLAGS"
AC_TRY_COMPILE([#include "prlog.h"],
[#ifndef PR_STATIC_ASSERT
#error PR_STATIC_ASSERT not defined
#endif],
,
AC_MSG_ERROR([system NSPR does not support PR_STATIC_ASSERT]))
CFLAGS=$_SAVE_CFLAGS
# piggy back on $MOZ_SYSTEM_NSPR to set a variable for the nspr check for js.pc
PKGCONF_REQUIRES_PRIVATE="Requires.private: nspr >= $NSPR_MINVER"
elif test -n "$JS_POSIX_NSPR"; then
if test -n "$JS_POSIX_NSPR"; then
PKGCONF_REQUIRES_PRIVATE=
fi
AC_SUBST([PKGCONF_REQUIRES_PRIVATE])

View File

@ -33,15 +33,9 @@ if ('MOZ_OFFICIAL_BRANDING' in listConfig) or (strBrandingDirectory.endswith("br
# Applies to Pale Moon and Basilisk
if ('MC_BASILISK' in listConfig) or ('MC_PALEMOON' in listConfig):
listViolations += [
'MOZ_SYSTEM_LIBEVENT',
'MOZ_SYSTEM_NSS',
'MOZ_SYSTEM_NSPR',
'MOZ_SYSTEM_JPEG',
'MOZ_SYSTEM_ZLIB',
'MOZ_SYSTEM_BZ2',
'MOZ_SYSTEM_PNG',
'MOZ_SYSTEM_LIBVPX',
'MOZ_SYSTEM_SQLITE',
'MOZ_SYSTEM_JEMALLOC'
]

View File

@ -234,7 +234,6 @@ def old_configure_options(*options):
'--enable-system-cairo',
'--enable-system-extension-dirs',
'--enable-system-pixman',
'--enable-system-sqlite',
'--enable-tasktracer',
'--enable-tests',
'--enable-thread-sanitizer',
@ -288,13 +287,7 @@ def old_configure_options(*options):
'--with-sixgill',
'--with-soft-float',
'--with-system-bz2',
'--with-system-icu',
'--with-system-jpeg',
'--with-system-libevent',
'--with-system-libvpx',
'--with-system-nspr',
'--with-system-nss',
'--with-system-png',
'--with-system-zlib',
'--with-thumb',
'--with-thumb-interwork',

View File

@ -44,11 +44,7 @@ export:: $(export-preqs)
-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 $(srcdir)/stl-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
$(INSTALL) system_wrappers $(DIST)

View File

@ -6,16 +6,14 @@
Library('icu')
if CONFIG['MOZ_SYSTEM_ICU']:
OS_LIBS += CONFIG['MOZ_ICU_LIBS']
DIRS += [
'common',
'data',
'i18n',
]
if CONFIG['MOZ_ICU_DATA_ARCHIVE']:
DIRS += ['stubdata']
USE_LIBS += ['icustubdata']
else:
DIRS += [
'common',
'data',
'i18n',
]
if CONFIG['MOZ_ICU_DATA_ARCHIVE']:
DIRS += ['stubdata']
USE_LIBS += ['icustubdata']
else:
USE_LIBS += ['icudata']
USE_LIBS += ['icudata']

View File

@ -30,14 +30,12 @@ if CONFIG['MOZ_TREMOR']:
if CONFIG['MOZ_WEBM_ENCODER']:
external_dirs += ['media/libmkv']
if not CONFIG['MOZ_SYSTEM_LIBVPX']:
external_dirs += ['media/libvpx']
external_dirs += ['media/libvpx']
if CONFIG['MOZ_AV1']:
external_dirs += ['media/libaom']
if not CONFIG['MOZ_SYSTEM_PNG']:
external_dirs += ['media/libpng']
external_dirs += ['media/libpng']
external_dirs += ['media/libwebp']

View File

@ -3,8 +3,6 @@
# 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_SYSTEM_NSS
CC_WRAPPER =
CXX_WRAPPER =
@ -121,7 +119,6 @@ DEFAULT_GMAKE_FLAGS += NSS_ENABLE_TLS_1_3=1
ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_1)
DEFAULT_GMAKE_FLAGS += OS_DLLFLAGS='-static-libgcc' NSPR31_LIB_PREFIX=lib
endif
ifndef MOZ_SYSTEM_SQLITE
ifdef MOZ_FOLD_LIBS
DEFAULT_GMAKE_FLAGS += SQLITE_LIB_NAME=nss3
else
@ -129,7 +126,6 @@ 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
ifdef NSS_DISABLE_DBM
DEFAULT_GMAKE_FLAGS += NSS_DISABLE_DBM=1
endif
@ -475,4 +471,3 @@ endif # MOZ_FOLD_LIBS
# security/nss/lib/ckfw/builtins. See bug #836220.
libs-nss/lib$(if $(MOZ_FOLD_LIBS),/ckfw): $(call mkdir_deps,$(DEPTH)/security/nss/lib/ckfw/builtins)
endif

View File

@ -6,14 +6,11 @@
Library('crmf')
if CONFIG['MOZ_SYSTEM_NSS']:
OS_LIBS += [l for l in CONFIG['NSS_LIBS'] if l.startswith('-L')]
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.
'nss',
'static:/security/nss/lib/crmf/crmf',
]
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.
'nss',
'static:/security/nss/lib/crmf/crmf',
]

View File

@ -6,10 +6,7 @@
DIRS += ['crmf']
if CONFIG['MOZ_SYSTEM_NSS']:
Library('nss')
OS_LIBS += CONFIG['NSS_LIBS']
elif CONFIG['MOZ_FOLD_LIBS']:
if CONFIG['MOZ_FOLD_LIBS']:
GeckoSharedLibrary('nss', linkage=None)
# TODO: The library name can be changed when bug 845217 is fixed.
SHARED_LIBRARY_NAME = 'nss3'

View File

@ -4,19 +4,15 @@
# 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_SYSTEM_SQLITE']:
DIRS += ['../../../db/sqlite3/src']
if CONFIG['MOZ_FOLD_LIBS']:
Library('sqlite')
OS_LIBS += CONFIG['SQLITE_LIBS']
# When folding libraries, sqlite is actually in the nss library.
USE_LIBS += [
'nss',
]
else:
DIRS += ['../../../db/sqlite3/src']
if CONFIG['MOZ_FOLD_LIBS']:
Library('sqlite')
# When folding libraries, sqlite is actually in the nss library.
USE_LIBS += [
'nss',
]
else:
SharedLibrary('sqlite')
SHARED_LIBRARY_NAME = 'mozsqlite3'
SharedLibrary('sqlite')
SHARED_LIBRARY_NAME = 'mozsqlite3'
SYMBOLS_FILE = '/db/sqlite3/src/sqlite.symbols'
SYMBOLS_FILE = '/db/sqlite3/src/sqlite.symbols'

View File

@ -29,9 +29,6 @@ if CONFIG['HOST_OS_ARCH'] != 'WINNT':
# while the program here is in C.
HostProgram('nsinstall_real', c_only=True)
if CONFIG['MOZ_SYSTEM_ICU']:
DEFINES['MOZ_SYSTEM_ICU'] = True
PYTHON_UNIT_TESTS += [
'tests/test_mozbuild_reading.py',
'tests/unit-expandlibs.py',

View File

@ -172,7 +172,7 @@ ifeq ($(MOZ_REPLACE_MALLOC_LINKAGE),dummy library)
mozglue/build/target memory/replace/logalloc/replay/target: memory/replace/dummy/target
endif
endif
ifeq (,$(MOZ_SYSTEM_NSPR)$(MOZ_SYSTEM_NSS)$(MOZ_FOLD_LIBS))
ifeq (,$(MOZ_FOLD_LIBS))
config/external/nss/target: config/external/nspr/pr/target config/external/nspr/ds/target config/external/nspr/libc/target
endif
# Most things are built during compile (target/host), but some things happen during export

View File

@ -1253,9 +1253,6 @@ soundtouch/SoundTouchFactory.h
#if MOZ_LIBAV_FFT==1
libavcodec/avfft.h
#endif
#if MOZ_SYSTEM_PNG==1
png.h
#endif
#if MOZ_SYSTEM_ZLIB==1
zlib.h
#endif
@ -1276,11 +1273,7 @@ bzlib.h
#ifdef MOZ_ENABLE_GIO
gio/gio.h
#endif
#if MOZ_SYSTEM_LIBEVENT==1
event.h
#else
sys/event.h
#endif
#ifdef MOZ_ENABLE_LIBPROXY
proxy.h
#endif
@ -1295,15 +1288,6 @@ QtSparql/qsparqlresult.h
#if MOZ_TREE_PIXMAN!=1
pixman.h
#endif
#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
gst/gst.h
gst/app/gstappsink.h
gst/app/gstappsrc.h
@ -1316,22 +1300,6 @@ kvm.h
spawn.h
err.h
xlocale.h
#ifdef MOZ_SYSTEM_ICU
unicode/locid.h
unicode/numsys.h
unicode/timezone.h
unicode/ucal.h
unicode/uchar.h
unicode/uclean.h
unicode/ucol.h
unicode/udat.h
unicode/udatpg.h
unicode/uenum.h
unicode/unorm.h
unicode/unum.h
unicode/ustring.h
unicode/utypes.h
#endif
libutil.h
unwind.h
fenv.h

View File

@ -58,7 +58,7 @@ if os_win:
'src/chrome/common/process_watcher_win.cc',
'src/chrome/common/transport_dib_win.cc',
]
elif not CONFIG['MOZ_SYSTEM_LIBEVENT']:
else:
DIRS += ['src/third_party']
if os_posix:
@ -143,9 +143,9 @@ if os_solaris:
'src/base/atomicops_internals_x86_gcc.cc',
'src/base/process_util_linux.cc',
'src/base/time_posix.cc',
]
]
elif not CONFIG['MOZ_SYSTEM_LIBEVENT']:
else:
LOCAL_INCLUDES += ['src/third_party/libevent/linux']
ost = CONFIG['OS_TEST']

View File

@ -32,7 +32,7 @@ else:
else:
libevent_include_suffix = 'linux'
if os_posix and not CONFIG['MOZ_SYSTEM_LIBEVENT']:
if os_posix:
DEFINES['HAVE_CONFIG_H'] = True
LOCAL_INCLUDES += sorted([
'libevent',

View File

@ -10,9 +10,6 @@ include(libevent_path_prefix + '/libeventcommon.mozbuild')
if os_win:
error('should not reach here on Windows')
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',

View File

@ -2165,7 +2165,6 @@ HOST_CXXFLAGS=`echo \
$HOST_CXXFLAGS`
AC_SUBST(_DEPEND_CFLAGS)
AC_SUBST(MOZ_SYSTEM_NSPR)
OS_CFLAGS="$CFLAGS"
OS_CXXFLAGS="$CXXFLAGS"

View File

@ -105,9 +105,6 @@ if CONFIG['MOZ_ALSA']:
if CONFIG['MOZ_SYSTEM_JPEG']:
OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
if CONFIG['MOZ_SYSTEM_LIBVPX']:
OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS']
if not CONFIG['MOZ_TREE_PIXMAN']:
OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']

View File

@ -2013,64 +2013,9 @@ esac
MOZ_CONFIG_NSPR()
dnl ========================================================
dnl system libevent Support
dnl ========================================================
MOZ_ARG_WITH_STRING(system-libevent,
[ --with-system-libevent[=PFX]
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_SYSTEM_LIBEVENT=1,
LIBEVENT_DIR=/usr)
fi
if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; 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_SYSTEM_LIBEVENT=1
MOZ_LIBEVENT_CFLAGS="-I${LIBEVENT_DIR}/include"
MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"],
[MOZ_SYSTEM_LIBEVENT= MOZ_LIBEVENT_CFLAGS= MOZ_LIBEVENT_LIBS=])
fi
CFLAGS=$_SAVE_CFLAGS
LDFLAGS=$_SAVE_LDFLAGS
LIBS=$_SAVE_LIBS
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
AC_MSG_ERROR([Building with system NSS is currently not supported.])
fi
if test -n "$_USE_SYSTEM_NSS"; then
AM_PATH_NSS(3.41, [MOZ_SYSTEM_NSS=1], [AC_MSG_ERROR([you don't have NSS installed or your version is too old])])
fi
if test -z "$MOZ_SYSTEM_NSS"; then
NSS_CFLAGS="-I${DIST}/include/nss"
fi
# TODO: We need to find a better place to define this include
NSS_CFLAGS="-I${DIST}/include/nss"
AC_SUBST(NSS_CFLAGS)
if test -z "$SKIP_LIBRARY_CHECKS"; then
dnl system JPEG support
@ -2155,51 +2100,6 @@ if test "${BZ2_DIR}" -a -d "${BZ2_DIR}" -a "$MOZ_SYSTEM_BZ2" = 1; then
MOZ_BZ2_LIBS="-L${BZ2_DIR}/lib ${MOZ_BZ2_LIBS}"
fi
dnl ========================================================
dnl system PNG Support
dnl ========================================================
MOZ_ARG_WITH_STRING(system-png,
[ --with-system-png[=PFX]
Use system libpng [installed at prefix PFX]],
PNG_DIR=$withval)
_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_SYSTEM_PNG=
else
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_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_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_SYSTEM_PNG" = 1; then
MOZ_PNG_CFLAGS="-I${PNG_DIR}/include"
MOZ_PNG_LIBS="-L${PNG_DIR}/lib ${MOZ_PNG_LIBS}"
fi
fi # SKIP_LIBRARY_CHECKS
dnl ========================================================
@ -2927,13 +2827,6 @@ if test -n "$MOZ_EME"; then
AC_DEFINE(MOZ_EME)
fi
dnl ========================================================
dnl system libvpx Support
dnl ========================================================
MOZ_ARG_WITH_BOOL(system-libvpx,
[ --with-system-libvpx Use system libvpx (located with pkgconfig)],
MOZ_SYSTEM_LIBVPX=1)
MOZ_LIBVPX_CFLAGS=
MOZ_LIBVPX_LIBS=
@ -2941,35 +2834,6 @@ 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_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.5.0)
CFLAGS="$CFLAGS $MOZ_LIBVPX_CFLAGS"
LIBS="$LIBS $MOZ_LIBVPX_LIBS"
MOZ_CHECK_HEADER([vpx/vpx_decoder.h], [],
[AC_MSG_ERROR([Couldn't find vpx/vpx_decoder.h which is required for build with system libvpx. Use --without-system-libvpx to build with in-tree libvpx.])])
AC_CHECK_LIB(vpx, vpx_codec_dec_init_ver, [],
[AC_MSG_ERROR([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found])])
MOZ_CHECK_HEADER([vpx_mem/vpx_mem.h],
[AC_CHECK_FUNC(vpx_mem_set_functions)])
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_SYSTEM_LIBVPX)
AC_SUBST_LIST(MOZ_LIBVPX_CFLAGS)
AC_SUBST_LIST(MOZ_LIBVPX_LIBS)
@ -3798,175 +3662,6 @@ else
fi
fi
dnl ========================================================
dnl Check for sqlite
dnl ========================================================
MOZ_SYSTEM_SQLITE=
MOZ_ARG_ENABLE_BOOL(system-sqlite,
[ --enable-system-sqlite Use system sqlite (located with pkgconfig)],
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 ==================================
dnl === SQLITE_SECURE_DELETE check ===
dnl ==================================
dnl Check to see if the system SQLite package is compiled with
dnl SQLITE_SECURE_DELETE enabled.
AC_MSG_CHECKING(for SQLITE_SECURE_DELETE support in system SQLite)
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $SQLITE_CFLAGS"
_SAVE_LIBS="$LIBS"
LIBS="$LIBS $SQLITE_LIBS"
AC_CACHE_VAL(ac_cv_sqlite_secure_delete,[
AC_TRY_RUN([
#include "sqlite3.h"
int main(int argc, char **argv){
return !sqlite3_compileoption_used("SQLITE_SECURE_DELETE");
}],
ac_cv_sqlite_secure_delete=yes,
ac_cv_sqlite_secure_delete=no,
ac_cv_sqlite_secure_delete=no
)
])
AC_MSG_RESULT($ac_cv_sqlite_secure_delete)
CFLAGS="$_SAVE_CFLAGS"
LIBS="$_SAVE_LIBS"
if test "x$ac_cv_sqlite_secure_delete" = "xno"; then
AC_MSG_ERROR([System SQLite library is not compiled with SQLITE_SECURE_DELETE.])
fi
dnl ===============================
dnl === SQLITE_THREADSAFE check ===
dnl ===============================
dnl Check to see if the system SQLite package is compiled with
dnl SQLITE_THREADSAFE enabled.
AC_MSG_CHECKING(for SQLITE_THREADSAFE support in system SQLite)
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $SQLITE_CFLAGS"
_SAVE_LIBS="$LIBS"
LIBS="$LIBS $SQLITE_LIBS"
AC_CACHE_VAL(ac_cv_sqlite_threadsafe,[
AC_TRY_RUN([
#include "sqlite3.h"
int main(int argc, char **argv){
return !sqlite3_compileoption_used("SQLITE_THREADSAFE=1");
}],
ac_cv_sqlite_threadsafe=yes,
ac_cv_sqlite_threadsafe=no,
ac_cv_sqlite_threadsafe=no
)
])
AC_MSG_RESULT($ac_cv_sqlite_threadsafe)
CFLAGS="$_SAVE_CFLAGS"
LIBS="$_SAVE_LIBS"
if test "x$ac_cv_sqlite_threadsafe" = "xno"; then
AC_MSG_ERROR([System SQLite library is not compiled with SQLITE_THREADSAFE.])
fi
dnl ================================
dnl === SQLITE_ENABLE_FTS3 check ===
dnl ================================
dnl check to see if the system SQLite package is compiled with
dnl SQLITE_ENABLE_FTS3 enabled.
AC_MSG_CHECKING(for SQLITE_ENABLE_FTS3 support in system SQLite)
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $SQLITE_CFLAGS"
_SAVE_LIBS="$LIBS"
LIBS="$LIBS $SQLITE_LIBS"
AC_CACHE_VAL(ac_cv_sqlite_enable_fts3,[
AC_TRY_RUN([
#include "sqlite3.h"
int main(int argc, char **argv){
return !sqlite3_compileoption_used("SQLITE_ENABLE_FTS3");
}],
ac_cv_sqlite_enable_fts3=yes,
ac_cv_sqlite_enable_fts3=no,
ac_cv_sqlite_enable_fts3=no
)
])
AC_MSG_RESULT($ac_cv_sqlite_enable_fts3)
CFLAGS="$_SAVE_CFLAGS"
LIBS="$_SAVE_LIBS"
if test "x$ac_cv_sqlite_enable_fts3" = "xno"; then
AC_MSG_ERROR([System SQLite library is not compiled with SQLITE_ENABLE_FTS3.])
fi
dnl =========================================
dnl === SQLITE_ENABLE_UNLOCK_NOTIFY check ===
dnl =========================================
dnl check to see if the system SQLite package is compiled with
dnl SQLITE_ENABLE_UNLOCK_NOTIFY enabled.
AC_MSG_CHECKING(for SQLITE_ENABLE_UNLOCK_NOTIFY support in system SQLite)
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $SQLITE_CFLAGS"
_SAVE_LIBS="$LIBS"
LIBS="$LIBS $SQLITE_LIBS"
AC_CACHE_VAL(ac_cv_sqlite_enable_unlock_notify,[
AC_TRY_RUN([
#include "sqlite3.h"
int main(int argc, char **argv){
return !sqlite3_compileoption_used("SQLITE_ENABLE_UNLOCK_NOTIFY");
}],
ac_cv_sqlite_enable_unlock_notify=yes,
ac_cv_sqlite_enable_unlock_notify=no,
ac_cv_sqlite_enable_unlock_notify=no
)
])
AC_MSG_RESULT($ac_cv_sqlite_enable_unlock_notify)
CFLAGS="$_SAVE_CFLAGS"
LIBS="$_SAVE_LIBS"
if test "x$ac_cv_sqlite_enable_unlock_notify" = "xno"; then
AC_MSG_ERROR([System SQLite library is not compiled with SQLITE_ENABLE_UNLOCK_NOTIFY.])
fi
dnl =========================================
dnl === SQLITE_ENABLE_DBSTAT_VTAB check ===
dnl =========================================
dnl check to see if the system SQLite package is compiled with
dnl SQLITE_ENABLE_DBSTAT_VTAB.
AC_MSG_CHECKING(for SQLITE_ENABLE_DBSTAT_VTAB support in system SQLite)
_SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $SQLITE_CFLAGS"
_SAVE_LIBS="$LIBS"
LIBS="$LIBS $SQLITE_LIBS"
AC_CACHE_VAL(ac_cv_sqlite_dbstat_vtab,[
AC_TRY_RUN([
#include "sqlite3.h"
int main(int argc, char **argv){
return !sqlite3_compileoption_used("SQLITE_ENABLE_DBSTAT_VTAB");
}],
ac_cv_sqlite_dbstat_vtab=yes,
ac_cv_sqlite_dbstat_vtab=no,
ac_cv_sqlite_dbstat_vtab=no
)
])
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_SYSTEM_SQLITE"; then
AC_DEFINE(MOZ_SYSTEM_SQLITE)
fi
AC_SUBST(MOZ_SYSTEM_SQLITE)
dnl ========================================================
dnl = Enable Google safe browsing (anti-phishing)
dnl ========================================================
@ -5427,10 +5122,6 @@ AC_SUBST_LIST(MOZ_BZ2_LIBS)
AC_SUBST_LIST(MOZ_PNG_CFLAGS)
AC_SUBST_LIST(MOZ_PNG_LIBS)
AC_SUBST(MOZ_SYSTEM_NSPR)
AC_SUBST(MOZ_SYSTEM_NSS)
HOST_CMFLAGS=-fobjc-exceptions
HOST_CMMFLAGS=-fobjc-exceptions
OS_COMPILE_CMFLAGS=-fobjc-exceptions
@ -5610,9 +5301,6 @@ MC_BASILISK=$MC_BASILISK
MC_PALEMOON=$MC_PALEMOON
MOZ_EME=$MOZ_EME
MOZ_WEBRTC=$MOZ_WEBRTC
MOZ_SYSTEM_LIBEVENT=$MOZ_SYSTEM_LIBEVENT
MOZ_SYSTEM_NSS=$MOZ_SYSTEM_NSS
MOZ_SYSTEM_NSPR=$MOZ_SYSTEM_NSPR
MOZ_SYSTEM_JPEG=$MOZ_SYSTEM_JPEG
MOZ_SYSTEM_ZLIB=$MOZ_SYSTEM_ZLIB
MOZ_SYSTEM_BZ2=$MOZ_SYSTEM_BZ2

View File

@ -50,7 +50,7 @@ public:
mMutex = aMutex;
}
#if !defined(DEBUG) || defined(MOZ_SYSTEM_SQLITE)
#if !defined(DEBUG)
/**
* Acquires the mutex.
*/

View File

@ -107,10 +107,6 @@ if CONFIG['MOZ_MEMORY'] and not CONFIG['MOZ_SYSTEM_SQLITE']:
DEFINES['SQLITE_MAX_LIKE_PATTERN_LENGTH'] = 50000
# See Sqlite moz.build for reasoning about TEMP_STORE.
# For system sqlite we cannot use the compile time option, so we use a pragma.
if CONFIG['MOZ_SYSTEM_SQLITE'] and (CONFIG['OS_TARGET'] == 'Android'
or CONFIG['HAVE_64BIT_BUILD']):
DEFINES['MOZ_MEMORY_TEMP_STORE_PRAGMA'] = True
LOCAL_INCLUDES += [
'/db/sqlite3/src',

View File

@ -195,18 +195,9 @@ if CONFIG['SERVO_TARGET_DIR']:
if CONFIG['MOZ_SYSTEM_JPEG']:
OS_LIBS += CONFIG['MOZ_JPEG_LIBS']
if CONFIG['MOZ_SYSTEM_PNG']:
OS_LIBS += CONFIG['MOZ_PNG_LIBS']
if CONFIG['MOZ_SYSTEM_HUNSPELL']:
OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
if CONFIG['MOZ_SYSTEM_LIBEVENT']:
OS_LIBS += CONFIG['MOZ_LIBEVENT_LIBS']
if CONFIG['MOZ_SYSTEM_LIBVPX']:
OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS']
if not CONFIG['MOZ_TREE_PIXMAN']:
OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']

View File

@ -187,13 +187,6 @@ MOZ_SAFE_BROWSING:
false,
#endif
MOZ_SYSTEM_NSS:
#ifdef MOZ_SYSTEM_NSS
true,
#else
false,
#endif
MOZ_PLACES:
#ifdef MOZ_PLACES
true,

View File

@ -148,7 +148,6 @@ for var in ('ANDROID_PACKAGE_NAME',
DEFINES[var] = CONFIG[var]
for var in ('MOZ_TOOLKIT_SEARCH',
'MOZ_SYSTEM_NSS',
'MOZ_UPDATER',
'MOZ_SWITCHBOARD'):
if CONFIG[var]:

View File

@ -63,17 +63,15 @@ JSSHELL_BINS = \
$(DLL_PREFIX)mozglue$(DLL_SUFFIX) \
$(NULL)
ifndef MOZ_SYSTEM_NSPR
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_SYSTEM_NSPR
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
ifdef MSVC_C_RUNTIME_DLL
JSSHELL_BINS += $(MSVC_C_RUNTIME_DLL)