Link static builds against libasound b=511801 (based on patch from bug 511326)
authorKarl Tomlinson <karlt+@karlt.net>
Fri, 21 Aug 2009 19:01:52 +1200
changeset 3364 84acdee35d53ba345dfcf1d7a2c1d45490a9b7ca
parent 3363 b748a1b91122b0acf5794bd60800326d891fdc8d
child 3365 f9965b18fa14ea284616539c2e0ade042ba63c29
push idunknown
push userunknown
push dateunknown
bugs511801, 511326
Link static builds against libasound b=511801 (based on patch from bug 511326)
config/autoconf.mk.in
config/static-config.mk
configure.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -493,16 +493,18 @@ FT2_CFLAGS             = @FT2_CFLAGS@
 FT2_LIBS               = @FT2_LIBS@
 
 MOZ_PANGO_CFLAGS        = @MOZ_PANGO_CFLAGS@
 MOZ_PANGO_LIBS          = @MOZ_PANGO_LIBS@
 
 MOZ_XIE_LIBS		= @MOZ_XIE_LIBS@
 XT_LIBS			= @XT_LIBS@
 
+MOZ_ALSA_LIBS           = @MOZ_ALSA_LIBS@
+
 GLIB_CFLAGS	= @GLIB_CFLAGS@
 GLIB_LIBS	= @GLIB_LIBS@
 GLIB_GMODULE_LIBS	= @GLIB_GMODULE_LIBS@
 LIBIDL_CFLAGS = @LIBIDL_CFLAGS@
 LIBIDL_LIBS = @LIBIDL_LIBS@
 STATIC_LIBIDL = @STATIC_LIBIDL@
 
 MOZ_NATIVE_MAKEDEPEND	= @SYSTEM_MAKEDEPEND@
--- a/config/static-config.mk
+++ b/config/static-config.mk
@@ -95,16 +95,20 @@ endif
 ifdef MOZ_STORAGE
 STATIC_EXTRA_LIBS	+= $(SQLITE_LIBS)
 endif
 
 ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
 STATIC_EXTRA_LIBS	+= $(MOZ_STARTUP_NOTIFICATION_LIBS)
 endif
 
+ifeq ($(OS_ARCH),Linux)
+STATIC_EXTRA_LIBS += $(MOZ_ALSA_LIBS)
+endif
+
 # Component Makefile always brings in this.
 # STATIC_EXTRA_LIBS	+= $(TK_LIBS)
 
 # Some random modules require this
 ifndef MOZ_NO_XPCOM_OBSOLETE
 STATIC_EXTRA_LIBS	+= $(MOZ_XPCOM_OBSOLETE_LIBS)
 endif
 
--- a/configure.in
+++ b/configure.in
@@ -4504,16 +4504,19 @@ MOZ_LDAP_XPCOM=
 MOZ_MAIL_NEWS=
 MOZ_MORK=1
 MOZ_MORKREADER=
 MOZ_AUTH_EXTENSION=1
 MOZ_NO_ACTIVEX_SUPPORT=1
 MOZ_NO_INSPECTOR_APIS=
 MOZ_NO_XPCOM_OBSOLETE=
 MOZ_NO_FAST_LOAD=
+MOZ_OGG=1
+MOZ_SYDNEYAUDIO=
+MOZ_WAVE=1
 MOZ_OJI=
 MOZ_PERMISSIONS=1
 MOZ_PLACES=
 MOZ_PLAINTEXT_EDITOR_ONLY=
 MOZ_PLUGINS=1
 MOZ_PREF_EXTENSIONS=1
 MOZ_PROFILELOCKING=1
 MOZ_PSM=1
@@ -5405,16 +5408,56 @@ MOZ_ARG_DISABLE_BOOL(xpcom-fastload,
 
 AC_SUBST(MOZ_NO_FAST_LOAD)
 
 if test -n "$MOZ_NO_FAST_LOAD"; then
     AC_DEFINE(MOZ_NO_FAST_LOAD)
 fi
 
 dnl ========================================================
+dnl = Disable Ogg Codecs
+dnl ========================================================
+MOZ_ARG_DISABLE_BOOL(ogg,
+[  --disable-ogg           Disable Ogg Codec support],
+    MOZ_OGG=,
+    MOZ_OGG=1)
+
+if test -n "$MOZ_OGG"; then
+    MOZ_SYDNEYAUDIO=1
+fi
+
+dnl ========================================================
+dnl = Disable Wave decoder support
+dnl ========================================================
+MOZ_ARG_DISABLE_BOOL(wave,
+[  --disable-wave          Disable Wave decoder support],
+    MOZ_WAVE=,
+    MOZ_WAVE=1)
+
+if test -n "$MOZ_WAVE"; then
+    MOZ_SYDNEYAUDIO=1
+fi
+
+dnl ========================================================
+dnl = Check alsa availability on Linux if using sydneyaudio
+dnl ========================================================
+
+dnl If using sydneyaudio with Linux, ensure that the alsa library is available
+if test -n "$MOZ_SYDNEYAUDIO"; then
+   case "$target_os" in
+linux*)
+      PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
+         [echo "$MOZ_ALSA_PKG_ERRORS"
+          AC_MSG_ERROR([Need alsa for Ogg or Wave decoding on Linux.  Disable with --disable-ogg --disable-wave.])])
+      ;;
+   esac
+fi
+AC_SUBST(MOZ_ALSA_LIBS)
+
+dnl ========================================================
 dnl Permissions System
 dnl ========================================================
 MOZ_ARG_DISABLE_BOOL(permissions,
 [  --disable-permissions   Disable permissions (popup and cookie blocking)],
     MOZ_PERMISSIONS=,
     MOZ_PERMISSIONS=1
 )