Commit 38a869c0 authored by Dom Lachowicz's avatar Dom Lachowicz

--with-svgz now, HAVE_SVGZ, propegate CFLAGS

parent 9cc55f3a
Version 2.2.2
- Handle SVGZ files (Gzipped SVG)
- Handle objectBoundingBox coordinates on gradients
- API extensions
Version 2.2.1
- Better CSS style handling
......
......@@ -84,19 +84,18 @@ AC_SUBST(POPT_LIBS)
dnl ===========================================================================
LIBGSFPKG=""
LIBGSF_CFLAGS=""
LIBGSF_LIBS=""
AC_ARG_WITH(libgsf,[ --with-libgsf Use libgsf for run-time decompression],[
if test "x$withval" != "xno"; then
LIBGSFPKG="libgsf-1"
test_gsf=true
AC_ARG_WITH(svgz,[ --with-svgz Use libgsf for run-time decompression],[
if test "x$withval" = "xno"; then
test_gsf=false
fi
])
if test "$LIBGSFPKG" != ""; then
if test "x$test_gsf" = "xtrue"; then
PKG_CHECK_MODULES(LIBGSF,[libgsf-1 >= 0.5])
LIBGSF_CFLAGS="$LIBGSF_CFLAGS -DHAVE_LIBGSF=1"
LIBGSF_CFLAGS="$LIBGSF_CFLAGS -DHAVE_SVGZ=1"
fi
AM_CONDITIONAL(WITH_LIBGSF,[test "$LIBGSFPKG" != ""])
......
loaderdir = $(libdir)/gtk-2.0/$(GTK_VERSION)/loaders
INCLUDES = @LIBRSVG_CFLAGS@ @GDK_PIXBUF_CFLAGS@ -DGDK_PIXBUF_ENABLE_BACKEND -I$(top_srcdir)
INCLUDES = @LIBRSVG_CFLAGS@ @GDK_PIXBUF_CFLAGS@ $(LIBGSF_CFLAGS) -DGDK_PIXBUF_ENABLE_BACKEND -I$(top_srcdir)
if ENABLE_PIXBUF_LOADER
target_pixbuf_loader = svg_loader.la
......@@ -11,7 +11,7 @@ endif
svg_loader_la_SOURCES = io-svg.c
svg_loader_la_LDFLAGS = -avoid-version -module
svg_loader_la_LIBADD = $(GDK_PIXBUF_LIBS) $(LIBRSVG_LIBS) $(top_builddir)/librsvg-2.la
svg_loader_la_LIBADD = $(GDK_PIXBUF_LIBS) $(LIBRSVG_LIBS) $(LIBGSF_LIBS) $(top_builddir)/librsvg-2.la
loader_LTLIBRARIES = $(target_pixbuf_loader)
......
......@@ -26,14 +26,14 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <gdk-pixbuf/gdk-pixbuf-io.h>
#if HAVE_LIBGSF
#if HAVE_SVGZ
#include <rsvg-gz.h>
#endif
typedef struct {
RsvgHandle *handle;
#if HAVE_LIBGSF
#if HAVE_SVGZ
gboolean first_write;
#endif
......@@ -55,7 +55,7 @@ gdk_pixbuf__svg_image_begin_load (GdkPixbufModuleSizeFunc size_func,
{
SvgContext *context = g_new0 (SvgContext, 1);
#if HAVE_LIBGSF
#if HAVE_SVGZ
/* lazy create the handle on the first write */
context->handle = NULL;
context->first_write = TRUE;
......@@ -80,7 +80,7 @@ gdk_pixbuf__svg_image_load_increment (gpointer data,
SvgContext *context = (SvgContext *)data;
gboolean result;
#if HAVE_LIBGSF
#if HAVE_SVGZ
if (context->first_write == TRUE) {
context->first_write = FALSE;
......@@ -145,7 +145,7 @@ fill_info (GdkPixbufFormat *info)
{ "<?xml", NULL, 50 },
{ "<svg", NULL, 100 },
{ "<!DOCTYPE svg", NULL, 100 },
#if HAVE_LIBGSF
#if HAVE_SVGZ
{ "\x1f\x8b", NULL, 50 }, /* todo: recognizes any gzipped file, not much we can do */
#endif
{ NULL, NULL, 0 }
......@@ -157,7 +157,7 @@ fill_info (GdkPixbufFormat *info)
};
static gchar *extensions[] = {
"svg",
#if HAVE_LIBGSF
#if HAVE_SVGZ
"svgz",
#endif
NULL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment