[Rhythmbox-devel] monkey-media without FLAC



Heya,

I don't like FLAC and don't use it. Could you commit this patch?
It also makes configure look in $(prefix)/include for the headers.

Cheers

-- 
/Bastien Nocera
http://hadess.net

#2  0x4205a2cc in printf ("Oh my %s\n", preferred_deity) from
/lib/i686/libc.so.6 printf ("Oh my %s\n", preferred_deity);
Segmentation fault
Index: configure.in
===================================================================
RCS file: /cvs/gnome/monkey-media/configure.in,v
retrieving revision 1.88
diff -u -r1.88 configure.in
--- configure.in	1 Jun 2003 06:57:15 -0000	1.88
+++ configure.in	30 Jul 2003 14:12:35 -0000
@@ -121,6 +121,9 @@
 ALL_LINGUAS="am az be cs da de es fi fr he it ja ko lv nl no pl pt pt_BR sr sr@Latn sv vi"
 AM_GLIB_GNU_GETTEXT
 
+CFLAGS="$CFLAGS -I$prefix/include"
+CPPFLAGS="$CPPFLAGS -I$prefix/include"
+
 dnl Check for zlib
 
 AC_CHECK_HEADER(zlib.h,,
@@ -143,9 +146,16 @@
 
 dnl Check for FLAC
 
-AC_CHECK_HEADER(FLAC/all.h,,
-		AC_MSG_ERROR(flac needed!))
-LIBS="$LIBS -lFLAC"
+AC_CHECK_HEADER(FLAC/all.h,
+		[ FLAC_LIBS="-lFLAC"
+		AC_DEFINE(HAVE_FLAC, 1, [defined if you have lirc library])
+		HAVE_FLAC=yes],
+		[ AC_MSG_WARN(flac support disabled)
+		HAVE_FLAC=no])
+AM_CONDITIONAL(HAVE_FLAC, `test x$HAVE_FLAC = xyes`)
+
+CFLAGS="$CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS"
+LIBS="$LIBS $OGG_LIBS $VORBIS_LIBS $VORBISFILE_LIBS $FLAC_LIBS"
 
 dnl Check for Musicbrainz
 PKG_CHECK_MODULES(MUSICBRAINZ,
Index: src/monkey-media.c
===================================================================
RCS file: /cvs/gnome/monkey-media/src/monkey-media.c,v
retrieving revision 1.46
diff -u -r1.46 monkey-media.c
--- src/monkey-media.c	1 Jun 2003 10:35:57 -0000	1.46
+++ src/monkey-media.c	30 Jul 2003 14:12:35 -0000
@@ -50,7 +50,9 @@
 #include "vorbis-stream-info-impl.h"
 #include "mp3-stream-info-impl.h"
 #include "audiocd-stream-info-impl.h"
+#ifdef HAVE_FLAC
 #include "flac-stream-info-impl.h"
+#endif
 
 static void monkey_media_init_internal (void);
 static void monkey_media_audio_driver_changed (GConfClient *client, guint cnxn_id,
@@ -180,8 +182,10 @@
 		       TYPE_VORBIS_STREAM_INFO_IMPL);
 	register_type ("application/x-ogg",
 		       TYPE_VORBIS_STREAM_INFO_IMPL);
+#ifdef HAVE_FLAC
         register_type ("application/x-flac",
                        TYPE_FLAC_STREAM_INFO_IMPL);
+#endif
 	register_type ("audio/x-mp3",
 		       TYPE_MP3_STREAM_INFO_IMPL);
 	register_type ("audio/mpeg",
Index: src/stream-info-impl/Makefile.am
===================================================================
RCS file: /cvs/gnome/monkey-media/src/stream-info-impl/Makefile.am,v
retrieving revision 1.5
diff -u -r1.5 Makefile.am
--- src/stream-info-impl/Makefile.am	8 Jan 2003 21:57:08 -0000	1.5
+++ src/stream-info-impl/Makefile.am	30 Jul 2003 14:12:35 -0000
@@ -2,20 +2,25 @@
 
 noinst_LTLIBRARIES = libstream-info-impl.la
 
+if HAVE_FLAC
+FLAC_FILES = flac-stream-info-impl.c flac-stream-info-impl.h
+else
+FLAC_FILES = 
+endif
+
 libstream_info_impl_la_SOURCES = 			\
 	vorbis-stream-info-impl.c			\
 	vorbis-stream-info-impl.h			\
 	mp3-stream-info-impl.c				\
 	mp3-stream-info-impl.h				\
-	flac-stream-info-impl.c				\
-	flac-stream-info-impl.h				\
+	$(FLAC_FILES)					\
 	audiocd-stream-info-impl.c			\
 	audiocd-stream-info-impl.h			\
 	ogg-helper.c					\
 	ogg-helper.h
 
 libstream_info_impl_la_LIBADD =				\
-	$(top_builddir)/src/stream-info-impl/id3-vfs/libid3-vfs.la -lFLAC
+	$(top_builddir)/src/stream-info-impl/id3-vfs/libid3-vfs.la
 
 INCLUDES = 						\
         -DGNOMELOCALEDIR=\""$(datadir)/locale"\"        \
@@ -23,3 +28,5 @@
 	-I$(top_srcdir) 				\
 	-I$(top_srcdir)/src 				\
 	$(MONKEYMEDIA_CFLAGS)
+
+EXTRA_DIST = flac-stream-info-impl.c flac-stream-info-impl.h


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]