From 980836d80e2447d8922f0f6cf287a12a6c914e8b Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Thu, 11 Feb 2016 14:21:38 +1100 Subject: [PATCH] Check for MagickAutoOrientImage * configure.ac: Check for MagickAutoOrientImage. * src/image.c (imagemagick_load_image): Don't use MagickAutoOrientImage unless it's available. --- configure.ac | 2 +- src/image.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c3e25544fee..683447368fb 100644 --- a/configure.ac +++ b/configure.ac @@ -2414,7 +2414,7 @@ if test "${HAVE_X11}" = "yes" || test "${HAVE_NS}" = "yes" || test "${HAVE_W32}" OLD_LIBS=$LIBS CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS" LIBS="$IMAGEMAGICK_LIBS $LIBS" - AC_CHECK_FUNCS(MagickExportImagePixels MagickMergeImageLayers) + AC_CHECK_FUNCS(MagickExportImagePixels MagickMergeImageLayers MagickAutoOrientImage) CFLAGS=$OLD_CFLAGS LIBS=$OLD_LIBS fi diff --git a/src/image.c b/src/image.c index e1b167de3d2..f22394fb7cb 100644 --- a/src/image.c +++ b/src/image.c @@ -8560,6 +8560,7 @@ imagemagick_load_image (struct frame *f, struct image *img, return 0; } +#ifdef HAVE_MAGICKAUTOORIENTIMAGE /* If no :rotation is explicitly specified, apply the automatic rotation from EXIF. */ if (NILP (image_spec_value (img->spec, QCrotation, NULL))) @@ -8569,6 +8570,7 @@ imagemagick_load_image (struct frame *f, struct image *img, DestroyMagickWand (image_wand); return 0; } +#endif if (ino < 0 || ino >= MagickGetNumberImages (image_wand)) { -- 2.39.2