[banshee] YouTube: advice about --disable-youtube configuration flag (bgo#686582)



commit 731aaae5384bc0dda5030efb43f0a15421fef172
Author: Andres G. Aragoneses <knocte gmail com>
Date:   Mon Dec 10 19:42:10 2012 +0000

    YouTube: advice about --disable-youtube configuration flag (bgo#686582)
    
    YouTube extension is an optional requirement to build banshee, however
    it was not very clear how to disable it if the dependencies required
    for it were not found. With this modification we get also a bit more
    consistent to how other extensions advice about their --disable flags
    (i.e.: AppleDevice).
    
    This has the additional benefit of simplifying a bit youtube's m4 macro,
    as there is no longer a nested PKG_CHECK_MODULES call inside another one.

 build/m4/banshee/youtube.m4 |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/build/m4/banshee/youtube.m4 b/build/m4/banshee/youtube.m4
index 4a74bf4..b7f7bad 100644
--- a/build/m4/banshee/youtube.m4
+++ b/build/m4/banshee/youtube.m4
@@ -5,11 +5,19 @@ AC_DEFUN([BANSHEE_CHECK_YOUTUBE],
 	AC_ARG_ENABLE(youtube, AC_HELP_STRING([--disable-youtube], [Disable Youtube extension]), , enable_youtube="yes")
 
 	if test "x$enable_youtube" = "xyes"; then
+
+		has_gdata=no
 		PKG_CHECK_MODULES(GDATASHARP,
+			gdata-sharp-youtube >= $GDATASHARP_REQUIRED_VERSION,
+			has_gdata=yes, has_gdata=no)
+		if test "x$has_gdata" = "xno"; then
+			AC_MSG_ERROR([gdata-sharp-youtube was not found or is not up to date. Please install gdata-sharp-youtube of at least version $GDATASHARP_REQUIRED_VERSION, or disable YouTube extension by passing --disable-youtube])
+		fi
+
+		PKG_CHECK_MODULES(GDATASHARP_1_5_OR_HIGHER,
 			gdata-sharp-youtube >= 1.5,
 			[AM_CONDITIONAL(HAVE_GDATASHARP_1_5, true)],
-			[PKG_CHECK_MODULES(GDATASHARP, gdata-sharp-youtube >= $GDATASHARP_REQUIRED_VERSION)
-			 AM_CONDITIONAL(HAVE_GDATASHARP_1_5, false)]
+			[AM_CONDITIONAL(HAVE_GDATASHARP_1_5, false)]
 		)
 		AC_SUBST(GDATASHARP_LIBS)
 		AM_CONDITIONAL(ENABLE_YOUTUBE, true)



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