Skip to content

Commit

Permalink
add version test for MagickCore and conditionally include the path to…
Browse files Browse the repository at this point in the history
… MagickCore.h
  • Loading branch information
rmottola committed Dec 12, 2023
1 parent 5b50975 commit c4c6336
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/GSImageMagickImageRep.m
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@

#if HAVE_IMAGEMAGICK

#if MAGICKCORE_7_OR_NEWER
#include <MagickCore/MagickCore.h>
#else
#include <magick/MagickCore.h>
#endif

@implementation GSImageMagickImageRep

Expand Down
5 changes: 5 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,11 @@ AS_IF([test "x$enable_imagemagick" = "xyes"], [
],
[AC_DEFINE([HAVE_IMAGEMAGICK], [0], [Don't have ImageMagick])])
])
AS_IF([test "x$enable_imagemagick" = "xyes"], [
PKG_CHECK_MODULES([MAGICKCORE], [MagickCore >= 7],
[AC_DEFINE([MAGICKCORE_7_OR_NEWER], [1], [MagickCore >= 7])],
[AC_DEFINE([MAGICKCORE_7_OR_NEWER], [0], [MagickCore < 7])])
])

#--------------------------------------------------------------------
# Check for International Components for Unicode
Expand Down

0 comments on commit c4c6336

Please sign in to comment.