diff --git a/README.md b/README.md index 191b02ef..b9b0ff3e 100644 --- a/README.md +++ b/README.md @@ -187,6 +187,8 @@ If available, libvips adds support for EXIF metadata in JPEG files. The standard gif loader. If this is not present, vips will try to load gifs via imagemagick instead. +vips will only work with giflib 4. + ### librsvg The usual SVG loader. If this is not present, vips will try to load SVGs diff --git a/acinclude.m4 b/acinclude.m4 index cfa5c6a2..3eca7a5c 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -631,14 +631,16 @@ if test "$GIFLIB_LIBS" = ""; then INCLUDES="$GIFLIB_INCLUDES $INCLUDES" # Try the standard search path first - AC_TRY_LINK([#include ],[EGifSetGifVersion("")], [ + # look for GifLastError() since it was removed for giflib5 and we only + # (for now) work with giflib4 + AC_TRY_LINK([#include ],[GifLastError()], [ GIFLIB_LIBS="-lgif" ], [ # giflib is not in the standard search path, try $prefix LIBS="-L${prefix}/lib $LIBS" - AC_TRY_LINK([#include ],[EGifSetGifVersion("")], [ + AC_TRY_LINK([#include ],[GifLastError()], [ GIFLIB_LIBS="-L${prefix}/lib -lgif" ], [ GIFLIB_LIBS=no diff --git a/configure.ac b/configure.ac index 2586e1c3..bc3ec0fc 100644 --- a/configure.ac +++ b/configure.ac @@ -964,6 +964,7 @@ file import/export with libpng: $with_png (requires libpng-1.2.9 or later) file import/export with libtiff: $with_tiff file import/export with giflib: $with_giflib + (requires libgif-4.x) file import/export with libjpeg: $with_jpeg image pyramid export: $with_gsf (requires libgsf-1 1.14.27 or later)