From: Lars Ingebrigtsen Date: Thu, 11 Feb 2016 03:21:38 +0000 (+1100) Subject: Check for MagickAutoOrientImage X-Git-Tag: emacs-26.0.90~2649 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=980836d80e2447d8922f0f6cf287a12a6c914e8b;p=emacs.git Check for MagickAutoOrientImage * configure.ac: Check for MagickAutoOrientImage. * src/image.c (imagemagick_load_image): Don't use MagickAutoOrientImage unless it's available. --- 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)) {