[gs-commits] ghostpdl branch, master, updated. jbig2dec-0.14-1987-g874ef8c
[email protected] (Chris Liddell) Thu, 28 Nov 2019 11:58:47 +0000 (UTC)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
The ghostpdl branch, master has been updated
via 874ef8cf7f0af2efae3d7fb6598013be5d277384 (commit)
from 15f3faeffff7d1b2658b824262314091f7af088b (commit)
----------------------------------------------------------------------
commit 874ef8cf7f0af2efae3d7fb6598013be5d277384
Author: Chris Liddell <[email protected]>
Date: Thu Nov 28 11:29:03 2019 +0000
Enable jpeg support in libtiff if possible
diff --git a/base/tiff.mak b/base/tiff.mak
index 0a81d46..0bcab63 100644
--- a/base/tiff.mak
+++ b/base/tiff.mak
@@ -42,7 +42,7 @@ tiff_1=$(TIFFOBJ)tif_aux.$(OBJ) $(TIFFOBJ)tif_close.$(OBJ) $(TIFFOBJ)tif_codec.$
tiff_2=$(TIFFOBJ)tif_compress.$(OBJ) $(TIFFOBJ)tif_dir.$(OBJ) $(TIFFOBJ)tif_dirinfo.$(OBJ) $(TIFFOBJ)tif_dirread.$(OBJ)
tiff_3=$(TIFFOBJ)tif_dirwrite.$(OBJ) $(TIFFOBJ)tif_dumpmode.$(OBJ) $(TIFFOBJ)tif_error.$(OBJ) $(TIFFOBJ)tif_extension.$(OBJ)
tiff_4=$(TIFFOBJ)tif_fax3.$(OBJ) $(TIFFOBJ)tif_fax3sm.$(OBJ) $(TIFFOBJ)tif_flush.$(OBJ) $(TIFFOBJ)tif_getimage.$(OBJ)
-tiff_5=$(TIFFOBJ)tif_jbig.$(OBJ) $(TIFFOBJ)tif_jpeg.$(OBJ) $(TIFFOBJ)tif_luv.$(OBJ) $(TIFFOBJ)tif_lzw.$(OBJ)
+tiff_5=$(TIFFOBJ)tif_jbig.$(OBJ) $(TIFFOBJ)tif_jpeg.$(OBJ) $(TIFFOBJ)tif_jpeg_12.$(OBJ) $(TIFFOBJ)tif_luv.$(OBJ) $(TIFFOBJ)tif_lzw.$(OBJ)
tiff_6=$(TIFFOBJ)tif_next.$(OBJ) $(TIFFOBJ)tif_ojpeg.$(OBJ) $(TIFFOBJ)tif_open.$(OBJ) $(TIFFOBJ)tif_packbits.$(OBJ)
tiff_7=$(TIFFOBJ)tif_pixarlog.$(OBJ) $(TIFFOBJ)tif_predict.$(OBJ) $(TIFFOBJ)tif_print.$(OBJ) $(TIFFOBJ)tif_read.$(OBJ)
tiff_8=$(TIFFOBJ)tif_strip.$(OBJ) $(TIFFOBJ)tif_swab.$(OBJ) $(TIFFOBJ)tif_thunder.$(OBJ) $(TIFFOBJ)tif_tile.$(OBJ)
@@ -110,6 +110,9 @@ $(TIFFOBJ)tif_getimage.$(OBJ) : $(TIFFSRC)/libtiff/tif_getimage.c $(TIFFDEP)
$(TIFFOBJ)tif_jbig.$(OBJ) : $(TIFFSRC)/libtiff/tif_jbig.c $(TIFFDEP)
$(TIFFCC) $(TIFFO_)tif_jbig.$(OBJ) $(C_) $(TIFFSRC)/libtiff/tif_jbig.c
+$(TIFFOBJ)tif_jpeg_12.$(OBJ) : $(TIFFSRC)/libtiff/tif_jpeg_12.c $(TIFFDEP) $(JGENDIR)/jconfig.h
+ $(TIFFCC) $(TIFFO_)tif_jpeg_12.$(OBJ) $(C_) $(TIFFSRC)/libtiff/tif_jpeg_12.c
+
$(TIFFOBJ)tif_jpeg.$(OBJ) : $(TIFFSRC)/libtiff/tif_jpeg.c $(TIFFDEP) $(JGENDIR)/jconfig.h
$(TIFFCC) $(TIFFO_)tif_jpeg.$(OBJ) $(C_) $(TIFFSRC)/libtiff/tif_jpeg.c
diff --git a/configure.ac b/configure.ac
index d6d4d6a..6742cf8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1116,6 +1116,8 @@ AC_SUBST(FTSRCDIR)
AC_SUBST(FT_CFLAGS)
AC_SUBST(FT_LIBS)
+TIFF_JPEG_INCLUDE=
+
if test x"$enable_auxtools_only" = x"yes" ; then
LIBJPEGDIR=
SHARE_LIBJPEG=0
@@ -1143,6 +1145,11 @@ else
AC_CHECK_HEADERS([jpeglib.h], [SHARE_LIBJPEG=1])
])
fi
+
+ if test x"$LIBJPEGDIR" != x"src" ; then
+ TIFF_JPEG_INCLUDE="$LIBJPEGDIR"
+ fi
+
if test -z "$SHARE_LIBJPEG"; then
AC_MSG_ERROR([I wasn't able to find a copy
of the jpeg library. This is required for compiling
@@ -1438,6 +1445,12 @@ if test x"$SHARE_LIBTIFF" = x"0" ; then
if test x"$ac_cv_prog_gcc" = x"yes"; then
TIFFCFLAGS="-Wno-write-strings $CFLAGS_NMI $CFLAGS_NUD -DJPEG_LIB_MK1_OR_12BIT=0"
fi
+ # if we're building with our own libjpeg, or we have another libjpeg available, allow jpeg compression in TIFF
+ if test x"$TIFF_JPEG_INCLUDE" != x"src" ; then
+ TIFFCFLAGS="-DJPEG_SUPPORT -DJPEG_LIB_MK1_OR_12BIT=0 -I$TIFF_JPEG_INCLUDE $TIFFCFLAGS"
+ elif test x"$SHARE_LIBJPEG" = x"1" ; then
+ TIFFCFLAGS="-DJPEG_SUPPORT -DJPEG_LIB_MK1_OR_12BIT=0 $TIFFCFLAGS"
+ fi
echo
echo "Continuing with Ghostscript configuration..."
diff --git a/psi/msvc.mak b/psi/msvc.mak
index 5500d43..794fb68 100644
--- a/psi/msvc.mak
+++ b/psi/msvc.mak
@@ -659,7 +659,7 @@ TIFFSRCDIR=tiff$(D)
TIFFCONFDIR=$(TIFFSRCDIR)
TIFFCONFIG_SUFFIX=.vc
TIFFPLATFORM=win32
-TIFFCFLAGS="-DJPEG_LIB_MK1_OR_12BIT=0"
+TIFFCFLAGS="-DJPEG_SUPPORT -DJPEG_LIB_MK1_OR_12BIT=0 -I./jpeg"
ENABLE_TIFF=$(D_)TIFF_INCLUDED$(_D)
!endif
Summary of changes:
base/tiff.mak | 5 ++++-
configure.ac | 13 +++++++++++++
psi/msvc.mak | 2 +-
3 files changed, 18 insertions(+), 2 deletions(-)