bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

configure tests for graphics libraries


From: Dave Love
Subject: configure tests for graphics libraries
Date: 14 Feb 2002 11:20:53 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1.80

Common versions of libungif (like the one in Debian testing) can crash
Emacs, as I've just been reminded, and there's no way to figure out
the exact version without a run-time test I don't know how to write.
I think you should have to force building with it.

You can usefully test the version of libjpeg, but the change for that
never got installed for some reason.  I can't remember whether an old
one is actually dangerous or just doesn't work for some reason.

2002-02-13  Dave Love  <fx@gnu.org>

        * configure.in: Don't define HAVE_GIF unless --with-gif=yes is
        given explicitly.  Check for version 6b+ of libjpeg.

*** configure.in.~1.267.4.7.~   Thu Jan 31 19:56:22 2002
--- configure.in        Wed Feb 13 21:34:26 2002
***************
*** 90,96 ****
  AC_ARG_WITH(tiff,
  [  --with-tiff             use -ltiff for displaying TIFF images])
  AC_ARG_WITH(gif,
! [  --with-gif              use -lungif for displaying GIF images])
  AC_ARG_WITH(png,
  [  --with-png              use -lpng for displaying PNG images])
  AC_ARG_WITH(toolkit-scroll-bars,
--- 90,97 ----
  AC_ARG_WITH(tiff,
  [  --with-tiff             use -ltiff for displaying TIFF images])
  AC_ARG_WITH(gif,
! [  --with-gif              use -lungif for displaying GIF images],
!    , with_gif=unspecified)
  AC_ARG_WITH(png,
  [  --with-png              use -lpng for displaying PNG images])
  AC_ARG_WITH(toolkit-scroll-bars,
***************
*** 1851,1856 ****
--- 1852,1867 ----
  
    if test "${HAVE_JPEG}" = "yes"; then
      AC_DEFINE(HAVE_JPEG)
+     AC_EGREP_CPP(
+ changequote({, })dnl avoid leadingspace on the next line
+ {version= *(6[2-9]|[7-9][0-9])},
+ changequote([, ])dnl
+         [#include <jpeglib.h>
+        version=JPEG_LIB_VERSION
+ ],    
+         AC_DEFINE(HAVE_JPEG),
+         [AC_MSG_WARN([libjpeg found, but not version 6b or later])
+         HAVE_JPEG=no])
    fi
  fi
    
***************
*** 1883,1898 ****
    fi
  fi
    
! ### Use -lgif if available, unless `--with-gif=no'.
  HAVE_GIF=no
  if test "${HAVE_X11}" = "yes"; then
    if test "${with_gif}" != "no"; then
      AC_CHECK_HEADER(gif_lib.h,
!       AC_CHECK_LIB(ungif, DGifOpen, HAVE_GIF=yes))
    fi
  
!   if test "${HAVE_GIF}" = "yes"; then
!     AC_DEFINE(HAVE_GIF)
    fi
  fi
  
--- 1894,1921 ----
    fi
  fi
    
! ### Use -lgif if available, if `--with-gif=yes'.
  HAVE_GIF=no
  if test "${HAVE_X11}" = "yes"; then
+   late_LIBS="${LIBS}"
    if test "${with_gif}" != "no"; then
      AC_CHECK_HEADER(gif_lib.h,
!       AC_CHECK_LIB(ungif, DGifOpen))
    fi
  
!   if test "${ac_cv_lib_ungif_DGifOpen}" = "yes"; then
!     if test "${with_gif}" = unspecified; then
!       LIBS="${late_LIBS}"
!       AC_MSG_WARN([
! You have a potentially-useful libungif, but configure can't determine its
! exact version.  It may be one which can cause Emacs to crash.
! See the file INSTALL.  If you're sure you have an appropriate version,
! you can re-run configure with the argument --with-gif=yes to enable
! GIF support.])
!     else
!       HAVE_GIF=yes
!       AC_DEFINE(HAVE_GIF)
!     fi
    fi
  fi
  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]