[libgdata] build: Depend on gdk-pixbuf instead of gdk



commit 1ca1fe27891bf133ba61f33196c89d59c8ccb725
Author: Philip Withnall <philip tecnocode co uk>
Date:   Sat Sep 4 15:33:42 2010 +0100

    build: Depend on gdk-pixbuf instead of gdk
    
    Since we only use GdkPixbuf, and gdk-pixbuf was split out from GDK a while
    ago.

 configure.ac            |   10 +++++-----
 gdata/tests/Makefile.am |    4 ++--
 gdata/tests/picasaweb.c |   10 +++++-----
 3 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 69b5d00..8597f60 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,13 +60,13 @@ AC_SUBST(GDATA_CFLAGS)
 AC_SUBST(GDATA_LIBS)
 
 # Optional dependencies
-PKG_CHECK_MODULES(GDK, gdk-2.0, have_gdk=yes, have_gdk=no)
-if test "x$have_gdk" = "xyes"; then
-	AC_DEFINE(HAVE_GDK, 1, [Defined if GDK+ is installed])
+PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0, have_gdk_pixbuf=yes, have_gdk_pixbuf=no)
+if test "x$have_gdk_pixbuf" = "xyes"; then
+	AC_DEFINE(HAVE_GDK_PIXBUF, 1, [Defined if gdk-pixbuf is installed])
 fi
 
-AC_SUBST(GDK_CFLAGS)
-AC_SUBST(GDK_LIBS)
+AC_SUBST(GDK_PIXBUF_CFLAGS)
+AC_SUBST(GDK_PIXBUF_LIBS)
 
 # GNOME support, which pulls in libsoup-gnome-2.4 to provide transparent proxy support
 AC_MSG_CHECKING(whether to build with GNOME support)
diff --git a/gdata/tests/Makefile.am b/gdata/tests/Makefile.am
index 27ae57a..207cfa6 100644
--- a/gdata/tests/Makefile.am
+++ b/gdata/tests/Makefile.am
@@ -3,7 +3,7 @@ include $(top_srcdir)/gtester.mk
 INCLUDES = \
 	-I$(top_srcdir)/				\
 	-I$(top_srcdir)/gdata				\
-	$(GDK_CFLAGS)					\
+	$(GDK_PIXBUF_CFLAGS)				\
 	-DTEST_FILE_DIR="\"$(top_srcdir)/gdata/tests/\""\
 	-DG_LOG_DOMAIN=\"libgdata\"			\
 	$(DISABLE_DEPRECATED)				\
@@ -12,7 +12,7 @@ INCLUDES = \
 
 LIBS = \
 	$(top_builddir)/gdata/libgdata.la	\
-	$(GDK_LIBS)				\
+	$(GDK_PIXBUF_LIBS)			\
 	$(GDATA_LIBS)
 
 noinst_PROGRAMS = $(TEST_PROGS)
diff --git a/gdata/tests/picasaweb.c b/gdata/tests/picasaweb.c
index 1249e0d..608090f 100644
--- a/gdata/tests/picasaweb.c
+++ b/gdata/tests/picasaweb.c
@@ -24,7 +24,7 @@
 #include <config.h>
 
 /* For the thumbnail size tests in test_download_thumbnails() */
-#ifdef HAVE_GDK
+#ifdef HAVE_GDK_PIXBUF
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #endif
 
@@ -360,16 +360,16 @@ test_download_thumbnails (gconstpointer _service)
 
 	/* test getting all thumbnails and that they're all the correct size */
 	for (node = thumbnails; node != NULL; node = node->next) {
-#ifdef HAVE_GDK
+#ifdef HAVE_GDK_PIXBUF
 		GdkPixbuf *pixbuf;
-#endif /* HAVE_GDK */
+#endif /* HAVE_GDK_PIXBUF */
 
 		thumbnail = GDATA_MEDIA_THUMBNAIL (node->data);
 		actual_file = gdata_media_thumbnail_download (thumbnail, service, "thumbnail.jpg", dest_file, FALSE, NULL, &error);
 		g_assert_no_error (error);
 		g_assert (g_file_query_exists (actual_file, NULL));
 
-#ifdef HAVE_GDK
+#ifdef HAVE_GDK_PIXBUF
 		file_path = g_file_get_path (actual_file);
 		pixbuf = gdk_pixbuf_new_from_file (file_path, &error);
 		g_assert_no_error (error);
@@ -379,7 +379,7 @@ test_download_thumbnails (gconstpointer _service)
 		g_assert_cmpint (abs (gdk_pixbuf_get_width (pixbuf) - (gint)gdata_media_thumbnail_get_width (thumbnail)) , <=, 1);
 		g_assert_cmpint (abs (gdk_pixbuf_get_height (pixbuf) - (gint)gdata_media_thumbnail_get_height (thumbnail)) , <=, 1);
 		g_object_unref (pixbuf);
-#endif /* HAVE_GDK */
+#endif /* HAVE_GDK_PIXBUF */
 
 		g_file_delete (actual_file, NULL, &error);
 		g_assert (g_file_query_exists (actual_file, NULL) == FALSE);



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