[librsvg/next: 7/31] Simplify configure check for gtk 2 + 3
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/next: 7/31] Simplify configure check for gtk 2 + 3
- Date: Fri, 21 Oct 2011 21:21:27 +0000 (UTC)
commit 8b3a365b5d4b8ff252d0fe79bcb4825807c68edd
Author: Christian Persch <chpe gnome org>
Date: Wed Sep 7 19:50:53 2011 +0200
Simplify configure check for gtk 2 + 3
Makefile.am | 4 +---
configure.in | 53 ++++++++++++++++++++++++++++++-----------------------
2 files changed, 31 insertions(+), 26 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 5e3916d..72e1294 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,11 +2,9 @@ SUBDIRS = . gdk-pixbuf-loader data tests tools doc
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
-if ENABLE_GTK_ENGINE
-if HAVE_GTK_2
+if ENABLE_GTK2_ENGINE
SUBDIRS += gtk-engine
endif
-endif
lib_LTLIBRARIES = librsvg- RSVG_API_MAJOR_VERSION@.la
diff --git a/configure.in b/configure.in
index a883923..93ea0fe 100644
--- a/configure.in
+++ b/configure.in
@@ -34,7 +34,7 @@ CAIRO_REQUIRED=1.2.0
PANGOCAIRO_REQUIRED=1.10.0
GDK_PIXBUF_REQUIRED=1.3.7
GTK2_REQUIRED=2.16.0
-GTK3_REQUIRED=2.90.0
+GTK3_REQUIRED=3.0.0
# ===========================================================================
@@ -220,40 +220,45 @@ else
AC_MSG_RESULT(no)
fi
-dnl ===========================================================================
-dnl GTK theme engine
-dnl ===========================================================================
+# ===========================================================================
+# GTK
+# ===========================================================================
-AC_MSG_CHECKING([whether to build the GTK+ theme engine])
-AC_ARG_ENABLE([gtk-theme],
- [AS_HELP_STRING([--disable-gtk-theme],[Disable a RSVG based GTK+ theme engine (default=yes)])],
- [],[enable_gtk_theme=yes])
-AC_MSG_RESULT([$enable_gtk_theme])
+PKG_CHECK_MODULES([GTK2],[gtk+-2.0 >= $GTK2_REQUIRED],[have_gtk_2=yes],[have_gtk_2=no])
+PKG_CHECK_MODULES([GTK3],[gtk+-3.0 >= $GTK3_REQUIRED],[have_gtk_3=yes],[have_gtk_3=no])
-have_gtk_2=no
-have_gtk_3=no
GTK2_BINARY_VERSION=
GTK3_BINARY_VERSION=
-if test "x$enable_gtk_theme" = "xyes" -o "x$enable_pixbuf_loader" = "xyes"; then
- PKG_CHECK_MODULES([GTK2],[gtk+-2.0 >= $GTK2_REQUIRED],[have_gtk_2=yes],[have_gtk_2=no])
- PKG_CHECK_MODULES([GTK3],[gtk+-3.0 >= $GTK3_REQUIRED],[have_gtk_3=yes],[have_gtk_3=no])
-
- if test "$have_gtk_2" = "yes"; then
- GTK2_BINARY_VERSION="`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`"
- fi
- if test "$have_gtk_3" = "yes"; then
- GTK3_BINARY_VERSION="`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`"
- fi
+if test "$have_gtk_2" = "yes"; then
+ GTK2_BINARY_VERSION="`$PKG_CONFIG --variable=gtk_binary_version gtk+-2.0`"
+fi
+if test "$have_gtk_3" = "yes"; then
+ GTK3_BINARY_VERSION="`$PKG_CONFIG --variable=gtk_binary_version gtk+-3.0`"
fi
AC_SUBST([GTK2_BINARY_VERSION])
AC_SUBST([GTK3_BINARY_VERSION])
-AM_CONDITIONAL([ENABLE_GTK_ENGINE],[test "$enable_gtk_theme" = "yes"])
AM_CONDITIONAL([HAVE_GTK_2],[test "$have_gtk_2" = "yes"])
AM_CONDITIONAL([HAVE_GTK_3],[test "$have_gtk_3" = "yes"])
+# ===========================================================================
+# GTK theme engine
+# ===========================================================================
+
+if test "$have_gtk_2"; then
+ AC_MSG_CHECKING([whether to build the GTK+ theme engine])
+ AC_ARG_ENABLE([gtk-theme],
+ [AS_HELP_STRING([--disable-gtk-theme],[Disable a RSVG based GTK+ theme engine (default=yes)])],
+ [],[enable_gtk_theme=yes])
+ AC_MSG_RESULT([$enable_gtk_theme])
+else
+ enable_gtk_theme=no
+fi
+
+AM_CONDITIONAL([ENABLE_GTK2_ENGINE],[test "$enable_gtk_theme" = "yes"])
+
dnl ===========================================================================
dnl GDK-Pixbuf SVG loader
dnl ===========================================================================
@@ -378,7 +383,9 @@ librsvg-$VERSION
compiler: ${CC}
Build GdkPixbuf loader: ${enable_pixbuf_loader}
- Build theme engine: ${enable_gtk_theme}
+ GTK 2.0: ${have_gtk_2}
+ GTK 3.0: ${have_gtk_3}
+ Build GTK 2.0 theme engine: ${enable_gtk_theme}
Build miscellaenous tools: ${build_misc_tools}
Handle svgz files: ${test_svgz}
Use libcroco for css parsing: ${test_croco}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]