[PATCH 3/3] build: check for gtk+-3.0



The configure script will check for gtk+-3.0 pkg-config. It it is not
available, the script will check for gtk+2.0. If both libraries are available,
gtk+-3.0 will be used.
---
 configure.ac |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 7e5db96..6f1e865 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,12 +100,16 @@ GLIB_MKENUMS=`pkg-config --variable=glib_mkenums glib-2.0`
 AC_SUBST(GLIB_GENMARSHAL)
 AC_SUBST(GLIB_MKENUMS)
 
-# Tools
+# ----------------------------------------------------------
+# UI Tool
+# ----------------------------------------------------------
+
+gtkver="gtk+-3.0"
+PKG_CHECK_EXISTS([gtk+-3.0], [gtkver="gtk+-3.0"], [gtkver="gtk+-2.0"])
 
-PKG_CHECK_MODULES(GTU, gtk+-2.0 \
-                       gconf-2.0,
-                       BUILD_GRILO_TEST_UI=yes,
-                       BUILD_GRILO_TEST_UI=no)
+PKG_CHECK_MODULES([GTU], [ ${gtkver} gconf-2.0 ],
+                       [ BUILD_GRILO_TEST_UI=yes ],
+                       [ BUILD_GRILO_TEST_UI=no ])
 
 AM_CONDITIONAL(BUILD_GRILO_TEST_UI, test "x$BUILD_GRILO_TEST_UI" = "xyes")
 
-- 
1.7.4.4



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