* configure.ac, src/image.c: Tweak previous ImageMagick change.
This commit is contained in:
parent
5729486951
commit
bf1b147b55
2 changed files with 14 additions and 17 deletions
21
configure.ac
21
configure.ac
|
@ -2516,18 +2516,15 @@ if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}"
|
|||
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH$PATH_SEPARATOR`$BREW --prefix imagemagick@6 2>/dev/null`/lib/pkgconfig"
|
||||
fi
|
||||
|
||||
## 6.3.5 is the earliest version known to work; see Bug#17339.
|
||||
## 6.8.2 makes Emacs crash; see Bug#13867.
|
||||
IMAGEMAGICK7_MODULE="MagickWand >= 7"
|
||||
IMAGEMAGICK6_MODULE="Wand >= 6.3.5 Wand != 6.8.2"
|
||||
# As we check for ImageMagick 7 then 6 track which version we find
|
||||
EMACS_CHECK_MODULES([IMAGEMAGICK], [$IMAGEMAGICK7_MODULE])
|
||||
AS_IF([test $HAVE_IMAGEMAGICK = yes],
|
||||
[IMAGEMAGICK_MAJOR=7],
|
||||
[
|
||||
EMACS_CHECK_MODULES([IMAGEMAGICK], [$IMAGEMAGICK6_MODULE])
|
||||
AS_IF([test $HAVE_IMAGEMAGICK = yes], [IMAGEMAGICK_MAJOR=6])
|
||||
])
|
||||
EMACS_CHECK_MODULES([IMAGEMAGICK7], [MagickWand >= 7])
|
||||
if test $HAVE_IMAGEMAGICK7 = yes; then
|
||||
AC_DEFINE([HAVE_IMAGEMAGICK7], 1, [Define to 1 if using ImageMagick7.])
|
||||
HAVE_IMAGEMAGICK = yes
|
||||
else
|
||||
## 6.3.5 is the earliest version known to work; see Bug#17339.
|
||||
## 6.8.2 makes Emacs crash; see Bug#13867.
|
||||
EMACS_CHECK_MODULES([IMAGEMAGICK], [Wand >= 6.3.5 Wand != 6.8.2])
|
||||
fi
|
||||
|
||||
if test $HAVE_IMAGEMAGICK = yes; then
|
||||
OLD_CFLAGS=$CFLAGS
|
||||
|
|
10
src/image.c
10
src/image.c
|
@ -8274,15 +8274,15 @@ imagemagick_image_p (Lisp_Object object)
|
|||
Therefore rename the function so it doesn't collide with ImageMagick. */
|
||||
#define DrawRectangle DrawRectangleGif
|
||||
|
||||
#if IMAGEMAGICK_MAJOR == 6
|
||||
# include <wand/MagickWand.h>
|
||||
# include <magick/version.h>
|
||||
#else
|
||||
#ifdef HAVE_IMAGEMAGICK7
|
||||
# include <MagickWand/MagickWand.h>
|
||||
# include <MagickCore/version.h>
|
||||
/* ImageMagick 7 compatibility definitions */
|
||||
/* ImageMagick 7 compatibility definitions. */
|
||||
# define PixelSetMagickColor PixelSetPixelColor
|
||||
typedef PixelInfo MagickPixelPacket;
|
||||
#else
|
||||
# include <wand/MagickWand.h>
|
||||
# include <magick/version.h>
|
||||
#endif
|
||||
|
||||
/* ImageMagick 6.5.3 through 6.6.5 hid PixelGetMagickColor for some reason.
|
||||
|
|
Loading…
Add table
Reference in a new issue