From f7a6a02ee8017f02cde73af6da4d319d64841b5a Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sun, 8 May 2016 11:02:21 +0100 Subject: [PATCH] fix giflib4 detection and a problem in giflib4 error handling --- ChangeLog | 1 + acinclude.m4 | 4 ++-- libvips/foreign/gifload.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index cbb50c50..1b926428 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,7 @@ - add giflib5 support - allow resize >1 on one axis, <1 on the other - vips_resize has an optional @kernel argument +- fix giflib4 detection [felixbuenemann] 29/1/16 started 8.3 - add vips_reduce*() ... a fast path for affine downsize diff --git a/acinclude.m4 b/acinclude.m4 index 4f17b2ab..d1bbc58f 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -631,14 +631,14 @@ if test "$GIFLIB_LIBS" = ""; then INCLUDES="$GIFLIB_INCLUDES $INCLUDES" # Try the standard search path first - AC_TRY_LINK([#include ],[EGifSetGifVersion(0,0)], [ + AC_TRY_LINK([#include ],[DGifSlurp(0)], [ GIFLIB_LIBS="-lgif" ], [ # giflib is not in the standard search path, try $prefix LIBS="-L${prefix}/lib $LIBS" - AC_TRY_LINK([#include ],[EGifSetGifVersion(0,0)], [ + AC_TRY_LINK([#include ],[DGifSlurp(0)], [ GIFLIB_LIBS="-L${prefix}/lib -lgif" ], [ GIFLIB_LIBS=no diff --git a/libvips/foreign/gifload.c b/libvips/foreign/gifload.c index 2481526d..5fc317db 100644 --- a/libvips/foreign/gifload.c +++ b/libvips/foreign/gifload.c @@ -160,7 +160,7 @@ vips_foreign_load_gif_error_vips( VipsForeignLoadGif *gif, int error ) const char *message; - if( (message = vips_foreign_load_gif_errstr( gif->file->Error )) ) + if( (message = vips_foreign_load_gif_errstr( error )) ) vips_error( class->nickname, "%s", message ); }