From fdc2bef8029fb6b1c7a34ff07e73d67145df9f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Thu, 14 Sep 2006 13:33:37 +0000 Subject: Even imagemagick can be moved to pkg-config, and this also unbreaks the build. Wand-config reports the cflags and ldflags used to build ImageMagick, that might not be correct for xine. CVS patchset: 8255 CVS date: 2006/09/14 13:33:37 --- configure.ac | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) diff --git a/configure.ac b/configure.ac index 59b1e8a76..b26da319b 100644 --- a/configure.ac +++ b/configure.ac @@ -1259,31 +1259,20 @@ dnl --------------------------------------------- dnl MagickWand API of Imagemagick. dnl --------------------------------------------- -AC_ARG_ENABLE([imagemagick], - AC_HELP_STRING([--disable-imagemagick], [do not build ImageMagick support]), - [with_imagemagick=$enableval], [with_imagemagick=yes]) - -if test "x$with_imagemagick" = "xyes"; then - AC_PATH_TOOL(WAND_CONFIG, Wand-config, no) - if test "$WAND_CONFIG" = "no" ; then - AC_MSG_RESULT([*** All Imagemagick dependent parts will be disabled, Wand-config not found. ***]) - have_imagemagick="no" - else - WAND_CFLAGS=`$WAND_CONFIG --cflags` - WAND_CPPFLAGS=`$WAND_CONFIG --cppflags` - WAND_LDFLAGS=`$WAND_CONFIG --ldflags` - WAND_LIBS=`$WAND_CONFIG --libs` - have_imagemagick="yes" - AC_DEFINE(HAVE_WAND,1,[Define this if you have Imagemagick]) - fi -else - have_imagemagick="no" +AC_ARG_WITH([imagemagick], + AS_HELP_STRING([--without-imagemagick], [Build without ImageMagick image decoder])) + +if test "x$with_imagemagick" != "xno"; then + PKG_CHECK_MODULES([WAND], [Wand], [have_imagemagick=yes], [have_imagemagick=no]) + if test "x$with_imagemagick" = "xyes" && test "x$have_imagemagick" = "xno"; then + AC_MSG_ERROR([ImageMagick support requested, but Wand not found]) + elif test "x$have_imagemagick" = "xyes"; then + AC_DEFINE([HAVE_WAND], [1], [Define this if you have ImageMagick installed]) + fi fi -AM_CONDITIONAL(HAVE_WAND, test x"$have_imagemagick" = "xyes" ) +AM_CONDITIONAL([HAVE_WAND], [test x"$have_imagemagick" = "xyes"]) AC_SUBST(WAND_CFLAGS) -AC_SUBST(WAND_CPPFLAGS) -AC_SUBST(WAND_LDFLAGS) AC_SUBST(WAND_LIBS) dnl --------------------------------------------- -- cgit v1.2.3