add an error message for --with-magickpackage

it was causing some cufusion, see eg. https://github.com/libvips/libvips/discussions/2449
This commit is contained in:
John Cupitt 2021-09-29 18:17:48 +01:00
parent 5397fe5a4f
commit 6e9a23524f

View File

@ -549,25 +549,31 @@ AS_IF([test x"$with_magick" = x"module"],
[with_magick_module=no]) [with_magick_module=no])
AC_ARG_WITH([magickpackage], AC_ARG_WITH([magickpackage],
AS_HELP_STRING([--with-magickpackage], AS_HELP_STRING([--with-magickpackage=PACKAGE],
[magickpackage to use (default: MagickCore; try GraphicsMagick to build against gm instead)])) [use magick PACKAGE (default: MagickCore; try GraphicsMagick to build against gm instead)]))
# set the default magick package ... very old imagemagicks called it if test x"$with_magickpackage" = x"yes"; then
# ImageMagick AC_MSG_WARN([--with-magickpackage needs an argument, ignoring])
if test x"$with_magickpackage" = x""; then with_magick=no
PKG_CHECK_MODULES(MAGICK_WAND, MagickCore, with_magick_module=no
[with_magickpackage=MagickCore else
], if test x"$with_magickpackage" = x""; then
[PKG_CHECK_MODULES(IMAGE_MAGICK, ImageMagick, # set the default magick package ... very old imagemagicks called it
[with_magickpackage=ImageMagick # ImageMagick
], PKG_CHECK_MODULES(MAGICK_WAND, MagickCore,
[AC_MSG_WARN([neither MagickCore nor ImageMagick found; disabling Magick support]) [with_magickpackage=MagickCore
with_magick=no ],
with_magick_module=no [PKG_CHECK_MODULES(IMAGE_MAGICK, ImageMagick,
] [with_magickpackage=ImageMagick
) ],
] [AC_MSG_WARN([neither MagickCore nor ImageMagick found; disabling Magick support])
with_magick=no
with_magick_module=no
]
)
]
) )
fi
fi fi
# we have a separate loader for magick7 with fewer ifdef # we have a separate loader for magick7 with fewer ifdef