libtiff: v3.4beta033 release

From 901d6d6f2fb4fcde08a758a61f99de0a3fa6abaa Mon Sep 17 00:00:00 2001
From: Sam Leffler <[EMAIL REDACTED]>
Date: Mon, 29 Apr 1996 22:16:05 +0100
Subject: [PATCH] v3.4beta033 release

Note: VERSION is 3.4 and original release archive is named
tiff-v3.4-tar.gz but the actual content of the archive has
the changes for v3.4beta033 and the changes fit into the
sequence between v3.4beta032 and v3.4beta034.
---
 Makefile.in                        |   5 +-
 README                             |   2 +-
 TODO                               |   2 +-
 VERSION                            |   2 +-
 config.site                        |   2 +-
 configure                          |   9 +-
 contrib/dosdjgpp/Makefile.lib      | 247 +++++++++++++++++++++++++++++
 contrib/dosdjgpp/Makefile.tools    | 217 +++++++++++++++++++++++++
 contrib/dosdjgpp/Makefile.top      |  54 +++++++
 contrib/dosdjgpp/README            |  30 ++++
 contrib/dosdjgpp/conf.bat          |  11 ++
 contrib/dosdjgpp/port.h            |  29 ++++
 contrib/vms/libtiff/makevms.com    | 108 +++++++++----
 contrib/vms/libtiff/tiff.opt       |   0
 contrib/vms/libtiff/tiffshraxp.opt |  11 +-
 contrib/vms/libtiff/tiffshrvax.opt |   6 +-
 contrib/vms/libtiff/tiffvec.mar    |   5 +
 contrib/vms/tools/makevms.com      |  43 ++---
 dist/newalpha                      |   2 +-
 dist/newversion                    |   2 +-
 dist/tiff.alpha                    |   2 +-
 dist/tiff.spec                     |   2 +-
 dist/tiff.version                  |   2 +-
 html/Makefile.in                   |   3 +-
 html/bugs.html                     |   4 +-
 html/build.html                    |  94 ++++++++---
 html/contrib.html                  |  14 +-
 html/document.html                 |   4 +-
 html/images.html                   |   4 +-
 html/index.html                    |   8 +-
 html/internals.html                |   4 +-
 html/intro.html                    |   4 +-
 html/libtiff.html                  |   4 +-
 html/misc.html                     |   6 +-
 html/support.html                  |   4 +-
 html/tools.html                    |   4 +-
 html/v3.4beta033.html              |  81 ++++++++++
 libtiff/Makefile.in                |   5 +-
 libtiff/Makefile.lcc               |   2 +-
 libtiff/Makefile.msc               | 151 ------------------
 libtiff/mkg3states.c               |   2 +-
 libtiff/mkspans.c                  |   2 +-
 libtiff/mkversion.c                |   2 +-
 libtiff/t4.h                       |   2 +-
 libtiff/tif_acorn.c                |   2 +-
 libtiff/tif_apple.c                |   2 +-
 libtiff/tif_atari.c                |   2 +-
 libtiff/tif_aux.c                  |   2 +-
 libtiff/tif_close.c                |   2 +-
 libtiff/tif_codec.c                |   2 +-
 libtiff/tif_compress.c             |   2 +-
 libtiff/tif_dir.c                  |   2 +-
 libtiff/tif_dir.h                  |   2 +-
 libtiff/tif_dirinfo.c              |   2 +-
 libtiff/tif_dirread.c              |   2 +-
 libtiff/tif_dirwrite.c             |  10 +-
 libtiff/tif_dumpmode.c             |   2 +-
 libtiff/tif_error.c                |   2 +-
 libtiff/tif_fax3.c                 |   2 +-
 libtiff/tif_fax3.h                 |   2 +-
 libtiff/tif_flush.c                |   2 +-
 libtiff/tif_getimage.c             |   2 +-
 libtiff/tif_jpeg.c                 |   2 +-
 libtiff/tif_lzw.c                  |   2 +-
 libtiff/tif_msdos.c                |   2 +-
 libtiff/tif_next.c                 |   2 +-
 libtiff/tif_open.c                 |   2 +-
 libtiff/tif_packbits.c             |   2 +-
 libtiff/tif_pixarlog.c             |  10 +-
 libtiff/tif_predict.c              |   2 +-
 libtiff/tif_predict.h              |   2 +-
 libtiff/tif_print.c                |   2 +-
 libtiff/tif_read.c                 |   2 +-
 libtiff/tif_strip.c                |   2 +-
 libtiff/tif_swab.c                 |   2 +-
 libtiff/tif_thunder.c              |   2 +-
 libtiff/tif_tile.c                 |   2 +-
 libtiff/tif_unix.c                 |   2 +-
 libtiff/tif_version.c              |   2 +-
 libtiff/tif_vms.c                  |   2 +-
 libtiff/tif_warning.c              |   2 +-
 libtiff/tif_win3.c                 |   2 +-
 libtiff/tif_win32.c                |   2 +-
 libtiff/tif_write.c                |   2 +-
 libtiff/tif_zip.c                  |   2 +-
 libtiff/tiff.h                     |  10 +-
 libtiff/tiffcomp.h                 |  11 +-
 libtiff/tiffconf.h                 |   2 +-
 libtiff/tiffio.h                   |   2 +-
 libtiff/tiffiop.h                  |   2 +-
 man/Makefile.in                    |   2 +-
 man/TIFFClose.3t                   |   2 +-
 man/TIFFError.3t                   |   2 +-
 man/TIFFFlush.3t                   |   2 +-
 man/TIFFGetField.3t                |   2 +-
 man/TIFFOpen.3t                    |   2 +-
 man/TIFFPrintDirectory.3t          |   2 +-
 man/TIFFRGBAImage.3t               |   2 +-
 man/TIFFReadDirectory.3t           |   2 +-
 man/TIFFReadEncodedStrip.3t        |   2 +-
 man/TIFFReadEncodedTile.3t         |   2 +-
 man/TIFFReadRGBAImage.3t           |   2 +-
 man/TIFFReadRawStrip.3t            |   2 +-
 man/TIFFReadRawTile.3t             |   2 +-
 man/TIFFReadScanline.3t            |   2 +-
 man/TIFFReadTile.3t                |   2 +-
 man/TIFFSetDirectory.3t            |   2 +-
 man/TIFFSetField.3t                |   2 +-
 man/TIFFWarning.3t                 |   2 +-
 man/TIFFWriteDirectory.3t          |   2 +-
 man/TIFFWriteEncodedStrip.3t       |   2 +-
 man/TIFFWriteEncodedTile.3t        |   2 +-
 man/TIFFWriteRawStrip.3t           |   2 +-
 man/TIFFWriteRawTile.3t            |   2 +-
 man/TIFFWriteScanline.3t           |   2 +-
 man/TIFFbuffer.3t                  |   2 +-
 man/TIFFcodec.3t                   |   2 +-
 man/TIFFmemory.3t                  |   2 +-
 man/TIFFquery.3t                   |   2 +-
 man/TIFFsize.3t                    |   2 +-
 man/TIFFstrip.3t                   |   2 +-
 man/TIFFswab.3t                    |   2 +-
 man/TIFFtile.3t                    |   2 +-
 man/fax2ps.1                       |   2 +-
 man/fax2tiff.1                     |   2 +-
 man/gif2tiff.1                     |   2 +-
 man/libtiff.3t                     |   2 +-
 man/pal2rgb.1                      |   2 +-
 man/ppm2tiff.1                     |   2 +-
 man/ras2tiff.1                     |   2 +-
 man/rgb2ycbcr.1                    |   2 +-
 man/sgi2tiff.1                     |   2 +-
 man/thumbnail.1                    |   2 +-
 man/tiff2bw.1                      |   2 +-
 man/tiff2ps.1                      |   2 +-
 man/tiffcmp.1                      |   2 +-
 man/tiffcp.1                       |   2 +-
 man/tiffdither.1                   |   2 +-
 man/tiffdump.1                     |   2 +-
 man/tiffgt.1                       |   2 +-
 man/tiffinfo.1                     |   2 +-
 man/tiffmedian.1                   |   2 +-
 man/tiffsplit.1                    |   2 +-
 man/tiffsv.1                       |   2 +-
 port/Makefile.in                   |   2 +-
 port/install.sh.in                 |   2 +-
 tools/Makefile.in                  |   2 +-
 tools/Makefile.lcc                 |   2 +-
 tools/fax2ps.c                     |  10 +-
 tools/fax2tiff.c                   |   2 +-
 tools/gif2tiff.c                   |   6 +-
 tools/pal2rgb.c                    |   2 +-
 tools/ppm2tiff.c                   |   6 +-
 tools/ras2tiff.c                   |   2 +-
 tools/rasterfile.h                 |   2 +-
 tools/rgb2ycbcr.c                  |   2 +-
 tools/sgi2tiff.c                   |   2 +-
 tools/sgigt.c                      |   2 +-
 tools/sgisv.c                      |   2 +-
 tools/thumbnail.c                  |   2 +-
 tools/tiff2bw.c                    |   2 +-
 tools/tiff2ps.c                    |   2 +-
 tools/tiffcmp.c                    |   2 +-
 tools/tiffcp.c                     |   2 +-
 tools/tiffdither.c                 |   2 +-
 tools/tiffdump.c                   |   2 +-
 tools/tiffinfo.c                   |   2 +-
 tools/tiffmedian.c                 |   2 +-
 tools/tiffsplit.c                  |   2 +-
 tools/ycbcr.c                      |   2 +
 170 files changed, 1068 insertions(+), 430 deletions(-)
 create mode 100644 contrib/dosdjgpp/Makefile.lib
 create mode 100644 contrib/dosdjgpp/Makefile.tools
 create mode 100644 contrib/dosdjgpp/Makefile.top
 create mode 100644 contrib/dosdjgpp/README
 create mode 100644 contrib/dosdjgpp/conf.bat
 create mode 100644 contrib/dosdjgpp/port.h
 mode change 100644 => 100755 contrib/vms/libtiff/makevms.com
 mode change 100644 => 100755 contrib/vms/libtiff/tiff.opt
 mode change 100644 => 100755 contrib/vms/libtiff/tiffshrvax.opt
 mode change 100644 => 100755 contrib/vms/libtiff/tiffvec.mar
 mode change 100644 => 100755 contrib/vms/tools/makevms.com
 create mode 100644 html/v3.4beta033.html
 delete mode 100644 libtiff/Makefile.msc

