diff options
Diffstat (limited to 'old-configure.in')
-rw-r--r-- | old-configure.in | 36 |
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) |