From ae92c39ac1a742d097b235ce7f2d924b45d3e71d Mon Sep 17 00:00:00 2001 From: Marcus Comstedt <marcus@mc.pp.se> Date: Sun, 5 Jan 2014 20:25:57 +0100 Subject: [PATCH] Image.WebP: Check that the library exists, not just the headers --- src/post_modules/_Image_WebP/configure.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/post_modules/_Image_WebP/configure.in b/src/post_modules/_Image_WebP/configure.in index 112a77d8ad..d9cb207093 100644 --- a/src/post_modules/_Image_WebP/configure.in +++ b/src/post_modules/_Image_WebP/configure.in @@ -7,14 +7,19 @@ PIKE_FEATURE_NODEP(Image.WebP) AC_CHECK_HEADERS(webp/encode.h) if test $ac_cv_header_webp_encode_h = yes ; then - AC_DEFINE(HAVE_LIBWEBP,[],[Define when the -lwebp library is available]) + have_libwebp=false AC_CHECK_LIB([webp], [WebPDecodeRGB], [ LIBS="${LIBS-} -lwebp" + have_libwebp=true ]) AC_CHECK_LIB([webpdecoder], [WebPDecodeRGBA], [ LIBS="${LIBS-} -lwebpmux -lwebpdecoder -lwebpdemux" + have_libwebp=true ]) - PIKE_FEATURE_OK(Image.WebP) + if $have_libwebp; then + AC_DEFINE(HAVE_LIBWEBP,[],[Define when the -lwebp library is available]) + PIKE_FEATURE_OK(Image.WebP) + fi fi AC_OUTPUT(Makefile,echo FOO >stamp-h ) -- GitLab