Commit bf1b147b authored by Glenn Morris's avatar Glenn Morris

* configure.ac, src/image.c: Tweak previous ImageMagick change.

parent 57294869
......@@ -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
......
......@@ -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.
......
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