diff --git a/Makefile.in b/Makefile.in
index 2c33274e..37009577 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,5 +1,5 @@
 #! smake
-#	$Header: /usr/people/sam/tiff/RCS/Makefile.in,v 1.48 1996/04/09 17:37:14 sam Exp $
+#	$Header: /usr/people/sam/tiff/RCS/Makefile.in,v 1.51 1996/04/29 19:51:20 sam Rel $
 #
 # @WARNING@
 #
@@ -112,7 +112,6 @@ TIFFFILES=\
 	    dist/newversion			\
 	libtiff/Makefile.in			\
 	    libtiff/Makefile.lcc		\
-	    libtiff/Makefile.msc		\
 	    libtiff/t4.h			\
 	    libtiff/tiff.h			\
 	    libtiff/tiffcomp.h			\
@@ -260,6 +259,7 @@ TIFFFILES=\
 	    html/misc.html			\
 	    html/support.html			\
 	    html/tools.html			\
+	    html/v3.4beta033.html		\
 	    html/v3.4beta032.html		\
 	    html/v3.4beta031.html		\
 	    html/v3.4beta029.html		\
@@ -314,6 +314,7 @@ CONTRIBFILES=\
 	contrib/win95				\
 	contrib/winnt				\
 	contrib/mac-cw				\
