rhythmbox r6215 - in trunk: . plugins/audiocd
- From: jmatthew svn gnome org
- To: svn-commits-list gnome org
- Subject: rhythmbox r6215 - in trunk: . plugins/audiocd
- Date: Tue, 17 Mar 2009 01:38:02 +0000 (UTC)
Author: jmatthew
Date: Tue Mar 17 01:38:02 2009
New Revision: 6215
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=6215&view=rev
Log:
2009-03-17 Jonathan Matthew <jonathan d14n org>
* configure.ac:
* plugins/audiocd/Makefile.am:
* plugins/audiocd/rb-audiocd-source.c: (rb_audiocd_load_metadata),
(rb_audiocd_load_metadata_cancel):
Rework autoconf stuff for musicbrainz so --disable-musicbrainz works,
and the audio CD plugin calls the metadata code when only musicbrainz3
is enabled.
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/plugins/audiocd/Makefile.am
trunk/plugins/audiocd/rb-audiocd-source.c
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue Mar 17 01:38:02 2009
@@ -307,32 +307,37 @@
AC_SUBST(GSTCDDA_CFLAGS)
dnl check for MusicBrainz
+have_sj_metadata_getter=no
AC_ARG_ENABLE(musicbrainz, AC_HELP_STRING([--disable-musicbrainz],
[don't build with MusicBrainz support]))
if test x"$enable_musicbrainz" != "xno"; then
- PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= $MUSICBRAINZ_REQS,
- enable_musicbrainz=yes,
- enable_musicbrainz=no)
-fi
-if test x"$enable_musicbrainz" = xyes; then
- RHYTHMBOX_CFLAGS="$RHYTHMBOX_CFLAGS $MUSICBRAINZ_CFLAGS"
- RHYTHMBOX_LIBS="$RHYTHMBOX_LIBS $MUSICBRAINZ_LIBS"
- AC_DEFINE(HAVE_MUSICBRAINZ, 1, [define if you have Musicbrainz])
-fi
-AM_CONDITIONAL(HAVE_MUSICBRAINZ, test "x$enable_musicbrainz" = "xyes")
+ PKG_CHECK_MODULES(MUSICBRAINZ3, libmusicbrainz3, [have_musicbrainz3=yes], [have_musicbrainz3=no])
+ PKG_CHECK_MODULES(MUSICBRAINZ, libmusicbrainz >= $MUSICBRAINZ_REQS, [have_musicbrainz=yes], [have_musicbrainz=no])
-PKG_CHECK_MODULES(MUSICBRAINZ3, libmusicbrainz3, [have_mb3=yes], [have_mb3=no])
-AC_SUBST(MUSICBRAINZ3_CFLAGS)
-AC_SUBST(MUSICBRAINZ3_LIBS)
-if test "$have_mb3" = "yes" ; then
- AC_DEFINE([HAVE_MUSICBRAINZ3], 1, [Whether libmusicbrainz3 is available])
-fi
-AM_CONDITIONAL([HAVE_MUSICBRAINZ3], [test "x$have_mb3" = "xyes"])
+ AC_SUBST(MUSICBRAINZ3_CFLAGS)
+ AC_SUBST(MUSICBRAINZ3_LIBS)
+ AC_SUBST(MUSICBRAINZ_CFLAGS)
+ AC_SUBST(MUSICBRAINZ_LIBS)
-if test "$have_mb3" = "yes" || test x"$enable_musicbrainz" = xyes; then
- have_sj_getter=yes
+ if test x"$have_musicbrainz3" = xyes; then
+ AC_DEFINE([HAVE_MUSICBRAINZ3], 1, [Whether libmusicbrainz3 is available])
+ fi
+ if test x"$have_musicbrainz" = xyes; then
+ AC_DEFINE([HAVE_MUSICBRAINZ], 1, [define if you have Musicbrainz])
+ fi
+
+ if test x"$have_musicbrainz3" = "xyes" || test x"$have_musicbrainz" = "xyes"; then
+ have_sj_metadata_getter=yes
+ AC_DEFINE([HAVE_SJ_METADATA_GETTER], 1, [Whether to use the sound-juicer metadata getter code])
+ else
+ if test x"$enable_musicbrainz" = xyes; then
+ AC_MSG_ERROR([MusicBrainz requested, but neither libmusicbrainz nor libmusicbrainz3 are available])
+ fi
+ fi
fi
-AM_CONDITIONAL([HAVE_SJ_METADATA_GETTER], [test "x$have_sj_getter" = "xyes"])
+AM_CONDITIONAL([HAVE_MUSICBRAINZ], [test "x$have_musicbrainz" = "xyes"])
+AM_CONDITIONAL([HAVE_MUSICBRAINZ3], [test "x$have_musicbrainz3" = "xyes"])
+AM_CONDITIONAL([HAVE_SJ_METADATA_GETTER], [test "x$have_sj_metadata_getter" = "xyes"])
AC_PATH_XTRA
CFLAGS="$CFLAGS $X_CFLAGS"
@@ -866,16 +871,15 @@
else
AC_MSG_NOTICE([** Multimedia keys support is enabled])
fi
-if test x"$enable_musicbrainz" != "xyes"; then
- AC_MSG_NOTICE([ MusicBrainz support is disabled])
-else
- AC_MSG_NOTICE([** MusicBrainz support is enabled])
-fi
-if test x"$have_mb3" != "xyes"; then
- AC_MSG_NOTICE([ MusicBrainz3 support is disabled])
+if test x"$have_musicbrainz3" = "xyes" && test x"$have_musicbrainz" = "xyes"; then
+ AC_MSG_NOTICE([** MusicBrainz support is enabled (using libmusicbrainz3 and libmusicbrainz)])
+elif test x"$have_musicbrainz3" = "xyes"; then
+ AC_MSG_NOTICE([** MusicBrainz support is enabled (using libmusicbrainz3)])
+elif test x"$have_musicbrainz" = "xyes"; then
+ AC_MSG_NOTICE([** MusicBrainz support is enabled (using libmusicbrainz)])
else
- AC_MSG_NOTICE([** MusicBrainz3 support is enabled])
+ AC_MSG_NOTICE([ MusicBrainz support is disabled])
fi
if test x"$use_ipod" = xyes; then
Modified: trunk/plugins/audiocd/Makefile.am
==============================================================================
--- trunk/plugins/audiocd/Makefile.am (original)
+++ trunk/plugins/audiocd/Makefile.am Tue Mar 17 01:38:02 2009
@@ -11,18 +11,8 @@
libaudiocd_la_LIBADD = \
$(top_builddir)/corelib/librhythmbox-core.la \
$(TOTEM_PLPARSER_LIBS) \
- $(LIBNAUTILUS_BURN_LIBS) \
$(GSTCDDA_LIBS)
-if HAVE_MUSICBRAINZ
-libaudiocd_la_LIBADD += $(MUSICBRAINZ_LIBS)
-endif
-if HAVE_MUSICBRAINZ3
-libaudiocd_la_LIBADD +=$(MUSICBRAINZ3_LIBS)
-endif
-
-libaudiocd_la_LIBADD += $(NULL)
-
INCLUDES = \
-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
-DG_LOG_DOMAIN=\"Rhythmbox\" \
@@ -46,11 +36,21 @@
$(TOTEM_PLPARSER_CFLAGS) \
$(RHYTHMBOX_CFLAGS) \
$(GSTCDDA_CFLAGS) \
- $(MUSICBRAINZ_CFLAGS) $(MUSICBRAINZ3_CFLAGS) \
- $(LIBNAUTILUS_BURN_CFLAGS) \
-DUSE_TOTEM_PL_PARSER \
-D_XOPEN_SOURCE -D_BSD_SOURCE
+if HAVE_MUSICBRAINZ
+libaudiocd_la_LIBADD += $(MUSICBRAINZ_LIBS)
+INCLUDES += $(MUSICBRAINZ_CFLAGS)
+endif
+if HAVE_MUSICBRAINZ3
+libaudiocd_la_LIBADD +=$(MUSICBRAINZ3_LIBS)
+INCLUDES += $(MUSICBRAINZ3_CFLAGS)
+endif
+
+libaudiocd_la_LIBADD += $(NULL)
+
+
gladedir = $(plugindir)
glade_DATA = multiple-album.glade
Modified: trunk/plugins/audiocd/rb-audiocd-source.c
==============================================================================
--- trunk/plugins/audiocd/rb-audiocd-source.c (original)
+++ trunk/plugins/audiocd/rb-audiocd-source.c Tue Mar 17 01:38:02 2009
@@ -51,7 +51,7 @@
#include "rb-dialog.h"
#include "rb-glade-helpers.h"
-#ifdef HAVE_MUSICBRAINZ
+#ifdef HAVE_SJ_METADATA_GETTER
#include "sj-metadata-getter.h"
#include "sj-structures.h"
#endif
@@ -81,7 +81,7 @@
GstElement *cdda;
GstElement *fakesink;
-#ifdef HAVE_MUSICBRAINZ
+#ifdef HAVE_SJ_METADATA_GETTER
SjMetadataGetter *metadata;
#endif
} RBAudioCdSourcePrivate;
@@ -89,7 +89,7 @@
RB_PLUGIN_DEFINE_TYPE (RBAudioCdSource, rb_audiocd_source, RB_TYPE_REMOVABLE_MEDIA_SOURCE)
#define AUDIOCD_SOURCE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RB_TYPE_AUDIOCD_SOURCE, RBAudioCdSourcePrivate))
-#ifdef HAVE_MUSICBRAINZ
+#ifdef HAVE_SJ_METADATA_GETTER
static AlbumDetails* multiple_album_dialog (GList *albums, RBAudioCdSource *source);
#endif
static void
@@ -371,7 +371,7 @@
return db;
}
-#ifdef HAVE_MUSICBRAINZ
+#ifdef HAVE_SJ_METADATA_GETTER
/*
* Called by the Multiple Album dialog when the user hits return in
@@ -619,7 +619,7 @@
rb_audiocd_load_metadata (RBAudioCdSource *source,
RhythmDB *db)
{
-#ifdef HAVE_MUSICBRAINZ
+#ifdef HAVE_SJ_METADATA_GETTER
RBAudioCdSourcePrivate *priv = AUDIOCD_SOURCE_GET_PRIVATE (source);
priv->metadata = sj_metadata_getter_new ();
@@ -634,7 +634,7 @@
static void
rb_audiocd_load_metadata_cancel (RBAudioCdSource *source)
{
-#ifdef HAVE_MUSICBRAINZ
+#ifdef HAVE_SJ_METADATA_GETTER
RBAudioCdSourcePrivate *priv = AUDIOCD_SOURCE_GET_PRIVATE (source);
if (priv->metadata) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]