diff -up comm-beta/mozilla/config/Makefile.in.system-ogg comm-beta/mozilla/config/Makefile.in --- comm-beta/mozilla/config/Makefile.in.system-ogg 2013-03-21 03:20:38.000000000 +0100 +++ comm-beta/mozilla/config/Makefile.in 2013-03-26 12:33:03.947720460 +0100 @@ -103,6 +103,7 @@ export:: $(export-preqs) -DMOZ_NATIVE_JPEG=$(MOZ_NATIVE_JPEG) \ -DMOZ_NATIVE_LIBEVENT=$(MOZ_NATIVE_LIBEVENT) \ -DMOZ_NATIVE_LIBVPX=$(MOZ_NATIVE_LIBVPX) \ + -DMOZ_NATIVE_OGG=$(MOZ_NATIVE_OGG) \ $(srcdir)/system-headers | $(PERL) $(topsrcdir)/nsprpub/config/make-system-wrappers.pl system_wrappers $(INSTALL) system_wrappers $(DIST) diff -up comm-beta/mozilla/config/system-headers.system-ogg comm-beta/mozilla/config/system-headers --- comm-beta/mozilla/config/system-headers.system-ogg 2013-03-21 03:20:38.000000000 +0100 +++ comm-beta/mozilla/config/system-headers 2013-03-26 12:33:03.955720375 +0100 @@ -1116,6 +1116,16 @@ ogg/os_types.h nestegg/nestegg.h cubeb/cubeb.h #endif +#if MOZ_NATIVE_OGG==1 +vorbis/codec.h +theora/theoradec.h +ogg/ogg.h +ogg/os_types.h +opus/opus_defines.h +opus/opus.h +opus/opus_multistream.h +opus/opus_types.h +#endif gst/gst.h gst/app/gstappsink.h gst/app/gstappsrc.h diff -up comm-beta/mozilla/configure.in.system-ogg comm-beta/mozilla/configure.in --- comm-beta/mozilla/configure.in.system-ogg 2013-03-26 12:33:00.052761469 +0100 +++ comm-beta/mozilla/configure.in 2013-03-26 12:33:03.974720176 +0100 @@ -5362,12 +5362,40 @@ MOZ_ARG_DISABLE_BOOL(ogg, MOZ_OGG=, MOZ_OGG=1) +dnl system ogg Support +dnl ======================================================== +MOZ_ARG_WITH_BOOL(system-ogg, +[ --with-system-ogg Use system ogg, vorbis, theora, and opus libraries (located with pkgconfig)], + MOZ_NATIVE_OGG=1) + +MOZ_OGG_CFLAGS= +MOZ_OGG_LIBS= +MOZ_VORBIS_CFLAGS= +MOZ_VORBIS_LIBS= +MOZ_THEORA_CFLAGS= +MOZ_THEORA_LIBS= +MOZ_OPUS_CFLAGS= +MOZ_OPUS_LIBS= + if test -n "$MOZ_OGG"; then AC_DEFINE(MOZ_OGG) MOZ_SYDNEYAUDIO=1 MOZ_CUBEB=1 MOZ_MEDIA=1 + if test -n "$MOZ_NATIVE_OGG"; then + dnl ============================ + dnl === ogg (version) check === + dnl ============================ + dnl Check to see if we have system ogg and theora packages. + PKG_CHECK_MODULES(OGG, ogg) + PKG_CHECK_MODULES(THEORA, theoradec) + MOZ_OGG_CFLAGS="$OGG_CFLAGS" + MOZ_OGG_LIBS="$OGG_LIBS" + MOZ_THEORA_CFLAGS="$THEORA_CFLAGS" + MOZ_THEORA_LIBS="$THEORA_LIBS" + fi + dnl Checks for __attribute__(aligned()) directive AC_CACHE_CHECK([__attribute__ ((aligned ())) support], [ac_cv_c_attribute_aligned], @@ -5705,6 +5733,16 @@ fi if test -n "$MOZ_VORBIS"; then AC_DEFINE(MOZ_VORBIS) + + if test -n "$MOZ_NATIVE_OGG"; then + dnl ============================ + dnl === vorbis (version) check === + dnl ============================ + dnl Check to see if we have a system vorbis package. + PKG_CHECK_MODULES(VORBIS, vorbis) + MOZ_VORBIS_CFLAGS="$VORBIS_CFLAGS" + MOZ_VORBIS_LIBS="$VORBIS_LIBS" + fi fi if test -n "$MOZ_TREMOR"; then @@ -5713,8 +5751,28 @@ fi if test -n "$MOZ_OPUS"; then AC_DEFINE(MOZ_OPUS) + + if test -n "$MOZ_NATIVE_OGG"; then + dnl ============================ + dnl === opus (version) check === + dnl ============================ + dnl Check to see if we have a system opus package. + PKG_CHECK_MODULES(OPUS, opus) + MOZ_OPUS_CFLAGS="$OPUS_CFLAGS" + MOZ_OPUS_LIBS="$OPUS_LIBS" + fi fi +AC_SUBST(MOZ_NATIVE_OGG) +AC_SUBST(MOZ_OGG_CFLAGS) +AC_SUBST(MOZ_OGG_LIBS) +AC_SUBST(MOZ_VORBIS_CFLAGS) +AC_SUBST(MOZ_VORBIS_LIBS) +AC_SUBST(MOZ_THEORA_CFLAGS) +AC_SUBST(MOZ_THEORA_LIBS) +AC_SUBST(MOZ_OPUS_CFLAGS) +AC_SUBST(MOZ_OPUS_LIBS) + dnl ======================================================== dnl = Check alsa availability on Linux if using sydneyaudio dnl ======================================================== diff -up comm-beta/mozilla/content/media/ogg/Makefile.in.system-ogg comm-beta/mozilla/content/media/ogg/Makefile.in --- comm-beta/mozilla/content/media/ogg/Makefile.in.system-ogg 2013-03-26 12:33:03.986720050 +0100 +++ comm-beta/mozilla/content/media/ogg/Makefile.in 2013-04-06 18:12:25.630697634 +0200 @@ -16,6 +16,12 @@ ifndef _MSC_VER FAIL_ON_WARNINGS := 1 endif # !_MSC_VER +INCLUDES += \ + $(MOZ_OGG_CFLAGS) \ + $(MOZ_VORBIS_CFLAGS) \ + $(MOZ_THEORA_CFLAGS) \ + $(MOZ_OPUS_CFLAGS) \ + $(NULL) EXPORTS += \ OggDecoder.h \ diff -up comm-beta/mozilla/layout/media/Makefile.in.system-ogg comm-beta/mozilla/layout/media/Makefile.in --- comm-beta/mozilla/layout/media/Makefile.in.system-ogg 2013-03-21 03:20:50.000000000 +0100 +++ comm-beta/mozilla/layout/media/Makefile.in 2013-03-26 12:33:04.000719902 +0100 @@ -36,11 +36,13 @@ SHARED_LIBRARY_LIBS += $(MOZ_GRAPHITE_LI endif ifdef MOZ_VORBIS +ifndef MOZ_NATIVE_OGG SHARED_LIBRARY_LIBS += \ $(DEPTH)/media/libvorbis/lib/$(LIB_PREFIX)vorbis.$(LIB_SUFFIX) \ $(DEPTH)/media/libogg/src/$(LIB_PREFIX)ogg.$(LIB_SUFFIX) \ $(NULL) endif +endif ifdef MOZ_TREMOR SHARED_LIBRARY_LIBS += \ @@ -50,16 +52,20 @@ SHARED_LIBRARY_LIBS += \ endif ifdef MOZ_OGG +ifndef MOZ_NATIVE_OGG SHARED_LIBRARY_LIBS += \ $(DEPTH)/media/libtheora/lib/$(LIB_PREFIX)theora.$(LIB_SUFFIX) \ $(NULL) endif +endif ifdef MOZ_OPUS +ifndef MOZ_NATIVE_OGG SHARED_LIBRARY_LIBS += \ $(DEPTH)/media/libopus/$(LIB_PREFIX)opus.$(LIB_SUFFIX) \ $(NULL) endif +endif ifdef MOZ_WEBM SHARED_LIBRARY_LIBS += \ diff -up comm-beta/mozilla/layout/media/symbols.def.in.system-ogg comm-beta/mozilla/layout/media/symbols.def.in --- comm-beta/mozilla/layout/media/symbols.def.in.system-ogg 2013-03-21 03:20:50.000000000 +0100 +++ comm-beta/mozilla/layout/media/symbols.def.in 2013-03-26 12:33:04.009719808 +0100 @@ -50,6 +50,7 @@ vpx_codec_encode #endif #endif #ifdef MOZ_VORBIS +#ifndef MOZ_NATIVE_OGG ogg_page_bos ogg_page_granulepos ogg_page_serialno @@ -81,6 +82,7 @@ vorbis_synthesis_pcmout vorbis_synthesis_read vorbis_synthesis_restart #endif +#endif #ifdef MOZ_SYDNEYAUDIO sa_stream_create_pcm sa_stream_destroy @@ -127,6 +129,7 @@ cubeb_stream_init cubeb_stream_start cubeb_stream_stop #endif +#ifndef MOZ_NATIVE_OGG #ifdef MOZ_OGG th_comment_clear th_comment_init @@ -162,6 +165,7 @@ opus_encoder_ctl opus_encode opus_encode_float #endif +#endif ShInitialize ShFinalize ShGetObjectCode diff -up comm-beta/mozilla/toolkit/library/Makefile.in.system-ogg comm-beta/mozilla/toolkit/library/Makefile.in --- comm-beta/mozilla/toolkit/library/Makefile.in.system-ogg 2013-03-21 03:21:01.000000000 +0100 +++ comm-beta/mozilla/toolkit/library/Makefile.in 2013-03-26 12:33:04.018719712 +0100 @@ -390,6 +390,10 @@ ifdef MOZ_NATIVE_LIBVPX EXTRA_DSO_LDOPTS += $(MOZ_LIBVPX_LIBS) endif +ifdef MOZ_NATIVE_OGG +EXTRA_DSO_LDOPTS += $(MOZ_OGG_LIBS) $(MOZ_VORBIS_LIBS) $(MOZ_THEORA_LIBS) $(MOZ_OPUS_LIBS) +endif + ifndef MOZ_TREE_PIXMAN EXTRA_DSO_LDOPTS += $(MOZ_PIXMAN_LIBS) endif diff -up comm-beta/mozilla/toolkit/toolkit-makefiles.sh.system-ogg comm-beta/mozilla/toolkit/toolkit-makefiles.sh --- comm-beta/mozilla/toolkit/toolkit-makefiles.sh.system-ogg 2013-03-21 03:21:02.000000000 +0100 +++ comm-beta/mozilla/toolkit/toolkit-makefiles.sh 2013-03-26 12:33:04.028719608 +0100 @@ -1621,12 +1621,14 @@ if [ "$MOZ_MEDIA" ]; then fi if [ "$MOZ_VORBIS" ]; then - add_makefiles " - media/libvorbis/Makefile - media/libvorbis/lib/Makefile - media/libvorbis/include/Makefile - media/libvorbis/include/vorbis/Makefile - " + if [ ! "$MOZ_NATIVE_OGG" ]; then + add_makefiles " + media/libvorbis/Makefile + media/libvorbis/lib/Makefile + media/libvorbis/include/Makefile + media/libvorbis/include/vorbis/Makefile + " + fi fi if [ "$MOZ_TREMOR" ]; then @@ -1638,23 +1640,29 @@ if [ "$MOZ_TREMOR" ]; then fi if [ "$MOZ_OPUS" ]; then - add_makefiles " - media/libopus/Makefile - " + if [ ! "$MOZ_NATIVE_OGG" ]; then + add_makefiles " + media/libopus/Makefile + " + fi fi if [ "$MOZ_OGG" ]; then add_makefiles " content/media/ogg/Makefile - media/libogg/Makefile - media/libogg/src/Makefile - media/libogg/include/Makefile - media/libogg/include/ogg/Makefile - media/libtheora/Makefile - media/libtheora/lib/Makefile - media/libtheora/include/Makefile - media/libtheora/include/theora/Makefile " + if [ ! "$MOZ_NATIVE_OGG" ]; then + add_makefiles " + media/libogg/Makefile + media/libogg/src/Makefile + media/libogg/include/Makefile + media/libogg/include/ogg/Makefile + media/libtheora/Makefile + media/libtheora/lib/Makefile + media/libtheora/include/Makefile + media/libtheora/include/theora/Makefile + " + fi fi if [ "$MOZ_RAW" ]; then diff -up comm-beta/mozilla/toolkit/toolkit-tiers.mk.system-ogg comm-beta/mozilla/toolkit/toolkit-tiers.mk --- comm-beta/mozilla/toolkit/toolkit-tiers.mk.system-ogg 2013-03-21 03:21:02.000000000 +0100 +++ comm-beta/mozilla/toolkit/toolkit-tiers.mk 2013-03-26 12:33:04.039719491 +0100 @@ -89,10 +89,12 @@ tier_platform_dirs += js/jsd endif ifdef MOZ_VORBIS +ifndef MOZ_NATIVE_OGG tier_platform_dirs += \ media/libvorbis \ $(NULL) endif +endif ifdef MOZ_TREMOR tier_platform_dirs += \ @@ -101,10 +103,12 @@ tier_platform_dirs += \ endif ifdef MOZ_OPUS +ifndef MOZ_NATIVE_OGG tier_platform_dirs += \ media/libopus \ $(NULL) endif +endif ifdef MOZ_WEBM tier_platform_dirs += media/libnestegg @@ -117,11 +121,13 @@ endif endif ifdef MOZ_OGG +ifndef MOZ_NATIVE_OGG tier_platform_dirs += \ media/libogg \ media/libtheora \ $(NULL) endif +endif ifdef MOZ_SYDNEYAUDIO tier_platform_dirs += \