From 7f4e1a10eb9603d35a5674e64ae03fcb15c9aa11 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Wed, 24 Jul 2019 03:38:39 +0200 Subject: [PATCH] build with libtiff 3.9.6 --- src/Makefile | 3 ++- src/tifformat.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 6889b859..4134992b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -681,7 +681,8 @@ endif COPT += -DNO_X11 endif LOPT += $(TTFLOPT) - LOPT += $(shell $(PKG_CONFIG) --libs libpng libtiff-4) + LOPT += $(shell $(PKG_CONFIG) --libs libpng `$(PKG_CONFIG) --exists libtiff-4 && echo libtiff-4`) + LOPT += $(shell $(PKG_CONFIG) --exists libtiff-4 || echo -ltiff) LOPT += $(LUALOPT) OBJDIR = ../obj/unix FCLOPT = -lfontconfig diff --git a/src/tifformat.c b/src/tifformat.c index 5e11dc2c..d02b770d 100644 --- a/src/tifformat.c +++ b/src/tifformat.c @@ -435,7 +435,7 @@ void Load_TIFF_Sub(T_IO_Context * context, TIFF * tif, unsigned long file_size) for (;;) { word subifd_count; -#if TIFFLIB_VERSION < 20120101 +#if TIFFLIB_VERSION <= 20120218 uint32 * subifd_array; #else uint64 * subifd_array;