Subject: bug#57420: 29.0.50; Failure configuring Emacs with animated WebP support

From: Daniel Martín <[email-masked]>
Date: Fri, 26 Aug 2022 01:12:32 +0200

Stefan Kangas <[email-masked]> writes:

> Daniel Martín via "Bug reports for GNU Emacs, the Swiss army knife of
> text editors" <[email-masked]> writes:
>
>> I checked that the built Emacs has WebP support.
>>
>> What do you think? I'd need an build system expert to verify that this
>> is TRT in GNU/Linux, Windows, or when pkg-config is not available.
>
> FWIW, I tried building with that patch here (Debian GNU/Linux) and the
> build doesn't have webp support.
>
>     (image-type-available-p 'webp)
>     => nil

Interesting.  Does this alternative patch work better?

diff --git a/configure.ac b/configure.ac
index 6ca3052ea3..afe71dbfa6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2777,7 +2777,7 @@ AC_DEFUN
 
       EMACS_CHECK_MODULES([WEBP], [$WEBP_MODULE])
       if test "$HAVE_WEBP" = "yes"; then
-        WEBP_LIBS="-lwebp -lwebpdemux"
+        WEBP_LIBS="$WEBP_LIBS -lwebpdemux"
       fi
       AC_SUBST([WEBP_CFLAGS])
       AC_SUBST([WEBP_LIBS])