+	contrib/dosdjgpp			\
 	${NULL}
 DISTFILES=\
 	${TIFFFILES}				\
diff --git a/README b/README
index edeff123..67dd08ab 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-$Header: /usr/people/sam/tiff/RCS/README,v 1.27 1996/01/10 19:31:42 sam Exp $
+$Header: /usr/people/sam/tiff/RCS/README,v 1.27 1996/01/10 19:31:42 sam Rel $
 
 TIFF Software Distribution
 --------------------------
diff --git a/TODO b/TODO
index 3fd94828..47f6e5fc 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-#	$Header: /usr/people/sam/tiff/RCS/TODO,v 1.4 1996/02/09 22:09:00 sam Exp $
+#	$Header: /usr/people/sam/tiff/RCS/TODO,v 1.4 1996/02/09 22:09:00 sam Rel $
 
 o tiffcmp read data by strip/tile instead of scanline
 o YCbCr sampling support
diff --git a/VERSION b/VERSION
index 9e4de5cc..2f4b6075 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.4beta
+3.4
diff --git a/config.site b/config.site
index 8bc38b91..ee69fce7 100644
--- a/config.site
+++ b/config.site
@@ -1,4 +1,4 @@
-# $Header: /usr/people/sam/tiff/RCS/config.site,v 1.12 1996/02/22 18:16:44 sam Exp $
+# $Header: /usr/people/sam/tiff/RCS/config.site,v 1.12 1996/02/22 18:16:44 sam Rel $
 #
 # TIFF Software
 #
diff --git a/configure b/configure
index a5b18716..d73abcfa 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #!/bin/sh
-#	$Header: /usr/people/sam/tiff/RCS/configure,v 1.47 1996/04/09 16:41:22 sam Exp $
+#	$Header: /usr/people/sam/tiff/RCS/configure,v 1.48 1996/04/26 03:36:20 sam Rel $
 #
 # Tag Image File Format (TIFF) Software
 #
@@ -145,7 +145,7 @@ do
     -target|--target)		ac_prev=TARGET;;
     -target=*|--target=*)	TARGET="$ac_optarg" ;;
     -version|--version)
-	echo "This is TIFF configure $Revision: 1.47 $"
+	echo "This is TIFF configure $Revision: 1.48 $"
 	exit 0
 	;;
     -help|--help)		usage; exit 0;;
@@ -1135,6 +1135,11 @@ if [ "$DSO" = auto ]; then
 	    DSO=LINUX
 	fi
 	;;
+    *-osf3*)
+	DSOSUF=so
+	DSOOPTS='-shared'
+	DSO=OSF
+	;;
     *)  DSO=no;;
     esac
     test -z "$DSOSUF_VERSION" && DSOSUF_VERSION=${DSOSUF}
