[libpeas/proxys] Build with Gtk+ 3.0 if available.
- From: Steve Frécinaux <sfre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libpeas/proxys] Build with Gtk+ 3.0 if available.
- Date: Tue, 25 May 2010 23:08:38 +0000 (UTC)
commit 202be09f8cf4feeb30af77a135ba84e5f9596ed0
Author: Steve Frécinaux <code istique net>
Date: Tue May 25 23:39:06 2010 +0200
Build with Gtk+ 3.0 if available.
configure.ac | 16 +++++++++++++---
libpeasui/Makefile.am | 2 +-
2 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index b357353..0e95067 100644
--- a/configure.ac
+++ b/configure.ac
@@ -101,9 +101,19 @@ PKG_CHECK_MODULES(PEAS, [
gobject-introspection-1.0 >= 0.6.7
])
-PKG_CHECK_MODULES(PEASUI, [
- gtk+-2.0 >= 2.16.0
-])
+AC_MSG_CHECKING([for Gtk+ 3.0 availability.])
+PKG_CHECK_EXISTS([gtk+-3.0 >= 2.90],[found_gtk3=yes],[found_gtk3=no])
+AC_MSG_RESULT([$found_seed])
+
+if test "$found_gtk3" = "yes"; then
+ PKG_CHECK_MODULES(PEASUI, [gtk+-3.0 >= 2.90.0])
+ GTK_TYPELIB=Gtk-3.0
+else
+ PKG_CHECK_MODULES(PEASUI, [gtk+-2.0 >= 2.16.0])
+ GTK_TYPELIB=Gtk-2.0
+fi
+AC_SUBST(GTK_TYPELIB)
+
dnl ================================================================
dnl GObject Introspection
diff --git a/libpeasui/Makefile.am b/libpeasui/Makefile.am
index ae8a3f5..7f1e84d 100644
--- a/libpeasui/Makefile.am
+++ b/libpeasui/Makefile.am
@@ -40,7 +40,7 @@ if HAVE_INTROSPECTION
introspection_sources = $(libpeasui_2_0_la_SOURCES)
PeasUI-2.0.gir: libpeasui-2.0.la
- PeasUI_2_0_gir_INCLUDES = GObject-2.0 Gtk-2.0 Peas-2.0
+ PeasUI_2_0_gir_INCLUDES = GObject-2.0 $(GTK_TYPELIB) Peas-2.0
PeasUI_2_0_gir_CFLAGS = $(PEAS_CFLAGS) $(PEASUI_CFLAGS) -I$(top_srcdir)
PeasUI_2_0_gir_LIBS = libpeasui-2.0.la
PeasUI_2_0_gir_FILES = $(addprefix $(srcdir)/,$(introspection_sources))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]