From 2222c7c3356baa81cd404e62340e694a8ef388f5 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 22 Feb 2023 21:20:52 +0800 Subject: [PATCH] * src/image.c (imagemagick_load_image): Check HAVE_DECL_xxx. --- src/image.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/image.c b/src/image.c index 7d36f8c862f..2e6aa0ce0e3 100644 --- a/src/image.c +++ b/src/image.c @@ -10835,7 +10835,8 @@ imagemagick_load_image (struct frame *f, struct image *img, return 0; } -#ifdef HAVE_MAGICKAUTOORIENTIMAGE +#if defined HAVE_MAGICKAUTOORIENTIMAGE \ + || HAVE_DECL_MAGICKAUTOORIENTIMAGE /* If no :rotation is explicitly specified, apply the automatic rotation from EXIF. */ if (NILP (image_spec_value (img->spec, QCrotation, NULL))) @@ -10992,7 +10993,8 @@ imagemagick_load_image (struct frame *f, struct image *img, { MagickWand *new_wand; MagickSetImageBackgroundColor (image_wand, bg_wand); -#ifdef HAVE_MAGICKMERGEIMAGELAYERS +#if defined HAVE_MAGICKMERGEIMAGELAYERS \ + || HAVE_DECL_MAGICKMERGEIMAGELAYERS new_wand = MagickMergeImageLayers (image_wand, MergeLayer); #else new_wand = MagickFlattenImages (image_wand); @@ -11021,8 +11023,9 @@ imagemagick_load_image (struct frame *f, struct image *img, init_color_table (); -#if defined (HAVE_MAGICKEXPORTIMAGEPIXELS) && \ - ! defined (HAVE_NS) && ! defined (HAVE_HAIKU) +#if (defined (HAVE_MAGICKEXPORTIMAGEPIXELS) \ + || HAVE_DECL_MAGICKEXPORTIMAGEPIXELS) \ + && ! defined (HAVE_NS) && ! defined (HAVE_HAIKU) if (imagemagick_render_type != 0) { /* Magicexportimage is normally faster than pixelpushing. This -- 2.39.5