gnome-games r8513 - in trunk: . libgames-support



Author: chpe
Date: Tue Jan  6 18:21:00 2009
New Revision: 8513
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8513&view=rev

Log:
Use the new rsvg feature test macro to check for svgz support instead of
the configure check.

Modified:
   trunk/configure.in
   trunk/libgames-support/games-card-theme-preimage.c

Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in	(original)
+++ trunk/configure.in	Tue Jan  6 18:21:00 2009
@@ -516,17 +516,6 @@
 
     need_gthread=yes
   fi
-
-  # These exist only since rsvg 2.22.something, so we check for != false below
-  rsvg_svgz="$($PKG_CONFIG --variable svgz_supported librsvg-2.0)"
-  rsvg_css="$($PKG_CONFIG --variable css_supported librsvg-2.0)"
-
-  if test "$rsvg_svgz" != "false"; then
-    AC_DEFINE([HAVE_RSVG_SVGZ],[1],[Define if rsvg supports gzipped SVG files])
-  fi
-  if test "$rsvg_css" != "false"; then
-    AC_DEFINE([HAVE_RSVG_CSS],[1],[Define if rsvg supports CSS])
-  fi
 fi
 
 AM_CONDITIONAL([HAVE_RSVG],[test "$have_rsvg" = "yes"])

Modified: trunk/libgames-support/games-card-theme-preimage.c
==============================================================================
--- trunk/libgames-support/games-card-theme-preimage.c	(original)
+++ trunk/libgames-support/games-card-theme-preimage.c	Tue Jan  6 18:21:00 2009
@@ -25,6 +25,15 @@
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <gtk/gtk.h>
 
+#ifdef HAVE_RSVG
+#include <librsvg/librsvg-features.h>
+#ifdef LIBRSVG_CHECK_FEATURE
+#if LIBRSVG_CHECK_FEATURE(SVGZ)
+#define HAVE_RSVG_SVGZ
+#endif
+#endif
+#endif
+
 #include "games-preimage.h"
 #include "games-runtime.h"
 
@@ -220,6 +229,7 @@
                                                 const char *path,
                                                 const char *filename)
 {
+#ifdef HAVE_RSVG
   GamesCardThemeInfo *info;
   char *display_name;
 
@@ -239,6 +249,9 @@
                                      NULL, NULL);
 
   return info;
+#else
+  return NULL;
+#endif
 }
 
 static void



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