--- ./man/Makefile.in Wed Sep 26 13:32:24 2001 +++ ../tiff-v3.5.7/./man/Makefile.in Fri Sep 27 16:34:51 2002 @@ -1,4 +1,4 @@ -#! smake +#! gmake # $Header: /cvsroot/osrs/libtiff/man/Makefile.in,v 1.10 2001/09/26 17:32:24 warmerda Exp $ # # @WARNING@ @@ -27,7 +27,7 @@ # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE # OF THIS SOFTWARE. # -SRCDIR = @RELSRCDIR@/man +override SRCDIR = @RELSRCDIR@/man # # VERSION: @VERSION@ --- ./html/Makefile.in Tue Jul 17 09:13:37 2001 +++ ../tiff-v3.5.7/./html/Makefile.in Fri Sep 27 16:34:01 2002 @@ -28,7 +28,7 @@ # DEPTH = .. -SRCDIR = ${DEPTH}/@SRCDIR@/html +override SRCDIR = ${DEPTH}/@SRCDIR@/html VPATH = ../@SRCDIR@/html PORT = ${DEPTH}/port --- ./port/Makefile.in Thu Apr 5 23:02:33 2001 +++ ../tiff-v3.5.7/./port/Makefile.in Fri Sep 27 16:34:47 2002 @@ -1,4 +1,4 @@ -#! smake +#! gmake # $Header: /cvsroot/osrs/libtiff/port/Makefile.in,v 1.3 2001/04/06 03:02:33 warmerda Exp $ # # @WARNING@ @@ -27,7 +27,7 @@ # LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE # OF THIS SOFTWARE. # -SRCDIR = @RELSRCDIR@/port +override SRCDIR = @RELSRCDIR@/port VPATH = @RELSRCDIR@/port # --- ./Makefile.in Wed Nov 28 12:00:35 2001 +++ ../tiff-v3.5.7/./Makefile.in Fri Sep 27 16:34:41 2002 @@ -1,4 +1,4 @@ -#! smake +#! gmake # $Header: /cvsroot/osrs/libtiff/Makefile.in,v 1.25 2001/11/23 16:15:35 warmerda Exp $ # # @WARNING@ @@ -28,7 +28,7 @@ # OF THIS SOFTWARE. # -SRCDIR = @SRCDIR@ +override SRCDIR = @SRCDIR@ # # VERSION: @VERSION@ --- ./libtiff/Makefile.in Sun Sep 9 11:56:04 2001 +++ ../tiff-v3.5.7/./libtiff/Makefile.in Fri Sep 27 16:33:37 2002 @@ -25,7 +25,7 @@ # OF THIS SOFTWARE. # -SRCDIR = @LIBSRCDIR@ +override SRCDIR = @LIBSRCDIR@ # # VERSION: @VERSION@ @@ -164,13 +164,13 @@ # default IRIX DSO building rule IRIXdso: ${OBJS} - @if [ "`basename ${CC}`" = "gcc" ]; then \ - ${LD} -n32 @ENVOPTS@ -o libtiff.@DSOSUF@ -shared -rdata_shared \ + if [ "`basename ${CC}`" = "gcc" ]; then \ + ${LD} @ENVOPTS@ -o libtiff.@DSOSUF@ -shared -rdata_shared \ ${OBJS}; \ else \ - ${CC} @ENVOPTS@ -o libtiff.@DSOSUF@ -shared -rdata_shared \ - -check_registry ${SRCDIR}/../port/irix/so_locations \ - -quickstart_info \ + ${CC} @ENVOPTS@ -o libtiff.@DSOSUF@ -shared -Wl,-rdata_shared \ + -Wl,-check_registry,${SRCDIR}/../port/irix/so_locations \ + -Wl,-quickstart_info -Wl,-set_version,sgi1.1 \ ${OBJS} @LIBJPEG@ @LIBGZ@; \ fi touch $@ @@ -254,7 +254,7 @@ ${SRCDIR}/tiffvers.h: ${VERSION} ${SRCDIR}/mkversion.c ${CC} -o mkversion ${CFLAGS} ${SRCDIR}/mkversion.c rm -f ${SRCDIR}/tiffvers.h - ./mkversion -v ${VERSION} ${SRCDIR}/tiffvers.h + ./mkversion -v ${VERSION} -r `dirname ${VERSION}`/RELEASE-DATE -a `dirname ${VERSION}`/dist/tiff.alpha ${SRCDIR}/tiffvers.h # # The finite state machine tables used by the G3/G4 decoders @@ -261,9 +261,9 @@ # are generated by the mkg3states program. On systems without # make these rules have to be manually carried out. # -tif_fax3sm.c: ${SRCDIR}/mkg3states.c ${SRCDIR}/tif_fax3.h +${SRCDIR}/tif_fax3sm.c: ${SRCDIR}/mkg3states.c ${SRCDIR}/tif_fax3.h ${CC} -o mkg3states ${CFLAGS} ${SRCDIR}/mkg3states.c - rm -f tif_fax3sm.c; ./mkg3states -c const tif_fax3sm.c + rm -f ${SRCDIR}/tif_fax3sm.c; ./mkg3states -c const ${SRCDIR}/tif_fax3sm.c tif_aux.o: ${SRCDIR}/tif_aux.c ${CC} -c ${CFLAGS} ${SRCDIR}/tif_aux.c @@ -287,6 +287,8 @@ ${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_fax3sm.o: ${SRCDIR}/tif_fax3sm.c ${SRCDIR}/tif_fax3.h + ${CC} -c ${CFLAGS} ${SRCDIR}/tif_fax3sm.c tif_getimage.o: ${SRCDIR}/tif_getimage.c ${CC} -c ${CFLAGS} ${SRCDIR}/tif_getimage.c tif_jpeg.o: ${SRCDIR}/tif_jpeg.c @DEPEND_JPEGLIB@ @@ -299,6 +301,8 @@ ${CC} -c ${CFLAGS} ${SRCDIR}/tif_lzw.c tif_next.o: ${SRCDIR}/tif_next.c ${CC} -c ${CFLAGS} ${SRCDIR}/tif_next.c +tif_ojpeg.o: ${SRCDIR}/tif_ojpeg.c + ${CC} -c ${CFLAGS} ${SRCDIR}/tif_ojpeg.c tif_open.o: ${SRCDIR}/tif_open.c ${CC} -c ${CFLAGS} ${SRCDIR}/tif_open.c tif_packbits.o: ${SRCDIR}/tif_packbits.c --- ./libtiff/tif_getimage.c Mon Sep 24 15:40:37 2001 +++ ../tiff-v3.5.7/./libtiff/tif_getimage.c Fri Sep 27 16:32:00 2002 @@ -472,7 +472,7 @@ y = setorientation(img, h); orientation = img->orientation; toskew = -(int32) (orientation == ORIENTATION_TOPLEFT ? tw+w : tw-w); - for (row = 0; row < h; row += nrow) + for (row = 0; row < h; row += nrow) { rowstoread = th - (row + img->row_offset) % th; nrow = (row + rowstoread > h ? h - row : rowstoread); @@ -522,7 +522,7 @@ TIFF* tif = img->tif; tileSeparateRoutine put = img->put.separate; uint16 orientation; - uint32 col, row, y, rowstoread; + uint32 col, row, y, rowstoread; uint32 pos; uint32 tw, th; u_char* buf; --- ./libtiff/tif_print.c Thu Mar 1 23:59:52 2001 +++ ../tiff-v3.5.7/./libtiff/tif_print.c Fri Sep 27 16:32:00 2002 @@ -72,7 +72,7 @@ uint16 i; long l, n; - fprintf(fd, "TIFF Directory at offset 0x%lx\n", tif->tif_diroff); + fprintf(fd, "TIFF Directory at offset 0x%lx\n", (u_long) tif->tif_diroff); td = &tif->tif_dir; if (TIFFFieldSet(tif,FIELD_SUBFILETYPE)) { fprintf(fd, " Subfile Type:"); --- ./libtiff/tif_lzw.c Mon Sep 24 21:59:13 2001 +++ ../tiff-v3.5.7/./libtiff/tif_lzw.c Fri Sep 27 16:32:00 2002 @@ -1,4 +1,4 @@ -/* $Header: /cvsroot/osrs/libtiff/libtiff/tif_lzw.c,v 1.9 2001/09/25 01:59:13 warmerda Exp $ */ +/* $Header: /cvsroot/libtiff-lzw-compression-kit/tif_lzw.c,v 1.2 2001/09/25 02:14:31 warmerda Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -97,6 +97,8 @@ u_short free_ent; /* next free entry in hash table */ long nextdata; /* next bits of i/o */ long nextbits; /* # of valid bits in lzw_nextdata */ + + int rw_mode; /* preserve rw_mode from init */ } LZWBaseState; #define lzw_nbits base.nbits @@ -388,7 +390,7 @@ NextCode(tif, sp, bp, code, GetNextCode); if (code == CODE_EOI) break; - *op++ = (char)code, occ--; + *op++ = code, occ--; oldcodep = sp->dec_codetab + code; continue; } @@ -453,7 +455,7 @@ } op += len, occ -= len; } else - *op++ = (char)code, occ--; + *op++ = code, occ--; } tif->tif_rawcp = (tidata_t) bp; @@ -637,15 +639,310 @@ } #endif /* LZW_COMPAT */ +/* + * LZW Encoding. + */ + +static int +LZWSetupEncode(TIFF* tif) +{ + LZWEncodeState* sp = EncoderState(tif); + static const char module[] = "LZWSetupEncode"; + + assert(sp != NULL); + sp->enc_hashtab = (hash_t*) _TIFFmalloc(HSIZE*sizeof (hash_t)); + if (sp->enc_hashtab == NULL) { + TIFFError(module, "No space for LZW hash table"); + return (0); + } + return (1); +} + +/* + * Reset encoding state at the start of a strip. + */ +static int +LZWPreEncode(TIFF* tif, tsample_t s) +{ + LZWEncodeState *sp = EncoderState(tif); + + (void) s; + assert(sp != NULL); + sp->lzw_nbits = BITS_MIN; + sp->lzw_maxcode = MAXCODE(BITS_MIN); + sp->lzw_free_ent = CODE_FIRST; + sp->lzw_nextbits = 0; + sp->lzw_nextdata = 0; + sp->enc_checkpoint = CHECK_GAP; + sp->enc_ratio = 0; + sp->enc_incount = 0; + sp->enc_outcount = 0; + /* + * The 4 here insures there is space for 2 max-sized + * codes in LZWEncode and LZWPostDecode. + */ + sp->enc_rawlimit = tif->tif_rawdata + tif->tif_rawdatasize-1 - 4; + cl_hash(sp); /* clear hash table */ + sp->enc_oldcode = (hcode_t) -1; /* generates CODE_CLEAR in LZWEncode */ + return (1); +} + +#define CALCRATIO(sp, rat) { \ + if (incount > 0x007fffff) { /* NB: shift will overflow */\ + rat = outcount >> 8; \ + rat = (rat == 0 ? 0x7fffffff : incount/rat); \ + } else \ + rat = (incount<<8) / outcount; \ +} +#define PutNextCode(op, c) { \ + nextdata = (nextdata << nbits) | c; \ + nextbits += nbits; \ + *op++ = (u_char)(nextdata >> (nextbits-8)); \ + nextbits -= 8; \ + if (nextbits >= 8) { \ + *op++ = (u_char)(nextdata >> (nextbits-8)); \ + nextbits -= 8; \ + } \ + outcount += nbits; \ +} + +/* + * Encode a chunk of pixels. + * + * Uses an open addressing double hashing (no chaining) on the + * prefix code/next character combination. We do a variant of + * Knuth's algorithm D (vol. 3, sec. 6.4) along with G. Knott's + * relatively-prime secondary probe. Here, the modular division + * first probe is gives way to a faster exclusive-or manipulation. + * Also do block compression with an adaptive reset, whereby the + * code table is cleared when the compression ratio decreases, + * but after the table fills. The variable-length output codes + * are re-sized at this point, and a CODE_CLEAR is generated + * for the decoder. + */ +static int +LZWEncode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s) +{ + register LZWEncodeState *sp = EncoderState(tif); + register long fcode; + register hash_t *hp; + register int h, c; + hcode_t ent; + long disp; + long incount, outcount, checkpoint; + long nextdata, nextbits; + int free_ent, maxcode, nbits; + tidata_t op, limit; + + (void) s; + if (sp == NULL) + return (0); + /* + * Load local state. + */ + incount = sp->enc_incount; + outcount = sp->enc_outcount; + checkpoint = sp->enc_checkpoint; + nextdata = sp->lzw_nextdata; + nextbits = sp->lzw_nextbits; + free_ent = sp->lzw_free_ent; + maxcode = sp->lzw_maxcode; + nbits = sp->lzw_nbits; + op = tif->tif_rawcp; + limit = sp->enc_rawlimit; + ent = sp->enc_oldcode; + + if (ent == (hcode_t) -1 && cc > 0) { + /* + * NB: This is safe because it can only happen + * at the start of a strip where we know there + * is space in the data buffer. + */ + PutNextCode(op, CODE_CLEAR); + ent = *bp++; cc--; incount++; + } + while (cc > 0) { + c = *bp++; cc--; incount++; + fcode = ((long)c << BITS_MAX) + ent; + h = (c << HSHIFT) ^ ent; /* xor hashing */ +#ifdef _WINDOWS + /* + * Check hash index for an overflow. + */ + if (h >= HSIZE) + h -= HSIZE; +#endif + hp = &sp->enc_hashtab[h]; + if (hp->hash == fcode) { + ent = hp->code; + continue; + } + if (hp->hash >= 0) { + /* + * Primary hash failed, check secondary hash. + */ + disp = HSIZE - h; + if (h == 0) + disp = 1; + do { + /* + * Avoid pointer arithmetic 'cuz of + * wraparound problems with segments. + */ + if ((h -= disp) < 0) + h += HSIZE; + hp = &sp->enc_hashtab[h]; + if (hp->hash == fcode) { + ent = hp->code; + goto hit; + } + } while (hp->hash >= 0); + } + /* + * New entry, emit code and add to table. + */ + /* + * Verify there is space in the buffer for the code + * and any potential Clear code that might be emitted + * below. The value of limit is setup so that there + * are at least 4 bytes free--room for 2 codes. + */ + if (op > limit) { + tif->tif_rawcc = (tsize_t)(op - tif->tif_rawdata); + TIFFFlushData1(tif); + op = tif->tif_rawdata; + } + PutNextCode(op, ent); + ent = c; + hp->code = free_ent++; + hp->hash = fcode; + if (free_ent == CODE_MAX-1) { + /* table is full, emit clear code and reset */ + cl_hash(sp); + sp->enc_ratio = 0; + incount = 0; + outcount = 0; + free_ent = CODE_FIRST; + PutNextCode(op, CODE_CLEAR); + nbits = BITS_MIN; + maxcode = MAXCODE(BITS_MIN); + } else { + /* + * If the next entry is going to be too big for + * the code size, then increase it, if possible. + */ + if (free_ent > maxcode) { + nbits++; + assert(nbits <= BITS_MAX); + maxcode = (int) MAXCODE(nbits); + } else if (incount >= checkpoint) { + long rat; + /* + * Check compression ratio and, if things seem + * to be slipping, clear the hash table and + * reset state. The compression ratio is a + * 24+8-bit fractional number. + */ + checkpoint = incount+CHECK_GAP; + CALCRATIO(sp, rat); + if (rat <= sp->enc_ratio) { + cl_hash(sp); + sp->enc_ratio = 0; + incount = 0; + outcount = 0; + free_ent = CODE_FIRST; + PutNextCode(op, CODE_CLEAR); + nbits = BITS_MIN; + maxcode = MAXCODE(BITS_MIN); + } else + sp->enc_ratio = rat; + } + } + hit: + ; + } + + /* + * Restore global state. + */ + sp->enc_incount = incount; + sp->enc_outcount = outcount; + sp->enc_checkpoint = checkpoint; + sp->enc_oldcode = ent; + sp->lzw_nextdata = nextdata; + sp->lzw_nextbits = nextbits; + sp->lzw_free_ent = free_ent; + sp->lzw_maxcode = maxcode; + sp->lzw_nbits = nbits; + tif->tif_rawcp = op; + return (1); +} + +/* + * Finish off an encoded strip by flushing the last + * string and tacking on an End Of Information code. + */ +static int +LZWPostEncode(TIFF* tif) +{ + register LZWEncodeState *sp = EncoderState(tif); + tidata_t op = tif->tif_rawcp; + long nextbits = sp->lzw_nextbits; + long nextdata = sp->lzw_nextdata; + long outcount = sp->enc_outcount; + int nbits = sp->lzw_nbits; + + if (op > sp->enc_rawlimit) { + tif->tif_rawcc = (tsize_t)(op - tif->tif_rawdata); + TIFFFlushData1(tif); + op = tif->tif_rawdata; + } + if (sp->enc_oldcode != (hcode_t) -1) { + PutNextCode(op, sp->enc_oldcode); + sp->enc_oldcode = (hcode_t) -1; + } + PutNextCode(op, CODE_EOI); + if (nextbits > 0) + *op++ = (u_char)(nextdata << (8-nextbits)); + tif->tif_rawcc = (tsize_t)(op - tif->tif_rawdata); + return (1); +} + +/* + * Reset encoding hash table. + */ +static void +cl_hash(LZWEncodeState* sp) +{ + register hash_t *hp = &sp->enc_hashtab[HSIZE-1]; + register long i = HSIZE-8; + do { + i -= 8; + hp[-7].hash = -1; + hp[-6].hash = -1; + hp[-5].hash = -1; + hp[-4].hash = -1; + hp[-3].hash = -1; + hp[-2].hash = -1; + hp[-1].hash = -1; + hp[ 0].hash = -1; + hp -= 8; + } while (i >= 0); + for (i += 8; i > 0; i--, hp--) + hp->hash = -1; +} static void LZWCleanup(TIFF* tif) { if (tif->tif_data) { - if (tif->tif_mode == O_RDONLY) { + if (LZWState(tif)->rw_mode == O_RDONLY) { if (DecoderState(tif)->dec_codetab) _TIFFfree(DecoderState(tif)->dec_codetab); + } else { + if (EncoderState(tif)->enc_hashtab) + _TIFFfree(EncoderState(tif)->enc_hashtab); } _TIFFfree(tif->tif_data); tif->tif_data = NULL; @@ -652,14 +949,6 @@ } } -static int -LZWSetupEncode(TIFF* tif) -{ - TIFFError(tif->tif_name, - "LZW compression is not available to due to Unisys patent enforcement"); - return (0); -} - int TIFFInitLZW(TIFF* tif, int scheme) { @@ -667,34 +956,41 @@ /* * Allocate state block so tag methods have storage to record values. */ - if (tif->tif_mode == O_RDONLY) - { - tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (LZWDecodeState)); - if (tif->tif_data == NULL) - goto bad; - DecoderState(tif)->dec_codetab = NULL; - DecoderState(tif)->dec_decode = NULL; - } + if (tif->tif_mode == O_RDONLY) { + tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (LZWDecodeState)); + if (tif->tif_data == NULL) + goto bad; + DecoderState(tif)->dec_codetab = NULL; + DecoderState(tif)->dec_decode = NULL; + } else { + tif->tif_data = (tidata_t) _TIFFmalloc(sizeof (LZWEncodeState)); + if (tif->tif_data == NULL) + goto bad; + EncoderState(tif)->enc_hashtab = NULL; + } + LZWState(tif)->rw_mode = tif->tif_mode; + /* * Install codec methods. */ - tif->tif_setupencode = LZWSetupEncode; tif->tif_setupdecode = LZWSetupDecode; tif->tif_predecode = LZWPreDecode; tif->tif_decoderow = LZWDecode; tif->tif_decodestrip = LZWDecode; tif->tif_decodetile = LZWDecode; + tif->tif_setupencode = LZWSetupEncode; + tif->tif_preencode = LZWPreEncode; + tif->tif_postencode = LZWPostEncode; + tif->tif_encoderow = LZWEncode; + tif->tif_encodestrip = LZWEncode; + tif->tif_encodetile = LZWEncode; tif->tif_cleanup = LZWCleanup; - /* * Setup predictor setup. */ - if( tif->tif_mode == O_RDONLY ) - (void) TIFFPredictorInit(tif); - - return (1); - + (void) TIFFPredictorInit(tif); + return (1); bad: TIFFError("TIFFInitLZW", "No space for LZW state block"); return (0); --- ./tools/Makefile.in Tue Jul 17 09:13:37 2001 +++ ../tiff-v3.5.7/./tools/Makefile.in Fri Sep 27 16:33:29 2002 @@ -28,7 +28,7 @@ # DEPTH = .. -SRCDIR = @RELSRCDIR@/tools +override SRCDIR = @RELSRCDIR@/tools LIBDIR = @RELSRCDIR@/libtiff # @@ -45,7 +45,7 @@ # COPTS = @GCOPTS@ OPTIMIZER=@OPTIMIZER@ -IPATH = -I. -I${SRCDIR} -I${LIBDIR} +IPATH = -I. -I${SRCDIR} -I${LIBDIR} -I${DEPTH}/libtiff CFLAGS = @ENVOPTS@ ${COPTS} ${OPTIMIZER} ${IPATH} # TIFFLIB = ${DEPTH}/libtiff/libtiff.@DSOSUF@ @@ -266,6 +266,6 @@ ${CC} -c ${CFLAGS} ${SRCDIR}/sgigt.c tiffsv: sgisv.o ${TIFFLIB} - ${CC} -o tiffsv ${CFLAGS} sgisv.o -lgutil -lgl ${LIBS} + ${CC} -o tiffsv ${CFLAGS} sgisv.o -lgl ${LIBS} sgisv.o: ${SRCDIR}/sgisv.c ${CC} -c ${CFLAGS} ${SRCDIR}/sgisv.c --- ./tools/tiffset.c Wed Sep 26 13:42:18 2001 +++ ../tiff-v3.5.7/./tools/tiffset.c Fri Sep 27 16:32:00 2002 @@ -86,7 +86,8 @@ if( id < 1 ) { - fprintf( stderr, "Field name %s not recognised.\n" ); + fprintf( stderr, "Field name %s not recognised.\n", + argv[arg_index+1] ); exit( -3 ); } @@ -112,7 +113,8 @@ if( id < 1 ) { - fprintf( stderr, "Field name %s not recognised.\n" ); + fprintf( stderr, "Field name %s not recognised.\n", + argv[arg_index+1] ); exit( -3 ); } --- ./tools/tiffcp.c Thu Jun 7 10:38:40 2001 +++ ../tiff-v3.5.7/./tools/tiffcp.c Fri Sep 27 16:32:00 2002 @@ -95,7 +95,7 @@ if (**imageSpec) if (**imageSpec == comma) { /* a trailing comma denotes remaining images in sequence */ - if ((*imageSpec)[1] == '\0') *imageSpec == NULL; + if ((*imageSpec)[1] == '\0') *imageSpec = NULL; }else{ fprintf (stderr, "Expected a %c separated image # list after %s\n", --- ./contrib/mac-mpw/port.make Tue Jul 27 17:50:27 1999 +++ ../tiff-v3.5.7/./contrib/mac-mpw/port.make Fri Sep 27 16:33:11 2002 @@ -24,7 +24,7 @@ # OF THIS SOFTWARE. # DEPTH= :: -SRCDIR= : +override SRCDIR= : NULL = CC = C --- ./contrib/dosdjgpp/Makefile.tools Tue Jul 27 17:50:27 1999 +++ ../tiff-v3.5.7/./contrib/dosdjgpp/Makefile.tools Fri Sep 27 16:33:04 2002 @@ -27,7 +27,7 @@ # OF THIS SOFTWARE. # DEPTH = .. -SRCDIR = . +override SRCDIR = . LIBDIR = ${DEPTH}/libtiff NULL = --- ./contrib/dosdjgpp/Makefile.top Tue Jul 27 17:50:27 1999 +++ ../tiff-v3.5.7/./contrib/dosdjgpp/Makefile.top Fri Sep 27 16:34:26 2002 @@ -1,4 +1,4 @@ -#! smake +#! gmake # $Header: /cvsroot/osrs/libtiff/contrib/dosdjgpp/Makefile.top,v 1.1.1.1 1999/07/27 21:50:27 mike Exp $ # # manually derived from Makefile.in (though basically nothing remains) @@ -41,7 +41,7 @@ # OF THIS SOFTWARE. # -SRCDIR = . +override SRCDIR = . all default: @${MAKE} -C libtiff --- ./contrib/dosdjgpp/Makefile.lib Tue Nov 30 14:42:34 1999 +++ ../tiff-v3.5.7/./contrib/dosdjgpp/Makefile.lib Fri Sep 27 16:32:45 2002 @@ -27,7 +27,7 @@ # OF THIS SOFTWARE. # -SRCDIR = . +override SRCDIR = . NULL = CC = gcc --- ./configure Thu Nov 15 12:21:05 2001 +++ ../tiff-v3.5.7/./configure Fri Sep 27 16:32:36 2002 @@ -170,10 +170,10 @@ esac done -DIR_BIN=${EPREFIX}/bin # destination for applications -DIR_LIB=${EPREFIX}/lib # destination for library -DIR_INC=${PREFIX}/include # destination for include files -DIR_HTML=${PREFIX}/doc/libtiff # destination for HTML files +DIR_BIN=${DIR_BIN:-$EPREFIX/bin} # destination for applications +DIR_LIB=${DIR_LIB:-$EPREFIX/lib} # destination for library +DIR_INC=${DIR_INC:-$PREFIX/include} # destination for include files +DIR_HTML=${DIR_HTML:-$PREFIX/doc/libtiff} # destination for HTML files if [ -n "$ac_prev" ]; then bitch "configure: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" @@ -502,7 +502,7 @@ if [ -z "${ENVOPTS-}" ]; then case $ISGCC-$TARGET in no-*-irix*) C_ANSI="-ansi";; - no-*-hp*) C_ANSI="-D_HPUX_SOURCE";; + no-*-hp*) C_ANSI="-D_HPUX_SRCDIR";; no-*-apollo-*) C_ANSI="-A nansi";; no-*-aix*) C_ANSI="-Dunix -qlanglvl=ansi -qsrcmsg -qmaxmem=8192";; *-sco*) C_ANSI="-Dsco";; @@ -948,7 +948,7 @@ { echo 'main() { int one = 1; char* cp = (char*)&one; exit(*cp!=0); }'>t.c capture cat t.c - runMake t "t:; ${CCOMPILER} ${ENVOPTS} t.c" && ./a.out + runMake t "t:; ${CCOMPILER} t.c" && ./a.out } #