Skip to content
Snippets Groups Projects
Commit ae92c39a authored by Marcus Comstedt's avatar Marcus Comstedt
Browse files

Image.WebP: Check that the library exists, not just the headers

parent ed0c6a9e
No related branches found
No related tags found
No related merge requests found
......@@ -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 )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment