evas_generic_loaders: Don't use deprecated code

SVN revision: 77619
This commit is contained in:
Sebastian Dransfeld 2012-10-09 08:06:31 +00:00
parent f1a88e0726
commit 306d657e9a
2 changed files with 14 additions and 0 deletions

View File

@ -121,8 +121,16 @@ AC_ARG_ENABLE([svg],
[want_svg="yes"]
)
have_svg_2_36="no"
if test "x$want_svg" = "xyes" ; then
PKG_CHECK_MODULES([SVG], [librsvg-2.0 >= 2.14.0 cairo >= 1.0.0], [have_svg="yes"], [have_svg="no"])
PKG_CHECK_MODULES(
[SVG_2_36], [librsvg-2.0 >= 2.36.0 cairo >= 1.0.0],
[
have_svg_2_36="yes"
AC_DEFINE(HAVE_SVG_2_36, 1, [Have librsvg >= 2.36])
],
[have_svg_2_36="no"])
else
have_svg=no
fi

View File

@ -56,7 +56,11 @@ static inline Eina_Bool evas_image_load_file_is_svg(const char *file)
static int
_svg_init(const char *file)
{
#ifdef HAVE_SVG_2_36
g_type_init();
#else
rsvg_init();
#endif
if (!evas_image_load_file_is_svg(file)) return 0;
@ -74,7 +78,9 @@ _svg_shutdown(void)
g_object_unref(rsvg);
}
// Maybe it's not crashing anymore, let's try it.
#ifndef HAVE_SVG_2_36
rsvg_term();
#endif
}
static int