diff --git a/contrib/dosdjgpp/Makefile.lib b/contrib/dosdjgpp/Makefile.lib
new file mode 100644
index 00000000..fd4fa764
--- /dev/null
+++ b/contrib/dosdjgpp/Makefile.lib
@@ -0,0 +1,247 @@
+#       $Header: /usr/people/sam/tiff/libtiff/RCS/Makefile.in,v 1.28 1996/02/09 05:55:00 sam Exp $
+#
+# manually derived from Makefile.in for DJGPP v2.x (GNU C for DOS/386).
+#
+# Tag Image File Format Library
+#
+# Copyright (c) 1988-1996 Sam Leffler
+# Copyright (c) 1991-1996 Silicon Graphics, Inc.
+# 
+# Permission to use, copy, modify, distribute, and sell this software and 
+# its documentation for any purpose is hereby granted without fee, provided
+# that (i) the above copyright notices and this permission notice appear in
+# all copies of the software and related documentation, and (ii) the names of
+# Sam Leffler and Silicon Graphics may not be used in any advertising or
+# publicity relating to the software without the specific, prior written
+# permission of Sam Leffler and Silicon Graphics.
+# 
+# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
+# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
+# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
+# 
+# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
+# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
+# OF THIS SOFTWARE.
+#
+
+SRCDIR	= .
+
+NULL	=
+CC	= gcc
+AR	= ar
+AROPTS	= rc
+RANLIB	= ranlib
+
+#
+# If JPEG support is to be included and the Independent JPEG
+# Software distribution is not installed then DIR_JPEG must
+# refer to the directory where the include files reside.
+#
+# Similarly, if the libgz distribution is not installed, then
+# DIR_LIBGZ must refer to the directory where the include files
+# are located.  Note that recent versions 
+#
+IPATH	= -I. -I${SRCDIR}
+# @COPT_LIBINC@
+#
+# To enable JPEG support include -DJPEG_SUPPORT here.
+# To enable Deflate support add a -DZIP_SUPPORT here.
+# Note that where the configure script is used these defines
+# are automatically setup when JPEG/ZIP is set to "yes".
+#
+# Otherwise, consult tiffconf.h for information on controlling
+# the configuration of optional library support.
+#
+CONF_LIBRARY=#@CONF_JPEG@ @CONF_ZIP@
+COPTS	= 
+OPTIMIZER=-O
+CFLAGS	= ${COPTS} ${OPTIMIZER} ${IPATH} ${CONF_LIBRARY}
+#
+SRCS	= \
+	tif_aux.c \
+	tif_close.c \
+	tif_codec.c \
+	tif_compress.c \
+	tif_dir.c \
+	tif_dirinfo.c \
+	tif_dirread.c \
+	tif_dirwrite.c \
+	tif_dumpmode.c \
+	tif_error.c \
+	tif_fax3.c \
+	tif_fx3s.c \
+	tif_getimage.c \
+	tif_jpeg.c \
+	tif_flush.c \
+	tif_lzw.c \
+	tif_next.c \
+	tif_open.c \
+	tif_packbits.c \
+	tif_predict.c \
+	tif_print.c \
+	tif_read.c \
+	tif_swab.c \
+	tif_strip.c \
+	tif_thunder.c \
+	tif_tile.c \
+	tif_msdos.c \
+	tif_version.c \
+	tif_warning.c \
+	tif_write.c \
+	tif_zip.c \
+	${NULL}
+OBJS	= \
+	tif_aux.o \
+	tif_close.o \
+	tif_codec.o \
+	tif_compress.o \
+	tif_dir.o \
+	tif_dirinfo.o \
+	tif_dirread.o \
+	tif_dirwrite.o \
+	tif_dumpmode.o \
+	tif_error.o \
+	tif_fax3.o \
+	tif_fx3s.o \
+	tif_getimage.o \
+	tif_jpeg.o \
+	tif_flush.o \
+	tif_lzw.o \
+	tif_next.o \
+	tif_open.o \
+	tif_packbits.o \
+	tif_predict.o \
+	tif_print.o \
+	tif_read.o \
+	tif_swab.o \
+	tif_strip.o \
+	tif_thunder.o \
+	tif_tile.o \
+	tif_msdos.o \
+	tif_version.o \
+	tif_warning.o \
+	tif_write.o \
+	tif_zip.o \
+	${NULL}
+TARGETS	= libtiff.a
+
+all:	${TARGETS}
+
+libtiff.a: ${OBJS}
+	${AR} ${AROPTS} libtiff.a $?
+	${RANLIB} libtiff.a
+
+${OBJS}: ${SRCDIR}/tiffio.h ${SRCDIR}/tiff.h ${SRCDIR}/tif_dir.h
+${OBJS}: ${SRCDIR}/tiffcomp.h ${SRCDIR}/tiffiop.h ${SRCDIR}/tiffconf.h
+
+ALPHA   = ../dist/tiff.alpha
+VERSION = ../VERSION
+
+version.h: ${VERSION} ${ALPHA} ${SRCDIR}/mkversion.c
+	${CC} -o mkversion ${CFLAGS} ${SRCDIR}/mkversion.c
+	del version.h
+	mkversion -v ${VERSION} -a ${ALPHA} version.h
+
+tif_version.o: version.h
+
+#
+# The finite state machine tables used by the G3/G4 decoders
+# are generated by the mkg3states program.  On systems without
+# make these rules have to be manually carried out.
+#
+# The file is called tif_fax3sm.c is the normal (unix) Makefile, but this
+# may cause problems when compiling without support for LFN, then the file
+# tif_fax3.o is considered the same name as tif_fax3sm.o, since only 8 chars
+# are significant.
+#
+tif_fx3s.c: ${SRCDIR}/mkg3states.c ${SRCDIR}/tif_fax3.h
+	${CC} -o mkg3states ${CFLAGS} ${SRCDIR}/mkg3states.c
+	del tif_fx3s.c
+	mkg3states -c const tif_fx3s.c
+
+tif_fx3s.o: tif_fx3s.c
+	@echo If the following gcc command fails due to lack of virtual memory, try
+	@echo compiling it in a non-DPMI environment with the cwsdpmi swapfile on a
+	@echo drive that has plenty of space.
+	${CC} -c ${CFLAGS} tif_fx3s.c
+
+tif_aux.o: ${SRCDIR}/tif_aux.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_aux.c
+tif_close.o: ${SRCDIR}/tif_close.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_close.c
+tif_codec.o: ${SRCDIR}/tif_codec.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_codec.c
+tif_compress.o: ${SRCDIR}/tif_compress.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_compress.c
+tif_dir.o: ${SRCDIR}/tif_dir.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dir.c
+tif_dirinfo.o: ${SRCDIR}/tif_dirinfo.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dirinfo.c
+tif_dirread.o: ${SRCDIR}/tif_dirread.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dirread.c
+tif_dirwrite.o: ${SRCDIR}/tif_dirwrite.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dirwrite.c
+tif_dumpmode.o: ${SRCDIR}/tif_dumpmode.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dumpmode.c
+tif_error.o: ${SRCDIR}/tif_error.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_error.c
+tif_fax3.o: ${SRCDIR}/tif_fax3.c ${SRCDIR}/t4.h ${SRCDIR}/tif_fax3.h
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_fax3.c
+tif_getimage.o: ${SRCDIR}/tif_getimage.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_getimage.c
+tif_jpeg.o: ${SRCDIR}/tif_jpeg.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_jpeg.c
+tif_flush.o: ${SRCDIR}/tif_flush.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_flush.c
+tif_lzw.o: ${SRCDIR}/tif_lzw.c ${SRCDIR}/tif_predict.h
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_lzw.c
+tif_next.o: ${SRCDIR}/tif_next.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_next.c
+tif_open.o: ${SRCDIR}/tif_open.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_open.c
+tif_packbits.o: ${SRCDIR}/tif_packbits.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_packbits.c
+tif_predict.o: ${SRCDIR}/tif_predict.c ${SRCDIR}/tif_predict.h
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_predict.c
+tif_print.o: ${SRCDIR}/tif_print.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_print.c
+tif_read.o: ${SRCDIR}/tif_read.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_read.c
+tif_swab.o: ${SRCDIR}/tif_swab.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_swab.c
+tif_strip.o: ${SRCDIR}/tif_strip.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_strip.c
+tif_thunder.o: ${SRCDIR}/tif_thunder.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_thunder.c
+tif_tile.o: ${SRCDIR}/tif_tile.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_tile.c
+tif_unix.o: ${SRCDIR}/tif_unix.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_unix.c
+tif_version.o: ${SRCDIR}/tif_version.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_version.c
+tif_warning.o: ${SRCDIR}/tif_warning.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_warning.c
+tif_write.o: ${SRCDIR}/tif_write.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_write.c
+tif_zip.o: ${SRCDIR}/tif_zip.c ${SRCDIR}/tif_predict.h
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_zip.c
+
+tif_apple.o: ${SRCDIR}/tif_apple.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_apple.c
+tif_atari.o: ${SRCDIR}/tif_atari.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_atari.c
+tif_msdos.o: ${SRCDIR}/tif_msdos.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_msdos.c
+tif_vms.o: ${SRCDIR}/tif_vms.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_vms.c
+tif_win3.o: ${SRCDIR}/tif_win3.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tif_win3.c
+
+INCS	= ${SRCDIR}/tiff.h ${SRCDIR}/tiffio.h
+
+clean:
+	rm -f ${TARGETS} ${OBJS} mkg3states mkg3states.exe tif_fx3s.c
+	rm -f version.h libtiff.a mkversion mkversion.exe
diff --git a/contrib/dosdjgpp/Makefile.tools b/contrib/dosdjgpp/Makefile.tools
new file mode 100644
index 00000000..68869b77
--- /dev/null
+++ b/contrib/dosdjgpp/Makefile.tools
@@ -0,0 +1,217 @@
+#	$Header: /usr/people/sam/tiff/tools/RCS/Makefile.in,v 1.17 1996/02/09 05:55:00 sam Exp $
+#
+# manually derived from Makefile.in for DJGPP v2.x (GNU C for DOS/386).
+#
+# TIFF Library Tools
+#
+# Copyright (c) 1988-1996 Sam Leffler
+# Copyright (c) 1991-1996 Silicon Graphics, Inc.
+# 
+# Permission to use, copy, modify, distribute, and sell this software and 
+# its documentation for any purpose is hereby granted without fee, provided
+# that (i) the above copyright notices and this permission notice appear in
+# all copies of the software and related documentation, and (ii) the names of
+# Sam Leffler and Silicon Graphics may not be used in any advertising or
+# publicity relating to the software without the specific, prior written
+# permission of Stanford and Silicon Graphics.
+# 
+# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
+# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
+# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
+# 
+# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
+# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
+# OF THIS SOFTWARE.
+#
+DEPTH	= ..
+SRCDIR	= .
+LIBDIR	= ${DEPTH}/libtiff
+
+NULL	=
+CC	= gcc
+#
+COPTS	= 
+OPTIMIZER=-O
+IPATH	= -I. -I${SRCDIR} -I${LIBDIR}
+CFLAGS	= ${COPTS} ${OPTIMIZER} ${IPATH}
+#
+LIBTIFF	= ${DEPTH}/libtiff/libtiff.a
+LIBJPEG	= #@LIBJPEG@
+LIBGZ	= #@LIBGZ@
+LIBS	= ${LIBTIFF} ${LIBJPEG} ${LIBGZ}
+#
+OBJS=	\
+	fax2tiff.o \
+	fax2ps.o \
+	gif2tiff.o \
+	pal2rgb.o \
+	ppm2tiff.o \
+	rgb2ycbcr.o \
+	ras2tiff.o \
+	thumbnail.o \
+	tiff2bw.o \
+	tiff2ps.o \
+	tiffcmp.o \
+	tiffcp.o \
+	tiffdither.o \
+	tiffdump.o \
+	tiffinfo.o \
+	tiffmedian.o \
+	tiffsplit.o \
+	${NULL}
+TARGETS	=\
+	fax2tiff \
+	fax2ps \
+	gif2tiff \
+	pal2rgb \
+	ppm2tiff \
+	rgb2ycbcr \
+	thumbnail \
+	ras2tiff \
+	tiff2bw \
+	tiff2ps \
+	tiffcmp \
+	tiffcp \
+	tiffdither \
+	tiffdump \
+	tiffinfo \
+	tiffmedian \
+	tiffsplit \
+	${NULL}
+
+all:	${TARGETS}
+
+clean:
+	rm -f ${TARGETS} ${addsuffix .exe, ${TARGETS}} ${OBJS}
+	rm -f sgigt.o tiffgt sgisv.o tiffsv sgi2tiff.o sgi2tiff ycbcr 
+
+#
+# System-independent tools
+#
+
+tiffinfo: tiffinfo.o ${LIBTIFF}
+	${CC} -o tiffinfo ${CFLAGS} tiffinfo.o ${LIBS}
+tiffinfo.o: ${SRCDIR}/tiffinfo.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tiffinfo.c
+
+tiffcmp:tiffcmp.o ${LIBTIFF}
+	${CC} -o tiffcmp ${CFLAGS} tiffcmp.o ${LIBS}
+tiffcmp.o: ${SRCDIR}/tiffcmp.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tiffcmp.c
+
+tiffcp:	tiffcp.o ${LIBTIFF}
+	${CC} -o tiffcp ${CFLAGS} tiffcp.o ${LIBS}
+tiffcp.o: ${SRCDIR}/tiffcp.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tiffcp.c
+
+tiffdump: tiffdump.o
+	${CC} -o tiffdump ${CFLAGS} tiffdump.o ${LIBS}
+tiffdump.o: ${SRCDIR}/tiffdump.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tiffdump.c
+
+tiffmedian: tiffmedian.o ${LIBTIFF}
+	${CC} -o tiffmedian ${CFLAGS} tiffmedian.o ${LIBS}
+tiffmedian.o: ${SRCDIR}/tiffmedian.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tiffmedian.c
+
+tiffsplit: tiffsplit.o ${LIBTIFF}
+	${CC} -o tiffsplit ${CFLAGS} tiffsplit.o ${LIBS}
+tiffsplit.o: ${SRCDIR}/tiffsplit.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tiffsplit.c
+
+tiff2ps: tiff2ps.o ${LIBTIFF}
+	${CC} -o tiff2ps ${CFLAGS} tiff2ps.o ${LIBS}
+tiff2ps.o: ${SRCDIR}/tiff2ps.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tiff2ps.c
+
+#
+# Junky stuff... programs that are more examples of how
+# to use the library than full-blown useful tools.
+#
+
+# convert RGB image to B&W
+tiff2bw: tiff2bw.o ${LIBTIFF}
+	${CC} -o tiff2bw ${CFLAGS} tiff2bw.o ${LIBS}
+tiff2bw.o: ${SRCDIR}/tiff2bw.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tiff2bw.c
+
+# convert B&W image to bilevel w/ FS dithering
+tiffdither: tiffdither.o ${LIBTIFF}
+	${CC} -o tiffdither ${CFLAGS} tiffdither.o ${LIBS}
+tiffdither.o: ${SRCDIR}/tiffdither.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/tiffdither.c
+
+# simple Sun rasterfile converter
+ras2tiff: ras2tiff.o ${LIBTIFF}
+	${CC} -o ras2tiff ${CFLAGS} ras2tiff.o ${LIBS}
+ras2tiff.o: ${SRCDIR}/ras2tiff.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/ras2tiff.c
+
+# simple GIF converter
+gif2tiff: gif2tiff.o ${LIBTIFF}
+	${CC} -o gif2tiff ${CFLAGS} gif2tiff.o ${LIBS}
+gif2tiff.o: ${SRCDIR}/gif2tiff.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/gif2tiff.c
+
+# very limited PBM converter
+ppm2tiff: ppm2tiff.o ${LIBTIFF}
+	${CC} -o ppm2tiff ${CFLAGS} ppm2tiff.o ${LIBS}
+ppm2tiff.o: ${SRCDIR}/ppm2tiff.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/ppm2tiff.c
+
+# Group 3/4 FAX file converter
+fax2tiff: fax2tiff.o ${LIBTIFF}
+	${CC} -o fax2tiff ${CFLAGS} fax2tiff.o ${LIBS}
+fax2tiff.o: ${SRCDIR}/fax2tiff.c
+	${CC} -c -I${LIBDIR} -I${DEPTH}/libtiff ${CFLAGS} ${SRCDIR}/fax2tiff.c
+
+# Group 3/4 FAX to encoded PS converter
+fax2ps: fax2ps.o ${LIBTIFF}
+	${CC} -o fax2ps ${CFLAGS} fax2ps.o ${LIBS}
+fax2ps.o: ${SRCDIR}/fax2ps.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/fax2ps.c
+
+# convert Palette image to RGB
+pal2rgb: pal2rgb.o ${LIBTIFF}
+	${CC} -o pal2rgb ${CFLAGS} pal2rgb.o ${LIBS}
+pal2rgb.o: ${SRCDIR}/pal2rgb.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/pal2rgb.c
+
+# convert RGB image to YCbCr
+rgb2ycbcr: rgb2ycbcr.o ${LIBTIFF}
+	${CC} -o rgb2ycbcr ${CFLAGS} rgb2ycbcr.o ${LIBS}
+rgb2ycbcr.o: ${SRCDIR}/rgb2ycbcr.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/rgb2ycbcr.c
+
+# generate thumbnail images from fax (example of SubIFD usage)
+thumbnail: thumbnail.o ${LIBTIFF}
+	${CC} -o thumbnail ${CFLAGS} thumbnail.o ${LIBS}
+thumbnail.o: ${SRCDIR}/thumbnail.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/thumbnail.c
+
+#
+# System-specific tools.
+#
+
+#
+# sgi2tiff converts SGI RGB images to TIFF; it requires
+# the SGI image library -limage.
+#
+sgi2tiff: sgi2tiff.o ${LIBTIFF}
+	${CC} -o sgi2tiff ${CFLAGS} sgi2tiff.o -limage ${LIBS}
+sgi2tiff.o: ${SRCDIR}/sgi2tiff.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/sgi2tiff.c
+
+# SGI versions of tiffgt & tiffsv that require -lgl
+tiffgt:	sgigt.o ${LIBTIFF}
+	${CC} -o tiffgt ${CFLAGS} sgigt.o ${LIBS} -lgutil -lgl_s
+sgigt.o: ${SRCDIR}/sgigt.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/sgigt.c
+
+tiffsv:	sgisv.o ${LIBTIFF}
+	${CC} -o tiffsv ${CFLAGS} sgisv.o ${LIBS} -lgutil -lgl_s
+sgisv.o: ${SRCDIR}/sgisv.c
+	${CC} -c ${CFLAGS} ${SRCDIR}/sgisv.c
diff --git a/contrib/dosdjgpp/Makefile.top b/contrib/dosdjgpp/Makefile.top
new file mode 100644
index 00000000..1d60696e
--- /dev/null
+++ b/contrib/dosdjgpp/Makefile.top
@@ -0,0 +1,54 @@
+#! smake
+#	$Header: /usr/people/sam/tiff/RCS/Makefile.in,v 1.44 1996/02/09 21:29:19 sam Exp $
+#
+# manually derived from Makefile.in (though basically nothing remains)
+# for DJGPP v2.x (GNU C for DOS/386).
+#
+# A warning about the filename structure:
+#
+# Some of the filenames used in the Makefiles are longer than 8 characters
+# this will work with the normal 8.3 file system since all files are unique
+# in the first 8 chars. To compile under the long filename support in Win95
+# you can either extract the files with a program that truncates filenames
+# (e.g. the DOS pkunzip) and disable LFN support with set LFN=n or with a
+# program that supports long filenames (e.g. WinZip 6.0) and set LFN=y.
+# The default environment in djgpp 2 is supposed to have LFN disabled, but
+# due to a bug in the init code it doesn't work properly. Setting the LFN
+# variable explicitly should fix that.
+#
+# Tag Image File Format Library
+#
+# Copyright (c) 1988-1996 Sam Leffler
+# Copyright (c) 1991-1996 Silicon Graphics, Inc.
+# 
+# Permission to use, copy, modify, distribute, and sell this software and 
+# its documentation for any purpose is hereby granted without fee, provided
+# that (i) the above copyright notices and this permission notice appear in
+# all copies of the software and related documentation, and (ii) the names of
+# Sam Leffler and Silicon Graphics may not be used in any advertising or
+# publicity relating to the software without the specific, prior written
+# permission of Sam Leffler and Silicon Graphics.
+# 
+# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
+# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
+# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
+# 
+# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
+# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
+# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
+# OF THIS SOFTWARE.
+#
+
+SRCDIR  = .
+
+all default:
+	@${MAKE} -C libtiff
+	@${MAKE} -C tools
+
+clean:
+	@${MAKE} -C libtiff clean
+	@${MAKE} -C tools clean
+
+
diff --git a/contrib/dosdjgpp/README b/contrib/dosdjgpp/README
new file mode 100644
index 00000000..e14d1bfc
--- /dev/null
+++ b/contrib/dosdjgpp/README
@@ -0,0 +1,30 @@
+
+This directory contains the files necessary to build the free TIFF library
+with the DJGPP v2 compiler under MSDOS. Since DJGPP defines the unix flag,
+I have created a port.h instead of putting the necessary defines into
+tiffcomp.h. Makefiles are included for the top level and the libtiff and
+tools directories.
+
+All you have to do is copy the files into the respective directories and run
+make. If you want, you can use the conf.bat to do that for you, make sure that
+the file is stored with MSDOS text EOL-convention (CR/LF), otherwise the
+command.com will not do anything (if you used unzip, use the -a option,
+otherwise edit the file and save it again).
+
+Note that you probably will not be able to built the library with the v1.x
+versions of djgpp, due to two problems. First, the top makefile calls a
+sub-make for each directory and you are likely to run out of memory, since
+each recursive invocation of a djgpp v1.x program requires about 130k, to
+avoid that, you can enter the directories manually and call make (well, there
+are only two dirs). The 2nd problem is that djgpp 1.x doesn't call the
+coff2exe (stubify) program when creating an executable. This means that all
+programs compiled are not converted to exe and consequently are not available
+for calling directly. For the tools directory, you can just call coff2exe for
+each program after make finishes, but in the libtiff directory, a few programs
+are created during the make process that have to be called for make to
+continue (e.g. mkg3states). Make will probably report an error at each
+such stage. To fix that, either add a coff2exe call before each program is
+called or call coff2exe manually and rerun make (there 2-3 such programs).
+
+Alexander Lehmann <alex@hal.rhein-main.de>
+
diff --git a/contrib/dosdjgpp/conf.bat b/contrib/dosdjgpp/conf.bat
new file mode 100644
index 00000000..f28e12d3
--- /dev/null
+++ b/contrib/dosdjgpp/conf.bat
@@ -0,0 +1,11 @@
+@echo off
+rem copy the Makefiles for libtiff for DJGPP2 into proper locations
+rem we assume to be in $(top)/contrib/dosdjgpp/
+
+copy Makefile.top ..\..\Makefile
+copy Makefile.lib ..\..\libtiff\Makefile
+copy port.h ..\..\libtiff\port.h
+copy Makefile.too* ..\..\tools\Makefile
+
+echo all set for building the library. Now just do make
+cd ..\..
diff --git a/contrib/dosdjgpp/port.h b/contrib/dosdjgpp/port.h
new file mode 100644
index 00000000..4299c5e4
--- /dev/null
+++ b/contrib/dosdjgpp/port.h
@@ -0,0 +1,29 @@
+#ifndef _PORT_
+#define _PORT_ 1
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include <sys/types.h>
+typedef unsigned char u_char;
+typedef unsigned short u_short;
+typedef unsigned int u_int;
+typedef unsigned long u_long;
+
+#define HOST_FILLORDER FILLORDER_LSB2MSB
+#define HOST_BIGEND

(Patch may be truncated, please check the link at the top of this post.)