beagle r4406 - trunk/beagle



Author: nirbheekc
Date: Sat Jan 19 17:39:30 2008
New Revision: 4406
URL: http://svn.gnome.org/viewvc/beagle?rev=4406&view=rev

Log:
Add flexibility for enabling/disabling the internal taglib-sharp. The current scenario uses too much magic (use external if possible, else internal with no flags to control it), not letting the maintainer decide which one to use. 
This is especially problematic on Gentoo, since if the maintainer wishes to use the internal taglib-sharp for Beagle, configure will automagically link with an external taglib-sharp if it is present. This will break Beagle when the taglib-sharp disappears.

- If --enable-internal-taglib is passed, always use the internal taglib
- If --disable-internal-taglib is passed, use an external taglib, and error out if it isn't installed.
- If nothing is specified, auto detect in the same way as before.

This does not change "expected behaviour" as in the old way (magical auto-detection), and adds the ability to select which one the maintainer wants to use.

Modified:
   trunk/beagle/configure.in

Modified: trunk/beagle/configure.in
==============================================================================
--- trunk/beagle/configure.in	(original)
+++ trunk/beagle/configure.in	Sat Jan 19 17:39:30 2008
@@ -345,9 +345,24 @@
 
 dnl taglib-sharp: Needed for indexing audio formats
 
-PKG_CHECK_MODULES(TAGLIB_SHARP, taglib-sharp >= 2.0, internal_taglib=no, internal_taglib=yes)
+AC_ARG_ENABLE([internal-taglib],
+	AC_HELP_STRING([--enable-internal-taglib], [Use internal taglib-sharp (default auto)]),
+	enable_internal_taglib=$enableval,
+	enable_internal_taglib=auto)
+
+if test "x$enable_internal_taglib" != "xyes"; then
+	PKG_CHECK_MODULES(TAGLIB_SHARP, taglib-sharp >= 2.0, internal_taglib=no, internal_taglib=yes)
+	if test "x$enable_internal_taglib" = "xno" -a "x$internal_taglib" = "xyes"; then
+		AC_MSG_ERROR([taglib-sharp => 2.0 not found])
+	else
+		enable_internal_taglib=$internal_taglib
+	fi
+else
+	enable_internal_taglib="yes"
+fi
+
 AC_SUBST(TAGLIB_SHARP_LIBS)
-AM_CONDITIONAL(INTERNAL_TAGLIB, test "x$internal_taglib" = "xyes")
+AM_CONDITIONAL(INTERNAL_TAGLIB, test "x$enable_internal_taglib" = "xyes")
 
 dnl ----------------------------------------------
 
@@ -622,7 +637,7 @@
 	Epiphany Extension?	  ${enable_epiphany_extension}
 	Thunderbird Extension? 	  ${enable_tbird}
 
-	Local taglib-sharp?       ${internal_taglib}
+	Local taglib-sharp?       ${enable_internal_taglib}
 
 	Monitor screensaver       ${have_xss}
 	beagle-search GUI	  ${enable_gui}



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