From ac75304d1d617fb6e0ce405f63b6b5d330b80c6b Mon Sep 17 00:00:00 2001 From: Gabriel Burt Date: Fri, 8 Apr 2011 16:40:55 -0500 Subject: 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 ++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 15 deletions(-) (limited to 'build/m4') diff --git a/build/m4/banshee/gtk-sharp.m4 b/build/m4/banshee/gtk-sharp.m4 index 795bfdd5e..f5e5948f1 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 +]) -- cgit v1.2.3