Subject: Re: bug#54633: [PATCH] * configure.ac: Fix --without-gif for W32, NS, Haiku, and PGTK.

From: Po Lu <[email-masked]>
Date: Wed, 30 Mar 2022 21:34:25 +0800

Eli Zaretskii <[email-masked]> writes:

> Thanks.  But your patch touched more than just the PGTK build.  For
> w32, for example, I see no reason to make any changes; do you?
> Likewise for NS.
>
> Po Lu, do you agree that only PGTK needs a fix?  If co, can you
> suggest a fix for PGTK only?

I didn't yet test this, but it should work correctly.  Randy, please
test.  Thanks.

Native image APIs are used on Haiku and NS for GIF image support, so
this probably doesn't have to change.

diff --git a/configure.ac b/configure.ac
index 93c821eda0..99b2ecc669 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4292,7 +4292,8 @@ AC_DEFUN
   fi
 elif test "${HAVE_X11}" = "yes" && test "${with_gif}" != "no" \
         || test "${HAVE_W32}" = "yes" || test "${HAVE_NS}" = "yes" \
-	|| test "${HAVE_BE_APP}" = "yes" || test "$window_system" = "pgtk"; then
+	|| test "${HAVE_BE_APP}" = "yes" || test "$window_system" = "pgtk" \
+	&& test "${with_gif}" != "no"; then
   AC_CHECK_HEADER(gif_lib.h,
 # EGifPutExtensionLast only exists from version libungif-4.1.0b1.
 # Earlier versions can crash Emacs, but version 5.0 removes EGifPutExtensionLast.