diff options
author | Sebastian Dransfeld <sd@tango.flipp.net> | 2012-10-09 08:06:31 +0000 |
---|---|---|
committer | Sebastian Dransfeld <sd@tango.flipp.net> | 2012-10-09 08:06:31 +0000 |
commit | eb610b5493f1f0a4682c3b827294cc87715c6d48 (patch) | |
tree | 0e2b970e27683bfd59f69428d9d9054ea266b4c6 | |
parent | 7adfac783fdca867758acbd8fe12b0aaa73b941a (diff) | |
download | evas_generic_loaders-eb610b5493f1f0a4682c3b827294cc87715c6d48.tar.gz |
evas_generic_loaders: Don't use deprecated code
SVN revision: 77619
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | src/bin/svg/main.c | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index c9fdcde..86fbd06 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/bin/svg/main.c b/src/bin/svg/main.c index 9a35153..366fe60 100644 --- a/src/bin/svg/main.c +++ b/src/bin/svg/main.c @@ -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 |