[banshee] build: make GIO backend be enabled by default (bgo#686584)



commit 48e1951b6a12b8a183b0587301933c9d5350cc58
Author: Andres G. Aragoneses <knocte gmail com>
Date:   Mon Dec 10 23:14:17 2012 +0000

    build: make GIO backend be enabled by default (bgo#686584)
    
    Other IO backends were deprecated some time ago, so now the only option
    is Gio. Before this happened, the backend to build was guessed at config
    time by our M4 macros.
    
    Problem is, if dependencies for GIO were not met, the default was to
    silently not build any IO backend, which makes Banshee lacks lots of
    useful features.
    
    This commit changes this so it is now mandatory to pass the --disable-gio
    flag if the user wishes to compile without any IO backend.
    
    It doesn't completely solve bgo#686584 but helps alleviate the problem.
    And has the added benefit of making more versions of dependencies be
    clearly visible at the top of the macro.

 build/m4/banshee/gio.m4 |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/build/m4/banshee/gio.m4 b/build/m4/banshee/gio.m4
index 64bde97..76a7c00 100644
--- a/build/m4/banshee/gio.m4
+++ b/build/m4/banshee/gio.m4
@@ -1,18 +1,29 @@
 AC_DEFUN([BANSHEE_CHECK_GIO_SHARP],
 [
 	GNOMESHARP_REQUIRED=2.8
+	GIOSHARP_REQUIRED=2.22.3
 	
 	AC_ARG_ENABLE(gio, AC_HELP_STRING([--disable-gio], [Disable GIO for IO operations]), ,enable_gio="yes")
 	AC_ARG_ENABLE(gio_hardware, AC_HELP_STRING([--disable-gio-hardware], [Disable GIO Hardware backend]), ,enable_gio_hardware="yes")
 	
 	if test "x$enable_gio" = "xyes"; then
+
+		has_gtk_beans=no
 		PKG_CHECK_MODULES(GTKSHARP_BEANS,
 			gtk-sharp-beans-2.0 >= $GNOMESHARP_REQUIRED,
-			enable_gio=yes, enable_gio=no)
+			has_gtk_beans=yes, has_gtk_beans=no)
+
+		if test "x$has_gtk_beans" = "xno"; then
+			AC_MSG_ERROR([gtk-sharp-beans-2.0 was not found or is not up to date. Please install gtk-sharp-beans-2.0 of at least version $GNOMESHARP_REQUIRED, or disable GIO support by passing --disable-gio])
+		fi
 
+		has_gio_sharp=no
 		PKG_CHECK_MODULES(GIOSHARP,
-			gio-sharp-2.0 >= 2.22.3,
-			enable_gio="$enable_gio", enable_gio=no)
+			gio-sharp-2.0 >= $GIOSHARP_REQUIRED,
+			has_gio_sharp=yes, has_gio_sharp=no)
+		if test "x$has_gio_sharp" = "xno"; then
+			AC_MSG_ERROR([gio-sharp-2.0 was not found or is not up to date. Please install gio-sharp-2.0 of at least version $GIOSHARP_REQUIRED, or disable GIO support by passing --disable-gio])
+		fi
 
 		asms="`$PKG_CONFIG --variable=Libraries gio-sharp-2.0` `$PKG_CONFIG --variable=Libraries gtk-sharp-beans-2.0`"
 		for asm in $asms; do
@@ -29,7 +40,7 @@ AC_DEFUN([BANSHEE_CHECK_GIO_SHARP],
 		if test "x$enable_gio_hardware" = "xyes"; then
 			PKG_CHECK_MODULES(GUDEV_SHARP,
 				gudev-sharp-1.0 >= 0.1,
-				enable_gio_hardware="$enable_gio", enable_gio_hardware=no)
+				enable_gio_hardware=yes, enable_gio_hardware=no)
 
 			PKG_CHECK_MODULES(GKEYFILE_SHARP,
 				gkeyfile-sharp >= 0.1,
@@ -41,7 +52,7 @@ AC_DEFUN([BANSHEE_CHECK_GIO_SHARP],
 			fi
 		fi
 
-		AM_CONDITIONAL(ENABLE_GIO, test "x$enable_gio" = "xyes")
+		AM_CONDITIONAL(ENABLE_GIO, true)
 		AM_CONDITIONAL(ENABLE_GIO_HARDWARE, test "x$enable_gio_hardware" = "xyes")
 	else
 		enable_gio_hardware="no"



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