Kazunobu Kuriyama wrote:
> Since the ungif library refers to some symbols defined in the X11
> library, we need some flags such as -I/usr/X11R6/include and
> -L/usr/X11R6/lib -lX11 when building -gui with ungif.
> 
> However, configure.ac is not written to accomplish it. As a result,
> it cannot detect the existence of ungif correctly, and thus the
> resulting -gui won't support ungif images.
> 
> Hopefully, the attached patch rectifies this.

This was deliberate. libungif can be configured in a way that causes it
to link with X, but this seems like a mixup on libungif's part (using
the same LDFLAGS for the library and the example image viewer).
Hopefully, they will fix this. Presumably, distributions already deal
with this since those I asked to check this said that libungif on their
systems didn't link with X.

Anyway, -gui should definitely not link with X unless it is actually
necessary. Can you modify the patch so that it runs the libungif test
without any special flags first, and only if the first test fails does
it try with the X flags? Ie. something like:

AC_CHECK_LIB(ungif, DGifOpen)
if test "$ac_cv_lib_ungif_DGifOpen" = no; then
  # On some systems, libungif refers to symbols defined in the X11
library.
  # Thus, if the test failed, we try again to see if libungif works when
we
  # link with libX11.
  [insert test linked with X11 here]
fi

It's possible that autoconf will be clever and cache the test result. If
so, the second AC_CHECK_LIB could use DGifCloseFile instead of DGifOpen.

Also, hardcoding a path to X isn't right. IIRC, autoconf includes a
macro for checking for X, so it should be easy to use that to get the
right path (but again, you need to be careful to only include it if it's
actually necessary).

- Alexander Malmberg


_______________________________________________
Bug-gnustep mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to