summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Groman <tgroman@nuegia.net>2020-06-14 18:02:51 -0700
committerThomas Groman <tgroman@nuegia.net>2020-06-14 18:02:51 -0700
commit0af0100030be9f2569d3dbf5ab746c2b97c009d0 (patch)
tree822e8fbbd063a22a47f42b0c7b4cd4c5a5a24b43
parent521f6fb61e7bd01f11802c85b6780a46277db51e (diff)
downloadUXP-0af0100030be9f2569d3dbf5ab746c2b97c009d0.tar
UXP-0af0100030be9f2569d3dbf5ab746c2b97c009d0.tar.gz
UXP-0af0100030be9f2569d3dbf5ab746c2b97c009d0.tar.lz
UXP-0af0100030be9f2569d3dbf5ab746c2b97c009d0.tar.xz
UXP-0af0100030be9f2569d3dbf5ab746c2b97c009d0.zip
Revert "Issue #1342 - Remove support for system libvpx"
This reverts commit 229f8412959a9480a9fa1784d6619aa5e97320c3.
-rw-r--r--build/directive4.py1
-rw-r--r--build/moz.configure/old.configure1
-rw-r--r--config/Makefile.in1
-rw-r--r--config/external/moz.build3
-rw-r--r--config/system-headers9
-rw-r--r--media/webrtc/signaling/test/common.build3
-rw-r--r--old-configure.in36
-rw-r--r--toolkit/library/moz.build3
8 files changed, 56 insertions, 1 deletions
diff --git a/build/directive4.py b/build/directive4.py
index 650349d68..9150a2543 100644
--- a/build/directive4.py
+++ b/build/directive4.py
@@ -36,6 +36,7 @@ if ('MOZ_OFFICIAL_BRANDING' in listConfig) or (strBrandingDirectory.endswith("br
'MOZ_SYSTEM_JPEG',
'MOZ_SYSTEM_ZLIB',
'MOZ_SYSTEM_BZ2',
+ 'MOZ_SYSTEM_LIBVPX',
'MOZ_SYSTEM_JEMALLOC'
]
diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure
index aba1edf85..ab19f16ac 100644
--- a/build/moz.configure/old.configure
+++ b/build/moz.configure/old.configure
@@ -290,6 +290,7 @@ def old_configure_options(*options):
'--with-soft-float',
'--with-system-bz2',
'--with-system-jpeg',
+ '--with-system-libvpx',
'--with-system-zlib',
'--with-thumb',
'--with-thumb-interwork',
diff --git a/config/Makefile.in b/config/Makefile.in
index c9cc3592c..93ad5a80c 100644
--- a/config/Makefile.in
+++ b/config/Makefile.in
@@ -45,6 +45,7 @@ export:: $(export-preqs)
-DMOZ_SYSTEM_BZ2=$(MOZ_SYSTEM_BZ2) \
-DMOZ_SYSTEM_ZLIB=$(MOZ_SYSTEM_ZLIB) \
-DMOZ_SYSTEM_JPEG=$(MOZ_SYSTEM_JPEG) \
+ -DMOZ_SYSTEM_LIBVPX=$(MOZ_SYSTEM_LIBVPX) \
$(srcdir)/system-headers $(srcdir)/stl-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers
$(INSTALL) system_wrappers $(DIST)
diff --git a/config/external/moz.build b/config/external/moz.build
index f4013c18a..6b3617bf0 100644
--- a/config/external/moz.build
+++ b/config/external/moz.build
@@ -28,7 +28,8 @@ if CONFIG['MOZ_TREMOR']:
if CONFIG['MOZ_WEBM_ENCODER']:
external_dirs += ['media/libmkv']
-external_dirs += ['media/libvpx']
+if not CONFIG['MOZ_SYSTEM_LIBVPX']:
+ external_dirs += ['media/libvpx']
if CONFIG['MOZ_AV1']:
external_dirs += ['media/libaom']
diff --git a/config/system-headers b/config/system-headers
index 3685d6d1c..9dd33bc76 100644
--- a/config/system-headers
+++ b/config/system-headers
@@ -1288,6 +1288,15 @@ 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
diff --git a/media/webrtc/signaling/test/common.build b/media/webrtc/signaling/test/common.build
index 2d9a57139..3e5450f5d 100644
--- a/media/webrtc/signaling/test/common.build
+++ b/media/webrtc/signaling/test/common.build
@@ -105,6 +105,9 @@ 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']
diff --git a/old-configure.in b/old-configure.in
index 2965f60b7..2748bbe82 100644
--- a/old-configure.in
+++ b/old-configure.in
@@ -2962,6 +2962,13 @@ fi
AC_SUBST(MOZ_EME)
+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=
@@ -2969,6 +2976,35 @@ 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)
diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build
index d9b167547..a620e81a0 100644
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -198,6 +198,9 @@ if CONFIG['MOZ_SYSTEM_JPEG']:
if CONFIG['MOZ_SYSTEM_HUNSPELL']:
OS_LIBS += CONFIG['MOZ_HUNSPELL_LIBS']
+if CONFIG['MOZ_SYSTEM_LIBVPX']:
+ OS_LIBS += CONFIG['MOZ_LIBVPX_LIBS']
+
if not CONFIG['MOZ_TREE_PIXMAN']:
OS_LIBS += CONFIG['MOZ_PIXMAN_LIBS']