diff --git a/configure.ac b/configure.ac index 229ab88..c2c5031 100644 --- a/configure.ac +++ b/configure.ac @@ -63,7 +63,7 @@ GLIB_REQUIRED_VERSION=2.18.2 GTK_REQUIRED_VERSION=2.10.0 LIBGLADE_REQUIRED_VERSION=1.99.2 GCONF_REQUIRED_VERSION=2.6.1 -PA_REQUIRED_VERSION=0.9.12 # FIXME remove extra checks below when we have PA 0.9.15 +PA_REQUIRED_VERSION=0.9.12 CANBERRA_REQUIRED_VERSION=0.4 PKG_CHECK_MODULES(MEDIA, [ @@ -86,23 +86,32 @@ dnl======================================================================= dnl Check for libcanberra dnl======================================================================= -PKG_CHECK_MODULES(SOUND_THEME, - gobject-2.0 >= $GLIB_REQUIRED_VERSION - gtk+-2.0 >= $GTK_REQUIRED_VERSION - gio-2.0 - gconf-2.0 >= $GCONF_REQUIRED_VERSION - libcanberra-gtk >= $CANBERRA_REQUIRED_VERSION - libxml-2.0, - have_soundtheme=yes, - have_soundtheme=no) - -if test "x$have_soundtheme" = "xyes" ; then - AC_DEFINE(HAVE_SOUND_THEME, [], [Define if we can build sound theme]) +AC_ARG_ENABLE([canberra], + AC_HELP_STRING([--disable-canberra], [Disable canberra support @<:@default=yes@:>@]), + [enable_canberra="$enableval"], [enable_canberra="yes"]) + +have_soundtheme="no" +if test "x$enable_canberra" = "xyes"; then + + PKG_CHECK_MODULES(SOUND_THEME, + gobject-2.0 >= $GLIB_REQUIRED_VERSION + gtk+-2.0 >= $GTK_REQUIRED_VERSION + gio-2.0 + gconf-2.0 >= $GCONF_REQUIRED_VERSION + libcanberra-gtk >= $CANBERRA_REQUIRED_VERSION + libxml-2.0, + have_soundtheme=yes, + have_soundtheme=no) + + if test "x$have_soundtheme" = "xyes" ; then + AC_DEFINE(HAVE_SOUND_THEME, [], [Define if we can build sound theme]) + fi + + AC_SUBST(HAVE_SOUND_THEME) + AC_SUBST(SOUNDTHEME_CFLAGS) + AC_SUBST(SOUNDTHEME_LIBS) fi AM_CONDITIONAL(HAVE_SOUND_THEME, test x$have_soundtheme = xyes) -AC_SUBST(HAVE_SOUND_THEME) -AC_SUBST(SOUNDTHEME_CFLAGS) -AC_SUBST(SOUNDTHEME_LIBS) dnl======================================================================= dnl Check for the new volume control modules @@ -761,6 +770,7 @@ echo " GStreamer properties: $have_gstprops GStreamer profiles: $have_profiles Sound recorder: $have_grecord$grecord_reason + Sound Theme $have_soundtheme *Deprecated*: diff --git a/gnome-volume-control/src/Makefile.am b/gnome-volume-control/src/Makefile.am index f55e714..40c3936 100644 --- a/gnome-volume-control/src/Makefile.am +++ b/gnome-volume-control/src/Makefile.am @@ -7,7 +7,6 @@ bin_PROGRAMS = \ AM_CPPFLAGS = \ $(WARN_CFLAGS) \ - -I$(top_srcdir)/sound-theme \ $(VOLUME_CONTROL_CFLAGS) \ $(PULSEAUDIO_CFLAGS) \ -DLOCALE_DIR=\""$(datadir)/locale"\" \ @@ -16,6 +15,10 @@ AM_CPPFLAGS = \ -DICON_DATA_DIR="\"$(pkgdatadir)/icons\"" \ $(NULL) +if HAVE_SOUND_THEME +AM_CPPFLAGS += -I$(top_srcdir)/sound-theme +endif + gnome_volume_control_applet_LDADD = \ $(VOLUME_CONTROL_LIBS) \ $(PULSEAUDIO_LIBS) \ @@ -52,9 +55,13 @@ gnome_volume_control_applet_SOURCES = \ gnome_volume_control_LDADD = \ $(VOLUME_CONTROL_LIBS) \ $(PULSEAUDIO_LIBS) \ - $(top_builddir)/sound-theme/libsoundtheme.la \ $(NULL) +if HAVE_SOUND_THEME +gnome_volume_control_LDADD += \ + $(top_builddir)/sound-theme/libsoundtheme.la +endif + gnome_volume_control_SOURCES = \ gvc-mixer-stream.h \ gvc-mixer-stream.c \ diff --git a/gnome-volume-control/src/gvc-mixer-dialog.c b/gnome-volume-control/src/gvc-mixer-dialog.c index 573a6c1..95906d2 100644 --- a/gnome-volume-control/src/gvc-mixer-dialog.c +++ b/gnome-volume-control/src/gvc-mixer-dialog.c @@ -37,7 +37,9 @@ #include "gvc-mixer-source.h" #include "gvc-mixer-source-output.h" #include "gvc-mixer-dialog.h" +#ifdef HAVE_SOUND_THEME #include "gvc-sound-theme-chooser.h" +#endif /* HAVE_SOUND_THEME */ #include "gvc-level-bar.h" #define SCALE_SIZE 128 @@ -63,7 +65,9 @@ struct GvcMixerDialogPrivate GtkWidget *output_settings_box; GtkWidget *output_balance_bar; GtkWidget *input_treeview; +#ifdef HAVE_SOUND_THEME GtkWidget *sound_theme_chooser; +#endif GtkWidget *click_feedback_button; GtkWidget *audible_bell_button; GtkSizeGroup *size_group; @@ -1049,11 +1053,12 @@ gvc_mixer_dialog_constructor (GType type, gtk_box_pack_start (GTK_BOX (self->priv->sound_effects_box), self->priv->effects_bar, FALSE, FALSE, 12); +#ifdef HAVE_SOUND_THEME self->priv->sound_theme_chooser = gvc_sound_theme_chooser_new (); gtk_box_pack_start (GTK_BOX (self->priv->sound_effects_box), self->priv->sound_theme_chooser, TRUE, TRUE, 6); - +#endif /* Input page */ self->priv->input_box = gtk_vbox_new (FALSE, 12); gtk_container_set_border_width (GTK_CONTAINER (self->priv->input_box), 12);