[banshee] build: Look for Gtk# 3 first, fall back to Gtk#2
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] build: Look for Gtk# 3 first, fall back to Gtk#2
- Date: Fri, 8 Apr 2011 21:56:39 +0000 (UTC)
commit ac75304d1d617fb6e0ce405f63b6b5d330b80c6b
Author: Gabriel Burt <gabriel burt gmail com>
Date: Fri Apr 8 16:40:55 2011 -0500
build: Look for Gtk# 3 first, fall back to Gtk#2
This commit only adjusts our autoconf, it doesn't actually port
Hyena/Banshee to build against Gtk# 3.
build/m4/banshee/gtk-sharp.m4 | 50 ++++++++++++++++++++++++++++------------
configure.ac | 1 +
2 files changed, 36 insertions(+), 15 deletions(-)
---
diff --git a/build/m4/banshee/gtk-sharp.m4 b/build/m4/banshee/gtk-sharp.m4
index 795bfdd..f5e5948 100644
--- a/build/m4/banshee/gtk-sharp.m4
+++ b/build/m4/banshee/gtk-sharp.m4
@@ -1,23 +1,43 @@
AC_DEFUN([BANSHEE_CHECK_GTK_SHARP],
[
- GTKSHARP_REQUIRED=2.12
+ GTKSHARP3_REQUIRED=2.99
+ GTKSHARP2_REQUIRED=2.12
- PKG_CHECK_MODULES(GTKSHARP,
- gtk-sharp-2.0 >= $GTKSHARP_REQUIRED)
- AC_SUBST(GTKSHARP_LIBS)
+ dnl First check for gtk-sharp-3.0
+ PKG_CHECK_MODULES(GTKSHARP, gtk-sharp-3.0 >= $GTKSHARP3_REQUIRED, have_gtk3=yes, have_gtk3=no)
+ if test "x$have_gtk3" = "xyes"; then
+ AC_SUBST(GTKSHARP_LIBS)
- PKG_CHECK_MODULES(GLIBSHARP,
- glib-sharp-2.0 >= $GTKSHARP_REQUIRED)
- AC_SUBST(GLIBSHARP_LIBS)
+ PKG_CHECK_MODULES(GLIBSHARP, glib-sharp-3.0 >= $GTKSHARP3_REQUIRED)
+ AC_SUBST(GLIBSHARP_LIBS)
- PKG_CHECK_MODULES(GLIBSHARP_2_12_7,
- glib-sharp-2.0 >= 2.12.7,
- HAVE_GLIBSHARP_2_12_7=yes,
- HAVE_GLIBSHARP_2_12_7=no)
- AM_CONDITIONAL(HAVE_GLIBSHARP_2_12_7, [test "$HAVE_GLIBSHARP_2_12_7" = "yes"])
+ gtk_version=3
+ AM_CONDITIONAL(HAVE_GTK3, true)
- PKG_CHECK_MODULES(GTKSHARP_A11Y, gtk-sharp-2.0 >= 2.12.10, gtksharp_with_a11y=yes, gtksharp_with_a11y=no)
- AM_CONDITIONAL(ENABLE_ATK, test "x$gtksharp_with_a11y" = "xyes")
+ HAVE_GLIBSHARP_2_12_7=yes
+ AM_CONDITIONAL(HAVE_GLIBSHARP_2_12_7, true)
-])
+ gtksharp_with_a11y=yes
+ AM_CONDITIONAL(ENABLE_ATK, true)
+ else
+ dnl Fall back to gtk-sharp-2.0
+
+ PKG_CHECK_MODULES(GTKSHARP, gtk-sharp-2.0 >= $GTKSHARP2_REQUIRED)
+ AC_SUBST(GTKSHARP_LIBS)
+
+ PKG_CHECK_MODULES(GLIBSHARP, glib-sharp-2.0 >= $GTKSHARP2_REQUIRED)
+ AC_SUBST(GLIBSHARP_LIBS)
+ PKG_CHECK_MODULES(GLIBSHARP_2_12_7,
+ glib-sharp-2.0 >= 2.12.7,
+ HAVE_GLIBSHARP_2_12_7=yes,
+ HAVE_GLIBSHARP_2_12_7=no)
+ AM_CONDITIONAL(HAVE_GLIBSHARP_2_12_7, [test "$HAVE_GLIBSHARP_2_12_7" = "yes"])
+
+ PKG_CHECK_MODULES(GTKSHARP_A11Y, gtk-sharp-2.0 >= 2.12.10, gtksharp_with_a11y=yes, gtksharp_with_a11y=no)
+ AM_CONDITIONAL(ENABLE_ATK, test "x$gtksharp_with_a11y" = "xyes")
+
+ AM_CONDITIONAL(HAVE_GTK3, false)
+ gtk_version="2"
+ fi
+])
diff --git a/configure.ac b/configure.ac
index d632736..3da7764 100644
--- a/configure.ac
+++ b/configure.ac
@@ -400,6 +400,7 @@ ${PACKAGE}-${VERSION}
C Compiler: ${CC}
Mono C# Compiler: ${MCS} ${GMCS_FLAGS}
Mono Runtime: ${MONO}
+ Gtk#: ${gtk_version}
Video/Graphics:
Graphics System: ${GRAPHICS_SUBSYSTEM}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]