try and only look for giflib4

see https://github.com/jcupitt/libvips/issues/407
This commit is contained in:
John Cupitt 2016-04-18 12:34:40 +01:00
parent d1e7b78bbd
commit 3517037f1e
3 changed files with 7 additions and 2 deletions

View File

@ -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

View File

@ -631,14 +631,16 @@ if test "$GIFLIB_LIBS" = ""; then
INCLUDES="$GIFLIB_INCLUDES $INCLUDES"
# Try the standard search path first
AC_TRY_LINK([#include <gif_lib.h>],[EGifSetGifVersion("")], [
# look for GifLastError() since it was removed for giflib5 and we only
# (for now) work with giflib4
AC_TRY_LINK([#include <gif_lib.h>],[GifLastError()], [
GIFLIB_LIBS="-lgif"
], [
# giflib is not in the standard search path, try $prefix
LIBS="-L${prefix}/lib $LIBS"
AC_TRY_LINK([#include <gif_lib.h>],[EGifSetGifVersion("")], [
AC_TRY_LINK([#include <gif_lib.h>],[GifLastError()], [
GIFLIB_LIBS="-L${prefix}/lib -lgif"
], [
GIFLIB_LIBS=no

View File

@ -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)