Skip to content

Commit 6e9a235

Browse files
committed
add an error message for --with-magickpackage
it was causing some cufusion, see eg. libvips#2449
1 parent 5397fe5 commit 6e9a235

File tree

1 file changed

+24
-18
lines changed

1 file changed

+24
-18
lines changed

configure.ac

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -549,25 +549,31 @@ AS_IF([test x"$with_magick" = x"module"],
549549
[with_magick_module=no])
550550

551551
AC_ARG_WITH([magickpackage],
552-
AS_HELP_STRING([--with-magickpackage],
553-
[magickpackage to use (default: MagickCore; try GraphicsMagick to build against gm instead)]))
554-
555-
# set the default magick package ... very old imagemagicks called it
556-
# ImageMagick
557-
if test x"$with_magickpackage" = x""; then
558-
PKG_CHECK_MODULES(MAGICK_WAND, MagickCore,
559-
[with_magickpackage=MagickCore
560-
],
561-
[PKG_CHECK_MODULES(IMAGE_MAGICK, ImageMagick,
562-
[with_magickpackage=ImageMagick
563-
],
564-
[AC_MSG_WARN([neither MagickCore nor ImageMagick found; disabling Magick support])
565-
with_magick=no
566-
with_magick_module=no
567-
]
568-
)
569-
]
552+
AS_HELP_STRING([--with-magickpackage=PACKAGE],
553+
[use magick PACKAGE (default: MagickCore; try GraphicsMagick to build against gm instead)]))
554+
555+
if test x"$with_magickpackage" = x"yes"; then
556+
AC_MSG_WARN([--with-magickpackage needs an argument, ignoring])
557+
with_magick=no
558+
with_magick_module=no
559+
else
560+
if test x"$with_magickpackage" = x""; then
561+
# set the default magick package ... very old imagemagicks called it
562+
# ImageMagick
563+
PKG_CHECK_MODULES(MAGICK_WAND, MagickCore,
564+
[with_magickpackage=MagickCore
565+
],
566+
[PKG_CHECK_MODULES(IMAGE_MAGICK, ImageMagick,
567+
[with_magickpackage=ImageMagick
568+
],
569+
[AC_MSG_WARN([neither MagickCore nor ImageMagick found; disabling Magick support])
570+
with_magick=no
571+
with_magick_module=no
572+
]
573+
)
574+
]
570575
)
576+
fi
571577
fi
572578

573579
# we have a separate loader for magick7 with fewer ifdef

0 commit comments

Comments
 (0)