From 8e0ec489a80e341319e4dfc78874ec1f3deba40e Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Thu, 8 May 2014 20:16:02 +0200 Subject: [PATCH] wrlib: changed the function used to detecting MagickWand It looks like that the function 'MagickGetImagePixels' is part of the "deprecate.h" header, at least in ImageMagick 6.8.8. As it is not used in WRaster's code, it is safer to actually check for 'NewMagickWand' that is being used and which is not yet deprecated. Signed-off-by: Christophe CURIS --- m4/wm_imgfmt_check.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/m4/wm_imgfmt_check.m4 b/m4/wm_imgfmt_check.m4 index 8e003bfb..7411b953 100644 --- a/m4/wm_imgfmt_check.m4 +++ b/m4/wm_imgfmt_check.m4 @@ -275,7 +275,7 @@ AS_IF([test "x$enable_magick" = "xno"], wm_save_LIBS="$LIBS" dnl dnl We check that the library is available - AS_IF([wm_fn_lib_try_link "MagickGetImagePixels" "$wm_cv_libchk_magick_libs"], + AS_IF([wm_fn_lib_try_link "NewMagickWand" "$wm_cv_libchk_magick_libs"], [wm_cv_libchk_magick=maybe]) LIBS="$wm_save_LIBS" AS_IF([test "x$enable_magick$wm_cv_libchk_magick" = "xyesno"], @@ -284,7 +284,7 @@ AS_IF([test "x$enable_magick" = "xno"], dnl The library was found, check if header is available and compiles AS_IF([test "x$wm_cv_libchk_magick" != "xno"], [wm_save_CFLAGS="$CFLAGS" - AS_IF([wm_fn_lib_try_compile "wand/magick_wand.h" "" "return 0" "$wm_cv_libchk_magick_cflags"], + AS_IF([wm_fn_lib_try_compile "wand/magick_wand.h" "MagickWand *wand;" "wand = NewMagickWand()" "$wm_cv_libchk_magick_cflags"], [wm_cv_libchk_magick="$wm_cv_libchk_magick_cflags % $wm_cv_libchk_magick_libs"], [AC_MSG_ERROR([found Magick library but could not compile appropriate header - are you missing libmagickwand-dev package?])]) CFLAGS="$wm_save_CFLAGS"])