Bug 709721 part 3 - Only try to export gkmedias symbols that are defined wrt configuration. r=khuey
authorMike Hommey <mh+mozilla@glandium.org>
Fri, 16 Dec 2011 11:21:56 +0100
changeset 84425 30f9367dfa68f936d54a2e358fe1df3022102ae6
parent 84406 dcf6e5163e631a470678cd35d1b6733687d9f034
child 84426 99b340cb215f58c1a2dc670de765a534016b1f76
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs709721
milestone11.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 709721 part 3 - Only try to export gkmedias symbols that are defined wrt configuration. r=khuey
configure.in
layout/media/Makefile.in
layout/media/symbols.def
layout/media/symbols.def.in
--- a/configure.in
+++ b/configure.in
@@ -5700,16 +5700,17 @@ if test -n "$MOZ_WEBM"; then
                 #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
+                 AC_DEFINE(MOZ_NATIVE_LIBVPX)
                  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
--- a/layout/media/Makefile.in
+++ b/layout/media/Makefile.in
@@ -88,12 +88,15 @@ endif
 
 SHARED_LIBRARY_LIBS 	+= \
 	$(DEPTH)/gfx/angle/$(LIB_PREFIX)angle.$(LIB_SUFFIX) \
 	$(NULL)
 
 EXTRA_DSO_LDOPTS = $(MOZALLOC_LIB) $(NSPR_LIBS)
 
 ifeq (WINNT,$(OS_TARGET))
-DEFFILE = $(srcdir)/symbols.def
+DEFFILE = symbols.def
+
+symbols.def: symbols.def.in
+	$(PYTHON) $(topsrcdir)/config/Preprocessor.py $(ACDEFINES) $< > $@
 endif
 
 include $(topsrcdir)/config/rules.mk
rename from layout/media/symbols.def
rename to layout/media/symbols.def.in
--- a/layout/media/symbols.def
+++ b/layout/media/symbols.def.in
@@ -1,10 +1,11 @@
 LIBRARY gkmedias.dll
 EXPORTS
+#ifdef MOZ_WEBM
 nestegg_destroy
 nestegg_duration
 nestegg_free_packet
 nestegg_init
 nestegg_packet_count
 nestegg_packet_data
 nestegg_packet_track
 nestegg_packet_tstamp
@@ -13,75 +14,84 @@ nestegg_track_audio_params
 nestegg_track_codec_data
 nestegg_track_codec_data_count
 nestegg_track_codec_id
 nestegg_track_count
 nestegg_track_seek
 nestegg_track_type
 nestegg_track_video_params
 nestegg_tstamp_scale
+#ifndef MOZ_NATIVE_LIBVPX
+vpx_codec_dec_init_ver
+vpx_codec_decode
+vpx_codec_destroy
+vpx_codec_get_frame
+vpx_codec_peek_stream_info
+vpx_codec_vp8_dx
+#endif
+#endif
+#ifdef MOZ_VORBIS
 ogg_page_bos
 ogg_page_granulepos
 ogg_page_serialno
 ogg_stream_check
 ogg_stream_clear
 ogg_stream_init
 ogg_stream_packetout
 ogg_stream_pagein
 ogg_stream_reset
 ogg_sync_buffer
 ogg_sync_clear
 ogg_sync_init
 ogg_sync_pageseek
 ogg_sync_reset
 ogg_sync_wrote
-sa_stream_create_pcm
-sa_stream_destroy
-sa_stream_drain
-sa_stream_get_min_write
-sa_stream_get_position
-sa_stream_get_write_size
-sa_stream_open
-sa_stream_pause
-sa_stream_resume
-sa_stream_write
-th_comment_clear
-th_comment_init
-th_decode_alloc
-th_decode_free
-th_decode_headerin
-th_decode_packetin
-th_decode_ycbcr_out
-th_granule_frame
-th_info_clear
-th_info_init
-th_packet_isheader
-th_packet_iskeyframe
-th_setup_free
 vorbis_block_clear
 vorbis_block_init
 vorbis_comment_clear
 vorbis_comment_init
 vorbis_dsp_clear
 vorbis_info_clear
 vorbis_info_init
 vorbis_packet_blocksize
 vorbis_synthesis
 vorbis_synthesis_blockin
 vorbis_synthesis_headerin
 vorbis_synthesis_init
 vorbis_synthesis_pcmout
 vorbis_synthesis_read
 vorbis_synthesis_restart
-vpx_codec_dec_init_ver
-vpx_codec_decode
-vpx_codec_destroy
-vpx_codec_get_frame
-vpx_codec_peek_stream_info
-vpx_codec_vp8_dx
+#endif
+#ifdef MOZ_SYDNEYAUDIO
+sa_stream_create_pcm
+sa_stream_destroy
+sa_stream_drain
+sa_stream_get_min_write
+sa_stream_get_position
+sa_stream_get_write_size
+sa_stream_open
+sa_stream_pause
+sa_stream_resume
+sa_stream_write
+#endif
+#ifdef MOZ_OGG
+th_comment_clear
+th_comment_init
+th_decode_alloc
+th_decode_free
+th_decode_headerin
+th_decode_packetin
+th_decode_ycbcr_out
+th_granule_frame
+th_info_clear
+th_info_init
+th_packet_isheader
+th_packet_iskeyframe
+th_setup_free
+#endif
 ShInitialize
 ShFinalize
 ShGetObjectCode
 ShDestruct
 ShGetInfoLog
 ShCompile
 ShGetInfo
 ShConstructCompiler