summaryrefslogtreecommitdiffstats
path: root/old-configure.in
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 /old-configure.in
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.
Diffstat (limited to 'old-configure.in')
-rw-r--r--old-configure.in36
1 files changed, 36 insertions, 0 deletions
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)