mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-05 21:34:17 +01:00
wrlib: Compile with either ImageMagick 6 and 7
We dropped ImageMagick 6 support in 0.95.9. However, ImageMagick 6 is still widespread (e.g., ImageMagick 7 has not been packaged in Debian yet), and upstream plans on maintaining it until at least 2028 [1]. In this patch, we detect the version of the MagickWand library installed on the user's system and include the appropriate header file when building wrlib. Note: I've only tested this with ImageMagick 6, so I'd appreciate confirmation that it works with ImageMagick 7. [1] https://github.com/ImageMagick/ImageMagick6/blob/master/NEWS.txt
This commit is contained in:
committed by
Carlos R. Mafra
parent
27dc5efd2e
commit
dfa92906c0
@@ -313,8 +313,12 @@ AS_IF([test "x$enable_magick" = "xno"],
|
||||
dnl The library was found, check if header is available and compiles
|
||||
wm_save_CFLAGS="$CFLAGS"
|
||||
AS_IF([wm_fn_lib_try_compile "MagickWand/MagickWand.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 MagickWand library but could not compile its header])])
|
||||
[wm_cv_libchk_magick="$wm_cv_libchk_magick_cflags % $wm_cv_libchk_magick_libs"
|
||||
wm_cv_libchk_mgick_version=7],
|
||||
[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"
|
||||
wm_cv_libchk_magick_version=6],
|
||||
[AC_MSG_ERROR([found MagickWand library but could not compile its header])])
|
||||
CFLAGS="$wm_save_CFLAGS"])dnl
|
||||
])
|
||||
AS_IF([test "x$wm_cv_libchk_magick" = "xno"],
|
||||
@@ -323,7 +327,7 @@ AS_IF([test "x$enable_magick" = "xno"],
|
||||
[supported_gfx="$supported_gfx Magick"
|
||||
MAGICKFLAGS=`echo "$wm_cv_libchk_magick" | sed -e 's, *%.*$,,' `
|
||||
MAGICKLIBS=`echo "$wm_cv_libchk_magick" | sed -e 's,^.*% *,,' `
|
||||
AC_DEFINE([USE_MAGICK], [1],
|
||||
AC_DEFINE_UNQUOTED([USE_MAGICK], [$wm_cv_libchk_magick_version],
|
||||
[defined when MagickWand library with header was found])])
|
||||
])
|
||||
AM_CONDITIONAL([USE_MAGICK], [test "x$enable_magick" != "xno"])dnl
|
||||
|
||||
Reference in New Issue
Block a user