Subject: bug#7955: patch for imagemagick header rename

From: [email-masked]
Date: Sat, 12 Feb 2011 00:38:30 +0100

I have a patch attempt now. I was going to test it and push it to the
imagemagick branch but experienced some infuriating setbacks.

If you could help me test and commit that would be spectacular.

=== modified file 'src/image.c'
--- src/image.c	2011-02-01 19:46:21 +0000
+++ src/image.c	2011-02-11 23:23:42 +0000
@@ -7452,7 +7452,12 @@
 /* The GIF library also defines DrawRectangle, but its never used in Emacs.
    Therefore rename the function so it doesnt collide with ImageMagick.  */
 #define DrawRectangle DrawRectangleGif
+#if defined (HAVE_WAND_MAGICKWAND_H)
 #include <wand/MagickWand.h>
+#else
+#include <wand/magick_wand.h>
+#endif /* HAVE_MAGICKWAND_H */
+
 
 /* imagemagick_load_image is a helper function for imagemagick_load,
    which does the actual loading given contents and size, apart from
=== modified file 'configure.in'
--- configure.in	2011-01-31 23:54:50 +0000
+++ configure.in	2011-02-11 23:20:24 +0000
@@ -1832,6 +1832,7 @@
       CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
       LIBS="$IMAGEMAGICK_LIBS $LIBS"
       AC_CHECK_FUNCS(MagickExportImagePixels)
+      AC_CHECK_HEADERS(wand/MagickWand.h)
     fi
   fi
 fi

-- 
Joakim Verona