summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorGabriel Burt <gabriel.burt@gmail.com>2011-04-08 16:40:55 -0500
committerGabriel Burt <gabriel.burt@gmail.com>2011-04-08 16:40:55 -0500
commitac75304d1d617fb6e0ce405f63b6b5d330b80c6b (patch)
treee3a85e7c1a90008dc187be3194fc55e084e36662 /build
parent8cadf85c1790c01c6124b21ea8c7b2d8cbc9b59f (diff)
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.
Diffstat (limited to 'build')
-rw-r--r--build/m4/banshee/gtk-sharp.m450
1 files changed, 35 insertions, 15 deletions
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
+])