Skip to content

Commit

Permalink
Bug 777166 - Use CFLAGS from pkgconfig for system libvpx, r=derf
Browse files Browse the repository at this point in the history
From c445b9ab36a0c79aa1be2dfbd91438e994bccb4e Mon Sep 17 00:00:00 2001
---
 config/autoconf.mk.in          | 2 +-
 configure.in                   | 8 +++++---
 content/media/webm/Makefile.in | 2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)
  • Loading branch information
Bugmenot committed Jul 25, 2012
1 parent 972c2fb commit 79907c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/autoconf.mk.in
Expand Up @@ -224,7 +224,7 @@ MOZ_LIBEVENT_INCLUDES = @MOZ_LIBEVENT_INCLUDES@

MOZ_NATIVE_LIBVPX = @MOZ_NATIVE_LIBVPX@
MOZ_LIBVPX_LIBS = @MOZ_LIBVPX_LIBS@
MOZ_LIBVPX_INCLUDES = @MOZ_LIBVPX_INCLUDES@
MOZ_LIBVPX_CFLAGS = @MOZ_LIBVPX_CFLAGS@

MOZ_NATIVE_ZLIB = @MOZ_NATIVE_ZLIB@
MOZ_NATIVE_BZ2 = @MOZ_NATIVE_BZ2@
Expand Down
8 changes: 5 additions & 3 deletions configure.in
Expand Up @@ -5351,7 +5351,7 @@ MOZ_ARG_WITH_BOOL(system-libvpx,
[ --with-system-libvpx Use system libvpx (located with pkgconfig)],
MOZ_NATIVE_LIBVPX=1)

MOZ_LIBVPX_INCLUDES=
MOZ_LIBVPX_CFLAGS=
MOZ_LIBVPX_LIBS=

if test -n "$MOZ_VP8"; then
Expand All @@ -5368,18 +5368,20 @@ if test -n "$MOZ_VP8"; then
dnl === libvpx Version check ===
dnl ============================
dnl Check to see if we have a system libvpx package.
PKG_CHECK_MODULES(LIBVPX, vpx >= 1.0.0)
PKG_CHECK_MODULES(MOZ_LIBVPX, vpx >= 1.0.0)

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.])])

_SAVE_LIBS=$LIBS
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])])
LIBS=$_SAVE_LIBS
fi
fi

AC_SUBST(MOZ_NATIVE_LIBVPX)
AC_SUBST(MOZ_LIBVPX_INCLUDES)
AC_SUBST(MOZ_LIBVPX_CFLAGS)
AC_SUBST(MOZ_LIBVPX_LIBS)

if test "$MOZ_WEBM"; then
Expand Down
2 changes: 1 addition & 1 deletion content/media/webm/Makefile.in
Expand Up @@ -30,5 +30,5 @@ FORCE_STATIC_LIB = 1
include $(topsrcdir)/config/rules.mk

LOCAL_INCLUDES = \
$(MOZ_LIBVPX_INCLUDES) \
$(MOZ_LIBVPX_CFLAGS) \
$(NULL)

0 comments on commit 79907c7

Please sign in to comment.