diff options
author | Sam Leffler <sam@engr.sgi.com> | 1996-03-19 18:26:58 +0000 |
---|---|---|
committer | Roger Leigh <rleigh@codelibre.net> | 2022-06-22 18:37:51 +0100 |
commit | 9b8fa7705c7d7aa31cef9c148e19cd59162f3519 (patch) | |
tree | 0f79104cf6df6ad7842576c1c46526ce17981134 | |
parent | 963e9c6bc0b30048052bf076e0c8b62ea2f9e90f (diff) | |
download | libtiff-git-9b8fa7705c7d7aa31cef9c148e19cd59162f3519.tar.gz |
v3.4beta031 releasev3.4beta031
-rw-r--r-- | Makefile.in | 3 | ||||
-rwxr-xr-x | config.guess | 8 | ||||
-rw-r--r-- | config.site | 13 | ||||
-rwxr-xr-x | configure | 218 | ||||
-rw-r--r-- | dist/tiff.alpha | 2 | ||||
-rw-r--r-- | html/build.html | 84 | ||||
-rw-r--r-- | html/index.html | 4 | ||||
-rw-r--r-- | html/v3.4beta031.html | 93 | ||||
-rw-r--r-- | libtiff/Makefile.in | 87 | ||||
-rw-r--r-- | libtiff/tif_codec.c | 8 | ||||
-rw-r--r-- | libtiff/tif_print.c | 50 | ||||
-rw-r--r-- | libtiff/tif_zip.c | 138 | ||||
-rw-r--r-- | libtiff/tiff.h | 25 | ||||
-rw-r--r-- | libtiff/tiffio.h | 11 | ||||
-rw-r--r-- | man/Makefile.in | 479 | ||||
-rw-r--r-- | port/Makefile.in | 8 | ||||
-rw-r--r-- | tools/Makefile.in | 7 | ||||
-rw-r--r-- | tools/ppm2tiff.c | 4 |
18 files changed, 879 insertions, 363 deletions
diff --git a/Makefile.in b/Makefile.in index d9d15abf..6e7e9a40 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,5 @@ #! smake -# $Header: /usr/people/sam/tiff/RCS/Makefile.in,v 1.44 1996/02/09 21:29:19 sam Exp $ +# $Header: /usr/people/sam/tiff/RCS/Makefile.in,v 1.45 1996/03/18 22:21:38 sam Exp $ # # @WARNING@ # @@ -260,6 +260,7 @@ TIFFFILES=\ html/misc.html \ html/support.html \ html/tools.html \ + html/v3.4beta031.html \ html/v3.4beta029.html \ html/v3.4beta028.html \ html/v3.4beta024.html \ diff --git a/config.guess b/config.guess index 1626b108..75907e0d 100755 --- a/config.guess +++ b/config.guess @@ -295,13 +295,13 @@ EOF fi exit 0 ;; i[34]86:*:3.2:*) - if /bin/uname -X 2>/dev/null >/dev/null ; then + if test -d /etc/conf/cf.d -a -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` + echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL + elif /bin/uname -X 2>/dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL - elif test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` - echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL else echo ${UNAME_MACHINE}-unknown-sysv32 fi diff --git a/config.site b/config.site index 357294c3..8bc38b91 100644 --- a/config.site +++ b/config.site @@ -1,4 +1,4 @@ -# $Header: /usr/people/sam/tiff/RCS/config.site,v 1.10 1996/02/09 05:53:45 sam Exp $ +# $Header: /usr/people/sam/tiff/RCS/config.site,v 1.12 1996/02/22 18:16:44 sam Exp $ # # TIFF Software # @@ -40,7 +40,7 @@ # # Package controls. # -#DSO="auto" # auto|IRIX configure DSO support for system +#DSO="auto" # auto|IRIX|IRIX52 enable DSO support for system #JPEG="no" # yes|no configure JPEG support (see below) #ZIP="no" # yes|no configure Deflate support (see below) #LIBGL="auto" # yes|no|auto configure IRIS GL-based tools @@ -134,15 +134,8 @@ #MACHDEPLIBS="" # extra libraries for linking #PORTFUNCS="" # non-standard functions to emulate #RANLIB=":" # pathname of suitable ranlib program - -# -# Dynamic Shared Object (DSO) support. -# -# Beware that adding new support for DSOs may require some -# modifications to the */Makefile.dso files. -# #DSOSUF="so" # DSO filename suffix -#DSOOPTS="-shared -rdata_shared" # options for building DSOs +#LIBCOPTS="-K PIC" # compiler options for building library # # Makefile construction parameters. @@ -1,5 +1,5 @@ #!/bin/sh -# $Header: /usr/people/sam/tiff/RCS/configure,v 1.34 1996/02/09 05:53:45 sam Exp $ +# $Header: /usr/people/sam/tiff/RCS/configure,v 1.45 1996/03/19 18:26:58 sam Exp $ # # Tag Image File Format (TIFF) Software # @@ -43,6 +43,7 @@ DIRS_LIBINC= DIR_JPEGLIB= DIR_GZLIB= DSO=auto +LIBCOPTS= # library-specific C-compiler options JPEG=no ZIP=no PORT=auto @@ -140,7 +141,7 @@ do -target|--target) ac_prev=TARGET;; -target=*|--target=*) TARGET="$ac_optarg" ;; -version|--version) - echo "This is TIFF configure $Revision: 1.34 $" + echo "This is TIFF configure $Revision: 1.45 $" exit 0 ;; -help|--help) usage; exit 0;; @@ -214,6 +215,28 @@ else fi exec 5>./config.log # compiler messages and the like +capture() +{ + (eval "set -x; $*") >&5 2>&1 + return +} +captureX() +{ + (eval "set -x; $*") 2>&5 + return +} + +date >&5 +cat 1>&5 <<'EOF' + +This file contains information that is captured from running the configure +script. Lines that begin with a "+" are command lines echoed by the +shell. Other lines are the output of commands; usually the contents of +test case files or the output from compilers. If configure does the +wrong thing, you can use the information captured here to aid in debugging. + +EOF + if [ -r $SRCDIR/tiff.alpha ] ; then VERSIONFILE=$SRCDIR/VERSION ALPHAFILE=$SRCDIR/tiff.alpha @@ -224,6 +247,10 @@ fi VERSION="v`cat $VERSIONFILE``awk '{print $3}' $ALPHAFILE`" DATE=`date` +DIST_MAJOR=`echo $VERSION | sed 's/v\([0-9][0-9]*\)\..*/\1/'` +DIST_MINOR=`echo $VERSION | sed 's/v.*\.\([0-9][0-9]*\).*/\1/'` +DIST_ALPHA=`echo $VERSION | sed -e 's/.*beta//' -e 's/.*release//'` + Note() { echo "$@" 1>&4 @@ -235,6 +262,10 @@ if [ $SRCDIR_IS_LIBTIFF = yes ] ; then else Note "Configuring TIFF Software $VERSION." fi + +Note "" +Note "If configure does the wrong thing, check the file config.log for" +Note "information that may help you understand what went wrong." Note "" # @@ -243,16 +274,20 @@ Note "" if [ -f $SITE/config.site ]; then Note "Reading site-wide parameters from $SITE/config.site." . $SITE/config.site + capture . $SITE/config.site elif [ -f $SRCDIR/config.site ]; then Note "Reading site-wide parameters from $SRCDIR/config.site." . $SRCDIR/config.site + capture . $SRCDIR/config.site fi if [ -f config.local ]; then Note "Reading local parameters from config.local." . ./config.local + capture . ./config.local elif [ -f $SRCDIR/config.local ]; then Note "Reading local parameters from $SRCDIR/config.local." . $SRCDIR/config.local + capture . $SRCDIR/config.local fi # @@ -311,12 +346,6 @@ if [ -z "${FILLORDER:-}" ]; then esac fi -cat 1>&5 <<EOF -This file contains any messages produced by compilers while -running configure, to aid in debugging if configure makes a mistake. - -EOF - # # Find the full pathname of a file # using the specified test operation. @@ -375,7 +404,7 @@ findHeader() case "$1" in /*) echo "$1"; return ;; esac - for i in ${DIRS_LIBINC}; do + for i in ${DIRS_LIBINC} /usr/include; do test -r $i/$1 && { case "$i" in /*) echo "$i/$1"; return ;; @@ -391,14 +420,14 @@ findHeader() } # -# Locate a C and C++ compiler and verify they work and -# satisfy our needs (using assorted heuristics). +# Locate a C compiler that satisfies our needs (using assorted heuristics). # JUNK=" a.out confsed conftestmmap confx confy + confMakefile core dummy dummy.a @@ -430,7 +459,7 @@ EOF # isGNU() { - ($1 -E xgnu.c 2>&5 | egrep yes) >/dev/null 2>&1 + capture "cat xgnu.c; ($1 -E xgnu.c 2>&5 | egrep yes)" } # @@ -466,7 +495,7 @@ checkCompiler() C_ANSI="$ENVOPTS" fi $RM dummy dummy.o - ($compiler -o dummy ${C_ANSI} dummy.c) >/dev/null 2>&5 && { + capture $compiler -o dummy ${C_ANSI} dummy.c && { CC=$compiler; test -z "${CCOMPILER:-}" && CCOMPILER=`findApp $compiler $PATH` test -z "${ENVOPTS:-}" && ENVOPTS="${C_ANSI:-}" @@ -475,27 +504,52 @@ checkCompiler() return 1 } +CCtested= +capture cat dummy.c if [ -z "${CC:-}" ]; then CCOMPILER= for i in gcc cc ncc dcc xlc c89 gcc2; do + CCtested="$CCtested $i" checkCompiler $i && break done else + CCtested="$CCtested $CC" checkCompiler $CC fi if [ -z "$CCOMPILER" ]; then cat<<EOF + Cannot locate a working ANSI C compiler. -If the compiler is in a non-standard location, set the environment -variable CC to the absolute pathname of the compiler that is to be used -and rerun this script. +We attempted to compile the following test program: + +---------------------------------------------------------- +EOF + cat dummy.c + cat<<EOF +---------------------------------------------------------- + +with these compilers: + + $CCtested + +but none of them were successful. + +If your compiler is in a non-standard location, you can specify its +location in several ways: + + o set the environment variable CC + o create a config.local or config.site file that includes a + definition for CC + o supply it on the command line using -with-CC=<pathname> If command line options are required for ANSI C compilation, set the -variable ENVOPTS to these options and rerun this script. +ENVOPTS parameter to these options in a similar way (either through +an environment variable or config.local/config.site) and then rerun +this script. EOF - boom - fi + boom +fi Note "Using $CCOMPILER for a C compiler (set CC to override)." test "$ENVOPTS" && { @@ -512,14 +566,15 @@ CheckForGandO() { f=$1 if test -s $f; then - grep -i \(error\|warning\) $f 1>&5 2>&5 || return 1 + capture grep -i \(error\|warning\) $f || return 1 fi return 0 } if [ -z "${GCOPTS:-}" ]; then - if $CCOMPILER $ENVOPTS -g -c dummy.c >/dev/null 2>&5; then + if capture $CCOMPILER $ENVOPTS -g -c dummy.c; then Note "Looks like $CCOMPILER supports the -g option." + # NB: cannot use captureX here 'cuz we lose stderr if $CCOMPILER $ENVOPTS -c -g -O dummy.c >t 2>&1 && CheckForGandO t; then GCOPTS="-g" else @@ -602,13 +657,22 @@ fi # # runMake target rules ... # -runMake() +runMakeX() { target="$1"; shift $RM $target - (for i in "$@"; do + (echo SRCDIR=. + for i in "$@"; do echo "$i"; - done) | ${MAKE} -f - $target 2>&5 + done + )>confMakefile + captureX ${MAKE} -f confMakefile $target + return +} +runMake() +{ + runMakeX "$@" >&5 + return } # @@ -622,7 +686,7 @@ CheckForLibrary() int t() { $f(); return 0; } int main(){ t(); return 0; } EOF - runMake t "t:; ${CCOMPILER} ${ENVOPTS} t.c $libs" >/dev/null + runMake t "t:; ${CCOMPILER} ${ENVOPTS} t.c $libs" } # @@ -633,7 +697,7 @@ CheckForIncludeFile() (for i do echo "#include \"$i\"" done)>t.c - runMake t "t:; ${CCOMPILER} ${ENVOPTS} -E t.c" >/dev/null + runMake t "t:; ${CCOMPILER} ${ENVOPTS} -E t.c" } # @@ -679,7 +743,7 @@ EmitCPlusPlusEpilogue() CheckForFunc() { echo "extern int $1(); main(){$1();exit(0);}" >t.c - runMake t "t:; ${CCOMPILER} ${ENVOPTS} t.c ${MACHDEPLIBS}" >/dev/null + runMake t "t:; ${CCOMPILER} ${ENVOPTS} t.c ${MACHDEPLIBS}" } # @@ -696,9 +760,10 @@ CheckForFuncDecl() (for i do echo "#include \"$i\"" done)>t.c - runMake t "t:; ${CCOMPILER} ${ENVOPTS} -E t.c" |\ + capture cat t.c + runMakeX t "t:; ${CCOMPILER} ${ENVOPTS} -E t.c" |\ awk '{while($0~/[,(][ \t]*$/){printf"%s",$0;getline}print}' |\ - grep "$f[ ]*(.*)" >/dev/null + grep "$f[ ]*(.*)" >&5 return } CheckFuncDecl() @@ -717,7 +782,8 @@ CheckForVarDecl() (for i do echo "#include \"$i\"" done)>t.c - runMake t "t:; ${CCOMPILER} ${ENVOPTS} -E t.c" | grep "$v" >/dev/null + capture cat t.c + runMakeX t "t:; ${CCOMPILER} ${ENVOPTS} -E t.c" | grep "$v" >&5 return } CheckVarDecl() @@ -745,10 +811,11 @@ CheckForDefine() echo "#include \"$i\"" done echo "#ifdef $def" - echo "FOUND" + echo "FOUND();" echo "#endif" )>t.c - runMake t "t:; ${CCOMPILER} ${ENVOPTS} -E t.c" | grep FOUND >/dev/null + capture cat t.c + runMakeX t "t:; ${CCOMPILER} ${ENVOPTS} -E t.c" | grep FOUND >&5 } CheckDefine() { @@ -838,13 +905,15 @@ main() exit(0); } EOF - runMake t "t:; ${CCOMPILER} ${ENVOPTS} t.c" >/dev/null + capture cat t.c + runMake t "t:; ${CCOMPILER} ${ENVOPTS} t.c ${MACHDEPLIBS}" && ./a.out } CheckForBigEndian() { echo 'main() { int one = 1; char* cp = (char*)&one; exit(*cp!=0); }'>t.c - runMake t "t:; ${CCOMPILER} ${ENVOPTS} t.c">/dev/null && ./a.out + capture cat t.c + runMake t "t:; ${CCOMPILER} ${ENVOPTS} t.c" && ./a.out } # @@ -951,6 +1020,10 @@ BuildPortDotH() CheckFuncDecl free 'extern void free(void*);' stdlib.h EmitCPlusPlusEpilogue )>xport.h + if [ $SRCDIR_IS_LIBTIFF = no -a ! -d libtiff ]; then + Note "Creating libtiff directory" + mkdir libtiff + fi mv xport.h $PORTDOTH; chmod 444 $PORTDOTH Note "Done creating $PORTDOTH." } @@ -995,23 +1068,58 @@ Note "Done checking system libraries." Note "" Note "Checking for Dynamic Shared Object (DSO) support." if [ "$DSO" = auto ]; then - case $TARGET in + DSOSUF_VERSION= + case $TARGET-$CC in *-irix5.2*) if (findApp rld /lib:/usr/lib:$PATH) >/dev/null 2>&1; then DSOSUF=so - DSOOPTS='-shared -rdata_shared -check_registry ${SRCDIR}/port/irix/so_locations -quickstart_info' + DSOLD='${LD}' + DSOOPTS='-elf -shared -no_unresolved -all' DSO=IRIX52 fi ;; *-irix*) if (findApp rld /lib:/usr/lib:$PATH) >/dev/null 2>&1; then DSOSUF=so + DSOLD="${CCOMPILER} ${ENVOPTS}" DSOOPTS='-shared -rdata_shared -check_registry ${SRCDIR}/port/irix/so_locations -quickstart_info' DSO=IRIX fi ;; + *-aix*) + DSOSUF=a + DSOLD='${LD}' + DSOOPTS='-r' + LIBCOPTS="-bM\:SRE" + DSO=AIX + ;; + *-hpux*) + DSOSUF=sl + DSOLD='${LD}' + DSOOPTS='-b' + LIBCOPTS="+Z" +# LIBPORT="-Wl,+b${DIR_LIB}" + DSO=HPUX + ;; + *-solaris*) + DSOSUF=so + DSOLD='${LD}' + DSOOPTS='-G' + LIBCOPTS="-K PIC" + DSO=SOLARIS + ;; + *-linux) + if [ -x /lib/libc.so.5 ]; then + DSOSUF=so.${DIST_MAJOR} + DSOSUF_VERSION=${DSOSUF}.${DIST_MINOR}.${DIST_ALPHA} + LIBCOPTS='-fPIC' + DSOOPTS='-shared' + DSO=LINUX + fi + ;; *) DSO=no;; esac + test -z "$DSOSUF_VERSION" && DSOSUF_VERSION=${DSOSUF} fi if [ "$DSO" != no ]; then JUNK="$JUNK t.${DSOSUF}" @@ -1025,9 +1133,10 @@ if [ "$DSO" != no ]; then cat>t.c<<EOF int f() { return 0; } EOF + capture cat t.c runMake t \ - "t.o:; ${CCOMPILER} ${ENVOPTS} -c t.c" \ - "t: t.o; ${CCOMPILER} ${ENVOPTS} ${DSOOPTS} -o t.${DSOSUF} t.o" >/dev/null + "t.o:; ${CCOMPILER} ${ENVOPTS} ${LIBCOPTS} -c t.c" \ + "t: t.o; ${DSOLD} ${DSOOPTS} -o t.${DSOSUF} t.o" } if CheckCCDSO; then Note "Looks like your system supports $DSO-style DSOs." @@ -1040,7 +1149,8 @@ EOF fi fi if [ "$DSO" = no ]; then - DSOSUF=a DSOOPTS= + DSOSUF=a DSOOPTS= LIBCOPTS= + DSOSUF_VERSION=$DSOSUF fi Note "Done checking for DSO support." @@ -1436,7 +1546,7 @@ case $MANSCHEME in *-nroff-cat-*) MANCVT='${MANSED} $? | nroff -man > $@';; esac case $MANSCHEME in -*-0.gz|*-0.Z|*-gz|*-Z|*-z) +*-0|*-0.gz|*-0.Z|*-gz|*-Z|*-z) suf=`echo $MANSCHEME | sed 's/.*-/./'` A='`echo $$i | sed' B='`' # workaround shell bugs MANAPPNAME="$A s/\\\\.1\$\$/$suf/$B" @@ -1469,12 +1579,17 @@ fi Note "" # -# Fixup a list of potentially relative pathnames -# so that they work when used in a subdirectory. +# Fixup a list of potentially relative pathnames so +# that they work when used in a subdirectory. The +# string sent to stdout has no extraneous spaces so +# it can be used, for example, in building pathnames. +# +# NB: There's an extra echo done here so we get a +# \n-terminated string passed to sed. # relativize() { - if [ $SRCDIR_IS_LIBTIFF = no ]; then + echo `if [ $SRCDIR_IS_LIBTIFF = no ]; then (for i do case "$i" in /*|-l*) echo "$i" ;; @@ -1484,12 +1599,12 @@ relativize() esac done) | tr '\012' ' ' else - (for i do echo "$i" ; done ) | tr '\012' ' ' - fi + echo "$@" + fi` | sed -e 's;[ ][ ]*$;;' -e 's;/[.]$;;' } # # Generate a list of compiler include options, -# relativizing any relative pathnames. +# prepending ``../'' to any relative pathnames. # makeIncArgs() { @@ -1514,7 +1629,7 @@ if [ $SRCDIR_IS_LIBTIFF = yes ]; then LIBSRCDIR="${SRCDIR}" else CONFIGDIR=".." - LIBSRCDIR="../${SRCDIR}/libtiff" + LIBSRCDIR=`relativize ${SRCDIR}`/libtiff fi # NB: these should be sorted alphabetically @@ -1530,7 +1645,7 @@ cat>>confsed<<EOF /@COPT_LIBINC@/s;;`makeIncArgs ${DIRS_LIBINC}`;g /@DATE@/s;;${DATE};g /@DEPEND_JPEGLIB@/s;;${CONF_JPEG:+`findHeader jpeglib.h` `findHeader jerror.h`};g -/@DEPEND_ZLIB@/s;;${CONF_ZIP:+`findHeader zlib.h` `findHeader zutil.h`};g +/@DEPEND_ZLIB@/s;;${CONF_ZIP:+`findHeader zlib.h`};g /@DIR_BIN@/s;;${DIR_BIN};g /@DIR_JPEGLIB@/s;;`relativize ${DIR_JPEGLIB}`;g /@DIR_GZLIB@/s;;`relativize ${DIR_GZLIB}`;g @@ -1538,9 +1653,12 @@ cat>>confsed<<EOF /@DIR_LIB@/s;;${DIR_LIB};g /@DIR_MAN@/s;;${DIR_MAN};g /@DIRS_LIBINC@/s;;`relativize ${DIRS_LIBINC}`;g +/@DIST_ALPHA@/s;;${DIST_ALPHA};g +/@DIST_MAJOR@/s;;${DIST_MAJOR};g +/@DIST_MINOR@/s;;${DIST_MINOR};g /@DSO@/s;;${DSO};g -/@DSOOPTS@/s;;${DSOOPTS};g /@DSOSUF@/s;;${DSOSUF};g +/@DSOSUF_VERSION@/s;;${DSOSUF_VERSION};g /@ENVOPTS@/s;;${ENVOPTS};g /@FILLORDER@/s;;${FILLORDER};g /@GCOPTS@/s;;${GCOPTS};g @@ -1550,6 +1668,7 @@ cat>>confsed<<EOF /@LIBGZ@/s;;`relativize ${LIBGZ}`;g /@LIBSRCDIR@/s;;${LIBSRCDIR};g /@LIBIMAGE@/s;;${LIBIMAGE};g +/@LIBCOPTS@/s;;${LIBCOPTS};g /@LIBPORT@/s;;${LIBPORT};g /@LN@/s;;${LN};g /@LN_S@/s;;${LN_S};g @@ -1568,6 +1687,7 @@ cat>>confsed<<EOF /@SED@/s;;${SED};g /@SETMAKE@/s;;${SETMAKE};g /@SRCDIR@/s;;${SRCDIR};g +/@RELSRCDIR@/s;;`relativize ${SRCDIR}`;g /@STRIP@/s;;${STRIP};g /@TARGET@/s;;${TARGET};g /@VERSION@/s;;${VERSION};g diff --git a/dist/tiff.alpha b/dist/tiff.alpha index cd85e195..c04be6b3 100644 --- a/dist/tiff.alpha +++ b/dist/tiff.alpha @@ -1 +1 @@ -define ALPHA 029 +define ALPHA 031 diff --git a/html/build.html b/html/build.html index 51ebb5d3..6cefc72a 100644 --- a/html/build.html +++ b/html/build.html @@ -107,10 +107,6 @@ This second scheme is useful for: the distribution on CD-ROM) </UL> -Beware that if you choose to use the second scheme for configuring -the software you must not use an absolute pathname when you run configure -(i.e. a pathname that begins with ``/''). - <A NAME="ConfigFiles"><P><HR WIDTH=65% ALIGN=right><H3>Configuration Files</H3></A> The configuration process is critical to the proper compilation, @@ -418,6 +414,56 @@ Creating port/install.sh from ../tiff-v3.4beta015/port/install.sh.in Done. </TT></PRE></UL> +<A NAME=DSOSupport><P><HR><H3>Shared Library Support</H3></A> + +It is desirable to make the TIFF library be a shared object +on systems that have support for shared libraries. +Unfortunately the rules to use to build a shared library +vary between operating systems and even compilers. +The distributed software includes support for building a shared +version of the library on a number of different systems. +This support is split between rules in the file +<B>libtiff/Makefile.in</B> that construct the shared library +and checks done by the <TT>configure</TT> script to verify that +the expected rules are supported by compilation tools for +the target system. + +<P> +To add new support for building a shared library both these files +must be updated. +In the configure script search for the section where the autoconfiguration +setting of the <TT>DSO</TT> parameter is handled and +add a new case for the target system that sets the +<TT>DSOSUF</TT>, +<TT>DSOLD</TT>, +<TT>DSOOPTS</TT>, +and +<TT>LIBCOPTS</TT> +options as appropriate for the system. +<TT>DSOSUF</TT> specifies the filename suffix used for the shared +library (e.g. ``.so'' for Dynamic Shared Objects on most SVR4-based +systems). +<TT>DSOLD</TT> specifies the program to use to build the shared library +from a compiled object file; typically ``${LD}'' though on some systems +it is better to use the C compiler directly so system-dependent options and +libraries are automatically supplied. +<TT>DSOOPTS</TT> are options that must be specified to <TT>DSOLD</TT> +when building the shared library. +<TT>LIBCOPTS</TT> are options to pass to the C compiler when constructing +a relocatable object file to include in a shared library; e.g. ``-K PIC'' +on a Sun system. +The <TT>DSO</TT> parameter must also be set to a unique label that identifies +the target system and compilation tools. +This label is used to select +a target in <B>libtiff/Makefile.in</B> to do the actual work in building +the shared library. +Finally, to complete support for the shared library added the appropriate +rules to <B>libtiff/Makefile.in</B> under the target specified in the +<TT>configure</TT> script. + + + + <A NAME="Parameters"><P><HR WIDTH=65% ALIGN=right><H3>Configuration Parameters</H3></A> This section gives a brief description of the less obvious @@ -475,9 +521,21 @@ the directories where the associated include files are located.</TD> </TR> <TR> -<TD VALIGN=top><TT>DSOOPTS</TT></TD> -<TD>When DSO's are built, the options to specify to <TT>CC</TT> -to create a DSO.</TD> +<TD VALIGN=top><TT>DIST_ALPHA</TT></TD> +<TD>The alpha version number for the distribution; e.g. if this +is version 3.4beta031 then the the major number is 31.</TD> +</TR> + +<TR> +<TD VALIGN=top><TT>DIST_MAJOR</TT></TD> +<TD>The major version number for the distribution; e.g. if this +is version 3.4beta031 then the the major number is 3.</TD> +</TR> + +<TR> +<TD VALIGN=top><TT>DIST_MINOR</TT></TD> +<TD>The minor version number for the distribution; e.g. if this +is version 3.4beta031 then the the major number is 4.</TD> </TR> <TR> @@ -487,6 +545,16 @@ If this is set to <TT>"a"</TT> then statically linked archives are used.</TD> </TR> <TR> +<TD VALIGN=top><TT>DSOSUF_VERSION</TT></TD> +<TD>When DSO's are built, a version-specific filename suffix for a DSO. +If this is set to something other than the value of <TT>DSO</TT> then +the file <B>libtiff.<TT>DSOSUF_VERSION</TT></B> will be installed and +a link to it named <B>libtiff.<TT>DSOSUF</TT></B> will automatically +be created. (Note that this means that rule for building the target +DSO must generate a file named <B>libtiff.<TT>DSOSUF_VERSION</TT></B>.)</TD> +</TR> + +<TR> <TD VALIGN=top><TT>ENVOPTS</TT></TD> <TD>Options to pass to <TT>CC</TT> to force ANSI C compilation.</TD> </TR> @@ -1037,7 +1105,7 @@ libtiff/mkversion.c program to generate libtiff/version.h. <ADDRESS> <A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>. -Last updated: $Date: 1996/02/09 22:08:41 $ +Last updated: $Date: 1996/03/18 22:21:04 $ </ADDRESS> </BODY> diff --git a/html/index.html b/html/index.html index 86de3779..c35ddf6c 100644 --- a/html/index.html +++ b/html/index.html @@ -12,7 +12,7 @@ TIFF Software </H1> <B>Latest Release</B>: <I>None</I><BR> -<B>Latest Software</B>: <A HREF="v3.4beta029.html">v3.4beta029</A><BR> +<B>Latest Software</B>: <A HREF="v3.4beta031.html">v3.4beta031</A><BR> <B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> <B>Home Page</B>: <A HREF="http://www-mipl.jpl.nasa.gov/~ndr/tiff/"> http://www-mipl.jpl.nasa.gov/~ndr/tiff/</A> <BR> @@ -81,7 +81,7 @@ the master FTP site listed above. <ADDRESS> <A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>. -Last updated: $Date: 1996/02/09 21:28:38 $ +Last updated: $Date: 1996/03/18 22:21:19 $ </ADDRESS> </BODY> diff --git a/html/v3.4beta031.html b/html/v3.4beta031.html new file mode 100644 index 00000000..032b3b5b --- /dev/null +++ b/html/v3.4beta031.html @@ -0,0 +1,93 @@ +<HTML> +<HEAD> +<TITLE> +Changes in TIFF v3.4beta031 +</TITLE> +</HEAD> + +<BODY> + +<BASEFONT SIZE=4> +<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B> +<BASEFONT SIZE=3> + +<UL> +<HR SIZE=4 WIDTH=65% ALIGN=left> +<B>Current Version</B>: v3.4beta031<BR> +<B>Previous Version</B>: <A HREF=v3.4beta029.html>v3.4beta029</A><BR> +<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR> +<HR SIZE=4 WIDTH=65% ALIGN=left> +</UL> + +<P> +This document describes the changes made to the software between the +<I>previous</I> and <I>current</I> versions (see above). +If you don't find something listed here, then it was not done in this +timeframe, or it was not considered important enough to be mentioned. +The following information is located here: +<UL> +<LI><A HREF="#configure">Changes in the software configuration</A> +<LI><A HREF="#libtiff">Changes in libtiff</A> +<LI><A HREF="#man">Changes in the manual pages</A> +</UL> + +<P><HR WIDTH=65% ALIGN=right> + +<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A> + +<UL> +<LI><B>configure</B> now captures significantly more information + in the <B>config.log</B> file and provides more information when + it is unable to setup a configuration +<LI>support was added for building shared libraries on more systems: + AIX, HPUX, Solaris, and Linux. +<LI>a new configuration parameter <TT>LIBCOPTS</TT> was added for + passing arguments to the C compiler to use when building only + the library; this is part of the enhanced support for building + shared libraries +<LI>include files for optional packages that reside in <B>/usr/include</B> + are now handled correctly +<LI>build trees may now be configured using either relative or absolute + pathnames to the source distribution +<LI>several new configuration parameters were added, mainly for building + shared libraries: <TT>DIST_MAJOR</TT>, <TT>DIST_MINOR</TT>, + <TT>DIST_ALPHA</TT>, and <TT>DSOSUF_VERSION</TT> +</UL> + +<P><HR WIDTH=65% ALIGN=right> + +<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A> + +<UL> +<LI>the Deflate support has been revised: it requires version 0.99 of + the zlib software distribution, <B>the output format has changed and + is incompatible with previous versions of this library</B> (each + strip now includes a header read and written by the zlib library) +<LI>the codec name printed by the TIFFPrintDirectory routine is now + taken from the codec table instead of from a builtin table; this means + that application-defined codecs are handled correctly +<LI>a new symbol was added that contains the library version number; + this can be used to do a compile-time compatibility check of the + library version +</UL> + +<P><HR WIDTH=65% ALIGN=right> + +<A NAME="man"><B><FONT SIZE=+3>C</FONT>HANGES IN THE MANUAL PAGES:</B></A> + +<UL> +<LI>the creation and installation of manual pages was redone; it now + implements the documented ``configuration scheme'' +</UL> + +<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR> + +<HR> + +<ADDRESS> +<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A> +Last updated $Date: 1996/03/18 22:05:56 $. +</ADDRESS> + +</BODY> +</HTML> diff --git a/libtiff/Makefile.in b/libtiff/Makefile.in index d29af81b..f7d0c488 100644 --- a/libtiff/Makefile.in +++ b/libtiff/Makefile.in @@ -1,4 +1,4 @@ -# $Header: /usr/people/sam/tiff/libtiff/RCS/Makefile.in,v 1.28 1996/02/09 05:55:00 sam Exp $ +# $Header: /usr/people/sam/tiff/libtiff/RCS/Makefile.in,v 1.32 1996/03/14 00:54:03 sam Exp $ # # Tag Image File Format Library # @@ -63,7 +63,7 @@ IPATH = -I. -I${SRCDIR} @COPT_LIBINC@ CONF_LIBRARY=@CONF_JPEG@ @CONF_ZIP@ COPTS = @GCOPTS@ OPTIMIZER=-O -CFLAGS = @ENVOPTS@ ${COPTS} ${OPTIMIZER} ${IPATH} ${CONF_LIBRARY} +CFLAGS = @ENVOPTS@ @LIBCOPTS@ ${COPTS} ${OPTIMIZER} ${IPATH} ${CONF_LIBRARY} # SRCS = \ tif_aux.c \ @@ -144,16 +144,57 @@ libtiff.a: ${OBJS} ${AR} ${AROPTS} libtiff.a $? ${RANLIB} libtiff.a +# +# NB: The configure script verifies that the configured +# tools are capable of producing a DSO before enabling +# their creation/use. The following rules are effectively +# duplicated in the configure script to do this verification. +# This means that if you want to add support for building a +# DSO on another system you'll need to modify this file *and* +# configure if you want the right thing to happen automatically +# (should probably be fixed up). +# + # default IRIX DSO building rule IRIXdso: ${OBJS} - ${CC} -o libtiff.@DSOSUF@ -shared -rdata_shared ${OBJS} \ - @LIBJPEG@ @LIBGZ@ - touch IRIXdso + ${CC} -o libtiff.@DSOSUF@ -shared -rdata_shared \ + -check_registry ${SRCDIR}/../port/irix/so_locations \ + -quickstart_info \ + ${OBJS} @LIBJPEG@ @LIBGZ@ + touch $@ # special rule for IRIX 5.2 IRIX52dso: ${OBJS} - ${LD} -elf -o libtiff.@DSOSUF@ -shared -no_unresolved -all libtiff.a \ + ${LD} -elf -o libtiff.@DSOSUF@ -shared -no_unresolved -all ${OBJS} \ @LIBJPEG@ @LIBGZ@ -lc -lm - touch IRIX52dso + touch $@ +# Solaris 2.4 +SOLARISdso: ${OBJS} + ${LD} -L@DIR_LIB@ -G -o libtiff.@DSOSUF@ ${OBJS} + touch $@ +# HP-UX A.09.03 +HPUXdso: ${OBJS} + ${LD} +b@DIR_LIB@ -b -o libtiff.@DSOSUF@ ${OBJS} + touch $@ +# AIX 2.3.5 and 4.1.1 +AIXdso: ${OBJS} + rm -f libtiff.syms shr.o + echo "#!" > libtiff.syms + /bin/dump -g libtiff.a | sed -n -e \ + 's/^[ ]*[0-9][0-9]*[ ]*\([^ .][^ ]*\)$$/\1/p' \ + >> libtiff.syms + ${LD} -o shr.o libtiff.a -H512 -T512 -bM\:SRE \ + -bE\:libtiff.syms @LIBJPEG@ @LIBGZ@ -lc -lm -L@DIR_LIB@ + rm -f libtiff.syms libtiff.@DSOSUF@ + ${AR} ${AROPTS} libtiff.@DSOSUF@ shr.o + rm -f shr.o + touch $@ +# linux ELF shared lib rule +LINUXdso: ${OBJS} + ${CC} -shared -Wl,-soname,libtiff.@DSOSUF@ \ + -o libtiff.@DSOSUF_VERSION@ ${OBJS} @LIBJPEG@ @LIBGZ@ + @LN@ @LN_S@ libtiff.@DSOSUF_VERSION@ libtiff.@DSOSUF@ + touch $@ + ${OBJS}: ${SRCDIR}/tiffio.h ${SRCDIR}/tiff.h ${SRCDIR}/tif_dir.h ${OBJS}: ${SRCDIR}/tiffcomp.h ${SRCDIR}/tiffiop.h ${SRCDIR}/tiffconf.h @@ -251,22 +292,32 @@ INCS = ${SRCDIR}/tiff.h ${SRCDIR}/tiffio.h installHdrs: ${INCS} ${INSTALL} -idb tiff.sw.dev -m 755 -dir @DIR_INC@ - for i in ${INCS}; do \ - f=`basename $$i`; \ - ${INSTALL} -idb tiff.sw.dev -m 444 -F @DIR_INC@ \ - -src $$i -O $$f; \ + for i in ${INCS}; do \ + f=`basename $$i`; \ + ${INSTALL} -idb tiff.sw.dev -m 444 -F @DIR_INC@ \ + -src $$i -O $$f; \ done installDSO: @DSO@dso - ${INSTALL} -idb tiff.sw.tools -m 444 -F @DIR_LIB@ -O libtiff.@DSOSUF@ + if [ @DSOSUF_VERSION@ != @DSOSUF@ ]; then \ + ${INSTALL} -idb tiff.sw.tools -m 555 -F @DIR_LIB@ \ + -O libtiff.@DSOSUF_VERSION@; \ + ${INSTALL} -idb tiff.sw.tools -F @DIR_LIB@ \ + -ln libtiff.@DSOSUF_VERSION@ -O libtiff.@DSOSUF@; \ + else \ + ${INSTALL} -idb tiff.sw.tools -m 444 -F @DIR_LIB@ \ + -O libtiff.@DSOSUF@; \ + fi install: all installHdrs ${INSTALL} -idb tiff.sw.dev -m 755 -dir @DIR_LIB@ ${INSTALL} -idb tiff.sw.dev -m 444 -F @DIR_LIB@ -O libtiff.a - if [ @DSO@dso != nodso ]; then \ - ${MAKE} installDSO; \ - else \ - true; \ + if [ @DSO@dso != nodso ]; then \ + ${MAKE} installDSO; \ + else \ + true; \ fi clean: - rm -f ${TARGETS} ${OBJS} core a.out mkg3states tif_fax3sm.c version.h \ - libtiff.@DSOSUF@ *dso mkversion + rm -f ${TARGETS} ${OBJS} core a.out \ + mkg3states tif_fax3sm.c \ + mkversion version.h \ + libtiff.a libtiff.@DSOSUF@ libtiff.@DSOSUF_VERSION@ *dso diff --git a/libtiff/tif_codec.c b/libtiff/tif_codec.c index ec62814b..c5432638 100644 --- a/libtiff/tif_codec.c +++ b/libtiff/tif_codec.c @@ -1,4 +1,4 @@ -/* $Header: /usr/people/sam/tiff/libtiff/RCS/tif_codec.c,v 1.7 1996/01/10 19:32:56 sam Exp $ */ +/* $Header: /usr/people/sam/tiff/libtiff/RCS/tif_codec.c,v 1.8 1996/02/16 05:54:21 sam Exp $ */ /* * Copyright (c) 1988-1996 Sam Leffler @@ -72,7 +72,7 @@ const TIFFCodec _TIFFBuiltinCODECS[] = { #else TIFFCodec _TIFFBuiltinCODECS[] = { #endif - { "Null", COMPRESSION_NONE, TIFFInitDumpMode }, + { "None", COMPRESSION_NONE, TIFFInitDumpMode }, { "LZW", COMPRESSION_LZW, TIFFInitLZW }, { "PackBits", COMPRESSION_PACKBITS, TIFFInitPackBits }, { "ThunderScan", COMPRESSION_THUNDERSCAN,TIFFInitThunderScan }, @@ -81,8 +81,8 @@ TIFFCodec _TIFFBuiltinCODECS[] = { { "Old-style JPEG", COMPRESSION_OJPEG, TIFFInitOJPEG }, { "CCITT RLE", COMPRESSION_CCITTRLE, TIFFInitCCITTRLE }, { "CCITT RLE/W", COMPRESSION_CCITTRLEW, TIFFInitCCITTRLEW }, - { "CCITT Group3", COMPRESSION_CCITTFAX3, TIFFInitCCITTFax3 }, - { "CCITT Group4", COMPRESSION_CCITTFAX4, TIFFInitCCITTFax4 }, + { "CCITT Group 3", COMPRESSION_CCITTFAX3, TIFFInitCCITTFax3 }, + { "CCITT Group 4", COMPRESSION_CCITTFAX4, TIFFInitCCITTFax4 }, { "ISO JBIG", COMPRESSION_JBIG, TIFFInitJBIG }, { "Deflate", COMPRESSION_DEFLATE, TIFFInitZIP }, { NULL }, diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c index a48d952e..5b919ecf 100644 --- a/libtiff/tif_print.c +++ b/libtiff/tif_print.c @@ -1,4 +1,4 @@ -/* $Header: /usr/people/sam/tiff/libtiff/RCS/tif_print.c,v 1.66 1996/01/10 19:33:10 sam Exp $ */ +/* $Header: /usr/people/sam/tiff/libtiff/RCS/tif_print.c,v 1.67 1996/02/16 05:54:21 sam Exp $ */ /* * Copyright (c) 1988-1996 Sam Leffler @@ -156,53 +156,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) } } if (TIFFFieldSet(tif,FIELD_COMPRESSION)) { + const TIFFCodec* c = TIFFFindCODEC(td->td_compression); fprintf(fd, " Compression Scheme: "); - switch (td->td_compression) { - case COMPRESSION_NONE: - fprintf(fd, "none\n"); - break; - case COMPRESSION_CCITTRLE: - fprintf(fd, "CCITT modified Huffman encoding\n"); - break; - case COMPRESSION_CCITTFAX3: - fprintf(fd, "CCITT Group 3 facsimile encoding\n"); - break; - case COMPRESSION_CCITTFAX4: - fprintf(fd, "CCITT Group 4 facsimile encoding\n"); - break; - case COMPRESSION_CCITTRLEW: - fprintf(fd, "CCITT modified Huffman encoding %s\n", - "w/ word alignment"); - break; - case COMPRESSION_PACKBITS: - fprintf(fd, "Macintosh PackBits encoding\n"); - break; - case COMPRESSION_THUNDERSCAN: - fprintf(fd, "ThunderScan 4-bit encoding\n"); - break; - case COMPRESSION_LZW: - fprintf(fd, "Lempel-Ziv & Welch encoding\n"); - break; - case COMPRESSION_NEXT: - fprintf(fd, "NeXT 2-bit encoding\n"); - break; - case COMPRESSION_OJPEG: - fprintf(fd, "Old-style JPEG encoding\n"); - break; - case COMPRESSION_JPEG: - fprintf(fd, "JPEG encoding\n"); - break; - case COMPRESSION_JBIG: - fprintf(fd, "JBIG encoding\n"); - break; - case COMPRESSION_DEFLATE: - fprintf(fd, "Deflate encoding (experimental)\n"); - break; - default: + if (c) + fprintf(fd, "%s\n", c->name); + else fprintf(fd, "%u (0x%x)\n", td->td_compression, td->td_compression); - break; - } } if (TIFFFieldSet(tif,FIELD_PHOTOMETRIC)) { fprintf(fd, " Photometric Interpretation: "); diff --git a/libtiff/tif_zip.c b/libtiff/tif_zip.c index 3da52284..84d2c8e3 100644 --- a/libtiff/tif_zip.c +++ b/libtiff/tif_zip.c @@ -1,4 +1,4 @@ -/* $Header: /usr/people/sam/tiff/libtiff/RCS/tif_zip.c,v 1.5 1996/01/10 19:33:20 sam Exp $ */ +/* $Header: /usr/people/sam/tiff/libtiff/RCS/tif_zip.c,v 1.8 1996/03/07 17:00:23 sam Exp $ */ /* * Copyright (c) 1995-1996 Sam Leffler @@ -29,33 +29,57 @@ /* * TIFF Library. * - * ZIP (i.e. Deflate) Compression Support + * ZIP (aka Deflate) Compression Support * - * This file is simply an interface to the libgz library written by - * Jean-loup Gailly and Mark Adler. Use version 0.92 or later of - * the library. The data format used by the zlib library is described - * in the files zlib-3.1.doc, deflate-1.1.doc and gzip-4.1.doc, available - * in the directory ftp://ftp.uu.net/pub/archiving/zip/doc. The library - * was last found at ftp://ftp.uu.net/graphics/png/code/zlib-0.93.tar.gz. + * This file is simply an interface to the zlib library written by + * Jean-loup Gailly and Mark Adler. You must use version 1.0 or later + * of the library: this code assumes the 1.0 API and also depends on + * the ability to write the zlib header multiple times (one per strip) + * which was not possible with versions prior to 0.95. Note also that + * older versions of this codec avoided this bug by supressing the header + * entirely. This means that files written with the old library cannot + * be read; they should be converted to a different compression scheme + * and then reconverted. + * + * The data format used by the zlib library is described in the files + * zlib-3.1.doc, deflate-1.1.doc and gzip-4.1.doc, available in the + * directory ftp://ftp.uu.net/pub/archiving/zip/doc. The library was + * last found at ftp://ftp.uu.net/pub/archiving/zip/zlib/zlib-0.99.tar.gz. */ #include "tif_predict.h" #include "zlib.h" -#include "zutil.h" #include <stdio.h> #include <assert.h> /* + * Sigh, ZLIB_VERSION is defined as a string so there's no + * way to do a proper check here. Instead we guess based + * on the presence of #defines that were added between the + * 0.95 and 1.0 distributions. + */ +#if !defined(Z_NO_COMPRESSION) || !defined(Z_DEFLATED) +#error "Antiquated ZLIB software; you must use version 1.0 or later" +#endif + +/* * State block for each open TIFF * file using ZIP compression/decompression. */ typedef struct { - TIFFPredictorState predict; - z_stream stream; + TIFFPredictorState predict; + z_stream stream; + int zipquality; /* compression level */ + int state; /* state flags */ +#define ZSTATE_INIT 0x1 /* zlib setup successfully */ + + TIFFVGetMethod vgetparent; /* super-class method */ + TIFFVSetMethod vsetparent; /* super-class method */ } ZIPState; -#define DecoderState(tif) ((ZIPState*) (tif)->tif_data) -#define EncoderState(tif) ((ZIPState*) (tif)->tif_data) +#define ZState(tif) ((ZIPState*) (tif)->tif_data) +#define DecoderState(tif) ZState(tif) +#define EncoderState(tif) ZState(tif) static int ZIPEncode(TIFF*, tidata_t, tsize_t, tsample_t); static int ZIPDecode(TIFF*, tidata_t, tsize_t, tsample_t); @@ -67,11 +91,13 @@ ZIPSetupDecode(TIFF* tif) static char module[] = "ZIPSetupDecode"; assert(sp != NULL); - if (inflateInit2(&sp->stream, -DEF_WBITS) != Z_OK) { + if (inflateInit(&sp->stream) != Z_OK) { TIFFError(module, "%s: %s", tif->tif_name, sp->stream.msg); return (0); - } else + } else { + sp->state |= ZSTATE_INIT; return (1); + } } /* @@ -112,7 +138,7 @@ ZIPDecode(TIFF* tif, tidata_t op, tsize_t occ, tsample_t s) continue; } if (state != Z_OK) { - TIFFError(module, "%s: libgz error: %s", + TIFFError(module, "%s: zlib error: %s", tif->tif_name, sp->stream.msg); return (0); } @@ -133,20 +159,13 @@ ZIPSetupEncode(TIFF* tif) static char module[] = "ZIPSetupEncode"; assert(sp != NULL); - /* - * We use the undocumented feature of a negiatve window - * bits to suppress writing the header in the output - * stream. This is necessary when the resulting image - * is made up of multiple strips or tiles as otherwise - * libgz will not write a header for each strip/tile and - * the decoder will fail. - */ - if (deflateInit2(&sp->stream, Z_DEFAULT_COMPRESSION, - DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, 0) != Z_OK) { + if (deflateInit(&sp->stream, sp->zipquality) != Z_OK) { TIFFError(module, "%s: %s", tif->tif_name, sp->stream.msg); return (0); - } else + } else { + sp->state |= ZSTATE_INIT; return (1); + } } /* @@ -218,7 +237,7 @@ ZIPPostEncode(TIFF* tif) } break; default: - TIFFError(module, "%s: libgz error: %s", + TIFFError(module, "%s: zlib error: %s", tif->tif_name, sp->stream.msg); return (0); } @@ -229,7 +248,7 @@ ZIPPostEncode(TIFF* tif) static void ZIPCleanup(TIFF* tif) { - ZIPState* sp = (ZIPState*) tif->tif_data; + ZIPState* sp = ZState(tif); if (sp) { if (tif->tif_mode == O_RDONLY) inflateEnd(&sp->stream); @@ -240,6 +259,51 @@ ZIPCleanup(TIFF* tif) } } +static int +ZIPVSetField(TIFF* tif, ttag_t tag, va_list ap) +{ + ZIPState* sp = ZState(tif); + static char module[] = "ZIPVSetField"; + + switch (tag) { + case TIFFTAG_ZIPQUALITY: + sp->zipquality = va_arg(ap, int); + if (tif->tif_mode != O_RDONLY && (sp->state&ZSTATE_INIT)) { + if (deflateParams(&sp->stream, + sp->zipquality, Z_DEFAULT_STRATEGY) != Z_OK) { + TIFFError(module, "%s: zlib error: %s", + tif->tif_name, sp->stream.msg); + return (0); + } + } + return (1); + default: + return (*sp->vsetparent)(tif, tag, ap); + } + /*NOTREACHED*/ +} + +static int +ZIPVGetField(TIFF* tif, ttag_t tag, va_list ap) +{ + ZIPState* sp = ZState(tif); + + switch (tag) { + case TIFFTAG_ZIPQUALITY: + *va_arg(ap, int*) = sp->zipquality; + break; + default: + return (*sp->vgetparent)(tif, tag, ap); + } + return (1); +} + +static const TIFFFieldInfo zipFieldInfo[] = { + { TIFFTAG_ZIPQUALITY, 0, 0, TIFF_ANY, FIELD_PSEUDO, + TRUE, FALSE, "" }, +}; +#define N(a) (sizeof (a) / sizeof (a[0])) + int TIFFInitZIP(TIFF* tif, int scheme) { @@ -253,13 +317,27 @@ TIFFInitZIP(TIFF* tif, int scheme) tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (ZIPState)); if (tif->tif_data == NULL) goto bad; - sp = (ZIPState*) tif->tif_data; + sp = ZState(tif); sp->stream.zalloc = NULL; sp->stream.zfree = NULL; sp->stream.opaque = NULL; sp->stream.data_type = Z_BINARY; /* + * Merge codec-specific tag information and + * override parent get/set field methods. + */ + _TIFFMergeFieldInfo(tif, zipFieldInfo, N(zipFieldInfo)); + sp->vgetparent = tif->tif_vgetfield; + tif->tif_vgetfield = ZIPVGetField; /* hook for codec tags */ + sp->vsetparent = tif->tif_vsetfield; + tif->tif_vsetfield = ZIPVSetField; /* hook for codec tags */ + + /* Default values for codec-specific fields */ + sp->zipquality = Z_DEFAULT_COMPRESSION; /* default comp. level */ + sp->state = 0; + + /* * Install codec methods. */ tif->tif_setupdecode = ZIPSetupDecode; diff --git a/libtiff/tiff.h b/libtiff/tiff.h index 6dc89bb4..3272c63a 100644 --- a/libtiff/tiff.h +++ b/libtiff/tiff.h @@ -1,4 +1,4 @@ -/* $Header: /usr/people/sam/tiff/libtiff/RCS/tiff.h,v 1.64 1996/01/10 19:33:23 sam Exp $ */ +/* $Header: /usr/people/sam/tiff/libtiff/RCS/tiff.h,v 1.67 1996/03/04 17:46:53 sam Exp $ */ /* * Copyright (c) 1988-1996 Sam Leffler @@ -297,6 +297,8 @@ typedef enum { */ #define TIFFTAG_PIXAR_IMAGEFULLWIDTH 33300 /* full image size in x */ #define TIFFTAG_PIXAR_IMAGEFULLLENGTH 33301 /* full image size in y */ +/* tag 33405 is a private tag registered to Eastman Kodak */ +#define TIFFTAG_WRITERSERIALNUMBER 33405 /* device serial number */ /* tag 33432 is listed in the 6.0 spec w/ unknown ownership */ #define TIFFTAG_COPYRIGHT 33432 /* copyright string */ /* tags 34232-34236 are private tags registered to Texas Instruments */ @@ -307,6 +309,8 @@ typedef enum { #define TIFFTAG_FAXRECVPARAMS 34908 /* encoded Class 2 ses. parms */ #define TIFFTAG_FAXSUBADDRESS 34909 /* received SubAddr string */ #define TIFFTAG_FAXRECVTIME 34910 /* receive time (secs) */ +/* tag 65535 is an undefined tag used by Eastman Kodak */ +#define TIFFTAG_DCSHUESHIFTVALUES 65535 /* hue shift correction data */ /* * The following are ``pseudo tags'' that can be @@ -343,4 +347,23 @@ typedef enum { #define PIXARLOGDATAFMT_12BITPICIO 3 /* as per PICIO (1.0==2048) */ #define PIXARLOGDATAFMT_16BIT 4 /* signed short samples */ #define PIXARLOGDATAFMT_FLOAT 5 /* IEEE float samples */ +/* 65550-65556 are allocated to Ken Murchison <ken@oceana.com> */ +#define TIFFTAG_DCSIMAGERTYPE 65550 /* imager model & filter */ +#define DCSIMAGERMODEL_M3 0 /* M3 chip (1280 x 1024) */ +#define DCSIMAGERMODEL_M5 1 /* M5 chip (1536 x 1024) */ +#define DCSIMAGERMODEL_M6 2 /* M6 chip (3072 x 2048) */ +#define DCSIMAGERFILTER_IR 0 /* infrared filter */ +#define DCSIMAGERFILTER_MONO 1 /* monochrome filter */ +#define DCSIMAGERFILTER_CFA 2 /* color filter array */ +#define DCSIMAGERFILTER_OTHER 3 /* other filter */ +#define TIFFTAG_DCSINTERPMODE 65551 /* interpolation mode */ +#define DCSINTERPMODE_NORMAL 0x0 /* whole image, default */ +#define DCSINTERPMODE_PREVIEW 0x1 /* preview of image (384x256) */ +#define TIFFTAG_DCSBALANCEARRAY 65552 /* color balance values */ +#define TIFFTAG_DCSCORRECTMATRIX 65553 /* color correction values */ +#define TIFFTAG_DCSGAMMA 65554 /* gamma value */ +#define TIFFTAG_DCSTOESHOULDERPTS 65555 /* toe & shoulder points */ +#define TIFFTAG_DCSCALIBRATIONFD 65556 /* calibration file desc */ +/* Note: quality level is on the ZLIB 1-9 scale. Default value is -1 */ +#define TIFFTAG_ZIPQUALITY 65557 /* compression quality level */ #endif /* _TIFF_ */ diff --git a/libtiff/tiffio.h b/libtiff/tiffio.h index 74051286..e4a8d4ea 100644 --- a/libtiff/tiffio.h +++ b/libtiff/tiffio.h @@ -1,4 +1,4 @@ -/* $Header: /usr/people/sam/tiff/libtiff/RCS/tiffio.h,v 1.92 1996/01/10 19:33:25 sam Exp $ */ +/* $Header: /usr/people/sam/tiff/libtiff/RCS/tiffio.h,v 1.93 1996/03/07 17:00:14 sam Exp $ */ /* * Copyright (c) 1988-1996 Sam Leffler @@ -33,6 +33,15 @@ #include "tiff.h" /* + * This define can be used in code that requires + * compilation-related definitions specific to a + * version or versions of the library. Runtime + * version checking should be done based on the + * string returned by TIFFGetVersion. + */ +#define TIFFLIB_VERSION 19960307 /* March 7, 1996 */ + +/* * TIFF is defined as an incomplete type to hide the * library's internal data structures from clients. */ diff --git a/man/Makefile.in b/man/Makefile.in index 150d95dd..39b70460 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -1,4 +1,5 @@ -# $Header: /usr/people/sam/tiff/man/RCS/Makefile.in,v 1.11 1996/02/09 05:54:37 sam Exp $ +#! smake +# $Header: /usr/people/sam/tiff/man/RCS/Makefile.in,v 1.13 1996/03/18 20:56:29 sam Exp $ # # @WARNING@ # @@ -26,8 +27,7 @@ # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE # OF THIS SOFTWARE. # -DEPTH = .. -SRCDIR = ${DEPTH}/@SRCDIR@/man +SRCDIR = @RELSRCDIR@/man # # VERSION: @VERSION@ @@ -38,11 +38,45 @@ SRCDIR = ${DEPTH}/@SRCDIR@/man SHELL = @SCRIPT_SH@ NULL = ECHO = echo +SED = sed MV = mv RM = rm -f INSTALL = @INSTALL@ -MAN = @DIR_MAN@ +# +# Manual-related controls: +# +# MAN head of manual tree +# MANAPPS subdirectory for application programs +# MANLIB subdirectory for library functions +# +MAN = @DIR_MAN@ +MANAPPS = @MANAPPS@ +MANLIB = @MANLIB@ +# +# MANSEDLOCAL additional sed commands to use during source transformation +# (might want to transform section names here) +# MANCVT command to convert source to installable target (can use +# $? and $@, but not $<) +MANSEDLOCAL = @MANSEDLOCAL@ +MANCVT = @MANCVT@ +# +# The following macros are used during the install step to generate +# the filenames of the target manual pages. They appear inside a +# shell for loop in a command of the form: +# +# f=${MAN*NAME} +# +# where the variable ``i'' contains the filename of the formatted +# manual page (formatted according to the MANCVT macro). +# +# MANAPPNAME generate installed app man page filename +# MANLIBNAME generate installed library man page filename +# +# +MANAPPNAME = @MANAPPNAME@ +MANLIBNAME = @MANLIBNAME@ + # # Set this up if your manual system requires a # pathname prefix in the .so commands when setting @@ -51,194 +85,281 @@ MAN = @DIR_MAN@ #MANDIR = man3/ MANTOOLS=\ - ${SRCDIR}/fax2tiff.1 \ - ${SRCDIR}/fax2ps.1 \ - ${SRCDIR}/gif2tiff.1 \ - ${SRCDIR}/pal2rgb.1 \ - ${SRCDIR}/ppm2tiff.1 \ - ${SRCDIR}/ras2tiff.1 \ - ${SRCDIR}/rgb2ycbcr.1 \ - ${SRCDIR}/sgi2tiff.1 \ - ${SRCDIR}/thumbnail.1 \ - ${SRCDIR}/tiff2bw.1 \ - ${SRCDIR}/tiff2ps.1 \ - ${SRCDIR}/tiffcmp.1 \ - ${SRCDIR}/tiffcp.1 \ - ${SRCDIR}/tiffdither.1 \ - ${SRCDIR}/tiffdump.1 \ - ${SRCDIR}/tiffgt.1 \ - ${SRCDIR}/tiffinfo.1 \ - ${SRCDIR}/tiffmedian.1 \ - ${SRCDIR}/tiffsplit.1 \ - ${SRCDIR}/tiffsv.1 \ - ${NULL} -MANDEVLINKS=\ - TIFFmalloc.3t \ - TIFFrealloc.3t \ - TIFFfree.3t \ - TIFFmemset.3t \ - TIFFmemcpy.3t \ - TIFFmemcmp.3t \ - TIFFComputeTile.3t \ - TIFFCheckTile.3t \ - TIFFNumberOfTiles.3t \ - TIFFComputeStrip.3t \ - TIFFNumberOfStrips.3t \ - TIFFCurrentDirectory.3t \ - TIFFCurrentRow.3t \ - TIFFCurrentStrip.3t \ - TIFFCurrentTile.3t \ - TIFFFdOpen.3t \ - TIFFFileName.3t \ - TIFFFileno.3t \ - TIFFFindCODEC.3t \ - TIFFFlushData.3t \ - TIFFGetMode.3t \ - TIFFIsTiled.3t \ - TIFFIsByteSwapped.3t \ - TIFFIsUpSampled.3t \ - TIFFIsMSB2LSB.3t \ - TIFFLastDirectory.3t \ - TIFFRegisterCODEC.3t \ - TIFFReverseBits.3t \ - TIFFRGBAImageOK.3t \ - TIFFRGBAImageBegin.3t \ - TIFFRGBAImageGet.3t \ - TIFFRGBAImageEnd.3t \ - TIFFSetErrorHandler.3t \ - TIFFSetSubDirectory.3t \ - TIFFSetWarningHandler.3t \ - TIFFSwabArrayOfLong.3t \ - TIFFSwabArrayOfShort.3t \ - TIFFSwabLong.3t \ - TIFFSwabShort.3t \ - TIFFScanlineSize.3t \ - TIFFDefaultStripSize.3t \ - TIFFVStripSize.3t \ - TIFFStripSize.3t \ - TIFFDefaultTileSize.3t \ - TIFFVTileSize.3t \ - TIFFTileSize.3t \ - TIFFTileRowSize.3t \ - TIFFUnRegisterCODEC.3t \ - TIFFVGetField.3t \ - TIFFVSetField.3t \ - TIFFReadBufferSetup.3t \ - TIFFWriteBufferSetup.3t \ + apps/fax2tiff.1 \ + apps/fax2ps.1 \ + apps/gif2tiff.1 \ + apps/pal2rgb.1 \ + apps/ppm2tiff.1 \ + apps/ras2tiff.1 \ + apps/rgb2ycbcr.1 \ + apps/sgi2tiff.1 \ + apps/thumbnail.1 \ + apps/tiff2bw.1 \ + apps/tiff2ps.1 \ + apps/tiffcmp.1 \ + apps/tiffcp.1 \ + apps/tiffdither.1 \ + apps/tiffdump.1 \ + apps/tiffgt.1 \ + apps/tiffinfo.1 \ + apps/tiffmedian.1 \ + apps/tiffsplit.1 \ + apps/tiffsv.1 \ ${NULL} MANDEV=\ - ${SRCDIR}/libtiff.3t \ + lib/libtiff.3t \ \ - ${SRCDIR}/TIFFClose.3t \ - ${SRCDIR}/TIFFError.3t \ - ${SRCDIR}/TIFFFlush.3t \ - ${SRCDIR}/TIFFGetField.3t \ - ${SRCDIR}/TIFFOpen.3t \ - ${SRCDIR}/TIFFPrintDirectory.3t \ - ${SRCDIR}/TIFFReadDirectory.3t \ - ${SRCDIR}/TIFFReadEncodedStrip.3t \ - ${SRCDIR}/TIFFReadEncodedTile.3t \ - ${SRCDIR}/TIFFReadRGBAImage.3t \ - ${SRCDIR}/TIFFReadRawStrip.3t \ - ${SRCDIR}/TIFFReadRawTile.3t \ - ${SRCDIR}/TIFFReadScanline.3t \ - ${SRCDIR}/TIFFReadTile.3t \ - ${SRCDIR}/TIFFRGBAImage.3t \ - ${SRCDIR}/TIFFSetDirectory.3t \ - ${SRCDIR}/TIFFSetField.3t \ - ${SRCDIR}/TIFFWarning.3t \ - ${SRCDIR}/TIFFWriteDirectory.3t \ - ${SRCDIR}/TIFFWriteEncodedStrip.3t \ - ${SRCDIR}/TIFFWriteEncodedTile.3t \ - ${SRCDIR}/TIFFWriteRawStrip.3t \ - ${SRCDIR}/TIFFWriteRawTile.3t \ - ${SRCDIR}/TIFFWriteScanline.3t \ + lib/TIFFClose.3t \ + lib/TIFFError.3t \ + lib/TIFFFlush.3t \ + lib/TIFFGetField.3t \ + lib/TIFFOpen.3t \ + lib/TIFFPrintDirectory.3t \ + lib/TIFFReadDirectory.3t \ + lib/TIFFReadEncodedStrip.3t \ + lib/TIFFReadEncodedTile.3t \ + lib/TIFFReadRGBAImage.3t \ + lib/TIFFReadRawStrip.3t \ + lib/TIFFReadRawTile.3t \ + lib/TIFFReadScanline.3t \ + lib/TIFFReadTile.3t \ + lib/TIFFRGBAImage.3t \ + lib/TIFFSetDirectory.3t \ + lib/TIFFSetField.3t \ + lib/TIFFWarning.3t \ + lib/TIFFWriteDirectory.3t \ + lib/TIFFWriteEncodedStrip.3t \ + lib/TIFFWriteEncodedTile.3t \ + lib/TIFFWriteRawStrip.3t \ + lib/TIFFWriteRawTile.3t \ + lib/TIFFWriteScanline.3t \ \ - ${SRCDIR}/TIFFbuffer.3t \ - ${SRCDIR}/TIFFcodec.3t \ - ${SRCDIR}/TIFFmemory.3t \ - ${SRCDIR}/TIFFquery.3t \ - ${SRCDIR}/TIFFsize.3t \ - ${SRCDIR}/TIFFstrip.3t \ - ${SRCDIR}/TIFFswab.3t \ - ${SRCDIR}/TIFFtile.3t \ + lib/TIFFbuffer.3t \ + lib/TIFFcodec.3t \ + lib/TIFFmemory.3t \ + lib/TIFFquery.3t \ + lib/TIFFsize.3t \ + lib/TIFFstrip.3t \ + lib/TIFFswab.3t \ + lib/TIFFtile.3t \ + ${NULL} +MANDEVLINKS=\ + lib/TIFFmalloc.3t \ + lib/TIFFrealloc.3t \ + lib/TIFFfree.3t \ + lib/TIFFmemset.3t \ + lib/TIFFmemcpy.3t \ + lib/TIFFmemcmp.3t \ + lib/TIFFComputeTile.3t \ + lib/TIFFCheckTile.3t \ + lib/TIFFNumberOfTiles.3t \ + lib/TIFFComputeStrip.3t \ + lib/TIFFNumberOfStrips.3t \ + lib/TIFFCurrentDirectory.3t \ + lib/TIFFCurrentRow.3t \ + lib/TIFFCurrentStrip.3t \ + lib/TIFFCurrentTile.3t \ + lib/TIFFFdOpen.3t \ + lib/TIFFFileName.3t \ + lib/TIFFFileno.3t \ + lib/TIFFFindCODEC.3t \ + lib/TIFFFlushData.3t \ + lib/TIFFGetMode.3t \ + lib/TIFFIsTiled.3t \ + lib/TIFFIsByteSwapped.3t \ + lib/TIFFIsUpSampled.3t \ + lib/TIFFIsMSB2LSB.3t \ + lib/TIFFLastDirectory.3t \ + lib/TIFFRegisterCODEC.3t \ + lib/TIFFReverseBits.3t \ + lib/TIFFRGBAImageOK.3t \ + lib/TIFFRGBAImageBegin.3t \ + lib/TIFFRGBAImageGet.3t \ + lib/TIFFRGBAImageEnd.3t \ + lib/TIFFSetErrorHandler.3t \ + lib/TIFFSetSubDirectory.3t \ + lib/TIFFSetWarningHandler.3t \ + lib/TIFFSwabArrayOfLong.3t \ + lib/TIFFSwabArrayOfShort.3t \ + lib/TIFFSwabLong.3t \ + lib/TIFFSwabShort.3t \ + lib/TIFFScanlineSize.3t \ + lib/TIFFDefaultStripSize.3t \ + lib/TIFFVStripSize.3t \ + lib/TIFFStripSize.3t \ + lib/TIFFDefaultTileSize.3t \ + lib/TIFFVTileSize.3t \ + lib/TIFFTileSize.3t \ + lib/TIFFTileRowSize.3t \ + lib/TIFFUnRegisterCODEC.3t \ + lib/TIFFVGetField.3t \ + lib/TIFFVSetField.3t \ + lib/TIFFReadBufferSetup.3t \ + lib/TIFFWriteBufferSetup.3t \ ${NULL} -TARGETS = ${MANTOOLS} ${MANDEV} ${MANDEVLINKS} +TARGETS=apps/Makefile lib/Makefile + +# +# System-specific manual page formatting commands should +# apply this sed command to the manual page source before +# handing it to the formatter. This sets any pathnames +# in the man pages to reflect local conventions. +# +MANSED=${SED}\ + -e 's;\$${DIR_BIN};@DIR_BIN@;g' \ + -e 's;\$${DIR_LIB};@DIR_LIB@;g' \ + -e 's;\$${DIR_INC};@DIR_INC@;g' \ + ${MANSEDLOCAL} all: ${TARGETS} +apps/fax2tiff.1:: ${SRCDIR}/fax2tiff.1; ${MANCVT} +apps/fax2ps.1:: ${SRCDIR}/fax2ps.1; ${MANCVT} +apps/gif2tiff.1:: ${SRCDIR}/gif2tiff.1; ${MANCVT} +apps/pal2rgb.1:: ${SRCDIR}/pal2rgb.1; ${MANCVT} +apps/ppm2tiff.1:: ${SRCDIR}/ppm2tiff.1; ${MANCVT} +apps/ras2tiff.1:: ${SRCDIR}/ras2tiff.1; ${MANCVT} +apps/rgb2ycbcr.1:: ${SRCDIR}/rgb2ycbcr.1; ${MANCVT} +apps/sgi2tiff.1:: ${SRCDIR}/sgi2tiff.1; ${MANCVT} +apps/thumbnail.1:: ${SRCDIR}/thumbnail.1; ${MANCVT} +apps/tiff2bw.1:: ${SRCDIR}/tiff2bw.1; ${MANCVT} +apps/tiff2ps.1:: ${SRCDIR}/tiff2ps.1; ${MANCVT} +apps/tiffcmp.1:: ${SRCDIR}/tiffcmp.1; ${MANCVT} +apps/tiffcp.1:: ${SRCDIR}/tiffcp.1; ${MANCVT} +apps/tiffdither.1:: ${SRCDIR}/tiffdither.1; ${MANCVT} +apps/tiffdump.1:: ${SRCDIR}/tiffdump.1; ${MANCVT} +apps/tiffgt.1:: ${SRCDIR}/tiffgt.1; ${MANCVT} +apps/tiffinfo.1:: ${SRCDIR}/tiffinfo.1; ${MANCVT} +apps/tiffmedian.1:: ${SRCDIR}/tiffmedian.1; ${MANCVT} +apps/tiffsplit.1:: ${SRCDIR}/tiffsplit.1; ${MANCVT} +apps/tiffsv.1:: ${SRCDIR}/tiffsv.1; ${MANCVT} + +lib/libtiff.3t:: ${SRCDIR}/libtiff.3t; ${MANCVT} +lib/TIFFClose.3t:: ${SRCDIR}/TIFFClose.3t; ${MANCVT} +lib/TIFFError.3t:: ${SRCDIR}/TIFFError.3t; ${MANCVT} +lib/TIFFFlush.3t:: ${SRCDIR}/TIFFFlush.3t; ${MANCVT} +lib/TIFFGetField.3t:: ${SRCDIR}/TIFFGetField.3t; ${MANCVT} +lib/TIFFOpen.3t:: ${SRCDIR}/TIFFOpen.3t; ${MANCVT} +lib/TIFFPrintDirectory.3t:: ${SRCDIR}/TIFFPrintDirectory.3t; ${MANCVT} +lib/TIFFReadDirectory.3t:: ${SRCDIR}/TIFFReadDirectory.3t; ${MANCVT} +lib/TIFFReadEncodedStrip.3t:: ${SRCDIR}/TIFFReadEncodedStrip.3t;${MANCVT} +lib/TIFFReadEncodedTile.3t:: ${SRCDIR}/TIFFReadEncodedTile.3t; ${MANCVT} +lib/TIFFReadRGBAImage.3t:: ${SRCDIR}/TIFFReadRGBAImage.3t; ${MANCVT} +lib/TIFFReadRawStrip.3t:: ${SRCDIR}/TIFFReadRawStrip.3t; ${MANCVT} +lib/TIFFReadRawTile.3t:: ${SRCDIR}/TIFFReadRawTile.3t; ${MANCVT} +lib/TIFFReadScanline.3t:: ${SRCDIR}/TIFFReadScanline.3t; ${MANCVT} +lib/TIFFReadTile.3t:: ${SRCDIR}/TIFFReadTile.3t; ${MANCVT} +lib/TIFFRGBAImage.3t:: ${SRCDIR}/TIFFRGBAImage.3t; ${MANCVT} +lib/TIFFSetDirectory.3t:: ${SRCDIR}/TIFFSetDirectory.3t; ${MANCVT} +lib/TIFFSetField.3t:: ${SRCDIR}/TIFFSetField.3t; ${MANCVT} +lib/TIFFWarning.3t:: ${SRCDIR}/TIFFWarning.3t; ${MANCVT} +lib/TIFFWriteDirectory.3t:: ${SRCDIR}/TIFFWriteDirectory.3t; ${MANCVT} +lib/TIFFWriteEncodedStrip.3t:: ${SRCDIR}/TIFFWriteEncodedStrip.3t; ${MANCVT} +lib/TIFFWriteEncodedTile.3t:: ${SRCDIR}/TIFFWriteEncodedTile.3t; ${MANCVT} +lib/TIFFWriteRawStrip.3t:: ${SRCDIR}/TIFFWriteRawStrip.3t; ${MANCVT} +lib/TIFFWriteRawTile.3t:: ${SRCDIR}/TIFFWriteRawTile.3t; ${MANCVT} +lib/TIFFWriteScanline.3t:: ${SRCDIR}/TIFFWriteScanline.3t; ${MANCVT} +lib/TIFFbuffer.3t:: ${SRCDIR}/TIFFbuffer.3t; ${MANCVT} +lib/TIFFcodec.3t:: ${SRCDIR}/TIFFcodec.3t; ${MANCVT} +lib/TIFFmemory.3t:: ${SRCDIR}/TIFFmemory.3t; ${MANCVT} +lib/TIFFquery.3t:: ${SRCDIR}/TIFFquery.3t; ${MANCVT} +lib/TIFFsize.3t:: ${SRCDIR}/TIFFsize.3t; ${MANCVT} +lib/TIFFstrip.3t:: ${SRCDIR}/TIFFstrip.3t; ${MANCVT} +lib/TIFFswab.3t:: ${SRCDIR}/TIFFswab.3t; ${MANCVT} +lib/TIFFtile.3t:: ${SRCDIR}/TIFFtile.3t; ${MANCVT} + +lib/TIFFComputeTile.3t:; ${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@ +lib/TIFFCheckTile.3t:; ${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@ +lib/TIFFNumberOfTiles.3t:; ${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@ +lib/TIFFComputeStrip.3t:; ${ECHO} ".so ${MANDIR}TIFFstrip.3t" > $@ +lib/TIFFNumberOfStrips.3t:; ${ECHO} ".so ${MANDIR}TIFFstrip.3t" > $@ +lib/TIFFCurrentDirectory.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ +lib/TIFFCurrentRow.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ +lib/TIFFCurrentStrip.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ +lib/TIFFCurrentTile.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ +lib/TIFFFdOpen.3t:; ${ECHO} ".so ${MANDIR}TIFFOpen.3t" > $@ +lib/TIFFFileName.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ +lib/TIFFFileno.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ +lib/TIFFFlushData.3t:; ${ECHO} ".so ${MANDIR}TIFFFlush.3t" > $@ +lib/TIFFGetMode.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ +lib/TIFFIsTiled.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ +lib/TIFFIsByteSwapped.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ +lib/TIFFIsUpSampled.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ +lib/TIFFIsMSB2LSB.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ +lib/TIFFLastDirectory.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ +lib/TIFFReverseBits.3t:; ${ECHO} ".so ${MANDIR}TIFFswab.3t" > $@ +lib/TIFFRGBAImageOK.3t:; ${ECHO} ".so ${MANDIR}TIFFRGBAImage.3t" > $@ +lib/TIFFRGBAImageBegin.3t:; ${ECHO} ".so ${MANDIR}TIFFRGBAImage.3t" > $@ +lib/TIFFRGBAImageGet.3t:; ${ECHO} ".so ${MANDIR}TIFFRGBAImage.3t" > $@ +lib/TIFFRGBAImageEnd.3t:; ${ECHO} ".so ${MANDIR}TIFFRGBAImage.3t" > $@ +lib/TIFFSetErrorHandler.3t:; ${ECHO} ".so ${MANDIR}TIFFError.3t" > $@ +lib/TIFFSetSubDirectory.3t:; ${ECHO} ".so ${MANDIR}TIFFSetDirectory.3t" > $@ +lib/TIFFSetWarningHandler.3t:; ${ECHO} ".so ${MANDIR}TIFFWarning.3t" > $@ +lib/TIFFSwabArrayOfLong.3t:; ${ECHO} ".so ${MANDIR}TIFFswab.3t" > $@ +lib/TIFFSwabArrayOfShort.3t:; ${ECHO} ".so ${MANDIR}TIFFswab.3t" > $@ +lib/TIFFSwabLong.3t:; ${ECHO} ".so ${MANDIR}TIFFswab.3t" > $@ +lib/TIFFSwabShort.3t:; ${ECHO} ".so ${MANDIR}TIFFswab.3t" > $@ +lib/TIFFScanlineSize.3t:; ${ECHO} ".so ${MANDIR}TIFFsize.3t" > $@ +lib/TIFFRasterScanlineSize.3t:; ${ECHO} ".so ${MANDIR}TIFFsize.3t" > $@ +lib/TIFFDefaultStripSize.3t:; ${ECHO} ".so ${MANDIR}TIFFstrip.3t" > $@ +lib/TIFFStripSize.3t:; ${ECHO} ".so ${MANDIR}TIFFstrip.3t" > $@ +lib/TIFFVStripSize.3t:; ${ECHO} ".so ${MANDIR}TIFFstrip.3t" > $@ +lib/TIFFTileSize.3t:; ${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@ +lib/TIFFVTileSize.3t:; ${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@ +lib/TIFFDefaultTileSize.3t:; ${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@ +lib/TIFFTileRowSize.3t:; ${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@ +lib/TIFFVGetField.3t:; ${ECHO} ".so ${MANDIR}TIFFGetField.3t" > $@ +lib/TIFFVSetField.3t:; ${ECHO} ".so ${MANDIR}TIFFSetField.3t" > $@ +lib/TIFFFindCODEC.3t:; ${ECHO} ".so ${MANDIR}TIFFcodec.3t" > $@ +lib/TIFFRegisterCODEC.3t:; ${ECHO} ".so ${MANDIR}TIFFcodec.3t" > $@ +lib/TIFFUnRegisterCODEC.3t:; ${ECHO} ".so ${MANDIR}TIFFcodec.3t" > $@ +lib/TIFFmalloc.3t:; ${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@ +lib/TIFFrealloc.3t:; ${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@ +lib/TIFFfree.3t:; ${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@ +lib/TIFFmemset.3t:; ${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@ +lib/TIFFmemcpy.3t:; ${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@ +lib/TIFFmemcmp.3t:; ${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@ +lib/TIFFReadBufferSetup.3t:; ${ECHO} ".so ${MANDIR}TIFFbuffer.3t" > $@ +lib/TIFFWriteBufferSetup.3t:; ${ECHO} ".so ${MANDIR}TIFFbuffer.3t" > $@ + +apps/Makefile: + test -d apps || mkdir apps + ${MAKE} ${MANTOOLS} + ${RM} apps/Makefile + (cd apps; \ + ${ECHO} 'install:'; \ + for i in *.1; do \ + f=${MANAPPNAME}; \ + ${ECHO} ' cd ..; ${INSTALL} -m 444 -F ${MAN}/${MANAPPS} \ + -idb tiff.man.tools -src' apps/"$$i" '-O' "$$f"; \ + done \ + )>apps/Makefile +lib/Makefile: + test -d lib || mkdir lib + ${MAKE} ${MANDEV} ${MANDEVLINKS} + ${RM} lib/Makefile + (cd lib; \ + ${ECHO} 'install:'; \ + for i in *.3t; do \ + f=${MANLIBNAME}; \ + ${ECHO} ' cd ..; ${INSTALL} -m 444 -F ${MAN}/${MANLIB} \ + -idb tiff.man.dev -src' lib/"$$i" '-O' "$$f"; \ + done \ + )>lib/Makefile + install: all ${INSTALL} -m 755 -dir -idb tiff.man.tools ${MAN} - ${INSTALL} -m 755 -dir -idb tiff.man.tools ${MAN}/man1 - for i in ${MANTOOLS}; do \ - f=`basename $$i`; \ - ${INSTALL} -idb tiff.man.tools -m 444 -F ${MAN}/man1 \ - -src $$i -O $$f; \ - done - ${INSTALL} -m 755 -dir -idb tiff.man.dev ${MAN}/man3 - for i in ${MANDEV}; do \ - f=`basename $$i`; \ - ${INSTALL} -idb tiff.man.dev -m 444 -F ${MAN}/man3 \ - -src $$i -O $$f; \ - done - ${INSTALL} -idb tiff.man.dev -m 444 -F ${MAN}/man3 -O ${MANDEVLINKS} + ${INSTALL} -m 755 -dir -idb tiff.man.tools ${MAN}/${MANAPPS} + cd apps; ${MAKE} install + ${INSTALL} -m 755 -dir -idb tiff.man.dev ${MAN}/${MANLIB} + cd lib; ${MAKE} install clean: - ${RM} ${MANDEVLINKS} + rm -rf apps lib -TIFFComputeTile.3t:; ${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@ -TIFFCheckTile.3t:; ${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@ -TIFFNumberOfTiles.3t:; ${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@ -TIFFComputeStrip.3t:; ${ECHO} ".so ${MANDIR}TIFFstrip.3t" > $@ -TIFFNumberOfStrips.3t:; ${ECHO} ".so ${MANDIR}TIFFstrip.3t" > $@ -TIFFCurrentDirectory.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ -TIFFCurrentRow.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ -TIFFCurrentStrip.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ -TIFFCurrentTile.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ -TIFFFdOpen.3t:; ${ECHO} ".so ${MANDIR}TIFFOpen.3t" > $@ -TIFFFileName.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ -TIFFFileno.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ -TIFFFlushData.3t:; ${ECHO} ".so ${MANDIR}TIFFFlush.3t" > $@ -TIFFGetMode.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ -TIFFIsTiled.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ -TIFFIsByteSwapped.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ -TIFFIsUpSampled.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ -TIFFIsMSB2LSB.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ -TIFFLastDirectory.3t:; ${ECHO} ".so ${MANDIR}TIFFquery.3t" > $@ -TIFFReverseBits.3t:; ${ECHO} ".so ${MANDIR}TIFFswab.3t" > $@ -TIFFRGBAImageOK.3t:; ${ECHO} ".so ${MANDIR}TIFFRGBAImage.3t" > $@ -TIFFRGBAImageBegin.3t:; ${ECHO} ".so ${MANDIR}TIFFRGBAImage.3t" > $@ -TIFFRGBAImageGet.3t:; ${ECHO} ".so ${MANDIR}TIFFRGBAImage.3t" > $@ -TIFFRGBAImageEnd.3t:; ${ECHO} ".so ${MANDIR}TIFFRGBAImage.3t" > $@ -TIFFSetErrorHandler.3t:; ${ECHO} ".so ${MANDIR}TIFFError.3t" > $@ -TIFFSetSubDirectory.3t:; ${ECHO} ".so ${MANDIR}TIFFSetDirectory.3t" > $@ -TIFFSetWarningHandler.3t:; ${ECHO} ".so ${MANDIR}TIFFWarning.3t" > $@ -TIFFSwabArrayOfLong.3t:; ${ECHO} ".so ${MANDIR}TIFFswab.3t" > $@ -TIFFSwabArrayOfShort.3t:; ${ECHO} ".so ${MANDIR}TIFFswab.3t" > $@ -TIFFSwabLong.3t:; ${ECHO} ".so ${MANDIR}TIFFswab.3t" > $@ -TIFFSwabShort.3t:; ${ECHO} ".so ${MANDIR}TIFFswab.3t" > $@ -TIFFScanlineSize.3t:; ${ECHO} ".so ${MANDIR}TIFFsize.3t" > $@ -TIFFRasterScanlineSize.3t:; ${ECHO} ".so ${MANDIR}TIFFsize.3t" > $@ -TIFFDefaultStripSize.3t:; ${ECHO} ".so ${MANDIR}TIFFstrip.3t" > $@ -TIFFStripSize.3t:; ${ECHO} ".so ${MANDIR}TIFFstrip.3t" > $@ -TIFFVStripSize.3t:; ${ECHO} ".so ${MANDIR}TIFFstrip.3t" > $@ -TIFFTileSize.3t:; ${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@ -TIFFVTileSize.3t:; ${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@ -TIFFDefaultTileSize.3t:; ${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@ -TIFFTileRowSize.3t:; ${ECHO} ".so ${MANDIR}TIFFtile.3t" > $@ -TIFFVGetField.3t:; ${ECHO} ".so ${MANDIR}TIFFGetField.3t" > $@ -TIFFVSetField.3t:; ${ECHO} ".so ${MANDIR}TIFFSetField.3t" > $@ -TIFFFindCODEC.3t:; ${ECHO} ".so ${MANDIR}TIFFcodec.3t" > $@ -TIFFRegisterCODEC.3t:; ${ECHO} ".so ${MANDIR}TIFFcodec.3t" > $@ -TIFFUnRegisterCODEC.3t:; ${ECHO} ".so ${MANDIR}TIFFcodec.3t" > $@ -TIFFmalloc.3t:; ${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@ -TIFFrealloc.3t:; ${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@ -TIFFfree.3t:; ${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@ -TIFFmemset.3t:; ${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@ -TIFFmemcpy.3t:; ${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@ -TIFFmemcmp.3t:; ${ECHO} ".so ${MANDIR}TIFFmemory.3t" > $@ -TIFFReadBufferSetup.3t:; ${ECHO} ".so ${MANDIR}TIFFbuffer.3t" > $@ -TIFFWriteBufferSetup.3t:; ${ECHO} ".so ${MANDIR}TIFFbuffer.3t" > $@ +# +# Miscellaneous junk left over... +# links: ${MANDEVLINKS} diff --git a/port/Makefile.in b/port/Makefile.in index f7da0136..13893578 100644 --- a/port/Makefile.in +++ b/port/Makefile.in @@ -1,5 +1,5 @@ #! smake -# $Header: /usr/people/sam/tiff/port/RCS/Makefile.in,v 1.5 1996/02/09 05:54:37 sam Exp $ +# $Header: /usr/people/sam/tiff/port/RCS/Makefile.in,v 1.6 1996/03/18 20:55:51 sam Exp $ # # @WARNING@ # @@ -27,10 +27,8 @@ # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE # OF THIS SOFTWARE. # -DEPTH = .. - -SRCDIR = ${DEPTH}/@SRCDIR@/port -VPATH = ../@SRCDIR@/port +SRCDIR = @RELSRCDIR@/port +VPATH = @RELSRCDIR@/port # # VERSION: @VERSION@ diff --git a/tools/Makefile.in b/tools/Makefile.in index 5d99c54b..2ae6bfba 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -1,4 +1,4 @@ -# $Header: /usr/people/sam/tiff/tools/RCS/Makefile.in,v 1.17 1996/02/09 05:55:00 sam Exp $ +# $Header: /usr/people/sam/tiff/tools/RCS/Makefile.in,v 1.18 1996/03/18 20:56:15 sam Exp $ # # @WARNING@ # @@ -27,8 +27,9 @@ # OF THIS SOFTWARE. # DEPTH = .. -SRCDIR = ${DEPTH}/@SRCDIR@/tools -LIBDIR = ${DEPTH}/@SRCDIR@/libtiff + +SRCDIR = @RELSRCDIR@/tools +LIBDIR = @RELSRCDIR@/libtiff # # VERSION: @VERSION@ diff --git a/tools/ppm2tiff.c b/tools/ppm2tiff.c index c57a4f6a..4359d0d4 100644 --- a/tools/ppm2tiff.c +++ b/tools/ppm2tiff.c @@ -1,4 +1,4 @@ -/* $Header: /usr/people/sam/tiff/tools/RCS/ppm2tiff.c,v 1.24 1996/01/10 19:35:29 sam Exp $ */ +/* $Header: /usr/people/sam/tiff/tools/RCS/ppm2tiff.c,v 1.25 1996/03/19 16:57:54 sam Exp $ */ /* * Copyright (c) 1991-1996 Sam Leffler @@ -40,7 +40,7 @@ #define streq(a,b) (strcmp(a,b) == 0) #define strneq(a,b,n) (strncmp(a,b,n) == 0) -static uint16 compression = (uint16) -1; +static uint16 compression = COMPRESSION_LZW; static uint16 predictor = 0; static int quality = 75; /* JPEG quality */ static int jpegcolormode = JPEGCOLORMODE_RGB; |