diff options
author | Jan D <jan.h.d@swipnet.se> | 2015-04-05 18:34:07 +0200 |
---|---|---|
committer | Jan D <jan.h.d@swipnet.se> | 2015-04-05 18:34:07 +0200 |
commit | 69a8655d7190b1dc28de9cbc786a86e8966a45a4 (patch) | |
tree | 4ece133f665d2402720cf11bdb198cc3baa34dc0 /configure.ac | |
parent | 74c4ce27b510b90c29d25c462d9b84b203d00252 (diff) | |
download | emacs-69a8655d7190b1dc28de9cbc786a86e8966a45a4.tar.gz |
Support RSVG and cairo.
* configure.ac: Allow rsvg with cairo. Move back HAVE_RSVG.
* src/dispextern.h (struct image): add cr_data2 if cairo.
* src/image.c: #undef COLOR_TABLE_SUPPORT when USE_CAIRO.
(x_clear_image): Free cr_data and cr_data2 if set.
(xpm_load): Assign data to cr_data2.
(svg_load_image): Convert from GdkPixbuf to CAIRO_FORMAT_ARGB32.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/configure.ac b/configure.ac index 9d4e3758fda..79619c74117 100644 --- a/configure.ac +++ b/configure.ac @@ -2361,6 +2361,28 @@ fail; fi +### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. +HAVE_RSVG=no +if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" = "mingw32"; then + if test "${with_rsvg}" != "no"; then + RSVG_REQUIRED=2.11.0 + RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" + + EMACS_CHECK_MODULES([RSVG], [$RSVG_MODULE]) + AC_SUBST(RSVG_CFLAGS) + AC_SUBST(RSVG_LIBS) + + if test $HAVE_RSVG = yes; then + AC_DEFINE(HAVE_RSVG, 1, [Define to 1 if using librsvg.]) + CFLAGS="$CFLAGS $RSVG_CFLAGS" + # Windows loads librsvg dynamically + if test "${opsys}" = "mingw32"; then + RSVG_LIBS= + fi + fi + fi +fi + HAVE_IMAGEMAGICK=no if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}" = "yes"; then if test "${with_imagemagick}" != "no"; then @@ -3092,7 +3114,6 @@ if test "${HAVE_X11}" = "yes"; then with_jpeg=no with_gif=no with_tiff=no - with_rsvg=no CFLAGS="$CFLAGS $CAIRO_CFLAGS" LIBS="$LIBS $CAIRO_LIBS" @@ -3101,29 +3122,6 @@ if test "${HAVE_X11}" = "yes"; then fi fi -### Use -lrsvg-2 if available, unless `--with-rsvg=no' is specified. -HAVE_RSVG=no -if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${opsys}" = "mingw32"; then - if test "${with_rsvg}" != "no"; then - RSVG_REQUIRED=2.11.0 - RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED" - - EMACS_CHECK_MODULES([RSVG], [$RSVG_MODULE]) - AC_SUBST(RSVG_CFLAGS) - AC_SUBST(RSVG_LIBS) - - if test $HAVE_RSVG = yes; then - AC_DEFINE(HAVE_RSVG, 1, [Define to 1 if using librsvg.]) - CFLAGS="$CFLAGS $RSVG_CFLAGS" - # Windows loads librsvg dynamically - if test "${opsys}" = "mingw32"; then - RSVG_LIBS= - fi - fi - fi -fi - - ### Use -lXpm if available, unless `--with-xpm=no'. ### mingw32 doesn't use -lXpm, since it loads the library dynamically. ### In the Cygwin-w32 build, we need to use /usr/include/noX/X11/xpm.h |