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;