30c1a0a792
- update firefox 14.0.1 - update thunderbird to 14.0 - update seamonkey to 2.11 - switch to new options framework - add experimental rendering via cairo-qt (QT4 option) - add audio backend options (ALSA and PulseAudio) - rename SMB option to GNOMEVFS2 - turn on LOGGING by default (like upstream linux builds) - improve about:memory output - unbreak PGO - use system libs [1] - switch to libevent2 [2] - fix conflict with devel/libunwind and base gcc [3] - unbreak clang/libc++ build [4] - unbreak build with base gcc on >= 9.x [5] - use common IPC code with other BSDs[6] - and *miscellaneous improvements* PR: ports/146231 [1], ports/161421 [2] ports/150631, ports/168369, ports/168637, ports/168793, ports/168978 [3] ports/163454, ports/164905, ports/169231 [4] ports/169389, ports/169479 [5] Obtained from: pkgsrc via bugzilla #753046 [6] In collaboration with: Jan Beich (who did the major part of this work and deserves a special thank you!)
90 lines
3.9 KiB
Text
90 lines
3.9 KiB
Text
changeset: 91900:eee73897136b
|
|
user: Martin Stransky <stransky@redhat.com>
|
|
date: Tue Apr 17 19:57:40 2012 -0400
|
|
summary: Bug 741737 - Configure libvpx with pkgconfig. r=khuey, a=npotb
|
|
|
|
diff --git a/configure.in b/configure.in
|
|
--- mozilla/configure.in
|
|
+++ mozilla/configure.in
|
|
@@ -5588,12 +5588,10 @@ MOZ_ARG_DISABLE_BOOL(webm,
|
|
|
|
dnl system libvpx Support
|
|
dnl ========================================================
|
|
-MOZ_ARG_WITH_STRING(system-libvpx,
|
|
-[ --with-system-libvpx=[PFX]
|
|
- Use system libvpx [installed at prefix PFX]],
|
|
- LIBVPX_DIR=$withval)
|
|
+MOZ_ARG_WITH_BOOL(system-libvpx,
|
|
+[ --with-system-libvpx Use system libvpx (located with pkgconfig)],
|
|
+ MOZ_NATIVE_LIBVPX=1)
|
|
|
|
-MOZ_NATIVE_LIBVPX=
|
|
MOZ_LIBVPX_INCLUDES=
|
|
MOZ_LIBVPX_LIBS=
|
|
|
|
@@ -5606,53 +5604,18 @@ if test -n "$MOZ_WEBM"; then
|
|
AC_DEFINE(MOZ_VP8_ENCODER)
|
|
fi
|
|
|
|
- if test -n "$LIBVPX_DIR" -a "$LIBVPX_DIR" != no; then
|
|
- _SAVE_CFLAGS=$CFLAGS
|
|
- _SAVE_LDFLAGS=$LDFLAGS
|
|
- _SAVE_LIBS=$LIBS
|
|
- if test "${LIBVPX_DIR}" = "yes"; then
|
|
- LIBVPX_DIR=/usr
|
|
- fi
|
|
- CFLAGS="-I${LIBVPX_DIR}/include $CFLAGS"
|
|
- LDFLAGS="-L${LIBVPX_DIR}/lib $LDFLAGS"
|
|
- MOZ_NATIVE_LIBVPX_DEC_TEST=
|
|
- MOZ_CHECK_HEADER(vpx/vpx_decoder.h,
|
|
- [if test ! -f "${LIBVPX_DIR}/include/vpx/vpx_decoder.h"; then
|
|
- AC_MSG_ERROR([vpx/vpx_decoder.h found, but is not in ${LIBVPX_DIR}/include])
|
|
- fi],
|
|
- AC_MSG_ERROR([--with-system-libvpx requested but vpx/vpx_decoder.h not found]))
|
|
- AC_CHECK_LIB(vpx, vpx_codec_dec_init_ver,
|
|
- [MOZ_NATIVE_LIBVPX_DEC_TEST=1],
|
|
- ([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found]))
|
|
- if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then
|
|
- AC_MSG_CHECKING([for libvpx version >= v0.9.7])
|
|
- dnl We need at least v0.9.7 to fix several crash bugs (for which we
|
|
- dnl had local patches prior to v0.9.7).
|
|
- dnl
|
|
- dnl This is a terrible test for the library version, but we don't
|
|
- dnl have a good one. There is no version number in a public header,
|
|
- dnl and testing the headers still doesn't guarantee we link against
|
|
- dnl the right version. While we could call vpx_codec_version() at
|
|
- dnl run-time, that would break cross-compiling. There are no
|
|
- dnl additional exported symbols between the v0.9.7 release and the
|
|
- dnl v0.9.6 one to check for.
|
|
- AC_TRY_COMPILE([
|
|
- #include <vpx/vpx_decoder.h>
|
|
- #if !defined(VPX_CODEC_USE_INPUT_PARTITION)
|
|
- #error "test failed."
|
|
- #endif
|
|
- ],
|
|
- [return 0;],
|
|
- [AC_MSG_RESULT([yes])
|
|
- MOZ_NATIVE_LIBVPX=1
|
|
- MOZ_LIBVPX_INCLUDES="-I${LIBVPX_DIR}/include"
|
|
- MOZ_LIBVPX_LIBS="-L${LIBVPX_DIR}/lib -lvpx"],
|
|
- [AC_MSG_RESULT([no])
|
|
- AC_MSG_ERROR([--with-system-libvpx requested but it is not v0.9.7 or later])])
|
|
- fi
|
|
- CFLAGS=$_SAVE_CFLAGS
|
|
- LDFLAGS=$_SAVE_LDFLAGS
|
|
- LIBS=$_SAVE_LIBS
|
|
+ if test -n "$MOZ_NATIVE_LIBVPX"; then
|
|
+ dnl ============================
|
|
+ dnl === libvpx Version check ===
|
|
+ dnl ============================
|
|
+ dnl Check to see if we have a system libvpx package.
|
|
+ PKG_CHECK_MODULES(LIBVPX, vpx >= 0.9.7)
|
|
+
|
|
+ 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])])
|
|
fi
|
|
fi
|
|
|