summaryrefslogtreecommitdiff
path: root/tiff
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2016-11-21 10:03:24 +0000
committerChris Liddell <chris.liddell@artifex.com>2016-11-22 09:49:30 +0000
commit5b87f18df814aaa9f0036c843a4b24b1638aa4cf (patch)
tree5b68890c5bee779b5921b25823ea2b8a1b473880 /tiff
parent6655712ee1d0bf2a7818044613bbed226b7abddd (diff)
downloadghostpdl-5b87f18df814aaa9f0036c843a4b24b1638aa4cf.tar.gz
libtiff: update to 4.0.7
Add in portability changes to tiffiop.h Portability tiffiop.h Remove globals from tif_pixarlog.c
Diffstat (limited to 'tiff')
-rw-r--r--tiff/CMakeLists.txt764
-rw-r--r--tiff/ChangeLog2454
-rw-r--r--tiff/HOWTO-RELEASE45
-rw-r--r--tiff/Makefile.am38
-rw-r--r--tiff/Makefile.in394
-rw-r--r--tiff/RELEASE-DATE2
-rw-r--r--tiff/VERSION2
-rw-r--r--tiff/aclocal.m4727
-rw-r--r--tiff/build/CMakeLists.txt25
-rw-r--r--tiff/build/Makefile.am4
-rw-r--r--tiff/build/Makefile.in291
-rwxr-xr-xtiff/config/compile245
-rwxr-xr-xtiff/config/depcomp601
-rw-r--r--tiff/config/ltmain.sh173
-rwxr-xr-xtiff/config/missing460
-rwxr-xr-xtiff/config/test-driver127
-rwxr-xr-xtiff/configure4443
-rw-r--r--tiff/configure.ac119
-rw-r--r--tiff/configure.com14
-rw-r--r--tiff/contrib/CMakeLists.txt35
-rw-r--r--tiff/contrib/Makefile.am4
-rw-r--r--tiff/contrib/Makefile.in291
-rw-r--r--tiff/contrib/addtiffo/CMakeLists.txt34
-rw-r--r--tiff/contrib/addtiffo/Makefile.am7
-rw-r--r--tiff/contrib/addtiffo/Makefile.in210
-rw-r--r--tiff/contrib/addtiffo/addtiffo.c11
-rw-r--r--tiff/contrib/addtiffo/tif_overview.c21
-rw-r--r--tiff/contrib/addtiffo/tif_ovrcache.c23
-rw-r--r--tiff/contrib/dbs/CMakeLists.txt43
-rw-r--r--tiff/contrib/dbs/Makefile.am6
-rw-r--r--tiff/contrib/dbs/Makefile.in301
-rw-r--r--tiff/contrib/dbs/xtiff/CMakeLists.txt29
-rw-r--r--tiff/contrib/dbs/xtiff/Makefile.am7
-rw-r--r--tiff/contrib/dbs/xtiff/Makefile.in120
-rw-r--r--tiff/contrib/dbs/xtiff/xtiff.c6
-rw-r--r--tiff/contrib/iptcutil/CMakeLists.txt35
-rw-r--r--tiff/contrib/iptcutil/Makefile.am8
-rw-r--r--tiff/contrib/iptcutil/Makefile.in211
-rw-r--r--tiff/contrib/iptcutil/iptcutil.c761
-rw-r--r--tiff/contrib/mfs/CMakeLists.txt27
-rw-r--r--tiff/contrib/mfs/Makefile.am6
-rw-r--r--tiff/contrib/mfs/Makefile.in118
-rw-r--r--tiff/contrib/pds/CMakeLists.txt30
-rw-r--r--tiff/contrib/pds/Makefile.am9
-rw-r--r--tiff/contrib/pds/Makefile.in121
-rw-r--r--tiff/contrib/ras/CMakeLists.txt28
-rw-r--r--tiff/contrib/ras/Makefile.am7
-rw-r--r--tiff/contrib/ras/Makefile.in119
-rw-r--r--tiff/contrib/stream/CMakeLists.txt28
-rw-r--r--tiff/contrib/stream/Makefile.am7
-rw-r--r--tiff/contrib/stream/Makefile.in119
-rw-r--r--tiff/contrib/tags/CMakeLists.txt32
-rw-r--r--tiff/contrib/tags/Makefile.am10
-rw-r--r--tiff/contrib/tags/Makefile.in122
-rw-r--r--tiff/contrib/win_dib/CMakeLists.txt30
-rw-r--r--tiff/contrib/win_dib/Makefile.am9
-rw-r--r--tiff/contrib/win_dib/Makefile.in121
-rw-r--r--tiff/html/CMakeLists.txt87
-rw-r--r--tiff/html/Makefile.am12
-rw-r--r--tiff/html/Makefile.in308
-rw-r--r--tiff/html/addingtags.html2
-rw-r--r--tiff/html/bugs.html12
-rw-r--r--tiff/html/build.html327
-rw-r--r--tiff/html/contrib.html2
-rw-r--r--tiff/html/document.html6
-rw-r--r--tiff/html/images.html6
-rw-r--r--tiff/html/images/CMakeLists.txt46
-rw-r--r--tiff/html/images/Makefile.am3
-rw-r--r--tiff/html/images/Makefile.in124
-rw-r--r--tiff/html/index.html21
-rw-r--r--tiff/html/internals.html2
-rw-r--r--tiff/html/intro.html2
-rw-r--r--tiff/html/libtiff.html4
-rw-r--r--tiff/html/man/CMakeLists.txt110
-rw-r--r--tiff/html/man/HtmlDoc.cmake50
-rw-r--r--tiff/html/man/Makefile.am15
-rw-r--r--tiff/html/man/Makefile.in137
-rw-r--r--tiff/html/man/TIFFClose.3tiff.html2
-rw-r--r--tiff/html/man/TIFFDataWidth.3tiff.html2
-rw-r--r--tiff/html/man/TIFFError.3tiff.html2
-rw-r--r--tiff/html/man/TIFFFieldDataType.3tiff.html89
-rw-r--r--tiff/html/man/TIFFFieldName.3tiff.html86
-rw-r--r--tiff/html/man/TIFFFieldPassCount.3tiff.html98
-rw-r--r--tiff/html/man/TIFFFieldReadCount.3tiff.html101
-rw-r--r--tiff/html/man/TIFFFieldTag.3tiff.html88
-rw-r--r--tiff/html/man/TIFFFieldWriteCount.3tiff.html108
-rw-r--r--tiff/html/man/TIFFFlush.3tiff.html2
-rw-r--r--tiff/html/man/TIFFGetField.3tiff.html2
-rw-r--r--tiff/html/man/TIFFRGBAImage.3tiff.html2
-rw-r--r--tiff/html/man/TIFFReadDirectory.3tiff.html2
-rw-r--r--tiff/html/man/TIFFReadEncodedStrip.3tiff.html2
-rw-r--r--tiff/html/man/TIFFReadEncodedTile.3tiff.html2
-rw-r--r--tiff/html/man/TIFFReadRGBAImage.3tiff.html2
-rw-r--r--tiff/html/man/TIFFReadRGBAStrip.3tiff.html2
-rw-r--r--tiff/html/man/TIFFReadRGBATile.3tiff.html2
-rw-r--r--tiff/html/man/TIFFReadRawStrip.3tiff.html2
-rw-r--r--tiff/html/man/TIFFReadRawTile.3tiff.html2
-rw-r--r--tiff/html/man/TIFFReadScanline.3tiff.html2
-rw-r--r--tiff/html/man/TIFFReadTile.3tiff.html2
-rw-r--r--tiff/html/man/TIFFSetDirectory.3tiff.html2
-rw-r--r--tiff/html/man/TIFFSetField.3tiff.html2
-rw-r--r--tiff/html/man/TIFFWarning.3tiff.html4
-rw-r--r--tiff/html/man/TIFFWriteDirectory.3tiff.html2
-rw-r--r--tiff/html/man/TIFFWriteEncodedStrip.3tiff.html2
-rw-r--r--tiff/html/man/TIFFWriteEncodedTile.3tiff.html2
-rw-r--r--tiff/html/man/TIFFWriteRawStrip.3tiff.html2
-rw-r--r--tiff/html/man/TIFFWriteRawTile.3tiff.html2
-rw-r--r--tiff/html/man/TIFFWriteScanline.3tiff.html2
-rw-r--r--tiff/html/man/TIFFWriteTile.3tiff.html2
-rw-r--r--tiff/html/man/TIFFbuffer.3tiff.html2
-rw-r--r--tiff/html/man/TIFFcodec.3tiff.html2
-rw-r--r--tiff/html/man/TIFFcolor.3tiff.html2
-rw-r--r--tiff/html/man/TIFFmemory.3tiff.html2
-rw-r--r--tiff/html/man/TIFFsize.3tiff.html2
-rw-r--r--tiff/html/man/TIFFstrip.3tiff.html2
-rw-r--r--tiff/html/man/TIFFswab.3tiff.html2
-rw-r--r--tiff/html/man/TIFFtile.3tiff.html2
-rw-r--r--tiff/html/man/fax2ps.1.html2
-rw-r--r--tiff/html/man/fax2tiff.1.html2
-rw-r--r--tiff/html/man/gif2tiff.1.html141
-rw-r--r--tiff/html/man/index.html8
-rw-r--r--tiff/html/man/pal2rgb.1.html2
-rw-r--r--tiff/html/man/ppm2tiff.1.html2
-rw-r--r--tiff/html/man/ras2tiff.1.html139
-rw-r--r--tiff/html/man/raw2tiff.1.html2
-rw-r--r--tiff/html/man/rgb2ycbcr.1.html2
-rw-r--r--tiff/html/man/sgi2tiff.1.html147
-rw-r--r--tiff/html/man/thumbnail.1.html2
-rw-r--r--tiff/html/man/tiff2bw.1.html2
-rw-r--r--tiff/html/man/tiff2pdf.1.html2
-rw-r--r--tiff/html/man/tiff2ps.1.html113
-rw-r--r--tiff/html/man/tiff2rgba.1.html2
-rw-r--r--tiff/html/man/tiffcmp.1.html2
-rw-r--r--tiff/html/man/tiffcp.1.html65
-rw-r--r--tiff/html/man/tiffcrop.1.html2
-rw-r--r--tiff/html/man/tiffdither.1.html15
-rw-r--r--tiff/html/man/tiffdump.1.html2
-rw-r--r--tiff/html/man/tiffgt.1.html2
-rw-r--r--tiff/html/man/tiffinfo.1.html2
-rw-r--r--tiff/html/man/tiffmedian.1.html2
-rw-r--r--tiff/html/man/tiffset.1.html2
-rw-r--r--tiff/html/man/tiffsplit.1.html2
-rw-r--r--tiff/html/man/tiffsv.1.html207
-rw-r--r--tiff/html/misc.html3
-rw-r--r--tiff/html/support.html2
-rw-r--r--tiff/html/tools.html29
-rw-r--r--tiff/html/v3.4beta007.html2
-rw-r--r--tiff/html/v3.4beta016.html2
-rw-r--r--tiff/html/v3.4beta018.html2
-rw-r--r--tiff/html/v3.4beta024.html2
-rw-r--r--tiff/html/v3.4beta028.html2
-rw-r--r--tiff/html/v3.4beta029.html2
-rw-r--r--tiff/html/v3.4beta031.html2
-rw-r--r--tiff/html/v3.4beta032.html2
-rw-r--r--tiff/html/v3.4beta033.html2
-rw-r--r--tiff/html/v3.4beta034.html2
-rw-r--r--tiff/html/v3.4beta035.html2
-rw-r--r--tiff/html/v3.4beta036.html2
-rw-r--r--tiff/html/v3.5.1.html4
-rw-r--r--tiff/html/v3.5.2.html4
-rw-r--r--tiff/html/v3.5.3.html4
-rw-r--r--tiff/html/v3.5.4.html4
-rw-r--r--tiff/html/v3.5.5.html4
-rw-r--r--tiff/html/v3.5.6-beta.html4
-rw-r--r--tiff/html/v3.5.7.html6
-rw-r--r--tiff/html/v3.6.0.html10
-rw-r--r--tiff/html/v3.6.1.html10
-rw-r--r--tiff/html/v3.7.0.html10
-rw-r--r--tiff/html/v3.7.0alpha.html10
-rw-r--r--tiff/html/v3.7.0beta.html10
-rw-r--r--tiff/html/v3.7.0beta2.html10
-rw-r--r--tiff/html/v3.7.1.html10
-rw-r--r--tiff/html/v3.7.2.html10
-rw-r--r--tiff/html/v3.7.3.html10
-rw-r--r--tiff/html/v3.7.4.html10
-rw-r--r--tiff/html/v3.8.0.html10
-rw-r--r--tiff/html/v3.8.1.html10
-rw-r--r--tiff/html/v3.8.2.html10
-rw-r--r--tiff/html/v3.9.0beta.html10
-rw-r--r--tiff/html/v3.9.1.html10
-rw-r--r--tiff/html/v3.9.2.html10
-rw-r--r--tiff/html/v4.0.0.html10
-rw-r--r--tiff/html/v4.0.1.html113
-rw-r--r--tiff/html/v4.0.2.html118
-rw-r--r--tiff/html/v4.0.3.html125
-rw-r--r--tiff/html/v4.0.4.html274
-rw-r--r--tiff/html/v4.0.4beta.html291
-rw-r--r--tiff/html/v4.0.5.html148
-rw-r--r--tiff/html/v4.0.6.html139
-rw-r--r--tiff/html/v4.0.7.html411
-rw-r--r--tiff/libtiff/CMakeLists.txt165
-rw-r--r--tiff/libtiff/Makefile.am24
-rw-r--r--tiff/libtiff/Makefile.in256
-rw-r--r--tiff/libtiff/Makefile.vc6
-rw-r--r--tiff/libtiff/libtiff.def271
-rw-r--r--tiff/libtiff/mkg3states.c5
-rw-r--r--tiff/libtiff/tif_aux.c33
-rw-r--r--tiff/libtiff/tif_close.c12
-rw-r--r--tiff/libtiff/tif_codec.c4
-rw-r--r--tiff/libtiff/tif_color.c22
-rw-r--r--tiff/libtiff/tif_compress.c8
-rw-r--r--tiff/libtiff/tif_config.h.cmake.in261
-rw-r--r--tiff/libtiff/tif_config.h.in39
-rw-r--r--tiff/libtiff/tif_config.vc.h69
-rw-r--r--tiff/libtiff/tif_dir.c510
-rw-r--r--tiff/libtiff/tif_dirinfo.c100
-rw-r--r--tiff/libtiff/tif_dirread.c160
-rw-r--r--tiff/libtiff/tif_dirwrite.c87
-rw-r--r--tiff/libtiff/tif_dumpmode.c4
-rw-r--r--tiff/libtiff/tif_extension.c38
-rw-r--r--tiff/libtiff/tif_fax3.c67
-rw-r--r--tiff/libtiff/tif_fax3.h6
-rw-r--r--tiff/libtiff/tif_getimage.c472
-rw-r--r--tiff/libtiff/tif_jpeg.c450
-rw-r--r--tiff/libtiff/tif_jpeg_12.c3
-rw-r--r--tiff/libtiff/tif_luv.c115
-rw-r--r--tiff/libtiff/tif_lzma.c6
-rw-r--r--tiff/libtiff/tif_lzw.c113
-rw-r--r--tiff/libtiff/tif_next.c41
-rw-r--r--tiff/libtiff/tif_ojpeg.c107
-rw-r--r--tiff/libtiff/tif_open.c8
-rw-r--r--tiff/libtiff/tif_packbits.c23
-rw-r--r--tiff/libtiff/tif_pixarlog.c278
-rw-r--r--tiff/libtiff/tif_predict.c300
-rw-r--r--tiff/libtiff/tif_predict.h8
-rw-r--r--tiff/libtiff/tif_print.c159
-rw-r--r--tiff/libtiff/tif_read.c149
-rw-r--r--tiff/libtiff/tif_stream.cxx19
-rw-r--r--tiff/libtiff/tif_strip.c29
-rw-r--r--tiff/libtiff/tif_swab.c8
-rw-r--r--tiff/libtiff/tif_thunder.c5
-rw-r--r--tiff/libtiff/tif_tile.c38
-rw-r--r--tiff/libtiff/tif_unix.c94
-rw-r--r--tiff/libtiff/tif_win32.c36
-rw-r--r--tiff/libtiff/tif_write.c121
-rw-r--r--tiff/libtiff/tif_zip.c39
-rw-r--r--tiff/libtiff/tiff.h37
-rw-r--r--tiff/libtiff/tiffconf.h.cmake.in130
-rw-r--r--tiff/libtiff/tiffconf.vc.h25
-rw-r--r--tiff/libtiff/tiffio.h16
-rw-r--r--tiff/libtiff/tiffiop.h111
-rw-r--r--tiff/libtiff/tiffvers.h4
-rw-r--r--tiff/libtiff/uvcode.h2
-rw-r--r--tiff/man/CMakeLists.txt99
-rw-r--r--tiff/man/Makefile.am16
-rw-r--r--tiff/man/Makefile.in175
-rw-r--r--tiff/man/TIFFClose.3tiff4
-rw-r--r--tiff/man/TIFFDataWidth.3tiff4
-rw-r--r--tiff/man/TIFFError.3tiff4
-rw-r--r--tiff/man/TIFFFieldDataType.3tiff53
-rw-r--r--tiff/man/TIFFFieldName.3tiff52
-rw-r--r--tiff/man/TIFFFieldPassCount.3tiff73
-rw-r--r--tiff/man/TIFFFieldReadCount.3tiff77
-rw-r--r--tiff/man/TIFFFieldTag.3tiff56
-rw-r--r--tiff/man/TIFFFieldWriteCount.3tiff88
-rw-r--r--tiff/man/TIFFFlush.3tiff4
-rw-r--r--tiff/man/TIFFGetField.3tiff17
-rw-r--r--tiff/man/TIFFRGBAImage.3tiff4
-rw-r--r--tiff/man/TIFFReadDirectory.3tiff4
-rw-r--r--tiff/man/TIFFReadEncodedStrip.3tiff4
-rw-r--r--tiff/man/TIFFReadEncodedTile.3tiff4
-rw-r--r--tiff/man/TIFFReadRGBAImage.3tiff4
-rw-r--r--tiff/man/TIFFReadRGBAStrip.3tiff4
-rw-r--r--tiff/man/TIFFReadRGBATile.3tiff4
-rw-r--r--tiff/man/TIFFReadRawStrip.3tiff4
-rw-r--r--tiff/man/TIFFReadRawTile.3tiff4
-rw-r--r--tiff/man/TIFFReadScanline.3tiff4
-rw-r--r--tiff/man/TIFFReadTile.3tiff4
-rw-r--r--tiff/man/TIFFSetDirectory.3tiff4
-rw-r--r--tiff/man/TIFFSetField.3tiff4
-rw-r--r--tiff/man/TIFFWarning.3tiff6
-rw-r--r--tiff/man/TIFFWriteDirectory.3tiff4
-rw-r--r--tiff/man/TIFFWriteEncodedStrip.3tiff4
-rw-r--r--tiff/man/TIFFWriteEncodedTile.3tiff4
-rw-r--r--tiff/man/TIFFWriteRawStrip.3tiff4
-rw-r--r--tiff/man/TIFFWriteRawTile.3tiff4
-rw-r--r--tiff/man/TIFFWriteScanline.3tiff4
-rw-r--r--tiff/man/TIFFWriteTile.3tiff4
-rw-r--r--tiff/man/TIFFbuffer.3tiff4
-rw-r--r--tiff/man/TIFFcodec.3tiff4
-rw-r--r--tiff/man/TIFFcolor.3tiff4
-rw-r--r--tiff/man/TIFFmemory.3tiff4
-rw-r--r--tiff/man/TIFFsize.3tiff4
-rw-r--r--tiff/man/TIFFstrip.3tiff4
-rw-r--r--tiff/man/TIFFswab.3tiff4
-rw-r--r--tiff/man/TIFFtile.3tiff4
-rw-r--r--tiff/man/bmp2tiff.185
-rw-r--r--tiff/man/fax2ps.14
-rw-r--r--tiff/man/fax2tiff.14
-rw-r--r--tiff/man/gif2tiff.181
-rw-r--r--tiff/man/libtiff.3tiff13
-rw-r--r--tiff/man/pal2rgb.14
-rw-r--r--tiff/man/ppm2tiff.14
-rw-r--r--tiff/man/ras2tiff.196
-rw-r--r--tiff/man/raw2tiff.14
-rw-r--r--tiff/man/rgb2ycbcr.14
-rw-r--r--tiff/man/sgi2tiff.193
-rw-r--r--tiff/man/thumbnail.14
-rw-r--r--tiff/man/tiff2bw.14
-rw-r--r--tiff/man/tiff2pdf.14
-rw-r--r--tiff/man/tiff2ps.145
-rw-r--r--tiff/man/tiff2rgba.14
-rw-r--r--tiff/man/tiffcmp.14
-rw-r--r--tiff/man/tiffcp.119
-rw-r--r--tiff/man/tiffcrop.14
-rw-r--r--tiff/man/tiffdither.17
-rw-r--r--tiff/man/tiffdump.14
-rw-r--r--tiff/man/tiffgt.14
-rw-r--r--tiff/man/tiffinfo.14
-rw-r--r--tiff/man/tiffmedian.14
-rw-r--r--tiff/man/tiffset.113
-rw-r--r--tiff/man/tiffsplit.14
-rw-r--r--tiff/man/tiffsv.1142
-rw-r--r--tiff/nmake.opt2
-rw-r--r--tiff/port/CMakeLists.txt60
-rw-r--r--tiff/port/Makefile.am6
-rw-r--r--tiff/port/Makefile.in226
-rw-r--r--tiff/port/Makefile.vc3
-rw-r--r--tiff/port/libport.h11
-rw-r--r--tiff/port/snprintf.c38
-rw-r--r--tiff/port/strcasecmp.c6
-rw-r--r--tiff/test/CMakeLists.txt374
-rw-r--r--tiff/test/Makefile.am61
-rw-r--r--tiff/test/Makefile.in1382
-rw-r--r--tiff/test/TiffSplitTest.cmake34
-rw-r--r--tiff/test/TiffTest.cmake63
-rw-r--r--tiff/test/TiffTestCommon.cmake103
-rw-r--r--tiff/test/ascii_tag.c4
-rwxr-xr-xtiff/test/bmp2tiff_palette.sh7
-rwxr-xr-xtiff/test/bmp2tiff_rgb.sh7
-rw-r--r--tiff/test/common.sh8
-rw-r--r--tiff/test/custom_dir.c247
-rwxr-xr-xtiff/test/gif2tiff.sh7
-rw-r--r--tiff/test/images/palette-1c-8b.bmpbin24954 -> 0 bytes
-rw-r--r--tiff/test/images/palette-1c-8b.gifbin21614 -> 0 bytes
-rw-r--r--tiff/test/images/quad-tile.jpg.tiffbin0 -> 27576 bytes
-rw-r--r--tiff/test/images/rgb-3c-8b.bmpbin71298 -> 0 bytes
-rw-r--r--tiff/test/long_tag.c4
-rw-r--r--tiff/test/raw_decode.c304
-rw-r--r--tiff/test/rewrite_tag.c10
-rw-r--r--tiff/test/short_tag.c4
-rw-r--r--tiff/test/strip.c4
-rwxr-xr-xtiff/test/tiff2rgba-quad-tile.jpg.sh7
-rw-r--r--tiff/tools/CMakeLists.txt125
-rw-r--r--tiff/tools/Makefile.am27
-rw-r--r--tiff/tools/Makefile.in361
-rw-r--r--tiff/tools/Makefile.vc8
-rw-r--r--tiff/tools/bmp2tiff.c854
-rw-r--r--tiff/tools/fax2ps.c22
-rw-r--r--tiff/tools/fax2tiff.c28
-rw-r--r--tiff/tools/gif2tiff.c530
-rw-r--r--tiff/tools/pal2rgb.c7
-rw-r--r--tiff/tools/ppm2tiff.c43
-rw-r--r--tiff/tools/ras2tiff.c316
-rw-r--r--tiff/tools/rasterfile.h42
-rw-r--r--tiff/tools/raw2tiff.c95
-rw-r--r--tiff/tools/rgb2ycbcr.c11
-rw-r--r--tiff/tools/sgi2tiff.c335
-rw-r--r--tiff/tools/sgisv.c316
-rw-r--r--tiff/tools/thumbnail.c42
-rw-r--r--tiff/tools/tiff2bw.c13
-rw-r--r--tiff/tools/tiff2pdf.c790
-rw-r--r--tiff/tools/tiff2ps.c60
-rw-r--r--tiff/tools/tiff2rgba.c40
-rw-r--r--tiff/tools/tiffcmp.c21
-rw-r--r--tiff/tools/tiffcp.c30
-rw-r--r--tiff/tools/tiffcrop.c422
-rw-r--r--tiff/tools/tiffdither.c28
-rw-r--r--tiff/tools/tiffdump.c112
-rw-r--r--tiff/tools/tiffgt.c28
-rw-r--r--tiff/tools/tiffinfo.c61
-rw-r--r--tiff/tools/tiffmedian.c54
-rw-r--r--tiff/tools/tiffset.c83
-rw-r--r--tiff/tools/tiffsplit.c4
-rw-r--r--tiff/tools/ycbcr.c168
375 files changed, 21925 insertions, 11426 deletions
diff --git a/tiff/CMakeLists.txt b/tiff/CMakeLists.txt
new file mode 100644
index 000000000..1ee6fd46a
--- /dev/null
+++ b/tiff/CMakeLists.txt
@@ -0,0 +1,764 @@
+# CMake build for libtiff
+# Run "cmake" to generate the build files for your platform
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+cmake_minimum_required(VERSION 2.8.9)
+
+# Default policy is from 2.8.9
+cmake_policy(VERSION 2.8.9)
+# Set MacOSX @rpath usage globally.
+if (POLICY CMP0020)
+ cmake_policy(SET CMP0020 NEW)
+endif(POLICY CMP0020)
+if (POLICY CMP0042)
+ cmake_policy(SET CMP0042 NEW)
+endif(POLICY CMP0042)
+# Use new variable expansion policy.
+if (POLICY CMP0053)
+ cmake_policy(SET CMP0053 NEW)
+endif(POLICY CMP0053)
+if (POLICY CMP0054)
+ cmake_policy(SET CMP0054 NEW)
+endif(POLICY CMP0054)
+
+# Read version information from configure.ac.
+FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/configure.ac" configure)
+STRING(REGEX REPLACE ";" "\\\\;" configure "${configure}")
+STRING(REGEX REPLACE "\n" ";" configure "${configure}")
+foreach(line ${configure})
+ foreach(var LIBTIFF_MAJOR_VERSION LIBTIFF_MINOR_VERSION LIBTIFF_MICRO_VERSION LIBTIFF_ALPHA_VERSION
+ LIBTIFF_CURRENT LIBTIFF_REVISION LIBTIFF_AGE)
+ if(NOT ${var})
+ string(REGEX MATCH "^${var}=(.*)" ${var}_MATCH "${line}")
+ if(${var}_MATCH)
+ string(REGEX REPLACE "^${var}=(.*)" "\\1" ${var} "${line}")
+ endif()
+ endif()
+ endforeach()
+endforeach()
+
+math(EXPR SO_MAJOR "${LIBTIFF_CURRENT} - ${LIBTIFF_AGE}")
+set(SO_MINOR "${LIBTIFF_AGE}")
+set(SO_REVISION "${LIBTIFF_REVISION}")
+
+message(STATUS "Building tiff version ${LIBTIFF_MAJOR_VERSION}.${LIBTIFF_MINOR_VERSION}.${LIBTIFF_MICRO_VERSION}${LIBTIFF_ALPHA_VERSION}")
+message(STATUS "libtiff library version ${SO_MAJOR}.${SO_MINOR}.${SO_REVISION}")
+
+set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libraries")
+
+# Project version
+project(tiff C)
+set(VERSION "${LIBTIFF_MAJOR_VERSION}.${LIBTIFF_MINOR_VERSION}.${LIBTIFF_MICRO_VERSION}")
+set(tiff_VERSION "${VERSION}")
+set(tiff_VERSION_MAJOR "${LIBTIFF_MAJOR_VERSION}")
+set(tiff_VERSION_MINOR "${LIBTIFF_MINOR_VERSION}")
+set(tiff_VERSION_PATCH "${LIBTIFF_MICRO_VERSION}")
+
+# the other tiff_VERSION_* variables are set automatically
+set(tiff_VERSION_ALPHA "${LIBTIFF_ALPHA_VERSION}")
+# Library version (unlike libtool's baroque scheme, WYSIWYG here)
+set(SO_COMPATVERSION "${SO_MAJOR}")
+set(SO_VERSION "${SO_MAJOR}.${SO_MINOR}.${SO_REVISION}")
+
+# For autotools header compatibility
+set(PACKAGE_NAME "LibTIFF Software")
+set(PACKAGE_TARNAME "${PROJECT_NAME}")
+set(PACKAGE_VERSION "${PROJECT_VERSION}${tiff_VERSION_ALPHA}")
+set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
+set(PACKAGE_BUGREPORT "tiff@lists.maptools.org")
+
+include(GNUInstallDirs)
+include(CheckCCompilerFlag)
+include(CheckCSourceCompiles)
+include(CheckIncludeFile)
+include(CheckTypeSize)
+include(CheckFunctionExists)
+enable_testing()
+
+macro(current_date var)
+ if(UNIX)
+ execute_process(COMMAND "date" +"%Y%m%d" OUTPUT_VARIABLE ${var})
+ endif()
+endmacro()
+
+current_date(RELEASE_DATE)
+
+macro(extra_dist)
+ foreach(file ${ARGV})
+ file(RELATIVE_PATH relfile "${PROJECT_SOURCE_DIR}"
+ "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
+ list(APPEND EXTRA_DIST "${relfile}")
+ endforeach()
+ set(EXTRA_DIST "${EXTRA_DIST}" PARENT_SCOPE)
+endmacro()
+
+set(EXTRA_DIST
+ HOWTO-RELEASE
+ Makefile.vc
+ SConstruct
+ autogen.sh
+ configure.com
+ nmake.opt
+ libtiff-4.pc.in)
+
+# These are annoyingly verbose, produce false positives or don't work
+# nicely with all supported compiler versions, so are disabled unless
+# explicitly enabled.
+option(extra-warnings "Enable extra compiler warnings" OFF)
+
+# This will cause the compiler to fail when an error occurs.
+option(fatal-warnings "Compiler warnings are errors" OFF)
+
+# Check if the compiler supports each of the following additional
+# flags, and enable them if supported. This greatly improves the
+# quality of the build by checking for a number of common problems,
+# some of which are quite serious.
+if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR
+ CMAKE_C_COMPILER_ID MATCHES "Clang")
+ set(test_flags
+ -Wall
+ -Winline
+ -W
+ -Wformat-security
+ -Wpointer-arith
+ -Wdisabled-optimization
+ -Wno-unknown-pragmas
+ -Wdeclaration-after-statement
+ -fstrict-aliasing)
+ if(extra-warnings)
+ list(APPEND test_flags
+ -Wfloat-equal
+ -Wmissing-prototypes
+ -Wunreachable-code)
+ endif()
+ if(fatal-warnings)
+ list(APPEND test_flags
+ -Werror)
+ endif()
+elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
+ set(test_flags)
+ if(extra-warnings)
+ list(APPEND test_flags
+ /W4)
+ else()
+ list(APPEND test_flags
+ /W3)
+ endif()
+ if (fatal-warnings)
+ list(APPEND test_flags
+ /WX)
+ endif()
+endif()
+
+foreach(flag ${test_flags})
+ string(REGEX REPLACE "[^A-Za-z0-9]" "_" flag_var "${flag}")
+ set(test_c_flag "C_FLAG${flag_var}")
+ CHECK_C_COMPILER_FLAG(${flag} "${test_c_flag}")
+ if (${test_c_flag})
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
+ endif (${test_c_flag})
+endforeach(flag ${test_flags})
+
+if(MSVC)
+ set(CMAKE_DEBUG_POSTFIX "d")
+endif()
+
+option(ld-version-script "Enable linker version script" ON)
+# Check if LD supports linker scripts.
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "VERS_1 {
+ global: sym;
+};
+
+VERS_2 {
+ global: sym;
+} VERS_1;
+")
+set(CMAKE_REQUIRED_FLAGS_SAVE ${CMAKE_REQUIRED_FLAGS})
+set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS} "-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
+check_c_source_compiles("int main(void){return 0;}" HAVE_LD_VERSION_SCRIPT)
+set(CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS_SAVE})
+file(REMOVE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map")
+if (ld-version-script AND HAVE_LD_VERSION_SCRIPT)
+ set(HAVE_LD_VERSION_SCRIPT TRUE)
+else()
+ set(HAVE_LD_VERSION_SCRIPT FALSE)
+endif()
+
+# Find libm, if available
+find_library(M_LIBRARY m)
+
+check_include_file(assert.h HAVE_ASSERT_H)
+check_include_file(dlfcn.h HAVE_DLFCN_H)
+check_include_file(fcntl.h HAVE_FCNTL_H)
+check_include_file(inttypes.h HAVE_INTTYPES_H)
+check_include_file(io.h HAVE_IO_H)
+check_include_file(limits.h HAVE_LIMITS_H)
+check_include_file(malloc.h HAVE_MALLOC_H)
+check_include_file(memory.h HAVE_MEMORY_H)
+check_include_file(search.h HAVE_SEARCH_H)
+check_include_file(stdint.h HAVE_STDINT_H)
+check_include_file(string.h HAVE_STRING_H)
+check_include_file(strings.h HAVE_STRINGS_H)
+check_include_file(sys/time.h HAVE_SYS_TIME_H)
+check_include_file(sys/types.h HAVE_SYS_TYPES_H)
+check_include_file(unistd.h HAVE_UNISTD_H)
+
+# Inspired from /usr/share/autoconf/autoconf/c.m4
+foreach(inline_keyword "inline" "__inline__" "__inline")
+ if(NOT DEFINED C_INLINE)
+ set(CMAKE_REQUIRED_DEFINITIONS_SAVE ${CMAKE_REQUIRED_DEFINITIONS})
+ set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
+ "-Dinline=${inline_keyword}")
+ check_c_source_compiles("
+ typedef int foo_t;
+ static inline foo_t static_foo() {return 0;}
+ foo_t foo(){return 0;}
+ int main(int argc, char *argv[]) {return 0;}"
+ C_HAS_${inline_keyword})
+ set(CMAKE_REQUIRED_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS_SAVE})
+ if(C_HAS_${inline_keyword})
+ set(C_INLINE TRUE)
+ set(INLINE_KEYWORD "${inline_keyword}")
+ endif()
+ endif()
+endforeach()
+if(NOT DEFINED C_INLINE)
+ set(INLINE_KEYWORD)
+endif()
+
+# off_t and size_t checks omitted; not clear they are used at all
+# Are off_t and size_t checks strictly necessary?
+
+# Check if sys/time.h and time.h allow use together
+check_c_source_compiles("
+#include <sys/time.h>
+#include <time.h>
+int main(void){return 0;}"
+ TIME_WITH_SYS_TIME)
+
+# Check if struct tm is in sys/time.h
+check_c_source_compiles("
+#include <sys/types.h>
+#include <time.h>
+
+int main(void){
+ struct tm tm;
+ int *p = &tm.tm_sec;
+ return !p;
+}"
+ TM_IN_SYS_TIME)
+
+# Check type sizes
+# NOTE: Could be replaced with C99 <stdint.h>
+check_type_size("signed short" SIZEOF_SIGNED_SHORT)
+check_type_size("unsigned short" SIZEOF_UNSIGNED_SHORT)
+check_type_size("signed int" SIZEOF_SIGNED_INT)
+check_type_size("unsigned int" SIZEOF_UNSIGNED_INT)
+check_type_size("signed long" SIZEOF_SIGNED_LONG)
+check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
+check_type_size("signed long long" SIZEOF_SIGNED_LONG_LONG)
+check_type_size("unsigned long long" SIZEOF_UNSIGNED_LONG_LONG)
+check_type_size("unsigned char *" SIZEOF_UNSIGNED_CHAR_P)
+
+set(CMAKE_EXTRA_INCLUDE_FILES_SAVE ${CMAKE_EXTRA_INCLUDE_FILES})
+set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} "stddef.h")
+check_type_size("size_t" SIZEOF_SIZE_T)
+check_type_size("ptrdiff_t" SIZEOF_PTRDIFF_T)
+set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES_SAVE})
+
+macro(report_values)
+ foreach(val ${ARGV})
+ message(STATUS "${val} set to ${${val}}")
+ endforeach()
+endmacro()
+
+set(TIFF_INT8_T "signed char")
+set(TIFF_UINT8_T "unsigned char")
+
+set(TIFF_INT16_T "signed short")
+set(TIFF_UINT16_T "unsigned short")
+
+if(SIZEOF_SIGNED_INT EQUAL 4)
+ set(TIFF_INT32_T "signed int")
+ set(TIFF_INT32_FORMAT "%d")
+elseif(SIZEOF_SIGNED_LONG EQUAL 4)
+ set(TIFF_INT32_T "signed long")
+ set(TIFF_INT32_FORMAT "%ld")
+endif()
+
+if(SIZEOF_UNSIGNED_INT EQUAL 4)
+ set(TIFF_UINT32_T "unsigned int")
+ set(TIFF_UINT32_FORMAT "%u")
+elseif(SIZEOF_UNSIGNED_LONG EQUAL 4)
+ set(TIFF_UINT32_T "unsigned long")
+ set(TIFF_UINT32_FORMAT "%lu")
+endif()
+
+if(SIZEOF_SIGNED_LONG EQUAL 8)
+ set(TIFF_INT64_T "signed long")
+ set(TIFF_INT64_FORMAT "%ld")
+elseif(SIZEOF_SIGNED_LONG_LONG EQUAL 8)
+ set(TIFF_INT64_T "signed long long")
+ if (MINGW)
+ set(TIFF_INT64_FORMAT "%I64d")
+ else()
+ set(TIFF_INT64_FORMAT "%lld")
+ endif()
+endif()
+
+if(SIZEOF_UNSIGNED_LONG EQUAL 8)
+ set(TIFF_UINT64_T "unsigned long")
+ set(TIFF_UINT64_FORMAT "%lu")
+elseif(SIZEOF_UNSIGNED_LONG_LONG EQUAL 8)
+ set(TIFF_UINT64_T "unsigned long long")
+ if (MINGW)
+ set(TIFF_UINT64_FORMAT "%I64u")
+ else()
+ set(TIFF_UINT64_FORMAT "%llu")
+ endif()
+endif()
+
+if(SIZEOF_UNSIGNED_INT EQUAL SIZEOF_SIZE_T)
+ set(TIFF_SIZE_T "unsigned int")
+ set(TIFF_SIZE_FORMAT "%u")
+elseif(SIZEOF_UNSIGNED_LONG EQUAL SIZEOF_SIZE_T)
+ set(TIFF_SIZE_T "unsigned long")
+ set(TIFF_SIZE_FORMAT "%lu")
+elseif(SIZEOF_UNSIGNED_LONG_LONG EQUAL SIZEOF_SIZE_T)
+ set(TIFF_SIZE_T "unsigned long")
+ if (MINGW)
+ set(TIFF_SIZE_FORMAT "%I64u")
+ else()
+ set(TIFF_SIZE_FORMAT "%llu")
+ endif()
+endif()
+
+if(SIZEOF_SIGNED_INT EQUAL SIZEOF_UNSIGNED_CHAR_P)
+ set(TIFF_SSIZE_T "signed int")
+ set(TIFF_SSIZE_FORMAT "%d")
+elseif(SIZEOF_SIGNED_LONG EQUAL SIZEOF_UNSIGNED_CHAR_P)
+ set(TIFF_SSIZE_T "signed long")
+ set(TIFF_SSIZE_FORMAT "%ld")
+elseif(SIZEOF_SIGNED_LONG_LONG EQUAL SIZEOF_UNSIGNED_CHAR_P)
+ set(TIFF_SSIZE_T "signed long long")
+ if (MINGW)
+ set(TIFF_SSIZE_FORMAT "%I64d")
+ else()
+ set(TIFF_SSIZE_FORMAT "%lld")
+ endif()
+endif()
+
+if(NOT SIZEOF_PTRDIFF_T)
+ set(TIFF_PTRDIFF_T "${TIFF_SSIZE_T}")
+ set(TIFF_PTRDIFF_FORMAT "${SSIZE_FORMAT}")
+else()
+ set(TIFF_PTRDIFF_T "ptrdiff_t")
+ set(TIFF_PTRDIFF_FORMAT "%ld")
+endif()
+
+#report_values(TIFF_INT8_T TIFF_INT8_FORMAT
+# TIFF_UINT8_T TIFF_UINT8_FORMAT
+# TIFF_INT16_T TIFF_INT16_FORMAT
+# TIFF_UINT16_T TIFF_UINT16_FORMAT
+# TIFF_INT32_T TIFF_INT32_FORMAT
+# TIFF_UINT32_T TIFF_UINT32_FORMAT
+# TIFF_INT64_T TIFF_INT64_FORMAT
+# TIFF_UINT64_T TIFF_UINT64_FORMAT
+# TIFF_SSIZE_T TIFF_SSIZE_FORMAT
+# TIFF_PTRDIFF_T TIFF_PTRDIFF_FORMAT)
+
+# Nonstandard int types
+check_type_size(INT8 int8)
+set(HAVE_INT8 ${INT8})
+check_type_size(INT16 int16)
+set(HAVE_INT16 ${INT16})
+check_type_size(INT32 int32)
+set(HAVE_INT32 ${INT32})
+
+# Check functions
+set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES})
+set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${M_LIBRARY})
+check_function_exists(floor HAVE_FLOOR)
+check_function_exists(pow HAVE_POW)
+check_function_exists(sqrt HAVE_SQRT)
+set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE})
+
+check_function_exists(isascii HAVE_ISASCII)
+check_function_exists(memmove HAVE_MEMMOVE)
+check_function_exists(memset HAVE_MEMSET)
+check_function_exists(mmap HAVE_MMAP)
+check_function_exists(setmode HAVE_SETMODE)
+check_function_exists(strcasecmp HAVE_STRCASECMP)
+check_function_exists(strchr HAVE_STRCHR)
+check_function_exists(strrchr HAVE_STRRCHR)
+check_function_exists(strstr HAVE_STRSTR)
+check_function_exists(strtol HAVE_STRTOL)
+check_function_exists(strtol HAVE_STRTOUL)
+check_function_exists(strtoull HAVE_STRTOULL)
+check_function_exists(getopt HAVE_GETOPT)
+check_function_exists(lfind HAVE_LFIND)
+
+# May be inlined, so check it compiles:
+check_c_source_compiles("
+#include <stdio.h>
+int main(void) {
+ char buf[10];
+ snprintf(buf, 10, \"Test %d\", 1);
+ return 0;
+}"
+ HAVE_SNPRINTF)
+
+if(NOT HAVE_SNPRINTF)
+ add_definitions(-DNEED_LIBPORT)
+endif()
+
+# CPU bit order
+set(fillorder FILLORDER_MSB2LSB)
+if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "i.*86.*" OR
+ CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "amd64.*" OR
+ CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64.*")
+ set(fillorder FILLORDER_LSB2MSB)
+endif()
+set(HOST_FILLORDER ${fillorder} CACHE STRING "Native CPU bit order")
+mark_as_advanced(HOST_FILLORDER)
+
+# CPU endianness
+include(TestBigEndian)
+test_big_endian(bigendian)
+if (bigendian)
+ set(bigendian ON)
+else()
+ set(bigendian OFF)
+endif()
+set(HOST_BIG_ENDIAN ${bigendian} CACHE STRING "Native CPU bit order")
+mark_as_advanced(HOST_BIG_ENDIAN)
+if (HOST_BIG_ENDIAN)
+ set(HOST_BIG_ENDIAN 1)
+else()
+ set(HOST_BIG_ENDIAN 0)
+endif()
+
+# IEEE floating point
+set(HAVE_IEEEFP 1 CACHE STRING "IEEE floating point is available")
+mark_as_advanced(HAVE_IEEEFP)
+
+report_values(CMAKE_HOST_SYSTEM_PROCESSOR HOST_FILLORDER
+ HOST_BIG_ENDIAN HAVE_IEEEFP)
+
+# Large file support
+if (UNIX)
+ # This might not catch every possibility catered for by
+ # AC_SYS_LARGEFILE.
+ add_definitions(-D_FILE_OFFSET_BITS=64)
+ set(FILE_OFFSET_BITS 64)
+endif()
+
+# Documentation install directory (default to cmake project docdir)
+set(LIBTIFF_DOCDIR "${CMAKE_INSTALL_FULL_DOCDIR}")
+
+# Options to enable and disable internal codecs
+
+option(ccitt "support for CCITT Group 3 & 4 algorithms" ON)
+set(CCITT_SUPPORT ${ccitt})
+
+option(packbits "support for Macintosh PackBits algorithm" ON)
+set(PACKBITS_SUPPORT ${packbits})
+
+option(lzw "support for LZW algorithm" ON)
+set(LZW_SUPPORT ${lzw})
+
+option(thunder "support for ThunderScan 4-bit RLE algorithm" ON)
+set(THUNDER_SUPPORT ${thunder})
+
+option(next "support for NeXT 2-bit RLE algorithm" ON)
+set(NEXT_SUPPORT ${next})
+
+option(logluv "support for LogLuv high dynamic range algorithm" ON)
+set(LOGLUV_SUPPORT ${logluv})
+
+# Option for Microsoft Document Imaging
+option(mdi "support for Microsoft Document Imaging" ON)
+set(MDI_SUPPORT ${mdi})
+
+# ZLIB
+option(zlib "use zlib (required for Deflate compression)" ON)
+if (zlib)
+ find_package(ZLIB)
+endif()
+set(ZLIB_SUPPORT 0)
+if(ZLIB_FOUND)
+ set(ZLIB_SUPPORT 1)
+endif()
+set(ZIP_SUPPORT ${ZLIB_SUPPORT})
+# Option for Pixar log-format algorithm
+
+# Pixar log format
+option(pixarlog "support for Pixar log-format algorithm (requires Zlib)" ON)
+set(PIXARLOG_SUPPORT FALSE)
+if (ZLIB_SUPPORT)
+ if(pixarlog)
+ set(PIXARLOG_SUPPORT TRUE)
+ endif()
+endif()
+
+# JPEG
+option(jpeg "use libjpeg (required for JPEG compression)" ON)
+if (jpeg)
+ find_package(JPEG)
+endif()
+set(JPEG_SUPPORT FALSE)
+if(JPEG_FOUND)
+ set(JPEG_SUPPORT TRUE)
+endif()
+
+option(old-jpeg "support for Old JPEG compression (read-only)" ON)
+set(OJPEG_SUPPORT FALSE)
+if (JPEG_SUPPORT)
+ if (old-jpeg)
+ set(OJPEG_SUPPORT TRUE)
+ endif()
+endif()
+
+# JBIG-KIT
+option(jbig "use ISO JBIG compression (requires JBIT-KIT library)" ON)
+if (jbig)
+ set(JBIG_FOUND 0)
+ find_path(JBIG_INCLUDE_DIR jbig.h)
+ set(JBIG_NAMES ${JBIG_NAMES} jbig libjbig)
+ find_library(JBIG_LIBRARY NAMES ${JBIG_NAMES})
+ if (JBIG_INCLUDE_DIR AND JBIG_LIBRARY)
+ set(JBIG_FOUND 1)
+ set(JBIG_LIBRARIES ${JBIG_LIBRARY})
+ endif()
+endif()
+set(JBIG_SUPPORT 0)
+if(JBIG_FOUND)
+ set(JBIG_FOUND TRUE)
+ set(JBIG_SUPPORT 1)
+else()
+ set(JBIG_FOUND FALSE)
+endif()
+
+set(CMAKE_REQUIRED_LIBRARIES_SAVE ${CMAKE_REQUIRED_LIBRARIES})
+set(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
+set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} ${JBIG_INCLUDE_DIR})
+set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${JBIG_LIBRARY})
+check_function_exists(jbg_newlen HAVE_JBG_NEWLEN)
+set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_SAVE})
+set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
+
+# liblzma2
+option(lzma "use liblzma (required for LZMA2 compression)" ON)
+if (lzma)
+ find_package(LibLZMA)
+endif()
+set(LZMA_SUPPORT 0)
+if(LIBLZMA_FOUND)
+ set(LZMA_SUPPORT 1)
+endif()
+
+# 8/12-bit jpeg mode
+option(jpeg12 "enable libjpeg 8/12-bit dual mode (requires separate
+12-bit libjpeg build)" ON)
+set(JPEG12_INCLUDE_DIR JPEG12_INCLUDE_DIR-NOTFOUND CACHE PATH "Include directory for 12-bit libjpeg")
+set(JPEG12_LIBRARY JPEG12_LIBRARY-NOTFOUND CACHE FILEPATH "12-bit libjpeg library")
+set(JPEG12_FOUND FALSE)
+if (JPEG12_INCLUDE_DIR AND JPEG12_LIBRARY)
+ set(JPEG12_LIBRARIES ${JPEG12_LIBRARY})
+ set(JPEG12_FOUND TRUE)
+endif()
+if (JPEG12_FOUND)
+ set(JPEG_DUAL_MODE_8_12 1)
+ set(LIBJPEG_12_PATH "${JPEG12_INCLUDE_DIR}/jpeglib.h")
+endif()
+
+# C++ support
+option(cxx "Enable C++ stream API building (requires C++ compiler)" ON)
+set(CXX_SUPPORT FALSE)
+if (cxx)
+ enable_language(CXX)
+ set(CXX_SUPPORT TRUE)
+endif()
+
+# OpenGL and GLUT
+find_package(OpenGL)
+find_package(GLUT)
+set(HAVE_OPENGL FALSE)
+if(OPENGL_FOUND AND OPENGL_GLU_FOUND AND GLUT_FOUND)
+ set(HAVE_OPENGL TRUE)
+endif()
+# Purely to satisfy the generated headers:
+check_include_file(GL/gl.h HAVE_GL_GL_H)
+check_include_file(GL/glu.h HAVE_GL_GLU_H)
+check_include_file(GL/glut.h HAVE_GL_GLUT_H)
+check_include_file(GLUT/glut.h HAVE_GLUT_GLUT_H)
+check_include_file(OpenGL/gl.h HAVE_OPENGL_GL_H)
+check_include_file(OpenGL/glu.h HAVE_OPENGL_GLU_H)
+
+# Win32 IO
+set(win32_io FALSE)
+if(WIN32)
+ set(win32_io TRUE)
+endif()
+set(USE_WIN32_FILEIO ${win32_io} CACHE BOOL "Use win32 IO system (Microsoft Windows only)")
+if (USE_WIN32_FILEIO)
+ set(USE_WIN32_FILEIO TRUE)
+else()
+ set(USE_WIN32_FILEIO FALSE)
+endif()
+
+# Orthogonal features
+
+# Strip chopping
+option(strip-chopping "strip chopping (whether or not to convert single-strip uncompressed images to mutiple strips of specified size to reduce memory usage)" ON)
+set(TIFF_DEFAULT_STRIP_SIZE 8192 CACHE STRING "default size of the strip in bytes (when strip chopping is enabled)")
+
+set(STRIPCHOP_DEFAULT)
+if(strip-chopping)
+ set(STRIPCHOP_DEFAULT TRUE)
+ if(TIFF_DEFAULT_STRIP_SIZE)
+ set(STRIP_SIZE_DEFAULT "${TIFF_DEFAULT_STRIP_SIZE}")
+ endif()
+endif()
+
+# Defer loading of strip/tile offsets
+option(defer-strile-load "enable deferred strip/tile offset/size loading (experimental)" OFF)
+set(DEFER_STRILE_LOAD ${defer-strile-load})
+
+# CHUNKY_STRIP_READ_SUPPORT
+option(chunky-strip-read "enable reading large strips in chunks for TIFFReadScanline() (experimental)" OFF)
+set(CHUNKY_STRIP_READ_SUPPORT ${chunky-strip-read})
+
+# SUBIFD support
+set(SUBIFD_SUPPORT 1)
+
+# Default handling of ASSOCALPHA support.
+option(extrasample-as-alpha "the RGBA interface will treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many packages produce RGBA files but don't mark the alpha properly" ON)
+if(extrasample-as-alpha)
+ set(DEFAULT_EXTRASAMPLE_AS_ALPHA 1)
+endif()
+
+# Default handling of YCbCr subsampling support.
+# See Bug 168 in Bugzilla, and JPEGFixupTestSubsampling() for details.
+option(check-ycbcr-subsampling "enable picking up YCbCr subsampling info from the JPEG data stream to support files lacking the tag" ON)
+if (check-ycbcr-subsampling)
+ set(CHECK_JPEG_YCBCR_SUBSAMPLING 1)
+endif()
+
+# Generate pkg-config file
+set(prefix "${CMAKE_INSTALL_PREFIX}")
+set(exec_prefix "${CMAKE_INSTALL_PREFIX}")
+set(libdir "${CMAKE_INSTALL_FULL_LIBDIR}")
+set(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libtiff-4.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/libtiff-4.pc)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libtiff-4.pc
+ DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig")
+
+# Includes used by libtiff (and tests)
+if(ZLIB_INCLUDE_DIRS)
+ list(APPEND TIFF_INCLUDES ${ZLIB_INCLUDE_DIRS})
+endif()
+if(JPEG_INCLUDE_DIR)
+ list(APPEND TIFF_INCLUDES ${JPEG_INCLUDE_DIR})
+endif()
+if(JPEG12_INCLUDE_DIR)
+ list(APPEND TIFF_INCLUDES ${JPEG12_INCLUDE_DIR})
+endif()
+if(JBIG_INCLUDE_DIR)
+ list(APPEND TIFF_INCLUDES ${JBIG_INCLUDE_DIR})
+endif()
+if(LIBLZMA_INCLUDE_DIRS)
+ list(APPEND TIFF_INCLUDES ${LIBLZMA_INCLUDE_DIRS})
+endif()
+
+# Libraries required by libtiff
+set(TIFF_LIBRARY_DEPS)
+if(M_LIBRARY)
+ list(APPEND TIFF_LIBRARY_DEPS ${M_LIBRARY})
+endif()
+if(ZLIB_LIBRARIES)
+ list(APPEND TIFF_LIBRARY_DEPS ${ZLIB_LIBRARIES})
+endif()
+if(JPEG_LIBRARIES)
+ list(APPEND TIFF_LIBRARY_DEPS ${JPEG_LIBRARIES})
+endif()
+if(JPEG12_LIBRARIES)
+ list(APPEND TIFF_LIBRARY_DEPS ${JPEG12_LIBRARIES})
+endif()
+if(JBIG_LIBRARIES)
+ list(APPEND TIFF_LIBRARY_DEPS ${JBIG_LIBRARIES})
+endif()
+if(LIBLZMA_LIBRARIES)
+ list(APPEND TIFF_LIBRARY_DEPS ${LIBLZMA_LIBRARIES})
+endif()
+
+#report_values(TIFF_INCLUDES TIFF_LIBRARY_DEPS)
+
+# Process subdirectories
+add_subdirectory(port)
+add_subdirectory(libtiff)
+add_subdirectory(tools)
+add_subdirectory(test)
+add_subdirectory(contrib)
+add_subdirectory(build)
+add_subdirectory(man)
+add_subdirectory(html)
+
+#message(STATUS "EXTRA_DIST: ${EXTRA_DIST}")
+
+message(STATUS "")
+message(STATUS "Libtiff is now configured for ${host}")
+message(STATUS "")
+message(STATUS " Installation directory: ${prefix}")
+message(STATUS " Documentation directory: ${LIBTIFF_DOCDIR}")
+message(STATUS " C compiler: ${CMAKE_C_COMPILER}")
+message(STATUS " C++ compiler: ${CMAKE_CXX_COMPILER}")
+message(STATUS " Build shared libraries: ${BUILD_SHARED_LIBS}")
+message(STATUS " Enable linker symbol versioning: ${HAVE_LD_VERSION_SCRIPT}")
+message(STATUS " Support Microsoft Document Imaging: ${mdi}")
+message(STATUS " Use win32 IO: ${USE_WIN32_FILEIO}")
+message(STATUS "")
+message(STATUS " Support for internal codecs:")
+message(STATUS " CCITT Group 3 & 4 algorithms: ${ccitt}")
+message(STATUS " Macintosh PackBits algorithm: ${packbits}")
+message(STATUS " LZW algorithm: ${lzw}")
+message(STATUS " ThunderScan 4-bit RLE algorithm: ${thunder}")
+message(STATUS " NeXT 2-bit RLE algorithm: ${next}")
+message(STATUS " LogLuv high dynamic range encoding: ${logluv}")
+message(STATUS "")
+message(STATUS " Support for external codecs:")
+message(STATUS " ZLIB support: ${zlib} (requested) ${ZLIB_FOUND} (availability)")
+message(STATUS " Pixar log-format algorithm: ${pixarlog} (requested) ${PIXARLOG_SUPPORT} (availability)")
+message(STATUS " JPEG support: ${jpeg} (requested) ${JPEG_FOUND} (availability)")
+message(STATUS " Old JPEG support: ${old-jpeg} (requested) ${JPEG_FOUND} (availability)")
+message(STATUS " JPEG 8/12 bit dual mode: ${jpeg12} (requested) ${JPEG12_FOUND} (availability)")
+message(STATUS " ISO JBIG support: ${jbig} (requested) ${JBIG_FOUND} (availability)")
+message(STATUS " LZMA2 support: ${lzma} (requested) ${LIBLZMA_FOUND} (availability)")
+message(STATUS "")
+message(STATUS " C++ support: ${cxx} (requested) ${CXX_SUPPORT} (availability)")
+message(STATUS "")
+# message(STATUS " X Athena Widgets support: ${HAVE_XAW}")
+message(STATUS " OpenGL support: ${HAVE_OPENGL}")
+message(STATUS "")
diff --git a/tiff/ChangeLog b/tiff/ChangeLog
index d96c512f1..9b9d397d4 100644
--- a/tiff/ChangeLog
+++ b/tiff/ChangeLog
@@ -1,3 +1,1574 @@
+2016-11-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff 4.0.7 released.
+
+ * configure.ac: Update for 4.0.7 release.
+
+ * tools/tiffdump.c (ReadDirectory): Remove uint32 cast to
+ _TIFFmalloc() argument which resulted in Coverity report. Added
+ more mutiplication overflow checks.
+
+2016-11-18 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiffcrop.c: Fix memory leak in (recent) error code path.
+ Fixes Coverity 1394415.
+
+2016-11-17 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_getimage.c: Fix some benign warnings which appear in
+ 64-bit compilation under Microsoft Visual Studio of the form
+ "Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit
+ value. Results might not be an expected value.". Problem was
+ reported on November 16, 2016 on the tiff mailing list.
+
+2016-11-16 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_dirread.c: in TIFFFetchNormalTag(), do not dereference
+ NULL pointer when values of tags with TIFF_SETGET_C16_ASCII / TIFF_SETGET_C32_ASCII
+ access are 0-byte arrays.
+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2593 (regression introduced
+ by previous fix done on 2016-11-11 for CVE-2016-9297).
+ Reported by Henri Salo. Assigned as CVE-2016-9448
+
+2016-11-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/tiffinfo.c (TIFFReadContigTileData): Fix signed/unsigned
+ comparison warning.
+ (TIFFReadSeparateTileData): Fix signed/unsigned comparison
+ warning.
+
+ * tools/tiffcrop.c (readContigTilesIntoBuffer): Fix
+ signed/unsigned comparison warning.
+
+ * html/v4.0.7.html: Add a file to document the pending 4.0.7
+ release.
+
+2016-11-11 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiff2pdf.c: avoid undefined behaviour related to overlapping
+ of source and destination buffer in memcpy() call in
+ t2p_sample_rgbaa_to_rgb()
+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2577
+
+2016-11-11 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiff2pdf.c: fix potential integer overflows on 32 bit builds
+ in t2p_read_tiff_size()
+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2576
+
+2016-11-11 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_aux.c: fix crash in TIFFVGetFieldDefaulted()
+ when requesting Predictor tag and that the zip/lzw codec is not
+ configured.
+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2591
+
+2016-11-11 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_dirread.c: in TIFFFetchNormalTag(), make sure that
+ values of tags with TIFF_SETGET_C16_ASCII / TIFF_SETGET_C32_ASCII
+ access are null terminated, to avoid potential read outside buffer
+ in _TIFFPrintField().
+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2590 (CVE-2016-9297)
+
+2016-11-11 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_dirread.c: reject images with OJPEG compression that
+ have no TileOffsets/StripOffsets tag, when OJPEG compression is
+ disabled. Prevent null pointer dereference in TIFFReadRawStrip1()
+ and other functions that expect td_stripbytecount to be non NULL.
+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2585
+
+2016-11-11 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiffcrop.c: fix multiple uint32 overflows in
+ writeBufferToSeparateStrips(), writeBufferToContigTiles() and
+ writeBufferToSeparateTiles() that could cause heap buffer overflows.
+ Reported by Henri Salo from Nixu Corporation.
+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592
+
+2016-11-10 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_strip.c: make TIFFNumberOfStrips() return the td->td_nstrips
+ value when it is non-zero, instead of recomputing it. This is needed in
+ TIFF_STRIPCHOP mode where td_nstrips is modified. Fixes a read outsize of
+ array in tiffsplit (or other utilities using TIFFNumberOfStrips()).
+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2587 (CVE-2016-9273)
+
+2016-11-04 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_predic.c: fix memory leaks in error code paths added in
+ previous commit (fix for MSVR 35105)
+
+2016-10-31 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_predict.h, libtiff/tif_predict.c:
+ Replace assertions by runtime checks to avoid assertions in debug mode,
+ or buffer overflows in release mode. Can happen when dealing with
+ unusual tile size like YCbCr with subsampling. Reported as MSVR 35105
+ by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations
+ team.
+
+2016-10-26 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/fax2tiff.c: fix segfault when specifying -r without
+ argument. Patch by Yuriy M. Kaminskiy.
+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2572
+
+2016-10-25 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_dir.c: discard values of SMinSampleValue and
+ SMaxSampleValue when they have been read and the value of
+ SamplesPerPixel is changed afterwards (like when reading a
+ OJPEG compressed image with a missing SamplesPerPixel tag,
+ and whose photometric is RGB or YCbCr, forcing SamplesPerPixel
+ being 3). Otherwise when rewriting the directory (for example
+ with tiffset, we will expect 3 values whereas the array had been
+ allocated with just one), thus causing a out of bound read access.
+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2500
+ (CVE-2014-8127, duplicate: CVE-2016-3658)
+
+ * libtiff/tif_dirwrite.c: avoid null pointer dereference on td_stripoffset
+ when writing directory, if FIELD_STRIPOFFSETS was artificially set
+ for a hack case in OJPEG case.
+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2500
+ (CVE-2014-8127, duplicate: CVE-2016-3658)
+
+2016-10-25 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiffinfo.c: fix out-of-bound read on some tiled images.
+ (http://bugzilla.maptools.org/show_bug.cgi?id=2517)
+
+ * libtiff/tif_compress.c: make TIFFNoDecode() return 0 to indicate an
+ error and make upper level read routines treat it accordingly.
+ (linked to the test case of http://bugzilla.maptools.org/show_bug.cgi?id=2517)
+
+2016-10-14 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiffcrop.c: fix out-of-bound read of up to 3 bytes in
+ readContigTilesIntoBuffer(). Reported as MSVR 35092 by Axel Souchet
+ & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team.
+
+2016-10-09 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiff2pdf.c: fix write buffer overflow of 2 bytes on JPEG
+ compressed images. Reported by Tyler Bohan of Cisco Talos as
+ TALOS-CAN-0187 / CVE-2016-5652.
+ Also prevents writing 2 extra uninitialized bytes to the file stream.
+
+2016-10-08 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiffcp.c: fix out-of-bounds write on tiled images with odd
+ tile width vs image width. Reported as MSVR 35103
+ by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities &
+ Mitigations team.
+
+2016-10-08 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiff2pdf.c: fix read -largely- outsize of buffer in
+ t2p_readwrite_pdf_image_tile(), causing crash, when reading a
+ JPEG compressed image with TIFFTAG_JPEGTABLES length being one.
+ Reported as MSVR 35101 by Axel Souchet and Vishal Chauhan from
+ the MSRC Vulnerabilities & Mitigations team. CVE-2016-9453
+
+2016-10-08 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiffcp.c: fix read of undefined variable in case of missing
+ required tags. Found on test case of MSVR 35100.
+ * tools/tiffcrop.c: fix read of undefined buffer in
+ readContigStripsIntoBuffer() due to uint16 overflow. Probably not a
+ security issue but I can be wrong. Reported as MSVR 35100 by Axel
+ Souchet from the MSRC Vulnerabilities & Mitigations team.
+
+2016-09-25 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * html: Change as many remotesensing.org broken links to a working
+ URL as possible.
+
+2016-09-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_getimage.c (TIFFRGBAImageOK): Reject attempts to
+ read floating point images.
+
+ * libtiff/tif_predict.c (PredictorSetup): Enforce bits-per-sample
+ requirements of floating point predictor (3). Fixes CVE-2016-3622
+ "Divide By Zero in the tiff2rgba tool."
+
+2016-09-23 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiffcrop.c: fix various out-of-bounds write vulnerabilities
+ in heap or stack allocated buffers. Reported as MSVR 35093,
+ MSVR 35096 and MSVR 35097. Discovered by Axel Souchet and Vishal
+ Chauhan from the MSRC Vulnerabilities & Mitigations team.
+ * tools/tiff2pdf.c: fix out-of-bounds write vulnerabilities in
+ heap allocate buffer in t2p_process_jpeg_strip(). Reported as MSVR
+ 35098. Discovered by Axel Souchet and Vishal Chauhan from the MSRC
+ Vulnerabilities & Mitigations team.
+ * libtiff/tif_pixarlog.c: fix out-of-bounds write vulnerabilities
+ in heap allocated buffers. Reported as MSVR 35094. Discovered by
+ Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities &
+ Mitigations team.
+ * libtiff/tif_write.c: fix issue in error code path of TIFFFlushData1()
+ that didn't reset the tif_rawcc and tif_rawcp members. I'm not
+ completely sure if that could happen in practice outside of the odd
+ behaviour of t2p_seekproc() of tiff2pdf). The report points that a
+ better fix could be to check the return value of TIFFFlushData1() in
+ places where it isn't done currently, but it seems this patch is enough.
+ Reported as MSVR 35095. Discovered by Axel Souchet & Vishal Chauhan &
+ Suha Can from the MSRC Vulnerabilities & Mitigations team.
+
+2016-09-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * html/man/index.html: Comment out links to documentation for
+ abandoned utilities.
+
+2016-09-17 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_lzma.c: typo fix in comment
+
+2016-09-04 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/*.c: fix warnings raised by clang 3.9 -Wcomma
+
+2016-09-03 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_dirwrite.c, libtiff/tif_color.c: fix warnings raised
+ by GCC 5 / clang -Wfloat-conversion
+
+2016-08-16 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiffcrop.c: fix C99'ism.
+
+2016-08-15 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiff2bw.c: fix weight computation that could result of color
+ value overflow (no security implication). Fix bugzilla #2550.
+ Patch by Frank Freudenberg.
+
+2016-08-15 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/rgb2ycbcr.c: validate values of -v and -h parameters to
+ avoid potential divide by zero. Fixes CVE-2016-3623 (bugzilla #2569)
+
+2016-08-15 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiffcrop.c: Fix out-of-bounds write in loadImage().
+ From patch libtiff-CVE-2016-3991.patch from
+ libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro (bugzilla #2543)
+
+2016-08-15 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_pixarlog.c: Fix write buffer overflow in PixarLogEncode
+ if more input samples are provided than expected by PixarLogSetupEncode.
+ Idea based on libtiff-CVE-2016-3990.patch from
+ libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro, but with different and
+ simpler check. (bugzilla #2544)
+
+2016-08-15 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiff2rgba.c: Fix integer overflow in size of allocated
+ buffer, when -b mode is enabled, that could result in out-of-bounds
+ write. Based initially on patch tiff-CVE-2016-3945.patch from
+ libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro, with correction for
+ invalid tests that rejected valid files. (bugzilla #2545)
+
+2016-07-11 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiffcrop.c: Avoid access outside of stack allocated array
+ on a tiled separate TIFF with more than 8 samples per pixel.
+ Reported by Kaixiang Zhang of the Cloud Security Team, Qihoo 360
+ (CVE-2016-5321 / CVE-2016-5323 , bugzilla #2558 / #2559)
+
+2016-07-10 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_read.c: Fix out-of-bounds read on
+ memory-mapped files in TIFFReadRawStrip1() and TIFFReadRawTile1()
+ when stripoffset is beyond tmsize_t max value (reported by
+ Mathias Svensson)
+
+2016-07-10 Even Rouault <even.rouault at spatialys.com>
+
+ * tools/tiffdump.c: fix a few misaligned 64-bit reads warned
+ by -fsanitize
+
+2016-07-03 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_read.c: make TIFFReadEncodedStrip() and
+ TIFFReadEncodedTile() directly use user provided buffer when
+ no compression (and other conditions) to save a memcpy().
+
+ * libtiff/tif_write.c: make TIFFWriteEncodedStrip() and
+ TIFFWriteEncodedTile() directly use user provided buffer when
+ no compression to save a memcpy().
+
+2016-07-01 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_luv.c: validate that for COMPRESSION_SGILOG and
+ PHOTOMETRIC_LOGL, there is only one sample per pixel. Avoid
+ potential invalid memory write on corrupted/unexpected images when
+ using the TIFFRGBAImageBegin() interface (reported by
+ Clay Wood)
+
+2016-06-28 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_pixarlog.c: fix potential buffer write overrun in
+ PixarLogDecode() on corrupted/unexpected images (reported by Mathias Svensson)
+ (CVE-2016-5875)
+
+2016-06-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/libtiff.def: Added _TIFFMultiply32 and _TIFFMultiply64
+ to libtiff.def
+
+2016-06-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/Makefile.am: The libtiff tools bmp2tiff, gif2tiff,
+ ras2tiff, sgi2tiff, sgisv, and ycbcr are completely removed from
+ the distribution. The libtiff tools rgb2ycbcr and thumbnail are
+ only built in the build tree for testing. Old files are put in
+ new 'archive' subdirectory of the source repository, but not in
+ distribution archives. These changes are made in order to lessen
+ the maintenance burden.
+
+2016-05-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_config.vc.h (HAVE_SNPRINTF): Add a '1' to the
+ HAVE_SNPRINTF definition.'
+
+2016-05-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_config.vc.h (HAVE_SNPRINTF): Applied patch by Edward
+ Lam to define HAVE_SNPRINTF for Visual Studio 2015.
+
+2016-04-27 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_dirread.c: when compiled with DEFER_STRILE_LOAD,
+ fix regression, introduced on 2014-12-23, when reading a one-strip
+ file without a StripByteCounts tag. GDAL #6490
+
+2016-04-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * html/bugs.html: Replace Andrey Kiselev with Bob Friesenhahn for
+ purposes of security issue reporting.
+
+2016-01-23 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/*: upstream typo fixes (mostly contributed by Kurt Schwehr)
+ coming from GDAL internal libtiff
+
+2016-01-09 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_fax3.h: make Param member of TIFFFaxTabEnt structure
+ a uint16 to reduce size of the binary.
+
+2016-01-03 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_read.c, tif_dirread.c: fix indentation issues raised
+ by GCC 6 -Wmisleading-indentation
+
+2015-12-27 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_pixarlog.c: avoid zlib error messages to pass a NULL
+ string to %s formatter, which is undefined behaviour in sprintf().
+
+2015-12-27 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode()
+ triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
+ (bugzilla #2508)
+
+2015-12-27 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
+ functions in non debug builds by replacing assert()s by regular if
+ checks (bugzilla #2522).
+ Fix potential out-of-bound reads in case of short input data.
+
+2015-12-26 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_getimage.c: fix out-of-bound reads in TIFFRGBAImage
+ interface in case of unsupported values of SamplesPerPixel/ExtraSamples
+ for LogLUV / CIELab. Add explicit call to TIFFRGBAImageOK() in
+ TIFFRGBAImageBegin(). Fix CVE-2015-8665 reported by limingxing and
+ CVE-2015-8683 reported by zzf of Alibaba.
+
+2015-12-21 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_dirread.c: workaround false positive warning of Clang Static
+ Analyzer about null pointer dereference in TIFFCheckDirOffset().
+
+2015-12-19 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_fax3.c: remove dead assignment in Fax3PutEOLgdal(). Found
+ by Clang Static Analyzer
+
+2015-12-18 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_dirwrite.c: fix truncation to 32 bit of file offsets in
+ TIFFLinkDirectory() and TIFFWriteDirectorySec() when aligning directory
+ offsets on a even offset (affects BigTIFF). This was a regression of the
+ changeset of 2015-10-19.
+
+2015-12-12 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_write.c: TIFFWriteEncodedStrip() and TIFFWriteEncodedTile()
+ should return -1 in case of failure of tif_encodestrip() as documented
+ * libtiff/tif_dumpmode.c: DumpModeEncode() should return 0 in case of
+ failure so that the above mentionned functions detect the error.
+
+2015-12-06 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/uvcode.h: const'ify uv_code array
+
+2015-12-06 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_dirinfo.c: const'ify tiffFields, exifFields,
+ tiffFieldArray and exifFieldArray arrays
+
+2015-12-06 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_print.c: constify photoNames and orientNames arrays
+
+2015-12-06 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_close.c, libtiff/tif_extension.c : rename link
+ variable to avoid -Wshadow warnings
+
+2015-11-22 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/*.c: fix typos in comments (patch by Kurt Schwehr)
+
+2015-11-22 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/*.c: fix MSVC warnings related to cast shortening and
+ assignment within conditional expression
+
+2015-11-18 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/*.c: fix clang -Wshorten-64-to-32 warnings
+
+2015-11-18 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_dirread.c: initialize double* data at line 3693 to NULL
+ to please MSVC 2013
+
+2015-11-17 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_dirread.c: prevent reading ColorMap or TransferFunction
+ if BitsPerPixel > 24, so as to avoid huge memory allocation and file
+ read attempts
+
+2015-11-02 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_dirread.c: remove duplicated assignment (reported by
+ Clang static analyzer)
+
+2015-10-28 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_dir.c, libtiff/tif_dirinfo.c, libtiff/tif_compress.c,
+ libtiff/tif_jpeg_12.c: suppress warnings about 'no previous
+ declaration/prototype'
+
+2015-10-19 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tiffiop.h, libtiff/tif_dirwrite.c: suffix constants by U to fix
+ 'warning: negative integer implicitly converted to unsigned type' warning
+ (part of -Wconversion)
+
+2015-10-17 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_dir.c, libtiff/tif_dirread.c, libtiff/tif_getimage.c,
+ libtiff/tif_print.c: fix -Wshadow warnings (only in libtiff/)
+
+2015-09-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff 4.0.6 released.
+
+ * html/v4.0.6.html: Added release notes for 4.0.6.
+
+2015-09-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/tiffgt.c: Silence glut API deprecation warnings on MacOS
+ X. Patch by Roger Leigh.
+
+ * Makefile.am: Added a 'coverity' rule to assist with Coverity
+ submissions.
+
+ * tools/tiff2pdf.c: Fix compiler warning about unused function
+ when JPEG is not available.
+
+ * tools/fax2ps.c (main): Detect failure to write to temporary
+ file.
+
+2015-09-05 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_dirread.c (TIFFReadDirEntryCheckRangeSlongSlong8):
+ Change implementation so that it does not sometimes overflow the
+ range of a 32-bit int and to avoid a signed vs unsigned compare
+ compiler warning.
+ (TIFF_INT64_MAX): Avoid use of platform-specific large constants.
+ (TIFF_UINT32_MAX): Avoid use of platform-specific large constants.
+
+2015-09-01 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * Makefile.am (distcheck-hook), configure.ac: Applied patches by
+ Roger Leigh (via tiff mailing list on 2015-09-01) to fix issue
+ with BSD make and to make use of cmake in 'distcheck' target
+ conditional on if cmake is available.
+
+ * CMakeLists.txt, Makefile.am, configure.ac: Applied patches by
+ Roger Leigh (via tiff mailing list on 2015-09-01).
+
+ CMake build is now included in 'distcheck' target.
+
+ Builds with CMake 2.8.9 and newer.
+
+ Tar is now resquested to use POSIX PAX format.
+
+2015-08-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * CMakeLists.txt, libtiff/test/Makefile.am: Applied patches by
+ Roger Leigh (via tiff mailing list on 2015-08-31.
+
+ CMake reads all version information directly from configure.ac to
+ avoid duplication of values. This basically greps over the file
+ for the LIBTIFF_* variables, then translates them to the form
+ needed for cmake. This includes the release version and libtool
+ shared library version information.
+
+ Make shared/static library building configurable. Currently it
+ always builds shared libraries, with static libs having a _static
+ suffix (copying zlib, but it means it's got a non-standard name).
+ CMake has a -DBUILD_SHARED_LIBS=ON|OFF option to select one or the
+ other, which is now used instead. There's now a single "tiff"
+ target to build either shared or static as required, and all the
+ tests and tools are linked with this. Note: the Windows tests fail
+ when linked with a static libtiff (says: libtiff.dll not found).
+ Not really a regression since this was not tested up to this
+ point, and it's likely the unit tests haven't (ever?) been run on
+ Windows with a static libtiff, so there's some additional
+ portability issue here to address. Works fine on UNIX systems,
+ and fine on Windows with the default to build a DLL.
+
+ Add a missing file which wasn't being distributed, causing unit
+ tests to fail. Note that "find . -name '*.cmake'" lists all the
+ CMake files which need distributing in addition to all the
+ CMakeLists.txt files (which now are distributed).
+
+2015-08-31 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_predict.c: pedantic change to add explicit masking
+ with 0xff before casting to uchar in floating-point horizontal
+ differencing and accumulation routines.
+
+2015-08-31 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_predict.c: fix generation of output with 16 bit
+ or 32 bit integer, when byte swapping is needed, in
+ horizontal predictor (#2521). Also fixes decoding when there is
+ a single pixel to code (unlikely case...) and byte swapping is
+ involved.
+
+2015-08-30 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_lzw.c: make nextdata a unsigned type to avoid
+ undefined behaviour with shifts (gcc -fsanitize=shift)
+
+2015-08-30 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_fax3.c, libtiff/tif_lzw.c, libtiff/tif_predict.c:
+ add explicit masking with 0xff before casting
+ to unsigned char (make icc -check=conversions happy)
+
+ * libtiff/tif_predict.c: operate on unsigned datatypes when
+ computing/applying differences to avoid undefined behaviour of
+ signed types (C standard compliance)
+
+2015-08-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * configure.ac: libtiff 4.0.5 released.
+
+2015-08-29 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * CMakeLists.txt: Applied patch by Roger Leigh (via tiff mailing
+ list on 2015-08-29) to add ld-version-script option to cmake build
+ to match autoconf. Note: defaults to 'on' to be ABI-compatible by
+ default with common Linux distribution builds. Note that the
+ autoconf configure script defaults to 'off'.
+
+ * html/build.html: Applied patch by Roger Leigh (via tiff mailing
+ list on 2015-08-29) to describe how to use CMake to build libtiff.
+
+2015-08-28 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * html/v4.0.5.html: Added HTML file describing the changes which
+ will appear in the 4.0.5 release.
+
+2015-08-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tiffiop.h: For MinGW comiles, make sure that build
+ supports necessary __MSVCRT_VERSION__ (at least at least 0x800).
+ Otherwise large files can not be supported for POSIX-style I/O.
+
+ * tools/fax2tiff.c (main): Eliminate a compiler warning in 64-bit
+ builds about cast to thandle_t.
+
+ * test/rewrite_tag.c (main): Does not require any arguments.
+
+2015-08-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/CMakeLists.txt, port/snprintf.c: Patch by Roger Leigh to
+ fix build issues when using Cmake due to Windows large file
+ changes.
+
+2015-08-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tiffiop.h: First cut at supporting large files under
+ Microsoft Windows using tif_unix.c and the libtiff tools. This
+ only works if the Windows CDK is new enough to support the APIs
+ used (Visual C++ 2005 or later). Support for large files is not
+ actually tested yet.
+
+2015-08-15 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_jpeg.c: Applied patch by Räisä Olli to assure that
+ client_data is initialized to a known value, and to report an
+ error on two memory allocation failures.
+
+2015-08-13 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * CMakeLists.txt: Applied patch by Roger Leigh to fix libtiffxx
+ symbol versioning. Patch was mailed to libtiff list on Thu, 13
+ Aug 2015.
+
+2015-07-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * cmake: Add d suffix to debug libraries with MSVC. Patch #3 of 3
+ by Roger Leigh posted to tiff list on Wed, 1 Jul 2015 15:58:20
+ +0100.
+
+ * cmake: Add extra warning flags. Patch #2 of 3 by Roger Leigh
+ posted to tiff list on Wed, 1 Jul 2015 15:58:20 +0100.
+
+ * cmake: Correct snprintf fallback for VS2015. Patch #1 of 3 by
+ Roger Leigh posted to tiff list on Wed, 1 Jul 2015 15:58:20 +0100.
+
+2015-06-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * CMakeLists.txt: Add CMake patchset by Roger Leigh as posted to
+ libtiff mailing list on Mon, 22 Jun 2015 21:21:01 +0100. Several
+ corrections to ensure that the autotools build still works were
+ added by me. I have not yet tested the build using 'cmake' or
+ MSVC with 'nmake'.
+
+2015-06-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * test/Makefile.am: tiff2rgba-quad-tile.jpg.sh depends on the JPEG
+ library so only execute if JPEG is available.
+
+ * libtiff 4.0.4 released.
+
+ * configure.ac: Add a HAVE_FOO Automake conditional for each
+ add-on library.
+
+ * test/Makefile.am (JPEG_DEPENDENT_CHECK_PROG): raw_decode
+ requires JPEG support to compile. Use Automake conditional to
+ only include it when JPEG support is available.
+
+ * html/build.html: Try to improve the nmake-based VC++ build
+ description.
+
+ * libtiff/tiffconf.vc.h: Build fixes based on testing.
+
+ * libtiff/tif_config.vc.h: Build fixes based on testing.
+
+ * libtiff/libtiff.def: TIFFRasterScanline does not exist so remove
+ export for it.
+
+2015-06-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_config.vc.h: Make adjustments to match the new
+ definitions that configure produces, including for WIN64. Still
+ needs to be tested.
+
+ * configure.ac: For 64-bit MinGW, fix SSIZE_FORMAT formatting
+ specifier. 64-bit MinGW supports 'long long' but support for
+ 'lld' is not assured by the run-time DLLs and so GCC warns.
+ Add TIFF_SIZE_T and TIFF_SIZE_FORMAT to provide a type definition
+ and printf format specifier to deal with printing values of
+ 'size_t' type. In particular, this was necessary for WIN64.
+ Added a configure test for if the system headers provide 'optarg'
+ (normal case) and block out the many explicit 'extern' statements
+ in the utilities. This was found to be necessary under Windows
+ when getopt is in a DLL and the symbols are already imported with
+ dllimport via standard header files.
+
+ * test/raw_decode.c (XMD_H): Avoid conflicting typedefs for INT32
+ and boolean in MinGW build due to including jpeglib.h.
+
+ * test/rewrite_tag.c (main): Fix problem with location of variable
+ declaration.
+
+ * libtiff/libtiff.def: Added exports for TIFFGetConfiguredCODECs,
+ TIFFReadRGBAImageOriented, TIFFSetCompressionScheme,
+ TIFFSwabArrayOfTriples, TIFFVGetFieldDefaulted, _TIFFCheckRealloc,
+ TIFFRasterScanline, TIFFSetErrorHandlerExt,
+ TIFFSetWarningHandlerExt, TIFFNumberOfDirectories,
+ TIFFCreateCustomDirectory, TIFFCreateEXIFDirectory,
+ TIFFWriteCustomDirectory, _TIFFRewriteField as recommended by
+ Roger Leigh and justified by use in libtiff tests, documentation,
+ and changelog notes. Also sorted symbol list and removed
+ duplicate entries.
+
+2015-06-16 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_getimage.c: Fix four Coverity issues related to
+ unintended sign extension.
+
+2015-06-16 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_unix.c: fix compilation with MSVC (fix by Jeff McKenna)
+
+2015-06-14 Lee Howard <faxguy@howardsilvan.com>
+
+ * libtiff/tif_unix.c: contribution from Vadim Zeitlin on
+ Bugzilla Bug #2510 fixes several harmless but still annoying
+ warnings
+
+ * configure: contribution from Ludolf Holzheid on Bugzilla
+ Bug #2498. Adds an option to select the file I/O style on
+ Windows hosts.
+
+ * libtiff/tif_getimage.c: contribution from Gary Cramblitt
+ on Bugzilla Bug #2409. Correct reading of certain tiled TIFFs.
+
+ * configure, configure.ac: contribution from Marcos H. Woehrmann
+ on Bugzilla Bug #2405. Correct shell equality operator.
+
+ * tools/tiffgt.c (raster_draw): contribution from Jay Berkenbilt
+ on Bugzilla Bug #2401. Appropriately call glFlush().
+
+ * tools/tiff2pdf.c: change ColorTransform from "0" to "1"
+ following Bugzilla Bug #2150.
+
+2015-06-13 Lee Howard <faxguy@howardsilvan.com>
+
+ * libtiff/tif_lzw.c: contribution from Andy Cave - decode
+ files that contain consecutive CODE_CLEAR codes.
+
+ * tools/tiff2pdf.c: contribution from Antti S. Lankila on
+ Bugzilla Bug #2078. Suppress initial output of the header.
+
+ * tools/tiff2pdf.c: contribution from Yuriy M. Kaminskiy -
+ Take care in using the return value from snprintf().
+
+ * tools/tiffcrop.c: contribution from Eduardo Robles Elvira -
+ correctly copy the compression tag from the source TIFF.
+
+ * tools/tiff2ps.c: contribution from Eduardo Robles Elvira -
+ correct sizing and scaling problems with output document.
+
+2015-06-10 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_jpeg.c (JPEGDecode): Split JPEGDecode() into two
+ clean implementations in order to avoid pre-processor hell. Only
+ one of the implementations is used in a given build.
+
+2015-06-08 Even Rouault <even.rouault at spatialys.com>
+
+ * libtiff/tif_jpeg.c: Fix compilation in BITS_IN_JSAMPLE == 12
+ case
+
+2015-06-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_write.c (TIFFWriteEncodedStrip): Fix Coverity 715975
+ "Division or modulo by zero".
+ (TIFFWriteEncodedTile): Fix Coverity 715976 and 715977 "Division
+ or modulo by zero".
+ (TIFFWriteRawStrip): Fix Coverity 715978 "Division or modulo by
+ zero".
+ (TIFFWriteScanline): Fix Coverity 715979 "Division or modulo by
+ zero".
+
+ * libtiff/tif_read.c (TIFFStartTile): Fix Coverity 715973 and
+ 715974 "Division or modulo by zero".
+
+2015-05-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_dir.c (TIFFNumberOfDirectories): Quiet Coverity
+ 1134470 "Logically dead code" by making the roll-over check
+ explicit.
+
+ * libtiff/tif_luv.c (LogLuvDecodeTile): Fix Coverity 991227
+ "Division or modulo by zero".
+ (LogLuvDecodeStrip): Fix Coverity 991239 "Division or modulo by
+ zero".
+ (LogLuvEncodeStrip): Fix Coverity 991240 "Division or modulo by
+ zero".
+ (LogLuvEncodeTile): Fix Coverity 991241 "Division or modulo by
+ zero".
+
+ * libtiff/tif_dirread.c (TIFFReadDirEntryDoubleArray): Fix
+ Coverity 298626 "Logically dead code".
+ (TIFFReadDirEntryFloatArray): Fix Coverity 298627 "Logically dead
+ code".
+ (TIFFReadDirEntryIfd8Array): Fix Coverity 298628 "Logically dead
+ code".
+ (TIFFReadDirEntrySlong8Array): Fix Coverity 298629 "Logically dead
+ code"
+
+ * libtiff/tif_dir.c (TIFFNumberOfDirectories): Don't depend on ++
+ operator precedenc in evaluation. Might quench Coverity 1134470
+ "Logically dead code".
+
+ * libtiff/tif_jpeg.c (JPEGDecode): Fix Coverity 602597 "Operands
+ don't affect result". This change uses ifdefs to include
+ applicable code based on properties of libjpeg. Still needs to be
+ re-tested with 12-bit "6b" and "MK1".
+
+2015-05-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_dirwrite.c (_TIFFRewriteField): Fix Coverity 1024310
+ "Resource leak".
+
+ * libtiff/tif_ojpeg.c (OJPEGReadHeaderInfoSecStreamDht): Fix
+ Coverity 601720 "Resource leak".
+
+ * libtiff/tif_jpeg.c (JPEGCleanup): Fix Coverity 298624
+ "Dereference before null check".
+
+ * libtiff/tif_ojpeg.c (OJPEGReadBufferFill): Fix Coverity 603400
+ "Missing break in switch".
+
+ * contrib/addtiffo/tif_overview.c (TIFF_DownSample): Check buffer
+ size calculation for overflow.
+
+ * contrib/addtiffo/addtiffo.c (main): Possibly address Coverity
+ 1024226 "Untrusted value as argument".
+
+ * tools/gif2tiff.c (readgifimage): Fix Coverity 1024222 "Untrusted
+ value as argument".
+ (checksignature): Fix Coverity 1024894 "Ignoring number of bytes
+ read".
+ (readextension): Fix Coverity 1024893 "Ignoring number of bytes
+ read".
+ (readgifimage): Fix Coverity 1024890 "Ignoring number of bytes
+ read".
+ (readraster): Fix Coverity 1024891 "Ignoring number of bytes
+ read".
+ (readgifimage): Fix Coverity 1024892 "Ignoring number of bytes
+ read".
+
+ * tools/tiff2pdf.c (t2p_readwrite_pdf_image): Fix Coverity 1024181
+ "Structurally dead code".
+
+ * tools/raw2tiff.c (main): Fix Coverity 1024887 "Unchecked return
+ value from library".
+ (guessSize): Fix Coverity 1024888 "Unchecked return value from
+ library".
+ (guessSize): Fix Coverity 1214162 "Ignoring number of bytes read".
+ (guessSize): Fix Coverity 1024889 "Unchecked return value from
+ library".
+
+ * tools/tiff2pdf.c (t2p_readwrite_pdf_image): Fix Coverity 298621
+ "Resource leak".
+ (t2p_readwrite_pdf_image): Fix Coverity 1024181 "Structurally dead
+ code".
+ (t2p_write_pdf): Fix Coverity 1227690 "Unused value".
+
+2015-05-29 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * contrib/iptcutil/iptcutil.c (formatIPTC): Fix Coverity 1024468
+ "Infinite loop".
+ (formatIPTC): Fix Coverity 1024727 "Truncated stdio return value".
+ (formatIPTC): Fix Coverity 1214240 "Untrusted loop bound".
+
+2015-05-28 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * contrib/addtiffo/tif_ovrcache.c (TIFFCreateOvrCache): Fix
+ Coverity 298615 "Resource leak".
+ (TIFFGetOvrBlock): Fix Coverity 1024649 "Unintended sign
+ extension".
+
+ * tools/bmp2tiff.c (main): Fix Coverity 1024225 "Untrusted value
+ as argument".
+ (main): Fix Coverity 1024678 "Unchecked return value from
+ library".
+ (main): Fix Coverity 1024679 "Unchecked return value from
+ library".
+ (main): Fix Coverity 1214160 "Ignoring number of bytes read".
+
+ * contrib/addtiffo/tif_ovrcache.c (TIFFCreateOvrCache): Fix
+ Coverity 298615 "Resource leak".
+
+ * tools/tiffcp.c: Fix Coverity 1024306, 1024307, 1024308, 1024309
+ "Resource leak".
+
+ * tools/tiffsplit.c (cpTiles): Fix Coverity 1024304 "Resource
+ leak".
+ (cpStrips): Fix Coverity 1024305 "Resource leak".
+
+2015-05-27 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/ras2tiff.c: Fix Sun Raster header definition to be safe
+ for 64-bit systems. Add some header validations. Should fix many
+ Coverity issues.
+ (main): Fix Coverity 1301206: "Integer handling issues (BAD_SHIFT)".
+ (main): Quiet Coverity 1024223 "Untrusted value as argument".
+
+ * tools/tiffmedian.c (GetInputLine): Fix Coverity 1024795 "Nesting
+ level does not match indentation".
+ (get_histogram): Quiet Coverity 1024386 "Out-of-bounds read".
+ This was a benign mis-diagnosis but added code to enforce against
+ buffer overflow.
+
+ * tools/tiffcrop.c (ROTATE_ANY): Fix Coverity 1294542 "Logical
+ vs. bitwise operator".
+ (readContigStripsIntoBuffer): Fix Coverity 1024545 "Division or
+ modulo by zero".
+ (readContigTilesIntoBuffer): Fix Coverity 1024586 "Logically dead
+ code".
+ (writeSingleSection): Fix Coverity 1024796 "Nesting level does not
+ match indentation".
+ (writeCroppedImage): Fix Coverity 1024797 "Nesting level does not
+ match indentation".
+ (loadImage): Fix Coverity 1299741 "Dereference before null check".
+ (loadImage): Fix Coverity 1299740 "Out-of-bounds write".
+
+2015-03-02 Even Rouault <even.rouault@spatialys.com>
+
+ * tools/tiffdither.c: check memory allocations to avoid writing to
+ NULL pointer. Also check multiplication overflow. Fixes #2501,
+ CVE-2014-8128. Derived from patch by Petr Gajdos.
+
+2015-01-26 Even Rouault <even.rouault@spatialys.com>
+
+ * add html/v4.0.4beta.html under version control
+ * HOWTO-RELEASE: write that cvs add html/vX.X.html must be used
+
+2015-01-26 Even Rouault <even.rouault@spatialys.com>
+
+ * libtiff 4.0.4beta released
+
+2015-01-26 Even Rouault <even.rouault@spatialys.com>
+
+ * automake: updated to 1.15
+ * libtool: updated to 2.4.5
+
+2015-01-22 Even Rouault <even.rouault@spatialys.com>
+
+ * tools/tiff2pdf.c: Fix two crashes (oCERT-2014-013)
+
+2015-01-05 Frank Warmerdam <warmerdam@pobox.com>
+
+ * html/bugs.html: remove note about needing to email the tiff mailing
+ list administrator about being approved for membership, this appears
+ not to be true.
+
+2015-01-05 Olivier Paquet <olivier.paquet@gmail.com>
+
+ * tools/tiff2pdf.c: Fixed unsigned integer addition overflow detection.
+
+2015-01-03 Even Rouault <even.rouault@spatialys.com>
+
+ * libtiff/tif_dirread.c: in TIFFCheckDirOffset(), avoid uint16 overflow
+ when reading more than 65535 directories, and effectively error out when
+ reaching that limit.
+
+2014-12-29 Even Rouault <even.rouault@spatialys.com>
+
+ * libtiff/tif_jpeg.c: in JPEGFixupTags(), recognize SOF2, SOF9 and SOF10
+ markers to avoid emitting a warning (even if, according to the TechNote,
+ there are admitedly unusual/not recommended or even forbidden variants, but
+ they do work well with libjpeg for SOF2, and with libjpeg-turbo for SOF2,
+ SOF9 and SOF10).
+ Define in_color_space and input_components to the right values in
+ JPEGSetupEncode(), before calling jpeg_set_defaults(), as specified by
+ libjpeg API documentation, so as to be compatible with mozjpeg library.
+ Note: the default settings of mozjpeg will produce progressive scans, which
+ is forbidden by the TechNote.
+
+2014-12-29 Even Rouault <even.rouault@spatialys.com>
+
+ * libtiff/tif_getimage.c: move test on vertical value of YCbCr subsampling.
+ to avoid buffer leak (fix previous fix, found by Coverity scan)
+
+2014-12-29 Even Rouault <even.rouault@spatialys.com>
+
+ * libtiff/tif_next.c: add new tests to check that we don't read outside of
+ the compressed input stream buffer.
+
+ * libtiff/tif_getimage.c: in OJPEG case, fix checks on strile width/height
+ in the putcontig8bitYCbCr42tile, putcontig8bitYCbCr41tile and
+ putcontig8bitYCbCr21tile cases.
+
+2014-12-27 Even Rouault <even.rouault@spatialys.com>
+
+ * libtiff/tif_dir.c: in TIFFDefaultDirectory(), reset any already existing
+ extented tags installed by user code through the extender mechaninm before
+ calling the extender callback (GDAL #5054)
+
+2014-12-26 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/tiffcrop.c: Fix warnings about variables set but not used.
+
+ * contrib/iptcutil/iptcutil.c: Fix warnings about variables set
+ but not used.
+
+ * tools/tiffgt.c: Fix warnings about unused parameters.
+
+ * libtiff/tif_stream.cxx: Fix warnings about unused parameters.
+
+2014-12-25 Even Rouault <even.rouault@spatialys.com>
+
+ * libtiff/tif_getimage.c, libtiff/tif_ojpeg.c, libtiff/tif_zip.c: fix
+ various typos found by Debian lintian tool (GDAL #5756)
+
+2014-12-24 Even Rouault <even.rouault@spatialys.com>
+
+ * libtiff/tif_getimage.c: avoid divide by zero on invalid YCbCr subsampling.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2235
+
+2014-12-24 Even Rouault <even.rouault@spatialys.com>
+
+ * tools/tiff2pdf.c: fix buffer overflow on some YCbCr JPEG compressed images.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2445
+
+2014-12-24 Even Rouault <even.rouault@spatialys.com>
+
+ * tools/tiff2pdf.c: fix buffer overflow on YCbCr JPEG compressed image.
+ Derived from patch by Petr Gajdos,
+ http://bugzilla.maptools.org/show_bug.cgi?id=2443
+
+2014-12-23 Even Rouault <even.rouault@spatialys.com>
+
+ * libtiff/tif_dirread.c: In EstimateStripByteCounts(), check return code
+ of _TIFFFillStriles(). This solves crashing bug on corrupted
+ images generated by afl.
+
+2014-12-23 Even Rouault <even.rouault@spatialys.com>
+
+ * libtiff/tif_read.c: fix several invalid comparisons of a uint64 value with
+ <= 0 by casting it to int64 first. This solves crashing bug on corrupted
+ images generated by afl.
+
+2014-12-21 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/tiffdump.c: Guard against arithmetic overflow when
+ calculating allocation buffer sizes.
+
+2014-12-21 Even Rouault <even.rouault@spatialys.com>
+
+ * tools/tiff2bw.c: when Photometric=RGB, the utility only works if
+ SamplesPerPixel = 3. Enforce that
+ http://bugzilla.maptools.org/show_bug.cgi?id=2485 (CVE-2014-8127)
+
+2014-12-21 Even Rouault <even.rouault@spatialys.com>
+
+ * tools/pal2rgb.c, tools/thumbnail.c: fix crash by disabling TIFFTAG_INKNAMES
+ copying. The right fix would be to properly copy it, but not worth the burden
+ for those esoteric utilities.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2484 (CVE-2014-8127)
+
+2014-12-21 Even Rouault <even.rouault@spatialys.com>
+
+ * tools/thumbnail.c: fix out-of-buffer write
+ http://bugzilla.maptools.org/show_bug.cgi?id=2489 (CVE-2014-8128)
+
+2014-12-21 Even Rouault <even.rouault@spatialys.com>
+
+ * tools/thumbnail.c, tools/tiffcmp.c: only read/write TIFFTAG_GROUP3OPTIONS
+ or TIFFTAG_GROUP4OPTIONS if compression is COMPRESSION_CCITTFAX3 or
+ COMPRESSION_CCITTFAX4
+ http://bugzilla.maptools.org/show_bug.cgi?id=2493 (CVE-2014-8128)
+
+2014-12-21 Even Rouault <even.rouault@spatialys.com>
+
+ * libtiff/tif_next.c: check that BitsPerSample = 2. Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2487 (CVE-2014-8129)
+
+2014-12-21 Even Rouault <even.rouault@spatialys.com>
+
+ * tools/tiff2pdf.c: check return code of TIFFGetField() when reading
+ TIFFTAG_SAMPLESPERPIXEL
+
+2014-12-21 Even Rouault <even.rouault@spatialys.com>
+
+ * tools/tiffcp.c: fix crash when converting YCbCr JPEG-compressed to none.
+ Based on patch by Tomasz Buchert (http://bugzilla.maptools.org/show_bug.cgi?id=2480)
+ Description: fix for Debian bug #741451
+ tiffcp crashes when converting JPEG-encoded TIFF to a different
+ encoding (like none or lzw). For example this will probably fail:
+ tiffcp -c none jpeg_encoded_file.tif output.tif
+ The reason is that when the input file contains JPEG data,
+ the tiffcp code forces conversion to RGB space. However,
+ the output normally inherits YCbCr subsampling parameters
+ from the input, which leads to a smaller working buffer
+ than necessary. The buffer is subsequently overrun inside
+ cpStripToTile() (called from writeBufferToContigTiles).
+ Note that the resulting TIFF file would be scrambled even
+ if tiffcp wouldn't crash, since the output file would contain
+ RGB data intepreted as subsampled YCbCr values.
+ This patch fixes the problem by forcing RGB space on the output
+ TIF if the input is JPEG-encoded and output is *not* JPEG-encoded.
+ Author: Tomasz Buchert <tomasz.buchert@inria.fr>
+
+2014-12-21 Even Rouault <even.rouault@spatialys.com>
+
+ Fix various crasher bugs on fuzzed images.
+ * libtiff/tif_dir.c: TIFFSetField(): refuse to set negative values for
+ TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION that cause asserts when writing
+ the directory
+ * libtiff/tif_dirread.c: TIFFReadDirectory(): refuse to read ColorMap or
+ TransferFunction if BitsPerSample has not yet been read, otherwise reading
+ it later will cause user code to crash if BitsPerSample > 1
+ * libtiff/tif_getimage.c: TIFFRGBAImageOK(): return FALSE if LOGLUV with
+ SamplesPerPixel != 3, or if CIELAB with SamplesPerPixel != 3 or BitsPerSample != 8
+ * libtiff/tif_next.c: in the "run mode", use tilewidth for tiled images
+ instead of imagewidth to avoid crash
+ * tools/bmp2tiff.c: fix crash due to int overflow related to input BMP dimensions
+ * tools/tiff2pdf.c: fix crash due to invalid tile count (should likely be checked by
+ libtiff too). Detect invalid settings of BitsPerSample/SamplesPerPixel for CIELAB / ITULAB
+ * tools/tiffcrop.c: fix crash due to invalid TileWidth/TileHeight
+ * tools/tiffdump.c: fix crash due to overflow of entry count.
+
+2014-12-15 Even Rouault <even.rouault@spatialys.com>
+
+ * libtiff/tif_jpeg.c: Fix regression introduced on 2010-05-07 that caused
+ all tiles/strips to include quantization tables even when the jpegtablesmode
+ had the JPEGTABLESMODE_QUANT bit set.
+ Also add explicit removal of Huffman tables when jpegtablesmode has the
+ JPEGTABLESMODE_HUFF bit set, which avoids Huffman tables to be emitted in the
+ first tile/strip (only useful in update scenarios. create-only was
+ fine)
+
+2014-12-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/tiff2pdf.c: Assure that memory size calculations for
+ _TIFFmalloc() do not overflow the range of tmsize_t.
+
+2014-12-07 Even Rouault <even.rouault@spatialys.com>
+
+ * tools/thumbnail.c, tools/tiffcrop.c: "fix" heap read over-run found with
+ Valgrind and Address Sanitizer on test suite
+
+2014-12-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/tiff2pdf.c (t2p_read_tiff_init): TIFFTAG_TRANSFERFUNCTION
+ tag can return one channel, with the other two channels set to
+ NULL. The tiff2pdf code was expecting that other two channels
+ were duplicate pointers in the case where there is only one
+ channel. Detect this condition in order to avoid a crash, and
+ presumably perform correctly with just one channel.
+
+2014-12-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/tiffdump.c: Fix double-free bug.
+
+2014-11-27 Even Rouault <even.rouault@spatialys.com>
+
+ * libtiff/tif_config.vc.h: no longer use "#define snprintf _snprintf" with
+ Visual Studio 2015 aka VC 14 aka MSVC 1900
+
+2014-11-20 Even Rouault <even.rouault@spatialys.com>
+
+ * libtiff/tif_lzw.c: prevent potential null dereference of
+ sp->dec_codetab in LZWPreDecode (bug #2459)
+
+ * libtiff/tif_read.c: in TIFFReadBufferSetup(), avoid passing -1 size
+ to TIFFmalloc() if passed user buffer size is 0 (bug #2459)
+
+ * libtiff/tif_ojpeg.c: make Coverity happier (not a bug, #2459)
+
+ * libtiff/tif_dir.c: in _TIFFVGetField() and _TIFFVSetField(), make
+ Coverity happier (not a bug, #2459)
+
+ * libtiff/tif_dirread.c: in TIFFFetchNormalTag(), make Coverity happier
+ (not a bug, #2459)
+
+ * tools/tiff2pdf.c: close PDF file (bug #2479)
+
+ * tools/fax2ps.c: check malloc()/realloc() result (bug #2470)
+
+ * tools/tiffdump.c: detect cycle in TIFF directory chaining (bug #2463)
+ and avoid passing a NULL pointer to read() if seek() failed before (bug #2459)
+
+ * tools/tiffcrop.c: fix segfault if bad value passed to -Z option
+ (bug #2459) and add missing va_end in dump_info (#2459)
+
+ * tools/gif2tif.c: apply patch for CVE-2013-4243 (#2451)
+
+2014-11-20 Even Rouault <even.rouault@spatialys.com>
+ * libtiff/tif_jpeg.c: fix segfault in JPEGFixupTagsSubsampling() on
+ corrupted image where tif->tif_dir.td_stripoffset == NULL (bug #2471)
+
+2014-11-20 Even Rouault <even.rouault@spatialys.com>
+ * automake: updated to 1.14.1
+ * libtool: updated to 2.4.3
+ * HOWTO-RELEASE: small update about autotools building order
+
+2014-10-20 Olivier Paquet <olivier.paquet@gmail.com>
+ * tools/tiff2pdf.c: Preserve input file directory order when pages
+ are tagged with the same page number.
+
+2014-08-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_dirread.c (TIFFReadDirEntryOutputErr): Incorrect
+ count for tag should be a warning rather than an error since
+ errors terminate processing.
+
+2014-06-07 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/tiff2rgba.c (]): Fixed tiff2rgba usage message in that zip
+ was wrongly described. Fix suggested by Miguel Medalha.
+
+2014-05-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_dirinfo.c (TIFFField) : Fix data type for
+ TIFFTAG_GLOBALPARAMETERSIFD tag. Patch by Steve Underwood.
+ Reviewed and forwarded by Lee Howard.
+
+2013-11-30 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_dir.c: fix last fix for TIFFNumberOfDirectories()
+
+2013-10-21 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tif_dir.c: generate error in case of directory count
+ overflow.
+
+2013-10-01 Frank Warmerdam <warmerdam@pobox.com>
+
+ * libtiff/tiff.h, libtiff/tif_dirinfo.c: add definitions for
+ TIFF/EP CFARepeatPatternDim and CFAPattern tags (bug #2457)
+
+2013-09-12 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff/tif_dir.c (TIFFAdvanceDirectory): If nextdir is found to
+ be defective, then set it to zero before returning error in order
+ to terminate processing of truncated TIFF. Issue found and fix
+ suggested by Richard Nolde.
+
+2013-08-14 Frank Warmerdam <warmerdam@pobox.com>
+
+ * tools/gif2tiff.c: fix possible OOB write (#2452, CVE-2013-4244)
+
+2013-08-13 Frank Warmerdam <warmerdam@pobox.com>
+
+ * tools/gif2tiff.c: Be more careful about corrupt or
+ hostile input files (#2450, CVE-2013-4231)
+
+ * tools/tiff2pdf.c: terminate after failure of allocating
+ ycbcr buffer (bug #2449, CVE-2013-4232)
+
+2013-07-09 Frank Warmerdam <warmerdam@google.com>
+
+ * tools/tiffinfo.c: Default various values fetched with
+ TIFFGetField() to avoid being uninitialized.
+
+2013-05-02 Tom Lane <tgl@sss.pgh.pa.us>
+
+ * tools/tiff2pdf.c: Rewrite JPEG marker parsing in
+ t2p_process_jpeg_strip to be at least marginally competent. The
+ approach is still fundamentally flawed, but at least now it won't
+ stomp all over memory when given bogus input. Fixes CVE-2013-1960.
+
+2013-05-02 Tom Lane <tgl@sss.pgh.pa.us>
+
+ * contrib/dbs/xtiff/xtiff.c, libtiff/tif_codec.c,
+ libtiff/tif_dirinfo.c, tools/rgb2ycbcr.c, tools/tiff2bw.c,
+ tools/tiff2pdf.c, tools/tiff2ps.c, tools/tiffcrop.c,
+ tools/tiffdither.c: Enlarge some fixed-size buffers that weren't
+ large enough, and eliminate substantially all uses of sprintf(buf,
+ ...) in favor of using snprintf(buf, sizeof(buf), ...), so as to
+ protect against overflow of fixed-size buffers. This responds in
+ particular to CVE-2013-1961 concerning overflow in tiff2pdf.c's
+ t2p_write_pdf_page(), but in general it seems like a good idea to
+ deprecate use of sprintf().
+
+2013-03-29 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * configure.ac: Applied patch by Brad Smith to improve pkg-config
+ static linking by adding -lm to Libs.private when needed.
+
+2013-03-05 Tom Lane <tgl@sss.pgh.pa.us>
+
+ * html/man/tiff2ps.1.html, html/man/tiffcp.1.html,
+ html/man/tiffdither.1.html, man/tiff2ps.1, man/tiffcp.1,
+ man/tiffdither.1, tools/tiff2ps.c, tools/tiffcp.c,
+ tools/tiffdither.c: Sync tool usage printouts and man pages with
+ reality (quite a few options had escaped being documented in one
+ or both places). Per an old report from Miroslav Vadkerti.
+
+2013-01-25 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/tiff2ps.c:Fix bug in auto rotate option code. Once a
+ rotation angle was set by the auto rotate check, it was retained
+ for all pages that followed instead ofa being retested for each
+ page. Patch by Richard Nolde.
+
+2013-01-18 Frank Warmerdam <warmerdam@google.com>
+
+ * libtiff/tif_write.c: tmsize_t related casting warning fixed for
+ 64bit linux.
+
+ * libtiff/tif_read.c: uint64/tmsize_t change for MSVC warnings.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2427
+
+2012-12-20 Tom Lane <tgl@sss.pgh.pa.us>
+
+ * test/raw_decode.c: Relax raw_decode's pixel-value checks so that
+ it will pass with more versions of libjpeg. (There are at least
+ three in active use now, and JPEG_LIB_VERSION doesn't tell us
+ enough to uniquely identify expected results.)
+
+2012-12-12 Tom Lane <tgl@sss.pgh.pa.us>
+
+ * libtiff/tif_print.c: Fix TIFFPrintDirectory's handling of
+ field_passcount fields: it had the TIFF_VARIABLE and
+ TIFF_VARIABLE2 cases backwards.
+
+2012-12-10 Tom Lane <tgl@sss.pgh.pa.us>
+
+ * tools/ppm2tiff.c: Improve previous patch for CVE-2012-4564:
+ check the linebytes calculation too, get the max() calculation
+ straight, avoid redundant error messages, check for malloc
+ failure.
+
+2012-12-10 Tom Lane <tgl@sss.pgh.pa.us>
+
+ * libtiff/tif_pixarlog.c: Improve previous patch for CVE-2012-4447
+ (to enlarge tbuf for possible partial stride at end) so that
+ overflow in the integer addition is detected. Per gripe from
+ Huzaifa Sidhpurwala.
+
+2012-12-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * tools/tiffset.c: tiffset now supports a -u option to unset a
+ tag. Patch by Zach Baker. See
+ http://bugzilla.maptools.org/show_bug.cgi?id=2419
+
+2012-11-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * automake: Update Automake to 1.12.5 release.
+
+ * libtiff/tif_{unix,vms,win32}.c (_TIFFmalloc): ANSI C does not
+ require malloc() to return NULL pointer if requested allocation
+ size is zero. Assure that _TIFFmalloc does.
+
+2012-11-01 Frank Warmerdam <warmerdam@pobox.com>
+
+ * tools/ppm2tiff.c: avoid zero size buffer vulnerability.
+ CVE-2012-4564 - Thanks to Huzaifa Sidhpurwala of the
+ Red Hat Security Response team for the fix.
+
+2012-10-18 Frank Warmerdam <warmerdam@google.com>
+
+ * tif_zip.c: Avoid crash on NULL error messages.
+
+2012-09-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * libtiff 4.0.3 released.
+
+2012-09-20 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * Makefile.am: Update to Automake 1.12.4
+
+2012-08-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * Makefile.in: Update to Automake 1.12.3
+
+ * libtiff{tiff.h, tif_print.c, tif_dirinfo.c, tif_dirread.c}: Add
+ some TIFF/FX support in libtiff. Add the tag definitions to
+ tiff.h. Add the related TIFF field definitions to tif_dirinfo.c,
+ and also fixes an error in a comment. Adds the photometric values
+ to tif_print.c, and fixes a bug. These changes are by Steve
+ Underwood.
+
+2012-08-13 Frank Warmerdam <warmerdam@google.com>
+
+ * libtiff/tif_write.c: Fix bug rewriting image tiles in a
+ compressed file: http://trac.osgeo.org/gdal/ticket/4771
+
+2012-08-02 Frank Warmerdam <warmerdam@google.com>
+
+ * libtiff/tif_dirread.c: report error in case of mismatch value
+ counts for tags (ie. DotRange).
+
+2012-07-26 Tom Lane <tgl@sss.pgh.pa.us>
+
+ * libtiff/{tiffio.h, tif_dirinfo.c, libtiff.def}: Add six new
+ functions TIFFFieldTag(), TIFFFieldName(), TIFFFieldDataType(),
+ TIFFFieldPassCount(), TIFFFieldReadCount(), TIFFFieldWriteCount()
+ as external accessors for the opaque type TIFFField.
+
+ * tools/tiffset.c: Make tiffset use the above functions instead of
+ relying on library private headers.
+
+2012-07-19 Tom Lane <tgl@sss.pgh.pa.us>
+
+ * tools/tiff2pdf.c: Fix two places where t2p_error didn't get set
+ after a malloc failure. No crash risk AFAICS, but the program
+ might not report exit code 1 as desired. h/t mancha@mac.hush.com
+
+2012-07-18 Tom Lane <tgl@sss.pgh.pa.us>
+
+ * tools/tiff2pdf.c: Fail when TIFFSetDirectory() fails. This
+ prevents core dumps or perhaps even arbitrary code execution when
+ processing a corrupt input file (CVE-2012-3401).
+
+2012-07-06 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * test/raw_decode.c (main): Test fixes to work with IJG JPEG 7+.
+ IJG JPEG 7+ uses a different upsampling algorithm which produces
+ different numeric results.
+
+ * libtiff/tif_jpeg.c (JPEGPreDecode): Patch from Even Rouault to
+ work with IJG JPEG 7+.
+
+2012-07-04 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * test/raw_decode.c: Add changes so that test can run with build
+ directory outside of source directory.
+
+2012-07-02 Frank Warmerdam <warmerdam@google.com>
+
+ * libtiff/tif_jpeg.c: Fix handling when writing RGBA jpeg compressed
+ imagery (http://trac.osgeo.org/gdal/ticket/4732)
+
+2012-06-20 Frank Warmerdam <warmerdam@google.com>
+
+ * libtiff/tif_fax3.c: fix memory initialization of runs, only
+ partly done.
+
+ * libtiff/tif_pixarlog.c: Make sure tbuf is large enough for one
+ full "stride" past the end.
+
+2012-06-19 Frank Warmerdam <warmerdam@google.com>
+
+ * libtiff/tif_packbits.c: fix read past end of data buffer.
+
+2012-06-15 Frank Warmerdam <warmerdam@google.com>
+
+ * libtiff 4.0.2 released.
+
+ * tools/tif2pdf.c, tools/tifdump.c: avoid unitialized variable
+ warnings with clang.
+
+2012-06-15 Tom Lane <tgl@sss.pgh.pa.us>
+
+ * tools/tiff2pdf.c: Defend against integer overflows while
+ calculating required buffer sizes (CVE-2012-2113).
+
+2012-06-12 Frank Warmerdam <warmerdam@google.com>
+
+ * libtiff/tif_print.c: Be careful about printing corrupt inknames.
+
+ * libtiff/tif_fax3.c: Ensure runs array is initialized to zeros.
+
+2012-06-07 Frank Warmerdam <warmerdam@google.com>
+
+ * libtiff/tif_print.c: avoid pretty printing other fields when
+ we don't have the proper amount and type of data or if the field
+ is actually autodefined.
+
+2012-06-05 Frank Warmerdam <warmerdam@google.com>
+
+ * libtiff/tif_tile.c, libtiff/tif_strip.c: Ensure that illegal
+ ycbcrsubsampling values result in a runtime error, not just an
+ assertion.
+
+ * tests/custom_dir.c: Add testing of EXIF and custom directory
+ reading and writing.
+
+ * libtiff/tif_dir.c, libtiff/tiffio.h: Add TIFFCreateCustomDirectory()
+ and TIFFCreateEXIFDirectory() functions.
+
+ * libtiff/tif_dir.c, tif_print.c : Remove FIELD_CUSTOM handling for
+ PAGENUMBER, HALFTONEHINTS, and YCBCRSUBSAMPLING. Implement DOTRANGE
+ differently. This is to avoid using special TIFFGetField/TIFFSetField
+ rules for these fields in non-image directories (like EXIF).
+
+2012-06-04 Frank Warmerdam <warmerdam@google.com>
+
+ * libtiff/tif_jpeg.c: Remove code for fixing up h_sampling and v_sampling
+ in JPEGPreDecode(). If a fixup will be done it needs to be done sooner
+ in JPEGFixupTagsSubsampling() or else buffer sized may be wrong.
+
+2012-06-01 Frank Warmerdam <warmerdam@google.com>
+
+ * tools/tiffinfo.c: Do not try to read image data in EXIF directories.
+
+ * libtiff/tif_getimage.c: added support for _SEPARATED CMYK images.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2379
+
+ * libtiff/tif_unix.c: use strerror() to return a more specific error message
+ on failed open.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2341
+
+ * libtiff/tif_jpeg.c: Fix JPEGDecodeRaw() bugs.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2386
+
+ * tests/decode_raw.c, tests/images/quad-tile.jpg.tiff: add limited support
+ for testing jpeg in tiff image decoding including the "raw" decode interface.
+
+2012-05-31 Frank Warmerdam <warmerdam@google.com>
+
+ * libtiff/tif_jpeg.c: avoid overrunning the end of the output buffer in
+ JPEGDecodeRaw() - mostly likely to occur when there is confusion about
+ sampling values.
+
+ * libtiff/tif_read.c: Make sure tif_rawdatasize is cleared when tif_rawdata is freed.
+
+ * libtiff/tif_getimage.c: Add support for greyscale+alpha c/o Jérémie Laval.
+ http://bugzilla.maptools.org/show_bug.cgi?id=2398
+
+2012-05-29 Frank Warmerdam <warmerdam@google.com>
+
+ * libtiff/tif_dir.c: avoid using specific set/get logic to process fields in custom directories,
+ like EXIF directories. This fixes problems like a tag "320" existing in a custom directory getting
+ processed as if it were a colormap when it isn't really. Damn the wide variety of argument formulations
+ to get/set functions for different tags!
+
+ * libtiff/tif_dir.c: Ensure that we keep track of when tif_rawdata
+ is a pointer into an mmap()ed file via TIFF_BUFFERMMAP flag.
+
+2012-05-24 Frank Warmerdam <warmerdam@google.com>
+
+ * libtiff/tif_pixarlog.c: Allocate working buffer one word larger since we "forward
+ accumulate" and overwrite the end by one word in at least some cases.
+
+2012-05-23 Frank Warmerdam <warmerdam@google.com>
+
+ * libtiff/tif_pixarlog.c: avoid accessing out of the lookup arrays for out of range inputs.
+
+ * tools/tiffinfo.c: initialize h=0 to avoid undefined variable for degenerate files.
+
+ * libtiff/tif_ojpeg.c: if OJPEGWriteHeader() fails once do not bother trying again on
+ the same image.
+
+ * libtiff/tif_ojpeg.c: make things more resilient in the face of files without
+ stripbytecounts or stripoffsets or where loading these fails.
+
+ * libtiff/tif_print.c: be careful about whether min/max values are singular
+ or one per sample.
+
+ * libtiff/tif_print.c: Avoid confusion about count size when printing custom fields.
+ May affect things like ISOSpeedRatings.
+
+ * libtiff/tif_dir.c: avoid one byte past end of ink names reading
+ in some cases.
+
+2012-05-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
+
+ * man/TIFFGetField.3tiff: Correct the 'count' field type in the
+ example for how to retreive the value of unsupported tags.
+
+2012-03-30 Frank Warmerdam <warmerdam@google.com>
+
+ * tif_getimage.c: Fix size overflow (zdi-can-1221,CVE-2012-1173)
+ care of Tom Lane @ Red Hat.
+
2012-02-18 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* libtiff 4.0.1 released.
@@ -11,7 +1582,7 @@
2012-01-31 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_dir.c, libtiff/tif_dirread.c: Extra caution around
- assumption tag fetching is always successful.
+ assumption tag fetching is always successful.
* libtiff/tif_jpeg.c: Extra caution for case where sp is NULL.
@@ -26,6 +1597,7 @@
2011-12-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* libtiff/tif_win32.c: Eliminate some minor 64-bit warnings in
+
tif_win32.c. Patch by Edward Lam.
* configure.ac: Add libtiff private dependency on -llzma for
@@ -46,7 +1618,7 @@
* libtiff/tif_dirread.c: fixes to deal with invalid files where
_TIFFFillStriles() fails, and we try to chop up strips (gdal #4372)
- * libtiff/tif_dirread.c: fix error reporting when there is no
+ * libtiff/tif_dirread.c: fix error reporting when there is no
tag information struct and name (gdal #4373)
2011-10-22 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
@@ -91,11 +1663,11 @@
2011-04-20 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_dirinfo.c,tiffio.h: Remove the obsolete
- TIFFMergeFieldInfo/TIFFFindFieldInfo/TIFFFindFieldInfoByName API.
+ * libtiff/tif_dirinfo.c,tiffio.h: Remove the obsolete
+ TIFFMergeFieldInfo/TIFFFindFieldInfo/TIFFFindFieldInfoByName API.
http://bugzilla.maptools.org/show_bug.cgi?id=2315
- * libtiff/libtiff.def: add some missing (64bit) APIs.
+ * libtiff/libtiff.def: add some missing (64bit) APIs.
http://bugzilla.maptools.org/show_bug.cgi?id=2316
2011-04-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
@@ -138,8 +1710,8 @@
2011-03-21 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_thunder.c: Correct potential buffer overflow with
- thunder encoded files with wrong bitspersample set. The libtiff
+ * libtiff/tif_thunder.c: Correct potential buffer overflow with
+ thunder encoded files with wrong bitspersample set. The libtiff
development team would like to thank Marin Barbella and TippingPoint's
Zero Day Initiative for reporting this vulnerability (ZDI-CAN-1004,
CVE-2011-1167).
@@ -147,25 +1719,25 @@
2011-03-10 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_fax3.h: Fix to last change allowing zero length
+ * libtiff/tif_fax3.h: Fix to last change allowing zero length
runs at the start of a scanline - needed for legal cases.
2011-03-02 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_fax3.h: Protect against a fax VL(n) codeword commanding
- a move left. Without this, a malicious input file can generate an
- indefinitely large series of runs without a0 ever reaching the right
+ * libtiff/tif_fax3.h: Protect against a fax VL(n) codeword commanding
+ a move left. Without this, a malicious input file can generate an
+ indefinitely large series of runs without a0 ever reaching the right
margin, thus overrunning our buffer of run lengths. Per CVE-2011-0192.
- This is a modified version of a patch proposed by Drew Yao of Apple
- Product Security. It adds an unexpected() report, and disallows the
- equality case, since emitting a run without increasing a0 still allows
+ This is a modified version of a patch proposed by Drew Yao of Apple
+ Product Security. It adds an unexpected() report, and disallows the
+ equality case, since emitting a run without increasing a0 still allows
buffer overrun.
2011-02-23 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_jpeg.c: avoid divide by zero in degenerate case (#2296)
- * tools/tiff2rgba.c: close source file on error to make leak
+ * tools/tiff2rgba.c: close source file on error to make leak
detection easier.
* libtiff/tif_getimage.c: avoid leaks if TIFFRGBAImageBegin() fails.
@@ -180,15 +1752,15 @@
2011-02-18 Frank Warmerdam <warmerdam@pobox.com>
* configure.ac, configure: Added support for --enable-chunky-strip-read
- configure option to enable the experimental feature from a couple
- months ago for reading big strips in chunks.
+ configure option to enable the experimental feature from a couple
+ months ago for reading big strips in chunks.
- * configure.ac, tif_read.c, tif_readdir.c, tif_dir.h, tiffiop.h,
+ * configure.ac, tif_read.c, tif_readdir.c, tif_dir.h, tiffiop.h,
tif_write.c, tif_print.c, tif_jpeg.c, tif_dirwrite.c, tif_write.c:
- Implement optional support for deferring the load of strip/tile
+ Implement optional support for deferring the load of strip/tile
offset and size tags for optimized scanning of directories. Enabled
with the --enable-defer-strile-load configure option (DEFER_STRILE_LOAD
- #define in tif_config.h).
+ #define in tif_config.h).
2011-02-11 Frank Warmerdam <warmerdam@pobox.com>
@@ -197,7 +1769,7 @@
2011-02-09 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_win32.c: avoid error/warning buffer overrun problem
- with non-console (popup message) builds on win32.
+ with non-console (popup message) builds on win32.
http://bugzilla.maptools.org/show_bug.cgi?id=2293
@@ -213,18 +1785,18 @@
2011-01-06 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_pixarlog.c: Note that tif_rawcc/tif_rawcp are not
- maintained.
+ * libtiff/tif_pixarlog.c: Note that tif_rawcc/tif_rawcp are not
+ maintained.
- * libtiff/tif_zip.c: Maintain tif_rawcc/tif_rawcp when decoding
+ * libtiff/tif_zip.c: Maintain tif_rawcc/tif_rawcp when decoding
for CHUNKY_STRIP_READ_SUPPORT.
* libtiff/tif_jpeg.c: ensure that rawcc and rawcp are maintained
- during JPEGPreDecode and JPEGDecode calls.
- * libtiff/tif_read.c: larger read ahead for CHUNKY_STRIP_READ_SUPPORT,
- as compression formats like JPEG keep 16 lines interleaved in a sense
- and might need to touch quite a bit of data.
-
+ during JPEGPreDecode and JPEGDecode calls.
+ * libtiff/tif_read.c: larger read ahead for CHUNKY_STRIP_READ_SUPPORT,
+ as compression formats like JPEG keep 16 lines interleaved in a sense
+ and might need to touch quite a bit of data.
+
http://trac.osgeo.org/gdal/ticket/3894
2011-01-03 Lee Howard <faxguy@howardsilvan.com>
@@ -306,7 +1878,7 @@
2010-12-12 Lee Howard <faxguy@howardsilvan.com>
- * tools/tiff2pdf.c: fix colors for images with RGBA
+ * tools/tiff2pdf.c: fix colors for images with RGBA
interleaved data
http://bugzilla.maptools.org/show_bug.cgi?id=2250
@@ -387,7 +1959,7 @@
2010-10-21 Frank Warmerdam <warmerdam@pobox.com>
* tools/tiffinfo.c: avoid direct reference to _TIFFerrorHandler.
-
+
* libtiff/tif_config.vc.h: define snprintf to _snprintf for tiff2pdf.
* libtiff/libtiff.def: export _TIFFCheckMalloc for tools.
@@ -488,11 +2060,11 @@
* libtiff/tif_dirinfo.c: Fix invocation of tag compare function (#2201)
- * tools/tiff2pdf.c: Fix assorted bugs in tiff2pdf: missing "return"
- in t2p_read_tiff_size() causes t2p->tiff_datasize to be set entirely
- wrong for COMPRESSION_JPEG case, resulting in memory stomp if actual
- size is larger. Also, there are a bunch of places that try to
- memset() a malloc'd buffer before checking for malloc failure, which
+ * tools/tiff2pdf.c: Fix assorted bugs in tiff2pdf: missing "return"
+ in t2p_read_tiff_size() causes t2p->tiff_datasize to be set entirely
+ wrong for COMPRESSION_JPEG case, resulting in memory stomp if actual
+ size is larger. Also, there are a bunch of places that try to
+ memset() a malloc'd buffer before checking for malloc failure, which
would result in core dump if there actually were a failure. (#2211)
2010-06-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
@@ -568,13 +2140,13 @@
2010-05-07 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_jpeg.c: Ensure that quality is always set in
- JPEGPreEncode(), not just when we want to output local tables.
+ * libtiff/tif_jpeg.c: Ensure that quality is always set in
+ JPEGPreEncode(), not just when we want to output local tables.
Otherwise the quality used during compression may not be right and
might not match the tables in the tables tag. This bug only occurs
when seeking between directories in the midst of writing blocks.
http://trac.osgeo.org/gdal/ticket/3539
-
+
2010-05-06 Andrey Kiselev <dron@ak4719.spb.edu>
* html/man/TIFFGetField.3tiff.html, html/man/TIFFSetField.3tiff.html:
@@ -597,9 +2169,9 @@
2010-04-21 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_jpeg.c: avoid preparing jpeg tables everytime
- JPEGSetupEncode() is called if the tables already seem to be
- established. This prevents spurious updates and rewriting of
+ * libtiff/tif_jpeg.c: avoid preparing jpeg tables everytime
+ JPEGSetupEncode() is called if the tables already seem to be
+ established. This prevents spurious updates and rewriting of
directories with jpegtables when doing updates to existing images.
http://trac.osgeo.org/gdal/ticket/3539
@@ -624,7 +2196,7 @@
2010-04-02 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_read.c (primarily): Add support for
+ * libtiff/tif_read.c (primarily): Add support for
CHUNKY_STRIP_READ_SUPPORT where large strips are
read in chunks for applications using TIFFReadScanline().
This is intended to make it more practical work with very
@@ -653,11 +2225,11 @@
2010-02-22 Lee Howard <faxguy@howardsilvan.com>
* libtiff/tif_jpeg.c: Do not generate a JPEGTables tag when creating
- the JPEG TIFF as is is not required in order to prevent it from
- being unused and filled with invalid data. (Leave it to be
+ the JPEG TIFF as is is not required in order to prevent it from
+ being unused and filled with invalid data. (Leave it to be
generated by later activity.)
http://bugzilla.maptools.org/show_bug.cgi?id=2135
- * tools/tiff2pdf.c: Write the JPEG SOI headers into the TIFF strip
+ * tools/tiff2pdf.c: Write the JPEG SOI headers into the TIFF strip
data rather than skipping them. This fixes the ability to view in
Acrobat Reader, Evince, and Ghostscript.
http://bugzilla.maptools.org/show_bug.cgi?id=2135
@@ -668,7 +2240,7 @@
2009-12-03 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_jpeg.c: Made JPEGDecodeRaw() check for buffer overruns.
- Made so that when working with downsampled images a stub function
+ Made so that when working with downsampled images a stub function
reporting an error is used for tif_decoderow. We cannot meaningfully
support reading scanlines in this situation. (#1936)
@@ -678,17 +2250,17 @@
2009-11-30 Frank Warmerdam <warmerdam@pobox.com>
- * contrib/dbs/tiff-grayscale.c, contrib/tif-palette.c,
+ * contrib/dbs/tiff-grayscale.c, contrib/tif-palette.c,
tools/ras2tiff.c: Fix resource leaks on error.
http://bugzilla.maptools.org/show_bug.cgi?id=2121
- * libtiff/tif_{aux.c,dir.c,dir.h,dirinfo.c}: Return to handling
+ * libtiff/tif_{aux.c,dir.c,dir.h,dirinfo.c}: Return to handling
TIFFTAG_REFERENCEBLACKWHITE as a field in the TIFF directory instead
of as a custom(generic) field to avoid a potential reentrancy problem.
http://bugzilla.maptools.org/show_bug.cgi?id=2125
-
+
* libtiff/tif_color.c, libtiff/tif_getimage.c, libtiff/tiffio.h,
- man/TIFFcolor.3tiff: Make TIFFDisplay argument in TIFFCIELabToRGBInit
+ man/TIFFcolor.3tiff: Make TIFFDisplay argument in TIFFCIELabToRGBInit
const, and display_sRGB static and const.
http://bugzilla.maptools.org/show_bug.cgi?id=2124
@@ -750,7 +2322,7 @@
2009-09-03 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_getimage.c: Fixed error recognition handling in RGBA
- interface when stoponerror is set.
+ interface when stoponerror is set.
http://bugzilla.maptools.org/show_bug.cgi?id=2071
2009-08-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
@@ -799,7 +2371,7 @@
* libtiff/tif_dirread.c (TIFFReadCustomDirectory): Apply patch
from Jay Berkenbilt for "Bug 1895 - logic error in tif_dirread.c:
- segfault after setting tdir_tag = IGNORE".
+ segfault after setting tdir_tag = IGNORE".
http://bugzilla.maptools.org/show_bug.cgi?id=1895
2009-08-23 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
@@ -808,7 +2380,7 @@
tiffcrop.sh into a collection of many specific tests. Re-wrote
all of the existing tests to be based on some simple shell
functions. Make distcheck works again.
-
+
Export certain variables (MAKE, MAKEFLAGS, MEMCHECK) to tests and
added 'memcheck' and 'ptrcheck' targets to make it easy to run the
tests under valgrind.
@@ -842,7 +2414,7 @@
1 on success instead of zero.
http://bugzilla.maptools.org/show_bug.cgi?id=2069
- * libtiff/tif_lzw.c: back out patch from #2065 and apply patch from
+ * libtiff/tif_lzw.c: back out patch from #2065 and apply patch from
#1085 for a better underflow fix that errors properly.
http://bugzilla.maptools.org/show_bug.cgi?id=2065
http://bugzilla.maptools.org/show_bug.cgi?id=1985
@@ -854,13 +2426,13 @@
2009-06-22 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_lzw.c: Fix buffer underflow bug.
+ * libtiff/tif_lzw.c: Fix buffer underflow bug.
http://bugzilla.maptools.org/show_bug.cgi?id=2065
2009-06-21 Frank Warmerdam <warmerdam@pobox.com>
* configure.ac, libtiff/tif_jpeg.c, libtiff/tif_jpeg_12.c: add support
- for dual mode 8/12 bit jpeg support.
+ for dual mode 8/12 bit jpeg support.
2009-06-03 Frank Warmerdam <warmerdam@pobox.com>
@@ -877,7 +2449,7 @@
* libtiff/{tif_jpeg.c,tif_ojpeg.c,tif_getimage.c}: Fixed various
error reports to use "%s" as format string.
http://trac.osgeo.org/gdal/ticket/2976
-
+
2009-03-12 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/{tif_fax3.c,tif_jpeg.c,tif_ojpeg.c}: Fix printdir chaining
@@ -885,7 +2457,7 @@
2009-02-12 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_luv.c: Fix handling of tiled logluv images.
+ * libtiff/tif_luv.c: Fix handling of tiled logluv images.
http://bugzilla.maptools.org/show_bug.cgi?id=2005
2009-02-09 Frank Warmerdam <warmerdam@pobox.com>
@@ -901,17 +2473,17 @@
2009-02-05 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_dirread.c: Re-incorporated a sanity check on tag size,
- but at the 2GB boundary to avoid overflow on 32bit systems.
+ but at the 2GB boundary to avoid overflow on 32bit systems.
http://bugzilla.maptools.org/show_bug.cgi?id=1993
* libtiff/tif_dirread.c: Remove some assertions that blow due to
- corrupt files rather than in response to library internal
- inconsistencies.
+ corrupt files rather than in response to library internal
+ inconsistencies.
http://bugzilla.maptools.org/show_bug.cgi?id=1995
http://bugzilla.maptools.org/show_bug.cgi?id=1991
* libtiff/tif_dirread.c: Fixed testing for failed result from
- TIFFReadDirectoryFindFieldInfo().
+ TIFFReadDirectoryFindFieldInfo().
http://bugzilla.maptools.org/show_bug.cgi?id=1992
2009-01-23 Frank Warmerdam <warmerdam@pobox.com>
@@ -920,17 +2492,17 @@
http://bugzilla.maptools.org/show_bug.cgi?id=1911
* libtiff/tif_dirwrite.c: Fix byte swapping of next directory offset.
-
+
http://bugzilla.maptools.org/show_bug.cgi?id=1924
- * tools/tiffcrop.c: initialize xres/yres values.
+ * tools/tiffcrop.c: initialize xres/yres values.
* test/*.sh - default ${srcdir} to local directory.
- * test/common.sh - start verbose mode after common settings.
+ * test/common.sh - start verbose mode after common settings.
- * libtiff/tif_dirinfo.c: Replace lfind() with local equivelent to
- avoid type mismatches on different platforms.
+ * libtiff/tif_dirinfo.c: Replace lfind() with local equivelent to
+ avoid type mismatches on different platforms.
http://bugzilla.maptools.org/show_bug.cgi?id=1889
2009-01-22 Frank Warmerdam <warmerdam@pobox.com>
@@ -939,7 +2511,7 @@
tiffsplit.c}: avoid warnings, mostly 32bit/64bit casting issues.
* port,tools: Introduce libport.h, and include in tools if NEED_LIBPORT
- defined, primarily to reduce prototype warnings on windows.
+ defined, primarily to reduce prototype warnings on windows.
* libtiff/tif_dirinfo.c,tif_dirread.c: Avoid warnings
about unused parameters, and uninitialized variables.
@@ -987,7 +2559,7 @@
for TIFFError(), TIFFErrorExt(), TIFFWarning(), and
TIFFWarningExt() in order to reveal bugs.
- * Many fixes throughout to work better as a 64-bit build.
+ * Many fixes throughout to work better as a 64-bit build.
2008-12-30 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
@@ -1038,7 +2610,7 @@
2008-10-09 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_jpeg.c: Add #ifdefs for changes needed if using
- IPP enabled version of libjpeg from Intel.
+ IPP enabled version of libjpeg from Intel.
http://bugzilla.maptools.org/show_bug.cgi?id=1951
2008-09-05 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -1081,7 +2653,7 @@
2008-07-29 Frank Warmerdam <warmerdam@pobox.com>
- * tif_strip.c: Replace assertions related to samplesperpixel != 3 or
+ * tif_strip.c: Replace assertions related to samplesperpixel != 3 or
the subsampling values not being 1, 2 or 4 (for jpeg compressed images)
with control logic to return runtime errors (c/o Even Rouault) (#1927).
@@ -1121,13 +2693,13 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2008-05-24 Frank Warmerdam <warmerdam@pobox.com>
- * tif_codec.c: Avoid NULL pointer dereferencing for exotic
+ * tif_codec.c: Avoid NULL pointer dereferencing for exotic
compression codec codes.
* tif_dirwrite.c: fix potential memory leak.
* tif_dirread.c: Fix unchecked malloc result.
-
+
2008-05-24 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* test {tiff2pdf.sh tiff2ps-EPS1.sh tiff2ps-PS1.sh tiff2ps-PS2.sh
@@ -1161,7 +2733,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_dirinfo.c: Use TIFF_SETGET_ASCII for PIXAR_TEXTUREFORMAT
and PIXAR_WRAPMODES instead of TIFF_SETGET_UNDEFINED. Not exactly clear
- why this is needed.
+ why this is needed.
2008-05-09 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
@@ -1202,25 +2774,25 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2008-03-14 Frank Warmerdam <warmerdam@pobox.com>
* tif_dirread.c: Removed sanity checks on tags larger than 4MB in
- TIFFReadDirEntryArray() since they are interfering with seemingly
+ TIFFReadDirEntryArray() since they are interfering with seemingly
legitimate files. http://trac.osgeo.org/gdal/ticket/2005
2008-02-09 Joris Van Damme <joris.at.lebbeke@skynet.be>
- * tif_dirread.c: Added handling for the case of number of values for
- PageNumber tag different from 2 (previously resulted in an assert
+ * tif_dirread.c: Added handling for the case of number of values for
+ PageNumber tag different from 2 (previously resulted in an assert
indicating lack of handling and was forgotten about)
2008-02-01 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_jpeg.c: Do not try to fixup subsampling tags based on
+ * libtiff/tif_jpeg.c: Do not try to fixup subsampling tags based on
the actual jpeg data stream if the first strip/tile has zero size.
This is the case when GDAL creates a new file with zero sizes, closes
and reopens it.
2008-01-07 Frank Warmerdam <warmerdam@pobox.com>
- * tools/tiff2ps.c: fix up 64bit issues (from Edward Lam).
+ * tools/tiff2ps.c: fix up 64bit issues (from Edward Lam).
2008-01-01 Frank Warmerdam <warmerdam@pobox.com>
@@ -1230,14 +2802,14 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
targets.
* tools/tiffinfo.c, tools/tiffcmp.c, tools/gif2tiff.c, tools/bmp2tiff.c
- tools/tiff2pdf.c: Fix 64-bit warnings when compiling under MSVC 2005
- (x64).
+ tools/tiff2pdf.c: Fix 64-bit warnings when compiling under MSVC 2005
+ (x64).
- * tools/tiffset.c: Changes to reflect the fact that TIFFFieldWithTag()
+ * tools/tiffset.c: Changes to reflect the fact that TIFFFieldWithTag()
and TIFFFieldWithName() now return TIFFField pointers instead of
TIFFFieldInfo pointers.
- * tools/tiffdump.c: Added ssize_t typedef on Windows since it doesn't
+ * tools/tiffdump.c: Added ssize_t typedef on Windows since it doesn't
exist. This makes it compile again on Windows
* tif_aux.c, tif_getimage.c, tif_next.c, tif_predict.c, tif_win32.c,
@@ -1248,19 +2820,19 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2007-12-31 Frank Warmerdam <warmerdam@pobox.com>
* tif_dirwrite.c: Added TIFFRewriteField(). This new function
- rewrites one field "on disk" updating an existing directory
+ rewrites one field "on disk" updating an existing directory
entry. Lots of limitations still...
- * tiffiop.h, tif_write.c, tif_dirread.c, tif_flush.c: Keep track of
- TIFF_DIRTYSTRIP separately from TIFF_DIRTYDIRECT to indicate that
- the strip offset/size values are dirty but nothing else about the
+ * tiffiop.h, tif_write.c, tif_dirread.c, tif_flush.c: Keep track of
+ TIFF_DIRTYSTRIP separately from TIFF_DIRTYDIRECT to indicate that
+ the strip offset/size values are dirty but nothing else about the
directory is dirty. In flush handle "just stripmaps dirty" as a
- special case that just rewrites these values without otherwise
- modifying the directory on disk using TIFFRewriteField().
+ special case that just rewrites these values without otherwise
+ modifying the directory on disk using TIFFRewriteField().
We also modify logic so that in update mode the directory is not
marked dirty on read, but only when something is changed. This
- means we need to keep track of updates to the stripmap stuff in
+ means we need to keep track of updates to the stripmap stuff in
TIFFAppendToStrip().
2007-12-10 Frank Warmerdam <warmerdam@pobox.com>
@@ -1271,7 +2843,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2007-11-23 Frank Warmerdam <warmerdam@pobox.com>
* tif_dir.c, tif_dirread.c, tif_dirwrite.c, tif_read.c, tif_write.c,
- tiffiop.h: Added TIFF_BUF4WRITE flag to indicate if contents of the
+ tiffiop.h: Added TIFF_BUF4WRITE flag to indicate if contents of the
rawcp/rawcc buffer are for writing and thus may require flushing.
Necessary to distinguish whether they need to be written to disk when
in mixed read/write mode and doing a mixture of writing followed by
@@ -1284,12 +2856,12 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2007-11-02 Frank Warmerdam <warmerdam@pobox.com>
- * tif_write.c: Rip out the fancy logic in TIFFAppendToStrip() for
- establishing if an existing tile can be rewritten to the same location
- by comparing the current size to all the other blocks in the same
- directory. This is dangerous in many situations and can easily
+ * tif_write.c: Rip out the fancy logic in TIFFAppendToStrip() for
+ establishing if an existing tile can be rewritten to the same location
+ by comparing the current size to all the other blocks in the same
+ directory. This is dangerous in many situations and can easily
corrupt a file. (observed in esoteric GDAL situation that's hard to
- document). This change involves leaving the stripbytecount[] values
+ document). This change involves leaving the stripbytecount[] values
unaltered till TIFFAppendToStrip(). Now we only write a block back
to the same location it used to be at if the new data is the same
size or smaller - otherwise we move it to the end of file.
@@ -1297,30 +2869,30 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* tif_dirwrite.c: Try to avoid writing out a full readbuffer of tile
data when writing the directory just because we have BEENWRITING at
some point in the past. This was causing odd junk to be written out
- in a tile of data when a single tile had an interleaving of reading
- and writing with reading last. (highlighted by gdal
- autotest/gcore/tif_write.py test 7.
+ in a tile of data when a single tile had an interleaving of reading
+ and writing with reading last. (highlighted by gdal
+ autotest/gcore/tif_write.py test 7.
* tif_predict.c: use working buffer in PredictorEncodeTile to avoid
- modifying callers buffer.
+ modifying callers buffer.
http://trac.osgeo.org/gdal/ticket/1965
- * tif_predict.c/h: more fixes related to last item, keeping a
+ * tif_predict.c/h: more fixes related to last item, keeping a
distinct pfunc for encode and decode cases as these were getting
mixed up sometimes.
http://trac.osgeo.org/gdal/ticket/1948
2007-11-01 Frank Warmerdam <warmerdam@pobox.com>
- * tif_predict.c/h, tif_lzw.c, tif_zip.c: Improvements so that
+ * tif_predict.c/h, tif_lzw.c, tif_zip.c: Improvements so that
predictor based encoding and decoding works in read-write update
- mode properly.
+ mode properly.
http://trac.osgeo.org/gdal/ticket/1948
2007-10-24 Joris Van Damme <joris.at.lebbeke@skynet.be>
- * tif_dirread.c: Fixed problem with bogus file triggering
- assert(td->td_planarconfig == PLANARCONFIG_CONTIG) in
+ * tif_dirread.c: Fixed problem with bogus file triggering
+ assert(td->td_planarconfig == PLANARCONFIG_CONTIG) in
ChopUpSingleUncompressedStrip
2007-10-22 Joris Van Damme <joris.at.lebbeke@skynet.be>
@@ -1344,10 +2916,10 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2007-09-29 Joris Van Damme <joris.at.lebbeke@skynet.be>
- * tif_dirread.c: Strip chopping interfered badly with uncompressed
- subsampled images because it tried to divide subsampled rowblocks,
- leading to all sorts of errors throughout the library for these
- images. Fixed by making strip chopping divide in row counts that
+ * tif_dirread.c: Strip chopping interfered badly with uncompressed
+ subsampled images because it tried to divide subsampled rowblocks,
+ leading to all sorts of errors throughout the library for these
+ images. Fixed by making strip chopping divide in row counts that
are a multiple of vertical subsampling value.
2007-09-28 Joris Van Damme <joris.at.lebbeke@skynet.be>
@@ -1360,18 +2932,18 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* tif_dirread.c: Made calculation of td_maxsamplevalue more robust
when dealing with large bitspersample values, shutting up purification
- tools that warn about truncation, though it remains incorrect and
+ tools that warn about truncation, though it remains incorrect and
indicates a conceptual problem there.
- * tif_open.c: Moved early exit in case of 'h' flag (to disable reading
- of first IFD) to proper place because it badly interfered with memory
- mapping, resulting in mapping flag even with dummy mapping functions
- that returned 0 whilst at the same time the mapping tif_size wasn't
+ * tif_open.c: Moved early exit in case of 'h' flag (to disable reading
+ of first IFD) to proper place because it badly interfered with memory
+ mapping, resulting in mapping flag even with dummy mapping functions
+ that returned 0 whilst at the same time the mapping tif_size wasn't
set, thus resulting in continuous incorrect beyond-eof errors.
2007-09-24 Joris Van Damme <joris.at.lebbeke@skynet.be>
- * tif_dirinfo.c: Fixed (MSVC) compiler reports about
+ * tif_dirinfo.c: Fixed (MSVC) compiler reports about
inconsistent use of const in tiffFields and exifFields definition
2007-09-20 Frank Warmerdam <warmerdam@pobox.com>
@@ -1381,7 +2953,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
TIFFWriteDirectoryTagLongLong8Array() function was restructured
accordingly.
- * tif_dirread.c: Improvements to error reporting text in
+ * tif_dirread.c: Improvements to error reporting text in
TIFFFetchDirectory().
2007-09-19 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
@@ -1395,27 +2967,27 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2007-08-24 Frank Warmerdam <warmerdam@pobox.com>
* tif_dirwrite.c: Write the tif_nextdiroff value instead of a fixed
- zero when writing directory contents to preserve the ability to
+ zero when writing directory contents to preserve the ability to
rewrite directories in place, even in the middle of a directory
chain.
* tif_dirinfo.c: _TIFFMergeFields() now only merges in field
definitions that are missing. Existing definitions are silently
- ignored.
+ ignored.
* tif_dirread.c: Add runtime error for fields for which no definition
- is found (in addition to an assert for developers) in
- TIFFFetchNormalTag(). Not sure if this is needed, but it seems
+ is found (in addition to an assert for developers) in
+ TIFFFetchNormalTag(). Not sure if this is needed, but it seems
prudent.
2007-08-10 Joris Van Damme <joris.at.lebbeke@skynet.be>
- * libtiff/tif_getimage.c: removed SubsamplingHor and SubsamplingVer
+ * libtiff/tif_getimage.c: removed SubsamplingHor and SubsamplingVer
from _TIFFRGBAImage structure to revert unwanted ABI change.
2007-08-10 Joris Van Damme <joris.at.lebbeke@skynet.be>
- * libtiff/tif_win32.c: use SetFilePointer instead of
+ * libtiff/tif_win32.c: use SetFilePointer instead of
SetFilePointerEx, as per bug
http://bugzilla.remotesensing.org/show_bug.cgi?id=1580
@@ -1437,7 +3009,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_dirread.c: Handle the case of MSVC 6 when using 64-bit
integer constants.
- * libtiff/{Makefile.am, Makefile.v}: Do not distribute tiffconf.h,
+ * libtiff/{Makefile.am, Makefile.v}: Do not distribute tiffconf.h,
remove tif_config.h/tiffconf.h during cleaning. As per bug
http://bugzilla.remotesensing.org/show_bug.cgi?id=1573
@@ -1507,14 +3079,14 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
tif_win3.c}: Obsoleted portability stuff removed.
* tools/tiff2ps.c: Added support 16-bit images as per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=1566
Patch from William Bader.
* tools/tiff2pdf.c: Fix for TIFFTAG_JPEGTABLES tag fetching and
significant upgrade of the whole utility as per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=1560
Now we don't need tiffiop.h in tiff2pdf anymore and will open output
@@ -1532,7 +3104,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2007-06-25 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
* port/strtoull.c: New porting function in case strtoull() is not
- available on the target system.
+ available on the target system.
* configure.ac: Add configure support for determining sized types
in a portable way and performing necessary substitutions in
tif_config.h and tiffconf.h. Updated tiff.h to use the new
@@ -1549,7 +3121,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/{tif_dir.h, tif_dirread.c, tif_dirinfo.c, tif_jpeg.c,
tif_fax3.c, tif_jbig.c, tif_luv.c, tif_ojpeg.c, tif_pixarlog.c,
tif_predict.c, tif_zip.c}: Finally fix bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=1274
by introducing _TIFFMergeFieldInfo() returning integer error status
@@ -1560,7 +3132,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2007-04-07 Frank Warmerdam <warmerdam@pobox.com>
- * contrib/addtiffo/tif_overview.c: Fix problems with odd sized output
+ * contrib/addtiffo/tif_overview.c: Fix problems with odd sized output
blocks in TIFF_DownSample_Subsampled() (bug 1542).
2007-04-06 Frank Warmerdam <warmerdam@pobox.com>
@@ -1568,15 +3140,15 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_jpeg.c: Changed JPEGInitializeLibJPEG() so that it
will convert from decompressor to compressor or compress to decompress
if required by the force arguments. This works around a problem in
- where the JPEGFixupTestSubsampling() may cause a decompressor to
+ where the JPEGFixupTestSubsampling() may cause a decompressor to
be setup on a directory when later a compressor is required with the
- force flag set. Occurs with the addtiffo program for instance.
+ force flag set. Occurs with the addtiffo program for instance.
2007-04-06 Andrey Kiselev <dron@ak4719.spb.edu>
* tools/tiffcrop.c, man/tiffcrop.1: Significant update in
functionality from Richard Nolde. As per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=1525
2007-03-28 Frank Warmerdam <warmerdam@pobox.com>
@@ -1588,15 +3160,15 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* start of BigTIFF upgrade - CVS HEAD unstable until further notice
2007-03-07 Joris Van Damme <joris.at.lebbeke@skynet.be>
-
+
* libtiff/tif_getimage.c: workaround for 'Fractional scanline' error reading
OJPEG images with rowsperstrip that is not a multiple of vertical subsampling
factor. This bug is mentioned in:
http://bugzilla.remotesensing.org/show_bug.cgi?id=1390
- http://www.asmail.be/msg0054766825.html
+ http://www.asmail.be/msg0054766825.html
2007-03-07 Joris Van Damme <joris.at.lebbeke@skynet.be>
-
+
* libtiff/tif_win32.c: made inclusion of windows.h unconditional
* libtiff/tif_win32.c: replaced preprocessor indication for consiously
@@ -1646,14 +3218,14 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
larger than 2GB. Fixes bug
http://bugzilla.remotesensing.org/show_bug.cgi?id=890
-
+
Idea submitted by Matt Hancher.
2007-01-31 Andrey Kiselev <dron@ak4719.spb.edu>
* tools/tif2rgba.c: This utility does not work properly on big-endian
architectures. It was fixed including the bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=1149
2007-01-15 Mateusz Loskot <mateusz@loskot.net>
@@ -1670,15 +3242,15 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2006-11-19 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_write.c: TIFFAppendToStrip() - clear sorted flag if
- we move a strip.
- http://bugzilla.remotesensing.org/show_bug.cgi?id=1359
+ * libtiff/tif_write.c: TIFFAppendToStrip() - clear sorted flag if
+ we move a strip.
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=1359
2006-10-13 Andrey Kiselev <dron@ak4719.spb.edu>
* libtiff/tif_dir.c: More fixes for vulnerabilities, reported
in Gentoo bug ():
-
+
http://bugs.gentoo.org/show_bug.cgi?id=142383
* libtiff/contrib/dbs/xtiff/xtiff.c: Make xtiff utility compilable.
@@ -1712,12 +3284,12 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_lzw.c, libtiff/tif_zip.c: Fixed problems with mixing
encoding and decoding on the same read-write TIFF handle. The LZW
code can now maintain encode and decode state at the same time. The
- ZIP code will switch back and forth as needed.
+ ZIP code will switch back and forth as needed.
http://bugzilla.remotesensing.org/show_bug.cgi?id=757
2006-09-20 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff: Rename config.h.vc and tif_config.h.vc to config.vc.h and
+ * libtiff: Rename config.h.vc and tif_config.h.vc to config.vc.h and
tif_config.vc.h for easier identification by folks using an IDE.
2006-07-25 Frank Warmerdam <warmerdam@pobox.com>
@@ -1732,7 +3304,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2006-07-12 Frank Warmerdam <warmerdam@pobox.com>
- * tif_dirwrite.c: make sure to use uint32 for wordcount in
+ * tif_dirwrite.c: make sure to use uint32 for wordcount in
TIFFWriteNormanTag if writecount is VARIABLE2 for ASCII fields.
It already seems to have been done for other field types. Needed
for "tiffset" on files with geotiff ascii text.
@@ -1760,9 +3332,9 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2006-06-17 Frank Warmerdam <warmerdam@pobox.com>
* tif_readdir.c: Added case in EstimateStripByteCounts() for tiled
- files. Modified TIFFReadDirectory() to not invoke
+ files. Modified TIFFReadDirectory() to not invoke
EstimateStripByteCounts() for case where entry 0 and 1 are unequal
- but one of them is zero.
+ but one of them is zero.
http://bugzilla.remotesensing.org/show_bug.cgi?id=1204
2006-06-08 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -1790,7 +3362,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* {configure, configure.ac, libtiff/tif_jbig.c, tools/tiffcp.c}: Added
support for JBIG compression scheme (34661 code) contributed by Lee
Howard. As per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=896
* configure, configure.ac: OJPEG support enabled by default.
@@ -1829,7 +3401,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2006-04-18 Frank Warmerdam <warmerdam@pobox.com>
* nmake.opt: use /EHsc for VS2005 compatibility. Also define
- _CRT_SECURE_NO_DEPRECATE to avoid noise on VS2005.
+ _CRT_SECURE_NO_DEPRECATE to avoid noise on VS2005.
2006-04-12 Joris Van Damme <joris.at.lebbeke@skynet.be>
@@ -1837,7 +3409,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
non-subsampled YCbCr (i.e. separate YCbCr with subsampling [1,1])
2006-04-11 Joris Van Damme <joris.at.lebbeke@skynet.be>
-
+
* libtiff/tif_getimage.c: Revision of all RGB(A) put routines
- Conversion of unassociated alpha to associated alpha now done with
more performant LUT, and calculation more correct
@@ -1846,21 +3418,21 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
- Bugfix of handling of 16bit RGB with unassociated alpha
2006-04-11 Joris Van Damme <joris.at.lebbeke@skynet.be>
-
- * libtiff/tif_getimage.c:
- - When there is no alpha, gtTileSeparate and gtStripSeparate allocated
- buffer for alpha strile and filled it, only to never read it back.
+
+ * libtiff/tif_getimage.c:
+ - When there is no alpha, gtTileSeparate and gtStripSeparate allocated
+ buffer for alpha strile and filled it, only to never read it back.
Removed allocation and fill.
- - Minor rename of vars in gtTileSeparate and gtStripSeparate
+ - Minor rename of vars in gtTileSeparate and gtStripSeparate
anticipating planned functionality extension
2006-04-08 Joris Van Damme <joris.at.lebbeke@skynet.be>
- * libtiff/tif_getimage.c: renamed pickTileContigCase to PickContigCase
- and pickTileSeparateCase to PickSeparateCase as both work on strips as
+ * libtiff/tif_getimage.c: renamed pickTileContigCase to PickContigCase
+ and pickTileSeparateCase to PickSeparateCase as both work on strips as
well
- * libtiff/tif_getimage.c: moved img->get selection from
+ * libtiff/tif_getimage.c: moved img->get selection from
TIFFRGBAImageBegin into PickContigCase and PickSeparateCase to create
logical hook for planned functionality extension
@@ -1871,9 +3443,9 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2006-04-07 Joris Van Damme <joris.at.lebbeke@skynet.be>
- * libtiff/tif_getimage.c: replaced usage of TIFFScanlineSize in
+ * libtiff/tif_getimage.c: replaced usage of TIFFScanlineSize in
gtStripContig with TIFFNewScanlineSize so as to fix buggy behaviour
- on subsampled images - this ought to get sorted when we feel brave
+ on subsampled images - this ought to get sorted when we feel brave
enough to replace TIFFScanlineSize alltogether
* libtiff/tif_ojpeg.c: fixed bug in OJPEGReadSkip
@@ -1882,13 +3454,13 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tiffio.h: added new type tstrile_t
- * libtiff/tif_dir.h: changed types of td_stripsperimage and td_nstrips
- to new tstrile_t, types of td_stripoffset and td_stripbytecount to
+ * libtiff/tif_dir.h: changed types of td_stripsperimage and td_nstrips
+ to new tstrile_t, types of td_stripoffset and td_stripbytecount to
toff_t*
* libtiff/tif_ojpeg.c: totally new implementation
- * libtiff/tif_dirread.c: added several hacks to suit new support of
+ * libtiff/tif_dirread.c: added several hacks to suit new support of
OJPEG
* libtiff/tif_getimage.c: removed TIFFTAG_JPEGCOLORMODE handling
@@ -1928,7 +3500,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_getimage.c: added putcontig8bitYCbCr12tile
- * libtiff/tif_read.c: added support for new TIFF_NOREADRAW flag to
+ * libtiff/tif_read.c: added support for new TIFF_NOREADRAW flag to
prepare the path for new tif_ojpeg.c
2006-03-23 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -2044,7 +3616,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_write.c: Small code rearrangement in TIFFWriteScanline()
to avoid crash as per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=1081.
2006-02-26 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -2094,7 +3666,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2006-02-07 Frank Warmerdam <warmerdam@pobox.com>
* tools/tiff2pdf.c: Fixed support for non-YCbCr encoded JPEG
- compressed TIFF files, per submission from Dan Cobra.
+ compressed TIFF files, per submission from Dan Cobra.
2006-02-07 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -2126,7 +3698,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_dirread.c: Use _TIFFGetExifFieldInfo() instead of
_TIFFGetFieldInfo() in TIFFReadEXIFDirectory() call as per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=1026.
2006-01-23 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -2192,7 +3764,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2005-12-26 Andrey Kiselev <dron@ak4719.spb.edu>
- * libtiff/{tif_dir.c, tif_dir.h, tif_dirread.c, tif_dirinfo.c}:
+ * libtiff/{tif_dir.c, tif_dir.h, tif_dirread.c, tif_dirinfo.c}:
tiffFieldInfo and exifFieldInfo arrays definitions moved back to
tif_dirinfo.c; added _TIFFGetFieldInfo() and _TIFFGetExifFieldInfo()
private functions to retrieve FieldInfo arrays.
@@ -2219,10 +3791,10 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2005-12-23 Joris Van Damme <joris.at.lebbeke@skynet.be>
- * libtiff/tiffio.h: fixed typo that potentially resulted in
+ * libtiff/tiffio.h: fixed typo that potentially resulted in
redefininition of USE_WIN32_FILEIO
- * libtiff/*: Added more 'dual-mode' error handling: Done TIFFWarning
+ * libtiff/*: Added more 'dual-mode' error handling: Done TIFFWarning
calls in core LibTiff.
2005-12-21 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -2232,10 +3804,10 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2005-12-21 Joris Van Damme <joris.at.lebbeke@skynet.be>
- * libtiff/*, contrib/*: Added 'dual-mode' error handling, enabling
+ * libtiff/*, contrib/*: Added 'dual-mode' error handling, enabling
newer code to get context indicator in error handler and still
- remain compatible with older code: Done TIFFError calls everywhere
- except in tools
+ remain compatible with older code: Done TIFFError calls everywhere
+ except in tools
2005-12-20 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -2308,7 +3880,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
http://bugzilla.remotesensing.org/show_bug.cgi?id=1002
* .cvsignore: many files added, and a few update according
- to suggestion of Brad HArds on tiff mailing list.
+ to suggestion of Brad HArds on tiff mailing list.
2005-11-03 Frank Warmerdam <warmerdam@pobox.com>
@@ -2333,7 +3905,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
http://bugzilla.remotesensing.org/show_bug.cgi?id=946
* tools/bmp2tiff.c: Fixed possible integer overflow error as per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=965
* libtiff/tif_dirinfo.c: Make XResolution, YResolution and
@@ -2343,7 +3915,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* tools/tiffsplit.c: Copy fax related fields over splitted parts
as per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=983
2005-10-21 Frank Warmerdam <warmerdam@pobox.com>
@@ -2399,7 +3971,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_dir.c: When prefreeing tv->value in TIFFSetFieldV
also set it to NULL to avoid double free when re-setting custom
- string fields as per:
+ string fields as per:
http://bugzilla.remotesensing.org/show_bug.cgi?id=922
@@ -2435,7 +4007,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
http://bugzilla.remotesensing.org/show_bug.cgi?id=831
Remove TIFFFetchExtraSamples() function, use TIFFFetchNormalTag()
- instead.
+ instead.
* libtiff/tiffconf.h.in: One more attempt to fix the AIX bug
@@ -2606,7 +4178,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2005-05-22 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_dirread.c: Changed the code that computes
+ * libtiff/tif_dirread.c: Changed the code that computes
stripbytecount[0] if it appears bogus to ignore if stripoffset[0] is
zero. This is a common case with GDAL indicating a "null" tile/strip.
@@ -2616,8 +4188,8 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2005-05-06 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_dirread.c: Applied similar change to
- TIFFFetchPerSampleLongs and TIFFFetchPerSampleAnys.
+ * libtiff/tif_dirread.c: Applied similar change to
+ TIFFFetchPerSampleLongs and TIFFFetchPerSampleAnys.
http://bugzilla.remotesensing.org/show_bug.cgi?id=843
@@ -2667,7 +4239,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* man/TIFFSetField.3tiff: Fixed definition of the TIFFTAG_INKNAMES tag
as per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=816
2005-03-30 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -2777,7 +4349,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tiffio.h: Move TIFFOpenW() function into the extern "C"{}
block as per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=763
2005-02-03 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
@@ -2798,7 +4370,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
http://bugzilla.remotesensing.org/show_bug.cgi?id=320
* tools/tiff2ps.c: Fixed problem with page sizes as per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=742
2005-01-31 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
@@ -2839,7 +4411,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
TIFFRGBAImageBegin() as per bug
http://bugzilla.remotesensing.org/show_bug.cgi?id=739
-
+
2005-01-12 Andrey Kiselev <dron@ak4719.spb.edu>
* libtiff/tif_jpeg.c: Added ability to read/write the fax specific
@@ -2868,7 +4440,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tiff.h: Restore back the workaround for AIX Visual Age C
compiler to avoid double definition of BSD types as per bug
- http://bugzilla.remotesensing.org/show_bug.cgi?id=39
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=39
* libtiff/Makefile.am: Place the C++ stream API in the separate
library called libtiffxx to avoid unneeded dependencies. Probably
@@ -2892,7 +4464,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_getimage.c: More fixes for multiple-alpha-channelled
RGB-images as per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=713
@@ -2928,7 +4500,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2004-12-15 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_getimage.c: #define A1 bracketing for clean build on
- SunPro compiler.
+ SunPro compiler.
2004-12-11 Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
@@ -2940,7 +4512,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_dirwrite.c: Always write TIFFTAG_SUBIFD using LONG type
as per bugs
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=703
and
@@ -2960,9 +4532,9 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_config.in.vc: Removed unneded definitions for
read/open/close/lseek functions to fix the
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=680
-
+
2004-12-03 Andrey Kiselev <dron@ak4719.spb.edu>
* libtiff/{tif_dir.c, tif_dirread.c}: Remove TIFFReassignTagToIgnore()
@@ -2998,7 +4570,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2004-11-26 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/makefile.vc: make it easier to rename the libtiff DLL.
+ * libtiff/makefile.vc: make it easier to rename the libtiff DLL.
2004-11-24 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -3095,7 +4667,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
per bug
http://bugzilla.remotesensing.org/show_bug.cgi?id=648
-
+
* libtiff/{tif_jpeg.c, tif_ojpeg.c}: TIFFTAG_JPEGTABLES should have
uint32 count. Use this type everywhere.
@@ -3108,7 +4680,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* tools/tiff2rgba.c: removed extra newlines in usage message.
2004-10-30 Andrey Kiselev <dron@ak4719.spb.edu>
-
+
* libtiff/tif_dirwrite.c: Improvements in tag writing code.
* tools/tiff2ps.c: Fixed wrong variable data type when read Position
@@ -3123,7 +4695,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_fax3.c: Fixed case with the wrong decode routines
choosing when the incorrect Group4Options tag set. As per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=323
* libtiff/tif_dirwrite.c: Fixed problem with passing count variable of
@@ -3142,7 +4714,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* tools/tiff2pdf.c: added casts to avoid warnings.
* libtiff/libtiff.def: Added several more entry points required
- to link fax2tiff.c against the DLL on windows.
+ to link fax2tiff.c against the DLL on windows.
2004-10-27 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -3213,7 +4785,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2004-10-08 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_dirinfo.c: Fix bug with tif_foundfield and reallocation
- of tif_fieldinfo.
+ of tif_fieldinfo.
http://bugzilla.remotesensing.org/show_bug.cgi?id=630
@@ -3245,7 +4817,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2004-09-30 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_dirinfo.c: changed type of XMLPacket (tag 700) to
+ * libtiff/tif_dirinfo.c: changed type of XMLPacket (tag 700) to
TIFFTAG_BYTE instead of TIFFTAG_UNDEFINED to comply with the info
in the Adobe XMP Specification.
@@ -3265,7 +4837,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2004-09-26 Andrey Kiselev <dron@ak4719.spb.edu>
* libtiff/{tif_dir.h, tif_dir.c, tif_dirread.c, tif_write.c}:
- Optimize checking for the strip bounds.
+ Optimize checking for the strip bounds.
* libtiff/{tif_dirread.c, tif_strip.c}: TIFFScanlineSize() and
TIFFRasterScanlineSize() functions report zero in the case of integer
@@ -3416,7 +4988,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
here
http://www.asmail.be/msg0054799560.html
-
+
for details.
* tools/fax2tiff.c: Use the new functions in the code.
@@ -3544,11 +5116,11 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* tools/tiffsplit.c: Fixed problem with unproperly written multibyte
files. Now output files will be written using the same byte order
flag as in the input image. See
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=574
-
+
for details.
-
+
2004-05-19 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_print.c: added (untested) support for printing
@@ -3560,7 +5132,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_fax3.c: Avoid reading CCITT compression options
if compression type mismatches. See
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=565
2004-04-30 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -3605,7 +5177,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2004-04-04 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_open.c: close clientdata if TIFFClientOpen() fails
- via bad2.
+ via bad2.
2004-03-26 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -3632,10 +5204,10 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2004-02-26 Andrey Kiselev <dron@ak4719.spb.edu>
- * tools/tiffsplit.c: Copy JPEGTables tag contents for JPEG compressed
+ * tools/tiffsplit.c: Copy JPEGTables tag contents for JPEG compressed
images. Reported by Artem Mirolubov.
- * libtiff/tif_dirread.c: Fixed problem with handling TIFF_UNDEFINED
+ * libtiff/tif_dirread.c: Fixed problem with handling TIFF_UNDEFINED
tag type in TIFFFetchNormalTag() as per bug
http://bugzilla.remotesensing.org/show_bug.cgi?id=508
@@ -3657,8 +5229,8 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2004-01-30 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/libtiff.def: Added TIFFCurrentDirOffset, TIFFWriteCheck,
- TIFFRGBAImageOK, and TIFFNumberOfDirectories as suggested by
- Scott Reynolds.
+ TIFFRGBAImageOK, and TIFFNumberOfDirectories as suggested by
+ Scott Reynolds.
2004-01-29 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -3676,7 +5248,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
file if TIFFFdOpen() failed as per bug
http://bugzilla.remotesensing.org/show_bug.cgi?id=468
-
+
* libtiff/tif_open.c: More fixes for
http://bugzilla.remotesensing.org/show_bug.cgi?id=468
@@ -3700,7 +5272,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_dirwrite.c: Fixed handling of writable ASCII tags that
are field_passcount=TRUE properly. Arguably anonymous custom tags
should be declared as passcount=FALSE, but I don't want to change
- that without a careful review.
+ that without a careful review.
2004-01-20 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -3863,8 +5435,8 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2003-11-17 Frank Warmerdam <warmerdam@pobox.com>
- * tif_dirread.c: do not mark all anonymously defined tags to be
- IGNOREd.
+ * tif_dirread.c: do not mark all anonymously defined tags to be
+ IGNOREd.
2003-11-17 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -3904,15 +5476,15 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2003-11-09 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_tile.c: remove spurious use of "s" (sample) in the
+ * libtiff/tif_tile.c: remove spurious use of "s" (sample) in the
planarconfig_contig case in TIFFComputeTile().
http://bugzilla.remotesensing.org/show_bug.cgi?id=387
2003-11-09 Andrey Kiselev <dron@ak4719.spb.edu>
-
+
* libtiff/tiffiop.h: New macros: TIFFmax, TIFFmin and TIFFrint.
-
+
2003-11-07 Andrey Kiselev <dron@ak4719.spb.edu>
* libtiff/{tiffio.h, tif_strip.c}, man/{TIFFstrip.3t, libtiff.3t}:
@@ -3979,11 +5551,11 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
function TIFFReadRGBAImageOriented() implemented to retrieve raster
array with user-specified origin position as suggested by Jason Frank.
See
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=322
for details.
-
+
* tools/tiff2rgba.c: Switched to use TIFFReadRGBAImageOriented()
instead of TIFFReadRGBAImage().
@@ -4064,9 +5636,9 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
encoded write functions use tif_postdecode() to apply byte order
swapping (swab) to the application passed data buffer if the same
would be done when reading. This allows us to write pixel data with
- more than 8 bits per sample to existing files of a non-native byte
+ more than 8 bits per sample to existing files of a non-native byte
order. One side effect of this change is the applications buffer
- itself is altered in this case by the act of writing.
+ itself is altered in this case by the act of writing.
http://bugzilla.remotesensing.org/show_bug.cgi?id=171
@@ -4092,9 +5664,9 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2003-07-08 Frank Warmerdam <warmerdam@pobox.com>
* tif_aux.c, tif_codec.c, tif_dir.c, tif_dirread.c, tif_extension.c,
- tif_fax3.c, tif_getimage.c, tif_luv.c, tif_lzw.c, tif_next.c,
+ tif_fax3.c, tif_getimage.c, tif_luv.c, tif_lzw.c, tif_next.c,
tif_packbits.c, tif_predict.c, tif_print.c, tif_swab.c, tif_thunder.c:
- avoid casting warning at /W4.
+ avoid casting warning at /W4.
2003-07-03 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -4116,11 +5688,11 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_dirinfo.c: TIFFDataWidth() returns 0 in case of
unknown data type.
-
+
2003-06-19 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_print.c: fixed some serious bugs when printing
- custom tags ... almost certain to crash.
+ custom tags ... almost certain to crash.
* libtiff/tif_dirread.c: Don't ignore custom fields that are
autodefined. Not sure how this got to be like this.
@@ -4131,12 +5703,12 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* tools/tiffcmp.c, man/tiffcmp.1: Fixed problem with unused data
comparing as per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=349
`-z' option now can be used to set the number of reported different
bytes.
-
+
2003-06-09 Andrey Kiselev <dron@ak4719.spb.edu>
* tools/tiffcp.c, man/tiffcp.1: Added possibility to specify value -1
@@ -4162,7 +5734,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2003-05-25 Andrey Kiselev <dron@ak4719.spb.edu>
* tools/fax2tiff.c: Page numbering fixed, as per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=341
2003-05-20 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -4228,7 +5800,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* tools/tiffcp.c: Fixed problem with colorspace conversion for JPEG
encoded images. See bug entries
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=275
and
@@ -4289,16 +5861,16 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_jpeg.c: Modified to defer initialization of jpeg
library so that we can check if there is already any tile/strip data
- before deciding between creating a compressor or a decompressor.
+ before deciding between creating a compressor or a decompressor.
2003-01-31 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_write.c: TIFFWriteCheck() now fails if the image is
- a pre-existing compressed image. That is, image writing to
+ a pre-existing compressed image. That is, image writing to
pre-existing compressed images is not allowed.
* libtiff/tif_open.c: Removed error if opening a compressed file
- in update mode.
+ in update mode.
http://bugzilla.remotesensing.org/show_bug.cgi?id=198
@@ -4311,16 +5883,16 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* cut 3.6.0 Beta release.
2002-12-20 Andrey Kiselev <dron@ak4719.spb.edu>
-
+
* tools/fax2ps.c, man/fax2ps.1: Page size was determined
in wrong way as per bug
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=239
2002-12-17 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_dirread.c: Allow wrong sized arrays in
- TIFFFetchStripThing().
+ * libtiff/tif_dirread.c: Allow wrong sized arrays in
+ TIFFFetchStripThing().
http://bugzilla.remotesensing.org/show_bug.cgi?id=49
@@ -4334,7 +5906,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_dir.c: fixed bug with resetting an existing custom
field value.
- * libtiff/tif_dir.c: Fixed potential problem with ascii "custom"
+ * libtiff/tif_dir.c: Fixed potential problem with ascii "custom"
tags in TIFFVGetField() ... added missing break.
2002-10-14 Frank Warmerdam <warmerdam@pobox.com>
@@ -4346,11 +5918,11 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
the eps by redefining the colorimage operator will get messed up.
Patch supplied by William Bader.
- * Makefile.in: added tif_extension.c to file list as per
+ * Makefile.in: added tif_extension.c to file list as per
http://bugzilla.remotesensing.org/show_bug.cgi?id=218.
2002-10-11 Andrey Kiselev <dron@ak4719.spb.edu>
-
+
* configure, config.site, libtiff/{tif_unix.c, Makefile.in}: Fix for
large files (>2GiB) supporting. New option in the config.site:
LARGEFILE="yes". Should be enough for I/O of the large files.
@@ -4382,13 +5954,13 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2002-10-06 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_jpeg.c: fixed problem with boolean defined with wrong
- size on windows. Use #define boolean hack.
+ size on windows. Use #define boolean hack.
http://bugzilla.remotesensing.org/show_bug.cgi?id=188
* libtiff/tiff.h: Don't do special type handling in tiff.h unless
USING_VISUALAGE is defined.
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=39
2002-10-03 Frank Warmerdam <warmerdam@pobox.com>
@@ -4399,30 +5971,30 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_dirread.c: Another fix for the fetching SBYTE arrays
by the TIFFFetchByteArray() function. Should finally resolve
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=52
-
+
* configure: Set -DPIXARLOG_SUPPORT option along with -DZIP_SUPPORT
* html/Makefile.in: New targets added: html and groffhtml for
producing HTML representations of the manual pages automatically.
html target uses man2html tool, groffhtml uses groff tool.
-
+
2002-09-29 Frank Warmerdam <warmerdam@pobox.com>
* configure, libtiff/Makefile.in: Added SCO OpenServer 5.0.6 support
- from John H. DuBois III.
+ from John H. DuBois III.
2002-09-15 Andrey Kiselev <dron@ak4719.spb.edu>
* Makefile.in, /man/{raw2tiff.1, Makefile.in, libtiff.3}: Added
manual page for raw2tiff(1) tool.
-
+
2002-09-12 Andrey Kiselev <dron@ak4719.spb.edu>
* /libtiff/{tiffio.h, tif_dir.h}: TIFFDataWidth() declaration moved to
the tiffio.h header file.
-
+
* Makefile.in, /man/{TIFFDataWidth.3t, Makefile.in, libtiff.3}: Added
manual page for TIFFDataWidth() function
@@ -4432,8 +6004,8 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
as per http://bugzilla.remotesensing.org/show_bug.cgi?id=196.
* tools/tiff2ps.c: Don't emit BeginData/EndData DSC comments
- since we are unable to properly include the amount to skip.
-
+ since we are unable to properly include the amount to skip.
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=80
2002-09-02 Andrey Kiselev <dron@ak4719.spb.edu>
@@ -4443,7 +6015,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
http://bugzilla.remotesensing.org/show_bug.cgi?id=52
2002-08-22 Andrey Kiselev <dron@ak4719.spb.edu>
-
+
* /libtiff/tif_dirinfo.c: Further additions to free custom fields
in _TIFFSetupFieldInfo() function.
See http://bugzilla.remotesensing.org/show_bug.cgi?id=169 for details.
@@ -4452,14 +6024,14 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
LZWDecode() and LZWDecodeCompat().
Fixes http://bugzilla.remotesensing.org/show_bug.cgi?id=190
and http://bugzilla.remotesensing.org/show_bug.cgi?id=100
-
+
* /libtiff/tif_lzw.c:
Added check for valid code lengths in LZWDecode() and
LZWDecodeCompat(). Fixes
http://bugzilla.remotesensing.org/show_bug.cgi?id=115
2002-08-16 Andrey Kiselev <dron@ak4719.spb.edu>
-
+
* /libtiff/{Makefile.vc, libtiff.def}:
Missed declarations added.
@@ -4470,7 +6042,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
http://bugzilla.remotesensing.org/show_bug.cgi?id=177
- * tif_dir.h: changed FIELD_CODEC to 66 from 64 to avoid overlap
+ * tif_dir.h: changed FIELD_CODEC to 66 from 64 to avoid overlap
with FIELD_CUSTOM as mentioned in bug 169.
* tif_close.c: added logic to free dynamically created anonymous
@@ -4479,31 +6051,31 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
http://bugzilla.remotesensing.org/show_bug.cgi?id=169
2002-08-10 Andrey Kiselev <dron@ak4719.spb.edu>
-
+
* /tools/{raw2tiff.c, Makefile.in, Makefile.lcc, Makefile.vc}:
New tool: raw2tiff --- raw images to TIFF converter. No manual page yet.
2002-07-31 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_jpeg.c: Fixed problem with setting of nrows in
+ * libtiff/tif_jpeg.c: Fixed problem with setting of nrows in
JPEGDecode() as per bugzilla bug (issue 1):
http://bugzilla.remotesensing.org/show_bug.cgi?id=129
* libtiff/{tif_jpeg.c,tif_strip.c,tif_print.c}: Hacked tif_jpeg.c to
fetch TIFFTAG_YCBCRSUBSAMPLING from the jpeg data stream if it isn't
- present in the tiff tags.
+ present in the tiff tags.
http://bugzilla.remotesensing.org/show_bug.cgi?id=168
* libtiff/tif_read.c, libtiff/tif_write.c: TIFFReadScanline() and
TIFFWriteScanline() now set tif_row explicitly in case the codec has
- fooled with the value.
+ fooled with the value.
http://bugzilla.remotesensing.org/show_bug.cgi?id=129
2002-06-22 Andrey Kiselev <dron@ak4719.spb.edu>
-
+
* /tools/tiff2ps.c: Added workaround for some software that may crash
when last strip of image contains fewer number of scanlines than
specified by the `/Height' variable. See
@@ -4519,8 +6091,8 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2002-06-11 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/contrib/win95: renamed to contrib/win_dib. Added new
- Tiffile.cpp example of converting TIFF files into a DIB on Win32.
+ * libtiff/contrib/win95: renamed to contrib/win_dib. Added new
+ Tiffile.cpp example of converting TIFF files into a DIB on Win32.
This one is described in:
http://bugzilla.remotesensing.org/show_bug.cgi?id=143
@@ -4536,21 +6108,21 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
http://bugzilla.remotesensing.org/show_bug.cgi?id=131
2002-04-26 Andrey Kiselev <dron@ak4719.spb.edu>
-
+
* libtiff/libtiff.def: Added missed declaration.
-
+
2002-04-22 Andrey Kiselev <dron@ak4719.spb.edu>
-
+
* tools/fax2tiff.c: Updated to reflect latest changes in libtiff.
Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=125
2002-04-20 Andrey Kiselev <dron@ak4719.spb.edu>
-
+
* libtiff/tif_open.c: Pointers to custom procedures
in TIFFClientOpen() are checked to be not NULL-pointers.
-
+
2002-04-18 Andrey Kiselev <dron@ak4719.spb.edu>
-
+
* libtiff/libtiff.def: Added missed declarations.
* libtiff/tif_pixarlog.c: Updated for using tif_tagmethods structure.
@@ -4560,14 +6132,14 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_lzw.c: Additional checks for data integrity introduced.
Should finally close
http://bugzilla.remotesensing.org/show_bug.cgi?id=100
-
+
2002-04-10 Andrey Kiselev <dron@ak4719.spb.edu>
* tools/tiff2ps: Division by zero fixed.
Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=88
2002-04-09 Andrey Kiselev <dron@ak4719.spb.edu>
-
+
* libtiff/: tif_dirwrite.c, tif_write.c, tiffio.h:
TIFFCheckpointDirectory() routine added.
Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=124
@@ -4599,7 +6171,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
replaced by warnings. Now libtiff should read corrupted LZW-compressed
files by skipping bad strips.
Closes http://bugzilla.remotesensing.org/show_bug.cgi?id=100
-
+
2002-04-03 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_dirwrite.c: Removed some dead code.
@@ -4621,18 +6193,18 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
http://bugzilla.remotesensing.org/show_bug.cgi?id=111
- * tif_print.c: Fixed so that ASCII FIELD_CUSTOM values with
+ * tif_print.c: Fixed so that ASCII FIELD_CUSTOM values with
passcount set FALSE can be printed (such as TIFFTAG_SOFTWARE).
- * libtiff/tif_dir.c,tif_dirinfo.c,tif_dir.h,tif_ojpeg.c: modified so
+ * libtiff/tif_dir.c,tif_dirinfo.c,tif_dir.h,tif_ojpeg.c: modified so
that TIFFTAG_SOFTWARE uses FIELD_CUSTOM as an example.
2002-03-26 Dwight Kelly <dbmalloc@remotesensing.org>
* libtiff/: tiff.h, tif_dir.c, tif_dir.h, tif_dirinfo.c, tif_dirread.c,
tif_dirwrite.c: Added get/put code for new tag XMLPACKET as defined
- in Adobe XMP Technote. Added missing INKSET tag value from TIFF 6.0 spec
- INKSET_MULTIINK (=2). Added missing tags from Adobe TIFF technotes:
+ in Adobe XMP Technote. Added missing INKSET tag value from TIFF 6.0 spec
+ INKSET_MULTIINK (=2). Added missing tags from Adobe TIFF technotes:
CLIPPATH, XCLIPPATHUNITS, YCLIPPATHUNITS, OPIIMAGEID, OPIPROXY and
INDEXED. Added PHOTOMETRIC tag value from TIFF technote 4 ICCLAB (=9).
@@ -4691,7 +6263,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
http://bugzilla.remotesensing.org/show_bug.cgi?id=94
- * man/Makefile.in: Patch DESTDIR handling
+ * man/Makefile.in: Patch DESTDIR handling
http://bugzilla.remotesensing.org/show_bug.cgi?id=95
@@ -4729,9 +6301,9 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2002-01-04 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_jpeg.c: fixed computation of segment_width for
- tiles files to avoid error about it not matching the
- cinfo.d.image_width values ("JPEGPreDecode: Improper JPEG strip/tile
+ * libtiff/tif_jpeg.c: fixed computation of segment_width for
+ tiles files to avoid error about it not matching the
+ cinfo.d.image_width values ("JPEGPreDecode: Improper JPEG strip/tile
size.") for ITIFF files. Apparently the problem was incorporated since
3.5.5, presumably during the OJPEG/JPEG work recently.
@@ -4741,7 +6313,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
http://bugzilla.remotesensing.org/show_bug.cgi?id=94
- * libtiff/tif_getimage.c: If DEFAULT_EXTRASAMPLE_AS_ALPHA is 1
+ * libtiff/tif_getimage.c: If DEFAULT_EXTRASAMPLE_AS_ALPHA is 1
(defined in tiffconf.h - 1 by default) then the RGBA interface
will assume that a fourth extra sample is ASSOCALPHA if the
EXTRASAMPLE value isn't set for it. This changes the behaviour of
@@ -4753,9 +6325,9 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2001-12-12 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_jpeg.c: allow jpeg data stream sampling values to
- override those from tiff directory. This makes this work with
- ImageGear generated files.
+ * libtiff/tif_jpeg.c: allow jpeg data stream sampling values to
+ override those from tiff directory. This makes this work with
+ ImageGear generated files.
2001-12-07 Frank Warmerdam <warmerdam@pobox.com>
@@ -4768,7 +6340,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* Reissue 3.5.7 release.
* libtiff/mkversion.c: Fix output of TIFF_VERSION to be
- YYYYMMDD so that it is increasing over time.
+ YYYYMMDD so that it is increasing over time.
* Makefile.in: Ensure that tiffvers.h is regenerated in the
make release target.
@@ -4793,8 +6365,8 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2001-10-10 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tiff.h: I have created COMPRESSION_CCITT_T4,
- COMPRESSION_CCITT_T6, TIFFTAG_T4OPTIONS and TIFFTAG_T6OPTIONS aliases
+ * libtiff/tiff.h: I have created COMPRESSION_CCITT_T4,
+ COMPRESSION_CCITT_T6, TIFFTAG_T4OPTIONS and TIFFTAG_T6OPTIONS aliases
in keeping with TIFF 6.0 standard in tiff.h
http://bugzilla.remotesensing.org/show_bug.cgi?id=83
@@ -4814,10 +6386,10 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
error about LZW not being available.
* libtiff/tif_dir.c: propagate failure to initialize compression
- back from TIFFSetField() as an error status, so applications can
+ back from TIFFSetField() as an error status, so applications can
detect failure.
- * libtiff/tif_dir.c: removed the auto replacement of
+ * libtiff/tif_dir.c: removed the auto replacement of
COMPRESSION_LZW with COMPRESSION_NONE in _TIFFVSetField().
* Removed Makefile, tools/Makefile, port/install.sh, man/Makefile
@@ -4825,7 +6397,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2001-09-22 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_ojpeg.c: new update from Scott.
+ * libtiff/tif_ojpeg.c: new update from Scott.
2001-09-09 Frank Warmerdam <warmerdam@pobox.com>
@@ -4844,7 +6416,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
http://bugzilla.remotesensing.org/show_bug.cgi?id=47
- * tools/tiff2ps.c: added OJPEG YCbCr to RGB support.
+ * tools/tiff2ps.c: added OJPEG YCbCr to RGB support.
* libtiff/tif_ojpeg.c: Applied substantial patch from Scott.
@@ -4853,14 +6425,14 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_packbits.c: fixed memory overrun error.
http://bugzilla.remotesensing.org/show_bug.cgi?id=77
-
+
2001-08-31 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_getimage.c: relax handling of contig case where
there are extra samples that are supposed to be ignored. This
- should now work for 8bit greyscale or palletted images.
+ should now work for 8bit greyscale or palletted images.
- http://bugzilla.remotesensing.org/show_bug.cgi?id=75
+ http://bugzilla.remotesensing.org/show_bug.cgi?id=75
2001-08-28 Frank Warmerdam <warmerdam@pobox.com>
@@ -4873,15 +6445,15 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_getimage.c: Use memmove() instead of TIFFmemcpy()
in TIFFReadRGBATile() to avoid issues in cases of overlapping
- buffers. See Bug 69 in Bugzilla.
+ buffers. See Bug 69 in Bugzilla.
http://bugzilla.remotesensing.org/show_bug.cgi?id=69
-
+
* tools/tiff2rgba.c: fixed getopt() call so that -b works again.
2001-08-09 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tiff.h, libtiff/tif_fax3.c: added check for __LP64__
+ * libtiff/tiff.h, libtiff/tif_fax3.c: added check for __LP64__
when checking for 64 bit architectures as per bugzilla bug 67.
2001-07-27 Frank Warmerdam <warmerdam@pobox.com>
@@ -4891,7 +6463,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2001-07-20 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_jpeg.c: Define HAVE_BOOLEAN on windows if RPCNDR.H
+ * libtiff/tif_jpeg.c: Define HAVE_BOOLEAN on windows if RPCNDR.H
has been included.
2001-07-19 Frank Warmerdam <warmerdam@pobox.com>
@@ -4903,11 +6475,11 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_ojpeg.c: updates from Scott. Handles colors
much better. Now depends on having patched libjpeg as per
- patch in contrib/ojpeg/*.
+ patch in contrib/ojpeg/*.
2001-07-17 Frank Warmerdam <warmerdam@pobox.com>
- * */Makefile.in: added DESTDIR support.
+ * */Makefile.in: added DESTDIR support.
http://bugzilla.remotesensing.org/show_bug.cgi?id=60
@@ -4915,20 +6487,20 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* configure, libtiff/Makefile.in: applied OpenBSD patches
as per:
-
+
http://bugzilla.remotesensing.org/show_bug.cgi?id=61
2001-06-28 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/tif_getimage.c: Fixed so that failure is properly
- reported by gtTileContig, gtStripContig, gtTileSeparate and
+ reported by gtTileContig, gtStripContig, gtTileSeparate and
gtStripSeparate.
See http://bugzilla.remotesensing.org/show_bug.cgi?id=51
- * tiffcmp.c: Fixed multi samples per pixel support for ContigCompare.
+ * tiffcmp.c: Fixed multi samples per pixel support for ContigCompare.
Updated bug section of tiffcmp.1 to note tiled file issues.
-
+
See http://bugzilla.remotesensing.org/show_bug.cgi?id=53
2001-06-22 Frank Warmerdam <warmerdam@pobox.com>
@@ -4969,10 +6541,10 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2001-05-08 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tif_dirinfo.c: moved pixar and copyright flags to
+ * libtiff/tif_dirinfo.c: moved pixar and copyright flags to
ensure everything is in order.
- * libtiff/libtiff.def: added TIFFCreateDirectory and
+ * libtiff/libtiff.def: added TIFFCreateDirectory and
TIFFDefaultStripSize as per:
http://bugzilla.remotesensing.org/show_bug.cgi?id=46
@@ -4981,10 +6553,10 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_dirinfo.c: Modified the TIFF_BYTE definition for
TIFFTAG_PHOTOSHOP to use a writecount of TIFF_VARIABLE2 (-3) to
- force use of uint32 counts instead of short counts.
+ force use of uint32 counts instead of short counts.
* libtiff/tif_dirwrite.c: Added support for TIFF_VARIABLE2 in the
- case of writing TIFF_BYTE/TIFF_SBYTE fields.
+ case of writing TIFF_BYTE/TIFF_SBYTE fields.
http://bugzilla.remotesensing.org/show_bug.cgi?id=43
@@ -5020,20 +6592,20 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
with the inttypes.h include file on AIX.
See http://bugzilla.remotesensing.org/show_bug.cgi?id=39
-
+
* VERSION: update to 3.5.7 beta in preparation for release.
* configure/config.site: modified to check if -lm is needed for
MACHDEPLIBS if not supplied by config.site. Needed for Darwin.
- * config.guess: updated wholesale to an FSF version apparently
- from 1998 (as opposed to 1994). This is mainly inspired by
+ * config.guess: updated wholesale to an FSF version apparently
+ from 1998 (as opposed to 1994). This is mainly inspired by
providing for MacOS X support.
2001-03-29 Frank Warmerdam <warmerdam@pobox.com>
* configure, Makefile.in, etc: added support for OPTIMIZER being
- set from config.site.
+ set from config.site.
2001-03-28 Frank Warmerdam <warmerdam@pobox.com>
@@ -5052,7 +6624,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
(in particular short ones) print properly.
See http://bugzilla.remotesensing.org/show_bug.cgi?id=35
-
+
* tiff2ps.c/tiff2ps.1: Substantial changes to tiff2ps by
Bruce A. Mallett. See check message for detailed information
on all the changes, including a faster encoder, fixes for level
@@ -5060,7 +6632,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2001-03-27 Frank Warmerdam <warmerdam@pobox.com>
- * libtiff/tiffio.h: Changed "#if LOGLUV_PUBLIC" to
+ * libtiff/tiffio.h: Changed "#if LOGLUV_PUBLIC" to
"#ifdef LOGLUV_PUBLIC" so it will work with VisualAge on AIX.
http://bugzilla.remotesensing.org/show_bug.cgi?id=39
@@ -5072,7 +6644,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2001-03-13 Frank Warmerdam <warmerdam@pobox.com>
- * tif_getimage.c: Added support for 16bit minisblack/miniswhite
+ * tif_getimage.c: Added support for 16bit minisblack/miniswhite
images in RGBA interface.
2001-03-02 Frank Warmerdam <warmerdam@pobox.com>
@@ -5083,29 +6655,29 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* Brent Roman contributed updated tiffcp utility (and tiffcp.1)
with support for extracting subimages with the ,n syntax, and also
- adding the -b bias removal flag.
+ adding the -b bias removal flag.
2001-02-16 Frank Warmerdam <warmerdam@pobox.com>
* libtiff/libtiff.def: Brent Roman submitted new version adding
- serveral missing entry points.
+ serveral missing entry points.
* libtiff/tif_dirinfo.c: don't declare tiffFieldInfo static on VMS.
- Some sort of weird VMS thing.
+ Some sort of weird VMS thing.
http://bugzilla.remotesensing.org/show_bug.cgi?id=31
- * tif_luv.c/tiff.h/tiffio.h:
- New version of TIFF LogLuv (SGILOG) modules contributed by Greg Ward
+ * tif_luv.c/tiff.h/tiffio.h:
+ New version of TIFF LogLuv (SGILOG) modules contributed by Greg Ward
(greg@shutterfly.com). He writes:
1) I improved the gamut-mapping function in tif_luv.c for imaginary
- colors, because some images were being super-saturated on the input
+ colors, because some images were being super-saturated on the input
side and this resulted in some strange color shifts in the output.
2) I added a psuedotag in tiff.h to control random dithering during
- LogLuv encoding. This is turned off by default for 32-bit LogLuv and
- on for 24-bit LogLuv output. Dithering improves the average color
+ LogLuv encoding. This is turned off by default for 32-bit LogLuv and
+ on for 24-bit LogLuv output. Dithering improves the average color
accuracy over the image.
3) I added a #define for LOG_LUV_PUBLIC, which is enabled by default in
@@ -5118,20 +6690,20 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2001-01-23 Frank Warmerdam <warmerdam@pobox.com>
* tif_fax3.c: keep rw_mode flag internal to fax3 state to remember
- whether we are encoding or decoding. This is to ensure graceful
+ whether we are encoding or decoding. This is to ensure graceful
recovery if TIFFClientOpen() discovers an attempt to open a compressed
- file for "r+" access, and subsequently close it, as it resets the
+ file for "r+" access, and subsequently close it, as it resets the
tif_mode flag to O_RDONLY in this case to avoid writes, confusing the
compressor's concept of whether it is in encode or decode mode.
-2001-01-08 Mike Welles <mike@bangstate.com>
+2001-01-08 Mike Welles <mike@bangstate.com>
* Makefile.in: Now cleaning up after itself after creating the .tar.gz and .zip
-
+
2001-01-07 Frank Warmerdam <warmerdam@pobox.com>
* html/libtiff.html: Fixed arguments in example for TIFFRGBAImageGet()
- as per bug report by Patrick Connor.
+ as per bug report by Patrick Connor.
2000-12-28 Frank Warmerdam <warmerdam@pobox.com>
@@ -5139,12 +6711,12 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* Fixed libtiff/makefile.vc to make tiffvers.h not version.h.
-2000-12-22 Mike Welles <mike@bangstate.com>
+2000-12-22 Mike Welles <mike@bangstate.com>
* added link to CVS mirror from index.html
-
- * updated html/internals.html to note that LZW compression is
- not supported by default.
-
+
+ * updated html/internals.html to note that LZW compression is
+ not supported by default.
+
2000-12-22 Frank Warmerdam <warmerdam@pobox.com>
* updated html/libtiff.html to not point at Niles' old JPL web site
@@ -5156,19 +6728,19 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
Leonard Rosenthol <leonardr@lazerware.com>. May interfere
with correct building on older systems. If so, please let me know.
-2000-12-19 Mike Welles <mike@bangsate.com>
+2000-12-19 Mike Welles <mike@bangsate.com>
- * Took out LZW Encoding from tif_lzw.c
+ * Took out LZW Encoding from tif_lzw.c
* Created HOWTO-RELEASE
* Created html/v3.5.6.html
* updated index.html
-
+
2000-12-01 Frank Warmerdam <warmerdam@pobox.com>
- * Added patches for EOFB support in tif_fax3.c and tif_fax3.h.
+ * Added patches for EOFB support in tif_fax3.c and tif_fax3.h.
Patches supplied by Frank Cringle <fdc@cliwe.ping.de>
Example file at: ftp://ftp.remotesensing.org/pub/libtiff/eofb_396.tif
@@ -5182,30 +6754,30 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
targets so libtiff.so will be built with an explicit dependency
on libm.so.
- * libtiff/Makefile.in: Use softlinks to link libtiff.so.3 to
- libtiff.so.3.5.5.
+ * libtiff/Makefile.in: Use softlinks to link libtiff.so.3 to
+ libtiff.so.3.5.5.
- * libtiff/Makefile.in & configure: Remove all references to the ALPHA
- file, or ALPHA version logic. Added stuff about DIST_POINT in
+ * libtiff/Makefile.in & configure: Remove all references to the ALPHA
+ file, or ALPHA version logic. Added stuff about DIST_POINT in
place of DIST_TYPE and the alpha release number stuff.
2000-11-22 Frank Warmerdam <warmerdam@pobox.com>
* I have applied a patch from Steffen Moeller <moeller@ebi.ac.uk> to
- the configure script so that it now accepts the --prefix, and
- --exec-prefix directives.
+ the configure script so that it now accepts the --prefix, and
+ --exec-prefix directives.
2000-11-13 Frank Warmerdam <warmerda@cs46980-c>
- * I have made a variety of modifications in an effort to ensure the
+ * I have made a variety of modifications in an effort to ensure the
TIFFLIB_VERSION macro is automatically generated from the RELEASE-DATE
- file which seems to be updated regularly.
+ file which seems to be updated regularly.
- o mkversion.c now reads RELEASE-DATE and emits TIFFLIB_VERSION in
- version include file.
- o renamed version.h to tiffvers.h because we now have to install it
- with the public libtiff include files.
- o include tiffvers.h in tiffio.h.
+ o mkversion.c now reads RELEASE-DATE and emits TIFFLIB_VERSION in
+ version include file.
+ o renamed version.h to tiffvers.h because we now have to install it
+ with the public libtiff include files.
+ o include tiffvers.h in tiffio.h.
o updated tif_version.c to use tiffvers.h.
o Updated Makefile.in accordingly.
@@ -5219,13 +6791,13 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
See http://bugzilla.remotesensing.org/show_bug.cgi?id=20
Some patches from Rick LaMont of Dot C Software.
- * Modified tif_packbits.c encoder to avoid compressing more
+ * Modified tif_packbits.c encoder to avoid compressing more
data than provided if rowsize doesn't factor into provided data
(such as occurs for YCbCr).
2000-10-19 Frank Warmerdam <warmerda@cs46980-c>
- * tools/rgb2ycbcr.c: fixed output strip size to account for vertical
+ * tools/rgb2ycbcr.c: fixed output strip size to account for vertical
roundup if rows_per_strip not a multiple of vertical sample size.
2000-10-16 Frank Warmerdam <warmerda@cs46980-c>
@@ -5241,8 +6813,8 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2000-10-12 Frank Warmerdam <warmerda@cs46980-c>
* Modified tiff2bw to ensure portions add to 100%, and that
- white is properly recovered.
-
+ white is properly recovered.
+
See bug http://bugzilla.remotesensing.org/show_bug.cgi?id=15
Patch c/o Stanislav Brabec <utx@penguin.cz>
@@ -5256,26 +6828,26 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
2000-09-27 Frank Warmerdam <warmerda@cs46980-c>
- * Added GNULDdso target an`d switched linux and freebsd to use it.
+ * Added GNULDdso target an`d switched linux and freebsd to use it.
2000-09-26 Frank Warmerdam <warmerda@cs46980-c>
* Applied patch for 0x0000 sequences in tif_fax3.h's definition
- of EXPAND1D() as per bug 11 (from Roman).
+ of EXPAND1D() as per bug 11 (from Roman).
2000-09-25 Frank Warmerdam <warmerda@cs46980-c>
* Fixed tiffcomp.h to avoid win32 stuff if unix #defined, to improve
cygwin compatibility.
* Applied patch from Roman Shpount to tif_fax3.c. This seems to
- be a proper fix to the buffer sizing problem. See
+ be a proper fix to the buffer sizing problem. See
http://bugzilla.remotesensing.org/show_bug.cgi?id=11
* Fixed tif_getimage.c to fix overrun bug with YCbCr images without
downsampling. http://bugzilla.remotesensing.org/show_bug.cgi?id=10
Thanks to Nick Lamb <njl98r@ecs.soton.ac.uk> for reporting the
bug and proving the patch.
-
+
2000-09-18 Frank Warmerdam <warmerda@cs46980-c>
* Fixed tif_jpeg.c so avoid destroying the decompressor before
@@ -5305,15 +6877,15 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* Tentatively added support for SAMPLEFORMAT_COMPLEXIEEEFP, and
SAMPLEFORMAT_COMPLEXINT.
-2000-07-13 Mike Welles <mike@onshore.com>
+2000-07-13 Mike Welles <mike@onshore.com>
+
+ * index.html, bugs.html: added bugzilla info.
- * index.html, bugs.html: added bugzilla info.
-
2000-07-12 Frank Warmerdam <warmerda@rommel.atlsci.com>
* tif_read.c: fix subtle bug with determining the number of
rows for strips that are the last strip in a separation but
- not the last strip of all in TIFFReadEncodedStrip().
+ not the last strip of all in TIFFReadEncodedStrip().
* Applied 16/32 bit fix to tif_fax3.c. Fix supplied by
Peter Skarpetis <peters@serendipity-software.com.au>
@@ -5335,7 +6907,7 @@ btiff/tif_win32.c: Replace custom Win32 memory api with generic
* libtiff/tif_dirread.c: Don't use estimate strip byte count for
one tile/strip images with an offset, and byte count of zero. These
- could be "unpopulated" images.
+ could be "unpopulated" images.
2000-04-18 Frank Warmerdam <warmerda@rommel.atlsci.com>
@@ -5350,17 +6922,17 @@ Tue Apr 18 16:18:08 2000 Frank Warmerdam <warmerda@esabot.atlsci.com>
2000-04-12 Mike Welles <mike@onshore.com>
* configure: Fixed stupid mistake in libc6 test on Linux
-2000-04-04 Mike Welles <mike@onshore.com>
+2000-04-04 Mike Welles <mike@onshore.com>
* tif_win32.c: Applied patch to fix overreads and ovverwrites
- caught by BoundsChecker. From Arvan Pritchard
- <arvan.pritchard@infomatix.co.uk> (untested).
-
- * tif_getimage.c: Applied patch to silence VC6 warnings. From
+ caught by BoundsChecker. From Arvan Pritchard
+ <arvan.pritchard@infomatix.co.uk> (untested).
+
+ * tif_getimage.c: Applied patch to silence VC6 warnings. From
Arvan Pritchard <arvan.pritchard@informatix.co.uk>
-
- * tif_lzw.c: Applied patch to silence VC6 warnings. From
+
+ * tif_lzw.c: Applied patch to silence VC6 warnings. From
Arvan Pritchard <arvan.pritchard@informatix.co.uk>
-
+
2000-03-28 Frank Warmerdam <warmerda@cs46980-c>
* Added contrib/stream (stream io) code submitted by Avi Bleiweiss.
@@ -5370,34 +6942,34 @@ Tue Apr 18 16:18:08 2000 Frank Warmerdam <warmerda@esabot.atlsci.com>
* fax2ps: Fixed mixup of width and height in bounding box statement
as per submission by Nalin Dahyabhai <nalin@redhat.com>.
-2000-03-27 Mike Welles <mike@onshore.com>
+2000-03-27 Mike Welles <mike@onshore.com>
- * fax2ps: Modified printruns to take uint32 instead of uint16.
- Patch courtesy of Bernt Herd <herd@herdsoft.com>
-
-2000-03-20 Mike Welles <mike@onshore.com>
+ * fax2ps: Modified printruns to take uint32 instead of uint16.
+ Patch courtesy of Bernt Herd <herd@herdsoft.com>
+
+2000-03-20 Mike Welles <mike@onshore.com>
- * configure: added test for libc6 for linux targets. Bug reported by
+ * configure: added test for libc6 for linux targets. Bug reported by
Stanislav Brabec <utx@k332.feld.cvut.cz>
- * Added 3.5 docs to html/Makefile.in.
+ * Added 3.5 docs to html/Makefile.in.
Thanks to Stanislav Brabec <utx@k332.feld.cvut.cz>
- * configure: fixed bugs in sed scripts
- (applied sed script s:/@:s;@:;s:/s;;:;: to configure).
+ * configure: fixed bugs in sed scripts
+ (applied sed script s:/@:s;@:;s:/s;;:;: to configure).
fix submitted to Stanislav Brabec <utx@k332.feld.cvut.cz>
- * tools/iptcutil was not in files list, and wasn't being
+ * tools/iptcutil was not in files list, and wasn't being
added to tar archive. Updated Makefile.in.
2000-03-17 Frank Warmerdam <warmerda@cs46980-c>
* tif_fax3.c: Fixed serious bug introduced during the uint16->uint32
- conversion for the run arrays.
+ conversion for the run arrays.
2000-03-03 Frank Warmerdam <warmerda@cs46980-c.mtnk1.on.wave.home.com>
- * Set td_sampleformat default to SAMPLEFORMAT_UINT instead of
+ * Set td_sampleformat default to SAMPLEFORMAT_UINT instead of
SAMPLEFORMAT_VOID in TIFFDefaultDirectory() in tif_dir.c.
2000-03-02 Frank Warmerdam <warmerda@cs46980-c.mtnk1.on.wave.home.com>
@@ -5418,20 +6990,20 @@ Tue Feb 15 22:01:05 2000 Frank Warmerdam <warmerda@gdal.velocet.ca>
set to 1, and added default (off) setting in tiffconf.h. This
should eventually be set by the configure script somehow.
- The original work on all these 2-4GB changes was done by
+ The original work on all these 2-4GB changes was done by
Peter Smith (psmith@creo.com).
* Modified tif_win32.c to support 2-4GB seeks.
* tentatively changed toff_t to be unsigned instead of signed to
- facilitate support for 2-4GB files.
+ facilitate support for 2-4GB files.
* Updated a variety of files to use toff_t. Fixed some mixups
between toff_t and tsize_t.
Fri Jan 28 10:13:49 2000 Frank Warmerdam <warmerda@gdal.velocet.ca>
- * Largely reimplemented contrib/addtiffo to avoid temp files,
+ * Largely reimplemented contrib/addtiffo to avoid temp files,
updating the TIFF file in place. Fixed a few other bugs to.
* Set tif_rawdatasize to zero when freeing raw data buffer in
@@ -5440,7 +7012,7 @@ Fri Jan 28 10:13:49 2000 Frank Warmerdam <warmerda@gdal.velocet.ca>
* Enabled "REWRITE_HACK" in tif_write.c by default.
* Fix bug in tif_write.c when switching between reading one directory
- and writing to another.
+ and writing to another.
* Made TIFFWriteCheck() public, and added TIFFCreateDirectory()
@@ -5452,41 +7024,41 @@ Tue Jan 4 13:39:00 2000 Frank Warmerdam <warmerda@gdal.velocet.ca>
* Added libtiff/libtiff.def to TIFFILES distribution list.
-Mon Dec 27 12:13:39 EST 1999 Mike Welles <mike@onshore.com>
+Mon Dec 27 12:13:39 EST 1999 Mike Welles <mike@onshore.com>
- * Created lzw compression kit, as a new module (libtiff-lzw-compression-kit).
+ * Created lzw compression kit, as a new module (libtiff-lzw-compression-kit).
* Altered descriptions in tools to reflect "by default" lzw not supported
- * Updated index.html to note lzw compression kit.
-
+ * Updated index.html to note lzw compression kit.
+
Tue Dec 21 14:01:51 1999 Frank Warmerdam <warmerda@gdal.velocet.ca>
- * Added fax3sm_winnt.c to distribution list in Makefile.in.
+ * Added fax3sm_winnt.c to distribution list in Makefile.in.
Tue Dec 21 11:04:45 EST 1999 Mike Welles <mike@onshore.com> *** 3.5.4 release ***
-
- * Aadded Pixar tag support. Contributed by Phil Beffery <phil@pixar.com>
- * Made one more change to tif_dir.c for removal of LZW compression. Also added notice
- when LZW compression invoked.
+ * Aadded Pixar tag support. Contributed by Phil Beffery <phil@pixar.com>
+
+ * Made one more change to tif_dir.c for removal of LZW compression. Also added notice
+ when LZW compression invoked.
* Changed default compression in tools to TIFF_PACKBITS, and changed usage descriptions
in tools to reflect removal of LZW compression
-
+
Mon Dec 20 18:39:02 EST 1999 Mike Welles <mike@onshore.com>
- * Fixed bug that caused LZW (non) compression to segfault. Added
- warning about LZW compression removed being removed, and why.
+ * Fixed bug that caused LZW (non) compression to segfault. Added
+ warning about LZW compression removed being removed, and why.
+
+ * Added nostrip to install in tools/Makefile.in so that debugging
+ symbols are kept.
- * Added nostrip to install in tools/Makefile.in so that debugging
- symbols are kept.
-
Tue Dec 7 12:04:47 EST 1999 Mike Welles <mike@onshore.com>
- * Added patch from Ivo Penzar <ivo.penzar@infolink-software.com>,
- supporting Adobe ZIP deflate. Untested.
-
+ * Added patch from Ivo Penzar <ivo.penzar@infolink-software.com>,
+ supporting Adobe ZIP deflate. Untested.
+
Sat Dec 4 15:47:11 1999 Frank Warmerdam <warmerda@gdal.velocet.ca>
* Made Packbits the default compression in tools/tiff2rgba.c instead
@@ -5496,12 +7068,12 @@ Tue Nov 30 14:41:43 1999 Frank Warmerdam <warmerda@gdal.velocet.ca> *** 3.5
* Added tif_luv to contrib/djgpp/Makefile.lib.
-Tue Nov 30 14:15:32 EST 1999 Mike Welles <mike@onshore.com>
+Tue Nov 30 14:15:32 EST 1999 Mike Welles <mike@onshore.com>
- * Added zip creation to relase makefile target
+ * Added zip creation to relase makefile target
+
+ * Added html for TIFFWriteTile.3t man page.
- * Added html for TIFFWriteTile.3t man page.
-
Tue Nov 30 09:20:16 1999 Frank Warmerdam <warmerda@gdal.velocet.ca>
* Added some changes to tif_write.c to support rewriting existing
@@ -5514,26 +7086,26 @@ Mon Nov 29 11:43:42 1999 Frank Warmerdam <warmerda@gdal.velocet.ca>
Sun Nov 28 20:36:18 1999 Frank Warmerdam <warmerda@gdal.velocet.ca>
- * Added notes on use of makefile.vc in build.html, and fixed
+ * Added notes on use of makefile.vc in build.html, and fixed
email subscription address.
-199-11-28 Mike Welles <mike@onshore.com>
+199-11-28 Mike Welles <mike@onshore.com>
- * Fixed apocalypse-inducing y2k bug in contrib/ras/ras2tiff.c
+ * Fixed apocalypse-inducing y2k bug in contrib/ras/ras2tiff.c
* Did some casts cleaning up to reduce compiler warnings in tif_fax3.c,
- from Bruce Carmeron <cameron@petris.com> -- modifications of
- changes made by Frank (sun cc still complained on cast).
+ from Bruce Carmeron <cameron@petris.com> -- modifications of
+ changes made by Frank (sun cc still complained on cast).
* Added tiffconf.h to install target per request from Bill
Radcliffe <billr@corbis.com>: "We need a way for ImageMagick to
know features have been compiled into the TIFF library in order to
- handle things properly".
-
+ handle things properly".
+
Sat Nov 27 16:49:21 1999 Frank Warmerdam <warmerda@gdal.velocet.ca>
* fixed various VC++ warnings as suggested by Gilles Vollant
- <info@winimage.com>.
+ <info@winimage.com>.
Wed Nov 24 12:08:16 1999 Frank Warmerdam <warmerda@gdal.velocet.ca>
@@ -5542,59 +7114,59 @@ Wed Nov 24 12:08:16 1999 Frank Warmerdam <warmerda@gdal.velocet.ca>
1999-11-22 Mike Welles <mike@onshore.com>
* HTML-ized the man pages, added to html/man
-
- * Removed LZW Compression to comply with Unisys patent extortion.
-
-1999-09-29 Mike Welles <mike@onshore.com>
- * Corrected one remaining 16 -> 32 bit value in tif_fax3.c,
- From Ivo Penzar <ivo.penzar@infolink-software.com.
+
+ * Removed LZW Compression to comply with Unisys patent extortion.
+
+1999-09-29 Mike Welles <mike@onshore.com>
+ * Corrected one remaining 16 -> 32 bit value in tif_fax3.c,
+ From Ivo Penzar <ivo.penzar@infolink-software.com.
* Added patch from Ivo Penzar to have TiffAdvanceDirectory handle
memory mapped files. <ivo.penzar@infolink-software.com>
-
+
1999-09-26 Mike Welles <mike@onshore.com> *** 3.5.2 release ***
- * Corrected alpha versioning.
+ * Corrected alpha versioning.
- * Removed distinction between alpha and release targets in Makefile.in.
+ * Removed distinction between alpha and release targets in Makefile.in.
- * added release.stamp target, which tags cvs tree, and updates
+ * added release.stamp target, which tags cvs tree, and updates
"RELEASE-DATE"
- * added releasediff target, which diffs tree with source as of
+ * added releasediff target, which diffs tree with source as of
date in "RELEASE-DATE"
-
- * Ticked up version to 3.5.2 (alpha 01 -- but I think we'll moving
- away from alpha/non-alpha distinctions).
- * updated html to reflect release
-
+ * Ticked up version to 3.5.2 (alpha 01 -- but I think we'll moving
+ away from alpha/non-alpha distinctions).
+
+ * updated html to reflect release
+
1999-09-23 <warmerda@CS46980-B>
* Set O_BINARY for tif_unix.c open() ... used on cygwin for instance.
* Added CYGWIN case in configure.
-Fri Sep 17 00:13:51 CEST 1999 Mike Welles <mike@onshore.com>
+Fri Sep 17 00:13:51 CEST 1999 Mike Welles <mike@onshore.com>
+
+ * Applied Francois Dagand's patch to handle fax decompression bug.
+ (sizes >= 65536 were failing)
- * Applied Francois Dagand's patch to handle fax decompression bug.
- (sizes >= 65536 were failing)
-
Tue Sep 14 21:31:43 1999 Frank Warmerdam <warmerda@gdal.velocet.ca>
- * Applied "a" mode fix to tif_win32.c/TIFFOpen() as suggested
+ * Applied "a" mode fix to tif_win32.c/TIFFOpen() as suggested
by Christopher Lawton <clawton@mathworks.com>
Wed Sep 8 08:19:18 1999 Frank Warmerdam <warmerda@gdal.velocet.ca>
- * Added IRIX/gcc, and OSF/1 4.x support on behalf of
+ * Added IRIX/gcc, and OSF/1 4.x support on behalf of
Albert Chin-A-Young <china@thewrittenword.com>
- * Added TIFFReassignTagToIgnore() API on behalf of
+ * Added TIFFReassignTagToIgnore() API on behalf of
Bruce Cameron <cameron@petris.com>. Man page still pending.
Wed Aug 25 11:39:07 1999 Frank Warmerdam <warmerda@gdal.velocet.ca>
- * Added test target in Makefile, test_pics.sh script and pics/*.rpt
+ * Added test target in Makefile, test_pics.sh script and pics/*.rpt
files to provide for a rudimentary testsuite.
* Added contrib/tags back from old distribution ... fixed up a bit.
@@ -5602,7 +7174,7 @@ Wed Aug 25 11:39:07 1999 Frank Warmerdam <warmerda@gdal.velocet.ca>
1999-08-16 <warmerda@CS46980-B>
* Added simple makefile.vc makefiles for building with MS VC++
- on Windows NT/98/95 in console mode. Stuff in contrib/win* make give
+ on Windows NT/98/95 in console mode. Stuff in contrib/win* make give
better solutions for some users.
Mon Aug 16 21:52:11 1999 Frank Warmerdam <warmerda@gdal.velocet.ca>
@@ -5612,20 +7184,20 @@ Mon Aug 16 21:52:11 1999 Frank Warmerdam <warmerda@gdal.velocet.ca>
1999-08-16 Michael L. Welles <mike@kurtz.fake>
- * Updated html/index.html with anon CVS instructions.
+ * Updated html/index.html with anon CVS instructions.
Mon Aug 16 13:18:41 1999 Frank Warmerdam <warmerda@gdal.velocet.ca>
- * pre-remove so link before softlink in LINUXdso action in
+ * pre-remove so link before softlink in LINUXdso action in
libtiff/Makefile.in to avoid failure on LINUXdso builds other than
the first.
* Fixed problem with cvtcmap() in tif_getimage.c modifying the
colormaps owned by the TIFF handle itself when trying to fixup wrong
(eight bit) colormaps. Corrected by maintaining a private copy of
- the colormap.
+ the colormap.
- * Added TIFFReadRGBATile()/TIFFReadRGBAStrip() support in
+ * Added TIFFReadRGBATile()/TIFFReadRGBAStrip() support in
tif_getimage.c.
* CVS Repository placed at remotesensing.org. ChangeLog added.
diff --git a/tiff/HOWTO-RELEASE b/tiff/HOWTO-RELEASE
index 5752cc447..9293592b3 100644
--- a/tiff/HOWTO-RELEASE
+++ b/tiff/HOWTO-RELEASE
@@ -7,26 +7,32 @@ Notes on releasing.
and that these tools are in your executable search path prior to
any other installed versions. Versions delivered with Linux may be
altered so it is best to install official FSF releases. GNU 'm4'
- 1.4.6 or later is needed in order to avoid bugs in m4. These
- packages may be downloaded from the following ftp locations:
+ 1.4.16 is needed in order to avoid bugs in m4. These packages may
+ be downloaded from the following ftp locations:
+ m4 - ftp://ftp.gnu.org/pub/gnu/m4
autoconf - ftp://ftp.gnu.org/pub/gnu/autoconf
automake - ftp://ftp.gnu.org/pub/gnu/automake
libtool - ftp://ftp.gnu.org/pub/gnu/libtool
+ It is recommended to install m4 before autoconf, since the later
+ requires the former.
+
Release builds should only be done on a system with a functioning
and correctly set system clock and on a filesystem which accurately
records file update times. Use of GNU make is recommended.
1. Commit any unsaved changes.
-2. Create html/vX.X.html. Take ChangeLog entries and html-ify in there.
+2. Create html/vX.X.html and add it to cvs with 'cvs add html/vX.X.html'.
+ Take ChangeLog entries and html-ify in there.
Easist thing to do is take html/vX.(X-1).html and use it as a template.
- Add that file to the list of EXTRA_DIST files in the html/Makefile.am.
-3. Update html/index.html to refer to this new page as the current release.
+3. Add vX.X.html file to the list of EXTRA_DIST files in the html/Makefile.am.
+
+4. Update html/index.html to refer to this new page as the current release.
-4. Increment the release version in configure.ac. Put 'alpha' or
+5. Increment the release version in configure.ac. Put 'alpha' or
'beta' after the version, if applicable. For example:
4.0.0
@@ -36,7 +42,7 @@ Notes on releasing.
Version should be updated in two places: in the second argument of the
AC_INIT macro and in LIBTIFF_xxx_VERSION variables.
-5. Update library ELF versioning in configure.ac (LIBTIFF_CURRENT,
+6. Update library ELF versioning in configure.ac (LIBTIFF_CURRENT,
LIBTIFF_REVISION, and LIBTIFF_AGE). These numbers have nothing to
do with the libtiff release version numbers.
@@ -47,11 +53,11 @@ Notes on releasing.
have been added, removed, or interface structures have changed,
then more care is required.
-6. Add an entry to Changelog similar to:
+7. Add an entry to Changelog similar to:
* libtiff 4.0.0 released.
-7. In the source tree do
+8. In the source tree do
./autogen.sh
@@ -59,7 +65,7 @@ Notes on releasing.
maintainer build with current autoconf, automake, and libtool
packages. It is only needed when updating tool versions.
-8. It is recommended (but not required) to build outside of the source
+9. It is recommended (but not required) to build outside of the source
tree so that the source tree is kept in a pristine state. This
also allows sharing the source directory on several networked
systems. For example:
@@ -72,17 +78,17 @@ Notes on releasing.
./configure --enable-maintainer-mode
-9. In the build tree do
+10. In the build tree do
make release
This will update "RELEASE-DATE", "VERSION", and libtiff/tiffvers.h
in the source tree.
-10. In the source tree, verify that the version info in RELEASE-DATE,
+11. In the source tree, verify that the version info in RELEASE-DATE,
VERSION and libtiff/tiffvers.h is right.
-11. In the build tree do
+12. In the build tree do
make
make distcheck
@@ -93,24 +99,21 @@ Notes on releasing.
Two files with names tiff-version.tar.gz and tiff-version.zip will
be created in the top level build directory.
-12. In the source tree do
+13. In the source tree do
'cvs commit'.
-13. In the source tree do
+14. In the source tree do
cvs tag Release-v4-0-0
(or the appropriate name for the release)
-14. Copy release packages from the build tree to the
+15. Copy release packages from the build tree to the
ftp.remotesensing.org ftp site.
scp tiff-*.tar.gz tiff-*.zip \
- frankw@upload.osgeo.org:/osgeo/download/libtiff
-
-15. Announce to list, tiff@lists.maptools.org
-
-16. Update libtiff page on freshmeat with new version announcement.
+ warmerdam@upload.osgeo.org:/osgeo/download/libtiff
+16. Announce to list, tiff@lists.maptools.org
diff --git a/tiff/Makefile.am b/tiff/Makefile.am
index 8e93e3c3d..418a3b932 100644
--- a/tiff/Makefile.am
+++ b/tiff/Makefile.am
@@ -25,7 +25,7 @@
docdir = $(LIBTIFF_DOCDIR)
-AUTOMAKE_OPTIONS = 1.11 dist-zip foreign
+AUTOMAKE_OPTIONS = 1.12 dist-zip foreign
ACLOCAL_AMFLAGS = -I m4
docfiles = \
@@ -38,16 +38,29 @@ docfiles = \
VERSION
EXTRA_DIST = \
+ CMakeLists.txt \
HOWTO-RELEASE \
Makefile.vc \
SConstruct \
autogen.sh \
configure.com \
- nmake.opt \
- libtiff-4.pc.in
+ libtiff-4.pc.in \
+ nmake.opt
dist_doc_DATA = $(docfiles)
+distcheck-hook:
+ if [ -x "$(CMAKE)" ]; then \
+ mkdir $(distdir)/_build/cmake \
+ && cd $(distdir)/_build/cmake \
+ && cmake ../.. \
+ && $(MAKE) \
+ && ctest -V \
+ && $(MAKE) DESTDIR=../../_inst/cmake install ; \
+ fi
+ rm -rf $(distdir)/_build/cmake
+ rm -rf $(distdir)/_inst/cmake
+
SUBDIRS = port libtiff tools build contrib test man html
release:
@@ -57,3 +70,22 @@ release:
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libtiff-4.pc
+
+# Special rules to assist with Coverity submissions.
+PACKAGE_CHANGE_DATE=`awk '/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]/ { print substr($$1,1,4) substr($$1,6,2) substr($$1,9,2); exit; }' $(top_srcdir)/ChangeLog`
+COVERITY_EMAIL=bfriesen@simple.dallas.tx.us
+COVERITY_TARBALL=libtiff.xz
+COVERITY_VERSION=devel-${PACKAGE_CHANGE_DATE}
+COVERITY_DESCRIPTION='libtiff development'
+coverity:
+ $(MAKE) clean
+ cov-build --dir cov-int $(MAKE)
+ tar caf $(COVERITY_TARBALL) cov-int
+ curl --limit-rate 50K \
+ --form token=`cat $$HOME/.coverity_key_tiff` \
+ --form email=$(COVERITY_EMAIL) \
+ --form file=@$(COVERITY_TARBALL) \
+ --form version=$(COVERITY_VERSION) \
+ --form description=$(COVERITY_DESCRIPTION) \
+ https://scan.coverity.com/builds?project=tiff
+ $(RM) $(COVERITY_TARBALL)
diff --git a/tiff/Makefile.in b/tiff/Makefile.in
index ba3b043cb..c9c0645fe 100644
--- a/tiff/Makefile.in
+++ b/tiff/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -41,6 +40,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -60,12 +114,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
-DIST_COMMON = README $(am__configure_deps) $(dist_doc_DATA) \
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/libtiff-4.pc.in $(top_srcdir)/configure ChangeLog \
- TODO config/compile config/config.guess config/config.sub \
- config/depcomp config/install-sh config/ltmain.sh \
- config/missing config/mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -73,6 +121,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(dist_doc_DATA) $(am__DIST_COMMON)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
@@ -80,21 +130,33 @@ CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES = libtiff-4.pc
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -126,12 +188,42 @@ am__installdirs = "$(DESTDIR)$(docdir)" "$(DESTDIR)$(pkgconfigdir)"
DATA = $(dist_doc_DATA) $(pkgconfig_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
- distdir dist dist-all distcheck
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libtiff-4.pc.in \
+ $(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \
+ $(top_srcdir)/config/config.sub \
+ $(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \
+ $(top_srcdir)/config/missing \
+ $(top_srcdir)/config/mkinstalldirs ChangeLog README TODO \
+ config/compile config/config.guess config/config.sub \
+ config/depcomp config/install-sh config/ltmain.sh \
+ config/missing config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -141,6 +233,7 @@ am__remove_distdir = \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -168,6 +261,7 @@ am__relativize = \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).zip
GZIP_ENV = --best
+DIST_TARGETS = dist-gzip dist-zip
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -184,6 +278,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -231,6 +326,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -318,7 +414,7 @@ tiff_libs_private = @tiff_libs_private@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = 1.11 dist-zip foreign
+AUTOMAKE_OPTIONS = 1.12 dist-zip foreign
ACLOCAL_AMFLAGS = -I m4
docfiles = \
COPYRIGHT \
@@ -330,18 +426,26 @@ docfiles = \
VERSION
EXTRA_DIST = \
+ CMakeLists.txt \
HOWTO-RELEASE \
Makefile.vc \
SConstruct \
autogen.sh \
configure.com \
- nmake.opt \
- libtiff-4.pc.in
+ libtiff-4.pc.in \
+ nmake.opt
dist_doc_DATA = $(docfiles)
SUBDIRS = port libtiff tools build contrib test man html
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libtiff-4.pc
+
+# Special rules to assist with Coverity submissions.
+PACKAGE_CHANGE_DATE = `awk '/^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]/ { print substr($$1,1,4) substr($$1,6,2) substr($$1,9,2); exit; }' $(top_srcdir)/ChangeLog`
+COVERITY_EMAIL = bfriesen@simple.dallas.tx.us
+COVERITY_TARBALL = libtiff.xz
+COVERITY_VERSION = devel-${PACKAGE_CHANGE_DATE}
+COVERITY_DESCRIPTION = 'libtiff development'
all: all-recursive
.SUFFIXES:
@@ -360,7 +464,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -392,8 +495,11 @@ distclean-libtool:
-rm -f libtool config.lt
install-dist_docDATA: $(dist_doc_DATA)
@$(NORMAL_INSTALL)
- test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -410,8 +516,11 @@ uninstall-dist_docDATA:
dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
- test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -428,22 +537,25 @@ uninstall-pkgconfigDATA:
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@@ -458,57 +570,12 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-$(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -524,12 +591,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -541,15 +603,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -558,9 +616,31 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+ -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
$(am__remove_distdir)
@@ -596,13 +676,10 @@ distdir: $(DISTFILES)
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
@@ -631,41 +708,41 @@ distdir: $(DISTFILES)
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
- $(am__remove_distdir)
-
-dist-lzma: distdir
- tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-tarZ: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-shar: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
-dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- -rm -f $(distdir).zip
- zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
@@ -676,8 +753,6 @@ distcheck: dist
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.lzma*) \
- lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
@@ -689,18 +764,20 @@ distcheck: dist
*.zip*) \
unzip $(distdir).zip ;;\
esac
- chmod -R a-w $(distdir); chmod a+w $(distdir)
- mkdir $(distdir)/_build
- mkdir $(distdir)/_inst
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
&& am__cwd=`pwd` \
- && $(am__cd) $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
@@ -723,7 +800,7 @@ distcheck: dist
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
@@ -861,14 +938,13 @@ ps-am:
uninstall-am: uninstall-dist_docDATA uninstall-pkgconfigDATA
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(am__recursive_targets) install-am install-strip
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am am--refresh check check-am clean clean-generic \
- clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \
- dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \
- dist-zip distcheck distclean distclean-generic \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--refresh check check-am clean clean-cscope clean-generic \
+ clean-libtool cscope cscopelist-am ctags ctags-am dist \
+ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
+ dist-xz dist-zip distcheck distclean distclean-generic \
distclean-libtool distclean-tags distcleancheck distdir \
distuninstallcheck dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am \
@@ -879,14 +955,40 @@ uninstall-am: uninstall-dist_docDATA uninstall-pkgconfigDATA
installcheck installcheck-am installdirs installdirs-am \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags tags-recursive uninstall uninstall-am \
- uninstall-dist_docDATA uninstall-pkgconfigDATA
+ tags tags-am uninstall uninstall-am uninstall-dist_docDATA \
+ uninstall-pkgconfigDATA
+.PRECIOUS: Makefile
+
+
+distcheck-hook:
+ if [ -x "$(CMAKE)" ]; then \
+ mkdir $(distdir)/_build/cmake \
+ && cd $(distdir)/_build/cmake \
+ && cmake ../.. \
+ && $(MAKE) \
+ && ctest -V \
+ && $(MAKE) DESTDIR=../../_inst/cmake install ; \
+ fi
+ rm -rf $(distdir)/_build/cmake
+ rm -rf $(distdir)/_inst/cmake
release:
(rm -f $(top_srcdir)/RELEASE-DATE && echo $(LIBTIFF_RELEASE_DATE) > $(top_srcdir)/RELEASE-DATE)
(rm -f $(top_srcdir)/VERSION && echo $(LIBTIFF_VERSION) > $(top_srcdir)/VERSION)
(rm -f $(top_srcdir)/libtiff/tiffvers.h && sed 's,LIBTIFF_VERSION,$(LIBTIFF_VERSION),;s,LIBTIFF_RELEASE_DATE,$(LIBTIFF_RELEASE_DATE),' $(top_srcdir)/libtiff/tiffvers.h.in > $(top_srcdir)/libtiff/tiffvers.h)
+coverity:
+ $(MAKE) clean
+ cov-build --dir cov-int $(MAKE)
+ tar caf $(COVERITY_TARBALL) cov-int
+ curl --limit-rate 50K \
+ --form token=`cat $$HOME/.coverity_key_tiff` \
+ --form email=$(COVERITY_EMAIL) \
+ --form file=@$(COVERITY_TARBALL) \
+ --form version=$(COVERITY_VERSION) \
+ --form description=$(COVERITY_DESCRIPTION) \
+ https://scan.coverity.com/builds?project=tiff
+ $(RM) $(COVERITY_TARBALL)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/tiff/RELEASE-DATE b/tiff/RELEASE-DATE
index 52cbf447f..fb9e3f6c3 100644
--- a/tiff/RELEASE-DATE
+++ b/tiff/RELEASE-DATE
@@ -1 +1 @@
-20120218
+20161119
diff --git a/tiff/VERSION b/tiff/VERSION
index 1454f6ed4..43beb4001 100644
--- a/tiff/VERSION
+++ b/tiff/VERSION
@@ -1 +1 @@
-4.0.1
+4.0.7
diff --git a/tiff/aclocal.m4 b/tiff/aclocal.m4
index e07a4e425..ca19cbad0 100644
--- a/tiff/aclocal.m4
+++ b/tiff/aclocal.m4
@@ -1,8 +1,7 @@
-# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
-# Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -12,33 +11,31 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
-
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
+[am__api_version='1.15'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.3], [],
+m4_if([$1], [1.15], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -54,24 +51,22 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.3])dnl
+[AM_AUTOMAKE_VERSION([1.15])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
-
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
@@ -90,7 +85,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
+# harmless because $srcdir is '.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
@@ -108,30 +103,26 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 9
-
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
@@ -150,16 +141,14 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
-# 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 12
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
@@ -169,7 +158,7 @@ fi])])
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
@@ -182,12 +171,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], UPC, [depcc="$UPC" am_compiler_list=],
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
@@ -195,8 +185,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
@@ -236,16 +226,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
@@ -254,8 +244,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
test "$am__universal" = false || continue
;;
nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
if test "x$enable_dependency_tracking" = xyes; then
continue
else
@@ -263,7 +253,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
+ # This compiler won't grok '-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
@@ -311,7 +301,7 @@ AM_CONDITIONAL([am__fastdep$1], [
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
@@ -321,9 +311,13 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
@@ -338,20 +332,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-#serial 5
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[{
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
@@ -364,7 +356,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
+ # We used to match only the files named 'Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
@@ -376,21 +368,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
+ # from the Makefile without running 'make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
+ test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
@@ -408,7 +398,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
+# is enabled. FIXME. This creates each '.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
@@ -418,18 +408,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 16
-
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
@@ -442,7 +435,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
+[AC_PREREQ([2.65])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
@@ -471,33 +464,42 @@ AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+[AC_DIAGNOSE([obsolete],
+ [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
@@ -506,34 +508,82 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
- [_AM_DEPENDENCIES(OBJC)],
- [define([AC_PROG_OBJC],
- defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
])
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
@@ -555,21 +605,18 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
-
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -577,16 +624,14 @@ if test x"${install_sh}" != xset; then
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
-AC_SUBST(install_sh)])
+AC_SUBST([install_sh])])
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
-
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
@@ -603,20 +648,17 @@ AC_SUBST([am__leading_dot])])
# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
# From Jim Meyering
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
-# 2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
-
# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
# Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless `enable' is passed literally.
-# For symmetry, `disable' may be passed as well. Anyway, the user
+# Default is to disable them, unless 'enable' is passed literally.
+# For symmetry, 'disable' may be passed as well. Anyway, the user
# can override the default with the --enable/--disable switch.
AC_DEFUN([AM_MAINTAINER_MODE],
[m4_case(m4_default([$1], [disable]),
@@ -627,10 +669,11 @@ AC_DEFUN([AM_MAINTAINER_MODE],
AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
-[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- [USE_MAINTAINER_MODE=$enableval],
- [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+ am_maintainer_other[ make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer])],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
@@ -638,18 +681,14 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
]
)
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 4
-
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
@@ -667,7 +706,7 @@ am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# Ignore all kinds of additional output from 'make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
@@ -692,52 +731,14 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
-# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 6
-
-# AM_PROG_CC_C_O
-# --------------
-# Like AC_PROG_CC_C_O, but changed for automake.
-AC_DEFUN([AM_PROG_CC_C_O],
-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([compile])dnl
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-dnl Make sure AC_PROG_CC is never called again, or it will override our
-dnl setting of CC.
-m4_define([AC_PROG_CC],
- [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
-])
-
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 6
-
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
@@ -745,11 +746,10 @@ AC_DEFUN([AM_MISSING_PROG],
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
-
# AM_MISSING_HAS_RUN
# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
@@ -762,54 +762,22 @@ if test x"${MISSING+set}" != xset; then
esac
fi
# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
else
am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
+ AC_MSG_WARN(['missing' script is too old or missing])
fi
])
-# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
-# Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 1
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
- [[\\/$]]* | ?:[[\\/]]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
-
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
@@ -819,7 +787,7 @@ AC_DEFUN([_AM_MANGLE_OPTION],
# --------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
# _AM_SET_OPTIONS(OPTIONS)
# ------------------------
@@ -833,24 +801,82 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-# Check to make sure that the build environment is sane. -*- Autoconf -*-
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -861,32 +887,40 @@ case `pwd` in
esac
case $srcdir in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
- AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
esac
-# Do `set' in a subshell so we don't clobber the current shell's
+# Do 'set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
test "$[2]" = conftest.file
)
then
@@ -896,31 +930,50 @@ else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-AC_MSG_RESULT(yes)])
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
-# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
-
# AM_SILENT_RULES([DEFAULT])
# --------------------------
# Enable less verbose build rules; with the default set to DEFAULT
-# (`yes' being less verbose, `no' or empty being verbose).
+# ("yes" being less verbose, "no" or empty being verbose).
AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules],
-[ --enable-silent-rules less verbose build output (undo: `make V=1')
- --disable-silent-rules verbose build output (undo: `make V=0')])
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no) AM_DEFAULT_VERBOSITY=1;;
-*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
esac
dnl
-dnl A few `make' implementations (e.g., NonStop OS and NextStep)
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
dnl do not support nested variable expansions.
dnl See automake bug#9928 and bug#10237.
am_make=${MAKE-make}
@@ -938,7 +991,7 @@ else
am_cv_make_support_nested_variables=no
fi])
if test $am_cv_make_support_nested_variables = yes; then
- dnl Using `$V' instead of `$(V)' breaks IRIX make.
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
AM_V='$(V)'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
else
@@ -955,44 +1008,40 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
-
# AM_PROG_INSTALL_STRIP
# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
+# One issue with vendor 'install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
+# always use install-sh in "make install-strip", and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 3
-
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
@@ -1006,18 +1055,16 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
-
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
@@ -1027,76 +1074,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
+#
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AC_SUBST([AMTAR], ['$${TAR-tar}'])
-m4_if([$1], [v7],
- [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
- [m4_case([$1], [ustar],, [pax],,
- [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
+
+# We'll loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar;
- do
- AM_RUN_LOG([$_am_tar --version]) && break
- done
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x $1 -w "$$tardir"'
- am__tar_='pax -L -x $1 -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
- am__untar='cpio -i -H $1 -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_$1}" && break
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
- # tar/untar a dummy directory, and stop if the command works
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar <conftest.tar])
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
- fi
-done
-rm -rf conftest.dir
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
diff --git a/tiff/build/CMakeLists.txt b/tiff/build/CMakeLists.txt
new file mode 100644
index 000000000..d44c6eac0
--- /dev/null
+++ b/tiff/build/CMakeLists.txt
@@ -0,0 +1,25 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+extra_dist(README)
diff --git a/tiff/build/Makefile.am b/tiff/build/Makefile.am
index 48fe8b4e9..c912a422a 100644
--- a/tiff/build/Makefile.am
+++ b/tiff/build/Makefile.am
@@ -24,7 +24,9 @@
# Process this file with automake to produce Makefile.in.
-EXTRA_DIST = README
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README
SUBDIRS =
diff --git a/tiff/build/Makefile.in b/tiff/build/Makefile.in
index b147c9f11..69d54d1f1 100644
--- a/tiff/build/Makefile.in
+++ b/tiff/build/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -41,6 +40,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -60,7 +114,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = build
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -68,34 +121,69 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/config/mkinstalldirs README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
@@ -134,6 +222,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -181,6 +270,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -268,7 +358,10 @@ tiff_libs_private = @tiff_libs_private@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-EXTRA_DIST = README
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README
+
SUBDIRS =
all: all-recursive
@@ -285,7 +378,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign build/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign build/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -311,22 +403,25 @@ clean-libtool:
-rm -rf .libs _libs
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@@ -341,57 +436,12 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-$(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -407,12 +457,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -424,15 +469,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -441,6 +482,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -477,13 +533,10 @@ distdir: $(DISTFILES)
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
@@ -604,22 +657,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic clean-libtool \
- ctags ctags-recursive distclean distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool cscopelist-am ctags \
+ ctags-am distclean distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tiff/config/compile b/tiff/config/compile
index 1b1d23216..a85b723c7 100755
--- a/tiff/config/compile
+++ b/tiff/config/compile
@@ -1,9 +1,9 @@
#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
+# Wrapper for compilers which do not understand '-c -o'.
-scriptversion=2005-05-14.22
+scriptversion=2012-10-14.11; # UTC
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# This program is free software; you can redistribute it and/or modify
@@ -17,8 +17,7 @@ scriptversion=2005-05-14.22
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -29,21 +28,224 @@ scriptversion=2005-05-14.22
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv/,$2, in
+ *,$file_conv,*)
+ ;;
+ mingw/*)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin/*)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine/*)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+ func_file_conv "$1"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+ lib=$1
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ lib=$dir/$lib.dll.lib
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ lib=$dir/$lib.lib
+ break
+ fi
+ if test -f "$dir/lib$lib.a"; then
+ found=yes
+ lib=$dir/lib$lib.a
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ if test "$found" != yes; then
+ lib=$lib.lib
+ fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I)
+ eat=1
+ func_file_conv "$2" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -l)
+ eat=1
+ func_cl_dashl "$2"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -l*)
+ func_cl_dashl "${1#-l}"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -L)
+ eat=1
+ func_cl_dashL "$2"
+ ;;
+ -L*)
+ func_cl_dashL "${1#-L}"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+eat=
+
case $1 in
'')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
+right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
@@ -53,11 +255,13 @@ EOF
echo "compile $scriptversion"
exit $?
;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
esac
ofile=
cfile=
-eat=
for arg
do
@@ -66,8 +270,8 @@ do
else
case $1 in
-o)
- # configure might choose to run compile as `compile cc -o foo foo.c'.
- # So we strip `-o arg' only if arg is an object.
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ # So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
@@ -94,22 +298,22 @@ do
done
if test -z "$ofile" || test -z "$cfile"; then
- # If no `-o' option was seen then we might have been invoked from a
+ # If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
- # `.c' file was seen then we are probably linking. That is also
+ # '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
-# Note: use `[/.-]' here to ensure that we don't use the same name
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
@@ -124,9 +328,9 @@ trap "rmdir '$lockdir'; exit 1" 1 2 15
ret=$?
if test -f "$cofile"; then
- mv "$cofile" "$ofile"
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
- mv "${cofile}bj" "$ofile"
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
@@ -138,5 +342,6 @@ exit $ret
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End:
diff --git a/tiff/config/depcomp b/tiff/config/depcomp
index ca5ea4e1e..fc98710e2 100755
--- a/tiff/config/depcomp
+++ b/tiff/config/depcomp
@@ -1,10 +1,9 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2006-10-15.18
+scriptversion=2013-05-30.07; # UTC
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006 Free Software
-# Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,9 +16,7 @@ scriptversion=2006-10-15.18
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -30,9 +27,9 @@ scriptversion=2006-10-15.18
case $1 in
'')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
@@ -42,11 +39,11 @@ as side-effects.
Environment variables:
depmode Dependency tracking mode.
- source Source file read by `PROGRAMS ARGS'.
- object Object file output by `PROGRAMS ARGS'.
+ source Source file read by 'PROGRAMS ARGS'.
+ object Object file output by 'PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
- tmpdepfile Temporary file to use when outputing dependencies.
+ tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
@@ -59,6 +56,66 @@ EOF
;;
esac
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'. Note that this directory component will
+# be either empty or ending with a '/' character. This is deliberate.
+set_dir_from ()
+{
+ case $1 in
+ */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+ *) dir=;;
+ esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+ base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+ echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+ # If the compiler actually managed to produce a dependency file,
+ # post-process it.
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form 'foo.o: dependency.h'.
+ # Do two passes, one to just change these to
+ # $object: dependency.h
+ # and one to simply output
+ # dependency.h:
+ # which is needed to avoid the deleted-header problem.
+ { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+ sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+ } > "$depfile"
+ rm -f "$tmpdepfile"
+ else
+ make_dummy_depfile
+ fi
+}
+
+# A tabulation character.
+tab=' '
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
@@ -71,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
@@ -82,9 +142,32 @@ if test "$depmode" = hp; then
fi
if test "$depmode" = dashXmstdout; then
- # This is just like dashmstdout with a different argument.
- dashmflag=-xM
- depmode=dashmstdout
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
fi
case "$depmode" in
@@ -107,8 +190,7 @@ gcc3)
done
"$@"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -116,13 +198,17 @@ gcc3)
;;
gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-## -MM, not -M (despite what the docs say).
+## -MM, not -M (despite what the docs say). Also, it might not be
+## supported by the other compilers which use the 'gcc' depmode.
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
@@ -130,31 +216,31 @@ gcc)
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
+ # The second -e expression handles DOS-style file names with drive
+ # letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
+## This next piece of magic avoids the "deleted header file" problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
- tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'. On the theory
+## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
-## well.
+## well. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -172,8 +258,7 @@ sgi)
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -181,99 +266,156 @@ sgi)
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
-
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
- # the IRIX cc adds comments like `#:fec' to the end of the
+ # the IRIX cc adds comments like '#:fec' to the end of the
# dependency line.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
- tr '
-' ' ' >> $depfile
- echo >> $depfile
-
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+ | tr "$nl" ' ' >> "$depfile"
+ echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> $depfile
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
+ make_dummy_depfile
fi
rm -f "$tmpdepfile"
;;
+xlc)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
- # current directory. Also, the AIX compiler puts `$object:' at the
+ # current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
- stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
- tmpdepfile="$stripped.u"
+ set_dir_from "$object"
+ set_base_from "$object"
if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
-
- if test -f "$tmpdepfile"; then :
- else
- stripped=`echo "$stripped" | sed 's,^.*/,,'`
- tmpdepfile="$stripped.u"
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
fi
- if test $stat -eq 0; then :
- else
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ aix_post_process_depfile
+ ;;
+
+tcc)
+ # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+ # FIXME: That version still under development at the moment of writing.
+ # Make that this statement remains true also for stable, released
+ # versions.
+ # It will wrap lines (doesn't matter whether long or short) with a
+ # trailing '\', as in:
+ #
+ # foo.o : \
+ # foo.c \
+ # foo.h \
+ #
+ # It will put a trailing '\' even on the last line, and will use leading
+ # spaces rather than leading tabs (at least since its commit 0394caf7
+ # "Emit spaces for -MD").
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
-
- if test -f "$tmpdepfile"; then
- outname="$stripped.o"
- # Each line is of the form `foo.o: dependent.h'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
- sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
+ rm -f "$depfile"
+ # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+ # We have to change lines of the first kind to '$object: \'.
+ sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+ # And for each line of the second kind, we have to emit a 'dep.h:'
+ # dummy dependency, to avoid the deleted-header problem.
+ sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
-icc)
- # Intel's C compiler understands `-MD -MF file'. However on
- # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
- # ICC 7.0 will fill foo.d with something like
- # foo.o: sub/foo.c
- # foo.o: sub/foo.h
- # which is wrong. We want:
- # sub/foo.o: sub/foo.c
- # sub/foo.o: sub/foo.h
- # sub/foo.c:
- # sub/foo.h:
- # ICC 7.1 will output
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file. A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+ # Portland's C compiler understands '-MD'.
+ # Will always output deps to 'file.d' where file is the root name of the
+ # source file under compilation, even if file resides in a subdirectory.
+ # The object file name does not affect the name of the '.d' file.
+ # pgcc 10.2 will output
# foo.o: sub/foo.c sub/foo.h
- # and will wrap long lines using \ :
+ # and will wrap long lines using '\' :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
+ set_dir_from "$object"
+ # Use the source, not the object, to determine the base name, since
+ # that's sadly what pgcc will do too.
+ set_base_from "$source"
+ tmpdepfile=$base.d
+
+ # For projects that build the same source file twice into different object
+ # files, the pgcc approach of using the *source* file root name can cause
+ # problems in parallel builds. Use a locking strategy to avoid stomping on
+ # the same $tmpdepfile.
+ lockdir=$base.d-lock
+ trap "
+ echo '$0: caught signal, cleaning up...' >&2
+ rmdir '$lockdir'
+ exit 1
+ " 1 2 13 15
+ numtries=100
+ i=$numtries
+ while test $i -gt 0; do
+ # mkdir is a portable test-and-set.
+ if mkdir "$lockdir" 2>/dev/null; then
+ # This process acquired the lock.
+ "$@" -MD
+ stat=$?
+ # Release the lock.
+ rmdir "$lockdir"
+ break
+ else
+ # If the lock is being held by a different process, wait
+ # until the winning process is done or we timeout.
+ while test -d "$lockdir" && test $i -gt 0; do
+ sleep 1
+ i=`expr $i - 1`
+ done
+ fi
+ i=`expr $i - 1`
+ done
+ trap - 1 2 13 15
+ if test $i -le 0; then
+ echo "$0: failed to acquire lock after $numtries attempts" >&2
+ echo "$0: check lockdir '$lockdir'" >&2
+ exit 1
+ fi
- "$@" -MD -MF "$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
@@ -285,8 +427,8 @@ icc)
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
- sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
- sed -e 's/$/ :/' >> "$depfile"
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -297,9 +439,8 @@ hp2)
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+ set_dir_from "$object"
+ set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
@@ -310,8 +451,7 @@ hp2)
"$@" +Maked
fi
stat=$?
- if test $stat -eq 0; then :
- else
+ if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
@@ -321,72 +461,107 @@ hp2)
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
- # Add `dependent.h:' lines.
- sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+ sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add 'dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
else
- echo "#dummy" > "$depfile"
+ make_dummy_depfile
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
- # The Tru64 compiler uses -MD to generate dependencies as a side
- # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
- # dependencies in `foo.d' instead, so we check for that too.
- # Subdirectories are respected.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
- if test "$libtool" = yes; then
- # With Tru64 cc, shared objects can also be used to make a
- # static library. This mechanism is used in libtool 1.4 series to
- # handle both shared and static libraries in a single compilation.
- # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
- #
- # With libtool 1.5 this exception was removed, and libtool now
- # generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in $dir.libs/$base.o.d and
- # in $dir$base.o.d. We have to check for both files, because
- # one of the two compilations can be disabled. We should prefer
- # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
- # automatically cleaned when .libs/ is deleted, while ignoring
- # the former would cause a distcleancheck panic.
- tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
- tmpdepfile2=$dir$base.o.d # libtool 1.5
- tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
- tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
- "$@" -Wc,-MD
- else
- tmpdepfile1=$dir$base.o.d
- tmpdepfile2=$dir$base.d
- tmpdepfile3=$dir$base.d
- tmpdepfile4=$dir$base.d
- "$@" -MD
- fi
-
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in 'foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ set_dir_from "$object"
+ set_base_from "$object"
+
+ if test "$libtool" = yes; then
+ # Libtool generates 2 separate objects for the 2 libraries. These
+ # two compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir$base.o.d # libtool 1.5
+ tmpdepfile2=$dir.libs/$base.o.d # Likewise.
+ tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ # Same post-processing that is required for AIX mode.
+ aix_post_process_depfile
+ ;;
+
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/'"$tab"'/
+ G
+ p
+}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
@@ -399,13 +574,13 @@ dashmstdout)
# Remove the call to Libtool.
if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
+ while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
- # Remove `-o $object'.
+ # Remove '-o $object'.
IFS=" "
for arg
do
@@ -425,18 +600,18 @@ dashmstdout)
done
test -z "$dashmflag" && dashmflag=-M
- # Require at least two characters before searching for `:'
+ # Require at least two characters before searching for ':'
# in the target name. This is to cope with DOS-style filenames:
- # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+ # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
- sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
+ sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
- tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this sed invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
@@ -450,41 +625,51 @@ makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
+ while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
- cleared=no
- for arg in "$@"; do
+ cleared=no eat=no
+ for arg
+ do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
- obj_suffix="`echo $object | sed 's/^.*\././'`"
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process the last invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed '1,2d' "$tmpdepfile" \
+ | tr ' ' "$nl" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
@@ -495,13 +680,13 @@ cpp)
# Remove the call to Libtool.
if test "$libtool" = yes; then
- while test $1 != '--mode=compile'; do
+ while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
- # Remove `-o $object'.
+ # Remove '-o $object'.
IFS=" "
for arg
do
@@ -520,10 +705,10 @@ cpp)
esac
done
- "$@" -E |
- sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
- -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
- sed '$ s: \\$::' > "$tmpdepfile"
+ "$@" -E \
+ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ | sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
@@ -533,35 +718,56 @@ cpp)
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout, regardless of -o,
- # because we must use -o when running libtool.
+ # always write the preprocessed file to stdout.
"$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
IFS=" "
for arg
do
case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
- set fnord "$@"
- shift
- shift
- ;;
+ set fnord "$@"
+ shift
+ shift
+ ;;
*)
- set fnord "$@" "$arg"
- shift
- shift
- ;;
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
esac
done
- "$@" -E |
- sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
- echo " " >> "$depfile"
- . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+ echo "$tab" >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
none)
exec "$@"
;;
@@ -580,5 +786,6 @@ exit 0
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End:
diff --git a/tiff/config/ltmain.sh b/tiff/config/ltmain.sh
index 08f3a26e3..0f0a2da3f 100644
--- a/tiff/config/ltmain.sh
+++ b/tiff/config/ltmain.sh
@@ -2,11 +2,11 @@
## DO NOT EDIT - This file generated from ./build-aux/ltmain.in
## by inline-source v2014-01-03.01
-# libtool (GNU libtool) 2.4.2.444.28-053d
+# libtool (GNU libtool) 2.4.6
# Provide generalized library-building support services.
# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2015 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -31,8 +31,8 @@
PROGRAM=libtool
PACKAGE=libtool
-VERSION=2.4.2.444.28-053d
-package_revision=2.4.2.444.28
+VERSION=2.4.6
+package_revision=2.4.6
## ------ ##
@@ -64,12 +64,12 @@ package_revision=2.4.2.444.28
# libraries, which are installed to $pkgauxdir.
# Set a version string for this script.
-scriptversion=2014-02-10.13; # UTC
+scriptversion=2015-01-20.17; # UTC
# General shell script boiler plate, and helper functions.
# Written by Gary V. Vaughan, 2004
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# Copyright (C) 2004-2015 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -192,7 +192,7 @@ func_path_progs ()
_G_path_prog_max=0
_G_path_prog_found=false
- _G_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:}
for _G_dir in $_G_PATH; do
IFS=$_G_save_IFS
test -z "$_G_dir" && _G_dir=.
@@ -1333,7 +1333,7 @@ func_warning ()
# -----------------------
# 'sort -V' is not generally available.
# Note this deviates from the version comparison in automake
-# in that it treats 1.5 < 1.5.0, and treats 1.4-p12a < 1.4-p3a
+# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
# but this should suffice as we won't be specifying old
# version formats or redundant trailing .0 in bootstrap.conf.
# If we did want full compatibility then we should probably
@@ -1375,7 +1375,7 @@ scriptversion=2014-01-07.03; # UTC
# A portable, pluggable option parser for Bourne shell.
# Written by Gary V. Vaughan, 2010
-# Copyright (C) 2010-2014 Free Software Foundation, Inc.
+# Copyright (C) 2010-2015 Free Software Foundation, Inc.
# This is free software; see the source for copying conditions. There is NO
# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -1977,7 +1977,7 @@ func_version ()
# End:
# Set a version string.
-scriptversion='(GNU libtool) 2.4.2.444.28-053d'
+scriptversion='(GNU libtool) 2.4.6'
# func_echo ARG...
@@ -2039,7 +2039,12 @@ usage_message="Options:
"
# Additional text appended to 'usage_message' in response to '--help'.
-long_help_message=$long_help_message"
+func_help ()
+{
+ $debug_cmd
+
+ func_usage_message
+ $ECHO "$long_help_message
MODE must be one of the following:
@@ -2063,13 +2068,15 @@ include the following information:
compiler: $LTCC
compiler flags: $LTCFLAGS
linker: $LD (gnu? $with_gnu_ld)
- version: $progname (GNU libtool) 2.4.2.444.28-053d
+ version: $progname (GNU libtool) 2.4.6
automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
Report bugs to <bug-libtool@gnu.org>.
-GNU libtool home page: <http://www.gnu.org/s/libtool/>.
+GNU libtool home page: <http://www.gnu.org/software/libtool/>.
General help using GNU software: <http://www.gnu.org/gethelp/>."
+ exit 0
+}
# func_lo2o OBJECT-NAME
@@ -2411,7 +2418,7 @@ libtool_validate_options ()
case $host in
# Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452
# see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788
- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2*)
+ *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*)
# don't eliminate duplications in $postdeps and $predeps
opt_duplicate_compiler_generated_deps=:
;;
@@ -2482,6 +2489,14 @@ $1
_LTECHO_EOF'
}
+# func_generated_by_libtool
+# True iff stdin has been generated by Libtool. This function is only
+# a basic sanity check; it will hardly flush out determined imposters.
+func_generated_by_libtool_p ()
+{
+ $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
# func_lalib_p file
# True iff FILE is a libtool '.la' library or '.lo' object file.
# This function is only a basic sanity check; it will hardly flush out
@@ -2489,8 +2504,7 @@ _LTECHO_EOF'
func_lalib_p ()
{
test -f "$1" &&
- $SED -e 4q "$1" 2>/dev/null \
- | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+ $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p
}
# func_lalib_unsafe_p file
@@ -2522,7 +2536,8 @@ func_lalib_unsafe_p ()
# determined imposters.
func_ltwrapper_script_p ()
{
- func_lalib_p "$1"
+ test -f "$1" &&
+ $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p
}
# func_ltwrapper_executable_p file
@@ -3722,7 +3737,8 @@ The following components of LINK-COMMAND are treated specially:
-no-install link a not-installable executable
-no-undefined declare that a library does not refer to external symbols
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
- -objectlist FILE Use a list of object files found in FILE to specify objects
+ -objectlist FILE use a list of object files found in FILE to specify objects
+ -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes)
-precious-files-regex REGEX
don't remove output files matching REGEX
-release RELEASE specify package release information
@@ -4304,6 +4320,13 @@ func_mode_install ()
;;
esac
;;
+ os2*)
+ case $realname in
+ *_dll.a)
+ tstripme=
+ ;;
+ esac
+ ;;
esac
if test -n "$tstripme" && test -n "$striplib"; then
func_show_eval "$striplib $destdir/$realname" 'exit $?'
@@ -5145,7 +5168,7 @@ func_extract_archives ()
$RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive"
done # $darwin_arches
## Okay now we've a bunch of thin objects, gotta fatten them up :)
- darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u`
darwin_file=
darwin_files=
for darwin_file in $darwin_filelist; do
@@ -5418,7 +5441,7 @@ func_exec_program ()
if test -n \"\$relink_command\"; then
if relink_command_output=\`eval \$relink_command 2>&1\`; then :
else
- $ECHO \"\$relink_command_output\" >&2
+ \$ECHO \"\$relink_command_output\" >&2
$RM \"\$progdir/\$file\"
exit 1
fi
@@ -5650,7 +5673,12 @@ void lt_dump_script (FILE *f);
EOF
cat <<EOF
-volatile const char * MAGIC_EXE = "$magic_exe";
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5)
+# define externally_visible volatile
+#else
+# define externally_visible __attribute__((externally_visible)) volatile
+#endif
+externally_visible const char * MAGIC_EXE = "$magic_exe";
const char * LIB_PATH_VARNAME = "$shlibpath_var";
EOF
@@ -6440,6 +6468,24 @@ func_win32_import_lib_p ()
esac
}
+# func_suncc_cstd_abi
+# !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!!
+# Several compiler flags select an ABI that is incompatible with the
+# Cstd library. Avoid specifying it if any are in CXXFLAGS.
+func_suncc_cstd_abi ()
+{
+ $debug_cmd
+
+ case " $compile_command " in
+ *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*)
+ suncc_use_cstd_abi=no
+ ;;
+ *)
+ suncc_use_cstd_abi=yes
+ ;;
+ esac
+}
+
# func_mode_link arg...
func_mode_link ()
{
@@ -6498,6 +6544,7 @@ func_mode_link ()
module=no
no_install=no
objs=
+ os2dllname=
non_pic_objects=
precious_files_regex=
prefer_static_libs=no
@@ -6755,6 +6802,11 @@ func_mode_link ()
prev=
continue
;;
+ os2dllname)
+ os2dllname=$arg
+ prev=
+ continue
+ ;;
precious_regex)
precious_files_regex=$arg
prev=
@@ -7064,6 +7116,11 @@ func_mode_link ()
continue
;;
+ -os2dllname)
+ prev=os2dllname
+ continue
+ ;;
+
-o) prev=output ;;
-precious-files-regex)
@@ -7210,6 +7267,7 @@ func_mode_link ()
# -m*, -t[45]*, -txscale* architecture-specific flags for GCC
# -F/path path to uninstalled frameworks, gcc on darwin
# -p, -pg, --coverage, -fprofile-* profiling flags for GCC
+ # -fstack-protector* stack protector flags for GCC
# @file GCC response files
# -tp=* Portland pgcc target processor selection
# --sysroot=* for sysroot support
@@ -7217,7 +7275,7 @@ func_mode_link ()
# -stdlib=* select c++ std lib with clang
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \
- -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-stdlib=*)
+ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*)
func_quote_for_eval "$arg"
arg=$func_quote_for_eval_result
func_append compile_command " $arg"
@@ -7226,6 +7284,25 @@ func_mode_link ()
continue
;;
+ -Z*)
+ if test os2 = "`expr $host : '.*\(os2\)'`"; then
+ # OS/2 uses -Zxxx to specify OS/2-specific options
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case $arg in
+ -Zlinker | -Zstack)
+ prev=xcompiler
+ ;;
+ esac
+ continue
+ else
+ # Otherwise treat like 'Some other compiler flag' below
+ func_quote_for_eval "$arg"
+ arg=$func_quote_for_eval_result
+ fi
+ ;;
+
# Some other compiler flag.
-* | +*)
func_quote_for_eval "$arg"
@@ -7385,6 +7462,9 @@ func_mode_link ()
eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+ # Definition is injected by LT_CONFIG during libtool generation.
+ func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH"
+
func_dirname "$output" "/" ""
output_objdir=$func_dirname_result$objdir
func_to_tool_file "$output_objdir/"
@@ -8052,7 +8132,7 @@ func_mode_link ()
if test -n "$library_names" &&
{ test no = "$use_static_libs" || test -z "$old_library"; }; then
case $host in
- *cygwin* | *mingw* | *cegcc*)
+ *cygwin* | *mingw* | *cegcc* | *os2*)
# No point in relinking DLLs because paths are not encoded
func_append notinst_deplibs " $lib"
need_relink=no
@@ -8122,7 +8202,7 @@ func_mode_link ()
elif test -n "$soname_spec"; then
# bleh windows
case $host in
- *cygwin* | mingw* | *cegcc*)
+ *cygwin* | mingw* | *cegcc* | *os2*)
func_arith $current - $age
major=$func_arith_result
versuffix=-$major
@@ -8547,6 +8627,37 @@ func_mode_link ()
eval $var=\"$tmp_libs\"
done # for var
fi
+
+ # Add Sun CC postdeps if required:
+ test CXX = "$tagname" && {
+ case $host_os in
+ linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C++ 5.9
+ func_suncc_cstd_abi
+
+ if test no != "$suncc_use_cstd_abi"; then
+ func_append postdeps ' -library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ func_cc_basename "$CC"
+ case $func_cc_basename_result in
+ CC* | sunCC*)
+ func_suncc_cstd_abi
+
+ if test no != "$suncc_use_cstd_abi"; then
+ func_append postdeps ' -library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ }
+
# Last step: remove runtime libs from dependency_libs
# (they stay in deplibs)
tmp_libs=
@@ -8694,13 +8805,13 @@ func_mode_link ()
#
case $version_type in
# correct linux to gnu/linux during the next big refactor
- darwin|linux|osf|windows|none)
+ darwin|freebsd-elf|linux|osf|windows|none)
func_arith $number_major + $number_minor
current=$func_arith_result
age=$number_minor
revision=$number_revision
;;
- freebsd-aout|freebsd-elf|qnx|sunos)
+ freebsd-aout|qnx|sunos)
current=$number_major
revision=$number_minor
age=0
@@ -8786,8 +8897,9 @@ func_mode_link ()
;;
freebsd-elf)
- major=.$current
- versuffix=.$current
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=$major.$age.$revision
;;
irix | nonstopux)
@@ -8850,6 +8962,11 @@ func_mode_link ()
versuffix=.$current
;;
+ sco)
+ major=.$current
+ versuffix=.$current
+ ;;
+
sunos)
major=.$current
versuffix=.$current.$revision
diff --git a/tiff/config/missing b/tiff/config/missing
index 1c8ff7049..f62bbae30 100755
--- a/tiff/config/missing
+++ b/tiff/config/missing
@@ -1,11 +1,10 @@
#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2006-05-10.23
+scriptversion=2013-10-28.13; # UTC
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
-# Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,9 +17,7 @@ scriptversion=2006-05-10.23
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
@@ -28,66 +25,40 @@ scriptversion=2006-05-10.23
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
- echo 1>&2 "Try \`$0 --help' for more information"
+ echo 1>&2 "Try '$0 --help' for more information"
exit 1
fi
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
+case $1 in
-msg="missing on your system"
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
-case $1 in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
- aclocal touch file \`aclocal.m4'
- autoconf touch file \`configure'
- autoheader touch file \`config.h.in'
- autom4te touch the output file, or create a stub one
- automake touch all \`Makefile.in' files
- bison create \`y.tab.[ch]', if possible, from existing .[ch]
- flex create \`lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create \`lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
@@ -99,269 +70,146 @@ Send bug reports to <bug-automake@gnu.org>."
;;
-*)
- echo 1>&2 "$0: Unknown \`$1' option"
- echo 1>&2 "Try \`$0 --help' for more information"
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).
-case $1 in
- lex|yacc)
- # Not GNU programs, they don't have --version.
- ;;
-
- tar)
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- exit 1
- fi
- ;;
-
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running `$TOOL --version' or `$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $1 in
- aclocal*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acinclude.m4' or \`${configure_ac}'. You might want
- to install the \`Automake' and \`Perl' packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`${configure_ac}'. You might want to install the
- \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acconfig.h' or \`${configure_ac}'. You might want
- to install the \`Autoconf' and \`GNU m4' packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case $f in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
- You might want to install the \`Automake' and \`Perl' packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- autom4te)
- echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
- You might have modified some files without having the
- proper tools for further handling them.
- You can get \`$1' as part of \`Autoconf' from any GNU
- archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
- ;;
-
- bison|yacc)
- echo 1>&2 "\
-WARNING: \`$1' $msg. You should only need it if
- you modified a \`.y' file. You may need the \`Bison' package
- in order for those modifications to take effect. You can get
- \`Bison' from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if test $# -ne 1; then
- eval LASTARG="\${$#}"
- case $LASTARG in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if test ! -f y.tab.h; then
- echo >y.tab.h
- fi
- if test ! -f y.tab.c; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex|flex)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.l' file. You may need the \`Flex' package
- in order for those modifications to take effect. You can get
- \`Flex' from any GNU archive site."
- rm -f lex.yy.c
- if test $# -ne 1; then
- eval LASTARG="\${$#}"
- case $LASTARG in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if test ! -f lex.yy.c; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a dependency of a manual page. You may need the
- \`Help2man' package in order for those modifications to take
- effect. You can get \`Help2man' from any GNU archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit 1
- fi
- ;;
-
- makeinfo)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.texi' or \`.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy \`make' (AIX,
- DU, IRIX). You might want to install the \`Texinfo' package or
- the \`GNU make' package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '
- /^@setfilename/{
- s/.* \([^ ]*\) *$/\1/
- p
- q
- }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
- fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
- touch $file
- ;;
-
- tar)
- shift
-
- # We have already tried tar in the generic part.
- # Look for gnutar/gtar before invocation to avoid ugly error
- # messages.
- if (gnutar --version > /dev/null 2>&1); then
- gnutar "$@" && exit 0
- fi
- if (gtar --version > /dev/null 2>&1); then
- gtar "$@" && exit 0
- fi
- firstarg="$1"
- if shift; then
- case $firstarg in
- *o*)
- firstarg=`echo "$firstarg" | sed s/o//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- case $firstarg in
- *h*)
- firstarg=`echo "$firstarg" | sed s/h//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- fi
-
- echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
- You may want to install GNU tar or Free paxutils, or check the
- command line arguments."
- exit 1
- ;;
-
- *)
- echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
- You might have modified some files without having the
- proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequisites for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing \`$1' program."
- exit 1
- ;;
-esac
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
-exit 0
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'autom4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
# End:
diff --git a/tiff/config/test-driver b/tiff/config/test-driver
new file mode 100755
index 000000000..aba4d1d26
--- /dev/null
+++ b/tiff/config/test-driver
@@ -0,0 +1,127 @@
+#! /bin/sh
+# test-driver - basic driver script for the 'parallel-tests' mode.
+
+scriptversion=2012-06-27.10; # UTC
+
+# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+# Make unconditional expansion of undefined variables an error. This
+# helps a lot in preventing typo-related bugs.
+set -u
+
+usage_error ()
+{
+ echo "$0: $*" >&2
+ print_usage >&2
+ exit 2
+}
+
+print_usage ()
+{
+ cat <<END
+Usage:
+ test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
+ [--expect-failure={yes|no}] [--color-tests={yes|no}]
+ [--enable-hard-errors={yes|no}] [--] TEST-SCRIPT
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+END
+}
+
+# TODO: better error handling in option parsing (in particular, ensure
+# TODO: $log_file, $trs_file and $test_name are defined).
+test_name= # Used for reporting.
+log_file= # Where to save the output of the test script.
+trs_file= # Where to save the metadata of the test run.
+expect_failure=no
+color_tests=no
+enable_hard_errors=yes
+while test $# -gt 0; do
+ case $1 in
+ --help) print_usage; exit $?;;
+ --version) echo "test-driver $scriptversion"; exit $?;;
+ --test-name) test_name=$2; shift;;
+ --log-file) log_file=$2; shift;;
+ --trs-file) trs_file=$2; shift;;
+ --color-tests) color_tests=$2; shift;;
+ --expect-failure) expect_failure=$2; shift;;
+ --enable-hard-errors) enable_hard_errors=$2; shift;;
+ --) shift; break;;
+ -*) usage_error "invalid option: '$1'";;
+ esac
+ shift
+done
+
+if test $color_tests = yes; then
+ # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
+ red='' # Red.
+ grn='' # Green.
+ lgn='' # Light green.
+ blu='' # Blue.
+ mgn='' # Magenta.
+ std='' # No color.
+else
+ red= grn= lgn= blu= mgn= std=
+fi
+
+do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
+trap "st=129; $do_exit" 1
+trap "st=130; $do_exit" 2
+trap "st=141; $do_exit" 13
+trap "st=143; $do_exit" 15
+
+# Test script is run here.
+"$@" >$log_file 2>&1
+estatus=$?
+if test $enable_hard_errors = no && test $estatus -eq 99; then
+ estatus=1
+fi
+
+case $estatus:$expect_failure in
+ 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
+ 0:*) col=$grn res=PASS recheck=no gcopy=no;;
+ 77:*) col=$blu res=SKIP recheck=no gcopy=yes;;
+ 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;;
+ *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;;
+ *:*) col=$red res=FAIL recheck=yes gcopy=yes;;
+esac
+
+# Report outcome to console.
+echo "${col}${res}${std}: $test_name"
+
+# Register the test result, and other relevant metadata.
+echo ":test-result: $res" > $trs_file
+echo ":global-test-result: $res" >> $trs_file
+echo ":recheck: $recheck" >> $trs_file
+echo ":copy-in-global-log: $gcopy" >> $trs_file
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/tiff/configure b/tiff/configure
index 36be45989..db2369496 100755
--- a/tiff/configure
+++ b/tiff/configure
@@ -1,13 +1,11 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for LibTIFF Software 4.0.1.
+# Generated by GNU Autoconf 2.69 for LibTIFF Software 4.0.7.
#
# Report bugs to <tiff@lists.maptools.org>.
#
#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -136,6 +134,31 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# Use a proper internal environment variable to ensure we don't fall
+ # into an infinite loop, continuously re-executing ourselves.
+ if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+ _as_can_reexec=no; export _as_can_reexec;
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+ fi
+ # We don't want this to propagate to other subprocesses.
+ { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -169,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -222,21 +246,25 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- # Preserve -v and -x to the replacement shell.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
- esac
- exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+ export CONFIG_SHELL
+ # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
fi
if test x$as_have_required = xno; then :
@@ -339,6 +367,14 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -460,6 +496,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+ # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+ # already done that, so ensure we don't try to do so again and fall
+ # in an infinite loop. This has already happened in practice.
+ _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -494,16 +534,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -515,28 +555,8 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -570,8 +590,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='LibTIFF Software'
PACKAGE_TARNAME='tiff'
-PACKAGE_VERSION='4.0.1'
-PACKAGE_STRING='LibTIFF Software 4.0.1'
+PACKAGE_VERSION='4.0.7'
+PACKAGE_STRING='LibTIFF Software 4.0.7'
PACKAGE_BUGREPORT='tiff@lists.maptools.org'
PACKAGE_URL=''
@@ -636,15 +656,17 @@ X_CFLAGS
XMKMF
HAVE_CXX_FALSE
HAVE_CXX_TRUE
+HAVE_LZMA_FALSE
+HAVE_LZMA_TRUE
+HAVE_JBIG_FALSE
+HAVE_JBIG_TRUE
+HAVE_JPEG_FALSE
+HAVE_JPEG_TRUE
LIBTIFF_DOCDIR
HAVE_RPATH_FALSE
HAVE_RPATH_TRUE
LIBOBJS
tiff_libs_private
-AM_BACKSLASH
-AM_DEFAULT_VERBOSITY
-AM_DEFAULT_V
-AM_V
CXXCPP
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
@@ -653,6 +675,7 @@ ac_ct_CXX
CXXFLAGS
CXX
CPP
+LT_SYS_LIBRARY_PATH
OTOOL64
OTOOL
LIPO
@@ -676,6 +699,7 @@ DLLTOOL
AS
HAVE_LD_VERSION_SCRIPT_FALSE
HAVE_LD_VERSION_SCRIPT_TRUE
+CMAKE
LN_S
am__fastdepCC_FALSE
am__fastdepCC_TRUE
@@ -704,6 +728,10 @@ LIBTIFF_MAJOR_VERSION
MAINT
MAINTAINER_MODE_FALSE
MAINTAINER_MODE_TRUE
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
am__untar
am__tar
AMTAR
@@ -776,6 +804,7 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_silent_rules
enable_maintainer_mode
enable_dependency_tracking
enable_ld_version_script
@@ -783,10 +812,10 @@ enable_shared
enable_static
with_pic
enable_fast_install
+with_aix_soname
with_gnu_ld
with_sysroot
enable_libtool_lock
-enable_silent_rules
enable_rpath
enable_largefile
with_docdir
@@ -816,6 +845,7 @@ with_jpeg12_include_dir
with_jpeg12_lib
enable_cxx
with_x
+enable_win32_io
enable_strip_chopping
with_default_strip_size
enable_defer_strile_load
@@ -831,6 +861,7 @@ CFLAGS
LDFLAGS
LIBS
CPPFLAGS
+LT_SYS_LIBRARY_PATH
CPP
CXX
CXXFLAGS
@@ -1292,8 +1323,6 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1379,7 +1408,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures LibTIFF Software 4.0.1 to adapt to many kinds of systems.
+\`configure' configures LibTIFF Software 4.0.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1453,7 +1482,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of LibTIFF Software 4.0.1:";;
+ short | recursive ) echo "Configuration of LibTIFF Software 4.0.7:";;
esac
cat <<\_ACEOF
@@ -1461,10 +1490,15 @@ Optional Features:
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --enable-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
- --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
+ --enable-maintainer-mode
+ enable make rules and dependencies not useful (and
+ sometimes confusing) to the casual installer
+ --enable-dependency-tracking
+ do not reject slow dependency extractors
+ --disable-dependency-tracking
+ speeds up one-time build
--enable-ld-version-script
enable linker version script (default is disabled)
--enable-shared[=PKGS] build shared libraries [default=yes]
@@ -1472,8 +1506,6 @@ Optional Features:
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
- --enable-silent-rules less verbose build output (undo: `make V=1')
- --disable-silent-rules verbose build output (undo: `make V=0')
--enable-rpath Enable runtime linker paths (-R libtool option)
--disable-largefile omit support for large files
--disable-ccitt disable support for CCITT Group 3 & 4 algorithms
@@ -1499,6 +1531,8 @@ Optional Features:
--enable-jpeg12 enable libjpeg 8/12bit dual mode
--enable-cxx enable C++ stream API building (requires C++
compiler)
+ --disable-win32-io disable Win32 I/O (Windows only, enabled by default
+ except for Cygwin)
--disable-strip-chopping
disable support for strip chopping (whether or not
to convert single-strip uncompressed images to
@@ -1524,9 +1558,12 @@ Optional Packages:
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use
both]
+ --with-aix-soname=aix|svr4|both
+ shared library versioning (aka "SONAME") variant to
+ provide on AIX, [default=aix].
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
- --with-sysroot=DIR Search for dependent libraries within DIR
- (or the compiler's sysroot if not specified).
+ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the
+ compiler's sysroot if not specified).
--with-docdir=DIR directory where documentation should be installed
--with-zlib-include-dir=DIR
location of Zlib headers
@@ -1557,6 +1594,8 @@ Some influential environment variables:
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
+ LT_SYS_LIBRARY_PATH
+ User-defined run-time library search path.
CPP C preprocessor
CXX C++ compiler command
CXXFLAGS C++ compiler flags
@@ -1629,10 +1668,10 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-LibTIFF Software configure 4.0.1
-generated by GNU Autoconf 2.68
+LibTIFF Software configure 4.0.7
+generated by GNU Autoconf 2.69
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1708,7 +1747,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -2006,7 +2045,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
+ test -x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -2170,6 +2209,52 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_check_type
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_decl
+
# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
# --------------------------------------------
# Tries to find the compile-time value of EXPR in a program that includes
@@ -2187,7 +2272,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2203,7 +2289,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2229,7 +2316,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2245,7 +2333,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2279,7 +2368,8 @@ int
main ()
{
static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
;
return 0;
@@ -2351,8 +2441,8 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by LibTIFF Software $as_me 4.0.1, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+It was created by LibTIFF Software $as_me 4.0.7, which was
+generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2808,7 +2898,7 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-am__api_version='1.11'
+am__api_version='1.15'
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -2847,7 +2937,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -2905,9 +2995,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -2918,32 +3005,40 @@ case `pwd` in
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
esac
-# Do `set' in a subshell so we don't clobber the current shell's
+# Do 'set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$*" != "X $srcdir/configure conftest.file" \
- && test "$*" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
-alias in your environment" "$LINENO" 5
- fi
-
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+ alias in your environment" "$LINENO" 5
+ fi
+ if test "$2" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
test "$2" = conftest.file
)
then
@@ -2955,6 +3050,16 @@ Check your system clock" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
test "$program_prefix" != NONE &&
program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
@@ -2965,8 +3070,8 @@ test "$program_suffix" != NONE &&
ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
@@ -2977,15 +3082,15 @@ if test x"${MISSING+set}" != xset; then
esac
fi
# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
else
am_missing_run=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
fi
-if test x"${install_sh}" != xset; then
+if test x"${install_sh+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
@@ -2994,10 +3099,10 @@ if test x"${install_sh}" != xset; then
esac
fi
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
+# will honor the 'STRIP' environment variable to overrule this program.
if test "$cross_compiling" != no; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
@@ -3016,7 +3121,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3056,7 +3161,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3107,7 +3212,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
- { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
'mkdir (GNU coreutils) '* | \
'mkdir (coreutils) '* | \
@@ -3136,12 +3241,6 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
$as_echo "$MKDIR_P" >&6; }
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
- [\\/$]* | ?:[\\/]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
for ac_prog in gawk mawk nawk awk
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
@@ -3160,7 +3259,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AWK="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3224,6 +3323,45 @@ else
fi
rmdir .tst 2>/dev/null
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
@@ -3246,7 +3384,7 @@ fi
# Define the identity of the package.
PACKAGE='tiff'
- VERSION='4.0.1'
+ VERSION='4.0.7'
cat >>confdefs.h <<_ACEOF
@@ -3274,19 +3412,157 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AMTAR='$${TAR-tar}'
-am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar pax cpio none'
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a pax tar archive" >&5
+$as_echo_n "checking how to create a pax tar archive... " >&6; }
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_pax-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ { echo "$as_me:$LINENO: $_am_tar --version" >&5
+ ($_am_tar --version) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && break
+ done
+ am__tar="$_am_tar --format=posix -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=posix -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x pax -w "$$tardir"'
+ am__tar_='pax -L -x pax -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H pax -L'
+ am__tar_='find "$tardir" -print | cpio -o -H pax -L'
+ am__untar='cpio -i -H pax -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_pax}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
+ (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
+ ($am__untar <conftest.tar) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ { echo "$as_me:$LINENO: cat conftest.dir/file" >&5
+ (cat conftest.dir/file) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ if ${am_cv_prog_tar_pax+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ am_cv_prog_tar_pax=$_am_tool
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_pax" >&5
+$as_echo "$am_cv_prog_tar_pax" >&6; }
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
# Check whether --enable-maintainer-mode was given.
@@ -3312,14 +3588,14 @@ fi
LIBTIFF_MAJOR_VERSION=4
LIBTIFF_MINOR_VERSION=0
-LIBTIFF_MICRO_VERSION=1
+LIBTIFF_MICRO_VERSION=7
LIBTIFF_ALPHA_VERSION=
LIBTIFF_VERSION=$LIBTIFF_MAJOR_VERSION.$LIBTIFF_MINOR_VERSION.$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION
LIBTIFF_RELEASE_DATE=`date +"%Y%m%d"`
-LIBTIFF_CURRENT=5
-LIBTIFF_REVISION=6
-LIBTIFF_AGE=0
+LIBTIFF_CURRENT=7
+LIBTIFF_REVISION=5
+LIBTIFF_AGE=2
LIBTIFF_VERSION_INFO=$LIBTIFF_CURRENT:$LIBTIFF_REVISION:$LIBTIFF_AGE
# This is a special hack for OpenBSD and MirOS systems. The dynamic linker
@@ -3365,7 +3641,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3405,7 +3681,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3458,7 +3734,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3499,7 +3775,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -3557,7 +3833,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3601,7 +3877,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -4047,8 +4323,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -4132,6 +4407,65 @@ ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
@@ -4151,7 +4485,7 @@ am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# Ignore all kinds of additional output from 'make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
@@ -4207,8 +4541,8 @@ else
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
@@ -4243,16 +4577,16 @@ else
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
@@ -4261,8 +4595,8 @@ else
test "$am__universal" = false || continue
;;
nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
if test "x$enable_dependency_tracking" = xyes; then
continue
else
@@ -4270,7 +4604,7 @@ else
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
+ # This compiler won't grok '-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
@@ -4324,131 +4658,6 @@ else
fi
-if test "x$CC" != xcc; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
-$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
-$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
-fi
-set dummy $CC; ac_cc=`$as_echo "$2" |
- sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-# Make sure it works both with $CC and with simple cc.
-# We do the test twice because some compilers refuse to overwrite an
-# existing .o file with -o, though they will create one.
-ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-rm -f conftest2.*
-if { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } &&
- test -f conftest2.$ac_objext && { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; };
-then
- eval ac_cv_prog_cc_${ac_cc}_c_o=yes
- if test "x$CC" != xcc; then
- # Test first that cc exists at all.
- if { ac_try='cc -c conftest.$ac_ext >&5'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
- rm -f conftest2.*
- if { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } &&
- test -f conftest2.$ac_objext && { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; };
- then
- # cc works too.
- :
- else
- # cc exists but doesn't like -o.
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
- fi
- fi
- fi
-else
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
-fi
-rm -f core conftest*
-
-fi
-if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-
-$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
-
-fi
-
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
-if test "$am_t" != yes; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-
@@ -4566,6 +4775,47 @@ else
$as_echo "no, using $LN_S" >&6; }
fi
+# Used only for validating the source distribution during distcheck
+# Extract the first word of "cmake", so it can be a program name with args.
+set dummy cmake; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_CMAKE+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $CMAKE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_CMAKE="$CMAKE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_CMAKE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+CMAKE=$ac_cv_path_CMAKE
+if test -n "$CMAKE"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMAKE" >&5
+$as_echo "$CMAKE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
# Check if LD supports linker scripts, and define automake conditional
@@ -4638,8 +4888,8 @@ esac
-macro_version='2.4.2'
-macro_revision='1.3337'
+macro_version='2.4.6'
+macro_revision='2.4.6'
@@ -4653,7 +4903,7 @@ macro_revision='1.3337'
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
# Backslashify metacharacters that are still active within
# double-quoted strings.
@@ -4702,7 +4952,7 @@ func_echo_all ()
$ECHO ""
}
-case "$ECHO" in
+case $ECHO in
printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5
$as_echo "printf" >&6; } ;;
print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5
@@ -4746,7 +4996,7 @@ do
for ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+ as_fn_executable_p "$ac_path_SED" || continue
# Check for GNU ac_path_SED and select it if it is found.
# Check for GNU $ac_path_SED
case `"$ac_path_SED" --version 2>&1` in
@@ -4822,7 +5072,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+ as_fn_executable_p "$ac_path_GREP" || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -4888,7 +5138,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+ as_fn_executable_p "$ac_path_EGREP" || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -4955,7 +5205,7 @@ do
for ac_prog in fgrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+ as_fn_executable_p "$ac_path_FGREP" || continue
# Check for GNU ac_path_FGREP and select it if it is found.
# Check for GNU $ac_path_FGREP
case `"$ac_path_FGREP" --version 2>&1` in
@@ -5025,19 +5275,19 @@ test -z "$GREP" && GREP=grep
# Check whether --with-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+ withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
else
with_gnu_ld=no
fi
ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
# Check if gcc -print-prog-name=ld gives a path.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
$as_echo_n "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
+ # gcc leaves a trailing carriage return, which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -5051,7 +5301,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
- test -z "$LD" && LD="$ac_prog"
+ test -z "$LD" && LD=$ac_prog
;;
"")
# If it fails, then pretend we aren't using GCC.
@@ -5062,7 +5312,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
with_gnu_ld=unknown
;;
esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
$as_echo_n "checking for GNU ld... " >&6; }
else
@@ -5073,32 +5323,32 @@ if ${lt_cv_path_LD+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
+ lt_cv_path_LD=$ac_dir/$ac_prog
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
+ test no != "$with_gnu_ld" && break
;;
*)
- test "$with_gnu_ld" != yes && break
+ test yes != "$with_gnu_ld" && break
;;
esac
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
+ lt_cv_path_LD=$LD # Let the user override the test with a path.
fi
fi
-LD="$lt_cv_path_LD"
+LD=$lt_cv_path_LD
if test -n "$LD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
$as_echo "$LD" >&6; }
@@ -5141,33 +5391,38 @@ if ${lt_cv_path_NM+:} false; then :
else
if test -n "$NM"; then
# Let the user override the test.
- lt_cv_path_NM="$NM"
+ lt_cv_path_NM=$NM
else
- lt_nm_to_check="${ac_tool_prefix}nm"
+ lt_nm_to_check=${ac_tool_prefix}nm
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
lt_nm_to_check="$lt_nm_to_check nm"
fi
for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ tmp_nm=$ac_dir/$lt_tmp_nm
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
# Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # Adding the 'sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
+ # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
+ case $build_os in
+ mingw*) lt_bad_file=conftest.nm/nofile ;;
+ *) lt_bad_file=/dev/null ;;
+ esac
+ case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in
+ *$lt_bad_file* | *'Invalid file or object type'*)
lt_cv_path_NM="$tmp_nm -B"
- break
+ break 2
;;
*)
case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
*/dev/null*)
lt_cv_path_NM="$tmp_nm -p"
- break
+ break 2
;;
*)
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
@@ -5178,15 +5433,15 @@ else
esac
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
done
: ${lt_cv_path_NM=no}
fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
$as_echo "$lt_cv_path_NM" >&6; }
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
+if test no != "$lt_cv_path_NM"; then
+ NM=$lt_cv_path_NM
else
# Didn't find any BSD compatible name lister, look for dumpbin.
if test -n "$DUMPBIN"; then :
@@ -5211,7 +5466,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5255,7 +5510,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5292,9 +5547,9 @@ esac
fi
fi
- case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
*COFF*)
- DUMPBIN="$DUMPBIN -symbols"
+ DUMPBIN="$DUMPBIN -symbols -headers"
;;
*)
DUMPBIN=:
@@ -5302,8 +5557,8 @@ fi
esac
fi
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
+ if test : != "$DUMPBIN"; then
+ NM=$DUMPBIN
fi
fi
test -z "$NM" && NM=nm
@@ -5343,7 +5598,7 @@ if ${lt_cv_sys_max_cmd_len+:} false; then :
$as_echo_n "(cached) " >&6
else
i=0
- teststring="ABCD"
+ teststring=ABCD
case $build_os in
msdosdjgpp*)
@@ -5383,7 +5638,7 @@ else
lt_cv_sys_max_cmd_len=8192;
;;
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
# This has been around since 386BSD, at least. Likely further.
if test -x /sbin/sysctl; then
lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
@@ -5433,22 +5688,23 @@ else
;;
*)
lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
else
# Make teststring a little bigger before we do anything with it.
# a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
+ for i in 1 2 3 4 5 6 7 8; do
teststring=$teststring$teststring
done
SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
# If test is not a shell built-in, we'll probably end up computing a
# maximum length that is only half of the actual maximum length, but
# we can't tell.
- while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \
= "X$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
+ test 17 != "$i" # 1/2 MB should be enough
do
i=`expr $i + 1`
teststring=$teststring$teststring
@@ -5466,7 +5722,7 @@ else
fi
-if test -n $lt_cv_sys_max_cmd_len ; then
+if test -n "$lt_cv_sys_max_cmd_len"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
else
@@ -5484,30 +5740,6 @@ max_cmd_len=$lt_cv_sys_max_cmd_len
: ${MV="mv -f"}
: ${RM="rm -f"}
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
-$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,b/c, \
- && eval 'test $(( 1 + 1 )) -eq 2 \
- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
- && xsi_shell=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
-$as_echo "$xsi_shell" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
-$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
- >/dev/null 2>&1 \
- && lt_shell_append=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
-$as_echo "$lt_shell_append" >&6; }
-
-
if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
lt_unset=unset
else
@@ -5630,13 +5862,13 @@ esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- if test "$GCC" != yes; then
+ if test yes != "$GCC"; then
reload_cmds=false
fi
;;
darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ if test yes = "$GCC"; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
else
reload_cmds='$LD$reload_flag -o $output$reload_objs'
fi
@@ -5668,7 +5900,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5708,7 +5940,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -5761,13 +5993,13 @@ lt_cv_deplibs_check_method='unknown'
# Need to set the preceding variable on all platforms that support
# interlibrary dependencies.
# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
+# 'unknown' -- same as none, but documents that we really don't know.
# 'pass_all' -- all dependencies passed with no checks.
# 'test_compile' -- check by making test program.
# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
+# that responds to the $file_magic_cmd with a given extended regex.
+# If you have 'file' or equivalent on your system and you're not sure
+# whether 'pass_all' will *always* work, you probably want this one.
case $host_os in
aix[4-9]*)
@@ -5794,8 +6026,7 @@ mingw* | pw32*)
# Base MSYS/MinGW do not provide the 'file' command needed by
# func_win32_libid shell function, so use a weaker test based on 'objdump',
# unless we find 'file', for example because we are cross-compiling.
- # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
- if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
+ if ( file / ) >/dev/null 2>&1; then
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
else
@@ -5831,10 +6062,6 @@ freebsd* | dragonfly*)
fi
;;
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
haiku*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -5873,7 +6100,7 @@ irix5* | irix6* | nonstopux*)
;;
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -5895,8 +6122,8 @@ newos6*)
lt_cv_deplibs_check_method=pass_all
;;
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+openbsd* | bitrig*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
else
lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
@@ -5949,6 +6176,9 @@ sysv4 | sysv4.3*)
tpf*)
lt_cv_deplibs_check_method=pass_all
;;
+os2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
fi
@@ -6011,7 +6241,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6051,7 +6281,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6103,8 +6333,8 @@ else
case $host_os in
cygwin* | mingw* | pw32* | cegcc*)
- # two different shell functions defined in ltmain.sh
- # decide which to use based on capabilities of $DLLTOOL
+ # two different shell functions defined in ltmain.sh;
+ # decide which one to use based on capabilities of $DLLTOOL
case `$DLLTOOL --help 2>&1` in
*--identify-strict*)
lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
@@ -6116,7 +6346,7 @@ cygwin* | mingw* | pw32* | cegcc*)
;;
*)
# fallback: assume linklib IS sharedlib
- lt_cv_sharedlib_from_linklib_cmd="$ECHO"
+ lt_cv_sharedlib_from_linklib_cmd=$ECHO
;;
esac
@@ -6151,7 +6381,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6195,7 +6425,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AR="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6270,7 +6500,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
- if test "$ac_status" -eq 0; then
+ if test 0 -eq "$ac_status"; then
# Ensure the archiver fails upon bogus file names.
rm -f conftest.$ac_objext libconftest.a
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5
@@ -6278,7 +6508,7 @@ if ac_fn_c_try_compile "$LINENO"; then :
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
- if test "$ac_status" -ne 0; then
+ if test 0 -ne "$ac_status"; then
lt_cv_ar_at_file=@
fi
fi
@@ -6291,7 +6521,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5
$as_echo "$lt_cv_ar_at_file" >&6; }
-if test "x$lt_cv_ar_at_file" = xno; then
+if test no = "$lt_cv_ar_at_file"; then
archiver_list_spec=
else
archiver_list_spec=$lt_cv_ar_at_file
@@ -6320,7 +6550,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_STRIP="${ac_tool_prefix}strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6360,7 +6590,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_STRIP="strip"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6419,7 +6649,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6459,7 +6689,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -6508,7 +6738,7 @@ old_postuninstall_cmds=
if test -n "$RANLIB"; then
case $host_os in
- openbsd*)
+ bitrig* | openbsd*)
old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
;;
*)
@@ -6598,7 +6828,7 @@ cygwin* | mingw* | pw32* | cegcc*)
symcode='[ABCDGISTW]'
;;
hpux*)
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
symcode='[ABCDEGRST]'
fi
;;
@@ -6631,14 +6861,44 @@ case `$NM -V 2>&1` in
symcode='[ABCDGIRSTW]' ;;
esac
+if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Gets list of data symbols to import.
+ lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'"
+ # Adjust the below global symbol transforms to fixup imported variables.
+ lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
+ lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'"
+ lt_c_name_lib_hook="\
+ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\
+ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'"
+else
+ # Disable hooks by default.
+ lt_cv_sys_global_symbol_to_import=
+ lt_cdecl_hook=
+ lt_c_name_hook=
+ lt_c_name_lib_hook=
+fi
+
# Transform an extracted symbol line into a proper C declaration.
# Some systems (esp. on ia64) link data and code symbols differently,
# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n"\
+$lt_cdecl_hook\
+" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n"\
+$lt_c_name_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'"
+
+# Transform an extracted symbol line into symbol name with lib prefix and
+# symbol address.
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\
+$lt_c_name_lib_hook\
+" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\
+" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\
+" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'"
# Handle CRLF in mingw tool chain
opt_cr=
@@ -6656,21 +6916,24 @@ for ac_symprfx in "" "_"; do
# Write the raw and C identifiers.
if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
+ # Fake it for dumpbin and say T for any non-static function,
+ # D for any global variable and I for any imported variable.
# Also find C++ and __fastcall symbols from MSVC++,
# which start with @ or ?.
lt_cv_sys_global_symbol_pipe="$AWK '"\
" {last_section=section; section=\$ 3};"\
" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
+" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
+" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
" \$ 0!~/External *\|/{next};"\
" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
+" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
+" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
" ' prfx=^$ac_symprfx"
else
lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
@@ -6718,11 +6981,11 @@ _LT_EOF
if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
cat <<_LT_EOF > conftest.$ac_ext
/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
-/* DATA imports from DLLs on WIN32 con't be const, because runtime
+#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
+/* DATA imports from DLLs on WIN32 can't be const, because runtime
relocations are performed -- see ld's documentation on pseudo-relocs. */
# define LT_DLSYM_CONST
-#elif defined(__osf__)
+#elif defined __osf__
/* This system does not cope well with relocations in const data. */
# define LT_DLSYM_CONST
#else
@@ -6748,7 +7011,7 @@ lt__PROGRAM__LTX_preloaded_symbols[] =
{
{ "@PROGRAM@", (void *) 0 },
_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
cat <<\_LT_EOF >> conftest.$ac_ext
{0, (void *) 0}
};
@@ -6768,13 +7031,13 @@ _LT_EOF
mv conftest.$ac_objext conftstm.$ac_objext
lt_globsym_save_LIBS=$LIBS
lt_globsym_save_CFLAGS=$CFLAGS
- LIBS="conftstm.$ac_objext"
+ LIBS=conftstm.$ac_objext
CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
pipe_works=yes
fi
LIBS=$lt_globsym_save_LIBS
@@ -6795,7 +7058,7 @@ _LT_EOF
rm -rf conftest* conftst*
# Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
+ if test yes = "$pipe_works"; then
break
else
lt_cv_sys_global_symbol_pipe=
@@ -6848,6 +7111,16 @@ fi
+
+
+
+
+
+
+
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
$as_echo_n "checking for sysroot... " >&6; }
@@ -6860,9 +7133,9 @@ fi
lt_sysroot=
-case ${with_sysroot} in #(
+case $with_sysroot in #(
yes)
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
lt_sysroot=`$CC --print-sysroot 2>/dev/null`
fi
;; #(
@@ -6872,8 +7145,8 @@ case ${with_sysroot} in #(
no|'')
;; #(
*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5
-$as_echo "${with_sysroot}" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5
+$as_echo "$with_sysroot" >&6; }
as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5
;;
esac
@@ -6885,18 +7158,99 @@ $as_echo "${lt_sysroot:-no}" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5
+$as_echo_n "checking for a working dd... " >&6; }
+if ${ac_cv_path_lt_DD+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+: ${lt_DD:=$DD}
+if test -z "$lt_DD"; then
+ ac_path_lt_DD_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in dd; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext"
+ as_fn_executable_p "$ac_path_lt_DD" || continue
+if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
+fi
+ $ac_path_lt_DD_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_lt_DD"; then
+ :
+ fi
+else
+ ac_cv_path_lt_DD=$lt_DD
+fi
+
+rm -f conftest.i conftest2.i conftest.out
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5
+$as_echo "$ac_cv_path_lt_DD" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5
+$as_echo_n "checking how to truncate binary pipes... " >&6; }
+if ${lt_cv_truncate_bin+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ printf 0123456789abcdef0123456789abcdef >conftest.i
+cat conftest.i conftest.i >conftest2.i
+lt_cv_truncate_bin=
+if "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
+ cmp -s conftest.i conftest.out \
+ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
+fi
+rm -f conftest.i conftest2.i conftest.out
+test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5
+$as_echo "$lt_cv_truncate_bin" >&6; }
+
+
+
+
+
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
# Check whether --enable-libtool-lock was given.
if test "${enable_libtool_lock+set}" = set; then :
enableval=$enable_libtool_lock;
fi
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+test no = "$enable_libtool_lock" || enable_libtool_lock=yes
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
case $host in
ia64-*-hpux*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set mode
+ # options accordingly.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -6905,24 +7259,25 @@ ia64-*-hpux*)
test $ac_status = 0; }; then
case `/usr/bin/file conftest.$ac_objext` in
*ELF-32*)
- HPUX_IA64_MODE="32"
+ HPUX_IA64_MODE=32
;;
*ELF-64*)
- HPUX_IA64_MODE="64"
+ HPUX_IA64_MODE=64
;;
esac
fi
rm -rf conftest*
;;
*-*-irix6*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
echo '#line '$LINENO' "configure"' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -melf32bsmip"
@@ -6951,9 +7306,50 @@ ia64-*-hpux*)
rm -rf conftest*
;;
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+mips64*-*linux*)
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
+ echo '#line '$LINENO' "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ emul=elf
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ emul="${emul}32"
+ ;;
+ *64-bit*)
+ emul="${emul}64"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *MSB*)
+ emul="${emul}btsmip"
+ ;;
+ *LSB*)
+ emul="${emul}ltsmip"
+ ;;
+ esac
+ case `/usr/bin/file conftest.$ac_objext` in
+ *N32*)
+ emul="${emul}n32"
+ ;;
+ esac
+ LD="${LD-ld} -m $emul"
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly. Note that the listed cases only cover the
+ # situations where additional linker options are needed (such as when
+ # doing 32-bit compilation for a host where ld defaults to 64-bit, or
+ # vice versa); the common cases where no linker options are needed do
+ # not appear in the list.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -6967,9 +7363,19 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
LD="${LD-ld} -m elf_i386_fbsd"
;;
x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
+ case `/usr/bin/file conftest.o` in
+ *x86-64*)
+ LD="${LD-ld} -m elf32_x86_64"
+ ;;
+ *)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ esac
+ ;;
+ powerpc64le-*linux*)
+ LD="${LD-ld} -m elf32lppclinux"
;;
- ppc64-*linux*|powerpc64-*linux*)
+ powerpc64-*linux*)
LD="${LD-ld} -m elf32ppclinux"
;;
s390x-*linux*)
@@ -6988,7 +7394,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
x86_64-*linux*)
LD="${LD-ld} -m elf_x86_64"
;;
- ppc*-*linux*|powerpc*-*linux*)
+ powerpcle-*linux*)
+ LD="${LD-ld} -m elf64lppc"
+ ;;
+ powerpc-*linux*)
LD="${LD-ld} -m elf64ppc"
;;
s390*-*linux*|s390*-*tpf*)
@@ -7006,7 +7415,7 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
*-*-sco3.2v5*)
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
+ SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -belf"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
@@ -7046,13 +7455,14 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
$as_echo "$lt_cv_cc_needs_belf" >&6; }
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ if test yes != "$lt_cv_cc_needs_belf"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
+ CFLAGS=$SAVE_CFLAGS
fi
;;
*-*solaris*)
- # Find out which ABI we are using.
+ # Find out what ABI is being produced by ac_compile, and set linker
+ # options accordingly.
echo 'int i;' > conftest.$ac_ext
if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
(eval $ac_compile) 2>&5
@@ -7064,7 +7474,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
case $lt_cv_prog_gnu_ld in
yes*)
case $host in
- i?86-*-solaris*)
+ i?86-*-solaris*|x86_64-*-solaris*)
LD="${LD-ld} -m elf_x86_64"
;;
sparc*-*-solaris*)
@@ -7073,7 +7483,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
esac
# GNU ld 2.21 introduced _sol2 emulations. Use them if available.
if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
- LD="${LD-ld}_sol2"
+ LD=${LD-ld}_sol2
fi
;;
*)
@@ -7089,7 +7499,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; }
;;
esac
-need_locks="$enable_libtool_lock"
+need_locks=$enable_libtool_lock
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args.
@@ -7108,7 +7518,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7148,7 +7558,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_MANIFEST_TOOL="mt"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7200,7 +7610,7 @@ else
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5
$as_echo "$lt_cv_path_mainfest_tool" >&6; }
-if test "x$lt_cv_path_mainfest_tool" != xyes; then
+if test yes != "$lt_cv_path_mainfest_tool"; then
MANIFEST_TOOL=:
fi
@@ -7228,7 +7638,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7268,7 +7678,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7320,7 +7730,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7360,7 +7770,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_NMEDIT="nmedit"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7412,7 +7822,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7452,7 +7862,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_LIPO="lipo"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7504,7 +7914,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7544,7 +7954,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL="otool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7596,7 +8006,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7636,7 +8046,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OTOOL64="otool64"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -7703,7 +8113,7 @@ if ${lt_cv_apple_cc_single_mod+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
+ if test -z "$LT_MULTI_MODULE"; then
# By default we will add the -single_module flag. You can override
# by either setting the environment variable LT_MULTI_MODULE
# non-empty at configure time, or by adding -multi_module to the
@@ -7721,7 +8131,7 @@ else
cat conftest.err >&5
# Otherwise, if the output was created with a 0 exit code from
# the compiler, it worked.
- elif test -f libconftest.dylib && test $_lt_result -eq 0; then
+ elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
lt_cv_apple_cc_single_mod=yes
else
cat conftest.err >&5
@@ -7760,7 +8170,7 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
@@ -7789,7 +8199,7 @@ _LT_EOF
_lt_result=$?
if test -s conftest.err && $GREP force_load conftest.err; then
cat conftest.err >&5
- elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
+ elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
lt_cv_ld_force_load=yes
else
cat conftest.err >&5
@@ -7802,32 +8212,32 @@ fi
$as_echo "$lt_cv_ld_force_load" >&6; }
case $host_os in
rhapsody* | darwin1.[012])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
darwin*) # darwin 5.x on
# if running on 10.5 or later, the deployment target defaults
# to the OS version, if on x86, and 10.4, the deployment
# target defaults to 10.4. Don't you love it?
case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
10.0,*86*-darwin8*|10.0,*-darwin[91]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
+ 10.[012][,.]*)
+ _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
esac
;;
esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ if test yes = "$lt_cv_apple_cc_single_mod"; then
_lt_dar_single_mod='$single_module'
fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ if test yes = "$lt_cv_ld_exported_symbols_list"; then
+ _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
fi
- if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
+ if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
_lt_dsymutil='~$DSYMUTIL $lib || :'
else
_lt_dsymutil=
@@ -7835,6 +8245,41 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
;;
esac
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -8141,7 +8586,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_AS="${ac_tool_prefix}as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8181,7 +8626,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_AS="as"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8233,7 +8678,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8273,7 +8718,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_DLLTOOL="dlltool"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8325,7 +8770,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8365,7 +8810,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_OBJDUMP="objdump"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -8436,14 +8881,14 @@ if test "${enable_shared+set}" = set; then :
*)
enable_shared=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_shared=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -8467,14 +8912,14 @@ if test "${enable_static+set}" = set; then :
*)
enable_static=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_static=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -8498,14 +8943,14 @@ if test "${with_pic+set}" = set; then :
*)
pic_mode=default
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for lt_pkg in $withval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$lt_pkg" = "X$lt_p"; then
pic_mode=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -8513,8 +8958,6 @@ else
fi
-test -z "$pic_mode" && pic_mode=default
-
@@ -8530,14 +8973,14 @@ if test "${enable_fast_install+set}" = set; then :
*)
enable_fast_install=no
# Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
for pkg in $enableval; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
if test "X$pkg" = "X$p"; then
enable_fast_install=yes
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
;;
esac
else
@@ -8551,11 +8994,63 @@ fi
+ shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[5-9]*,yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5
+$as_echo_n "checking which variant of shared library versioning to provide... " >&6; }
+
+# Check whether --with-aix-soname was given.
+if test "${with_aix_soname+set}" = set; then :
+ withval=$with_aix_soname; case $withval in
+ aix|svr4|both)
+ ;;
+ *)
+ as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname
+else
+ if ${lt_cv_with_aix_soname+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_with_aix_soname=aix
+fi
+
+ with_aix_soname=$lt_cv_with_aix_soname
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5
+$as_echo "$with_aix_soname" >&6; }
+ if test aix != "$with_aix_soname"; then
+ # For the AIX way of multilib, we name the shared archive member
+ # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+ # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+ # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+ # the AIX toolchain works better with OBJECT_MODE set (default 32).
+ if test 64 = "${OBJECT_MODE-32}"; then
+ shared_archive_member_spec=shr_64
+ else
+ shared_archive_member_spec=shr
+ fi
+ fi
+ ;;
+*)
+ with_aix_soname=aix
+ ;;
+esac
+
+
+
+
+
+
+
# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
+LIBTOOL_DEPS=$ltmain
# Always use our own libtool.
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
@@ -8604,7 +9099,7 @@ test -z "$LN_S" && LN_S="ln -s"
-if test -n "${ZSH_VERSION+set}" ; then
+if test -n "${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
@@ -8643,7 +9138,7 @@ aix3*)
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
+ if test set != "${COLLECT_NAMES+set}"; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -8654,14 +9149,14 @@ esac
ofile=libtool
can_build_shared=yes
-# All known linkers require a `.a' archive for static linking (except MSVC,
+# All known linkers require a '.a' archive for static linking (except MSVC,
# which needs '.lib').
libext=a
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+with_gnu_ld=$lt_cv_prog_gnu_ld
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
+old_CC=$CC
+old_CFLAGS=$CFLAGS
# Set sane defaults for various variables
test -z "$CC" && CC=cc
@@ -8670,15 +9165,8 @@ test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
test -z "$LD" && LD=ld
test -z "$ac_objext" && ac_objext=o
-for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
# Only perform the check for file, if the check method requires it
@@ -8693,22 +9181,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
;;
*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -f "$ac_dir/${ac_tool_prefix}file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
$EGREP "$file_magic_regex" > /dev/null; then
:
@@ -8731,13 +9219,13 @@ _LT_EOF
break
fi
done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
;;
esac
fi
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
$as_echo "$MAGIC_CMD" >&6; }
@@ -8759,22 +9247,22 @@ if ${lt_cv_path_MAGIC_CMD+:} false; then :
else
case $MAGIC_CMD in
[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
;;
*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -f "$ac_dir/file"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"file"
if test -n "$file_magic_test_file"; then
case $deplibs_check_method in
"file_magic "*)
file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
$EGREP "$file_magic_regex" > /dev/null; then
:
@@ -8797,13 +9285,13 @@ _LT_EOF
break
fi
done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
;;
esac
fi
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
if test -n "$MAGIC_CMD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
$as_echo "$MAGIC_CMD" >&6; }
@@ -8824,7 +9312,7 @@ esac
# Use C for the default configuration in the libtool script
-lt_save_CC="$CC"
+lt_save_CC=$CC
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -8886,7 +9374,7 @@ if test -n "$compiler"; then
lt_prog_compiler_no_builtin_flag=
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
case $cc_basename in
nvcc*)
lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;;
@@ -8902,7 +9390,7 @@ else
lt_cv_prog_compiler_rtti_exceptions=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="-fno-rtti -fno-exceptions"
+ lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -8932,7 +9420,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then
lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
else
:
@@ -8950,17 +9438,18 @@ lt_prog_compiler_pic=
lt_prog_compiler_static=
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_static='-static'
case $host_os in
aix*)
# All AIX code is PIC.
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static='-Bstatic'
fi
+ lt_prog_compiler_pic='-fPIC'
;;
amigaos*)
@@ -8971,8 +9460,8 @@ lt_prog_compiler_static=
;;
m68k)
# FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
;;
esac
@@ -8988,6 +9477,11 @@ lt_prog_compiler_static=
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
;;
darwin* | rhapsody*)
@@ -9058,7 +9552,7 @@ lt_prog_compiler_static=
case $host_os in
aix*)
lt_prog_compiler_wl='-Wl,'
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static='-Bstatic'
else
@@ -9066,10 +9560,29 @@ lt_prog_compiler_static=
fi
;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ case $cc_basename in
+ nagfor*)
+ # NAG Fortran compiler
+ lt_prog_compiler_wl='-Wl,-Wl,,'
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ esac
+ ;;
+
mingw* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static='$wl-static'
+ ;;
+ esac
;;
hpux9* | hpux10* | hpux11*)
@@ -9085,7 +9598,7 @@ lt_prog_compiler_static=
;;
esac
# Is there a better lt_prog_compiler_static that works with the bundled CC?
- lt_prog_compiler_static='${wl}-a ${wl}archive'
+ lt_prog_compiler_static='$wl-a ${wl}archive'
;;
irix5* | irix6* | nonstopux*)
@@ -9094,9 +9607,9 @@ lt_prog_compiler_static=
lt_prog_compiler_static='-non_shared'
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
- # old Intel for x86_64 which still supported -KPIC.
+ # old Intel for x86_64, which still supported -KPIC.
ecc*)
lt_prog_compiler_wl='-Wl,'
lt_prog_compiler_pic='-KPIC'
@@ -9121,6 +9634,12 @@ lt_prog_compiler_static=
lt_prog_compiler_pic='-PIC'
lt_prog_compiler_static='-Bstatic'
;;
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group compilers (*not* the Pentium gcc compiler,
# which looks to be a dead project)
@@ -9218,7 +9737,7 @@ lt_prog_compiler_static=
;;
sysv4*MP*)
- if test -d /usr/nec ;then
+ if test -d /usr/nec; then
lt_prog_compiler_pic='-Kconform_pic'
lt_prog_compiler_static='-Bstatic'
fi
@@ -9247,7 +9766,7 @@ lt_prog_compiler_static=
fi
case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
+ # For platforms that do not support PIC, -DPIC is meaningless:
*djgpp*)
lt_prog_compiler_pic=
;;
@@ -9279,7 +9798,7 @@ else
lt_cv_prog_compiler_pic_works=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -9309,7 +9828,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_pic_works"; then
case $lt_prog_compiler_pic in
"" | " "*) ;;
*) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
@@ -9341,7 +9860,7 @@ if ${lt_cv_prog_compiler_static_works+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works=no
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -9360,13 +9879,13 @@ else
fi
fi
$RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+if test yes = "$lt_cv_prog_compiler_static_works"; then
:
else
lt_prog_compiler_static=
@@ -9486,8 +10005,8 @@ $as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then
# do not overwrite the value of need_locks provided by the user
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
$as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -9499,9 +10018,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
ln conftest.a conftest.b 2>/dev/null && hard_links=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
$as_echo "$hard_links" >&6; }
- if test "$hard_links" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ if test no = "$hard_links"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
@@ -9544,9 +10063,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# included in the symbol list
include_expsyms=
# exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
+ # it will be wrapped by ' (' and ')$', so one must not match beginning or
+ # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
+ # as well as any symbol that contains 'd'.
exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
# Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
# platforms (ab)use it in PIC code, but their linkers get confused if
@@ -9561,7 +10080,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
- if test "$GCC" != yes; then
+ if test yes != "$GCC"; then
with_gnu_ld=no
fi
;;
@@ -9569,7 +10088,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# we just hope/assume this is gcc and not c89 (= MSVC++)
with_gnu_ld=yes
;;
- openbsd*)
+ openbsd* | bitrig*)
with_gnu_ld=no
;;
esac
@@ -9579,7 +10098,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
# On some targets, GNU ld is compatible enough with the native linker
# that we're better off using the native interface for both.
lt_use_gnu_ld_interface=no
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
case $host_os in
aix*)
# The AIX port of GNU ld has always aspired to compatibility
@@ -9601,24 +10120,24 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
esac
fi
- if test "$lt_use_gnu_ld_interface" = yes; then
+ if test yes = "$lt_use_gnu_ld_interface"; then
# If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
+ wlarc='$wl'
# Set some defaults for GNU ld with shared library support. These
# are reset later if shared libraries are not supported. Putting them
# here allows them to be overridden if necessary.
runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec='$wl--export-dynamic'
# ancient GNU ld didn't support --whole-archive et. al.
if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
else
whole_archive_flag_spec=
fi
supports_anon_versioning=no
- case `$LD -v 2>&1` in
+ case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in
*GNU\ gold*) supports_anon_versioning=yes ;;
*\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
*\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
@@ -9631,7 +10150,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
case $host_os in
aix[3-9]*)
# On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
+ if test ia64 != "$host_cpu"; then
ld_shlibs=no
cat <<_LT_EOF 1>&2
@@ -9650,7 +10169,7 @@ _LT_EOF
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
archive_expsym_cmds=''
;;
m68k)
@@ -9666,7 +10185,7 @@ _LT_EOF
allow_undefined_flag=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
else
ld_shlibs=no
fi
@@ -9676,7 +10195,7 @@ _LT_EOF
# _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
- export_dynamic_flag_spec='${wl}--export-all-symbols'
+ export_dynamic_flag_spec='$wl--export-all-symbols'
allow_undefined_flag=unsupported
always_export_symbols=no
enable_shared_with_static_runtimes=yes
@@ -9684,61 +10203,89 @@ _LT_EOF
exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
ld_shlibs=no
fi
;;
haiku*)
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
link_all_deplibs=yes
;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
interix[3-9]*)
hardcode_direct=no
hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
# Instead, shared libraries are loaded at an image base (0x10000000 by
# default) and relocated if they conflict, which is a slow very memory
# consuming and fragmenting process. To avoid this, we pick a random,
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
+ if test linux-dietlibc = "$host_os"; then
case $cc_basename in
diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
esac
fi
if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
+ && test no = "$tmp_diet"
then
tmp_addflag=' $pic_flag'
tmp_sharedflag='-shared'
case $cc_basename,$host_cpu in
pgcc*) # Portland Group C compiler
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag'
;;
pgf77* | pgf90* | pgf95* | pgfortran*)
# Portland Group f77 and f90 compilers
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
tmp_addflag=' $pic_flag -Mnomain' ;;
ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
tmp_addflag=' -i_dynamic' ;;
@@ -9749,42 +10296,47 @@ _LT_EOF
lf95*) # Lahey Fortran 8.1
whole_archive_flag_spec=
tmp_sharedflag='--shared' ;;
+ nagfor*) # NAGFOR 5.3
+ tmp_sharedflag='-Wl,-shared' ;;
xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
tmp_sharedflag='-qmkshrobj'
tmp_addflag= ;;
nvcc*) # Cuda Compiler Driver 2.2
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
compiler_needs_object=yes
;;
esac
case `$CC -V 2>&1 | sed 5q` in
*Sun\ C*) # Sun C 5.9
- whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
compiler_needs_object=yes
tmp_sharedflag='-G' ;;
*Sun\ F*) # Sun Fortran 8.3
tmp_sharedflag='-G' ;;
esac
- archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
+ if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
case $cc_basename in
+ tcc*)
+ export_dynamic_flag_spec='-rdynamic'
+ ;;
xlf* | bgf* | bgxlf* | mpixlf*)
# IBM XL Fortran 10.1 on PPC cannot create shared libs itself
whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
+ if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
fi
;;
esac
@@ -9798,8 +10350,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
@@ -9817,8 +10369,8 @@ _LT_EOF
_LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
@@ -9830,7 +10382,7 @@ _LT_EOF
ld_shlibs=no
cat <<_LT_EOF 1>&2
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
*** reliably create shared libraries on SCO systems. Therefore, libtool
*** is disabling shared libraries support. We urge you to upgrade GNU
*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
@@ -9845,9 +10397,9 @@ _LT_EOF
# DT_RUNPATH tag from executables and libraries. But doing so
# requires that you compile everything twice, which is a pain.
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
@@ -9864,15 +10416,15 @@ _LT_EOF
*)
if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
;;
esac
- if test "$ld_shlibs" = no; then
+ if test no = "$ld_shlibs"; then
runpath_var=
hardcode_libdir_flag_spec=
export_dynamic_flag_spec=
@@ -9888,7 +10440,7 @@ _LT_EOF
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
hardcode_minus_L=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
# Neither direct hardcoding nor static linking is supported with a
# broken collect2.
hardcode_direct=unsupported
@@ -9896,34 +10448,57 @@ _LT_EOF
;;
aix[4-9]*)
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
- no_entry_flag=""
+ no_entry_flag=
else
# If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- # Also, AIX nm treats weak defined symbols like other global
- # defined symbols, whereas GNU nm marks them as "W".
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
- if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
aix_use_runtimelinking=yes
break
fi
done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
;;
esac
@@ -9942,13 +10517,21 @@ _LT_EOF
hardcode_direct_absolute=yes
hardcode_libdir_separator=':'
link_all_deplibs=yes
- file_list_spec='${wl}-f,'
+ file_list_spec='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # traditional, no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ ;;
+ esac
- if test "$GCC" = yes; then
+ if test yes = "$GCC"; then
case $host_os in aix4.[012]|aix4.[012].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
+ collect2name=`$CC -print-prog-name=collect2`
if test -f "$collect2name" &&
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
then
@@ -9967,35 +10550,42 @@ _LT_EOF
;;
esac
shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag="$shared_flag "'$wl-G'
fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
else
# not using gcc
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
else
- shared_flag='${wl}-bM:SRE'
+ shared_flag='$wl-bM:SRE'
fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
fi
fi
- export_dynamic_flag_spec='${wl}-bexpall'
+ export_dynamic_flag_spec='$wl-bexpall'
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to export.
always_export_symbols=yes
- if test "$aix_use_runtimelinking" = yes; then
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
allow_undefined_flag='-berok'
# Determine the default libpath from the value encoded in an
# empty executable.
- if test "${lt_cv_aix_libpath+set}" = set; then
+ if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath_+:} false; then :
@@ -10030,7 +10620,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
- lt_cv_aix_libpath_="/usr/lib:/lib"
+ lt_cv_aix_libpath_=/usr/lib:/lib
fi
fi
@@ -10038,17 +10628,17 @@ fi
aix_libpath=$lt_cv_aix_libpath_
fi
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ if test ia64 = "$host_cpu"; then
+ hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib'
allow_undefined_flag="-z nodefs"
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an
# empty executable.
- if test "${lt_cv_aix_libpath+set}" = set; then
+ if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath_+:} false; then :
@@ -10083,7 +10673,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath_"; then
- lt_cv_aix_libpath_="/usr/lib:/lib"
+ lt_cv_aix_libpath_=/usr/lib:/lib
fi
fi
@@ -10091,21 +10681,33 @@ fi
aix_libpath=$lt_cv_aix_libpath_
fi
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
- no_undefined_flag=' ${wl}-bernotok'
- allow_undefined_flag=' ${wl}-berok'
- if test "$with_gnu_ld" = yes; then
+ no_undefined_flag=' $wl-bernotok'
+ allow_undefined_flag=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
# We only use this code for GNU lds that support --whole-archive.
- whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive'
else
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec='$convenience'
fi
archive_cmds_need_lc=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d'
fi
fi
;;
@@ -10114,7 +10716,7 @@ fi
case $host_cpu in
powerpc)
# see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
archive_expsym_cmds=''
;;
m68k)
@@ -10144,16 +10746,17 @@ fi
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
+ shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
- else
- sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
+ archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, )='true'
enable_shared_with_static_runtimes=yes
@@ -10162,18 +10765,18 @@ fi
# Don't use ranlib
old_postinstall_cmds='chmod 644 $oldlib'
postlink_cmds='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile="$lt_outputfile.exe"
- lt_tool_outputfile="$lt_tool_outputfile.exe"
- ;;
- esac~
- if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
;;
*)
# Assume MSVC wrapper
@@ -10182,7 +10785,7 @@ fi
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
+ shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
# The linker will automatically build a .lib file if we build a DLL.
@@ -10201,24 +10804,24 @@ fi
hardcode_direct=no
hardcode_automatic=yes
hardcode_shlibpath_var=unsupported
- if test "$lt_cv_ld_force_load" = "yes"; then
- whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ if test yes = "$lt_cv_ld_force_load"; then
+ whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
else
whole_archive_flag_spec=''
fi
link_all_deplibs=yes
- allow_undefined_flag="$_lt_dar_allow_undefined"
+ allow_undefined_flag=$_lt_dar_allow_undefined
case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
*) _lt_dar_can_shared=$GCC ;;
esac
- if test "$_lt_dar_can_shared" = "yes"; then
+ if test yes = "$_lt_dar_can_shared"; then
output_verbose_link_cmd=func_echo_all
- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
else
ld_shlibs=no
@@ -10260,33 +10863,33 @@ fi
;;
hpux9*)
- if test "$GCC" = yes; then
- archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ if test yes = "$GCC"; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
else
- archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
fi
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
- export_dynamic_flag_spec='${wl}-E'
+ export_dynamic_flag_spec='$wl-E'
;;
hpux10*)
- if test "$GCC" = yes && test "$with_gnu_ld" = no; then
- archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes,no = "$GCC,$with_gnu_ld"; then
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
+ export_dynamic_flag_spec='$wl-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
hardcode_minus_L=yes
@@ -10294,25 +10897,25 @@ fi
;;
hpux11*)
- if test "$GCC" = yes && test "$with_gnu_ld" = no; then
+ if test yes,no = "$GCC,$with_gnu_ld"; then
case $host_cpu in
hppa*64*)
- archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
else
case $host_cpu in
hppa*64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
ia64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
@@ -10324,7 +10927,7 @@ if ${lt_cv_prog_compiler__b+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler__b=no
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -b"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -10343,14 +10946,14 @@ else
fi
fi
$RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5
$as_echo "$lt_cv_prog_compiler__b" >&6; }
-if test x"$lt_cv_prog_compiler__b" = xyes; then
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+if test yes = "$lt_cv_prog_compiler__b"; then
+ archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
fi
@@ -10358,8 +10961,8 @@ fi
;;
esac
fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec='$wl+b $wl$libdir'
hardcode_libdir_separator=:
case $host_cpu in
@@ -10370,7 +10973,7 @@ fi
*)
hardcode_direct=yes
hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
+ export_dynamic_flag_spec='$wl-E'
# hardcode_minus_L: Not really in the search PATH,
# but as the default location of the library.
@@ -10381,8 +10984,8 @@ fi
;;
irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
# Try to use the -exported_symbol ld option, if it does not
# work, assume that -exports_file does not work either and
# implicitly export all symbols.
@@ -10392,8 +10995,8 @@ $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >
if ${lt_cv_irix_exported_symbol+:} false; then :
$as_echo_n "(cached) " >&6
else
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int foo (void) { return 0; }
@@ -10405,24 +11008,34 @@ else
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5
$as_echo "$lt_cv_irix_exported_symbol" >&6; }
- if test "$lt_cv_irix_exported_symbol" = yes; then
- archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ if test yes = "$lt_cv_irix_exported_symbol"; then
+ archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib'
fi
else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib'
fi
archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
hardcode_libdir_separator=:
inherit_rpath=yes
link_all_deplibs=yes
;;
+ linux*)
+ case $cc_basename in
+ tcc*)
+ # Fabrice Bellard et al's Tiny C Compiler
+ ld_shlibs=yes
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
netbsd*)
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
@@ -10437,7 +11050,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
newsos6)
archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
hardcode_direct=yes
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
hardcode_libdir_separator=:
hardcode_shlibpath_var=no
;;
@@ -10445,27 +11058,19 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
*nto* | *qnx*)
;;
- openbsd*)
+ openbsd* | bitrig*)
if test -f /usr/libexec/ld.so; then
hardcode_direct=yes
hardcode_shlibpath_var=no
hardcode_direct_absolute=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
+ export_dynamic_flag_spec='$wl-E'
else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='$wl-rpath,$libdir'
fi
else
ld_shlibs=no
@@ -10476,33 +11081,53 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
hardcode_libdir_flag_spec='-L$libdir'
hardcode_minus_L=yes
allow_undefined_flag=unsupported
- archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ shrext_cmds=.dll
+ archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes=yes
;;
osf3*)
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
else
allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
fi
archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
hardcode_libdir_separator=:
;;
osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ if test yes = "$GCC"; then
+ allow_undefined_flag=' $wl-expect_unresolved $wl\*'
+ archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
+ hardcode_libdir_flag_spec='$wl-rpath $wl$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp'
# Both c and cxx compiler support -rpath directly
hardcode_libdir_flag_spec='-rpath $libdir'
@@ -10513,24 +11138,24 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
solaris*)
no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes = "$GCC"; then
+ wlarc='$wl'
+ archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
else
case `$CC -V 2>&1` in
*"Compilers 5.0"*)
wlarc=''
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
;;
*)
- wlarc='${wl}'
- archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ wlarc='$wl'
+ archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
;;
esac
fi
@@ -10540,11 +11165,11 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
# The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but understands '-z linker_flag'. GCC discards it without '$wl',
# but is careful enough not to reorder.
# Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ if test yes = "$GCC"; then
+ whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
else
whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
fi
@@ -10554,10 +11179,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
sunos4*)
- if test "x$host_vendor" = xsequent; then
+ if test sequent = "$host_vendor"; then
# Use $CC to link under sequent, because it throws in some extra .o
# files that make .init and .fini sections work.
- archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
else
archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
fi
@@ -10606,43 +11231,43 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag='${wl}-z,text'
+ no_undefined_flag='$wl-z,text'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
runpath_var='LD_RUN_PATH'
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
+ # Note: We CANNOT use -z defs as we might desire, because we do not
# link with -lc, and that would cause any symbols used from libc to
# always be unresolved, which means just about no library would
# ever link correctly. If we're not using GNU ld we use -z text
# though, which does catch some bad symbols but isn't as heavy-handed
# as -z defs.
- no_undefined_flag='${wl}-z,text'
- allow_undefined_flag='${wl}-z,nodefs'
+ no_undefined_flag='$wl-z,text'
+ allow_undefined_flag='$wl-z,nodefs'
archive_cmds_need_lc=no
hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_flag_spec='$wl-R,$libdir'
hardcode_libdir_separator=':'
link_all_deplibs=yes
- export_dynamic_flag_spec='${wl}-Bexport'
+ export_dynamic_flag_spec='$wl-Bexport'
runpath_var='LD_RUN_PATH'
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ if test yes = "$GCC"; then
+ archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
fi
;;
@@ -10657,10 +11282,10 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
;;
esac
- if test x$host_vendor = xsni; then
+ if test sni = "$host_vendor"; then
case $host in
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- export_dynamic_flag_spec='${wl}-Blargedynsym'
+ export_dynamic_flag_spec='$wl-Blargedynsym'
;;
esac
fi
@@ -10668,7 +11293,7 @@ $as_echo "$lt_cv_irix_exported_symbol" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
$as_echo "$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
+test no = "$ld_shlibs" && can_build_shared=no
with_gnu_ld=$with_gnu_ld
@@ -10694,7 +11319,7 @@ x|xyes)
# Assume -lc should be added
archive_cmds_need_lc=yes
- if test "$enable_shared" = yes && test "$GCC" = yes; then
+ if test yes,yes = "$GCC,$enable_shared"; then
case $archive_cmds in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
@@ -10909,14 +11534,14 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
$as_echo_n "checking dynamic linker characteristics... " >&6; }
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
+ darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
+ *) lt_awk_arg='/^libraries:/' ;;
esac
case $host_os in
- mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;;
- *) lt_sed_strip_eq="s,=/,/,g" ;;
+ mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;;
+ *) lt_sed_strip_eq='s|=/|/|g' ;;
esac
lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
case $lt_search_path_spec in
@@ -10932,28 +11557,35 @@ if test "$GCC" = yes; then
;;
esac
# Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
+ # and add multilib dir if necessary...
lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ # ...but if some path component already ends with the multilib dir we assume
+ # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
+ case "$lt_multi_os_dir; $lt_search_path_spec " in
+ "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
+ lt_multi_os_dir=
+ ;;
+ esac
for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
+ if test -d "$lt_sys_path$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
+ elif test -n "$lt_multi_os_dir"; then
test -d "$lt_sys_path" && \
lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
fi
done
lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
+BEGIN {RS = " "; FS = "/|\n";} {
+ lt_foo = "";
+ lt_count = 0;
for (lt_i = NF; lt_i > 0; lt_i--) {
if ($lt_i != "" && $lt_i != ".") {
if ($lt_i == "..") {
lt_count++;
} else {
if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
+ lt_foo = "/" $lt_i lt_foo;
} else {
lt_count--;
}
@@ -10967,7 +11599,7 @@ BEGIN {RS=" "; FS="/|\n";} {
# for these hosts.
case $host_os in
mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
- $SED 's,/\([A-Za-z]:\),\1,g'` ;;
+ $SED 's|/\([A-Za-z]:\)|\1|g'` ;;
esac
sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
else
@@ -10976,7 +11608,7 @@ fi
library_names_spec=
libname_spec='lib$name'
soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
@@ -10993,14 +11625,16 @@ hardcode_into_libs=no
# flags to be left without arguments
need_version=unknown
+
+
case $host_os in
aix3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
shlibpath_var=LIBPATH
# AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
+ soname_spec='$libname$release$shared_ext$major'
;;
aix[4-9]*)
@@ -11008,41 +11642,91 @@ aix[4-9]*)
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
else
# With GCC up to 2.95.x, collect2 would create an import file
# for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
# development snapshots of GCC prior to 3.0.
case $host_os in
aix4 | aix4.[01] | aix4.[01].*)
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
:
else
can_build_shared=no
fi
;;
esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # Using Import Files as archive members, it is possible to support
+ # filename-based versioning of shared library archives on AIX. While
+ # this would work for both with and without runtime linking, it will
+ # prevent static linking of such archives. So we do filename-based
+ # shared library versioning with .so extension only, which is used
+ # when both runtime linking and shared linking is enabled.
+ # Unfortunately, runtime linking may impact performance, so we do
+ # not want this to be the default eventually. Also, we use the
+ # versioned .so libs for executables only if there is the -brtl
+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # To allow for filename-based versioning support, we need to create
+ # libNAME.so.V as an archive file, containing:
+ # *) an Import File, referring to the versioned filename of the
+ # archive as well as the shared archive member, telling the
+ # bitwidth (32 or 64) of that shared object, and providing the
+ # list of exported symbols of that shared object, eventually
+ # decorated with the 'weak' keyword
+ # *) the shared object with the F_LOADONLY flag set, to really avoid
+ # it being seen by the linker.
+ # At run time we better use the real file rather than another symlink,
+ # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+ case $with_aix_soname,$aix_use_runtimelinking in
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
+ aix,yes) # traditional libtool
+ dynamic_linker='AIX unversionable lib.so'
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
# instead of lib<name>.a to let people know that these are not
# typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ aix,no) # traditional AIX only
+ dynamic_linker='AIX lib.a(lib.so.V)'
# We preserve .a as extension for shared libraries through AIX4.2
# and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ svr4,*) # full svr4 only
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,yes) # both, prefer svr4
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # unpreferred sharedlib libNAME.a needs extra handling
+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,no) # both, prefer aix
+ dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+ ;;
+ esac
shlibpath_var=LIBPATH
fi
;;
@@ -11052,18 +11736,18 @@ amigaos*)
powerpc)
# Since July 2007 AmigaOS4 officially supports .so libraries.
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
;;
m68k)
library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
;;
esac
;;
beos*)
- library_names_spec='${libname}${shared_ext}'
+ library_names_spec='$libname$shared_ext'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
;;
@@ -11071,8 +11755,8 @@ beos*)
bsdi[45]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -11084,7 +11768,7 @@ bsdi[45]*)
cygwin* | mingw* | pw32* | cegcc*)
version_type=windows
- shrext_cmds=".dll"
+ shrext_cmds=.dll
need_version=no
need_lib_prefix=no
@@ -11093,8 +11777,8 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname~
@@ -11110,17 +11794,17 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
esac
dynamic_linker='Win32 ld.exe'
@@ -11129,8 +11813,8 @@ cygwin* | mingw* | pw32* | cegcc*)
*,cl*)
# Native MSVC
libname_spec='$name'
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- library_names_spec='${libname}.dll.lib'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
case $build_os in
mingw*)
@@ -11157,7 +11841,7 @@ cygwin* | mingw* | pw32* | cegcc*)
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
;;
*)
- sys_lib_search_path_spec="$LIB"
+ sys_lib_search_path_spec=$LIB
if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
# It is most probably a Windows format PATH.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -11170,8 +11854,8 @@ cygwin* | mingw* | pw32* | cegcc*)
esac
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname'
@@ -11184,7 +11868,7 @@ cygwin* | mingw* | pw32* | cegcc*)
*)
# Assume MSVC wrapper
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
esac
@@ -11197,8 +11881,8 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -11211,8 +11895,8 @@ dgux*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -11230,12 +11914,13 @@ freebsd* | dragonfly*)
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
need_version=no
need_lib_prefix=no
;;
freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
need_version=yes
;;
esac
@@ -11260,26 +11945,15 @@ freebsd* | dragonfly*)
esac
;;
-gnu*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
haiku*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LIBRARY_PATH
- shlibpath_overrides_runpath=yes
+ shlibpath_overrides_runpath=no
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
hardcode_into_libs=yes
;;
@@ -11297,14 +11971,15 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.so"
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32
else
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64
fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
hppa*64*)
shrext_cmds='.sl'
@@ -11312,8 +11987,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
@@ -11322,8 +11997,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=SHLIB_PATH
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
;;
esac
# HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -11336,8 +12011,8 @@ interix[3-9]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -11348,7 +12023,7 @@ irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
*)
- if test "$lt_cv_prog_gnu_ld" = yes; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
@@ -11356,8 +12031,8 @@ irix5* | irix6* | nonstopux*)
esac
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
case $host_os in
irix5* | nonstopux*)
libsuff= shlibsuff=
@@ -11376,8 +12051,8 @@ irix5* | irix6* | nonstopux*)
esac
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
hardcode_into_libs=yes
;;
@@ -11386,13 +12061,33 @@ linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -11436,7 +12131,12 @@ fi
# before this can be enabled.
hardcode_into_libs=yes
- # Append ld.so.conf contents to the search path
+ # Ideally, we could use ldconfig to report *all* directores which are
+ # searched for libraries, however this is still not possible. Aside from not
+ # being certain /sbin/ldconfig is available, command
+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+ # even though it is searched at run-time. Try to do the best guess by
+ # appending ld.so.conf contents (and includes) to the search path.
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
@@ -11456,12 +12156,12 @@ netbsd*)
need_lib_prefix=no
need_version=no
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
dynamic_linker='NetBSD ld.elf_so'
fi
shlibpath_var=LD_LIBRARY_PATH
@@ -11471,7 +12171,7 @@ netbsd*)
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
@@ -11480,58 +12180,68 @@ newsos6)
version_type=qnx
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='ldqnx.so'
;;
-openbsd*)
+openbsd* | bitrig*)
version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib
need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
else
- shlibpath_overrides_runpath=yes
+ need_version=yes
fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
;;
os2*)
libname_spec='$name'
- shrext_cmds=".dll"
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
+ # OS/2 can only load a DLL with a base name of 8 characters or less.
+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+ v=$($ECHO $release$versuffix | tr -d .-);
+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+ $ECHO $n$v`$shared_ext'
+ library_names_spec='${libname}_dll.$libext'
dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
+ shlibpath_var=BEGINLIBPATH
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
;;
osf3* | osf4* | osf5*)
version_type=osf
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
rdos*)
@@ -11542,8 +12252,8 @@ solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
@@ -11553,11 +12263,11 @@ solaris*)
sunos4*)
version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
need_lib_prefix=no
fi
need_version=yes
@@ -11565,8 +12275,8 @@ sunos4*)
sysv4 | sysv4.3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
case $host_vendor in
sni)
@@ -11587,24 +12297,24 @@ sysv4 | sysv4.3*)
;;
sysv4*MP*)
- if test -d /usr/nec ;then
+ if test -d /usr/nec; then
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
shlibpath_var=LD_LIBRARY_PATH
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
+ version_type=sco
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
else
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -11622,7 +12332,7 @@ tpf*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
@@ -11630,8 +12340,8 @@ tpf*)
uts4*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -11641,20 +12351,35 @@ uts4*)
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
fi
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
+
+
+
@@ -11751,15 +12476,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action=
if test -n "$hardcode_libdir_flag_spec" ||
test -n "$runpath_var" ||
- test "X$hardcode_automatic" = "Xyes" ; then
+ test yes = "$hardcode_automatic"; then
# We can hardcode non-existent directories.
- if test "$hardcode_direct" != no &&
+ if test no != "$hardcode_direct" &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
- test "$hardcode_minus_L" != no; then
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" &&
+ test no != "$hardcode_minus_L"; then
# Linking always hardcodes the temporary library directory.
hardcode_action=relink
else
@@ -11774,12 +12499,12 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
$as_echo "$hardcode_action" >&6; }
-if test "$hardcode_action" = relink ||
- test "$inherit_rpath" = yes; then
+if test relink = "$hardcode_action" ||
+ test yes = "$inherit_rpath"; then
# Fast installation is not supported
enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
# Fast installation is not necessary
enable_fast_install=needless
fi
@@ -11789,7 +12514,7 @@ fi
- if test "x$enable_dlopen" != xyes; then
+ if test yes != "$enable_dlopen"; then
enable_dlopen=unknown
enable_dlopen_self=unknown
enable_dlopen_self_static=unknown
@@ -11799,23 +12524,23 @@ else
case $host_os in
beos*)
- lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen=load_add_on
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
;;
mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen=LoadLibrary
lt_cv_dlopen_libs=
;;
cygwin*)
- lt_cv_dlopen="dlopen"
+ lt_cv_dlopen=dlopen
lt_cv_dlopen_libs=
;;
darwin*)
- # if libdl is installed we need to link against it
+ # if libdl is installed we need to link against it
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
if ${ac_cv_lib_dl_dlopen+:} false; then :
@@ -11853,10 +12578,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
else
- lt_cv_dlopen="dyld"
+ lt_cv_dlopen=dyld
lt_cv_dlopen_libs=
lt_cv_dlopen_self=yes
@@ -11864,10 +12589,18 @@ fi
;;
+ tpf*)
+ # Don't try to run any link tests for TPF. We know it's impossible
+ # because TPF is a cross-compiler, and we know how we open DSOs.
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=no
+ ;;
+
*)
ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
if test "x$ac_cv_func_shl_load" = xyes; then :
- lt_cv_dlopen="shl_load"
+ lt_cv_dlopen=shl_load
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
$as_echo_n "checking for shl_load in -ldld... " >&6; }
@@ -11906,11 +12639,11 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+ lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld
else
ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
if test "x$ac_cv_func_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen"
+ lt_cv_dlopen=dlopen
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
$as_echo_n "checking for dlopen in -ldl... " >&6; }
@@ -11949,7 +12682,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
$as_echo_n "checking for dlopen in -lsvld... " >&6; }
@@ -11988,7 +12721,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
if test "x$ac_cv_lib_svld_dlopen" = xyes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+ lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
$as_echo_n "checking for dld_link in -ldld... " >&6; }
@@ -12027,7 +12760,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
if test "x$ac_cv_lib_dld_dld_link" = xyes; then :
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+ lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld
fi
@@ -12048,21 +12781,21 @@ fi
;;
esac
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
+ if test no = "$lt_cv_dlopen"; then
enable_dlopen=no
+ else
+ enable_dlopen=yes
fi
case $lt_cv_dlopen in
dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+ save_CPPFLAGS=$CPPFLAGS
+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
- save_LIBS="$LIBS"
+ save_LIBS=$LIBS
LIBS="$lt_cv_dlopen_libs $LIBS"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
@@ -12070,7 +12803,7 @@ $as_echo_n "checking whether a program can dlopen itself... " >&6; }
if ${lt_cv_dlopen_self+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -12117,9 +12850,9 @@ else
# endif
#endif
-/* When -fvisbility=hidden is used, assume the code has been annotated
+/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
@@ -12149,7 +12882,7 @@ _LT_EOF
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -12169,14 +12902,14 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
$as_echo "$lt_cv_dlopen_self" >&6; }
- if test "x$lt_cv_dlopen_self" = xyes; then
+ if test yes = "$lt_cv_dlopen_self"; then
wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
if ${lt_cv_dlopen_self_static+:} false; then :
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then :
+ if test yes = "$cross_compiling"; then :
lt_cv_dlopen_self_static=cross
else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
@@ -12223,9 +12956,9 @@ else
# endif
#endif
-/* When -fvisbility=hidden is used, assume the code has been annotated
+/* When -fvisibility=hidden is used, assume the code has been annotated
correspondingly for the symbols needed. */
-#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
+#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
int fnord () __attribute__((visibility("default")));
#endif
@@ -12255,7 +12988,7 @@ _LT_EOF
(eval $ac_link) 2>&5
ac_status=$?
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then
(./conftest; exit; ) >&5 2>/dev/null
lt_status=$?
case x$lt_status in
@@ -12276,9 +13009,9 @@ fi
$as_echo "$lt_cv_dlopen_self_static" >&6; }
fi
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ LIBS=$save_LIBS
;;
esac
@@ -12322,7 +13055,7 @@ else
# FIXME - insert some real tests, host_os isn't really good enough
case $host_os in
darwin*)
- if test -n "$STRIP" ; then
+ if test -n "$STRIP"; then
striplib="$STRIP -x"
old_striplib="$STRIP -S"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -12350,7 +13083,7 @@ fi
- # Report which library types will actually be built
+ # Report what library types will actually be built
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
$as_echo_n "checking if libtool supports shared libraries... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
@@ -12358,13 +13091,13 @@ $as_echo "$can_build_shared" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
$as_echo_n "checking whether to build shared libraries... " >&6; }
- test "$can_build_shared" = "no" && enable_shared=no
+ test no = "$can_build_shared" && enable_shared=no
# On AIX, shared libraries and static libraries use the same namespace, and
# are all built from PIC.
case $host_os in
aix3*)
- test "$enable_shared" = yes && enable_static=no
+ test yes = "$enable_shared" && enable_static=no
if test -n "$RANLIB"; then
archive_cmds="$archive_cmds~\$RANLIB \$lib"
postinstall_cmds='$RANLIB $lib'
@@ -12372,8 +13105,12 @@ $as_echo_n "checking whether to build shared libraries... " >&6; }
;;
aix[4-9]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
+ if test ia64 != "$host_cpu"; then
+ case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
+ yes,aix,yes) ;; # shared object as lib.so file only
+ yes,svr4,*) ;; # shared object as lib.so archive member only
+ yes,*) enable_static=no ;; # shared object in lib.a archive as well
+ esac
fi
;;
esac
@@ -12383,7 +13120,7 @@ $as_echo "$enable_shared" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
$as_echo_n "checking whether to build static libraries... " >&6; }
# Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
+ test yes = "$enable_shared" || enable_static=yes
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
$as_echo "$enable_static" >&6; }
@@ -12397,7 +13134,7 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-CC="$lt_save_CC"
+CC=$lt_save_CC
@@ -12449,7 +13186,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -12493,7 +13230,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ac_ct_CXX="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -12689,8 +13426,8 @@ else
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
@@ -12725,16 +13462,16 @@ else
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
@@ -12743,8 +13480,8 @@ else
test "$am__universal" = false || continue
;;
nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
if test "x$enable_dependency_tracking" = xyes; then
continue
else
@@ -12752,7 +13489,7 @@ else
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
+ # This compiler won't grok '-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
@@ -12811,15 +13548,15 @@ fi
func_stripname_cnf ()
{
- case ${2} in
- .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
+ case $2 in
+ .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;;
+ *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;;
esac
} # func_stripname_cnf
- if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
+ if test -n "$CXX" && ( test no != "$CXX" &&
+ ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
+ (test g++ != "$CXX"))); then
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -12998,7 +13735,7 @@ objext_CXX=$objext
# the CXX compiler isn't working. Some variables (like enable_shared)
# are currently assumed to apply to all compilers on this platform,
# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
+if test yes != "$_lt_caught_CXX_error"; then
# Code to be used in simple compile tests
lt_simple_compile_test_code="int some_variable = 0;"
@@ -13059,46 +13796,39 @@ $RM -r conftest*
CFLAGS=$CXXFLAGS
compiler=$CC
compiler_CXX=$CC
- for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+ func_cc_basename $compiler
+cc_basename=$func_cc_basename_result
if test -n "$compiler"; then
# We don't want -fno-exception when compiling C++ code, so set the
# no_builtin_flag separately
- if test "$GXX" = yes; then
+ if test yes = "$GXX"; then
lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
else
lt_prog_compiler_no_builtin_flag_CXX=
fi
- if test "$GXX" = yes; then
+ if test yes = "$GXX"; then
# Set up default GNU C++ configuration
# Check whether --with-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then :
- withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+ withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes
else
with_gnu_ld=no
fi
ac_prog=ld
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
# Check if gcc -print-prog-name=ld gives a path.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
$as_echo_n "checking for ld used by $CC... " >&6; }
case $host in
*-*-mingw*)
- # gcc leaves a trailing carriage return which upsets mingw
+ # gcc leaves a trailing carriage return, which upsets mingw
ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
@@ -13112,7 +13842,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
done
- test -z "$LD" && LD="$ac_prog"
+ test -z "$LD" && LD=$ac_prog
;;
"")
# If it fails, then pretend we aren't using GCC.
@@ -13123,7 +13853,7 @@ $as_echo_n "checking for ld used by $CC... " >&6; }
with_gnu_ld=unknown
;;
esac
-elif test "$with_gnu_ld" = yes; then
+elif test yes = "$with_gnu_ld"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
$as_echo_n "checking for GNU ld... " >&6; }
else
@@ -13134,32 +13864,32 @@ if ${lt_cv_path_LD+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
+ lt_cv_path_LD=$ac_dir/$ac_prog
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some variants of GNU ld only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
*GNU* | *'with BFD'*)
- test "$with_gnu_ld" != no && break
+ test no != "$with_gnu_ld" && break
;;
*)
- test "$with_gnu_ld" != yes && break
+ test yes != "$with_gnu_ld" && break
;;
esac
fi
done
- IFS="$lt_save_ifs"
+ IFS=$lt_save_ifs
else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
+ lt_cv_path_LD=$LD # Let the user override the test with a path.
fi
fi
-LD="$lt_cv_path_LD"
+LD=$lt_cv_path_LD
if test -n "$LD"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
$as_echo "$LD" >&6; }
@@ -13195,22 +13925,22 @@ with_gnu_ld=$lt_cv_prog_gnu_ld
# Check if GNU C++ uses GNU ld as the underlying linker, since the
# archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ if test yes = "$with_gnu_ld"; then
+ archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
# If archive_cmds runs LD, not CC, wlarc should be empty
# XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
# investigate it a little bit more. (MM)
- wlarc='${wl}'
+ wlarc='$wl'
# ancient GNU ld didn't support --whole-archive et. al.
if eval "`$CC -print-prog-name=ld` --help 2>&1" |
$GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
else
whole_archive_flag_spec_CXX=
fi
@@ -13247,18 +13977,30 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
ld_shlibs_CXX=no
;;
aix[4-9]*)
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# On IA64, the linker does run time linking by default, so we don't
# have to do anything special.
aix_use_runtimelinking=no
exp_sym_flag='-Bexport'
- no_entry_flag=""
+ no_entry_flag=
else
aix_use_runtimelinking=no
# Test if we are trying to use run time linking or normal
# AIX style linking. If -brtl is somewhere in LDFLAGS, we
- # need to do runtime linking.
+ # have runtime linking enabled, and use it for executables.
+ # For shared libraries, we enable/disable runtime linking
+ # depending on the kind of the shared library created -
+ # when "with_aix_soname,aix_use_runtimelinking" is:
+ # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables
+ # "aix,yes" lib.so shared, rtl:yes, for executables
+ # lib.a static archive
+ # "both,no" lib.so.V(shr.o) shared, rtl:yes
+ # lib.a(lib.so.V) shared, rtl:no, for executables
+ # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a(lib.so.V) shared, rtl:no
+ # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables
+ # lib.a static archive
case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
for ld_flag in $LDFLAGS; do
case $ld_flag in
@@ -13268,6 +14010,13 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
;;
esac
done
+ if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
+ # With aix-soname=svr4, we create the lib.so.V shared archives only,
+ # so we don't have lib.a shared libs to link our executables.
+ # We have to force runtime linking in this case.
+ aix_use_runtimelinking=yes
+ LDFLAGS="$LDFLAGS -Wl,-brtl"
+ fi
;;
esac
@@ -13286,13 +14035,21 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
hardcode_direct_absolute_CXX=yes
hardcode_libdir_separator_CXX=':'
link_all_deplibs_CXX=yes
- file_list_spec_CXX='${wl}-f,'
+ file_list_spec_CXX='$wl-f,'
+ case $with_aix_soname,$aix_use_runtimelinking in
+ aix,*) ;; # no import file
+ svr4,* | *,yes) # use import file
+ # The Import File defines what to hardcode.
+ hardcode_direct_CXX=no
+ hardcode_direct_absolute_CXX=no
+ ;;
+ esac
- if test "$GXX" = yes; then
+ if test yes = "$GXX"; then
case $host_os in aix4.[012]|aix4.[012].*)
# We only want to do this on AIX 4.2 and lower, the check
# below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
+ collect2name=`$CC -print-prog-name=collect2`
if test -f "$collect2name" &&
strings "$collect2name" | $GREP resolve_lib_name >/dev/null
then
@@ -13310,36 +14067,44 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
fi
esac
shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag=$shared_flag' $wl-G'
fi
+ # Need to ensure runtime linking is disabled for the traditional
+ # shared library, or the linker may eventually find shared libraries
+ # /with/ Import File - we do not want to mix them.
+ shared_flag_aix='-shared'
+ shared_flag_svr4='-shared $wl-G'
else
# not using gcc
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
# chokes on -Wl,-G. The following line is correct:
shared_flag='-G'
else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
+ if test yes = "$aix_use_runtimelinking"; then
+ shared_flag='$wl-G'
else
- shared_flag='${wl}-bM:SRE'
+ shared_flag='$wl-bM:SRE'
fi
+ shared_flag_aix='$wl-bM:SRE'
+ shared_flag_svr4='$wl-G'
fi
fi
- export_dynamic_flag_spec_CXX='${wl}-bexpall'
+ export_dynamic_flag_spec_CXX='$wl-bexpall'
# It seems that -bexpall does not export symbols beginning with
# underscore (_), so it is better to generate a list of symbols to
# export.
always_export_symbols_CXX=yes
- if test "$aix_use_runtimelinking" = yes; then
+ if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
# Warning - without using the other runtime loading flags (-brtl),
# -berok will link without error, but may produce a broken library.
- allow_undefined_flag_CXX='-berok'
+ # The "-G" linker flag allows undefined symbols.
+ no_undefined_flag_CXX='-bernotok'
# Determine the default libpath from the value encoded in an empty
# executable.
- if test "${lt_cv_aix_libpath+set}" = set; then
+ if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath__CXX+:} false; then :
@@ -13374,7 +14139,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath__CXX"; then
- lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+ lt_cv_aix_libpath__CXX=/usr/lib:/lib
fi
fi
@@ -13382,18 +14147,18 @@ fi
aix_libpath=$lt_cv_aix_libpath__CXX
fi
- hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+ hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+ if test ia64 = "$host_cpu"; then
+ hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib'
allow_undefined_flag_CXX="-z nodefs"
- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols"
else
# Determine the default libpath from the value encoded in an
# empty executable.
- if test "${lt_cv_aix_libpath+set}" = set; then
+ if test set = "${lt_cv_aix_libpath+set}"; then
aix_libpath=$lt_cv_aix_libpath
else
if ${lt_cv_aix_libpath__CXX+:} false; then :
@@ -13428,7 +14193,7 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
if test -z "$lt_cv_aix_libpath__CXX"; then
- lt_cv_aix_libpath__CXX="/usr/lib:/lib"
+ lt_cv_aix_libpath__CXX=/usr/lib:/lib
fi
fi
@@ -13436,22 +14201,34 @@ fi
aix_libpath=$lt_cv_aix_libpath__CXX
fi
- hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+ hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath"
# Warning - without using the other run time loading flags,
# -berok will link without error, but may produce a broken library.
- no_undefined_flag_CXX=' ${wl}-bernotok'
- allow_undefined_flag_CXX=' ${wl}-berok'
- if test "$with_gnu_ld" = yes; then
+ no_undefined_flag_CXX=' $wl-bernotok'
+ allow_undefined_flag_CXX=' $wl-berok'
+ if test yes = "$with_gnu_ld"; then
# We only use this code for GNU lds that support --whole-archive.
- whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
else
# Exported symbols can be pulled into shared objects from archives
whole_archive_flag_spec_CXX='$convenience'
fi
archive_cmds_need_lc_CXX=yes
- # This is similar to how AIX traditionally builds its shared
- # libraries.
- archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
+ # -brtl affects multiple linker settings, -berok does not and is overridden later
+ compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`'
+ if test svr4 != "$with_aix_soname"; then
+ # This is similar to how AIX traditionally builds its shared
+ # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
+ archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
+ fi
+ if test aix != "$with_aix_soname"; then
+ archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
+ else
+ # used by -dlpreopen to get the symbols
+ archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir'
+ fi
+ archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d'
fi
fi
;;
@@ -13461,7 +14238,7 @@ fi
allow_undefined_flag_CXX=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME
- archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
else
ld_shlibs_CXX=no
fi
@@ -13489,57 +14266,58 @@ fi
# Tell ltmain to make .lib files, not .a files.
libext=lib
# Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
+ shrext_cmds=.dll
# FIXME: Setting linknames here is a bad hack.
- archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
- archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
- else
- $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
- fi~
- $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
- linknames='
+ archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
+ archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp "$export_symbols" "$output_objdir/$soname.def";
+ echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
+ else
+ $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
+ fi~
+ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
+ linknames='
# The linker will not automatically build a static lib if we build a DLL.
# _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true'
enable_shared_with_static_runtimes_CXX=yes
# Don't use ranlib
old_postinstall_cmds_CXX='chmod 644 $oldlib'
postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~
- lt_tool_outputfile="@TOOL_OUTPUT@"~
- case $lt_outputfile in
- *.exe|*.EXE) ;;
- *)
- lt_outputfile="$lt_outputfile.exe"
- lt_tool_outputfile="$lt_tool_outputfile.exe"
- ;;
- esac~
- func_to_tool_file "$lt_outputfile"~
- if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
- $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
- $RM "$lt_outputfile.manifest";
- fi'
+ lt_tool_outputfile="@TOOL_OUTPUT@"~
+ case $lt_outputfile in
+ *.exe|*.EXE) ;;
+ *)
+ lt_outputfile=$lt_outputfile.exe
+ lt_tool_outputfile=$lt_tool_outputfile.exe
+ ;;
+ esac~
+ func_to_tool_file "$lt_outputfile"~
+ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
+ $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
+ $RM "$lt_outputfile.manifest";
+ fi'
;;
*)
# g++
# _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec_CXX='-L$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-all-symbols'
+ export_dynamic_flag_spec_CXX='$wl--export-all-symbols'
allow_undefined_flag_CXX=unsupported
always_export_symbols_CXX=no
enable_shared_with_static_runtimes_CXX=yes
if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file, use it as
+ # is; otherwise, prepend EXPORTS...
+ archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
else
ld_shlibs_CXX=no
fi
@@ -13553,27 +14331,27 @@ fi
hardcode_direct_CXX=no
hardcode_automatic_CXX=yes
hardcode_shlibpath_var_CXX=unsupported
- if test "$lt_cv_ld_force_load" = "yes"; then
- whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
+ if test yes = "$lt_cv_ld_force_load"; then
+ whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
else
whole_archive_flag_spec_CXX=''
fi
link_all_deplibs_CXX=yes
- allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+ allow_undefined_flag_CXX=$_lt_dar_allow_undefined
case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
+ ifort*|nagfor*) _lt_dar_can_shared=yes ;;
*) _lt_dar_can_shared=$GCC ;;
esac
- if test "$_lt_dar_can_shared" = "yes"; then
+ if test yes = "$_lt_dar_can_shared"; then
output_verbose_link_cmd=func_echo_all
- archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
- if test "$lt_cv_apple_cc_single_mod" != "yes"; then
- archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
- archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil"
+ module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
+ archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil"
+ module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil"
+ if test yes != "$lt_cv_apple_cc_single_mod"; then
+ archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil"
+ archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil"
fi
else
@@ -13582,6 +14360,34 @@ fi
;;
+ os2*)
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ hardcode_minus_L_CXX=yes
+ allow_undefined_flag_CXX=unsupported
+ shrext_cmds=.dll
+ archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
+ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
+ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
+ $ECHO EXPORTS >> $output_objdir/$libname.def~
+ prefix_cmds="$SED"~
+ if test EXPORTS = "`$SED 1q $export_symbols`"; then
+ prefix_cmds="$prefix_cmds -e 1d";
+ fi~
+ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
+ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
+ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
+ emximp -o $lib $output_objdir/$libname.def'
+ old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
+ enable_shared_with_static_runtimes_CXX=yes
+ ;;
+
dgux*)
case $cc_basename in
ec++*)
@@ -13616,18 +14422,15 @@ fi
ld_shlibs_CXX=yes
;;
- gnu*)
- ;;
-
haiku*)
- archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
link_all_deplibs_CXX=yes
;;
hpux9*)
- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
hardcode_libdir_separator_CXX=:
- export_dynamic_flag_spec_CXX='${wl}-E'
+ export_dynamic_flag_spec_CXX='$wl-E'
hardcode_direct_CXX=yes
hardcode_minus_L_CXX=yes # Not in the search PATH,
# but as the default
@@ -13639,7 +14442,7 @@ fi
ld_shlibs_CXX=no
;;
aCC*)
- archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
@@ -13648,11 +14451,11 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
- if test "$GXX" = yes; then
- archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ if test yes = "$GXX"; then
+ archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
else
# FIXME: insert proper C++ library support
ld_shlibs_CXX=no
@@ -13662,15 +14465,15 @@ fi
;;
hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ if test no = "$with_gnu_ld"; then
+ hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir'
hardcode_libdir_separator_CXX=:
case $host_cpu in
hppa*64*|ia64*)
;;
*)
- export_dynamic_flag_spec_CXX='${wl}-E'
+ export_dynamic_flag_spec_CXX='$wl-E'
;;
esac
fi
@@ -13696,13 +14499,13 @@ fi
aCC*)
case $host_cpu in
hppa*64*)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
ia64*)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
*)
- archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
esac
# Commands to make compiler produce verbose output that lists
@@ -13713,20 +14516,20 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
+ if test yes = "$GXX"; then
+ if test no = "$with_gnu_ld"; then
case $host_cpu in
hppa*64*)
- archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
ia64*)
- archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
*)
- archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
;;
esac
fi
@@ -13741,22 +14544,22 @@ fi
interix[3-9]*)
hardcode_direct_CXX=no
hardcode_shlibpath_var_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}-E'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='$wl-E'
# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
# Instead, shared libraries are loaded at an image base (0x10000000 by
# default) and relocated if they conflict, which is a slow very memory
# consuming and fragmenting process. To avoid this, we pick a random,
# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
# time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
;;
irix5* | irix6*)
case $cc_basename in
CC*)
# SGI C++
- archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
# Archives containing C++ object files must be created using
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
@@ -13765,22 +14568,22 @@ fi
old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
;;
*)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ if test yes = "$GXX"; then
+ if test no = "$with_gnu_ld"; then
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
else
- archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib'
fi
fi
link_all_deplibs_CXX=yes
;;
esac
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
hardcode_libdir_separator_CXX=:
inherit_rpath_CXX=yes
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
KCC*)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -13788,8 +14591,8 @@ fi
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
@@ -13798,10 +14601,10 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
# Archives containing C++ object files must be created using
# "CC -Bstatic", where "CC" is the KAI C++ compiler.
@@ -13815,59 +14618,59 @@ fi
# earlier do not add the objects themselves.
case `$CC -V 2>&1` in
*"Version 7."*)
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
;;
*) # Version 8.0 or newer
tmp_idyn=
case $host_cpu in
ia64*) tmp_idyn=' -i_dynamic';;
esac
- archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
;;
esac
archive_cmds_need_lc_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+ whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive'
;;
pgCC* | pgcpp*)
# Portland Group C++ compiler
case `$CC -V` in
*pgCC\ [1-5].* | *pgcpp\ [1-5].*)
prelink_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
- compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
old_archive_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
- $RANLIB $oldlib'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
+ $RANLIB $oldlib'
archive_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
archive_expsym_cmds_CXX='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
;;
*) # Version 6 and above use weak symbols
- archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib'
;;
esac
- hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+ whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
;;
cxx*)
# Compaq C++
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols'
runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec_CXX='-rpath $libdir'
@@ -13881,18 +14684,18 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
;;
xl* | mpixl* | bgxl*)
# IBM XL 8.0 on PPC, with GNU ld
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
- archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
+ export_dynamic_flag_spec_CXX='$wl--export-dynamic'
+ archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
+ if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
fi
;;
*)
@@ -13900,10 +14703,10 @@ fi
*Sun\ C*)
# Sun C++ 5.9
no_undefined_flag_CXX=' -zdefs'
- archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols'
hardcode_libdir_flag_spec_CXX='-R$libdir'
- whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
+ whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive'
compiler_needs_object_CXX=yes
# Not sure whether something based on
@@ -13961,22 +14764,17 @@ fi
ld_shlibs_CXX=yes
;;
- openbsd2*)
- # C++ shared libraries are fairly broken
- ld_shlibs_CXX=no
- ;;
-
- openbsd*)
+ openbsd* | bitrig*)
if test -f /usr/libexec/ld.so; then
hardcode_direct_CXX=yes
hardcode_shlibpath_var_CXX=no
hardcode_direct_absolute_CXX=yes
archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- export_dynamic_flag_spec_CXX='${wl}-E'
- whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
+ archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib'
+ export_dynamic_flag_spec_CXX='$wl-E'
+ whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
fi
output_verbose_link_cmd=func_echo_all
else
@@ -13992,9 +14790,9 @@ fi
# KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking.
- archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir'
hardcode_libdir_separator_CXX=:
# Archives containing C++ object files must be created using
@@ -14012,17 +14810,17 @@ fi
cxx*)
case $host in
osf3*)
- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
+ archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
;;
*)
allow_undefined_flag_CXX=' -expect_unresolved \*'
- archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib'
archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
- $RM $lib.exp'
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~
+ $RM $lib.exp'
hardcode_libdir_flag_spec_CXX='-rpath $libdir'
;;
esac
@@ -14037,21 +14835,21 @@ fi
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
;;
*)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ if test yes,no = "$GXX,$with_gnu_ld"; then
+ allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*'
case $host in
osf3*)
- archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
;;
*)
- archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib'
;;
esac
- hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir'
hardcode_libdir_separator_CXX=:
# Commands to make compiler produce verbose output that lists
@@ -14097,9 +14895,9 @@ fi
# Sun C++ 4.2, 5.x and Centerline C++
archive_cmds_need_lc_CXX=yes
no_undefined_flag_CXX=' -zdefs'
- archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
hardcode_libdir_flag_spec_CXX='-R$libdir'
hardcode_shlibpath_var_CXX=no
@@ -14107,7 +14905,7 @@ fi
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
# The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'.
+ # but understands '-z linker_flag'.
# Supported since Solaris 2.6 (maybe 2.5.1?)
whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
;;
@@ -14124,30 +14922,30 @@ fi
;;
gcx*)
# Green Hills C++ Compiler
- archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
# The C++ compiler must be used to create the archive.
old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
;;
*)
# GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+ if test yes,no = "$GXX,$with_gnu_ld"; then
+ no_undefined_flag_CXX=' $wl-z ${wl}defs'
if $CC --version | $GREP -v '^2\.7' > /dev/null; then
- archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # g++ 2.7 appears to require '-G' NOT '-shared' on this
# platform.
- archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
@@ -14155,11 +14953,11 @@ fi
output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
fi
- hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+ hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir'
case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
- whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
;;
esac
fi
@@ -14168,52 +14966,52 @@ fi
;;
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag_CXX='${wl}-z,text'
+ no_undefined_flag_CXX='$wl-z,text'
archive_cmds_need_lc_CXX=no
hardcode_shlibpath_var_CXX=no
runpath_var='LD_RUN_PATH'
case $cc_basename in
CC*)
- archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
*)
- archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
;;
sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
+ # Note: We CANNOT use -z defs as we might desire, because we do not
# link with -lc, and that would cause any symbols used from libc to
# always be unresolved, which means just about no library would
# ever link correctly. If we're not using GNU ld we use -z text
# though, which does catch some bad symbols but isn't as heavy-handed
# as -z defs.
- no_undefined_flag_CXX='${wl}-z,text'
- allow_undefined_flag_CXX='${wl}-z,nodefs'
+ no_undefined_flag_CXX='$wl-z,text'
+ allow_undefined_flag_CXX='$wl-z,nodefs'
archive_cmds_need_lc_CXX=no
hardcode_shlibpath_var_CXX=no
- hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+ hardcode_libdir_flag_spec_CXX='$wl-R,$libdir'
hardcode_libdir_separator_CXX=':'
link_all_deplibs_CXX=yes
- export_dynamic_flag_spec_CXX='${wl}-Bexport'
+ export_dynamic_flag_spec_CXX='$wl-Bexport'
runpath_var='LD_RUN_PATH'
case $cc_basename in
CC*)
- archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~
- '"$old_archive_cmds_CXX"
+ '"$old_archive_cmds_CXX"
reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~
- '"$reload_cmds_CXX"
+ '"$reload_cmds_CXX"
;;
*)
- archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
;;
esac
;;
@@ -14245,10 +15043,10 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
$as_echo "$ld_shlibs_CXX" >&6; }
- test "$ld_shlibs_CXX" = no && can_build_shared=no
+ test no = "$ld_shlibs_CXX" && can_build_shared=no
- GCC_CXX="$GXX"
- LD_CXX="$LD"
+ GCC_CXX=$GXX
+ LD_CXX=$LD
## CAVEAT EMPTOR:
## There is no encapsulation within the following macros, do not change
@@ -14292,13 +15090,13 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
pre_test_object_deps_done=no
for p in `eval "$output_verbose_link_cmd"`; do
- case ${prev}${p} in
+ case $prev$p in
-L* | -R* | -l*)
# Some compilers place space between "-{L,R}" and the path.
# Remove the space.
- if test $p = "-L" ||
- test $p = "-R"; then
+ if test x-L = "$p" ||
+ test x-R = "$p"; then
prev=$p
continue
fi
@@ -14314,16 +15112,16 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
case $p in
=*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
esac
- if test "$pre_test_object_deps_done" = no; then
- case ${prev} in
+ if test no = "$pre_test_object_deps_done"; then
+ case $prev in
-L | -R)
# Internal compiler library paths should come after those
# provided the user. The postdeps already come after the
# user supplied libs so there is no need to process them.
if test -z "$compiler_lib_search_path_CXX"; then
- compiler_lib_search_path_CXX="${prev}${p}"
+ compiler_lib_search_path_CXX=$prev$p
else
- compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+ compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p"
fi
;;
# The "-l" case would never come before the object being
@@ -14331,9 +15129,9 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
esac
else
if test -z "$postdeps_CXX"; then
- postdeps_CXX="${prev}${p}"
+ postdeps_CXX=$prev$p
else
- postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+ postdeps_CXX="${postdeps_CXX} $prev$p"
fi
fi
prev=
@@ -14348,15 +15146,15 @@ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
continue
fi
- if test "$pre_test_object_deps_done" = no; then
+ if test no = "$pre_test_object_deps_done"; then
if test -z "$predep_objects_CXX"; then
- predep_objects_CXX="$p"
+ predep_objects_CXX=$p
else
predep_objects_CXX="$predep_objects_CXX $p"
fi
else
if test -z "$postdep_objects_CXX"; then
- postdep_objects_CXX="$p"
+ postdep_objects_CXX=$p
else
postdep_objects_CXX="$postdep_objects_CXX $p"
fi
@@ -14386,51 +15184,6 @@ interix[3-9]*)
postdep_objects_CXX=
postdeps_CXX=
;;
-
-linux*)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
-
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- if test "$solaris_use_stlport4" != yes; then
- postdeps_CXX='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-
-solaris*)
- case $cc_basename in
- CC* | sunCC*)
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- # Adding this requires a known-good setup of shared libraries for
- # Sun compiler versions before 5.6, else PIC objects from an old
- # archive will be linked into the output, leading to subtle bugs.
- if test "$solaris_use_stlport4" != yes; then
- postdeps_CXX='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
esac
@@ -14439,7 +15192,7 @@ case " $postdeps_CXX " in
esac
compiler_lib_search_dirs_CXX=
if test -n "${compiler_lib_search_path_CXX}"; then
- compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'`
fi
@@ -14478,17 +15231,18 @@ lt_prog_compiler_static_CXX=
# C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
+ if test yes = "$GXX"; then
lt_prog_compiler_wl_CXX='-Wl,'
lt_prog_compiler_static_CXX='-static'
case $host_os in
aix*)
# All AIX code is PIC.
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static_CXX='-Bstatic'
fi
+ lt_prog_compiler_pic_CXX='-fPIC'
;;
amigaos*)
@@ -14499,8 +15253,8 @@ lt_prog_compiler_static_CXX=
;;
m68k)
# FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
+ # adding the '-m68020' flag to GCC prevents building anything better,
+ # like '-m68040'.
lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
;;
esac
@@ -14515,6 +15269,11 @@ lt_prog_compiler_static_CXX=
# Although the cygwin gcc ignores -fPIC, still need this for old-style
# (--disable-auto-import) libraries
lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
+ case $host_os in
+ os2*)
+ lt_prog_compiler_static_CXX='$wl-static'
+ ;;
+ esac
;;
darwin* | rhapsody*)
# PIC is the default on this platform
@@ -14564,7 +15323,7 @@ lt_prog_compiler_static_CXX=
case $host_os in
aix[4-9]*)
# All AIX code is PIC.
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 now supports IA64 processor
lt_prog_compiler_static_CXX='-Bstatic'
else
@@ -14604,14 +15363,14 @@ lt_prog_compiler_static_CXX=
case $cc_basename in
CC*)
lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
- if test "$host_cpu" != ia64; then
+ lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
+ if test ia64 != "$host_cpu"; then
lt_prog_compiler_pic_CXX='+Z'
fi
;;
aCC*)
lt_prog_compiler_wl_CXX='-Wl,'
- lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+ lt_prog_compiler_static_CXX='$wl-a ${wl}archive'
case $host_cpu in
hppa*64*|ia64*)
# +Z the default
@@ -14640,7 +15399,7 @@ lt_prog_compiler_static_CXX=
;;
esac
;;
- linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
case $cc_basename in
KCC*)
# KAI C++ Compiler
@@ -14648,7 +15407,7 @@ lt_prog_compiler_static_CXX=
lt_prog_compiler_pic_CXX='-fPIC'
;;
ecpc* )
- # old Intel C++ for x86_64 which still supported -KPIC.
+ # old Intel C++ for x86_64, which still supported -KPIC.
lt_prog_compiler_wl_CXX='-Wl,'
lt_prog_compiler_pic_CXX='-KPIC'
lt_prog_compiler_static_CXX='-static'
@@ -14793,7 +15552,7 @@ lt_prog_compiler_static_CXX=
fi
case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
+ # For platforms that do not support PIC, -DPIC is meaningless:
*djgpp*)
lt_prog_compiler_pic_CXX=
;;
@@ -14825,7 +15584,7 @@ else
lt_cv_prog_compiler_pic_works_CXX=no
ac_outfile=conftest.$ac_objext
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
+ lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment
# Insert the option either (1) after the last *FLAGS variable, or
# (2) before a word containing "conftest.", or (3) at the end.
# Note that $ac_compile itself does not contain backslashes and begins
@@ -14855,7 +15614,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
-if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then
case $lt_prog_compiler_pic_CXX in
"" | " "*) ;;
*) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
@@ -14881,7 +15640,7 @@ if ${lt_cv_prog_compiler_static_works_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
lt_cv_prog_compiler_static_works_CXX=no
- save_LDFLAGS="$LDFLAGS"
+ save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
echo "$lt_simple_link_test_code" > conftest.$ac_ext
if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
@@ -14900,13 +15659,13 @@ else
fi
fi
$RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
+ LDFLAGS=$save_LDFLAGS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5
$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
-if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
+if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then
:
else
lt_prog_compiler_static_CXX=
@@ -15020,8 +15779,8 @@ $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+hard_links=nottested
+if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then
# do not overwrite the value of need_locks provided by the user
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
$as_echo_n "checking if we can lock with hard links... " >&6; }
@@ -15033,9 +15792,9 @@ $as_echo_n "checking if we can lock with hard links... " >&6; }
ln conftest.a conftest.b 2>/dev/null && hard_links=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
$as_echo "$hard_links" >&6; }
- if test "$hard_links" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ if test no = "$hard_links"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;}
need_locks=warn
fi
else
@@ -15052,17 +15811,21 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
case $host_os in
aix[4-9]*)
# If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- # Also, AIX nm treats weak defined symbols like other global defined
- # symbols, whereas GNU nm marks them as "W".
+ # -C means demangle to GNU nm, but means don't demangle to AIX nm.
+ # Without the "-l" option, or with the "-B" option, AIX nm treats
+ # weak defined symbols like other global defined symbols, whereas
+ # GNU nm marks them as "W".
+ # While the 'weak' keyword is ignored in the Export File, we need
+ # it in the Import File for the 'aix-soname' feature, so we have
+ # to replace the "-B" option with "-P" for AIX nm.
if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
else
- export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
fi
;;
pw32*)
- export_symbols_cmds_CXX="$ltdll_cmds"
+ export_symbols_cmds_CXX=$ltdll_cmds
;;
cygwin* | mingw* | cegcc*)
case $cc_basename in
@@ -15082,7 +15845,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5
$as_echo "$ld_shlibs_CXX" >&6; }
-test "$ld_shlibs_CXX" = no && can_build_shared=no
+test no = "$ld_shlibs_CXX" && can_build_shared=no
with_gnu_ld_CXX=$with_gnu_ld
@@ -15099,7 +15862,7 @@ x|xyes)
# Assume -lc should be added
archive_cmds_need_lc_CXX=yes
- if test "$enable_shared" = yes && test "$GCC" = yes; then
+ if test yes,yes = "$GCC,$enable_shared"; then
case $archive_cmds_CXX in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
@@ -15227,7 +15990,7 @@ $as_echo_n "checking dynamic linker characteristics... " >&6; }
library_names_spec=
libname_spec='lib$name'
soname_spec=
-shrext_cmds=".so"
+shrext_cmds=.so
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
@@ -15244,14 +16007,16 @@ hardcode_into_libs=no
# flags to be left without arguments
need_version=unknown
+
+
case $host_os in
aix3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
shlibpath_var=LIBPATH
# AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
+ soname_spec='$libname$release$shared_ext$major'
;;
aix[4-9]*)
@@ -15259,41 +16024,91 @@ aix[4-9]*)
need_lib_prefix=no
need_version=no
hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
+ if test ia64 = "$host_cpu"; then
# AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
else
# With GCC up to 2.95.x, collect2 would create an import file
# for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
+ # the line '#! .'. This would cause the generated library to
+ # depend on '.', always an invalid library. This was fixed in
# development snapshots of GCC prior to 3.0.
case $host_os in
aix4 | aix4.[01] | aix4.[01].*)
if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
:
else
can_build_shared=no
fi
;;
esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # Using Import Files as archive members, it is possible to support
+ # filename-based versioning of shared library archives on AIX. While
+ # this would work for both with and without runtime linking, it will
+ # prevent static linking of such archives. So we do filename-based
+ # shared library versioning with .so extension only, which is used
+ # when both runtime linking and shared linking is enabled.
+ # Unfortunately, runtime linking may impact performance, so we do
+ # not want this to be the default eventually. Also, we use the
+ # versioned .so libs for executables only if there is the -brtl
+ # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
+ # To allow for filename-based versioning support, we need to create
+ # libNAME.so.V as an archive file, containing:
+ # *) an Import File, referring to the versioned filename of the
+ # archive as well as the shared archive member, telling the
+ # bitwidth (32 or 64) of that shared object, and providing the
+ # list of exported symbols of that shared object, eventually
+ # decorated with the 'weak' keyword
+ # *) the shared object with the F_LOADONLY flag set, to really avoid
+ # it being seen by the linker.
+ # At run time we better use the real file rather than another symlink,
+ # but for link time we create the symlink libNAME.so -> libNAME.so.V
+
+ case $with_aix_soname,$aix_use_runtimelinking in
+ # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
# soname into executable. Probably we can add versioning support to
# collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
+ aix,yes) # traditional libtool
+ dynamic_linker='AIX unversionable lib.so'
# If using run time linking (on AIX 4.2 or later) use lib<name>.so
# instead of lib<name>.a to let people know that these are not
# typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ ;;
+ aix,no) # traditional AIX only
+ dynamic_linker='AIX lib.a(lib.so.V)'
# We preserve .a as extension for shared libraries through AIX4.2
# and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ ;;
+ svr4,*) # full svr4 only
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,yes) # both, prefer svr4
+ dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)"
+ library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
+ # unpreferred sharedlib libNAME.a needs extra handling
+ postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
+ postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
+ # We do not specify a path in Import Files, so LIBPATH fires.
+ shlibpath_overrides_runpath=yes
+ ;;
+ *,no) # both, prefer aix
+ dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)"
+ library_names_spec='$libname$release.a $libname.a'
+ soname_spec='$libname$release$shared_ext$major'
+ # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
+ postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
+ postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
+ ;;
+ esac
shlibpath_var=LIBPATH
fi
;;
@@ -15303,18 +16118,18 @@ amigaos*)
powerpc)
# Since July 2007 AmigaOS4 officially supports .so libraries.
# When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
;;
m68k)
library_names_spec='$libname.ixlibrary $libname.a'
# Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
;;
esac
;;
beos*)
- library_names_spec='${libname}${shared_ext}'
+ library_names_spec='$libname$shared_ext'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
;;
@@ -15322,8 +16137,8 @@ beos*)
bsdi[45]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
@@ -15335,7 +16150,7 @@ bsdi[45]*)
cygwin* | mingw* | pw32* | cegcc*)
version_type=windows
- shrext_cmds=".dll"
+ shrext_cmds=.dll
need_version=no
need_lib_prefix=no
@@ -15344,8 +16159,8 @@ cygwin* | mingw* | pw32* | cegcc*)
# gcc
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname~
@@ -15361,16 +16176,16 @@ cygwin* | mingw* | pw32* | cegcc*)
case $host_os in
cygwin*)
# Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
pw32*)
# pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
;;
esac
dynamic_linker='Win32 ld.exe'
@@ -15379,8 +16194,8 @@ cygwin* | mingw* | pw32* | cegcc*)
*,cl*)
# Native MSVC
libname_spec='$name'
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- library_names_spec='${libname}.dll.lib'
+ soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext'
+ library_names_spec='$libname.dll.lib'
case $build_os in
mingw*)
@@ -15407,7 +16222,7 @@ cygwin* | mingw* | pw32* | cegcc*)
sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
;;
*)
- sys_lib_search_path_spec="$LIB"
+ sys_lib_search_path_spec=$LIB
if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
# It is most probably a Windows format PATH.
sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
@@ -15420,8 +16235,8 @@ cygwin* | mingw* | pw32* | cegcc*)
esac
# DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
dldir=$destdir/`dirname \$dlpath`~
test -d \$dldir || mkdir -p \$dldir~
$install_prog $dir/$dlname \$dldir/$dlname'
@@ -15434,7 +16249,7 @@ cygwin* | mingw* | pw32* | cegcc*)
*)
# Assume MSVC wrapper
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib'
dynamic_linker='Win32 ld.exe'
;;
esac
@@ -15447,8 +16262,8 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
+ library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$major$shared_ext'
shlibpath_overrides_runpath=yes
shlibpath_var=DYLD_LIBRARY_PATH
shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
@@ -15460,8 +16275,8 @@ dgux*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -15479,12 +16294,13 @@ freebsd* | dragonfly*)
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
need_version=no
need_lib_prefix=no
;;
freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
need_version=yes
;;
esac
@@ -15509,26 +16325,15 @@ freebsd* | dragonfly*)
esac
;;
-gnu*)
- version_type=linux # correct to gnu/linux during the next big refactor
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
haiku*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
dynamic_linker="$host_os runtime_loader"
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LIBRARY_PATH
- shlibpath_overrides_runpath=yes
+ shlibpath_overrides_runpath=no
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
hardcode_into_libs=yes
;;
@@ -15546,14 +16351,15 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.so"
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
+ if test 32 = "$HPUX_IA64_MODE"; then
sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux32
else
sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ sys_lib_dlsearch_path_spec=/usr/lib/hpux64
fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
hppa*64*)
shrext_cmds='.sl'
@@ -15561,8 +16367,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
@@ -15571,8 +16377,8 @@ hpux9* | hpux10* | hpux11*)
dynamic_linker="$host_os dld.sl"
shlibpath_var=SHLIB_PATH
shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
;;
esac
# HP-UX runs *really* slowly unless shared libraries are mode 555, ...
@@ -15585,8 +16391,8 @@ interix[3-9]*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -15597,7 +16403,7 @@ irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
*)
- if test "$lt_cv_prog_gnu_ld" = yes; then
+ if test yes = "$lt_cv_prog_gnu_ld"; then
version_type=linux # correct to gnu/linux during the next big refactor
else
version_type=irix
@@ -15605,8 +16411,8 @@ irix5* | irix6* | nonstopux*)
esac
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
case $host_os in
irix5* | nonstopux*)
libsuff= shlibsuff=
@@ -15625,8 +16431,8 @@ irix5* | irix6* | nonstopux*)
esac
shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
+ sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
hardcode_into_libs=yes
;;
@@ -15635,13 +16441,33 @@ linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
+linux*android*)
+ version_type=none # Android doesn't support versioned libraries.
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='$libname$release$shared_ext'
+ soname_spec='$libname$release$shared_ext'
+ finish_cmds=
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ dynamic_linker='Android linker'
+ # Don't embed -rpath directories since the linker doesn't support them.
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ ;;
+
# This must be glibc/ELF.
-linux* | k*bsd*-gnu | kopensolaris*-gnu)
+linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
@@ -15685,7 +16511,12 @@ fi
# before this can be enabled.
hardcode_into_libs=yes
- # Append ld.so.conf contents to the search path
+ # Ideally, we could use ldconfig to report *all* directores which are
+ # searched for libraries, however this is still not possible. Aside from not
+ # being certain /sbin/ldconfig is available, command
+ # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
+ # even though it is searched at run-time. Try to do the best guess by
+ # appending ld.so.conf contents (and includes) to the search path.
if test -f /etc/ld.so.conf; then
lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
@@ -15705,12 +16536,12 @@ netbsd*)
need_lib_prefix=no
need_version=no
if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
dynamic_linker='NetBSD (a.out) ld.so'
else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
dynamic_linker='NetBSD ld.elf_so'
fi
shlibpath_var=LD_LIBRARY_PATH
@@ -15720,7 +16551,7 @@ netbsd*)
newsos6)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
;;
@@ -15729,58 +16560,68 @@ newsos6)
version_type=qnx
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
dynamic_linker='ldqnx.so'
;;
-openbsd*)
+openbsd* | bitrig*)
version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
+ sys_lib_dlsearch_path_spec=/usr/lib
need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
+ need_version=no
else
- shlibpath_overrides_runpath=yes
+ need_version=yes
fi
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
;;
os2*)
libname_spec='$name'
- shrext_cmds=".dll"
+ version_type=windows
+ shrext_cmds=.dll
+ need_version=no
need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
+ # OS/2 can only load a DLL with a base name of 8 characters or less.
+ soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
+ v=$($ECHO $release$versuffix | tr -d .-);
+ n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
+ $ECHO $n$v`$shared_ext'
+ library_names_spec='${libname}_dll.$libext'
dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
+ shlibpath_var=BEGINLIBPATH
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ postinstall_cmds='base_file=`basename \$file`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
;;
osf3* | osf4* | osf5*)
version_type=osf
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='$libname$release$shared_ext$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
;;
rdos*)
@@ -15791,8 +16632,8 @@ solaris*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
@@ -15802,11 +16643,11 @@ solaris*)
sunos4*)
version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
need_lib_prefix=no
fi
need_version=yes
@@ -15814,8 +16655,8 @@ sunos4*)
sysv4 | sysv4.3*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
case $host_vendor in
sni)
@@ -15836,24 +16677,24 @@ sysv4 | sysv4.3*)
;;
sysv4*MP*)
- if test -d /usr/nec ;then
+ if test -d /usr/nec; then
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
+ library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
+ soname_spec='$libname$shared_ext.$major'
shlibpath_var=LD_LIBRARY_PATH
fi
;;
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
+ version_type=sco
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=yes
hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
+ if test yes = "$with_gnu_ld"; then
sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
else
sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
@@ -15871,7 +16712,7 @@ tpf*)
version_type=linux # correct to gnu/linux during the next big refactor
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
shlibpath_var=LD_LIBRARY_PATH
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
@@ -15879,8 +16720,8 @@ tpf*)
uts4*)
version_type=linux # correct to gnu/linux during the next big refactor
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
+ soname_spec='$libname$release$shared_ext$major'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -15890,20 +16731,32 @@ uts4*)
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
+test no = "$dynamic_linker" && can_build_shared=no
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
+if test yes = "$GCC"; then
variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
fi
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
+ sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+
+if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
+ sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
fi
+# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
+configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
+
+# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
+func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
+
+# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
+configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
+
+
+
@@ -15946,15 +16799,15 @@ $as_echo_n "checking how to hardcode library paths into programs... " >&6; }
hardcode_action_CXX=
if test -n "$hardcode_libdir_flag_spec_CXX" ||
test -n "$runpath_var_CXX" ||
- test "X$hardcode_automatic_CXX" = "Xyes" ; then
+ test yes = "$hardcode_automatic_CXX"; then
# We can hardcode non-existent directories.
- if test "$hardcode_direct_CXX" != no &&
+ if test no != "$hardcode_direct_CXX" &&
# If the only mechanism to avoid hardcoding is shlibpath_var, we
# have to relink, otherwise we might link with an installed library
# when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
- test "$hardcode_minus_L_CXX" != no; then
+ ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" &&
+ test no != "$hardcode_minus_L_CXX"; then
# Linking always hardcodes the temporary library directory.
hardcode_action_CXX=relink
else
@@ -15969,12 +16822,12 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5
$as_echo "$hardcode_action_CXX" >&6; }
-if test "$hardcode_action_CXX" = relink ||
- test "$inherit_rpath_CXX" = yes; then
+if test relink = "$hardcode_action_CXX" ||
+ test yes = "$inherit_rpath_CXX"; then
# Fast installation is not supported
enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
+elif test yes = "$shlibpath_overrides_runpath" ||
+ test no = "$enable_shared"; then
# Fast installation is not necessary
enable_fast_install=needless
fi
@@ -15997,7 +16850,7 @@ fi
lt_cv_path_LD=$lt_save_path_LD
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
+fi # test yes != "$_lt_caught_CXX_error"
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
@@ -16013,10 +16866,10 @@ if test "${enable_silent_rules+set}" = set; then :
enableval=$enable_silent_rules;
fi
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no) AM_DEFAULT_VERBOSITY=1;;
-*) AM_DEFAULT_VERBOSITY=1;;
+case $enable_silent_rules in # (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=1;;
esac
am_make=${MAKE-make}
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
@@ -16048,44 +16901,7 @@ fi
AM_BACKSLASH='\'
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lc" >&5
-$as_echo_n "checking for main in -lc... " >&6; }
-if ${ac_cv_lib_c_main+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lc $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-
-int
-main ()
-{
-return main ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_c_main=yes
-else
- ac_cv_lib_c_main=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_main" >&5
-$as_echo "$ac_cv_lib_c_main" >&6; }
-if test "x$ac_cv_lib_c_main" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBC 1
-_ACEOF
-
- LIBS="-lc $LIBS"
-
-fi
+tiff_libs_private=
case "${host_os}" in
@@ -16129,20 +16945,18 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5
$as_echo "$ac_cv_lib_m_sin" >&6; }
if test "x$ac_cv_lib_m_sin" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBM 1
-_ACEOF
-
- LIBS="-lm $LIBS"
-
+ libm_lib=yes
+else
+ libm_lib=no
fi
+ if test "x$libm_lib" = "xyes" ; then
+ LIBS="-lm $LIBS"
+ tiff_libs_private="-lm ${tiff_libs_private}"
+ fi
;;
esac
-tiff_libs_private=
-
-
for ac_header in assert.h fcntl.h io.h limits.h malloc.h search.h sys/time.h unistd.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -16168,11 +16982,11 @@ else
int
main ()
{
-/* FIXME: Include the comments suggested by Paul. */
+
#ifndef __cplusplus
- /* Ultrix mips cc rejects this. */
+ /* Ultrix mips cc rejects this sort of thing. */
typedef int charset[2];
- const charset cs;
+ const charset cs = { 0, 0 };
/* SunOS 4.1.1 cc rejects this. */
char const *const *pcpcc;
char **ppc;
@@ -16189,8 +17003,9 @@ main ()
++pcpcc;
ppc = (char**) pcpcc;
pcpcc = (char const *const *) ppc;
- { /* SCO 3.2v4 cc rejects this. */
- char *t;
+ { /* SCO 3.2v4 cc rejects this sort of thing. */
+ char tx;
+ char *t = &tx;
char const *s = 0 ? (char *) 0 : (char const *) 0;
*t++ = 0;
@@ -16206,10 +17021,10 @@ main ()
iptr p = 0;
++p;
}
- { /* AIX XL C 1.02.0.0 rejects this saying
+ { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
"k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
- struct s { int j; const int *ap[3]; };
- struct s *b; b->j = 5;
+ struct s { int j; const int *ap[3]; } bx;
+ struct s *b = &bx; b->j = 5;
}
{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
const int foo = 10;
@@ -16596,6 +17411,87 @@ $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+if ${ac_cv_sys_largefile_source+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_sys_largefile_source=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _LARGEFILE_SOURCE 1
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_sys_largefile_source=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_cv_sys_largefile_source=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
+$as_echo "$ac_cv_sys_largefile_source" >&6; }
+case $ac_cv_sys_largefile_source in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+_ACEOF
+;;
+esac
+rm -rf conftest*
+
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+if test $ac_cv_sys_largefile_source != unknown; then
+
+$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
+
+fi
+
+
+ac_fn_c_check_decl "$LINENO" "optarg" "ac_cv_have_decl_optarg" "$ac_includes_default"
+if test "x$ac_cv_have_decl_optarg" = xyes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_OPTARG $ac_have_decl
+_ACEOF
+
+
# Obtain size of an 'signed short' and define as SIZEOF_SIGNED_SHORT
# The cast to long int works around a bug in the HP C Compiler
@@ -16917,6 +17813,42 @@ _ACEOF
+# Obtain the size of 'size_t' and define as SIZEOF_SIZE_T. Result is
+# available in ac_cv_sizeof_size_t
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
+$as_echo_n "checking size of size_t... " >&6; }
+if ${ac_cv_sizeof_size_t+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_size_t" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (size_t)
+See \`config.log' for more details" "$LINENO" 5; }
+ else
+ ac_cv_sizeof_size_t=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
+$as_echo "$ac_cv_sizeof_size_t" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
+_ACEOF
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed 8-bit type" >&5
$as_echo_n "checking for signed 8-bit type... " >&6; }
INT8_T='signed char'
@@ -17084,19 +18016,73 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
+# Determine formatting specifier for 'size_t'. While the size should
+# be precise, the type determined may not match the system definition.
+# A named type is provided to allow casting to the type we determined
+# without changing the actual size.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 'size_t' format specifier" >&5
+$as_echo_n "checking for 'size_t' format specifier... " >&6; }
+SIZE_T='unknown'
+SIZE_FORMAT='unknown'
+if test $ac_cv_sizeof_unsigned_int -eq $ac_cv_sizeof_size_t
+then
+ SIZE_T='unsigned int'
+ SIZE_FORMAT='"%u"'
+elif test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_size_t
+then
+ SIZE_T='unsigned long'
+ SIZE_FORMAT='"%lu"'
+elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_size_t
+then
+ SIZE_T='unsigned long long'
+ case "${host_os}" in
+ mingw32*)
+ # MinGW32 understands 'unsigned long long', but uses printf from WIN32 CRT
+ SIZE_FORMAT='"%I64u"'
+ ;;
+ *)
+ SIZE_FORMAT='"%llu"'
+ ;;
+ esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SIZE_FORMAT" >&5
+$as_echo "$SIZE_FORMAT" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define TIFF_SIZE_T $SIZE_T
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define TIFF_SIZE_FORMAT $SIZE_FORMAT
+_ACEOF
+
+
# Determine TIFF equivalent of ssize_t
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for signed size type" >&5
$as_echo_n "checking for signed size type... " >&6; }
SSIZE_T='unknown'
SSIZE_FORMAT='unknown'
-if test $ac_cv_sizeof_signed_long -eq $ac_cv_sizeof_unsigned_char_p
+if test $ac_cv_sizeof_signed_int -eq $ac_cv_sizeof_unsigned_char_p
+then
+ SSIZE_T='signed int'
+ SSIZE_FORMAT='"%d"'
+elif test $ac_cv_sizeof_signed_long -eq $ac_cv_sizeof_unsigned_char_p
then
SSIZE_T='signed long'
SSIZE_FORMAT='"%ld"'
elif test $ac_cv_sizeof_signed_long_long -eq $ac_cv_sizeof_unsigned_char_p
then
SSIZE_T='signed long long'
- SSIZE_FORMAT='"%lld"'
+ case "${host_os}" in
+ mingw32*)
+ # MinGW32 understands 'long long', but uses printf from WIN32 CRT
+ SSIZE_FORMAT='"%I64d"'
+ ;;
+ *)
+ SSIZE_FORMAT='"%lld"'
+ ;;
+ esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SSIZE_T" >&5
$as_echo "$SSIZE_T" >&6; }
@@ -17185,7 +18171,8 @@ _ACEOF
fi
-for ac_func in floor isascii memmove memset mmap pow setmode sqrt strchr strrchr strstr strtol strtoull
+for ac_func in floor isascii memmove memset mmap pow setmode snprintf sqrt \
+strchr strrchr strstr strtol strtoul strtoull
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -17212,6 +18199,20 @@ esac
fi
+ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = xyes; then :
+ $as_echo "#define HAVE_SNPRINTF 1" >>confdefs.h
+
+else
+ case " $LIBOBJS " in
+ *" snprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
+ ;;
+esac
+
+fi
+
+
ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
if test "x$ac_cv_func_strcasecmp" = xyes; then :
$as_echo "#define HAVE_STRCASECMP 1" >>confdefs.h
@@ -17524,6 +18525,8 @@ _ACEOF
esac
rm -rf conftest*
fi
+
+
fi
@@ -17876,6 +18879,15 @@ $as_echo "#define JPEG_SUPPORT 1" >>confdefs.h
fi
+ if test "$HAVE_JPEG" = 'yes'; then
+ HAVE_JPEG_TRUE=
+ HAVE_JPEG_FALSE='#'
+else
+ HAVE_JPEG_TRUE='#'
+ HAVE_JPEG_FALSE=
+fi
+
+
# Check whether --enable-old-jpeg was given.
if test "${enable_old_jpeg+set}" = set; then :
@@ -18014,6 +19026,15 @@ done
fi
+ if test "$HAVE_JBIG" = 'yes'; then
+ HAVE_JBIG_TRUE=
+ HAVE_JBIG_FALSE='#'
+else
+ HAVE_JBIG_TRUE='#'
+ HAVE_JBIG_FALSE=
+fi
+
+
HAVE_LZMA=no
@@ -18121,6 +19142,15 @@ $as_echo "#define LZMA_SUPPORT 1" >>confdefs.h
fi
+ if test "$HAVE_LZMA" = 'yes'; then
+ HAVE_LZMA_TRUE=
+ HAVE_LZMA_FALSE='#'
+else
+ HAVE_LZMA_TRUE='#'
+ HAVE_LZMA_FALSE=
+fi
+
+
HAVE_JPEG12=no
@@ -18192,6 +19222,7 @@ fi
HAVE_OPENGL=no
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
$as_echo_n "checking for X... " >&6; }
@@ -18978,7 +20009,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_ax_pthread_config="yes"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -19127,7 +20158,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_PTHREAD_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -19419,6 +20450,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
GLU_CFLAGS="${GL_CFLAGS}"
ax_save_CPPFLAGS="${CPPFLAGS}"
@@ -19602,6 +20634,7 @@ fi
fi
+
ax_save_CPPFLAGS="${CPPFLAGS}"
CPPFLAGS="${GLU_CFLAGS} ${CPPFLAGS}"
for ac_header in GL/glut.h GLUT/glut.h
@@ -19747,19 +20780,32 @@ fi
+# Check whether --enable-win32-io was given.
+if test "${enable_win32_io+set}" = set; then :
+ enableval=$enable_win32_io;
+fi
+
+
win32_io_ok=no
case "${host_os}" in
cygwin*)
+ if test x"$ac_cv_header_windows_h" = xyes -a "x$enable_win32_io" = xyes ; then
+ win32_io_ok=yes
+ fi
;;
*)
- if test x"$ac_cv_header_windows_h" = xyes; then
+ if test x"$ac_cv_header_windows_h" = xyes -a ! "x$enable_win32_io" = xno ; then
win32_io_ok=yes
-
-$as_echo "#define USE_WIN32_FILEIO 1" >>confdefs.h
-
fi
;;
esac
+
+if test "$win32_io_ok" = "yes" ; then
+
+$as_echo "#define USE_WIN32_FILEIO 1" >>confdefs.h
+
+fi
+
if test "$win32_io_ok" = yes; then
WIN32_IO_TRUE=
WIN32_IO_FALSE='#'
@@ -19992,6 +21038,14 @@ LIBOBJS=$ac_libobjs
LTLIBOBJS=$ac_ltlibobjs
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
if test -n "$EXEEXT"; then
am__EXEEXT_TRUE=
am__EXEEXT_FALSE='#'
@@ -20025,6 +21079,18 @@ if test -z "${HAVE_RPATH_TRUE}" && test -z "${HAVE_RPATH_FALSE}"; then
as_fn_error $? "conditional \"HAVE_RPATH\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${HAVE_JPEG_TRUE}" && test -z "${HAVE_JPEG_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_JPEG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_JBIG_TRUE}" && test -z "${HAVE_JBIG_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_JBIG\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${HAVE_LZMA_TRUE}" && test -z "${HAVE_LZMA_FALSE}"; then
+ as_fn_error $? "conditional \"HAVE_LZMA\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${HAVE_CXX_TRUE}" && test -z "${HAVE_CXX_FALSE}"; then
as_fn_error $? "conditional \"HAVE_CXX\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
@@ -20335,16 +21401,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -p'.
+ # In both cases, we have to default to `cp -pR'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
else
- as_ln_s='cp -p'
+ as_ln_s='cp -pR'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -20404,28 +21470,16 @@ else
as_mkdir_p=false
fi
-if test -x / >/dev/null 2>&1; then
- as_test_x='test -x'
-else
- if ls -dL / >/dev/null 2>&1; then
- as_ls_L_option=L
- else
- as_ls_L_option=
- fi
- as_test_x='
- eval sh -c '\''
- if test -d "$1"; then
- test -d "$1/.";
- else
- case $1 in #(
- -*)set "./$1";;
- esac;
- case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
- ???[sx]*):;;*)false;;esac;fi
- '\'' sh
- '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+ test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -20446,8 +21500,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by LibTIFF Software $as_me 4.0.1, which was
-generated by GNU Autoconf 2.68. Invocation command line was
+This file was extended by LibTIFF Software $as_me 4.0.7, which was
+generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -20512,11 +21566,11 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-LibTIFF Software config.status 4.0.1
-configured by $0, generated by GNU Autoconf 2.68,
+LibTIFF Software config.status 4.0.7
+configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -20607,7 +21661,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
@@ -20650,6 +21704,7 @@ enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`'
enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`'
pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`'
enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`'
+shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`'
SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`'
ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`'
PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`'
@@ -20697,10 +21752,13 @@ compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`'
GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`'
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`'
+lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`'
nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`'
lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`'
+lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`'
objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`'
MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`'
lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`'
@@ -20765,7 +21823,8 @@ finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`'
finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`'
hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`'
sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`'
+configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`'
+configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`'
hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`'
enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`'
enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`'
@@ -20871,9 +21930,12 @@ CFLAGS \
compiler \
lt_cv_sys_global_symbol_pipe \
lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_import \
lt_cv_sys_global_symbol_to_c_name_address \
lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+lt_cv_nm_interface \
nm_file_list_spec \
+lt_cv_truncate_bin \
lt_prog_compiler_no_builtin_flag \
lt_prog_compiler_pic \
lt_prog_compiler_wl \
@@ -20939,7 +22001,7 @@ postdeps_CXX \
compiler_lib_search_path_CXX; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -20966,7 +22028,8 @@ postinstall_cmds \
postuninstall_cmds \
finish_cmds \
sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec \
+configure_time_dlsearch_path \
+configure_time_lt_sys_library_path \
reload_cmds_CXX \
old_archive_cmds_CXX \
old_archive_from_new_cmds_CXX \
@@ -20980,7 +22043,7 @@ prelink_cmds_CXX \
postlink_cmds_CXX; do
case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
*[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
;;
*)
eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
@@ -20989,19 +22052,16 @@ postlink_cmds_CXX; do
done
ac_aux_dir='$ac_aux_dir'
-xsi_shell='$xsi_shell'
-lt_shell_append='$lt_shell_append'
-# See if we are running on zsh, and set the options which allow our
+# See if we are running on zsh, and set the options that allow our
# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
+if test -n "\${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
PACKAGE='$PACKAGE'
VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
RM='$RM'
ofile='$ofile'
@@ -21640,7 +22700,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
case $ac_file$ac_mode in
"depfiles":C) test x"$AMDEP_TRUE" != x"" || {
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # Older Autoconf quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
@@ -21653,7 +22713,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
+ # We used to match only the files named 'Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
@@ -21687,21 +22747,19 @@ $as_echo X"$mf" |
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
+ # from the Makefile without running 'make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
+ test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`$as_dirname -- "$file" ||
@@ -21736,55 +22794,53 @@ $as_echo X"$file" |
;;
"libtool":C)
- # See if we are running on zsh, and set the options which allow our
+ # See if we are running on zsh, and set the options that allow our
# commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
+ if test -n "${ZSH_VERSION+set}"; then
setopt NO_GLOB_SUBST
fi
- cfgfile="${ofile}T"
+ cfgfile=${ofile}T
trap "$RM \"$cfgfile\"; exit 1" 1 2 15
$RM "$cfgfile"
cat <<_LT_EOF >> "$cfgfile"
#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Generated automatically by $as_me ($PACKAGE) $VERSION
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+
+# Provide generalized library-building support services.
+# Written by Gordon Matzigkeit, 1996
+
+# Copyright (C) 2014 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of of the License, or
+# (at your option) any later version.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2 of
-# the License, or (at your option) any later version.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program or library that is built
+# using GNU Libtool, you may include this file under the same
+# distribution terms that you use for the rest of that program.
#
-# GNU Libtool is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# GNU Libtool is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
-# along with GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
# The names of the tagged configurations supported by this script.
-available_tags="CXX "
+available_tags='CXX '
+
+# Configured defaults for sys_lib_dlsearch_path munging.
+: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
# ### BEGIN LIBTOOL CONFIG
@@ -21813,6 +22869,9 @@ pic_mode=$pic_mode
# Whether or not to optimize for fast installation.
fast_install=$enable_fast_install
+# Shared archive member basename,for filename based shared library versioning on AIX.
+shared_archive_member_spec=$shared_archive_member_spec
+
# Shell to use when invoking shell scripts.
SHELL=$lt_SHELL
@@ -21924,18 +22983,27 @@ global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
# Transform the output of nm in a proper C declaration.
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+# Transform the output of nm into a list of symbols to manually relocate.
+global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import
+
# Transform the output of nm in a C name address pair.
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# Transform the output of nm in a C name address pair when lib prefix is needed.
global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+# The name lister interface.
+nm_interface=$lt_lt_cv_nm_interface
+
# Specify filename containing input files for \$NM.
nm_file_list_spec=$lt_nm_file_list_spec
-# The root where to search for dependent libraries,and in which our libraries should be installed.
+# The root where to search for dependent libraries,and where our libraries should be installed.
lt_sysroot=$lt_sysroot
+# Command to truncate a binary pipe.
+lt_truncate_bin=$lt_lt_cv_truncate_bin
+
# The name of the directory that contains temporary libtool files.
objdir=$objdir
@@ -22026,8 +23094,11 @@ hardcode_into_libs=$hardcode_into_libs
# Compile-time system search path for libraries.
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-# Run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+# Detected run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path
+
+# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
+configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path
# Whether dlopen is supported.
dlopen_support=$enable_dlopen
@@ -22120,13 +23191,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary.
hardcode_direct=$hardcode_direct
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute
@@ -22192,13 +23263,72 @@ compiler_lib_search_path=$lt_compiler_lib_search_path
_LT_EOF
+ cat <<'_LT_EOF' >> "$cfgfile"
+
+# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
+
+# func_munge_path_list VARIABLE PATH
+# -----------------------------------
+# VARIABLE is name of variable containing _space_ separated list of
+# directories to be munged by the contents of PATH, which is string
+# having a format:
+# "DIR[:DIR]:"
+# string "DIR[ DIR]" will be prepended to VARIABLE
+# ":DIR[:DIR]"
+# string "DIR[ DIR]" will be appended to VARIABLE
+# "DIRP[:DIRP]::[DIRA:]DIRA"
+# string "DIRP[ DIRP]" will be prepended to VARIABLE and string
+# "DIRA[ DIRA]" will be appended to VARIABLE
+# "DIR[:DIR]"
+# VARIABLE will be replaced by "DIR[ DIR]"
+func_munge_path_list ()
+{
+ case x$2 in
+ x)
+ ;;
+ *:)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\"
+ ;;
+ x:*)
+ eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ *::*)
+ eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
+ eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\"
+ ;;
+ *)
+ eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\"
+ ;;
+ esac
+}
+
+
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+func_cc_basename ()
+{
+ for cc_temp in $*""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+ done
+ func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
+}
+
+
+# ### END FUNCTIONS SHARED WITH CONFIGURE
+
+_LT_EOF
+
case $host_os in
aix3*)
cat <<\_LT_EOF >> "$cfgfile"
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
+if test set != "${COLLECT_NAMES+set}"; then
COLLECT_NAMES=
export COLLECT_NAMES
fi
@@ -22207,7 +23337,7 @@ _LT_EOF
esac
-ltmain="$ac_aux_dir/ltmain.sh"
+ltmain=$ac_aux_dir/ltmain.sh
# We use sed instead of cat because bash on DJGPP gets confused if
@@ -22217,165 +23347,6 @@ ltmain="$ac_aux_dir/ltmain.sh"
sed '$q' "$ltmain" >> "$cfgfile" \
|| (rm -f "$cfgfile"; exit 1)
- if test x"$xsi_shell" = xyes; then
- sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
-func_dirname ()\
-{\
-\ case ${1} in\
-\ */*) func_dirname_result="${1%/*}${2}" ;;\
-\ * ) func_dirname_result="${3}" ;;\
-\ esac\
-} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_basename ()$/,/^} # func_basename /c\
-func_basename ()\
-{\
-\ func_basename_result="${1##*/}"\
-} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\
-func_dirname_and_basename ()\
-{\
-\ case ${1} in\
-\ */*) func_dirname_result="${1%/*}${2}" ;;\
-\ * ) func_dirname_result="${3}" ;;\
-\ esac\
-\ func_basename_result="${1##*/}"\
-} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_stripname ()$/,/^} # func_stripname /c\
-func_stripname ()\
-{\
-\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\
-\ # positional parameters, so assign one to ordinary parameter first.\
-\ func_stripname_result=${3}\
-\ func_stripname_result=${func_stripname_result#"${1}"}\
-\ func_stripname_result=${func_stripname_result%"${2}"}\
-} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\
-func_split_long_opt ()\
-{\
-\ func_split_long_opt_name=${1%%=*}\
-\ func_split_long_opt_arg=${1#*=}\
-} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\
-func_split_short_opt ()\
-{\
-\ func_split_short_opt_arg=${1#??}\
-\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\
-} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\
-func_lo2o ()\
-{\
-\ case ${1} in\
-\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\
-\ *) func_lo2o_result=${1} ;;\
-\ esac\
-} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_xform ()$/,/^} # func_xform /c\
-func_xform ()\
-{\
- func_xform_result=${1%.*}.lo\
-} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_arith ()$/,/^} # func_arith /c\
-func_arith ()\
-{\
- func_arith_result=$(( $* ))\
-} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_len ()$/,/^} # func_len /c\
-func_len ()\
-{\
- func_len_result=${#1}\
-} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-fi
-
-if test x"$lt_shell_append" = xyes; then
- sed -e '/^func_append ()$/,/^} # func_append /c\
-func_append ()\
-{\
- eval "${1}+=\\${2}"\
-} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\
-func_append_quoted ()\
-{\
-\ func_quote_for_eval "${2}"\
-\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\
-} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
-test 0 -eq $? || _lt_function_replace_fail=:
-
-
- # Save a `func_append' function call where possible by direct use of '+='
- sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
- test 0 -eq $? || _lt_function_replace_fail=:
-else
- # Save a `func_append' function call even when '+=' is not available
- sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
- && mv -f "$cfgfile.tmp" "$cfgfile" \
- || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
- test 0 -eq $? || _lt_function_replace_fail=:
-fi
-
-if test x"$_lt_function_replace_fail" = x":"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5
-$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;}
-fi
-
-
mv -f "$cfgfile" "$ofile" ||
(rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
@@ -22462,13 +23433,13 @@ hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
# Whether we need a single "-rpath" flag with a separated argument.
hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary.
hardcode_direct=$hardcode_direct_CXX
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes
# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# "absolute",i.e impossible to change by setting \$shlibpath_var if the
# library is relocated.
hardcode_direct_absolute=$hardcode_direct_absolute_CXX
diff --git a/tiff/configure.ac b/tiff/configure.ac
index 6216ff185..23d543cf1 100644
--- a/tiff/configure.ac
+++ b/tiff/configure.ac
@@ -25,7 +25,7 @@ dnl OF THIS SOFTWARE.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.64)
-AC_INIT([LibTIFF Software],[4.0.1],[tiff@lists.maptools.org],[tiff])
+AC_INIT([LibTIFF Software],[4.0.7],[tiff@lists.maptools.org],[tiff])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(m4)
AC_LANG(C)
@@ -33,7 +33,7 @@ AC_LANG(C)
dnl Compute the canonical host (run-time) system type variable
AC_CANONICAL_HOST
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE(tar-pax)
dnl Do not rebuild generated files every time
AM_MAINTAINER_MODE
@@ -41,7 +41,7 @@ dnl Versioning.
dnl Don't fill the ALPHA_VERSION field, if not applicable.
LIBTIFF_MAJOR_VERSION=4
LIBTIFF_MINOR_VERSION=0
-LIBTIFF_MICRO_VERSION=1
+LIBTIFF_MICRO_VERSION=7
LIBTIFF_ALPHA_VERSION=
LIBTIFF_VERSION=$LIBTIFF_MAJOR_VERSION.$LIBTIFF_MINOR_VERSION.$LIBTIFF_MICRO_VERSION$LIBTIFF_ALPHA_VERSION
dnl This will be used with the 'make release' target
@@ -76,9 +76,9 @@ dnl 5. If any interfaces have been added since the last public release, then
dnl increment age.
dnl 6. If any interfaces have been removed since the last public release,
dnl then set age to 0.
-LIBTIFF_CURRENT=5
-LIBTIFF_REVISION=6
-LIBTIFF_AGE=0
+LIBTIFF_CURRENT=7
+LIBTIFF_REVISION=5
+LIBTIFF_AGE=2
LIBTIFF_VERSION_INFO=$LIBTIFF_CURRENT:$LIBTIFF_REVISION:$LIBTIFF_AGE
# This is a special hack for OpenBSD and MirOS systems. The dynamic linker
@@ -109,8 +109,11 @@ AM_PROG_CC_C_O
dnl We want warnings. As many warnings as possible.
VL_PROG_CC_WARNINGS()
+dnl Checks for programs
AC_PROG_INSTALL
AC_PROG_LN_S
+# Used only for validating the source distribution during distcheck
+AC_PATH_PROG(CMAKE, cmake)
# Check if LD supports linker scripts, and define automake conditional
@@ -154,21 +157,22 @@ LT_LANG([C++])
# Enable support for silent build rules
AM_SILENT_RULES
-dnl Checks for libraries.
-AC_CHECK_LIB([c], [main])
+tiff_libs_private=
+AC_SUBST(tiff_libs_private)
dnl We don't need to add math library to all targets
case "${host_os}" in
cygwin* | mingw32* | beos* | darwin*)
;;
*)
- AC_CHECK_LIB(m,sin,,,)
+ AC_CHECK_LIB(m,sin,[libm_lib=yes], [libm_lib=no],)
+ if test "x$libm_lib" = "xyes" ; then
+ LIBS="-lm $LIBS"
+ tiff_libs_private="-lm ${tiff_libs_private}"
+ fi
;;
esac
-tiff_libs_private=
-AC_SUBST(tiff_libs_private)
-
dnl Checks for header files.
AC_CHECK_HEADERS([assert.h fcntl.h io.h limits.h malloc.h search.h sys/time.h unistd.h])
@@ -181,6 +185,13 @@ AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
+dnl If the `fseeko' function is available, define `HAVE_FSEEKO'. Define
+dnl `_LARGEFILE_SOURCE' if necessary.
+AC_FUNC_FSEEKO
+
+dnl Check if optarg (and presumably related externs) already declared in headers
+AC_CHECK_DECLS([optarg])
+
dnl ---------------------------------------------------------------------------
dnl Compute sized types for current CPU and compiler options
dnl ---------------------------------------------------------------------------
@@ -217,6 +228,10 @@ AC_CHECK_SIZEOF(unsigned long long)
# ac_cv_sizeof_unsigned_char_p.
AC_CHECK_SIZEOF(unsigned char *)
+# Obtain the size of 'size_t' and define as SIZEOF_SIZE_T. Result is
+# available in ac_cv_sizeof_size_t
+AC_CHECK_SIZEOF([size_t])
+
AC_MSG_CHECKING(for signed 8-bit type)
INT8_T='signed char'
AC_MSG_RESULT($INT8_T)
@@ -320,18 +335,62 @@ AC_MSG_RESULT($UINT64_T)
AC_DEFINE_UNQUOTED(TIFF_UINT64_T,$UINT64_T,[Unsigned 64-bit type])
AC_DEFINE_UNQUOTED(TIFF_UINT64_FORMAT,$UINT64_FORMAT,[Unsigned 64-bit type formatter])
+# Determine formatting specifier for 'size_t'. While the size should
+# be precise, the type determined may not match the system definition.
+# A named type is provided to allow casting to the type we determined
+# without changing the actual size.
+AC_MSG_CHECKING([for 'size_t' format specifier])
+SIZE_T='unknown'
+SIZE_FORMAT='unknown'
+if test $ac_cv_sizeof_unsigned_int -eq $ac_cv_sizeof_size_t
+then
+ SIZE_T='unsigned int'
+ SIZE_FORMAT='"%u"'
+elif test $ac_cv_sizeof_unsigned_long -eq $ac_cv_sizeof_size_t
+then
+ SIZE_T='unsigned long'
+ SIZE_FORMAT='"%lu"'
+elif test $ac_cv_sizeof_unsigned_long_long -eq $ac_cv_sizeof_size_t
+then
+ SIZE_T='unsigned long long'
+ case "${host_os}" in
+ mingw32*)
+ # MinGW32 understands 'unsigned long long', but uses printf from WIN32 CRT
+ SIZE_FORMAT='"%I64u"'
+ ;;
+ *)
+ SIZE_FORMAT='"%llu"'
+ ;;
+ esac
+fi
+AC_MSG_RESULT([$SIZE_FORMAT])
+AC_DEFINE_UNQUOTED([TIFF_SIZE_T],[$SIZE_T],[Unsigned size type])
+AC_DEFINE_UNQUOTED([TIFF_SIZE_FORMAT],[$SIZE_FORMAT],[Size type formatter])
+
# Determine TIFF equivalent of ssize_t
AC_MSG_CHECKING(for signed size type)
SSIZE_T='unknown'
SSIZE_FORMAT='unknown'
-if test $ac_cv_sizeof_signed_long -eq $ac_cv_sizeof_unsigned_char_p
+if test $ac_cv_sizeof_signed_int -eq $ac_cv_sizeof_unsigned_char_p
+then
+ SSIZE_T='signed int'
+ SSIZE_FORMAT='"%d"'
+elif test $ac_cv_sizeof_signed_long -eq $ac_cv_sizeof_unsigned_char_p
then
SSIZE_T='signed long'
SSIZE_FORMAT='"%ld"'
elif test $ac_cv_sizeof_signed_long_long -eq $ac_cv_sizeof_unsigned_char_p
then
SSIZE_T='signed long long'
- SSIZE_FORMAT='"%lld"'
+ case "${host_os}" in
+ mingw32*)
+ # MinGW32 understands 'long long', but uses printf from WIN32 CRT
+ SSIZE_FORMAT='"%I64d"'
+ ;;
+ *)
+ SSIZE_FORMAT='"%lld"'
+ ;;
+ esac
fi
AC_MSG_RESULT($SSIZE_T)
AC_DEFINE_UNQUOTED(TIFF_SSIZE_T,$SSIZE_T,[Signed size type])
@@ -362,10 +421,12 @@ AC_CHECK_TYPES([int8, int16, int32],,,
])
dnl Checks for library functions.
-AC_CHECK_FUNCS([floor isascii memmove memset mmap pow setmode sqrt strchr strrchr strstr strtol strtoull])
+AC_CHECK_FUNCS([floor isascii memmove memset mmap pow setmode snprintf sqrt \
+strchr strrchr strstr strtol strtoul strtoull])
dnl Will use local replacements for unavailable functions
AC_REPLACE_FUNCS(getopt)
+AC_REPLACE_FUNCS(snprintf)
AC_REPLACE_FUNCS(strcasecmp)
AC_REPLACE_FUNCS(strtoul)
AC_REPLACE_FUNCS(strtoull)
@@ -635,6 +696,8 @@ if test "$HAVE_JPEG" = "yes" ; then
fi
+AM_CONDITIONAL(HAVE_JPEG, test "$HAVE_JPEG" = 'yes')
+
dnl ---------------------------------------------------------------------------
dnl Check for Old JPEG.
dnl ---------------------------------------------------------------------------
@@ -707,6 +770,8 @@ if test "$HAVE_JBIG" = "yes" ; then
fi
+AM_CONDITIONAL(HAVE_JBIG, test "$HAVE_JBIG" = 'yes')
+
dnl ---------------------------------------------------------------------------
dnl Check for liblzma2.
dnl ---------------------------------------------------------------------------
@@ -759,6 +824,8 @@ if test "$HAVE_LZMA" = "yes" ; then
fi
+AM_CONDITIONAL(HAVE_LZMA, test "$HAVE_LZMA" = 'yes')
+
dnl ---------------------------------------------------------------------------
dnl Should 8/12 bit jpeg mode be enabled?
dnl ---------------------------------------------------------------------------
@@ -813,10 +880,17 @@ dnl ---------------------------------------------------------------------------
HAVE_OPENGL=no
+
AC_PATH_XTRA
+dnl AX_CHECK_GL sets GL_CFLAGS & GL_LIBS. Also PTHREAD_LIBS,
+dnl PTHREAD_CFLAGS, & PTHREAD_CC as a side-effect
AX_CHECK_GL
+
+dnl AX_CHECK_GLU sets GLU_CFLAGS & GLU_LIBS
AX_CHECK_GLU
+
+dnl AX_CHECK_GLUT sets GLUT_CFLAGS & GLUT_LIBS
AX_CHECK_GLUT
if test "$no_x" != "yes" -a "$no_gl" != "yes" \
@@ -832,17 +906,28 @@ dnl this must be after the ogl test, since that looks for windows.h and we
dnl test it
dnl ---------------------------------------------------------------------------
+AC_ARG_ENABLE(win32-io,
+ AS_HELP_STRING([--disable-win32-io],
+ [disable Win32 I/O (Windows only, enabled by default except for Cygwin)]),,)
+
win32_io_ok=no
case "${host_os}" in
cygwin*)
+ if test x"$ac_cv_header_windows_h" = xyes -a "x$enable_win32_io" = xyes ; then
+ win32_io_ok=yes
+ fi
;;
*)
- if test x"$ac_cv_header_windows_h" = xyes; then
+ if test x"$ac_cv_header_windows_h" = xyes -a ! "x$enable_win32_io" = xno ; then
win32_io_ok=yes
- AC_DEFINE(USE_WIN32_FILEIO,1,[define to use win32 IO system])
fi
;;
esac
+
+if test "$win32_io_ok" = "yes" ; then
+ AC_DEFINE(USE_WIN32_FILEIO,1,[define to use win32 IO system])
+fi
+
AM_CONDITIONAL([WIN32_IO], [test "$win32_io_ok" = yes])
dnl ---------------------------------------------------------------------------
diff --git a/tiff/configure.com b/tiff/configure.com
index 46b817c53..226751725 100644
--- a/tiff/configure.com
+++ b/tiff/configure.com
@@ -1,4 +1,4 @@
-$! $Id: configure.com,v 1.2 2007/11/23 10:01:34 dron Exp $
+$! $Id: configure.com,v 1.3 2012-07-29 15:45:29 tgl Exp $
$!
$! OpenVMS configure procedure for libtiff
$! (c) Alexey Chupahin 22-NOV-2007
@@ -503,6 +503,12 @@ TIFFFindFieldInfo=PROCEDURE,-
TIFFFindFieldInfoByName=PROCEDURE,-
TIFFFieldWithName=PROCEDURE,-
TIFFFieldWithTag=PROCEDURE,-
+TIFFFieldTag=PROCEDURE,-
+TIFFFieldName=PROCEDURE,-
+TIFFFieldDataType=PROCEDURE,-
+TIFFFieldPassCount=PROCEDURE,-
+TIFFFieldReadCount=PROCEDURE,-
+TIFFFieldWriteCount=PROCEDURE,-
TIFFCurrentDirOffset=PROCEDURE,-
TIFFWriteCheck=PROCEDURE,-
TIFFRGBAImageOK=PROCEDURE,-
@@ -648,6 +654,12 @@ UNIVERSAL=TIFFFindFieldInfo
UNIVERSAL=TIFFFindFieldInfoByName
UNIVERSAL=TIFFFieldWithName
UNIVERSAL=TIFFFieldWithTag
+UNIVERSAL=TIFFFieldTag
+UNIVERSAL=TIFFFieldName
+UNIVERSAL=TIFFFieldDataType
+UNIVERSAL=TIFFFieldPassCount
+UNIVERSAL=TIFFFieldReadCount
+UNIVERSAL=TIFFFieldWriteCount
UNIVERSAL=TIFFCurrentDirOffset
UNIVERSAL=TIFFWriteCheck
UNIVERSAL=TIFFRGBAImageOK
diff --git a/tiff/contrib/CMakeLists.txt b/tiff/contrib/CMakeLists.txt
new file mode 100644
index 000000000..6bb124f43
--- /dev/null
+++ b/tiff/contrib/CMakeLists.txt
@@ -0,0 +1,35 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+add_subdirectory(addtiffo)
+add_subdirectory(dbs)
+add_subdirectory(iptcutil)
+add_subdirectory(mfs)
+add_subdirectory(pds)
+add_subdirectory(ras)
+add_subdirectory(stream)
+add_subdirectory(tags)
+add_subdirectory(win_dib)
+
+extra_dist(README)
diff --git a/tiff/contrib/Makefile.am b/tiff/contrib/Makefile.am
index b231ef91e..99d0f3366 100644
--- a/tiff/contrib/Makefile.am
+++ b/tiff/contrib/Makefile.am
@@ -23,7 +23,9 @@
# Process this file with automake to produce Makefile.in.
-EXTRA_DIST = README
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README
SUBDIRS = addtiffo dbs iptcutil mfs pds ras stream tags win_dib
diff --git a/tiff/contrib/Makefile.in b/tiff/contrib/Makefile.in
index 620cd2c5e..1d1d02934 100644
--- a/tiff/contrib/Makefile.in
+++ b/tiff/contrib/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -40,6 +39,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -59,7 +113,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = contrib
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -67,34 +120,69 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/config/mkinstalldirs README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
@@ -133,6 +221,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -180,6 +269,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -267,7 +357,10 @@ tiff_libs_private = @tiff_libs_private@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-EXTRA_DIST = README
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README
+
SUBDIRS = addtiffo dbs iptcutil mfs pds ras stream tags win_dib
all: all-recursive
@@ -284,7 +377,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -310,22 +402,25 @@ clean-libtool:
-rm -rf .libs _libs
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@@ -340,57 +435,12 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-$(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -406,12 +456,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -423,15 +468,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -440,6 +481,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -476,13 +532,10 @@ distdir: $(DISTFILES)
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
@@ -603,22 +656,22 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic clean-libtool \
- ctags ctags-recursive distclean distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool cscopelist-am ctags \
+ ctags-am distclean distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tiff/contrib/addtiffo/CMakeLists.txt b/tiff/contrib/addtiffo/CMakeLists.txt
new file mode 100644
index 000000000..b7482635e
--- /dev/null
+++ b/tiff/contrib/addtiffo/CMakeLists.txt
@@ -0,0 +1,34 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+extra_dist(
+ README
+ Makefile.vc)
+
+include_directories(${PROJECT_SOURCE_DIR}/libtiff
+ ${PROJECT_BINARY_DIR}/libtiff
+ ${CMAKE_CURRENT_BINARY_DIR})
+
+add_executable(addtiffo addtiffo.c tif_overview.c tif_ovrcache.c tif_ovrcache.h)
+target_link_libraries(addtiffo tiff port)
diff --git a/tiff/contrib/addtiffo/Makefile.am b/tiff/contrib/addtiffo/Makefile.am
index aed05b820..87342bdee 100644
--- a/tiff/contrib/addtiffo/Makefile.am
+++ b/tiff/contrib/addtiffo/Makefile.am
@@ -25,12 +25,15 @@
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
-EXTRA_DIST = README Makefile.vc
+EXTRA_DIST = \
+ CMakeLists.txt \
+ Makefile.vc \
+ README
noinst_PROGRAMS = addtiffo
addtiffo_SOURCES = addtiffo.c tif_overview.c tif_ovrcache.c tif_ovrcache.h
addtiffo_LDADD = $(LIBTIFF)
-INCLUDES = -I$(top_srcdir)/libtiff
+AM_CPPFLAGS = -I$(top_srcdir)/libtiff
diff --git a/tiff/contrib/addtiffo/Makefile.in b/tiff/contrib/addtiffo/Makefile.in
index ac6c7d555..24c604e18 100644
--- a/tiff/contrib/addtiffo/Makefile.in
+++ b/tiff/contrib/addtiffo/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -41,6 +40,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -61,7 +115,6 @@ build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = addtiffo$(EXEEXT)
subdir = contrib/addtiffo
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -69,6 +122,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
@@ -82,6 +136,19 @@ addtiffo_DEPENDENCIES = $(LIBTIFF)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
+am__v_lt_1 =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libtiff
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
@@ -94,24 +161,44 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
SOURCES = $(addtiffo_SOURCES)
DIST_SOURCES = $(addtiffo_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \
+ $(top_srcdir)/config/mkinstalldirs README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -125,6 +212,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -172,6 +260,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -260,10 +349,14 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
-EXTRA_DIST = README Makefile.vc
+EXTRA_DIST = \
+ CMakeLists.txt \
+ Makefile.vc \
+ README
+
addtiffo_SOURCES = addtiffo.c tif_overview.c tif_ovrcache.c tif_ovrcache.h
addtiffo_LDADD = $(LIBTIFF)
-INCLUDES = -I$(top_srcdir)/libtiff
+AM_CPPFLAGS = -I$(top_srcdir)/libtiff
all: all-am
.SUFFIXES:
@@ -280,7 +373,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/addtiffo/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/addtiffo/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -307,6 +399,7 @@ clean-noinstPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+
addtiffo$(EXEEXT): $(addtiffo_OBJECTS) $(addtiffo_DEPENDENCIES) $(EXTRA_addtiffo_DEPENDENCIES)
@rm -f addtiffo$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(addtiffo_OBJECTS) $(addtiffo_LDADD) $(LIBS)
@@ -326,14 +419,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -348,26 +441,15 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -379,15 +461,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -396,6 +474,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -537,18 +630,21 @@ uninstall-am:
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstPROGRAMS ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tiff/contrib/addtiffo/addtiffo.c b/tiff/contrib/addtiffo/addtiffo.c
index d3920e26c..7bc3f4444 100644
--- a/tiff/contrib/addtiffo/addtiffo.c
+++ b/tiff/contrib/addtiffo/addtiffo.c
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: addtiffo.c,v 1.7 2010-06-08 18:55:15 bfriesen Exp $
+ * $Id: addtiffo.c,v 1.8 2015-05-30 20:30:27 bfriesen Exp $
*
* Project: GeoTIFF Overview Builder
* Purpose: Mainline for building overviews in a TIFF file.
@@ -28,6 +28,10 @@
******************************************************************************
*
* $Log: addtiffo.c,v $
+ * Revision 1.8 2015-05-30 20:30:27 bfriesen
+ * * contrib/addtiffo/addtiffo.c (main): Possibly address Coverity
+ * 1024226 "Untrusted value as argument".
+ *
* Revision 1.7 2010-06-08 18:55:15 bfriesen
* * contrib: Add an emacs formatting mode footer to all source files
* so that emacs can be effectively used.
@@ -120,7 +124,8 @@ int main( int argc, char ** argv )
while( nOverviewCount < argc - 2 && nOverviewCount < 100 )
{
anOverviews[nOverviewCount] = atoi(argv[nOverviewCount+2]);
- if( anOverviews[nOverviewCount] <= 0)
+ if( (anOverviews[nOverviewCount] <= 0) ||
+ ((anOverviews[nOverviewCount] > 1024)))
{
fprintf( stderr, "Incorrect parameters\n" );
return(1);
@@ -170,7 +175,7 @@ int main( int argc, char ** argv )
/*
* Local Variables:
* mode: c
- * c-basic-offset: 8
+ * c-basic-offset: 4
* fill-column: 78
* End:
*/
diff --git a/tiff/contrib/addtiffo/tif_overview.c b/tiff/contrib/addtiffo/tif_overview.c
index 156c08125..c61ffbb8c 100644
--- a/tiff/contrib/addtiffo/tif_overview.c
+++ b/tiff/contrib/addtiffo/tif_overview.c
@@ -272,10 +272,27 @@ void TIFF_DownSample( unsigned char *pabySrcTile,
int nPixelGroupBytes = (nBitsPerPixel+nPixelSkewBits)/8;
unsigned char *pabySrc, *pabyDst;
double *padfSamples;
+ size_t tpadfSamples_size, padfSamples_size;
assert( nBitsPerPixel >= 8 );
- padfSamples = (double *) malloc(sizeof(double) * nOMult * nOMult);
+ /* sizeof(double) * nOMult * nOMult */
+ tpadfSamples_size=nOMult*nOMult;
+ if ((nOMult != 0) && (tpadfSamples_size/nOMult == (size_t) nOMult)) {
+ padfSamples_size=tpadfSamples_size;
+ tpadfSamples_size=padfSamples_size*sizeof(double);
+ if ((tpadfSamples_size / padfSamples_size) == sizeof(double))
+ padfSamples_size=tpadfSamples_size;
+ else
+ padfSamples_size=0;
+ } else {
+ padfSamples_size=0;
+ }
+ if (padfSamples_size == 0) {
+ /* TODO: This is an error condition */
+ return;
+ }
+ padfSamples = (double *) malloc(padfSamples_size);
/* ==================================================================== */
/* Loop over scanline chunks to process, establishing where the */
@@ -893,7 +910,7 @@ void TIFFBuildOverviews( TIFF *hTIFF, int nOverviews, int * panOvList,
/*
* Local Variables:
* mode: c
- * c-basic-offset: 8
+ * c-basic-offset: 4
* fill-column: 78
* End:
*/
diff --git a/tiff/contrib/addtiffo/tif_ovrcache.c b/tiff/contrib/addtiffo/tif_ovrcache.c
index e19483bc4..171527b5c 100644
--- a/tiff/contrib/addtiffo/tif_ovrcache.c
+++ b/tiff/contrib/addtiffo/tif_ovrcache.c
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: tif_ovrcache.c,v 1.9 2010-06-08 18:55:15 bfriesen Exp $
+ * $Id: tif_ovrcache.c,v 1.11 2015-05-29 03:08:19 bfriesen Exp $
*
* Project: TIFF Overview Builder
* Purpose: Library functions to maintain two rows of tiles or two strips
@@ -104,12 +104,15 @@ TIFFOvrCache *TIFFCreateOvrCache( TIFF *hTIFF, toff_t nDirOffset )
psCache->pabyRow2Blocks =
(unsigned char *) _TIFFmalloc(psCache->nBytesPerRow);
- if( psCache->pabyRow1Blocks == NULL
- || psCache->pabyRow2Blocks == NULL )
+ if ( psCache->pabyRow1Blocks == NULL
+ || psCache->pabyRow2Blocks == NULL )
{
TIFFErrorExt( hTIFF->tif_clientdata, hTIFF->tif_name,
"Can't allocate memory for overview cache." );
- /* TODO: use of TIFFError is inconsistent with use of fprintf in addtiffo.c, sort out */
+ /* TODO: use of TIFFError is inconsistent with use of fprintf in addtiffo.c, sort out */
+ if (psCache->pabyRow1Blocks) _TIFFfree(psCache->pabyRow1Blocks);
+ if (psCache->pabyRow2Blocks) _TIFFfree(psCache->pabyRow2Blocks);
+ _TIFFfree( psCache );
return NULL;
}
@@ -267,9 +270,9 @@ unsigned char *TIFFGetOvrBlock( TIFFOvrCache *psCache, int iTileX, int iTileY,
int iSample )
{
- int nRowOffset;
+ long nRowOffset;
- if( iTileY > psCache->nBlockOffset + 1 )
+ if ( iTileY > psCache->nBlockOffset + 1 )
TIFFWriteOvrRow( psCache );
assert( iTileX >= 0 && iTileX < psCache->nBlocksPerRow );
@@ -279,13 +282,13 @@ unsigned char *TIFFGetOvrBlock( TIFFOvrCache *psCache, int iTileX, int iTileY,
assert( iSample >= 0 && iSample < psCache->nSamples );
if (psCache->nPlanarConfig == PLANARCONFIG_SEPARATE)
- nRowOffset = ((iTileX * psCache->nSamples) + iSample)
- * psCache->nBytesPerBlock;
+ nRowOffset = ((((toff_t) iTileX * psCache->nSamples) + iSample)
+ * psCache->nBytesPerBlock);
else
nRowOffset = iTileX * psCache->nBytesPerBlock +
(psCache->nBitsPerPixel + 7) / 8 * iSample;
- if( iTileY == psCache->nBlockOffset )
+ if ( iTileY == psCache->nBlockOffset )
return psCache->pabyRow1Blocks + nRowOffset;
else
return psCache->pabyRow2Blocks + nRowOffset;
@@ -335,7 +338,7 @@ void TIFFDestroyOvrCache( TIFFOvrCache * psCache )
/*
* Local Variables:
* mode: c
- * c-basic-offset: 8
+ * c-basic-offset: 4
* fill-column: 78
* End:
*/
diff --git a/tiff/contrib/dbs/CMakeLists.txt b/tiff/contrib/dbs/CMakeLists.txt
new file mode 100644
index 000000000..b2e809b26
--- /dev/null
+++ b/tiff/contrib/dbs/CMakeLists.txt
@@ -0,0 +1,43 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+include_directories(${PROJECT_SOURCE_DIR}/libtiff
+ ${PROJECT_BINARY_DIR}/libtiff
+ ${CMAKE_CURRENT_BINARY_DIR})
+
+add_executable(tiff-bi tiff-bi.c)
+target_link_libraries(tiff-bi tiff port)
+
+add_executable(tiff-grayscale tiff-grayscale.c)
+target_link_libraries(tiff-grayscale tiff port)
+
+add_executable(tiff-palette tiff-palette.c)
+target_link_libraries(tiff-palette tiff port)
+
+add_executable(tiff-rgb tiff-rgb.c)
+target_link_libraries(tiff-rgb tiff port)
+
+add_subdirectory(xtiff)
+
+extra_dist(README)
diff --git a/tiff/contrib/dbs/Makefile.am b/tiff/contrib/dbs/Makefile.am
index 034647195..90697eeda 100644
--- a/tiff/contrib/dbs/Makefile.am
+++ b/tiff/contrib/dbs/Makefile.am
@@ -27,7 +27,9 @@ SUBDIRS = xtiff
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
-EXTRA_DIST = README
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README
noinst_PROGRAMS = tiff-bi tiff-grayscale tiff-palette tiff-rgb
@@ -40,5 +42,5 @@ tiff_palette_LDADD = $(LIBTIFF)
tiff_rgb_SOURCES = tiff-rgb.c
tiff_rgb_LDADD = $(LIBTIFF)
-INCLUDES = -I$(top_srcdir)/libtiff
+AM_CPPFLAGS = -I$(top_srcdir)/libtiff
diff --git a/tiff/contrib/dbs/Makefile.in b/tiff/contrib/dbs/Makefile.in
index 0d58de3a2..e3503e107 100644
--- a/tiff/contrib/dbs/Makefile.in
+++ b/tiff/contrib/dbs/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -41,6 +40,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -62,7 +116,6 @@ host_triplet = @host@
noinst_PROGRAMS = tiff-bi$(EXEEXT) tiff-grayscale$(EXEEXT) \
tiff-palette$(EXEEXT) tiff-rgb$(EXEEXT)
subdir = contrib/dbs
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -70,6 +123,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
@@ -82,6 +136,7 @@ tiff_bi_DEPENDENCIES = $(LIBTIFF)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
+am__v_lt_1 =
am_tiff_grayscale_OBJECTS = tiff-grayscale.$(OBJEXT)
tiff_grayscale_OBJECTS = $(am_tiff_grayscale_OBJECTS)
tiff_grayscale_DEPENDENCIES = $(LIBTIFF)
@@ -91,6 +146,18 @@ tiff_palette_DEPENDENCIES = $(LIBTIFF)
am_tiff_rgb_OBJECTS = tiff-rgb.$(OBJEXT)
tiff_rgb_OBJECTS = $(am_tiff_rgb_OBJECTS)
tiff_rgb_DEPENDENCIES = $(LIBTIFF)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libtiff
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
@@ -103,39 +170,63 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
SOURCES = $(tiff_bi_SOURCES) $(tiff_grayscale_SOURCES) \
$(tiff_palette_SOURCES) $(tiff_rgb_SOURCES)
DIST_SOURCES = $(tiff_bi_SOURCES) $(tiff_grayscale_SOURCES) \
$(tiff_palette_SOURCES) $(tiff_rgb_SOURCES)
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \
+ $(top_srcdir)/config/mkinstalldirs README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
@@ -174,6 +265,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -221,6 +313,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -310,7 +403,10 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = xtiff
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
-EXTRA_DIST = README
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README
+
tiff_bi_SOURCES = tiff-bi.c
tiff_bi_LDADD = $(LIBTIFF)
tiff_grayscale_SOURCES = tiff-grayscale.c
@@ -319,7 +415,7 @@ tiff_palette_SOURCES = tiff-palette.c
tiff_palette_LDADD = $(LIBTIFF)
tiff_rgb_SOURCES = tiff-rgb.c
tiff_rgb_LDADD = $(LIBTIFF)
-INCLUDES = -I$(top_srcdir)/libtiff
+AM_CPPFLAGS = -I$(top_srcdir)/libtiff
all: all-recursive
.SUFFIXES:
@@ -336,7 +432,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/dbs/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/dbs/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -363,15 +458,19 @@ clean-noinstPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+
tiff-bi$(EXEEXT): $(tiff_bi_OBJECTS) $(tiff_bi_DEPENDENCIES) $(EXTRA_tiff_bi_DEPENDENCIES)
@rm -f tiff-bi$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiff_bi_OBJECTS) $(tiff_bi_LDADD) $(LIBS)
+
tiff-grayscale$(EXEEXT): $(tiff_grayscale_OBJECTS) $(tiff_grayscale_DEPENDENCIES) $(EXTRA_tiff_grayscale_DEPENDENCIES)
@rm -f tiff-grayscale$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiff_grayscale_OBJECTS) $(tiff_grayscale_LDADD) $(LIBS)
+
tiff-palette$(EXEEXT): $(tiff_palette_OBJECTS) $(tiff_palette_DEPENDENCIES) $(EXTRA_tiff_palette_DEPENDENCIES)
@rm -f tiff-palette$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiff_palette_OBJECTS) $(tiff_palette_LDADD) $(LIBS)
+
tiff-rgb$(EXEEXT): $(tiff_rgb_OBJECTS) $(tiff_rgb_DEPENDENCIES) $(EXTRA_tiff_rgb_DEPENDENCIES)
@rm -f tiff-rgb$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiff_rgb_OBJECTS) $(tiff_rgb_LDADD) $(LIBS)
@@ -392,14 +491,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -415,22 +514,25 @@ clean-libtool:
-rm -rf .libs _libs
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@@ -445,57 +547,12 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-$(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -511,12 +568,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -528,15 +580,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -545,6 +593,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -581,13 +644,10 @@ distdir: $(DISTFILES)
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
@@ -713,12 +773,11 @@ ps-am:
uninstall-am:
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
+.MAKE: $(am__recursive_targets) install-am install-strip
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic clean-libtool \
- clean-noinstPROGRAMS ctags ctags-recursive distclean \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool \
+ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \
distclean-compile distclean-generic distclean-libtool \
distclean-tags distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
@@ -728,8 +787,10 @@ uninstall-am:
install-strip installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tiff/contrib/dbs/xtiff/CMakeLists.txt b/tiff/contrib/dbs/xtiff/CMakeLists.txt
new file mode 100644
index 000000000..fec4d0d8e
--- /dev/null
+++ b/tiff/contrib/dbs/xtiff/CMakeLists.txt
@@ -0,0 +1,29 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+extra_dist(
+ README
+ patchlevel.h
+ xtiff.c
+ xtifficon.h)
diff --git a/tiff/contrib/dbs/xtiff/Makefile.am b/tiff/contrib/dbs/xtiff/Makefile.am
index 749f5ceb6..a138c90a7 100644
--- a/tiff/contrib/dbs/xtiff/Makefile.am
+++ b/tiff/contrib/dbs/xtiff/Makefile.am
@@ -26,7 +26,12 @@
#LIBTIFF = $(top_builddir)/libtiff/libtiff.la
-EXTRA_DIST = README patchlevel.h xtiff.c xtifficon.h
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README \
+ patchlevel.h \
+ xtiff.c \
+ xtifficon.h
#noinst_PROGRAMS =
diff --git a/tiff/contrib/dbs/xtiff/Makefile.in b/tiff/contrib/dbs/xtiff/Makefile.in
index 276c0b66d..08993c442 100644
--- a/tiff/contrib/dbs/xtiff/Makefile.in
+++ b/tiff/contrib/dbs/xtiff/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -43,6 +42,61 @@
#LIBTIFF = $(top_builddir)/libtiff/libtiff.la
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -62,7 +116,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = contrib/dbs/xtiff
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -70,19 +123,34 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/config/mkinstalldirs README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -96,6 +164,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -143,6 +212,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -230,7 +300,13 @@ tiff_libs_private = @tiff_libs_private@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-EXTRA_DIST = README patchlevel.h xtiff.c xtifficon.h
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README \
+ patchlevel.h \
+ xtiff.c \
+ xtifficon.h
+
all: all-am
.SUFFIXES:
@@ -246,7 +322,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/dbs/xtiff/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/dbs/xtiff/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -270,11 +345,11 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-tags: TAGS
-TAGS:
+tags TAGS:
-ctags: CTAGS
-CTAGS:
+ctags CTAGS:
+
+cscope cscopelist:
distdir: $(DISTFILES)
@@ -410,15 +485,18 @@ uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
#noinst_PROGRAMS =
diff --git a/tiff/contrib/dbs/xtiff/xtiff.c b/tiff/contrib/dbs/xtiff/xtiff.c
index 263403002..97e4ffe2f 100644
--- a/tiff/contrib/dbs/xtiff/xtiff.c
+++ b/tiff/contrib/dbs/xtiff/xtiff.c
@@ -1,5 +1,5 @@
/*
- * $Id: xtiff.c,v 1.3 2010-06-08 18:55:15 bfriesen Exp $
+ * $Id: xtiff.c,v 1.4 2013-05-02 14:44:29 tgl Exp $
*
* xtiff - view a TIFF file in an X window
*
@@ -512,9 +512,9 @@ SetNameLabel()
Arg args[1];
if (tfMultiPage)
- sprintf(buffer, "%s - page %d", fileName, tfDirectory);
+ snprintf(buffer, sizeof(buffer), "%s - page %d", fileName, tfDirectory);
else
- strcpy(buffer, fileName);
+ snprintf(buffer, sizeof(buffer), "%s", fileName);
XtSetArg(args[0], XtNlabel, buffer);
XtSetValues(labelWidget, args, 1);
}
diff --git a/tiff/contrib/iptcutil/CMakeLists.txt b/tiff/contrib/iptcutil/CMakeLists.txt
new file mode 100644
index 000000000..35cc26126
--- /dev/null
+++ b/tiff/contrib/iptcutil/CMakeLists.txt
@@ -0,0 +1,35 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+extra_dist(
+ README
+ test.iptc
+ test.txt)
+
+include_directories(${PROJECT_SOURCE_DIR}/libtiff
+ ${PROJECT_BINARY_DIR}/libtiff
+ ${CMAKE_CURRENT_BINARY_DIR})
+
+add_executable(iptcutil iptcutil.c)
+target_link_libraries(iptcutil tiff port)
diff --git a/tiff/contrib/iptcutil/Makefile.am b/tiff/contrib/iptcutil/Makefile.am
index 9b94ed79a..4aabe2e9c 100644
--- a/tiff/contrib/iptcutil/Makefile.am
+++ b/tiff/contrib/iptcutil/Makefile.am
@@ -25,12 +25,16 @@
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
-EXTRA_DIST = README test.iptc test.txt
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README \
+ test.iptc \
+ test.txt
noinst_PROGRAMS = iptcutil
iptcutil_SOURCES = iptcutil.c
iptcutil_LDADD = $(LIBTIFF)
-INCLUDES = -I$(top_srcdir)/libtiff
+AM_CPPFLAGS = -I$(top_srcdir)/libtiff
diff --git a/tiff/contrib/iptcutil/Makefile.in b/tiff/contrib/iptcutil/Makefile.in
index dee584ff3..0ee5ad3cb 100644
--- a/tiff/contrib/iptcutil/Makefile.in
+++ b/tiff/contrib/iptcutil/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -41,6 +40,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -61,7 +115,6 @@ build_triplet = @build@
host_triplet = @host@
noinst_PROGRAMS = iptcutil$(EXEEXT)
subdir = contrib/iptcutil
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -69,6 +122,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
@@ -81,6 +135,19 @@ iptcutil_DEPENDENCIES = $(LIBTIFF)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
+am__v_lt_1 =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libtiff
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
@@ -93,24 +160,44 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
SOURCES = $(iptcutil_SOURCES)
DIST_SOURCES = $(iptcutil_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \
+ $(top_srcdir)/config/mkinstalldirs README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -124,6 +211,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -171,6 +259,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -259,10 +348,15 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
-EXTRA_DIST = README test.iptc test.txt
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README \
+ test.iptc \
+ test.txt
+
iptcutil_SOURCES = iptcutil.c
iptcutil_LDADD = $(LIBTIFF)
-INCLUDES = -I$(top_srcdir)/libtiff
+AM_CPPFLAGS = -I$(top_srcdir)/libtiff
all: all-am
.SUFFIXES:
@@ -279,7 +373,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/iptcutil/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/iptcutil/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -306,6 +399,7 @@ clean-noinstPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+
iptcutil$(EXEEXT): $(iptcutil_OBJECTS) $(iptcutil_DEPENDENCIES) $(EXTRA_iptcutil_DEPENDENCIES)
@rm -f iptcutil$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(iptcutil_OBJECTS) $(iptcutil_LDADD) $(LIBS)
@@ -323,14 +417,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -345,26 +439,15 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -376,15 +459,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -393,6 +472,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -534,18 +628,21 @@ uninstall-am:
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstPROGRAMS ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tiff/contrib/iptcutil/iptcutil.c b/tiff/contrib/iptcutil/iptcutil.c
index eaee188f2..c359df875 100644
--- a/tiff/contrib/iptcutil/iptcutil.c
+++ b/tiff/contrib/iptcutil/iptcutil.c
@@ -1,4 +1,4 @@
-/* $Id: iptcutil.c,v 1.8 2011-05-08 00:44:18 fwarmerdam Exp $ */
+/* $Id: iptcutil.c,v 1.11 2015-06-21 01:09:09 bfriesen Exp $ */
#include "tif_config.h"
@@ -35,58 +35,58 @@ typedef struct _tag_spec
} tag_spec;
static tag_spec tags[] = {
- { 5,"Image Name" },
- { 7,"Edit Status" },
- { 10,"Priority" },
- { 15,"Category" },
- { 20,"Supplemental Category" },
- { 22,"Fixture Identifier" },
- { 25,"Keyword" },
- { 30,"Release Date" },
- { 35,"Release Time" },
- { 40,"Special Instructions" },
- { 45,"Reference Service" },
- { 47,"Reference Date" },
- { 50,"Reference Number" },
- { 55,"Created Date" },
- { 60,"Created Time" },
- { 65,"Originating Program" },
- { 70,"Program Version" },
- { 75,"Object Cycle" },
- { 80,"Byline" },
- { 85,"Byline Title" },
- { 90,"City" },
- { 95,"Province State" },
- { 100,"Country Code" },
- { 101,"Country" },
- { 103,"Original Transmission Reference" },
- { 105,"Headline" },
- { 110,"Credit" },
- { 115,"Source" },
- { 116,"Copyright String" },
- { 120,"Caption" },
- { 121,"Local Caption" },
- { 122,"Caption Writer" },
- { 200,"Custom Field 1" },
- { 201,"Custom Field 2" },
- { 202,"Custom Field 3" },
- { 203,"Custom Field 4" },
- { 204,"Custom Field 5" },
- { 205,"Custom Field 6" },
- { 206,"Custom Field 7" },
- { 207,"Custom Field 8" },
- { 208,"Custom Field 9" },
- { 209,"Custom Field 10" },
- { 210,"Custom Field 11" },
- { 211,"Custom Field 12" },
- { 212,"Custom Field 13" },
- { 213,"Custom Field 14" },
- { 214,"Custom Field 15" },
- { 215,"Custom Field 16" },
- { 216,"Custom Field 17" },
- { 217,"Custom Field 18" },
- { 218,"Custom Field 19" },
- { 219,"Custom Field 20" }
+ { 5,"Image Name" },
+ { 7,"Edit Status" },
+ { 10,"Priority" },
+ { 15,"Category" },
+ { 20,"Supplemental Category" },
+ { 22,"Fixture Identifier" },
+ { 25,"Keyword" },
+ { 30,"Release Date" },
+ { 35,"Release Time" },
+ { 40,"Special Instructions" },
+ { 45,"Reference Service" },
+ { 47,"Reference Date" },
+ { 50,"Reference Number" },
+ { 55,"Created Date" },
+ { 60,"Created Time" },
+ { 65,"Originating Program" },
+ { 70,"Program Version" },
+ { 75,"Object Cycle" },
+ { 80,"Byline" },
+ { 85,"Byline Title" },
+ { 90,"City" },
+ { 95,"Province State" },
+ { 100,"Country Code" },
+ { 101,"Country" },
+ { 103,"Original Transmission Reference" },
+ { 105,"Headline" },
+ { 110,"Credit" },
+ { 115,"Source" },
+ { 116,"Copyright String" },
+ { 120,"Caption" },
+ { 121,"Local Caption" },
+ { 122,"Caption Writer" },
+ { 200,"Custom Field 1" },
+ { 201,"Custom Field 2" },
+ { 202,"Custom Field 3" },
+ { 203,"Custom Field 4" },
+ { 204,"Custom Field 5" },
+ { 205,"Custom Field 6" },
+ { 206,"Custom Field 7" },
+ { 207,"Custom Field 8" },
+ { 208,"Custom Field 9" },
+ { 209,"Custom Field 10" },
+ { 210,"Custom Field 11" },
+ { 211,"Custom Field 12" },
+ { 212,"Custom Field 13" },
+ { 213,"Custom Field 14" },
+ { 214,"Custom Field 15" },
+ { 215,"Custom Field 16" },
+ { 216,"Custom Field 17" },
+ { 217,"Custom Field 18" },
+ { 218,"Custom Field 19" },
+ { 219,"Custom Field 20" }
};
/*
@@ -129,7 +129,7 @@ typedef struct _html_code
short
len;
const char
- *code,
+ *code,
val;
} html_code;
@@ -157,19 +157,19 @@ int convertHTMLcodes(char *s, int len)
int val, o;
if (sscanf(s,"&#%d;",&val) == 1)
- {
- o = 3;
- while (s[o] != ';')
{
- o++;
- if (o > 5)
- break;
+ o = 3;
+ while (s[o] != ';')
+ {
+ o++;
+ if (o > 5)
+ break;
+ }
+ if (o < 5)
+ strcpy(s+1, s+1+o);
+ *s = val;
+ return o;
}
- if (o < 5)
- strcpy(s+1, s+1+o);
- *s = val;
- return o;
- }
}
else
{
@@ -178,15 +178,15 @@ int convertHTMLcodes(char *s, int len)
codes = sizeof(html_codes) / sizeof(html_code);
for (i=0; i < codes; i++)
- {
- if (html_codes[i].len <= len)
- if (STRNICMP(s, html_codes[i].code, html_codes[i].len) == 0)
- {
- strcpy(s+1, s+html_codes[i].len);
- *s = html_codes[i].val;
- return html_codes[i].len-1;
- }
- }
+ {
+ if (html_codes[i].len <= len)
+ if (STRNICMP(s, html_codes[i].code, html_codes[i].len) == 0)
+ {
+ strcpy(s+1, s+html_codes[i].len);
+ *s = html_codes[i].val;
+ return html_codes[i].len-1;
+ }
+ }
}
return 0;
@@ -198,10 +198,6 @@ int formatIPTC(FILE *ifile, FILE *ofile)
foundiptc,
tagsfound;
- unsigned char
- recnum,
- dataset;
-
char
*readable,
*str;
@@ -214,104 +210,119 @@ int formatIPTC(FILE *ifile, FILE *ofile)
i,
tagcount = sizeof(tags) / sizeof(tag_spec);
- char
- c;
+ int
+ c,
+ dataset,
+ recnum;
foundiptc = 0; /* found the IPTC-Header */
tagsfound = 0; /* number of tags found */
c = getc(ifile);
while (c != EOF)
- {
- if (c == 0x1c)
- foundiptc = 1;
- else
- {
- if (foundiptc)
- return -1;
- else
- continue;
- }
-
- /* we found the 0x1c tag and now grab the dataset and record number tags */
- dataset = getc(ifile);
- if ((char) dataset == EOF)
- return -1;
- recnum = getc(ifile);
- if ((char) recnum == EOF)
- return -1;
- /* try to match this record to one of the ones in our named table */
- for (i=0; i< tagcount; i++)
{
- if (tags[i].id == recnum)
- break;
- }
- if (i < tagcount)
- readable = tags[i].name;
- else
- readable = "";
-
- /* then we decode the length of the block that follows - long or short fmt */
- c = getc(ifile);
- if (c == EOF)
- return 0;
- if (c & (unsigned char) 0x80)
- {
- unsigned char
- buffer[4];
-
- for (i=0; i<4; i++)
+ if (c == 0x1c)
+ foundiptc = 1;
+ else
{
- c = buffer[i] = getc(ifile);
- if (c == EOF)
- return -1;
+ if (foundiptc)
+ {
+ return -1;
+ }
+ else
+ {
+ c = getc(ifile);
+ continue;
+ }
}
- taglen = (((long) buffer[ 0 ]) << 24) |
- (((long) buffer[ 1 ]) << 16) |
- (((long) buffer[ 2 ]) << 8) |
- (((long) buffer[ 3 ]));
- }
- else
- {
- unsigned char
- x = c;
-
- taglen = ((long) x) << 8;
- x = getc(ifile);
- if ((char)x == EOF)
- return -1;
- taglen |= (long) x;
- }
- /* make a buffer to hold the tag data and snag it from the input stream */
- str = (char *) malloc((unsigned int) (taglen+1));
- if (str == (char *) NULL)
- {
- printf("Memory allocation failed");
- return 0;
- }
- for (tagindx=0; tagindx<taglen; tagindx++)
- {
- c = str[tagindx] = getc(ifile);
+
+ /* we found the 0x1c tag and now grab the dataset and record number tags */
+ dataset = getc(ifile);
+ if ((char) dataset == EOF)
+ return -1;
+ recnum = getc(ifile);
+ if ((char) recnum == EOF)
+ return -1;
+ /* try to match this record to one of the ones in our named table */
+ for (i=0; i< tagcount; i++)
+ {
+ if (tags[i].id == recnum)
+ break;
+ }
+ if (i < tagcount)
+ readable = tags[i].name;
+ else
+ readable = "";
+
+ /* then we decode the length of the block that follows - long or short fmt */
+ c = getc(ifile);
if (c == EOF)
- {
- free(str);
+ return 0;
+ if (c & (unsigned char) 0x80)
+ {
+ unsigned char
+ buffer[4];
+
+ for (i=0; i<4; i++)
+ {
+ c = getc(ifile);
+ if (c == EOF)
+ return -1;
+ buffer[i] = c;
+ }
+ taglen = (((long) buffer[ 0 ]) << 24) |
+ (((long) buffer[ 1 ]) << 16) |
+ (((long) buffer[ 2 ]) << 8) |
+ (((long) buffer[ 3 ]));
+ }
+ else
+ {
+ int
+ x = c;
+
+ taglen = x << 8;
+ x = getc(ifile);
+ if (x == EOF)
+ return -1;
+ taglen |= (long) x;
+ }
+ /* Place limits on tag length */
+ if ((taglen <= 0) || (taglen > 1048576))
+ {
+ printf("Inappropriate IPTC tag length %ld\n",taglen);
return -1;
- }
- }
- str[ taglen ] = 0;
+ }
+ /* make a buffer to hold the tag data and snag it from the input stream */
+ str = (char *) malloc((unsigned int) (taglen+1));
+ if (str == (char *) NULL)
+ {
+ printf("Memory allocation failed");
+ return 0;
+ }
+ for (tagindx=0; tagindx<taglen; tagindx++)
+ {
+ c = getc(ifile);
+ if (c == EOF)
+ {
+ free(str);
+ return -1;
+ }
+ str[tagindx] = c;
+ }
+ str[ taglen ] = 0;
- /* now finish up by formatting this binary data into ASCII equivalent */
- if (strlen(readable) > 0)
- fprintf(ofile, "%d#%d#%s=",(unsigned int)dataset, (unsigned int) recnum, readable);
- else
- fprintf(ofile, "%d#%d=",(unsigned int)dataset, (unsigned int) recnum);
- formatString( ofile, str, taglen );
- free(str);
+ /* now finish up by formatting this binary data into ASCII equivalent */
+ if (strlen(readable) > 0)
+ fprintf(ofile, "%d#%d#%s=",(unsigned int)dataset, (unsigned int) recnum, readable);
+ else
+ fprintf(ofile, "%d#%d=",(unsigned int)dataset, (unsigned int) recnum);
+ formatString( ofile, str, taglen );
+ free(str);
- tagsfound++;
+ tagsfound++;
- c = getc(ifile);
- }
+ c = getc(ifile);
+ }
return tagsfound;
}
@@ -330,24 +341,24 @@ char *super_fgets(char *b, int *blen, FILE *file)
len=*blen;
for (q=b; ; q++)
- {
- c=fgetc(file);
- if (c == EOF || c == '\n')
- break;
- if (((long)q - (long)b + 1 ) >= (long) len)
- {
- long
- tlen;
-
- tlen=(long)q-(long)b;
- len<<=1;
- b=(char *) realloc((char *) b,(len+2));
- if ((char *) b == (char *) NULL)
- break;
- q=b+tlen;
- }
- *q=(unsigned char) c;
- }
+ {
+ c=fgetc(file);
+ if (c == EOF || c == '\n')
+ break;
+ if (((long)q - (long)b + 1 ) >= (long) len)
+ {
+ long
+ tlen;
+
+ tlen=(long)q-(long)b;
+ len<<=1;
+ b=(char *) realloc((char *) b,(len+2));
+ if ((char *) b == (char *) NULL)
+ break;
+ q=b+tlen;
+ }
+ *q=(unsigned char) c;
+ }
*blen=0;
if ((unsigned char *)b != (unsigned char *) NULL)
{
@@ -367,11 +378,11 @@ char *super_fgets(char *b, int *blen, FILE *file)
int main(int argc, char *argv[])
{
- unsigned int
- length;
+ /* unsigned int */
+ /* length; */
- unsigned char
- *buffer;
+ /*unsigned char
+ *buffer;*/
int
i,
@@ -388,68 +399,68 @@ int main(int argc, char *argv[])
if( argc < 2 )
{
puts(usage);
- return 1;
+ return 1;
}
mode = 0;
- length = -1;
- buffer = (unsigned char *)NULL;
+ /* length = -1; */
+ /* buffer = (unsigned char *)NULL; */
for (i=1; i<argc; i++)
- {
- c = argv[i][0];
- if (c == '-' || c == '/')
- {
- c = argv[i][1];
- switch( c )
+ {
+ c = argv[i][0];
+ if (c == '-' || c == '/')
{
- case 't':
- mode = 1;
+ c = argv[i][1];
+ switch( c )
+ {
+ case 't':
+ mode = 1;
#ifdef WIN32
- /* Set "stdout" to binary mode: */
- _setmode( _fileno( ofile ), _O_BINARY );
+ /* Set "stdout" to binary mode: */
+ _setmode( _fileno( ofile ), _O_BINARY );
#endif
- break;
- case 'b':
- mode = 0;
+ break;
+ case 'b':
+ mode = 0;
#ifdef WIN32
- /* Set "stdin" to binary mode: */
- _setmode( _fileno( ifile ), _O_BINARY );
+ /* Set "stdin" to binary mode: */
+ _setmode( _fileno( ifile ), _O_BINARY );
#endif
- break;
- case 'i':
- if (mode == 0)
- ifile = fopen(argv[++i], "rb");
- else
- ifile = fopen(argv[++i], "rt");
- if (ifile == (FILE *)NULL)
- {
- printf("Unable to open: %s\n", argv[i]);
- return 1;
- }
- break;
- case 'o':
- if (mode == 0)
- ofile = fopen(argv[++i], "wt");
- else
- ofile = fopen(argv[++i], "wb");
- if (ofile == (FILE *)NULL)
- {
- printf("Unable to open: %s\n", argv[i]);
+ break;
+ case 'i':
+ if (mode == 0)
+ ifile = fopen(argv[++i], "rb");
+ else
+ ifile = fopen(argv[++i], "rt");
+ if (ifile == (FILE *)NULL)
+ {
+ printf("Unable to open: %s\n", argv[i]);
+ return 1;
+ }
+ break;
+ case 'o':
+ if (mode == 0)
+ ofile = fopen(argv[++i], "wt");
+ else
+ ofile = fopen(argv[++i], "wb");
+ if (ofile == (FILE *)NULL)
+ {
+ printf("Unable to open: %s\n", argv[i]);
+ return 1;
+ }
+ break;
+ default:
+ printf("Unknown option: %s\n", argv[i]);
return 1;
}
- break;
- default:
- printf("Unknown option: %s\n", argv[i]);
- return 1;
}
- }
- else
- {
- puts(usage);
- return 1;
- }
- }
+ else
+ {
+ puts(usage);
+ return 1;
+ }
+ }
if (mode == 0) /* handle binary iptc info */
formatIPTC(ifile, ofile);
@@ -477,91 +488,91 @@ int main(int argc, char *argv[])
line = (char *) malloc(inputlen);
token = (char *)NULL;
while((line = super_fgets(line,&inputlen,ifile))!=NULL)
- {
- state=0;
- next=0;
-
- token = (char *) malloc(inputlen);
- newstr = (char *) malloc(inputlen);
- while(tokenizer(0, token, inputlen, line, "", "=", "\"", 0,
- &brkused,&next,&quoted)==0)
{
- if (state == 0)
- {
- int
- state,
- next;
-
- char
- brkused,
- quoted;
-
- state=0;
- next=0;
- while(tokenizer(0, newstr, inputlen, token, "", "#", "", 0,
- &brkused, &next, &quoted)==0)
- {
- if (state == 0)
- dataset = (unsigned char) atoi(newstr);
- else
- if (state == 1)
- recnum = (unsigned char) atoi(newstr);
- state++;
- }
- }
- else
- if (state == 1)
- {
- int
- next;
-
- unsigned long
- len;
-
- char
- brkused,
- quoted;
+ state=0;
+ next=0;
- next=0;
- len = strlen(token);
- while(tokenizer(0, newstr, inputlen, token, "", "&", "", 0,
- &brkused, &next, &quoted)==0)
- {
- if (brkused && next > 0)
+ token = (char *) malloc(inputlen);
+ newstr = (char *) malloc(inputlen);
+ while(tokenizer(0, token, inputlen, line, "", "=", "\"", 0,
+ &brkused,&next,&quoted)==0)
+ {
+ if (state == 0)
+ {
+ int
+ state,
+ next;
+
+ char
+ brkused,
+ quoted;
+
+ state=0;
+ next=0;
+ while(tokenizer(0, newstr, inputlen, token, "", "#", "", 0,
+ &brkused, &next, &quoted)==0)
{
- char
- *s = &token[next-1];
-
- len -= convertHTMLcodes(s, strlen(s));
+ if (state == 0)
+ dataset = (unsigned char) atoi(newstr);
+ else
+ if (state == 1)
+ recnum = (unsigned char) atoi(newstr);
+ state++;
}
}
-
- fputc(0x1c, ofile);
- fputc(dataset, ofile);
- fputc(recnum, ofile);
- if (len < 0x10000)
+ else
+ if (state == 1)
{
- fputc((len >> 8) & 255, ofile);
- fputc(len & 255, ofile);
+ int
+ next;
+
+ unsigned long
+ len;
+
+ char
+ brkused,
+ quoted;
+
+ next=0;
+ len = strlen(token);
+ while(tokenizer(0, newstr, inputlen, token, "", "&", "", 0,
+ &brkused, &next, &quoted)==0)
+ {
+ if (brkused && next > 0)
+ {
+ char
+ *s = &token[next-1];
+
+ len -= convertHTMLcodes(s, strlen(s));
+ }
+ }
+
+ fputc(0x1c, ofile);
+ fputc(dataset, ofile);
+ fputc(recnum, ofile);
+ if (len < 0x10000)
+ {
+ fputc((len >> 8) & 255, ofile);
+ fputc(len & 255, ofile);
+ }
+ else
+ {
+ fputc(((len >> 24) & 255) | 0x80, ofile);
+ fputc((len >> 16) & 255, ofile);
+ fputc((len >> 8) & 255, ofile);
+ fputc(len & 255, ofile);
+ }
+ next=0;
+ while (len--)
+ fputc(token[next++], ofile);
}
- else
- {
- fputc(((len >> 24) & 255) | 0x80, ofile);
- fputc((len >> 16) & 255, ofile);
- fputc((len >> 8) & 255, ofile);
- fputc(len & 255, ofile);
- }
- next=0;
- while (len--)
- fputc(token[next++], ofile);
- }
- state++;
+ state++;
+ }
+ free(token);
+ token = (char *)NULL;
+ free(newstr);
+ newstr = (char *)NULL;
}
- free(token);
- token = (char *)NULL;
- free(newstr);
- newstr = (char *)NULL;
- }
free(line);
fclose( ifile );
@@ -783,32 +794,32 @@ void chstore(char *string,int max,char ch)
{
char c;
if(_p_tokpos>=0&&_p_tokpos<max-1)
- {
- if(_p_state==IN_QUOTE)
- c=ch;
- else
- switch(_p_flag&3)
- {
- case 1: /* convert to upper */
- c=toupper(ch);
- break;
+ {
+ if(_p_state==IN_QUOTE)
+ c=ch;
+ else
+ switch(_p_flag&3)
+ {
+ case 1: /* convert to upper */
+ c=toupper((int) ch);
+ break;
- case 2: /* convert to lower */
- c=tolower(ch);
- break;
+ case 2: /* convert to lower */
+ c=tolower((int) ch);
+ break;
- default: /* use as is */
- c=ch;
- break;
- }
- string[_p_tokpos++]=c;
- }
+ default: /* use as is */
+ c=ch;
+ break;
+ }
+ string[_p_tokpos++]=c;
+ }
return;
}
int tokenizer(unsigned inflag,char *token,int tokmax,char *line,
- char *white,char *brkchar,char *quote,char eschar,char *brkused,
- int *next,char *quoted)
+ char *white,char *brkchar,char *quote,char eschar,char *brkused,
+ int *next,char *quoted)
{
int qp;
char c,nc;
@@ -824,11 +835,11 @@ int tokenizer(unsigned inflag,char *token,int tokmax,char *line,
_p_flag=inflag; /* set option flag */
for(_p_tokpos=0;(c=line[*next]);++(*next)) /* main loop */
- {
- if((qp=sindex(c,brkchar))>=0) /* break */
{
- switch(_p_state)
- {
+ if((qp=sindex(c,brkchar))>=0) /* break */
+ {
+ switch(_p_state)
+ {
case IN_WHITE: /* these are the same here ... */
case IN_TOKEN: /* ... just get out */
case IN_OZONE: /* ditto */
@@ -839,12 +850,12 @@ int tokenizer(unsigned inflag,char *token,int tokmax,char *line,
case IN_QUOTE: /* just keep going */
chstore(token,tokmax,c);
break;
- }
- }
- else if((qp=sindex(c,quote))>=0) /* quote */
- {
- switch(_p_state)
- {
+ }
+ }
+ else if((qp=sindex(c,quote))>=0) /* quote */
+ {
+ switch(_p_state)
+ {
case IN_WHITE: /* these are identical, */
_p_state=IN_QUOTE; /* change states */
_p_curquote=quote[qp]; /* save quote char */
@@ -853,10 +864,10 @@ int tokenizer(unsigned inflag,char *token,int tokmax,char *line,
case IN_QUOTE:
if(quote[qp]==_p_curquote) /* same as the beginning quote? */
- {
- _p_state=IN_OZONE;
- _p_curquote=0;
- }
+ {
+ _p_state=IN_OZONE;
+ _p_curquote=0;
+ }
else
chstore(token,tokmax,c); /* treat as regular char */
break;
@@ -865,12 +876,12 @@ int tokenizer(unsigned inflag,char *token,int tokmax,char *line,
case IN_OZONE:
*brkused=c; /* uses quote as break char */
goto byebye;
- }
- }
- else if((qp=sindex(c,white))>=0) /* white */
- {
- switch(_p_state)
- {
+ }
+ }
+ else if((qp=sindex(c,white))>=0) /* white */
+ {
+ switch(_p_state)
+ {
case IN_WHITE:
case IN_OZONE:
break; /* keep going */
@@ -882,20 +893,20 @@ int tokenizer(unsigned inflag,char *token,int tokmax,char *line,
case IN_QUOTE:
chstore(token,tokmax,c); /* it's valid here */
break;
- }
- }
- else if(c==eschar) /* escape */
- {
- nc=line[(*next)+1];
- if(nc==0) /* end of line */
- {
- *brkused=0;
- chstore(token,tokmax,c);
- ++(*next);
- goto byebye;
- }
- switch(_p_state)
- {
+ }
+ }
+ else if(c==eschar) /* escape */
+ {
+ nc=line[(*next)+1];
+ if(nc==0) /* end of line */
+ {
+ *brkused=0;
+ chstore(token,tokmax,c);
+ ++(*next);
+ goto byebye;
+ }
+ switch(_p_state)
+ {
case IN_WHITE:
--(*next);
_p_state=IN_TOKEN;
@@ -909,12 +920,12 @@ int tokenizer(unsigned inflag,char *token,int tokmax,char *line,
case IN_OZONE:
goto byebye;
- }
- }
- else /* anything else is just a real character */
- {
- switch(_p_state)
- {
+ }
+ }
+ else /* anything else is just a real character */
+ {
+ switch(_p_state)
+ {
case IN_WHITE:
_p_state=IN_TOKEN; /* switch states */
@@ -925,11 +936,11 @@ int tokenizer(unsigned inflag,char *token,int tokmax,char *line,
case IN_OZONE:
goto byebye;
- }
- }
- } /* end of main loop */
+ }
+ }
+ } /* end of main loop */
-byebye:
+ byebye:
token[_p_tokpos]=0; /* make sure token ends with EOS */
return 0;
@@ -937,7 +948,7 @@ byebye:
/*
* Local Variables:
* mode: c
- * c-basic-offset: 8
+ * c-basic-offset: 2
* fill-column: 78
* End:
*/
diff --git a/tiff/contrib/mfs/CMakeLists.txt b/tiff/contrib/mfs/CMakeLists.txt
new file mode 100644
index 000000000..3f4f3a906
--- /dev/null
+++ b/tiff/contrib/mfs/CMakeLists.txt
@@ -0,0 +1,27 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+extra_dist(
+ README
+ mfs_file.c)
diff --git a/tiff/contrib/mfs/Makefile.am b/tiff/contrib/mfs/Makefile.am
index fb8a07e23..b0bad60a9 100644
--- a/tiff/contrib/mfs/Makefile.am
+++ b/tiff/contrib/mfs/Makefile.am
@@ -23,5 +23,7 @@
# Process this file with automake to produce Makefile.in.
-EXTRA_DIST = README mfs_file.c
-
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README \
+ mfs_file.c
diff --git a/tiff/contrib/mfs/Makefile.in b/tiff/contrib/mfs/Makefile.in
index 01d9e8e1f..0a3b8406e 100644
--- a/tiff/contrib/mfs/Makefile.in
+++ b/tiff/contrib/mfs/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -40,6 +39,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -59,7 +113,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = contrib/mfs
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -67,19 +120,34 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/config/mkinstalldirs README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -93,6 +161,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -140,6 +209,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -227,7 +297,11 @@ tiff_libs_private = @tiff_libs_private@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-EXTRA_DIST = README mfs_file.c
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README \
+ mfs_file.c
+
all: all-am
.SUFFIXES:
@@ -243,7 +317,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/mfs/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/mfs/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -267,11 +340,11 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-tags: TAGS
-TAGS:
+tags TAGS:
-ctags: CTAGS
-CTAGS:
+ctags CTAGS:
+
+cscope cscopelist:
distdir: $(DISTFILES)
@@ -407,15 +480,18 @@ uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tiff/contrib/pds/CMakeLists.txt b/tiff/contrib/pds/CMakeLists.txt
new file mode 100644
index 000000000..53a0e0568
--- /dev/null
+++ b/tiff/contrib/pds/CMakeLists.txt
@@ -0,0 +1,30 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+extra_dist(
+ README
+ tif_imageiter.c
+ tif_imageiter.h
+ tif_pdsdirread.c
+ tif_pdsdirwrite.c)
diff --git a/tiff/contrib/pds/Makefile.am b/tiff/contrib/pds/Makefile.am
index b3c145d53..435e2b33d 100644
--- a/tiff/contrib/pds/Makefile.am
+++ b/tiff/contrib/pds/Makefile.am
@@ -23,5 +23,10 @@
# Process this file with automake to produce Makefile.in.
-EXTRA_DIST = README tif_imageiter.c tif_imageiter.h tif_pdsdirread.c tif_pdsdirwrite.c
-
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README \
+ tif_imageiter.c \
+ tif_imageiter.h \
+ tif_pdsdirread.c \
+ tif_pdsdirwrite.c
diff --git a/tiff/contrib/pds/Makefile.in b/tiff/contrib/pds/Makefile.in
index 499da0401..29e48aa3d 100644
--- a/tiff/contrib/pds/Makefile.in
+++ b/tiff/contrib/pds/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -40,6 +39,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -59,7 +113,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = contrib/pds
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -67,19 +120,34 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/config/mkinstalldirs README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -93,6 +161,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -140,6 +209,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -227,7 +297,14 @@ tiff_libs_private = @tiff_libs_private@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-EXTRA_DIST = README tif_imageiter.c tif_imageiter.h tif_pdsdirread.c tif_pdsdirwrite.c
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README \
+ tif_imageiter.c \
+ tif_imageiter.h \
+ tif_pdsdirread.c \
+ tif_pdsdirwrite.c
+
all: all-am
.SUFFIXES:
@@ -243,7 +320,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/pds/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/pds/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -267,11 +343,11 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-tags: TAGS
-TAGS:
+tags TAGS:
-ctags: CTAGS
-CTAGS:
+ctags CTAGS:
+
+cscope cscopelist:
distdir: $(DISTFILES)
@@ -407,15 +483,18 @@ uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tiff/contrib/ras/CMakeLists.txt b/tiff/contrib/ras/CMakeLists.txt
new file mode 100644
index 000000000..b19a04fa4
--- /dev/null
+++ b/tiff/contrib/ras/CMakeLists.txt
@@ -0,0 +1,28 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+extra_dist(
+ README
+ ras2tif.c
+ tif2ras.c)
diff --git a/tiff/contrib/ras/Makefile.am b/tiff/contrib/ras/Makefile.am
index 948094474..26617edfe 100644
--- a/tiff/contrib/ras/Makefile.am
+++ b/tiff/contrib/ras/Makefile.am
@@ -23,5 +23,8 @@
# Process this file with automake to produce Makefile.in.
-EXTRA_DIST = README ras2tif.c tif2ras.c
-
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README \
+ ras2tif.c \
+ tif2ras.c
diff --git a/tiff/contrib/ras/Makefile.in b/tiff/contrib/ras/Makefile.in
index 15c33bfbf..67075acb5 100644
--- a/tiff/contrib/ras/Makefile.in
+++ b/tiff/contrib/ras/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -40,6 +39,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -59,7 +113,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = contrib/ras
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -67,19 +120,34 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/config/mkinstalldirs README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -93,6 +161,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -140,6 +209,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -227,7 +297,12 @@ tiff_libs_private = @tiff_libs_private@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-EXTRA_DIST = README ras2tif.c tif2ras.c
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README \
+ ras2tif.c \
+ tif2ras.c
+
all: all-am
.SUFFIXES:
@@ -243,7 +318,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/ras/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/ras/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -267,11 +341,11 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-tags: TAGS
-TAGS:
+tags TAGS:
-ctags: CTAGS
-CTAGS:
+ctags CTAGS:
+
+cscope cscopelist:
distdir: $(DISTFILES)
@@ -407,15 +481,18 @@ uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tiff/contrib/stream/CMakeLists.txt b/tiff/contrib/stream/CMakeLists.txt
new file mode 100644
index 000000000..c874ff64a
--- /dev/null
+++ b/tiff/contrib/stream/CMakeLists.txt
@@ -0,0 +1,28 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+extra_dist(
+ README
+ tiffstream.cpp
+ tiffstream.h)
diff --git a/tiff/contrib/stream/Makefile.am b/tiff/contrib/stream/Makefile.am
index 1e7a8daba..0324e8656 100644
--- a/tiff/contrib/stream/Makefile.am
+++ b/tiff/contrib/stream/Makefile.am
@@ -23,5 +23,8 @@
# Process this file with automake to produce Makefile.in.
-EXTRA_DIST = README tiffstream.cpp tiffstream.h
-
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README \
+ tiffstream.cpp \
+ tiffstream.h
diff --git a/tiff/contrib/stream/Makefile.in b/tiff/contrib/stream/Makefile.in
index 7219550e2..a7e314ceb 100644
--- a/tiff/contrib/stream/Makefile.in
+++ b/tiff/contrib/stream/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -40,6 +39,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -59,7 +113,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = contrib/stream
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -67,19 +120,34 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/config/mkinstalldirs README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -93,6 +161,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -140,6 +209,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -227,7 +297,12 @@ tiff_libs_private = @tiff_libs_private@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-EXTRA_DIST = README tiffstream.cpp tiffstream.h
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README \
+ tiffstream.cpp \
+ tiffstream.h
+
all: all-am
.SUFFIXES:
@@ -243,7 +318,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/stream/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/stream/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -267,11 +341,11 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-tags: TAGS
-TAGS:
+tags TAGS:
-ctags: CTAGS
-CTAGS:
+ctags CTAGS:
+
+cscope cscopelist:
distdir: $(DISTFILES)
@@ -407,15 +481,18 @@ uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tiff/contrib/tags/CMakeLists.txt b/tiff/contrib/tags/CMakeLists.txt
new file mode 100644
index 000000000..9945da764
--- /dev/null
+++ b/tiff/contrib/tags/CMakeLists.txt
@@ -0,0 +1,32 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+extra_dist(
+ README
+ listtif.c
+ maketif.c
+ xtif_dir.c
+ xtiffio.h
+ xtiffiop.h)
+
diff --git a/tiff/contrib/tags/Makefile.am b/tiff/contrib/tags/Makefile.am
index 9d92444f2..67d996790 100644
--- a/tiff/contrib/tags/Makefile.am
+++ b/tiff/contrib/tags/Makefile.am
@@ -23,5 +23,11 @@
# Process this file with automake to produce Makefile.in.
-EXTRA_DIST = README listtif.c maketif.c xtif_dir.c xtiffio.h xtiffiop.h
-
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README \
+ listtif.c \
+ maketif.c \
+ xtif_dir.c \
+ xtiffio.h \
+ xtiffiop.h
diff --git a/tiff/contrib/tags/Makefile.in b/tiff/contrib/tags/Makefile.in
index 41bbd1d81..ec8302c6a 100644
--- a/tiff/contrib/tags/Makefile.in
+++ b/tiff/contrib/tags/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -40,6 +39,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -59,7 +113,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = contrib/tags
-DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -67,19 +120,34 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/config/mkinstalldirs README
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -93,6 +161,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -140,6 +209,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -227,7 +297,15 @@ tiff_libs_private = @tiff_libs_private@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-EXTRA_DIST = README listtif.c maketif.c xtif_dir.c xtiffio.h xtiffiop.h
+EXTRA_DIST = \
+ CMakeLists.txt \
+ README \
+ listtif.c \
+ maketif.c \
+ xtif_dir.c \
+ xtiffio.h \
+ xtiffiop.h
+
all: all-am
.SUFFIXES:
@@ -243,7 +321,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/tags/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/tags/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -267,11 +344,11 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-tags: TAGS
-TAGS:
+tags TAGS:
-ctags: CTAGS
-CTAGS:
+ctags CTAGS:
+
+cscope cscopelist:
distdir: $(DISTFILES)
@@ -407,15 +484,18 @@ uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tiff/contrib/win_dib/CMakeLists.txt b/tiff/contrib/win_dib/CMakeLists.txt
new file mode 100644
index 000000000..11d124f5d
--- /dev/null
+++ b/tiff/contrib/win_dib/CMakeLists.txt
@@ -0,0 +1,30 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+extra_dist(
+ Makefile.w95
+ README.Tiffile
+ README.tiff2dib
+ Tiffile.cpp
+ tiff2dib.c)
diff --git a/tiff/contrib/win_dib/Makefile.am b/tiff/contrib/win_dib/Makefile.am
index 2bdccd0f6..50a1dab06 100644
--- a/tiff/contrib/win_dib/Makefile.am
+++ b/tiff/contrib/win_dib/Makefile.am
@@ -23,5 +23,10 @@
# Process this file with automake to produce Makefile.in.
-EXTRA_DIST = Makefile.w95 README.Tiffile README.tiff2dib Tiffile.cpp tiff2dib.c
-
+EXTRA_DIST = \
+ CMakeLists.txt \
+ Makefile.w95 \
+ README.Tiffile \
+ README.tiff2dib \
+ Tiffile.cpp \
+ tiff2dib.c
diff --git a/tiff/contrib/win_dib/Makefile.in b/tiff/contrib/win_dib/Makefile.in
index 98fd69f98..478057861 100644
--- a/tiff/contrib/win_dib/Makefile.in
+++ b/tiff/contrib/win_dib/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -40,6 +39,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -59,7 +113,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = contrib/win_dib
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -67,19 +120,34 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -93,6 +161,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -140,6 +209,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -227,7 +297,14 @@ tiff_libs_private = @tiff_libs_private@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-EXTRA_DIST = Makefile.w95 README.Tiffile README.tiff2dib Tiffile.cpp tiff2dib.c
+EXTRA_DIST = \
+ CMakeLists.txt \
+ Makefile.w95 \
+ README.Tiffile \
+ README.tiff2dib \
+ Tiffile.cpp \
+ tiff2dib.c
+
all: all-am
.SUFFIXES:
@@ -243,7 +320,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/win_dib/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign contrib/win_dib/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -267,11 +343,11 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-tags: TAGS
-TAGS:
+tags TAGS:
-ctags: CTAGS
-CTAGS:
+ctags CTAGS:
+
+cscope cscopelist:
distdir: $(DISTFILES)
@@ -407,15 +483,18 @@ uninstall-am:
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic \
- mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tiff/html/CMakeLists.txt b/tiff/html/CMakeLists.txt
new file mode 100644
index 000000000..5f34e1e55
--- /dev/null
+++ b/tiff/html/CMakeLists.txt
@@ -0,0 +1,87 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+set(docfiles
+ addingtags.html
+ bugs.html
+ build.html
+ contrib.html
+ document.html
+ images.html
+ index.html
+ internals.html
+ intro.html
+ libtiff.html
+ misc.html
+ support.html
+ TIFFTechNote2.html
+ tools.html
+ v3.4beta007.html
+ v3.4beta016.html
+ v3.4beta018.html
+ v3.4beta024.html
+ v3.4beta028.html
+ v3.4beta029.html
+ v3.4beta031.html
+ v3.4beta032.html
+ v3.4beta033.html
+ v3.4beta034.html
+ v3.4beta035.html
+ v3.4beta036.html
+ v3.5.1.html
+ v3.5.2.html
+ v3.5.3.html
+ v3.5.4.html
+ v3.5.5.html
+ v3.5.6-beta.html
+ v3.5.7.html
+ v3.6.0.html
+ v3.6.1.html
+ v3.7.0alpha.html
+ v3.7.0beta.html
+ v3.7.0beta2.html
+ v3.7.0.html
+ v3.7.1.html
+ v3.7.2.html
+ v3.7.3.html
+ v3.7.4.html
+ v3.8.0.html
+ v3.8.1.html
+ v3.8.2.html
+ v3.9.0beta.html
+ v3.9.1.html
+ v3.9.2.html
+ v4.0.0.html
+ v4.0.1.html
+ v4.0.2.html
+ v4.0.3.html
+ v4.0.4beta.html)
+
+install(FILES ${docfiles}
+ DESTINATION "${LIBTIFF_DOCDIR}/html")
+
+add_subdirectory(images)
+add_subdirectory(man)
+
+extra_dist(${docfiles})
diff --git a/tiff/html/Makefile.am b/tiff/html/Makefile.am
index 9a0e37e11..01549ba21 100644
--- a/tiff/html/Makefile.am
+++ b/tiff/html/Makefile.am
@@ -76,9 +76,19 @@ docfiles = \
v3.9.0beta.html \
v3.9.1.html \
v3.9.2.html \
- v4.0.0.html
+ v4.0.0.html \
+ v4.0.1.html \
+ v4.0.2.html \
+ v4.0.3.html \
+ v4.0.4beta.html \
+ v4.0.4.html \
+ v4.0.5.html \
+ v4.0.6.html \
+ v4.0.7.html
dist_doc_DATA = $(docfiles)
SUBDIRS = images man
+EXTRA_DIST = \
+ CMakeLists.txt
diff --git a/tiff/html/Makefile.in b/tiff/html/Makefile.in
index 96cafb92d..3cb22e6d9 100644
--- a/tiff/html/Makefile.in
+++ b/tiff/html/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -42,6 +41,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -61,8 +115,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = html
-DIST_COMMON = $(dist_doc_DATA) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -70,26 +122,40 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(dist_doc_DATA) \
+ $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
-RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
- html-recursive info-recursive install-data-recursive \
- install-dvi-recursive install-exec-recursive \
- install-html-recursive install-info-recursive \
- install-pdf-recursive install-ps-recursive install-recursive \
- installcheck-recursive installdirs-recursive pdf-recursive \
- ps-recursive uninstall-recursive
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -121,12 +187,34 @@ am__installdirs = "$(DESTDIR)$(docdir)"
DATA = $(dist_doc_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
distdir
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
am__relativize = \
dir0=`pwd`; \
@@ -165,6 +253,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -212,6 +301,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -349,10 +439,21 @@ docfiles = \
v3.9.0beta.html \
v3.9.1.html \
v3.9.2.html \
- v4.0.0.html
+ v4.0.0.html \
+ v4.0.1.html \
+ v4.0.2.html \
+ v4.0.3.html \
+ v4.0.4beta.html \
+ v4.0.4.html \
+ v4.0.5.html \
+ v4.0.6.html \
+ v4.0.7.html
dist_doc_DATA = $(docfiles)
SUBDIRS = images man
+EXTRA_DIST = \
+ CMakeLists.txt
+
all: all-recursive
.SUFFIXES:
@@ -368,7 +469,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign html/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign html/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -394,8 +494,11 @@ clean-libtool:
-rm -rf .libs _libs
install-dist_docDATA: $(dist_doc_DATA)
@$(NORMAL_INSTALL)
- test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -412,22 +515,25 @@ uninstall-dist_docDATA:
dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-# (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-$(RECURSIVE_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
@@ -442,57 +548,12 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-$(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -508,12 +569,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -525,15 +581,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -542,6 +594,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -578,13 +645,10 @@ distdir: $(DISTFILES)
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || exit 1; \
- fi; \
- done
- @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
- if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
@@ -708,23 +772,23 @@ ps-am:
uninstall-am: uninstall-dist_docDATA
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
- install-am install-strip tags-recursive
-
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am check check-am clean clean-generic clean-libtool \
- ctags ctags-recursive distclean distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dist_docDATA install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
- ps ps-am tags tags-recursive uninstall uninstall-am \
- uninstall-dist_docDATA
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \
+ check-am clean clean-generic clean-libtool cscopelist-am ctags \
+ ctags-am distclean distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_docDATA install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+ uninstall-am uninstall-dist_docDATA
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tiff/html/addingtags.html b/tiff/html/addingtags.html
index 452821c2d..4e89205b6 100644
--- a/tiff/html/addingtags.html
+++ b/tiff/html/addingtags.html
@@ -285,7 +285,7 @@ is room for, just increase <TT>FIELD_SETLONGS</TT> at the top of
<HR>
-Last updated: $Date: 2004/09/10 14:43:18 $
+Last updated: $Date: 2016-09-25 20:05:44 $
</BODY>
diff --git a/tiff/html/bugs.html b/tiff/html/bugs.html
index f09b7550b..07fc78b89 100644
--- a/tiff/html/bugs.html
+++ b/tiff/html/bugs.html
@@ -31,9 +31,9 @@ If you'd like to enter a new bug, you can do so at
If you'd like to inform us about some kind of security issue that should not
be disclosed for a period of time, then you can contact maintainers directly.
Send a copies of your report to the following people: Frank Warmerdam
-<a href="mailto:warmerdam@pobox.com">&lt;warmerdam@pobox.com&gt;</a>,
-Andrey Kiselev
-<a href="mailto:dron@ak4719.spb.edu">&lt;dron@ak4719.spb.edu&gt;</a>.
+<a href="mailto:warmerdam@pobox.com">&lt;warmerdam@pobox.com&gt;</a> and
+Bob Friesenhahn
+<a href="mailto:bfriesen@simple.dallas.tx.us">&lt;bfriesen@simple.dallas.tx.us&gt;</a>.
<P>
Of course, reporting bugs is no substitute for discussion. The
@@ -45,9 +45,7 @@ and managing your access to the list is at:<p>
<a href="http://lists.maptools.org/mailman/listinfo/tiff">http://lists.maptools.org/mailman/listinfo/tiff</a><P>
Posts to the list are only accepted from members of the list in order
-to limit the amount of spam propagated. Also, to be approved as a member
-you will need to email the list administrator with a brief description of
-why you are interested in TIFF so we can weed out spammers.<p>
+to limit the amount of spam propagated.<p>
A <A HREF="http://www.awaresystems.be/imaging/tiff/tml.html">Long Term
Archive</a> including recent messages, and most messages back to 1993,
@@ -58,6 +56,6 @@ Systems</a>. <p>
<HR>
-Last updated: $Date: 2008/09/03 08:05:04 $
+Last updated: $Date: 2016-04-08 02:34:03 $
</BODY>
</HTML>
diff --git a/tiff/html/build.html b/tiff/html/build.html
index ad8e1893d..f52b09664 100644
--- a/tiff/html/build.html
+++ b/tiff/html/build.html
@@ -10,11 +10,12 @@
"images/cramps.gif" width="159" height="203" align="left" border=
"1" hspace="6"> Building the Software Distribution</font></h1>
<ul>
-<li><a href="#UNIX">Building on a UNIX system</a>.</li>
-<li><a href="#PC">Building on an MS-DOS or Windows system</a>.</li>
+<li><a href="#CMAKE">Building on all systems with CMake</a>.</li>
+<li><a href="#UNIX">Building on a UNIX system with Autoconf</a>.</li>
+<li><a href="#PC">Building on an MS-DOS or Windows system with nmake</a>.</li>
<li><a href="#VMS">Building on a VMS system</a>.</li>
<li><a href="#Other">Building the Software on Other
-Systems</a></li>
+Systems.</a></li>
</ul>
<br clear="left">
This chapter contains step-by-step instructions on how to configure
@@ -22,8 +23,216 @@ and build the TIFF software distribution. The software is most
easily built on a UNIX system, but with a little bit of work it can
easily be built and used on other non-UNIX platforms.
<hr>
+<a name="CMake" id="CMAKE"></a>
+<h2>Building on all systems with CMake</h2> CMake may be used to
+generate build files for most common build systems and IDEs, and
+supports all UNIX-like systems as well as Windows. See
+the <a href="http://www.cmake.org/">CMake website</a> for further
+details. To build the software on you need to first run
+<tt>cmake</tt> to configure the build and generate the system-specific
+build files. This reads the top-level <tt>CMakeLists.txt</tt> file,
+which probes the target system for necessary tools and functions,
+checks any options you specified to configure the build, and then
+outputs build files configured for your system. If using <tt>Unix
+Makefiles</tt>, once configuration is done, you simply
+run <tt>make</tt> (or <tt>gmake</tt>) to build the software and
+then <tt>make install</tt> to do the installation. For other build
+systems, you do the equivalent steps with the tool for that system.
+For example, on any UNIX system:
+<div style="margin-left: 2em">
+<pre>
+% <b>cd ./tiff-4.0.5</b>
+% <b>cmake</b>
+ <i>...lots of messages...</i>
+% <b>make</b>
+ <i>...lots of messages...</i>
+% <b>make test</b>
+ <i>...lots of messages...</i>
+# <b>make install</b>
+</pre></div>
+Building is dependent on a <tt>make</tt> utility and a C
+(and optionally a C++ compiler), so you will need these tools.
+<p>In general, the software is designed such that the following
+targets will always be available</p>
+<div style="margin-left: 2em">
+<pre>
+make [all] build stuff
+make test run the test suite
+make install build and install stuff
+make clean remove object files, executables and cruft
+</pre></div>
+<a name="CMakeBuildTrees" id= "CMakeBuildTrees"></a>
+<hr width="65%" align="right">
+<h3>Build Trees</h3>
+There are two schemes for configuring and building the software. If
+you intend to build the software for only one target system, you
+can configure the software so that it is built in the same
+directories as the source code.
+<div style="margin-left: 2em">
+<pre>
+% <b>gzip -dc tiff-4.0.5.tar.gz | tar -xf -</b>
+% <b>cd ./tiff-4.0.5</b>
+% <b>cmake</b>
+% <b>make</b>
+% <b>make test</b>
+% <b>make install</b>
+</pre></div>
+<p>Otherwise, you can configure a build tree that is parallel to
+the source tree hierarchy (or in some completely different place)
+but which contains only configured files and files created during
+the build procedure.</p>
+<div style="margin-left: 2em">
+<pre>
+% <b>gzip -dc tiff-4.0.5.tar.gz | tar -xf -</b>
+% <b>mkdir tiff-4.0.5-build</b>
+% <b>cd ./tiff-4.0.5-build</b>
+% <b>cmake ../tiff-4.0.5</b>
+% <b>make</b>
+% <b>make test</b>
+% <b>make install</b>
+</pre></div>
+This second scheme is useful for:
+<ul>
+<li>building multiple targets from a single source tree</li>
+<li>building from a read-only source tree (e.g. if you receive the
+distribution on CD-ROM)</li>
+<li>sharing the source files via a network, but building on
+multiple systems</li>
+<li>keeping the source tree clean
+(unlike <tt>autoconf</tt>, <tt>cmake</tt> does not provide
+a <tt>distclean</tt> target, so out of source builds are
+recommended)</li>
+</ul>
+<a name="CMakeGenerators" id= "CMakeGenerators"></a>
+<hr width="65%" align="right">
+<h3>Generators</h3> The default generator for UNIX is <tt>Unix
+Makefiles</tt>, and on Windows is <tt>NMake Makefiles</tt> or MSBuild
+depending upon the setup. Run <b>cmake --help</b> to list all the
+generators available for your platform. For example, to use the Ninja
+<a href="https://martine.github.io/ninja/">build system</a> on UNIX or
+Windows:
+<pre>
+<b>cmake -G Ninja</b>
+<b>cmake --build .</b>
+<b>ctest -V</b>
+<b>cmake --build . --target install</b>
+</pre>
+<p>Note that <b>cmake --build .</b> is a build-system-independent way
+of building a target; you can always use the build system directly.</p>
+<p>Alternatively, using the MSBuild system on Windows (64-bit Release
+build with VS2013):
+</p>
+<pre>
+<b>cmake -G "Visual Studio 12 2013 Win64"</b>
+<b>cmake --build . --config Release</b>
+<b>ctest -V -C Release</b>
+<b>cmake --build . --config Release --target install</b>
+</pre>
+With the above configuration, it's also possible to open the generated
+solution file with the Visual Studio IDE as well as building on the
+command-line.
+<a name="CMakeConfigOptions" id="CMakeConfigOptions"></a>
+<hr width="65%" align="right">
+<h3>Configuration Options</h3>
+The configuration process is critical to the proper compilation,
+installation, and operation of the
+software. The <tt>CMakeLists.txt</tt> script runs a series of tests to
+decide whether or not the target system supports required
+functionality and, if it does not, whether it can emulate or
+workaround the missing functions. After running <tt>cmake</tt>, check
+the <tt>CMakeCache.txt</tt> file; this contains all the results of the
+checks performed and the options set by the user. If <tt>cmake</tt>
+failed to run, check <tt>CMakeFiles/CMakeOutput.log</tt>
+and <tt>CMakeFiles/CMakeError.log</tt>; these should record the error
+which caused the failure.
+<p>A second function of the configure script is to set the default
+configuration parameters for the software. Of particular note are the
+directories where the software is to be installed. By default the
+software is installed in the <b>/usr/local</b> hierarchy. To change
+this behaviour the appropriate parameters can be specified on the
+command line. Run <b>cmake --help</b> to get a full list of possible
+options, and <b>cmake -LH</b> to list all the configurable options for
+this software package, or <b>cmake -LAH</b> to show all advanced
+options in addition. Standard installation related options are shown
+below.</p>
+<pre>
+<tt>
+Installation directories:
+ CMAKE_INSTALL_PREFIX
+
+Fine tuning of the installation directories:
+ CMAKE_INSTALL_BINDIR user executables [PREFIX/bin]
+ CMAKE_INSTALL_SBINDIR system admin executables [PREFIX/sbin]
+ CMAKE_INSTALL_LIBEXECDIR program executables [PREFIX/libexec]
+ CMAKE_INSTALL_SYSCONFDIR read-only single-machine data [PREFIX/etc]
+ CMAKE_INSTALL_SHAREDSTATEDIR modifiable architecture-independent data [PREFIX/com]
+ CMAKE_INSTALL_LOCALSTATEDIR modifiable single-machine data [PREFIX/var]
+ CMAKE_INSTALL_LIBDIR object code libraries [PREFIX/lib]
+ CMAKE_INSTALL_INCLUDEDIR C header files [PREFIX/include]
+ CMAKE_INSTALL_OLDINCLUDEDIR C header files for non-gcc [/usr/include]
+ CMAKE_INSTALL_DATAROOTDIR read-only arch.-independent data root [PREFIX/share]
+ CMAKE_INSTALL_DATADIR read-only architecture-independent data [DATAROOTDIR]
+ CMAKE_INSTALL_LOCALEDIR locale-dependent data [DATAROOTDIR/locale]
+ CMAKE_INSTALL_MANDIR man documentation [DATAROOTDIR/man]
+ CMAKE_INSTALL_DOCDIR documentation root [DATAROOTDIR/doc/tiff]
+</tt>
+</pre>
+Also see the
+CMake <a href="http://www.cmake.org/cmake/help/v3.3/">documentation</a>
+for <a href="http://www.cmake.org/cmake/help/v3.3/manual/cmake-variables.7.html"
+>additional variables</a> which may be set.
+<a name="CMakePackages" id="CMakePackages"></a>
+<hr width="65%" align="right">
+<h3>Configuring Optional Packages/Support</h3>
+The TIFF software comes with several packages that are installed
+only as needed, or only if specifically configured at the time the
+configure script is run. Packages can be configured via the
+<b>cmake</b> commandline parameters.
+<dl>
+<dt><i>Static/Shared Objects Support</i></dt>
+<dd><tt>BUILD_SHARED_LIBS[=ON|OFF]&nbsp;&nbsp;&nbsp;&nbsp;build shared
+libraries [default=ON]</tt><br>
+<p>This option controls whether or not to configure the software
+to build a shared and static binaries for the TIFF library. Use of
+shared libraries can significantly reduce the disk space needed for
+users of the TIFF software. If shared libraries are not used then
+the code is statically linked into each application that uses it.
+</p>
+<p><tt>ld-version-script[=ON|OFF]&nbsp;&nbsp;Enable linker version
+script (default is ON)</tt></p>
+<p>Add shared library symbol versioning on ELF-based systems (e.g.
+Linux and FreeBSD) which use the GNU linker. This is needed if
+several major versions of libtiff might be loaded at once into the
+same program.</p>
+</dd>
+<dt><i>JPEG Support</i></dt>
+<dd><tt>jpeg[=ON|OFF]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enable IJG JPEG
+library usage (required for JPEG compression, enabled by default)<br>
+JPEG_INCLUDE_DIR=DIR&nbsp;location of IJG
+JPEG library headers<br>
+JPEG_LIBRARY=DIR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;location of IJG JPEG
+library binary)</tt></dd>
+<dd>The <tt>JPEG</tt> package enables support for the handling of
+TIFF images with JPEG-encoded data. Support for JPEG-encoded data
+requires the Independent JPEG Group (IJG) <tt>libjpeg</tt>
+distribution; this software is available at <a href=
+"http://www.ijg.org/">http://www.ijg.org/</a>. <b>cmake</b>
+script automatically tries to search for a working IJG JPEG
+installation. If it fails to find library, JPEG support will be
+automatically disabled. If you want specify the exact paths to
+library binary and headers, use above options for that.</dd>
+<dt><i>ZIP Support</i></dt>
+<dd>The <tt>ZIP</tt> support enables support for the handling of TIFF
+images with deflate-encoded data (enabled by default if
+available). Support for deflate-encoded data requires the freely
+available <tt>zlib</tt> distribution written by Jean-loup Gailly and
+Mark Adler; this software is available at <a href=
+"http://www.zlib.org/">http://www.zlib.org/</a>.</dd>
+</dl>
+<a name="Sample" id="Sample"></a>
+<hr width="65%" align="right">
<a name="UNIX" id="UNIX"></a>
-<h2>Building on a UNIX System</h2>
+<h2>Building on a UNIX System with Autoconf</h2>
To build the software on a UNIX system you need to first run the
configure shell script that is located in the top level of the
source directory. This script probes the target system for
@@ -33,14 +242,14 @@ simply run <tt>make</tt> (or <tt>gmake</tt>) to build the software
and then <tt>make install</tt> to do the installation; for example:
<div style="margin-left: 2em">
<pre>
-hyla% <b>cd ./tiff-4.0.0</b>
-hyla% <b>./configure</b>
+% <b>cd ./tiff-4.0.5</b>
+% <b>./configure</b>
<i>...lots of messages...</i>
-hyla% <b>make</b>
+% <b>make</b>
<i>...lots of messages...</i>
-hyla% <b>make check</b>
+% <b>make check</b>
<i>...lots of messages...</i>
-hyla# <b>make install</b>
+# <b>make install</b>
</pre></div>
Supplied makefiles are dependent on a <tt>make</tt> utility and a C
(and optionally a C++ compiler), so you will need these tools.
@@ -50,8 +259,8 @@ should be ``<i>make-able</i>'' in each directory:</p>
<pre>
make [all] build stuff
make check run the test suite
-make install build&amp;install stuff
-make clean remove .o files, executables and cruft
+make install build and install stuff
+make clean remove object files, executables and cruft
make distclean remove everything, that can be recreated
</pre></div>
Note that after running "<tt>make distclean</tt>" the
@@ -66,12 +275,12 @@ can configure the software so that it is built in the same
directories as the source code.
<div style="margin-left: 2em">
<pre>
-hyla% <b>gzip -dc tiff-4.0.0.tar.gz | tar -xf -</b>
-hyla% <b>cd ./tiff-4.0.0</b>
-hyla% <b>./configure</b>
-hyla% <b>make</b>
-hyla% <b>make check</b>
-hyla% <b>make install</b>
+% <b>gzip -dc tiff-4.0.5.tar.gz | tar -xf -</b>
+% <b>cd ./tiff-4.0.5</b>
+% <b>./configure</b>
+% <b>make</b>
+% <b>make check</b>
+% <b>make install</b>
</pre></div>
<p>Otherwise, you can configure a build tree that is parallel to
the source tree hierarchy (or in some completely different place)
@@ -79,13 +288,13 @@ but which contains only configured files and files created during
the build procedure.</p>
<div style="margin-left: 2em">
<pre>
-hyla% <b>gzip -dc tiff-4.0.0.tar.gz | tar -xf -</b>
-hyla% <b>mkdir tiff-4.0.0-build</b>
-hyla% <b>cd ./tiff-4.0.0-build</b>
-hyla% <b>../tiff-4.0.0/configure</b>
-hyla% <b>make</b>
-hyla% <b>make check</b>
-hyla% <b>make install</b>
+% <b>gzip -dc tiff-4.0.5.tar.gz | tar -xf -</b>
+% <b>mkdir tiff-4.0.5-build</b>
+% <b>cd ./tiff-4.0.5-build</b>
+% <b>../tiff-4.0.5/configure</b>
+% <b>make</b>
+% <b>make check</b>
+% <b>make install</b>
</pre></div>
This second scheme is useful for:
<ul>
@@ -170,7 +379,7 @@ libraries [default=yes]</tt>
<p>These options control whether or not to configure the software
to build a shared and static binaries for the TIFF library. Use of
shared libraries can significantly reduce the disk space needed for
-users of the TIFF software. If shared libarries are not used then
+users of the TIFF software. If shared libraries are not used then
the code is statically linked into each application that uses it.
By default both types of binaries is configured.</p>
<p>
@@ -199,7 +408,7 @@ distribution; this software is available at <a href=
"http://www.ijg.org/">http://www.ijg.org/</a>. <b>configure</b>
script automatically tries to search for a working IJG JPEG
installation. If it fails to find library, JPEG support will be
-automatically disabled.If you want specify the exact paths to
+automatically disabled. If you want specify the exact paths to
library binary and headers, use above switches for that.</dd>
<dt><i>ZIP Support</i></dt>
<dd>The <tt>ZIP</tt> support enables support for the handling of
@@ -215,8 +424,7 @@ configured.</dd>
<a name="Sample" id="Sample"></a>
<hr width="65%" align="right">
<a name="PC" id="PC"></a>
-<h2>Building the Software under Windows 95/98/NT/2000 with MS
-VC++</h2>
+<h2>Building the Software under Windows 2000/XP/7/8/10 with nmake</h2>
With Microsoft Visual C++ installed, and properly configured for
commandline use (you will likely need to source VCVARS32.BAT in
AUTOEXEC.bAT or somewhere similar) you should be able to use the
@@ -228,42 +436,47 @@ conventions, which work with MSVC but do not work with Windows
can extract the files using Windows normal line termination
conventions with a command similar to:</p>
<pre>
- unzip -aa -a tiff-4.0.0.zip
+ unzip -aa -a tiff-4.0.5.zip
</pre>
-<p>By default libtiff expects that a pre-built zlib and jpeg
-library are provided by the user. If this is not the case, then you
-may edit libtiff\tiffconf.h using a text editor (e.g. notepad) and
-comment out the entries for JPEG_SUPPORT, PIXARLOG_SUPPORT, and
-ZIP_SUPPORT. Ignore the comment at the top of the file which says
-that it has no influence on the build, because the statement is not
-true for Windows. However, by taking this approach, libtiff will
-not be able to open some TIFF files.</p>
+<p>By default the nmake-based libtiff build does not depend on any
+additional libraries. Normally libtiff should be built with at least
+JPEG and ZIP support so that it can open JPEG and ZIP-compressed TIFF
+files. In order to add additional libraries (e.g. libjpeg, zlib,
+jbigkit), build those libraries according to their own particular
+build instructions, and then edit 'nmake.opt' (using a capable
+plain-text editor) to enable use of the libraries, including
+specifying where the libraries are installed. It is also necessary to
+edit libtiff/tiffconf.vc.h to enable the related configuration defines
+(<em>JPEG_SUPPORT</em>, <em>OJPEG_SUPPORT</em>, <em>PIXARLOG_SUPPORT</em>,
+<em>ZIP_SUPPORT</em>), or to disable features which are normally
+included by default. Ignore the comment at the top of the
+libtiff/tiffconf.vc.h file which says that it has no influence on the
+build, because the statement is not true for Windows. Please note that
+the nmake build copies tiffconf.vc.h to tiffconf.h, and copies
+tif_config.vc.h to tif_config.h, overwriting any files which may be
+present. Likewise, the 'nmake clean' step removes those files.</p>
<p>To build using the provided makefile.vc you may use:</p>
<pre>
- C:\tiff-4.0.0&gt; nmake /f makefile.vc clean
- C:\tiff-4.0.0&gt; nmake /f makefile.vc
+ C:\tiff-4.0.5&gt; nmake /f makefile.vc clean
+ C:\tiff-4.0.5&gt; nmake /f makefile.vc
or (the hard way)
- C:\tiff-4.0.0&gt; cd port
- C:\tiff-4.0.0\port&gt; nmake /f makefile.vc clean
- C:\tiff-4.0.0\port&gt; nmake /f makefile.vc
- C:\tiff-4.0.0&gt; cd ../libtiff
- C:\tiff-4.0.0\libtiff&gt; nmake /f makefile.vc clean
- C:\tiff-4.0.0\libtiff&gt; nmake /f makefile.vc
- C:\tiff-4.0.0\libtiff&gt; cd ..\tools
- C:\tiff-4.0.0\tools&gt; nmake /f makefile.vc clean
- C:\tiff-4.0.0\tools&gt; nmake /f makefile.vc
+ C:\tiff-4.0.5&gt; cd port
+ C:\tiff-4.0.5\port&gt; nmake /f makefile.vc clean
+ C:\tiff-4.0.5\port&gt; nmake /f makefile.vc
+ C:\tiff-4.0.5&gt; cd ../libtiff
+ C:\tiff-4.0.5\libtiff&gt; nmake /f makefile.vc clean
+ C:\tiff-4.0.5\libtiff&gt; nmake /f makefile.vc
+ C:\tiff-4.0.5\libtiff&gt; cd ..\tools
+ C:\tiff-4.0.5\tools&gt; nmake /f makefile.vc clean
+ C:\tiff-4.0.5\tools&gt; nmake /f makefile.vc
</pre>
-<p>This will build the library file
-<tt>libtiff\libtiff\libtiff.lib</tt>. This can be used in Win32
-programs. You may want to adjust the build options before start
-compiling. All parameters contained in the <tt>nmake.opt</tt>
-file.This is a plain text file you can open with your favorite text
-editor.</p>
+<p>This will build the library
+file <tt>libtiff\libtiff\libtiff.lib</tt>.</p>
<p>The makefile also builds a DLL (libtiff.dll) with an associated
-import library (libtiff_i.lib). Any builds using libtiff will need
-to include the LIBTIFF\LIBTIFF directory in the include path.</p>
+import library (libtiff_i.lib). Any builds using libtiff will need to
+include the LIBTIFF\LIBTIFF directory in the include path.</p>
<p>The <tt>libtiff\tools\makefile.vc</tt> should build .exe's for
all the standard TIFF tool programs.</p>
<hr>
@@ -519,6 +732,6 @@ libtiff/mkspans.c program to generate black-white span tables
libtiff/mkversion.c program to generate libtiff/version.h.
</pre>
<hr>
-Last updated: $Date: 2012-02-18 21:36:31 $
+Last updated: $Date: 2015-08-29 15:30:11 $
</body>
</html>
diff --git a/tiff/html/contrib.html b/tiff/html/contrib.html
index d138900a8..f20a1cb37 100644
--- a/tiff/html/contrib.html
+++ b/tiff/html/contrib.html
@@ -203,7 +203,7 @@ their authors.
<P>
<HR>
-Last updated: $Date: 2006/01/03 01:42:30 $
+Last updated: $Date: 2016-09-25 20:05:44 $
</BODY>
</HTML>
diff --git a/tiff/html/document.html b/tiff/html/document.html
index 73fc8af3a..936635bc7 100644
--- a/tiff/html/document.html
+++ b/tiff/html/document.html
@@ -14,8 +14,8 @@ TIFF Documentation
<P>
A copy of the 6.0 specification is available from Adobe at
<A HREF="http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf">http://partners.adobe.com/public/developer/en/tiff/TIFF6.pdf</A>, or from the libtiff
-ftp site at <a href="ftp://ftp.remotesensing.org/pub/libtiff/doc/TIFF6.pdf">
-ftp://ftp.remotesensing.org/pub/libtiff/doc/TIFF6.pdf</A>.<p>
+ftp site at <a href="ftp://download.osgeo.org/libtiff/doc/TIFF6.pdf">
+ftp://download.osgeo.org/libtiff/doc/TIFF6.pdf</A>.<p>
<P>
Draft <a href="TIFFTechNote2.html">TIFF Technical Note #2</A> covers problems
@@ -45,7 +45,7 @@ a TIFF variation supporting files larger than 4GB.
<HR>
<ADDRESS>
- Last updated: $Date: 2006/07/10 18:13:52 $
+ Last updated: $Date: 2016-09-25 20:05:44 $
</ADDRESS>
</BODY>
diff --git a/tiff/html/images.html b/tiff/html/images.html
index 150ed0c42..b2c5664c0 100644
--- a/tiff/html/images.html
+++ b/tiff/html/images.html
@@ -22,8 +22,8 @@ the same directory as this software.
<P>
The latest archive of test images is located at
-<A HREF="ftp://ftp.remotesensing.org/pub/libtiff/pics-3.8.0.tar.gz">
-ftp://ftp.remotesensing.org/pub/libtiff/pics-3.8.0.tar.gz</A>
+<A HREF="ftp://download.osgeo.org/libtiff/pics-3.8.0.tar.gz">
+ftp://download.osgeo.org/libtiff/pics-3.8.0.tar.gz</A>
<P>
There are two other good sources for TIFF test images:
@@ -35,7 +35,7 @@ of images with different storage characteristics.
<P>
<HR>
-Last updated: $Date: 2006/01/02 23:50:44 $
+Last updated: $Date: 2016-09-25 20:05:44 $
</BODY>
</HTML>
diff --git a/tiff/html/images/CMakeLists.txt b/tiff/html/images/CMakeLists.txt
new file mode 100644
index 000000000..e25f9f62c
--- /dev/null
+++ b/tiff/html/images/CMakeLists.txt
@@ -0,0 +1,46 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+set(docfiles
+ back.gif
+ bali.jpg
+ cat.gif
+ cover.jpg
+ cramps.gif
+ dave.gif
+ info.gif
+ jello.jpg
+ jim.gif
+ note.gif
+ oxford.gif
+ quad.jpg
+ ring.gif
+ smallliz.jpg
+ strike.gif
+ warning.gif)
+
+install(FILES ${docfiles}
+ DESTINATION "${LIBTIFF_DOCDIR}/html/images")
+
+extra_dist(${docfiles})
diff --git a/tiff/html/images/Makefile.am b/tiff/html/images/Makefile.am
index 840e1495a..979c8582a 100644
--- a/tiff/html/images/Makefile.am
+++ b/tiff/html/images/Makefile.am
@@ -44,3 +44,6 @@ docfiles = \
warning.gif
dist_doc_DATA = $(docfiles)
+
+EXTRA_DIST = \
+ CMakeLists.txt
diff --git a/tiff/html/images/Makefile.in b/tiff/html/images/Makefile.in
index 775813333..80b74bfeb 100644
--- a/tiff/html/images/Makefile.in
+++ b/tiff/html/images/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -41,6 +40,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -60,8 +114,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = html/images
-DIST_COMMON = $(dist_doc_DATA) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -69,19 +121,32 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(dist_doc_DATA) \
+ $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -111,6 +176,9 @@ am__uninstall_files_from_dir = { \
}
am__installdirs = "$(DESTDIR)$(docdir)"
DATA = $(dist_doc_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -124,6 +192,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -171,6 +240,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -277,6 +347,9 @@ docfiles = \
warning.gif
dist_doc_DATA = $(docfiles)
+EXTRA_DIST = \
+ CMakeLists.txt
+
all: all-am
.SUFFIXES:
@@ -292,7 +365,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign html/images/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign html/images/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -318,8 +390,11 @@ clean-libtool:
-rm -rf .libs _libs
install-dist_docDATA: $(dist_doc_DATA)
@$(NORMAL_INSTALL)
- test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -334,11 +409,11 @@ uninstall-dist_docDATA:
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
-ctags: CTAGS
-CTAGS:
+ctags CTAGS:
+
+cscope cscopelist:
distdir: $(DISTFILES)
@@ -477,16 +552,19 @@ uninstall-am: uninstall-dist_docDATA
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dist_docDATA install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- uninstall uninstall-am uninstall-dist_docDATA
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_docDATA install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+ uninstall-am uninstall-dist_docDATA
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tiff/html/index.html b/tiff/html/index.html
index f5434dfae..71af0afa4 100644
--- a/tiff/html/index.html
+++ b/tiff/html/index.html
@@ -15,24 +15,20 @@
<hr>
<table cellspacing="0" cellpadding="0" border="0">
<tr>
- <th>Home Page</th>
- <td><a href="http://www.remotesensing.org/libtiff/" title="Home of the LibTIFF software">http://www.remotesensing.org/libtiff/</a></td>
+ <th>Home Page #1</th>
+ <td><a href="http://www.simplesystems.org/libtiff/" title="Home of the LibTIFF software">http://www.simplesystems.org/libtiff/</a></td>
</tr>
<tr>
- <th>Home Page Mirror</th>
+ <th>Home Page #2</th>
<td><a href="http://libtiff.maptools.org/" title="Mirror of the LibTIFF software">http://libtiff.maptools.org/</a></td>
</tr>
<tr>
<th>Latest Stable Release</th>
- <td><a href="v4.0.1.html">v4.0.1</a></td>
+ <td><a href="v4.0.7.html">v4.0.7</a></td>
</tr>
<tr>
<th>Master Download Site</th>
- <td><a href="http://download.osgeo.org/libtiff">download.osgeo.org</a>, directory libtiff</td>
- </tr>
- <tr>
- <th>Windows Binaries</th>
- <td><a href="http://gnuwin32.sourceforge.net/packages/libtiff.htm">GnuWin32 Project</a></td>
+ <td><a href="ftp://download.osgeo.org/libtiff">download.osgeo.org</a>, directory libtiff</td>
</tr>
<tr>
<th>Mailing List</th>
@@ -75,7 +71,8 @@
machines.
</p>
<p>
- The software was originally authored and maintained by Sam Leffler.
+ The software was originally authored and maintained by Sam Leffler
+ but has been maintained by a cast of others since 1999.
</p>
<p>
Questions should be sent to the TIFF mailing list:
@@ -89,7 +86,7 @@
<a href="http://pobox.com/~warmerdam">Frank Warmerdam</a>,
<a href="mailto:dron@ak4719.spb.edu">Andrey Kiselev</a>,
<a href="mailto:bfriesen@GraphicsMagick.org">Bob Friesenhahn</a>,
- Joris Van Damme and Lee Howard.
+ Joris Van Damme, Lee Howard and Even Rouault.
</p>
<p>
The following sections are included in this documentation:
@@ -117,7 +114,7 @@
</ul>
<hr>
<p>
- Last updated $Date: 2012-02-18 21:53:27 $.
+ Last updated $Date: 2016-09-25 20:05:44 $.
</p>
</body>
</html>
diff --git a/tiff/html/internals.html b/tiff/html/internals.html
index 3cc967312..8d94e5ce6 100644
--- a/tiff/html/internals.html
+++ b/tiff/html/internals.html
@@ -565,7 +565,7 @@ the portability of your TIFF files.
<P>
<HR>
-Last updated: $Date: 2004/09/10 14:47:31 $
+Last updated: $Date: 2016-09-25 20:05:44 $
</BODY>
diff --git a/tiff/html/intro.html b/tiff/html/intro.html
index 61c01d4a2..83902f61a 100644
--- a/tiff/html/intro.html
+++ b/tiff/html/intro.html
@@ -62,7 +62,7 @@ application.
<P>
<HR>
-Last updated: $Date: 1999/08/09 20:21:21 $
+Last updated: $Date: 2016-09-25 20:05:44 $
</BODY>
</HTML>
diff --git a/tiff/html/libtiff.html b/tiff/html/libtiff.html
index 6a2c42e60..b1de7a27f 100644
--- a/tiff/html/libtiff.html
+++ b/tiff/html/libtiff.html
@@ -45,7 +45,7 @@
to the capabilities of the library; it is not an attempt to describe
everything a developer needs to know about the library or about TIFF.
Detailed information on the interfaces to the library are given in
- the <a href="http://www.remotesensing.org/libtiff/man/index.html">UNIX
+ the <a href="http://www.simplesystems.org/libtiff/man/index.html">UNIX
manual pages</a> that accompany this software.
</p>
<p>
@@ -741,7 +741,7 @@
</p>
<hr>
<p>
- Last updated: $Date: 2005/12/28 06:53:18 $
+ Last updated: $Date: 2016-09-25 20:05:44 $
</p>
</body>
</html>
diff --git a/tiff/html/man/CMakeLists.txt b/tiff/html/man/CMakeLists.txt
new file mode 100644
index 000000000..cb92ea218
--- /dev/null
+++ b/tiff/html/man/CMakeLists.txt
@@ -0,0 +1,110 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+set(indexfile index.html)
+
+set(docfiles
+ libtiff.3tiff.html
+ TIFFbuffer.3tiff.html
+ TIFFClose.3tiff.html
+ TIFFcodec.3tiff.html
+ TIFFcolor.3tiff.html
+ TIFFDataWidth.3tiff.html
+ TIFFError.3tiff.html
+ TIFFFieldDataType.3tiff.html
+ TIFFFieldName.3tiff.html
+ TIFFFieldPassCount.3tiff.html
+ TIFFFieldReadCount.3tiff.html
+ TIFFFieldTag.3tiff.html
+ TIFFFieldWriteCount.3tiff.html
+ TIFFFlush.3tiff.html
+ TIFFGetField.3tiff.html
+ TIFFmemory.3tiff.html
+ TIFFOpen.3tiff.html
+ TIFFPrintDirectory.3tiff.html
+ TIFFquery.3tiff.html
+ TIFFReadDirectory.3tiff.html
+ TIFFReadEncodedStrip.3tiff.html
+ TIFFReadEncodedTile.3tiff.html
+ TIFFReadRawStrip.3tiff.html
+ TIFFReadRawTile.3tiff.html
+ TIFFReadRGBAImage.3tiff.html
+ TIFFReadRGBAStrip.3tiff.html
+ TIFFReadRGBATile.3tiff.html
+ TIFFReadScanline.3tiff.html
+ TIFFReadTile.3tiff.html
+ TIFFRGBAImage.3tiff.html
+ TIFFSetDirectory.3tiff.html
+ TIFFSetField.3tiff.html
+ TIFFsize.3tiff.html
+ TIFFstrip.3tiff.html
+ TIFFswab.3tiff.html
+ TIFFtile.3tiff.html
+ TIFFWarning.3tiff.html
+ TIFFWriteDirectory.3tiff.html
+ TIFFWriteEncodedStrip.3tiff.html
+ TIFFWriteEncodedTile.3tiff.html
+ TIFFWriteRawStrip.3tiff.html
+ TIFFWriteRawTile.3tiff.html
+ TIFFWriteScanline.3tiff.html
+ TIFFWriteTile.3tiff.html
+ fax2ps.1.html
+ fax2tiff.1.html
+ pal2rgb.1.html
+ ppm2tiff.1.html
+ raw2tiff.1.html
+ rgb2ycbcr.1.html
+ thumbnail.1.html
+ tiff2bw.1.html
+ tiff2pdf.1.html
+ tiff2ps.1.html
+ tiff2rgba.1.html
+ tiffcmp.1.html
+ tiffcp.1.html
+ tiffcrop.1.html
+ tiffdither.1.html
+ tiffdump.1.html
+ tiffgt.1.html
+ tiffinfo.1.html
+ tiffmedian.1.html
+ tiffset.1.html
+ tiffsplit.1.html)
+
+set(doc_DATA ${indexfile} ${docfiles})
+
+extra_dist(${doc_DATA})
+
+install(FILES ${doc_DATA}
+ DESTINATION "${LIBTIFF_DOCDIR}/html/man")
+
+# htmldoc target to regenerate HTML files
+string(REPLACE ";" "^" escaped_docfiles "${docfiles}")
+add_custom_target(htmldoc
+ COMMAND "${CMAKE_COMMAND}"
+ "-DMANSRCDIR=${PROJECT_SOURCE_DIR}/man"
+ "-DHTMLMANDIR=${PROJECT_SOURCE_DIR}/html/man"
+ "-DINDEXFILE=${indexfile}"
+ "-DDOCFILES=${escaped_docfiles}"
+ -P "${CMAKE_CURRENT_SOURCE_DIR}/HtmlDoc.cmake")
+
diff --git a/tiff/html/man/HtmlDoc.cmake b/tiff/html/man/HtmlDoc.cmake
new file mode 100644
index 000000000..7e5a1a0c2
--- /dev/null
+++ b/tiff/html/man/HtmlDoc.cmake
@@ -0,0 +1,50 @@
+# CMake documentation generation for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+string(REPLACE "^" ";" DOCFILES "${DOCFILES}")
+
+set(INDEXSTART "<html><head><title>Libtiff HTML manpage index</title></head><body bgcolor=white><ul><h2>Man Pages</h2><p>")
+set(INDEXEND "</ul></body></html>")
+
+set(indexcontent "${INDEXSTART}
+")
+
+foreach(doc ${DOCFILES})
+ string(REGEX REPLACE "(.*)\\.html$" "\\1" man "${doc}")
+ execute_process(COMMAND groff -Thtml -mandoc "${MANSRCDIR}/${man}"
+ OUTPUT_FILE "${HTMLMANDIR}/${doc}"
+ RESULT_VARIABLE GROFF_STATUS)
+ if(GROFF_STATUS)
+ message(FATAL_ERROR "Groff failed to generate HTML manpage")
+ endif()
+ message(STATUS "Generated ${HTMLMANDIR}/${doc} from ${MANSRCDIR}/${man}")
+
+ set(indexcontent "${indexcontent}<li><a href=\"${doc}\">${man}</a>
+")
+endforeach()
+
+set(indexcontent "${indexcontent}${INDEXEND}
+")
+file(WRITE "${HTMLMANDIR}/${INDEXFILE}" "${indexcontent}")
+message(STATUS "Generated ${HTMLMANDIR}/${INDEXFILE}")
diff --git a/tiff/html/man/Makefile.am b/tiff/html/man/Makefile.am
index c14c4dbc5..587296c53 100644
--- a/tiff/html/man/Makefile.am
+++ b/tiff/html/man/Makefile.am
@@ -39,6 +39,12 @@ docfiles = \
TIFFcolor.3tiff.html \
TIFFDataWidth.3tiff.html \
TIFFError.3tiff.html \
+ TIFFFieldDataType.3tiff.html \
+ TIFFFieldName.3tiff.html \
+ TIFFFieldPassCount.3tiff.html \
+ TIFFFieldReadCount.3tiff.html \
+ TIFFFieldTag.3tiff.html \
+ TIFFFieldWriteCount.3tiff.html \
TIFFFlush.3tiff.html \
TIFFGetField.3tiff.html \
TIFFmemory.3tiff.html \
@@ -72,13 +78,10 @@ docfiles = \
TIFFWriteTile.3tiff.html \
fax2ps.1.html \
fax2tiff.1.html \
- gif2tiff.1.html \
pal2rgb.1.html \
ppm2tiff.1.html \
- ras2tiff.1.html \
raw2tiff.1.html \
rgb2ycbcr.1.html \
- sgi2tiff.1.html \
thumbnail.1.html \
tiff2bw.1.html \
tiff2pdf.1.html \
@@ -93,8 +96,7 @@ docfiles = \
tiffinfo.1.html \
tiffmedian.1.html \
tiffset.1.html \
- tiffsplit.1.html \
- tiffsv.1.html
+ tiffsplit.1.html
dist_doc_DATA = $(indexfile) $(docfiles)
@@ -117,3 +119,6 @@ htmldoc:
${GROFF} $(MANSRCDIR)/$$i > $(HTMLMANDIR)/$$i.html; \
done
+EXTRA_DIST = \
+ CMakeLists.txt \
+ HtmlDoc.cmake
diff --git a/tiff/html/man/Makefile.in b/tiff/html/man/Makefile.in
index 27177c08c..7f4648c9d 100644
--- a/tiff/html/man/Makefile.in
+++ b/tiff/html/man/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -41,6 +40,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -60,8 +114,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = html/man
-DIST_COMMON = $(dist_doc_DATA) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -69,19 +121,32 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(dist_doc_DATA) \
+ $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -111,6 +176,9 @@ am__uninstall_files_from_dir = { \
}
am__installdirs = "$(DESTDIR)$(docdir)"
DATA = $(dist_doc_DATA)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -124,6 +192,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -171,6 +240,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -271,6 +341,12 @@ docfiles = \
TIFFcolor.3tiff.html \
TIFFDataWidth.3tiff.html \
TIFFError.3tiff.html \
+ TIFFFieldDataType.3tiff.html \
+ TIFFFieldName.3tiff.html \
+ TIFFFieldPassCount.3tiff.html \
+ TIFFFieldReadCount.3tiff.html \
+ TIFFFieldTag.3tiff.html \
+ TIFFFieldWriteCount.3tiff.html \
TIFFFlush.3tiff.html \
TIFFGetField.3tiff.html \
TIFFmemory.3tiff.html \
@@ -304,13 +380,10 @@ docfiles = \
TIFFWriteTile.3tiff.html \
fax2ps.1.html \
fax2tiff.1.html \
- gif2tiff.1.html \
pal2rgb.1.html \
ppm2tiff.1.html \
- ras2tiff.1.html \
raw2tiff.1.html \
rgb2ycbcr.1.html \
- sgi2tiff.1.html \
thumbnail.1.html \
tiff2bw.1.html \
tiff2pdf.1.html \
@@ -325,13 +398,16 @@ docfiles = \
tiffinfo.1.html \
tiffmedian.1.html \
tiffset.1.html \
- tiffsplit.1.html \
- tiffsv.1.html
+ tiffsplit.1.html
dist_doc_DATA = $(indexfile) $(docfiles)
INDEXSTART = '<HTML><HEAD><TITLE>Libtiff HTML manpage index</TITLE></HEAD><BODY BGCOLOR=white><ul><H2>Man Pages</h2><p>'
INDEXEND = '</ul></BODY></HTML>'
manpages = $(docfiles:.html=)
+EXTRA_DIST = \
+ CMakeLists.txt \
+ HtmlDoc.cmake
+
all: all-am
.SUFFIXES:
@@ -347,7 +423,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign html/man/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign html/man/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -373,8 +448,11 @@ clean-libtool:
-rm -rf .libs _libs
install-dist_docDATA: $(dist_doc_DATA)
@$(NORMAL_INSTALL)
- test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -389,11 +467,11 @@ uninstall-dist_docDATA:
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
-ctags: CTAGS
-CTAGS:
+ctags CTAGS:
+
+cscope cscopelist:
distdir: $(DISTFILES)
@@ -532,16 +610,19 @@ uninstall-am: uninstall-dist_docDATA
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dist_docDATA install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- uninstall uninstall-am uninstall-dist_docDATA
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_docDATA install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+ uninstall-am uninstall-dist_docDATA
+
+.PRECIOUS: Makefile
.PHONY: index
diff --git a/tiff/html/man/TIFFClose.3tiff.html b/tiff/html/man/TIFFClose.3tiff.html
index 720ca327f..908dcc70f 100644
--- a/tiff/html/man/TIFFClose.3tiff.html
+++ b/tiff/html/man/TIFFClose.3tiff.html
@@ -79,7 +79,7 @@ warning messages are directed to the
<p><b>libtiff</b>(3TIFF), <b>TIFFOpen</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFDataWidth.3tiff.html b/tiff/html/man/TIFFDataWidth.3tiff.html
index 575e3cb8c..9eede0608 100644
--- a/tiff/html/man/TIFFDataWidth.3tiff.html
+++ b/tiff/html/man/TIFFDataWidth.3tiff.html
@@ -90,7 +90,7 @@ supplied.</p>
<p><b>libtiff</b>(3TIFF),</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFError.3tiff.html b/tiff/html/man/TIFFError.3tiff.html
index 721cec7ec..cd30c7edd 100644
--- a/tiff/html/man/TIFFError.3tiff.html
+++ b/tiff/html/man/TIFFError.3tiff.html
@@ -98,7 +98,7 @@ previous error handling function.</p>
<b>printf</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFFieldDataType.3tiff.html b/tiff/html/man/TIFFFieldDataType.3tiff.html
new file mode 100644
index 000000000..2270a5c95
--- /dev/null
+++ b/tiff/html/man/TIFFFieldDataType.3tiff.html
@@ -0,0 +1,89 @@
+<!-- Creator : groff version 1.21 -->
+<!-- CreationDate: Sun Jul 29 12:12:01 2012 -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<meta name="Content-Style" content="text/css">
+<style type="text/css">
+ p { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ table { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ h1 { text-align: center }
+</style>
+<title>TIFFFieldDataType</title>
+
+</head>
+<body>
+
+<h1 align="center">TIFFFieldDataType</h1>
+
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#RETURN VALUES">RETURN VALUES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+
+
+<h2>NAME
+<a name="NAME"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em">TIFFFieldDataType
+&minus; Get TIFF data type from field information</p>
+
+<h2>SYNOPSIS
+<a name="SYNOPSIS"></a>
+</h2>
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>#include
+&lt;tiffio.h&gt;</b></p>
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>TIFFDataType
+TIFFFieldDataType(const TIFFField*</b>
+<i>fip</i><b>)</b></p>
+
+<h2>DESCRIPTION
+<a name="DESCRIPTION"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>TIFFFieldDataType</b>
+returns the data type stored in a TIFF field.</p>
+
+<p style="margin-left:11%; margin-top: 1em"><i>fip</i> is a
+field information pointer previously returned by
+<b>TIFFFindField</b>, <b>TIFFFieldWithTag</b>, or
+<b>TIFFFieldWithName</b>.</p>
+
+<h2>RETURN VALUES
+<a name="RETURN VALUES"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>TIFFFieldDataType</b>
+returns a member of the enum type <b>TIFFDataType</b>.</p>
+
+<h2>SEE ALSO
+<a name="SEE ALSO"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>libtiff</b>(3TIFF),</p>
+
+<p style="margin-left:11%; margin-top: 1em">Libtiff library
+home page: <b>http://www.simplesystems.org/libtiff/</b></p>
+<hr>
+</body>
+</html>
diff --git a/tiff/html/man/TIFFFieldName.3tiff.html b/tiff/html/man/TIFFFieldName.3tiff.html
new file mode 100644
index 000000000..df4ee5064
--- /dev/null
+++ b/tiff/html/man/TIFFFieldName.3tiff.html
@@ -0,0 +1,86 @@
+<!-- Creator : groff version 1.21 -->
+<!-- CreationDate: Sun Jul 29 12:12:01 2012 -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<meta name="Content-Style" content="text/css">
+<style type="text/css">
+ p { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ table { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ h1 { text-align: center }
+</style>
+<title>TIFFFieldName</title>
+
+</head>
+<body>
+
+<h1 align="center">TIFFFieldName</h1>
+
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#RETURN VALUES">RETURN VALUES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+
+
+<h2>NAME
+<a name="NAME"></a>
+</h2>
+
+
+<p style="margin-left:11%; margin-top: 1em">TIFFFieldName
+&minus; Get TIFF field name from field information</p>
+
+<h2>SYNOPSIS
+<a name="SYNOPSIS"></a>
+</h2>
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>#include
+&lt;tiffio.h&gt;</b></p>
+
+<p style="margin-left:11%; margin-top: 1em"><b>const char*
+TIFFFieldName(const TIFFField*</b> <i>fip</i><b>)</b></p>
+
+<h2>DESCRIPTION
+<a name="DESCRIPTION"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>TIFFFieldName</b>
+returns the textual name for a TIFF field.</p>
+
+<p style="margin-left:11%; margin-top: 1em"><i>fip</i> is a
+field information pointer previously returned by
+<b>TIFFFindField</b>, <b>TIFFFieldWithTag</b>, or
+<b>TIFFFieldWithName</b>.</p>
+
+<h2>RETURN VALUES
+<a name="RETURN VALUES"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>TIFFFieldName</b>
+returns a constant C string.</p>
+
+<h2>SEE ALSO
+<a name="SEE ALSO"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>libtiff</b>(3TIFF),</p>
+
+<p style="margin-left:11%; margin-top: 1em">Libtiff library
+home page: <b>http://www.simplesystems.org/libtiff/</b></p>
+<hr>
+</body>
+</html>
diff --git a/tiff/html/man/TIFFFieldPassCount.3tiff.html b/tiff/html/man/TIFFFieldPassCount.3tiff.html
new file mode 100644
index 000000000..5dc312625
--- /dev/null
+++ b/tiff/html/man/TIFFFieldPassCount.3tiff.html
@@ -0,0 +1,98 @@
+<!-- Creator : groff version 1.21 -->
+<!-- CreationDate: Sun Jul 29 12:12:01 2012 -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<meta name="Content-Style" content="text/css">
+<style type="text/css">
+ p { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ table { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ h1 { text-align: center }
+</style>
+<title>TIFFFieldPassCount</title>
+
+</head>
+<body>
+
+<h1 align="center">TIFFFieldPassCount</h1>
+
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#RETURN VALUES">RETURN VALUES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+
+
+<h2>NAME
+<a name="NAME"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em">TIFFFieldPassCount
+&minus; Get whether to pass a count to TIFFGet/SetField</p>
+
+<h2>SYNOPSIS
+<a name="SYNOPSIS"></a>
+</h2>
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>#include
+&lt;tiffio.h&gt;</b></p>
+
+<p style="margin-left:11%; margin-top: 1em"><b>int
+TIFFFieldPassCount(const TIFFField*</b>
+<i>fip</i><b>)</b></p>
+
+<h2>DESCRIPTION
+<a name="DESCRIPTION"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>TIFFFieldPassCount</b>
+returns true (nonzero) if <b>TIFFGetField</b> and
+<b>TIFFSetField</b> expect a <i>count</i> value to be passed
+before the actual data pointer.</p>
+
+<p style="margin-left:11%; margin-top: 1em"><i>fip</i> is a
+field information pointer previously returned by
+<b>TIFFFindField</b>, <b>TIFFFieldWithTag</b>, or
+<b>TIFFFieldWithName</b>.</p>
+
+<p style="margin-left:11%; margin-top: 1em">When a
+<i>count</i> is required, it will be of type <b>uint32</b>
+when <b>TIFFFieldReadCount</b> reports
+<b>TIFF_VARIABLE2</b>, and of type <b>uint16</b> otherwise.
+(This distinction is critical for use of
+<b>TIFFGetField</b>, but normally not so for use of
+<b>TIFFSetField</b>.)</p>
+
+<h2>RETURN VALUES
+<a name="RETURN VALUES"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>TIFFFieldPassCount</b>
+returns an integer that is always 1 (true) or 0 (false).</p>
+
+<h2>SEE ALSO
+<a name="SEE ALSO"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>libtiff</b>(3TIFF),</p>
+
+<p style="margin-left:11%; margin-top: 1em">Libtiff library
+home page: <b>http://www.simplesystems.org/libtiff/</b></p>
+<hr>
+</body>
+</html>
diff --git a/tiff/html/man/TIFFFieldReadCount.3tiff.html b/tiff/html/man/TIFFFieldReadCount.3tiff.html
new file mode 100644
index 000000000..d800a861c
--- /dev/null
+++ b/tiff/html/man/TIFFFieldReadCount.3tiff.html
@@ -0,0 +1,101 @@
+<!-- Creator : groff version 1.21 -->
+<!-- CreationDate: Sun Jul 29 12:12:01 2012 -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<meta name="Content-Style" content="text/css">
+<style type="text/css">
+ p { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ table { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ h1 { text-align: center }
+</style>
+<title>TIFFFieldReadCount</title>
+
+</head>
+<body>
+
+<h1 align="center">TIFFFieldReadCount</h1>
+
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#RETURN VALUES">RETURN VALUES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+
+
+<h2>NAME
+<a name="NAME"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em">TIFFFieldReadCount
+&minus; Get number of values to be read from field</p>
+
+<h2>SYNOPSIS
+<a name="SYNOPSIS"></a>
+</h2>
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>#include
+&lt;tiffio.h&gt;</b></p>
+
+<p style="margin-left:11%; margin-top: 1em"><b>int
+TIFFFieldReadCount(const TIFFField*</b>
+<i>fip</i><b>)</b></p>
+
+<h2>DESCRIPTION
+<a name="DESCRIPTION"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>TIFFFieldReadCount</b>
+returns the number of values available to be read from the
+specified TIFF field; that is, the number of arguments that
+should be supplied to <b>TIFFGetField</b>. For most field
+types this is a small positive integer, typically 1 or 2,
+but there are some special values: <b><br>
+TIFF_VARIABLE</b> indicates that a variable number of values
+is possible; then, a <b>uint16</b> <i>count</i> argument and
+a pointer <i>data</i> argument must be supplied to
+<b>TIFFGetField</b>. <b><br>
+TIFF_VARIABLE2</b> is the same as <b>TIFF_VARIABLE</b>
+except that the <i>count</i> argument must have type
+<b>uint32</b>. <b><br>
+TIFF_SPP</b> indicates that the number of arguments is equal
+to the image&rsquo;s number of samples per pixel.</p>
+
+<p style="margin-left:11%; margin-top: 1em"><i>fip</i> is a
+field information pointer previously returned by
+<b>TIFFFindField</b>, <b>TIFFFieldWithTag</b>, or
+<b>TIFFFieldWithName</b>.</p>
+
+<h2>RETURN VALUES
+<a name="RETURN VALUES"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>TIFFFieldReadCount</b>
+returns an integer.</p>
+
+<h2>SEE ALSO
+<a name="SEE ALSO"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>libtiff</b>(3TIFF),</p>
+
+<p style="margin-left:11%; margin-top: 1em">Libtiff library
+home page: <b>http://www.simplesystems.org/libtiff/</b></p>
+<hr>
+</body>
+</html>
diff --git a/tiff/html/man/TIFFFieldTag.3tiff.html b/tiff/html/man/TIFFFieldTag.3tiff.html
new file mode 100644
index 000000000..b1fdea0f1
--- /dev/null
+++ b/tiff/html/man/TIFFFieldTag.3tiff.html
@@ -0,0 +1,88 @@
+<!-- Creator : groff version 1.21 -->
+<!-- CreationDate: Sun Jul 29 12:12:01 2012 -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<meta name="Content-Style" content="text/css">
+<style type="text/css">
+ p { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ table { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ h1 { text-align: center }
+</style>
+<title>TIFFFieldTag</title>
+
+</head>
+<body>
+
+<h1 align="center">TIFFFieldTag</h1>
+
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#RETURN VALUES">RETURN VALUES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+
+
+<h2>NAME
+<a name="NAME"></a>
+</h2>
+
+
+<p style="margin-left:11%; margin-top: 1em">TIFFFieldTag
+&minus; Get TIFF field tag value from field information</p>
+
+<h2>SYNOPSIS
+<a name="SYNOPSIS"></a>
+</h2>
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>#include
+&lt;tiffio.h&gt;</b></p>
+
+<p style="margin-left:11%; margin-top: 1em"><b>uint32
+TIFFFieldTag(const TIFFField*</b> <i>fip</i><b>)</b></p>
+
+<h2>DESCRIPTION
+<a name="DESCRIPTION"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>TIFFFieldTag</b>
+returns the numeric tag value for a TIFF field. This can be
+compared to various constants exported by the <b>libtiff</b>
+header files, such as <b>TIFFTAG_IMAGEWIDTH</b>.</p>
+
+<p style="margin-left:11%; margin-top: 1em"><i>fip</i> is a
+field information pointer previously returned by
+<b>TIFFFindField</b>, <b>TIFFFieldWithTag</b>, or
+<b>TIFFFieldWithName</b>.</p>
+
+<h2>RETURN VALUES
+<a name="RETURN VALUES"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>TIFFFieldTag</b>
+returns an integer tag value.</p>
+
+<h2>SEE ALSO
+<a name="SEE ALSO"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>libtiff</b>(3TIFF),</p>
+
+<p style="margin-left:11%; margin-top: 1em">Libtiff library
+home page: <b>http://www.simplesystems.org/libtiff/</b></p>
+<hr>
+</body>
+</html>
diff --git a/tiff/html/man/TIFFFieldWriteCount.3tiff.html b/tiff/html/man/TIFFFieldWriteCount.3tiff.html
new file mode 100644
index 000000000..0d446bc73
--- /dev/null
+++ b/tiff/html/man/TIFFFieldWriteCount.3tiff.html
@@ -0,0 +1,108 @@
+<!-- Creator : groff version 1.21 -->
+<!-- CreationDate: Sun Jul 29 12:12:01 2012 -->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta name="generator" content="groff -Thtml, see www.gnu.org">
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<meta name="Content-Style" content="text/css">
+<style type="text/css">
+ p { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ pre { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ table { margin-top: 0; margin-bottom: 0; vertical-align: top }
+ h1 { text-align: center }
+</style>
+<title>TIFFFieldWriteCount</title>
+
+</head>
+<body>
+
+<h1 align="center">TIFFFieldWriteCount</h1>
+
+<a href="#NAME">NAME</a><br>
+<a href="#SYNOPSIS">SYNOPSIS</a><br>
+<a href="#DESCRIPTION">DESCRIPTION</a><br>
+<a href="#RETURN VALUES">RETURN VALUES</a><br>
+<a href="#SEE ALSO">SEE ALSO</a><br>
+
+<hr>
+
+
+<h2>NAME
+<a name="NAME"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em">TIFFFieldWriteCount
+&minus; Get number of values to be written to field</p>
+
+<h2>SYNOPSIS
+<a name="SYNOPSIS"></a>
+</h2>
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>#include
+&lt;tiffio.h&gt;</b></p>
+
+<p style="margin-left:11%; margin-top: 1em"><b>int
+TIFFFieldWriteCount(const TIFFField*</b>
+<i>fip</i><b>)</b></p>
+
+<h2>DESCRIPTION
+<a name="DESCRIPTION"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>TIFFFieldWriteCount</b>
+returns the number of values to be written into the
+specified TIFF field; that is, the number of arguments that
+should be supplied to <b>TIFFSetField</b>. For most field
+types this is a small positive integer, typically 1 or 2,
+but there are some special values: <b><br>
+TIFF_VARIABLE</b> indicates that a variable number of values
+is possible; then, a <b>uint16</b> <i>count</i> argument and
+a pointer <i>data</i> argument must be supplied to
+<b>TIFFSetField</b>. <b><br>
+TIFF_VARIABLE2</b> is the same as <b>TIFF_VARIABLE</b>
+except that the <i>count</i> argument must have type
+<b>uint32</b>. (On most modern machines, this makes no
+practical difference, and the <i>count</i> argument can
+simply be an <b>int</b> in either case.) <b><br>
+TIFF_SPP</b> indicates that the number of arguments must be
+equal to the image&rsquo;s number of samples per pixel.</p>
+
+<p style="margin-left:11%; margin-top: 1em"><i>fip</i> is a
+field information pointer previously returned by
+<b>TIFFFindField</b>, <b>TIFFFieldWithTag</b>, or
+<b>TIFFFieldWithName</b>.</p>
+
+<p style="margin-left:11%; margin-top: 1em">For most field
+types, <b>TIFFFieldWriteCount</b> returns the same value as
+<b>TIFFFieldReadCount</b>, but there are some
+exceptions.</p>
+
+<h2>RETURN VALUES
+<a name="RETURN VALUES"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>TIFFFieldWriteCount</b>
+returns an integer.</p>
+
+<h2>SEE ALSO
+<a name="SEE ALSO"></a>
+</h2>
+
+
+
+<p style="margin-left:11%; margin-top: 1em"><b>libtiff</b>(3TIFF),</p>
+
+<p style="margin-left:11%; margin-top: 1em">Libtiff library
+home page: <b>http://www.simplesystems.org/libtiff/</b></p>
+<hr>
+</body>
+</html>
diff --git a/tiff/html/man/TIFFFlush.3tiff.html b/tiff/html/man/TIFFFlush.3tiff.html
index 742f3aeed..77782e64f 100644
--- a/tiff/html/man/TIFFFlush.3tiff.html
+++ b/tiff/html/man/TIFFFlush.3tiff.html
@@ -105,7 +105,7 @@ returned.</p>
<b>libtiff</b>(3TIFF),</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFGetField.3tiff.html b/tiff/html/man/TIFFGetField.3tiff.html
index bd2f78bb2..cbbb8be76 100644
--- a/tiff/html/man/TIFFGetField.3tiff.html
+++ b/tiff/html/man/TIFFGetField.3tiff.html
@@ -1963,7 +1963,7 @@ field, tag 0x%x</b>. An unknown tag was supplied.</p>
<b>TIFFWriteDirectory</b>(3TIFF) <b>libtiff</b>(3TIFF),</p>
<p style="margin-left:11%; margin-top: 1em">Libtiff library
-home page: <b>http://www.remotesensing.org/libtiff/</b></p>
+home page: <b>http://www.simplesystems.org/libtiff/</b></p>
<hr>
</body>
</html>
diff --git a/tiff/html/man/TIFFRGBAImage.3tiff.html b/tiff/html/man/TIFFRGBAImage.3tiff.html
index 08a992402..83581f115 100644
--- a/tiff/html/man/TIFFRGBAImage.3tiff.html
+++ b/tiff/html/man/TIFFRGBAImage.3tiff.html
@@ -311,7 +311,7 @@ insufficient memory to allocate a table used to map data to
<b>TIFFReadRGBATile</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFReadDirectory.3tiff.html b/tiff/html/man/TIFFReadDirectory.3tiff.html
index 82350ad3a..1e32f7cd2 100644
--- a/tiff/html/man/TIFFReadDirectory.3tiff.html
+++ b/tiff/html/man/TIFFReadDirectory.3tiff.html
@@ -210,7 +210,7 @@ size.</big></p>
<b>libtiff</b>(3TIFF)</big></p>
<!-- INDENTATION -->
<p><big>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></big></p>
+<b>http://www.simplesystems.org/libtiff/</b></big></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFReadEncodedStrip.3tiff.html b/tiff/html/man/TIFFReadEncodedStrip.3tiff.html
index d5c4c15e6..c942063fc 100644
--- a/tiff/html/man/TIFFReadEncodedStrip.3tiff.html
+++ b/tiff/html/man/TIFFReadEncodedStrip.3tiff.html
@@ -125,7 +125,7 @@ returns &minus;1 if an error was encountered.</big></p>
<b>libtiff</b>(3TIFF)</big></p>
<!-- INDENTATION -->
<p><big>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></big></p>
+<b>http://www.simplesystems.org/libtiff/</b></big></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFReadEncodedTile.3tiff.html b/tiff/html/man/TIFFReadEncodedTile.3tiff.html
index b42dc0908..92eb72a37 100644
--- a/tiff/html/man/TIFFReadEncodedTile.3tiff.html
+++ b/tiff/html/man/TIFFReadEncodedTile.3tiff.html
@@ -122,7 +122,7 @@ opposite to the native machine byte order,</p>
<b>TIFFReadTile</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFReadRGBAImage.3tiff.html b/tiff/html/man/TIFFReadRGBAImage.3tiff.html
index 1ebb09b8b..f648f0990 100644
--- a/tiff/html/man/TIFFReadRGBAImage.3tiff.html
+++ b/tiff/html/man/TIFFReadRGBAImage.3tiff.html
@@ -293,7 +293,7 @@ insufficient memory to allocate a table used to map data to
<b>TIFFReadRGBATile</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFReadRGBAStrip.3tiff.html b/tiff/html/man/TIFFReadRGBAStrip.3tiff.html
index 37d36d3c3..3358df7dc 100644
--- a/tiff/html/man/TIFFReadRGBAStrip.3tiff.html
+++ b/tiff/html/man/TIFFReadRGBAStrip.3tiff.html
@@ -200,7 +200,7 @@ insufficient memory to allocate a table used to map data to
<b>TIFFReadRGBATile</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFReadRGBATile.3tiff.html b/tiff/html/man/TIFFReadRGBATile.3tiff.html
index 6bd298a2d..bdbb43cc3 100644
--- a/tiff/html/man/TIFFReadRGBATile.3tiff.html
+++ b/tiff/html/man/TIFFReadRGBATile.3tiff.html
@@ -253,7 +253,7 @@ insufficient memory to allocate a table used to map data to
<b>TIFFReadRGBAStrip</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFReadRawStrip.3tiff.html b/tiff/html/man/TIFFReadRawStrip.3tiff.html
index 4dd1fbccd..4fe1a995d 100644
--- a/tiff/html/man/TIFFReadRawStrip.3tiff.html
+++ b/tiff/html/man/TIFFReadRawStrip.3tiff.html
@@ -101,7 +101,7 @@ typically be at least as large as the number returned by
<b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFReadRawTile.3tiff.html b/tiff/html/man/TIFFReadRawTile.3tiff.html
index e74295bed..0065d2cf0 100644
--- a/tiff/html/man/TIFFReadRawTile.3tiff.html
+++ b/tiff/html/man/TIFFReadRawTile.3tiff.html
@@ -103,7 +103,7 @@ typically be at least as large as the value returned by
<b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFReadScanline.3tiff.html b/tiff/html/man/TIFFReadScanline.3tiff.html
index e825e4cbf..79f17fcd9 100644
--- a/tiff/html/man/TIFFReadScanline.3tiff.html
+++ b/tiff/html/man/TIFFReadScanline.3tiff.html
@@ -149,7 +149,7 @@ interfaces to read these formats.</p>
<b>TIFFReadRawStrip</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFReadTile.3tiff.html b/tiff/html/man/TIFFReadTile.3tiff.html
index be245f88d..26054803b 100644
--- a/tiff/html/man/TIFFReadTile.3tiff.html
+++ b/tiff/html/man/TIFFReadTile.3tiff.html
@@ -125,7 +125,7 @@ returned.</p>
<b>TIFFReadRawTile</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFSetDirectory.3tiff.html b/tiff/html/man/TIFFSetDirectory.3tiff.html
index 9047b0bcd..c34340562 100644
--- a/tiff/html/man/TIFFSetDirectory.3tiff.html
+++ b/tiff/html/man/TIFFSetDirectory.3tiff.html
@@ -114,7 +114,7 @@ file.</p>
<i>TIFFWriteDirectory</i>(3TIFF), <i>libtiff</i>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFSetField.3tiff.html b/tiff/html/man/TIFFSetField.3tiff.html
index f160fedd1..ce6a88b08 100644
--- a/tiff/html/man/TIFFSetField.3tiff.html
+++ b/tiff/html/man/TIFFSetField.3tiff.html
@@ -1859,7 +1859,7 @@ for the named tag.</p>
<b>TIFFReadDirectory</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
<p style="margin-left:11%; margin-top: 1em">Libtiff library
-home page: <b>http://www.remotesensing.org/libtiff/</b></p>
+home page: <b>http://www.simplesystems.org/libtiff/</b></p>
<hr>
</body>
</html>
diff --git a/tiff/html/man/TIFFWarning.3tiff.html b/tiff/html/man/TIFFWarning.3tiff.html
index 149c1f78c..856cd40bb 100644
--- a/tiff/html/man/TIFFWarning.3tiff.html
+++ b/tiff/html/man/TIFFWarning.3tiff.html
@@ -41,7 +41,7 @@ warning interface</p>
<p><b>void TIFFWarning(const char *</b><i>module</i><b>,
const char *</b><i>fmt</i><b>,</b> <i>...</i><b>)</b></p>
<!-- INDENTATION -->
-<p><b>#include &lt;stdargh.h&gt;</b></p>
+<p><b>#include &lt;stdarg.h&gt;</b></p>
<!-- INDENTATION -->
<p><b>typedef void (*TIFFWarningHandler)(const char
*</b><i>module</i><b>, const char *</b><i>fmt</i><b>,
@@ -100,7 +100,7 @@ previous error handling function.</p>
<b>printf</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFWriteDirectory.3tiff.html b/tiff/html/man/TIFFWriteDirectory.3tiff.html
index 1e72a5bec..9aff8c4c9 100644
--- a/tiff/html/man/TIFFWriteDirectory.3tiff.html
+++ b/tiff/html/man/TIFFWriteDirectory.3tiff.html
@@ -168,7 +168,7 @@ the directory that is being written.</p>
<b>TIFFSetDirectory</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFWriteEncodedStrip.3tiff.html b/tiff/html/man/TIFFWriteEncodedStrip.3tiff.html
index 3b90199a0..cf7a488f0 100644
--- a/tiff/html/man/TIFFWriteEncodedStrip.3tiff.html
+++ b/tiff/html/man/TIFFWriteEncodedStrip.3tiff.html
@@ -145,7 +145,7 @@ and byte counts.</big></p>
<b>libtiff</b>(3TIFF)</big></p>
<!-- INDENTATION -->
<p><big>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></big></p>
+<b>http://www.simplesystems.org/libtiff/</b></big></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFWriteEncodedTile.3tiff.html b/tiff/html/man/TIFFWriteEncodedTile.3tiff.html
index 5e85f6ddb..8cd441128 100644
--- a/tiff/html/man/TIFFWriteEncodedTile.3tiff.html
+++ b/tiff/html/man/TIFFWriteEncodedTile.3tiff.html
@@ -139,7 +139,7 @@ byte counts.</big></p>
<b>libtiff</b>(3TIFF)</big></p>
<!-- INDENTATION -->
<p><big>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></big></p>
+<b>http://www.simplesystems.org/libtiff/</b></big></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFWriteRawStrip.3tiff.html b/tiff/html/man/TIFFWriteRawStrip.3tiff.html
index 9a3ef0c19..3379b8b04 100644
--- a/tiff/html/man/TIFFWriteRawStrip.3tiff.html
+++ b/tiff/html/man/TIFFWriteRawStrip.3tiff.html
@@ -136,7 +136,7 @@ specified image dimensions.</p>
<b>TIFFWriteScanline</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFWriteRawTile.3tiff.html b/tiff/html/man/TIFFWriteRawTile.3tiff.html
index 639af6c71..92d64f0f8 100644
--- a/tiff/html/man/TIFFWriteRawTile.3tiff.html
+++ b/tiff/html/man/TIFFWriteRawTile.3tiff.html
@@ -120,7 +120,7 @@ specified image dimensions.</p>
<b>TIFFWriteScanline</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFWriteScanline.3tiff.html b/tiff/html/man/TIFFWriteScanline.3tiff.html
index 4c68f9d4b..8f3002170 100644
--- a/tiff/html/man/TIFFWriteScanline.3tiff.html
+++ b/tiff/html/man/TIFFWriteScanline.3tiff.html
@@ -198,7 +198,7 @@ block-interleaved samples.</p>
<b>TIFFWriteRawStrip</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFWriteTile.3tiff.html b/tiff/html/man/TIFFWriteTile.3tiff.html
index 6f6ffd23b..d450ee128 100644
--- a/tiff/html/man/TIFFWriteTile.3tiff.html
+++ b/tiff/html/man/TIFFWriteTile.3tiff.html
@@ -107,7 +107,7 @@ returned.</p>
<b>TIFFWriteRawTile</b>(3TIFF), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFbuffer.3tiff.html b/tiff/html/man/TIFFbuffer.3tiff.html
index 09009b5fa..d96621d07 100644
--- a/tiff/html/man/TIFFbuffer.3tiff.html
+++ b/tiff/html/man/TIFFbuffer.3tiff.html
@@ -108,7 +108,7 @@ allocate space for a data buffer.</p>
<p><b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFcodec.3tiff.html b/tiff/html/man/TIFFcodec.3tiff.html
index d2007542f..e18c0ed49 100644
--- a/tiff/html/man/TIFFcodec.3tiff.html
+++ b/tiff/html/man/TIFFcodec.3tiff.html
@@ -108,7 +108,7 @@ schemes.</p>
<p><b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFcolor.3tiff.html b/tiff/html/man/TIFFcolor.3tiff.html
index edf423b6c..e598ae6ea 100644
--- a/tiff/html/man/TIFFcolor.3tiff.html
+++ b/tiff/html/man/TIFFcolor.3tiff.html
@@ -967,7 +967,7 @@ _TIFFfree(cielab);</p></td>
<p><b>TIFFRGBAImage</b>(3TIFF) <b>libtiff</b>(3TIFF),</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFmemory.3tiff.html b/tiff/html/man/TIFFmemory.3tiff.html
index c3f38e0b7..39fa78948 100644
--- a/tiff/html/man/TIFFmemory.3tiff.html
+++ b/tiff/html/man/TIFFmemory.3tiff.html
@@ -102,7 +102,7 @@ repsectively.</p>
<b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFsize.3tiff.html b/tiff/html/man/TIFFsize.3tiff.html
index 5a14254ed..f2e2b7724 100644
--- a/tiff/html/man/TIFFsize.3tiff.html
+++ b/tiff/html/man/TIFFsize.3tiff.html
@@ -87,7 +87,7 @@ planes.</p>
<b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFstrip.3tiff.html b/tiff/html/man/TIFFstrip.3tiff.html
index b8bc7c62d..ae6b7903d 100644
--- a/tiff/html/man/TIFFstrip.3tiff.html
+++ b/tiff/html/man/TIFFstrip.3tiff.html
@@ -121,7 +121,7 @@ the image.</p>
<b>TIFFWriteRawStrip</b>(3TIFF), <b>libtiff</b>(3TIFF),</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFswab.3tiff.html b/tiff/html/man/TIFFswab.3tiff.html
index 80d1db458..3f7ebfef8 100644
--- a/tiff/html/man/TIFFswab.3tiff.html
+++ b/tiff/html/man/TIFFswab.3tiff.html
@@ -102,7 +102,7 @@ table that can be used as an <i>identity function</i>; i.e.
<p><b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/TIFFtile.3tiff.html b/tiff/html/man/TIFFtile.3tiff.html
index addeb5159..b69cc9198 100644
--- a/tiff/html/man/TIFFtile.3tiff.html
+++ b/tiff/html/man/TIFFtile.3tiff.html
@@ -133,7 +133,7 @@ the image.</p>
<b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/fax2ps.1.html b/tiff/html/man/fax2ps.1.html
index aba6fc307..7c5c1f3ea 100644
--- a/tiff/html/man/fax2ps.1.html
+++ b/tiff/html/man/fax2ps.1.html
@@ -244,7 +244,7 @@ PostScript to image the bitmap raster instead.</p>
<p><b>tiff2ps</b>(1), <b>libtiff</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/fax2tiff.1.html b/tiff/html/man/fax2tiff.1.html
index 3aac8c793..a1c1b0b6f 100644
--- a/tiff/html/man/fax2tiff.1.html
+++ b/tiff/html/man/fax2tiff.1.html
@@ -599,7 +599,7 @@ TIFF 5.0 specification prepared by Cygnet Technologies.</p>
<b>tiffgt</b>(1), <b>libtiff</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/gif2tiff.1.html b/tiff/html/man/gif2tiff.1.html
deleted file mode 100644
index c50735377..000000000
--- a/tiff/html/man/gif2tiff.1.html
+++ /dev/null
@@ -1,141 +0,0 @@
-<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Sat Feb 24 18:37:19 2007 -->
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>GIF2TIFF</title>
-</head>
-<body>
-
-<h1 align=center>GIF2TIFF</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#NOTES">NOTES</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<a name="NAME"></a>
-<h2>NAME</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p>gif2tiff &minus; create a <small>TIFF</small> file from a
-GIF87 format image file</p>
-</td>
-</table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p><b>gif2tiff</b> [ <i>options</i> ] <i>input.gif
-output.tif</i></p>
-</td>
-</table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p><i>Gif2tiff</i> converts a file in the GIF87 format to
-<small>TIFF.</small> The <small>TIFF</small> image is
-created as a palette image, with samples compressed with the
-Lempel-Ziv &amp; Welch algorithm (<i>Compression</i>=5).
-These characteristics can overridden, or explicitly
-specified with the options described below.</p>
-</td>
-</table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-<!-- TABS -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="5" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td>
-<td width="3%">
-
-<p><b>&minus;c</b></p>
-</td>
-<td width="5%"></td>
-<td width="80%">
-
-<p>Specify a compression scheme to use when writing image
-data: <b>&minus;c none</b> for no compression, <b>&minus;c
-packbits</b> for the PackBits compression algorithm,
-<b>&minus;c zip</b> for the Deflate compression algorithm,
-and <b>&minus;c lzw</b> for Lempel-Ziv &amp; Welch (the
-default).</p>
-</td>
-<td width="0%">
-</td>
-<tr valign="top" align="left">
-<td width="10%"></td>
-<td width="3%">
-
-<p><b>&minus;r</b></p>
-</td>
-<td width="5%"></td>
-<td width="80%">
-
-<p>Write data with a specified number of rows per strip; by
-default the number of rows/strip is selected so that each
-strip is approximately 8 kilobytes.</p>
-</td>
-<td width="0%">
-</td>
-</table>
-<a name="NOTES"></a>
-<h2>NOTES</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p>The program is based on Paul Haeberli&rsquo;s
-<i>fromgif</i> program which, in turn, is based on Marcel
-J.E. Mol&rsquo;s GIF reader.</p>
-</td>
-</table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p>Should have more options to control output format.</p>
-</td>
-</table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p><b>pal2rgb</b>(1), <b>tiffinfo</b>(1), <b>tiffcp</b>(1),
-<b>tiffmedian</b>(1), <b>libtiff</b>(3)</p>
-<!-- INDENTATION -->
-<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
-</td>
-</table>
-<hr>
-</body>
-</html>
diff --git a/tiff/html/man/index.html b/tiff/html/man/index.html
index 7e9e8d2c7..4456f990a 100644
--- a/tiff/html/man/index.html
+++ b/tiff/html/man/index.html
@@ -38,13 +38,13 @@
<li><A HREF=TIFFWriteTile.3tiff.html>TIFFWriteTile.3tiff.html</a>
<li><A HREF=fax2ps.1.html>fax2ps.1.html</a>
<li><A HREF=fax2tiff.1.html>fax2tiff.1.html</a>
-<li><A HREF=gif2tiff.1.html>gif2tiff.1.html</a>
+<!-- <li><A HREF=gif2tiff.1.html>gif2tiff.1.html</a> -->
<li><A HREF=pal2rgb.1.html>pal2rgb.1.html</a>
<li><A HREF=ppm2tiff.1.html>ppm2tiff.1.html</a>
-<li><A HREF=ras2tiff.1.html>ras2tiff.1.html</a>
+<!-- <li><A HREF=ras2tiff.1.html>ras2tiff.1.html</a> -->
<li><A HREF=raw2tiff.1.html>raw2tiff.1.html</a>
<li><A HREF=rgb2ycbcr.1.html>rgb2ycbcr.1.html</a>
-<li><A HREF=sgi2tiff.1.html>sgi2tiff.1.html</a>
+<!-- <li><A HREF=sgi2tiff.1.html>sgi2tiff.1.html</a> -->
<li><A HREF=thumbnail.1.html>thumbnail.1.html</a>
<li><A HREF=tiff2bw.1.html>tiff2bw.1.html</a>
<li><A HREF=tiff2pdf.1.html>tiff2pdf.1.html</a>
@@ -60,5 +60,5 @@
<li><A HREF=tiffmedian.1.html>tiffmedian.1.html</a>
<li><A HREF=tiffset.1.html>tiffset.1.html</a>
<li><A HREF=tiffsplit.1.html>tiffsplit.1.html</a>
-<li><A HREF=tiffsv.1.html>tiffsv.1.html</a>
+<!-- <li><A HREF=tiffsv.1.html>tiffsv.1.html</a> -->
</ul></BODY></HTML>
diff --git a/tiff/html/man/pal2rgb.1.html b/tiff/html/man/pal2rgb.1.html
index d06ddb6da..42ecdc17c 100644
--- a/tiff/html/man/pal2rgb.1.html
+++ b/tiff/html/man/pal2rgb.1.html
@@ -181,7 +181,7 @@ has approximately 8 kilobytes of data in it.</p>
<b>tiffmedian</b>(1), <b>libtiff</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/ppm2tiff.1.html b/tiff/html/man/ppm2tiff.1.html
index e3c664e26..79a89f2ee 100644
--- a/tiff/html/man/ppm2tiff.1.html
+++ b/tiff/html/man/ppm2tiff.1.html
@@ -133,7 +133,7 @@ resolution (in dots/inch).</p>
<b>tiffmedian</b>(1), <b>libtiff</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/ras2tiff.1.html b/tiff/html/man/ras2tiff.1.html
deleted file mode 100644
index 2c652aba6..000000000
--- a/tiff/html/man/ras2tiff.1.html
+++ /dev/null
@@ -1,139 +0,0 @@
-<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Sat Feb 24 18:37:19 2007 -->
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>RAS2TIFF</title>
-</head>
-<body>
-
-<h1 align=center>RAS2TIFF</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<a name="NAME"></a>
-<h2>NAME</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p>ras2tiff &minus; create a <small>TIFF</small> file from a
-Sun rasterfile</p>
-</td>
-</table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p><b>ras2tiff</b> [ <i>options</i> ] <i>input.ras
-output.tif</i></p>
-</td>
-</table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p><i>ras2tiff</i> converts a file in the Sun rasterfile
-format to <small>TIFF.</small> By default, the
-<small>TIFF</small> image is created with data samples
-packed (<i>PlanarConfiguration</i>=1), compressed with the
-Lempel-Ziv &amp; Welch algorithm (<i>Compression</i>=5), and
-with each strip no more than 8 kilobytes. These
-characteristics can overridden, or explicitly specified with
-the options described below.</p>
-<!-- INDENTATION -->
-<p>Any colormap information in the rasterfile is carried
-over to the <small>TIFF</small> file by including a
-<i>Colormap</i> tag in the output file. If the rasterfile
-has a colormap, the <i>PhotometricInterpretation</i> tag is
-set to 3 (palette); otherwise it is set to 2 (RGB) if the
-depth is 24 or 1 (min-is-black) if the depth is not 24.</p>
-</td>
-</table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-<!-- TABS -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="5" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td>
-<td width="2%">
-
-<p><b>&minus;c</b></p>
-</td>
-<td width="6%"></td>
-<td width="80%">
-
-<p>Specify a compression scheme to use when writing image
-data: <b>&minus;c none</b> for no compression, <b>&minus;c
-packbits</b> for the PackBits compression algorithm,
-<b>&minus;c jpeg</b> for the baseline JPEG compression
-algorithm, <b>&minus;c zip</b> for the Deflate compression
-algorithm, and <b>&minus;c lzw</b> for Lempel-Ziv &amp;
-Welch (the default).</p>
-</td>
-<td width="0%">
-</td>
-<tr valign="top" align="left">
-<td width="10%"></td>
-<td width="2%">
-
-<p><b>&minus;r</b></p>
-</td>
-<td width="6%"></td>
-<td width="80%">
-
-<p>Write data with a specified number of rows per strip; by
-default the number of rows/strip is selected so that each
-strip is approximately 8 kilobytes.</p>
-</td>
-<td width="0%">
-</td>
-</table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p>Does not handle all possible rasterfiles. In particular,
-<i>ras2tiff</i> does not handle run-length encoded
-images.</p>
-</td>
-</table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p><b>pal2rgb</b>(1), <b>tiffinfo</b>(1), <b>tiffcp</b>(1),
-<b>tiffmedian</b>(1), <b>libtiff</b>(3)</p>
-<!-- INDENTATION -->
-<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
-</td>
-</table>
-<hr>
-</body>
-</html>
diff --git a/tiff/html/man/raw2tiff.1.html b/tiff/html/man/raw2tiff.1.html
index ce47e9f80..59d5506b2 100644
--- a/tiff/html/man/raw2tiff.1.html
+++ b/tiff/html/man/raw2tiff.1.html
@@ -502,7 +502,7 @@ images guessing method will work fine.</p>
<b>tiffmedian</b>(1), <b>libtiff</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/rgb2ycbcr.1.html b/tiff/html/man/rgb2ycbcr.1.html
index dcd88d14b..6e481f79d 100644
--- a/tiff/html/man/rgb2ycbcr.1.html
+++ b/tiff/html/man/rgb2ycbcr.1.html
@@ -147,7 +147,7 @@ strip is approximately 8 kilobytes.</p>
<b>libtiff</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/sgi2tiff.1.html b/tiff/html/man/sgi2tiff.1.html
deleted file mode 100644
index 7665a6e42..000000000
--- a/tiff/html/man/sgi2tiff.1.html
+++ /dev/null
@@ -1,147 +0,0 @@
-<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Sat Feb 24 18:37:19 2007 -->
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>SGI2TIFF</title>
-</head>
-<body>
-
-<h1 align=center>SGI2TIFF</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<a name="NAME"></a>
-<h2>NAME</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p>sgi2tiff &minus; create a <small>TIFF</small> file from
-an <small>SGI</small> image file</p>
-</td>
-</table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p><b>sgi2tiff</b> [ <i>options</i> ] <i>input.rgb
-output.tif</i></p>
-</td>
-</table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p><i>sgi2tiff</i> converts a file in the <small>SGI</small>
-image format to <small>TIFF.</small> By default, the
-<small>TIFF</small> image is created with data samples
-packed (<i>PlanarConfiguration</i>=1), compressed with the
-Lempel-Ziv &amp; Welch algorithm (<i>Compression</i>=5), and
-with each strip no more than 8 kilobytes. These
-characteristics can overridden, or explicitly specified with
-the options described below.</p>
-</td>
-</table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-<!-- TABS -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="5" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td>
-<td width="3%">
-
-<p><b>&minus;c</b></p>
-</td>
-<td width="5%"></td>
-<td width="80%">
-
-<p>Specify a compression scheme to use when writing image
-data: <b>&minus;c none</b> for no compression, <b>&minus;c
-packbits</b> for the PackBits compression algorithm),
-<b>&minus;c jpeg</b> for the baseline JPEG compression
-algorithm, <b>&minus;c zip</b> for the Deflate compression
-algorithm, and <b>&minus;c lzw</b> for Lempel-Ziv &amp;
-Welch (the default).</p>
-</td>
-<td width="0%">
-</td>
-<tr valign="top" align="left">
-<td width="10%"></td>
-<td width="3%">
-
-<p><b>&minus;p</b></p>
-</td>
-<td width="5%"></td>
-<td width="80%">
-
-<p>Explicitly select the planar configuration used in
-organizing data samples in the output image: <b>&minus;p
-contig</b> for samples packed contiguously, and <b>&minus;p
-separate</b> for samples stored separately. By default
-samples are packed.</p>
-</td>
-<td width="0%">
-</td>
-<tr valign="top" align="left">
-<td width="10%"></td>
-<td width="3%">
-
-<p><b>&minus;r</b></p>
-</td>
-<td width="5%"></td>
-<td width="80%">
-
-<p>Write data with a specified number of rows per strip; by
-default the number of rows/strip is selected so that each
-strip is approximately 8 kilobytes.</p>
-</td>
-<td width="0%">
-</td>
-</table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p>Does not record colormap information.</p>
-</td>
-</table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p><b>tiffinfo</b>(1), <b>tiffcp</b>(1),
-<b>tiffmedian</b>(1), <b>libtiff</b>(3)</p>
-<!-- INDENTATION -->
-<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
-</td>
-</table>
-<hr>
-</body>
-</html>
diff --git a/tiff/html/man/thumbnail.1.html b/tiff/html/man/thumbnail.1.html
index 2d1f3c9af..8b114137f 100644
--- a/tiff/html/man/thumbnail.1.html
+++ b/tiff/html/man/thumbnail.1.html
@@ -140,7 +140,7 @@ thumbnail images.</p>
<b>libtiff</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/tiff2bw.1.html b/tiff/html/man/tiff2bw.1.html
index 1ebb4d392..413808ecf 100644
--- a/tiff/html/man/tiff2bw.1.html
+++ b/tiff/html/man/tiff2bw.1.html
@@ -153,7 +153,7 @@ strip is approximately 8 kilobytes.</p>
<b>tiffmedian</b>(1), <b>libtiff</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/tiff2pdf.1.html b/tiff/html/man/tiff2pdf.1.html
index 3b6dd4b1d..1feaf6b73 100644
--- a/tiff/html/man/tiff2pdf.1.html
+++ b/tiff/html/man/tiff2pdf.1.html
@@ -601,7 +601,7 @@ page, compressing the output with JPEG, with JPEG quality
<b>tiff2ps</b>(1)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/tiff2ps.1.html b/tiff/html/man/tiff2ps.1.html
index ef2cd7f9e..7b309b0f1 100644
--- a/tiff/html/man/tiff2ps.1.html
+++ b/tiff/html/man/tiff2ps.1.html
@@ -128,6 +128,19 @@ images.</p>
<td width="10%"></td>
<td width="3%">
+<p><b>&minus;8</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Disable use of ASCII85 encoding with PostScript Level 2/3.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
<p><b>&minus;a</b></p>
</td>
<td width="5%"></td>
@@ -171,6 +184,19 @@ an effect if both the <b>&minus;w</b> and the
<td width="10%"></td>
<td width="3%">
+<p><b>&minus;C</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Specify the document creator name.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
<p><b>&minus;d</b></p>
</td>
<td width="5%"></td>
@@ -187,6 +213,19 @@ individual pages in a multi-page (e.g. facsimile) file.</p>
<td width="10%"></td>
<td width="3%">
+<p><b>&minus;D</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Enable duplex printing (two pages per sheet of paper).</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
<p><b>&minus;e</b></p>
</td>
<td width="5%"></td>
@@ -252,8 +291,8 @@ and non-zero to enable. The default is enabled.</p>
<td width="80%">
<p>Specify the size of overlapping for split images (in
-inches). Used in conjunction with <b>&minus;H</b>
-option.</p>
+inches). Used in conjunction with <b>&minus;H</b> and <b>&minus;W</b>
+options.</p>
</td>
<td width="0%">
</td>
@@ -309,6 +348,19 @@ are hidden using the <i>SubIFD</i> tag.</p>
<td width="10%"></td>
<td width="3%">
+<p><b>&minus;O</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Write PostScript to specified file instead of standard output.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
<p><b>&minus;p</b></p>
</td>
<td width="5%"></td>
@@ -323,6 +375,19 @@ PostScript.</p>
<td width="10%"></td>
<td width="3%">
+<p><b>&minus;P</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Set optional PageOrientation DSC comment to Landscape or Portrait.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
<p><b>&minus;r</b></p>
</td>
<td width="5%"></td>
@@ -350,6 +415,32 @@ file.</p>
<td width="10%"></td>
<td width="3%">
+<p><b>&minus;t</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Specify the document title string.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
+<p><b>&minus;T</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Print pages for top edge binding.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
<p><b>&minus;w</b></p>
</td>
<td width="5%"></td>
@@ -364,6 +455,22 @@ inches).</p>
<td width="10%"></td>
<td width="3%">
+<p><b>&minus;W</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Specify the maximum width of image (in inches). Images
+with larger sizes will be split in several pages. Option
+<b>&minus;L</b> may be used for specifying size of split
+images overlapping.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
<p><b>&minus;x</b></p>
</td>
<td width="5%"></td>
@@ -524,7 +631,7 @@ Level I output.</p>
<b>tiffsv</b>(1), <b>libtiff</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/tiff2rgba.1.html b/tiff/html/man/tiff2rgba.1.html
index 35e06a54e..203f7deff 100644
--- a/tiff/html/man/tiff2rgba.1.html
+++ b/tiff/html/man/tiff2rgba.1.html
@@ -154,7 +154,7 @@ a pure RGB file. Currently this does not work if the
<b>libtiff</b>(3)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/tiffcmp.1.html b/tiff/html/man/tiffcmp.1.html
index acd2e90f0..d1474cafa 100644
--- a/tiff/html/man/tiffcmp.1.html
+++ b/tiff/html/man/tiffcmp.1.html
@@ -148,7 +148,7 @@ may be off in some exotic cases.</p>
<b>tiffmedian</b>(1), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/tiffcp.1.html b/tiff/html/man/tiffcp.1.html
index 4c7fcb62f..a376f94ec 100644
--- a/tiff/html/man/tiffcp.1.html
+++ b/tiff/html/man/tiffcp.1.html
@@ -70,27 +70,33 @@ any way.</p>
<h2>OPTIONS</h2>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
+ cols="5" cellspacing="0" cellpadding="0">
<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p><b>&minus;b</b> <i>image</i></p></td>
-</table>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
+<td width="10%"></td>
+<td width="3%">
+<p><b>&minus;a</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Append to an existing output file instead of overwriting it.</p>
+</td>
+<td width="0%">
+</td>
+</tr>
<tr valign="top" align="left">
-<td width="19%"></td>
+<td width="10%"></td>
+<td width="3%">
+<p><b>&minus;b</b></p></td>
+<td width="5%"></td>
<td width="80%">
<p>subtract the following monochrome image from all others
processed. This can be used to remove a noise bias from a
set of images. This bias image is typically an image of
noise the camera saw with its shutter closed.</p>
</td>
-</table>
-<!-- TABS -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="5" cellspacing="0" cellpadding="0">
+<td width="0%">
+</td>
<tr valign="top" align="left">
<td width="10%"></td>
<td width="3%">
@@ -135,8 +141,9 @@ output file: <b>none</b> for no compression, <b>packbits</b>
for PackBits compression, <b>lzw</b> for Lempel-Ziv &amp;
Welch compression, <b>jpeg</b> for baseline JPEG
compression, <b>zip</b> for Deflate compression, <b>g3</b>
-for CCITT Group 3 (T.4) compression, and <b>g4</b> for CCITT
-Group 4 (T.6) compression. By default <i>tiffcp</i> will
+for CCITT Group 3 (T.4) compression, <b>g4</b> for CCITT
+Group 4 (T.6) compression, or <b>sgilog</b> for SGILOG compression.
+By default <i>tiffcp</i> will
compress data according to the value of the
<i>Compression</i> tag found in the source file.</p>
</td>
@@ -260,6 +267,19 @@ images.</p>
<td width="10%"></td>
<td width="3%">
+<p><b>&minus;o</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Set initial directory offset.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
<p><b>&minus;p</b></p>
</td>
<td width="5%"></td>
@@ -355,6 +375,19 @@ in sequence.</p>
</td>
<td width="0%">
</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
+<p><b>&minus;8</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Write BigTIFF instead of classic TIFF format.</p>
+</td>
+<td width="0%">
+</td>
</table>
<!-- INDENTATION -->
<table width="100%" border=0 rules="none" frame="void"
@@ -528,7 +561,7 @@ with image numbers, as follows:</p></td>
<b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/tiffcrop.1.html b/tiff/html/man/tiffcrop.1.html
index 9c1edbbcf..4c868db92 100644
--- a/tiff/html/man/tiffcrop.1.html
+++ b/tiff/html/man/tiffcrop.1.html
@@ -676,7 +676,7 @@ decompressing) with the command:</p></td>
<b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/tiffdither.1.html b/tiff/html/man/tiffdither.1.html
index 5e3cb7c5d..40e3d6edb 100644
--- a/tiff/html/man/tiffdither.1.html
+++ b/tiff/html/man/tiffdither.1.html
@@ -139,6 +139,19 @@ with the <i>Fill- Order</i> tag set to <small>MSB2LSB
<td width="10%"></td>
<td width="3%">
+<p><b>&minus;r</b></p>
+</td>
+<td width="5%"></td>
+<td width="80%">
+
+<p>Make each strip have no more than the given number of rows.</p>
+</td>
+<td width="0%">
+</td>
+<tr valign="top" align="left">
+<td width="10%"></td>
+<td width="3%">
+
<p><b>&minus;t</b></p>
</td>
<td width="5%"></td>
@@ -175,7 +188,7 @@ threshold value is 128.</p>
<b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/tiffdump.1.html b/tiff/html/man/tiffdump.1.html
index c37d2eebc..7a23feb63 100644
--- a/tiff/html/man/tiffdump.1.html
+++ b/tiff/html/man/tiffdump.1.html
@@ -137,7 +137,7 @@ using the usual C-style syntax; i.e. a leading
<p><b>tiffinfo</b>(1), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/tiffgt.1.html b/tiff/html/man/tiffgt.1.html
index 5a04996a6..d8fcef507 100644
--- a/tiff/html/man/tiffgt.1.html
+++ b/tiff/html/man/tiffgt.1.html
@@ -543,7 +543,7 @@ manager.</p>
<b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/tiffinfo.1.html b/tiff/html/man/tiffinfo.1.html
index d3a013ce7..9accdd514 100644
--- a/tiff/html/man/tiffinfo.1.html
+++ b/tiff/html/man/tiffinfo.1.html
@@ -188,7 +188,7 @@ in a directory.</p>
<b>tiffmedian</b>(1), <b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/tiffmedian.1.html b/tiff/html/man/tiffmedian.1.html
index 78310511c..ec6d0b1c0 100644
--- a/tiff/html/man/tiffmedian.1.html
+++ b/tiff/html/man/tiffmedian.1.html
@@ -175,7 +175,7 @@ more than 8 kilobytes of data appear in a strip.</p>
Paul Heckbert, SIGGRAPH proceedings, 1982, pp. 297-307.</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/tiffset.1.html b/tiff/html/man/tiffset.1.html
index 7192d6e96..0c30b0106 100644
--- a/tiff/html/man/tiffset.1.html
+++ b/tiff/html/man/tiffset.1.html
@@ -168,7 +168,7 @@ tiffset &minus;s 283 300.0 a.tif
<b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/tiffsplit.1.html b/tiff/html/man/tiffsplit.1.html
index 4de5c812e..5cf8dd85b 100644
--- a/tiff/html/man/tiffsplit.1.html
+++ b/tiff/html/man/tiffsplit.1.html
@@ -94,7 +94,7 @@ tags&rsquo;&rsquo; is copied when splitting.</p>
<b>libtiff</b>(3TIFF)</p>
<!-- INDENTATION -->
<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
+<b>http://www.simplesystems.org/libtiff/</b></p>
</td>
</table>
<hr>
diff --git a/tiff/html/man/tiffsv.1.html b/tiff/html/man/tiffsv.1.html
deleted file mode 100644
index f9921a484..000000000
--- a/tiff/html/man/tiffsv.1.html
+++ /dev/null
@@ -1,207 +0,0 @@
-<!-- Creator : groff version 1.18.1 -->
-<!-- CreationDate: Sat Feb 24 18:37:20 2007 -->
-<html>
-<head>
-<meta name="generator" content="groff -Thtml, see www.gnu.org">
-<meta name="Content-Style" content="text/css">
-<title>TIFFSV</title>
-</head>
-<body>
-
-<h1 align=center>TIFFSV</h1>
-<a href="#NAME">NAME</a><br>
-<a href="#SYNOPSIS">SYNOPSIS</a><br>
-<a href="#DESCRIPTION">DESCRIPTION</a><br>
-<a href="#OPTIONS">OPTIONS</a><br>
-<a href="#NOTE">NOTE</a><br>
-<a href="#BUGS">BUGS</a><br>
-<a href="#SEE ALSO">SEE ALSO</a><br>
-
-<hr>
-<a name="NAME"></a>
-<h2>NAME</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p>tiffsv &minus; save an image from the framebuffer in a
-<small>TIFF</small> file (Silicon Graphics version)</p>
-</td>
-</table>
-<a name="SYNOPSIS"></a>
-<h2>SYNOPSIS</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p><b>tiffsv</b> [ <i>options</i> ] <i>output.tif</i> [
-<i>x1 x2 y1 y2</i> ]</p>
-</td>
-</table>
-<a name="DESCRIPTION"></a>
-<h2>DESCRIPTION</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p><i>tiffsv</i> saves all or part of the framebuffer in a
-file using the Tag Image File Format, Revision 6.0. By
-default, the image is saved with data samples packed
-(<i>PlanarConfiguration</i>=1), compressed with the
-Lempel-Ziv &amp; Welch algorithm (<i>Compression</i>=5), and
-with each strip no more than 8 kilobytes. These
-characteristics can be overridden, or explicitly specified
-with the options described below.</p>
-</td>
-</table>
-<a name="OPTIONS"></a>
-<h2>OPTIONS</h2>
-<!-- TABS -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="5" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td>
-<td width="3%">
-
-<p><b>&minus;b</b></p>
-</td>
-<td width="5%"></td>
-<td width="80%">
-
-<p>Save the image as a greyscale image as if it were
-processed by <i>tiff2bw</i>(1). This option is included for
-compatibility with the standard <i>scrsave</i>(6D)
-program.</p>
-</td>
-<td width="0%">
-</td>
-<tr valign="top" align="left">
-<td width="10%"></td>
-<td width="3%">
-
-<p><b>&minus;c</b></p>
-</td>
-<td width="5%"></td>
-<td width="80%">
-
-<p>Specify the compression to use for data written to the
-output file: <b>none</b> for no compression, <b>packbits</b>
-for PackBits compression, <b>jpeg</b> for baseline JPEG
-compression, <b>zip</b> for Deflate compression, and
-<b>lzw</b> for Lempel-Ziv &amp; Welch compression
-(default).</p>
-</td>
-<td width="0%">
-</td>
-</table>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="17%"></td>
-<td width="82%">
-<p><small>LZW</small> compression can be specified together
-with a <i>predictor</i> value. A predictor value of 2 causes
-each scanline of the output image to undergo horizontal
-differencing before it is encoded; a value of 1 forces each
-scanline to be encoded without differencing. LZW-specific
-options are specified by appending a
-&lsquo;&lsquo;:&rsquo;&rsquo;-separated list to the
-&lsquo;&lsquo;lzw&rsquo;&rsquo; option; e.g. <b>&minus;c
-lzw:2</b> for <small>LZW</small> compression with horizontal
-differencing.</p>
-</td>
-</table>
-<!-- TABS -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="5" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="10%"></td>
-<td width="3%">
-
-<p><b>&minus;p</b></p>
-</td>
-<td width="5%"></td>
-<td width="80%">
-
-<p>Specify the planar configuration to use in writing image
-data. By default, <i>tiffsv</i> will create a new file with
-the data samples packed contiguously. Specifying <b>&minus;p
-contig</b> will force data to be written with multi-sample
-data packed together, while <b>&minus;p separate</b> will
-force samples to be written in separate planes.</p>
-</td>
-<td width="0%">
-</td>
-<tr valign="top" align="left">
-<td width="10%"></td>
-<td width="3%">
-
-<p><b>&minus;r</b></p>
-</td>
-<td width="5%"></td>
-<td width="80%">
-
-<p>Specify the number of rows (scanlines) in each strip of
-data written to the output file. By default, <i>tiffsv</i>
-attempts to set the rows/strip that no more than 8 kilobytes
-of data appear in a strip.</p>
-</td>
-<td width="0%">
-</td>
-</table>
-<a name="NOTE"></a>
-<h2>NOTE</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p>Except for the use of <small>TIFF,</small> this program
-is equivalent to the standard <i>scrsave</i> program. This
-means, for example, that you can use it in conjunction with
-the standard <i>icut</i> program simply by creating a link
-called <i>scrsave</i>, or by creating a shell script called
-<i>scrsave</i> that invokes <i>tiffgt</i> with the
-appropriate options.</p>
-</td>
-</table>
-<a name="BUGS"></a>
-<h2>BUGS</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p>If data are saved compressed and in separate planes, then
-the rows in each strip is silently set to one to avoid
-limitations in the <b>libtiff</b>(3TIFF) library.</p>
-</td>
-</table>
-<a name="SEE ALSO"></a>
-<h2>SEE ALSO</h2>
-<!-- INDENTATION -->
-<table width="100%" border=0 rules="none" frame="void"
- cols="2" cellspacing="0" cellpadding="0">
-<tr valign="top" align="left">
-<td width="8%"></td>
-<td width="91%">
-<p><b>scrsave</b>(6D) <b>pal2rgb</b>(1), <b>tiffdump</b>(1),
-<b>tiffgt</b>(1), <b>tiffinfo</b>(1), <b>tiffcp</b>(1),
-<b>tiffmedian</b>(1), <b>libtiff</b>(3TIFF)</p>
-<!-- INDENTATION -->
-<p>Libtiff library home page:
-<b>http://www.remotesensing.org/libtiff/</b></p>
-</td>
-</table>
-<hr>
-</body>
-</html>
diff --git a/tiff/html/misc.html b/tiff/html/misc.html
index aed91a921..b30eb676c 100644
--- a/tiff/html/misc.html
+++ b/tiff/html/misc.html
@@ -77,6 +77,7 @@ the more persistent contributors have been:
Joris Van Damme
Tavis Ormandy
Richard Nolde
+ Even Rouault
</PRE>
(my apology to anyone that was inadvertently not listed.)
@@ -111,6 +112,6 @@ OF THIS SOFTWARE.
<HR>
-Last updated: $Date: 2007/02/24 15:47:04 $
+Last updated: $Date: 2016-09-25 20:05:44 $
</BODY>
</HTML>
diff --git a/tiff/html/support.html b/tiff/html/support.html
index f6f5d6087..2330d40a3 100644
--- a/tiff/html/support.html
+++ b/tiff/html/support.html
@@ -648,7 +648,7 @@
</p>
<hr>
<p>
- Last updated: $Date: 2005/12/28 06:53:18 $
+ Last updated: $Date: 2016-09-25 20:05:45 $
</p>
</body>
</html>
diff --git a/tiff/html/tools.html b/tiff/html/tools.html
index 65e9c0dd8..7b99d71dd 100644
--- a/tiff/html/tools.html
+++ b/tiff/html/tools.html
@@ -26,21 +26,10 @@ examples for writing programs to display and save TIFF images.
The software makes extensive use of the <tt>TIFFRGBAImage</tt>
facilities described elsewhere.</td>
</tr>
-<tr>
-<td valign="top" width="10%"><tt><a href="man/tiffsv.1.html">tiffsv</a></tt></td>
-<td>A program to save all or part of a screen dump on a Silicon
-Graphics system. As for <tt>tiffgt</tt> this code, while written to
-use the IRIS GL, can be easily tailored to other devices.</td>
-</tr>
</table>
<h3>Device-independent Programs</h3>
The remaining programs should be device-independent:
<table border cellpadding="3">
-<tr>
-<td valign="top" width="10%"><tt><a href="man/bmp2tiff.1.html">bmp2tiff</a></tt></td>
-<td>Convert BMP images to TIFF</td>
-</tr>
-<tr>
<td valign="top" width="10%"><tt><a href="man/fax2ps.1.html">fax2ps</a></tt></td>
<td>Convert a Group 3- or Group 4- compressed TIFF to PostScript
that is significantly more compressed than is generated by
@@ -50,11 +39,6 @@ that is significantly more compressed than is generated by
<td valign="top" width="10%"><tt><a href="man/fax2tiff.1.html">fax2tiff</a></tt></td>
<td>Convert raw Group 3 or Group 4 facsimile data to TIFF</td>
</tr>
-<tr>
-<td valign="top" width="10%"><tt><a href="man/gif2tiff.1.html">gif2tiff</a></tt></td>
-<td>A quick hack that converts GIF 87a (old) format images to TIFF</td>
-</tr>
-<tr>
<td valign="top" width="10%"><tt><a href="man/pal2rgb.1.html">pal2rgb</a></tt></td>
<td>Convert a Palette-style image to a full color RGB image by
applying the colormap</td>
@@ -63,12 +47,6 @@ applying the colormap</td>
<td valign="top" width="10%"><tt><a href="man/ppm2tiff.1.html">ppm2tiff</a></tt></td>
<td>A quick hack that converts 8-bit PPM format images to TIFF</td>
</tr>
-<tr>
-<td valign="top" width="10%"><tt><a href="man/ras2tiff.1.html">ras2tiff</a></tt></td>
-<td>A quick hack that converts Sun rasterfile format images to TIFF
--- it's less than complete</td>
-</tr>
-<tr>
<td valign="top" width="10%"><tt><a href="man/raw2tiff.1.html">raw2tiff</a></tt></td>
<td>Create a TIFF file from raw data</td>
</tr>
@@ -78,11 +56,6 @@ applying the colormap</td>
TIFF image; it's mainly provided for testing</td>
</tr>
<tr>
-<td valign="top" width="10%"><tt><a href="man/sgi2tiff.1.html">sgi2tiff</a></tt></td>
-<td>A program to convert SGI image files to TIFF. This program is
-only useful on SGI machines as it uses <tt>-limage</tt>.</td>
-</tr>
-<tr>
<td valign="top" width="10%"><tt><a href="man/thumbnail.1.html">thumbnail</a></tt></tt></td>
<td>Copy a bilevel TIFF to one that includes 8-bit greyscale
"thumbnail images" for each page; it is provided as an example of
@@ -159,6 +132,6 @@ multi-image file</td>
<p>Check out the manual pages for details about the above
programs.</p>
<hr>
-Last updated: $Date: 2009-10-28 22:13:37 $
+Last updated: $Date: 2016-06-05 19:54:00 $
</body>
</html>
diff --git a/tiff/html/v3.4beta007.html b/tiff/html/v3.4beta007.html
index c535d2708..10a2946dc 100644
--- a/tiff/html/v3.4beta007.html
+++ b/tiff/html/v3.4beta007.html
@@ -105,7 +105,7 @@ The following information is located here:
<ADDRESS>
<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>
-Last updated $Date: 1999/08/09 20:21:21 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</ADDRESS>
</BODY>
diff --git a/tiff/html/v3.4beta016.html b/tiff/html/v3.4beta016.html
index 22f185f54..133a46974 100644
--- a/tiff/html/v3.4beta016.html
+++ b/tiff/html/v3.4beta016.html
@@ -115,7 +115,7 @@ The following information is located here:
<ADDRESS>
<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>
-Last updated $Date: 1999/08/09 20:21:21 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</ADDRESS>
</BODY>
diff --git a/tiff/html/v3.4beta018.html b/tiff/html/v3.4beta018.html
index ac1877fae..1256c8a9d 100644
--- a/tiff/html/v3.4beta018.html
+++ b/tiff/html/v3.4beta018.html
@@ -77,7 +77,7 @@ The following information is located here:
<ADDRESS>
<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>
-Last updated $Date: 1999/08/09 20:21:21 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</ADDRESS>
</BODY>
diff --git a/tiff/html/v3.4beta024.html b/tiff/html/v3.4beta024.html
index 25a33478f..09da9262a 100644
--- a/tiff/html/v3.4beta024.html
+++ b/tiff/html/v3.4beta024.html
@@ -132,7 +132,7 @@ The following information is located here:
<ADDRESS>
<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>
-Last updated $Date: 1999/08/09 20:21:21 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</ADDRESS>
</BODY>
diff --git a/tiff/html/v3.4beta028.html b/tiff/html/v3.4beta028.html
index ff7ef69a2..827229efc 100644
--- a/tiff/html/v3.4beta028.html
+++ b/tiff/html/v3.4beta028.html
@@ -139,7 +139,7 @@ The following information is located here:
<ADDRESS>
<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>
-Last updated $Date: 1999/08/09 20:21:21 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</ADDRESS>
</BODY>
diff --git a/tiff/html/v3.4beta029.html b/tiff/html/v3.4beta029.html
index f2a3d3f6a..442a2f397 100644
--- a/tiff/html/v3.4beta029.html
+++ b/tiff/html/v3.4beta029.html
@@ -79,7 +79,7 @@ The following information is located here:
<ADDRESS>
<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>
-Last updated $Date: 1999/08/09 20:21:21 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</ADDRESS>
</BODY>
diff --git a/tiff/html/v3.4beta031.html b/tiff/html/v3.4beta031.html
index d5b7eac4f..5f350c784 100644
--- a/tiff/html/v3.4beta031.html
+++ b/tiff/html/v3.4beta031.html
@@ -87,7 +87,7 @@ The following information is located here:
<ADDRESS>
<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>
-Last updated $Date: 1999/08/09 20:21:21 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</ADDRESS>
</BODY>
diff --git a/tiff/html/v3.4beta032.html b/tiff/html/v3.4beta032.html
index bc14ef336..87d18cd8d 100644
--- a/tiff/html/v3.4beta032.html
+++ b/tiff/html/v3.4beta032.html
@@ -83,7 +83,7 @@ The following information is located here:
<ADDRESS>
<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>
-Last updated $Date: 1999/08/09 20:21:21 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</ADDRESS>
</BODY>
diff --git a/tiff/html/v3.4beta033.html b/tiff/html/v3.4beta033.html
index 8d8345a87..a6a6bbe2e 100644
--- a/tiff/html/v3.4beta033.html
+++ b/tiff/html/v3.4beta033.html
@@ -75,7 +75,7 @@ The following information is located here:
<ADDRESS>
<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>
-Last updated $Date: 1999/08/09 20:21:21 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</ADDRESS>
</BODY>
diff --git a/tiff/html/v3.4beta034.html b/tiff/html/v3.4beta034.html
index 77d9863b4..c7ac9bd93 100644
--- a/tiff/html/v3.4beta034.html
+++ b/tiff/html/v3.4beta034.html
@@ -61,7 +61,7 @@ The following information is located here:
<ADDRESS>
<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>
-Last updated $Date: 1999/08/09 20:21:21 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</ADDRESS>
</BODY>
diff --git a/tiff/html/v3.4beta035.html b/tiff/html/v3.4beta035.html
index 22fb2b8d0..72c009075 100644
--- a/tiff/html/v3.4beta035.html
+++ b/tiff/html/v3.4beta035.html
@@ -56,7 +56,7 @@ The following information is located here:
<ADDRESS>
<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>
-Last updated $Date: 1999/08/09 20:21:21 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</ADDRESS>
</BODY>
diff --git a/tiff/html/v3.4beta036.html b/tiff/html/v3.4beta036.html
index e36754d36..7a2fa8b38 100644
--- a/tiff/html/v3.4beta036.html
+++ b/tiff/html/v3.4beta036.html
@@ -110,7 +110,7 @@ The following information is located here:
<ADDRESS>
<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>
-Last updated $Date: 1999/08/09 20:21:21 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</ADDRESS>
</BODY>
diff --git a/tiff/html/v3.5.1.html b/tiff/html/v3.5.1.html
index 0c88de954..365700ce7 100644
--- a/tiff/html/v3.5.1.html
+++ b/tiff/html/v3.5.1.html
@@ -18,7 +18,7 @@ Changes in TIFF v3.5.1
<B>Current Version</B>: v3.5.1<BR>
<B>Previous Version</B>: v3.4beta037<BR>
<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com, directory graphics/tiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff/>http://www.remotesensing.org/libtiff</a>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff//>http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -69,7 +69,7 @@ utility.
<HR>
-Last updated $Date: 2006/01/03 01:42:30 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.5.2.html b/tiff/html/v3.5.2.html
index 71b486a6f..48ad398e2 100644
--- a/tiff/html/v3.5.2.html
+++ b/tiff/html/v3.5.2.html
@@ -18,7 +18,7 @@ Changes in TIFF v3.5.2
<B>Current Version</B>: v3.5.2<BR>
<B>Previous Version</B>: <A HREF=v3.5.1.html>v3.5.1</a><BR>
<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com, directory graphics/tiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff/">http://www.remotesensing.org/libtiff</a>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff//">http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -102,7 +102,7 @@ The following information is located here:
<HR>
-Last updated $Date: 2004/11/26 14:37:20 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.5.3.html b/tiff/html/v3.5.3.html
index e7910d9b7..78f469839 100644
--- a/tiff/html/v3.5.3.html
+++ b/tiff/html/v3.5.3.html
@@ -18,7 +18,7 @@ Changes in TIFF v3.5.3
<B>Current Version</B>: v3.5.3<BR>
<B>Previous Version</B>: <A HREF=v3.5.2.html>v3.5.2</a><BR>
<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff/">http://www.remotesensing.org/libtiff</a>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff//">http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -126,7 +126,7 @@ LZW decompression is unchanged.
<HR>
-Last updated $Date: 2004/11/26 14:37:20 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.5.4.html b/tiff/html/v3.5.4.html
index 714621e0c..1d988bf6d 100644
--- a/tiff/html/v3.5.4.html
+++ b/tiff/html/v3.5.4.html
@@ -18,7 +18,7 @@ Changes in TIFF v3.5.4
<B>Current Version</B>: v3.5.4<BR>
<B>Previous Version</B>: <A HREF=v3.5.3.html>v3.5.3</a><BR>
<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff/">http://www.remotesensing.org/libtiff</a>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff//">http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -82,7 +82,7 @@ The following information is located here:
<HR>
-Last updated $Date: 2006/01/03 01:45:41 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.5.5.html b/tiff/html/v3.5.5.html
index 20be92f8e..0b67f5cda 100644
--- a/tiff/html/v3.5.5.html
+++ b/tiff/html/v3.5.5.html
@@ -18,7 +18,7 @@ Changes in TIFF v3.5.5
<B>Current Version</B>: v3.5.5<BR>
<B>Previous Version</B>: <A HREF=v3.5.4.html>v3.5.4</a><BR>
<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff/">http://www.remotesensing.org/libtiff</a>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff//">http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -149,7 +149,7 @@ The following information is located here:
<HR>
-Last updated $Date: 2004/11/26 14:37:20 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.5.6-beta.html b/tiff/html/v3.5.6-beta.html
index 682f845ba..b552c371e 100644
--- a/tiff/html/v3.5.6-beta.html
+++ b/tiff/html/v3.5.6-beta.html
@@ -18,7 +18,7 @@ Changes in TIFF v3.5.6
<B>Current Version</B>: v3.5.6beta<BR>
<B>Previous Version</B>: <A HREF=v3.5.5.html>v3.5.5</a><BR>
<B>Master FTP Site</B>: <A HREF="ftp://ftp.onshore.com/pub/libtiff">ftp.onshore.com</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff/">http://www.remotesensing.org/libtiff</a>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff//">http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -179,7 +179,7 @@ The following information is located here:
<HR>
-Last updated $Date: 2006/03/18 17:12:47 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.5.7.html b/tiff/html/v3.5.7.html
index 528df74e6..96f479169 100644
--- a/tiff/html/v3.5.7.html
+++ b/tiff/html/v3.5.7.html
@@ -17,8 +17,8 @@ Changes in TIFF v3.5.7
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.5.7<BR>
<B>Previous Version</B>: <A HREF=v3.5.6-beta.html>v3.5.6 Beta</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff/">http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff//">http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -253,7 +253,7 @@ Updated bug section of tiffcmp.1 to note tiled file issues.
<HR>
-Last updated $Date: 2004/11/26 14:37:20 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.6.0.html b/tiff/html/v3.6.0.html
index 888e5472e..c53cd155b 100644
--- a/tiff/html/v3.6.0.html
+++ b/tiff/html/v3.6.0.html
@@ -17,10 +17,10 @@ Changes in TIFF v3.6.0
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.6.0<BR>
<B>Previous Version</B>: <A HREF=v3.5.7.html>v3.5.7</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -428,7 +428,7 @@ KIT:</B></A>
<HR>
-Last updated $Date: 2003/10/04 11:38:17 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.6.1.html b/tiff/html/v3.6.1.html
index d10606225..3d6d838d5 100644
--- a/tiff/html/v3.6.1.html
+++ b/tiff/html/v3.6.1.html
@@ -17,10 +17,10 @@ Changes in TIFF v3.6.1
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.6.1<BR>
<B>Previous Version</B>: <A HREF=v3.6.0.html>v3.6.0</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -193,7 +193,7 @@ KIT:</B></A>
<HR>
-Last updated $Date: 2003/12/24 22:14:15 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.7.0.html b/tiff/html/v3.7.0.html
index 413f2c605..777782faf 100644
--- a/tiff/html/v3.7.0.html
+++ b/tiff/html/v3.7.0.html
@@ -17,10 +17,10 @@
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.7.0<BR>
<B>Previous Version</B>: <A HREF=v3.7.0beta2.html>v3.7.0beta2</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -138,7 +138,7 @@ KIT:</B></A>
<HR>
-Last updated $Date: 2004/12/20 19:31:44 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.7.0alpha.html b/tiff/html/v3.7.0alpha.html
index 95c633ca5..5f1aed9c2 100644
--- a/tiff/html/v3.7.0alpha.html
+++ b/tiff/html/v3.7.0alpha.html
@@ -17,10 +17,10 @@
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.7.0alpha<BR>
<B>Previous Version</B>: <A HREF=v3.6.1.html>v3.6.1</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -243,7 +243,7 @@ KIT:</B></A>
<HR>
-Last updated $Date: 2006/03/18 17:12:47 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.7.0beta.html b/tiff/html/v3.7.0beta.html
index 7d7c868b0..6ec852bc1 100644
--- a/tiff/html/v3.7.0beta.html
+++ b/tiff/html/v3.7.0beta.html
@@ -17,10 +17,10 @@
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.7.0beta<BR>
<B>Previous Version</B>: <A HREF=v3.7.0alpha.html>v3.7.0alpha</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -156,7 +156,7 @@ KIT:</B></A>
<HR>
-Last updated $Date: 2006/03/18 17:12:47 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.7.0beta2.html b/tiff/html/v3.7.0beta2.html
index 67dd8dad3..4c4301770 100644
--- a/tiff/html/v3.7.0beta2.html
+++ b/tiff/html/v3.7.0beta2.html
@@ -17,10 +17,10 @@
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.7.0beta2<BR>
<B>Previous Version</B>: <A HREF=v3.7.0beta.html>v3.7.0beta</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -125,7 +125,7 @@ KIT:</B></A>
<HR>
-Last updated $Date: 2006/03/18 17:12:47 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.7.1.html b/tiff/html/v3.7.1.html
index b888792f2..6794a8d5a 100644
--- a/tiff/html/v3.7.1.html
+++ b/tiff/html/v3.7.1.html
@@ -17,10 +17,10 @@
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.7.1<BR>
<B>Previous Version</B>: <A HREF=v3.7.0.html>v3.7.0</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -227,7 +227,7 @@ The following information is located here:
</UL>
-Last updated $Date: 2004/12/20 19:31:44 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.7.2.html b/tiff/html/v3.7.2.html
index 6cb6f7cd3..45347b728 100644
--- a/tiff/html/v3.7.2.html
+++ b/tiff/html/v3.7.2.html
@@ -17,10 +17,10 @@
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.7.2<BR>
<B>Previous Version</B>: <A HREF=v3.7.1.html>v3.7.1</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -216,7 +216,7 @@ The following information is located here:
</UL>
-Last updated $Date: 2005/03/15 15:17:44 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.7.3.html b/tiff/html/v3.7.3.html
index d69845176..28981aef8 100644
--- a/tiff/html/v3.7.3.html
+++ b/tiff/html/v3.7.3.html
@@ -17,10 +17,10 @@
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.7.3<BR>
<B>Previous Version</B>: <A HREF=v3.7.2.html>v3.7.2</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -224,7 +224,7 @@ The following information is located here:
</UL>
-Last updated $Date: 2006/01/04 22:04:46 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.7.4.html b/tiff/html/v3.7.4.html
index 943732019..8b4e5dd8f 100644
--- a/tiff/html/v3.7.4.html
+++ b/tiff/html/v3.7.4.html
@@ -17,10 +17,10 @@
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.7.4<BR>
<B>Previous Version</B>: <A HREF=v3.7.3.html>v3.7.3</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -127,7 +127,7 @@ The following information is located here:
</UL>
-Last updated $Date: 2005/11/03 14:18:43 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.8.0.html b/tiff/html/v3.8.0.html
index 914dcb0c5..05a96c729 100644
--- a/tiff/html/v3.8.0.html
+++ b/tiff/html/v3.8.0.html
@@ -17,10 +17,10 @@
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.8.0<BR>
<B>Previous Version</B>: <A HREF=v3.7.4.html>v3.7.4</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -193,7 +193,7 @@ The following information is located here:
</UL>
-Last updated $Date: 2006/01/04 23:38:38 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.8.1.html b/tiff/html/v3.8.1.html
index 9fea1407e..c4710f1d6 100644
--- a/tiff/html/v3.8.1.html
+++ b/tiff/html/v3.8.1.html
@@ -17,10 +17,10 @@
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.8.1<BR>
<B>Previous Version</B>: <A HREF=v3.8.0.html>v3.8.0</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -211,7 +211,7 @@ The following information is located here:
<UL>
</UL>
-Last updated $Date: 2006/03/13 14:52:12 $.
+Last updated $Date: 2016-09-25 20:05:45 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.8.2.html b/tiff/html/v3.8.2.html
index e64812758..8d64ef736 100644
--- a/tiff/html/v3.8.2.html
+++ b/tiff/html/v3.8.2.html
@@ -17,10 +17,10 @@
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.8.2<BR>
<B>Previous Version</B>: <A HREF=v3.8.1.html>v3.8.1</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -131,7 +131,7 @@ The following information is located here:
<UL>
</UL>
-Last updated $Date: 2006/03/23 14:54:01 $.
+Last updated $Date: 2016-09-25 20:05:46 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.9.0beta.html b/tiff/html/v3.9.0beta.html
index d7d8821a5..52def61b1 100644
--- a/tiff/html/v3.9.0beta.html
+++ b/tiff/html/v3.9.0beta.html
@@ -17,10 +17,10 @@
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.9.0beta<BR>
<B>Previous Version</B>: <A HREF=v3.8.2.html>v3.8.2</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -298,7 +298,7 @@ The following information is located here:
</UL>
-Last updated $Date: 2009-08-20 22:57:39 $.
+Last updated $Date: 2016-09-25 20:05:46 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.9.1.html b/tiff/html/v3.9.1.html
index c97d94f8c..0cffd21c7 100644
--- a/tiff/html/v3.9.1.html
+++ b/tiff/html/v3.9.1.html
@@ -17,10 +17,10 @@
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.9.1<BR>
<B>Previous Version</B>: <A HREF=v3.9.1.html>v3.9.1</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -109,7 +109,7 @@ information is located here:
</UL>
-Last updated $Date: 2009-08-28 18:54:11 $.
+Last updated $Date: 2016-09-25 20:05:47 $.
</BODY>
</HTML>
diff --git a/tiff/html/v3.9.2.html b/tiff/html/v3.9.2.html
index bb76794c9..83f2cc9f5 100644
--- a/tiff/html/v3.9.2.html
+++ b/tiff/html/v3.9.2.html
@@ -17,10 +17,10 @@
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v3.9.2<BR>
<B>Previous Version</B>: <A HREF=v3.9.1.html>v3.9.1</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://www.remotesensing.org/libtiff">
-http://www.remotesensing.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -116,7 +116,7 @@ information is located here:
</UL>
-Last updated $Date: 2009-11-04 17:38:13 $.
+Last updated $Date: 2016-09-25 20:05:47 $.
</BODY>
</HTML>
diff --git a/tiff/html/v4.0.0.html b/tiff/html/v4.0.0.html
index 9694a1e04..d869c17c4 100644
--- a/tiff/html/v4.0.0.html
+++ b/tiff/html/v4.0.0.html
@@ -17,10 +17,10 @@
<HR SIZE=4 WIDTH=65% ALIGN=left>
<B>Current Version</B>: v4.0.0<BR>
<B>Previous Version</B>: <A HREF=v3.9.5.html>v3.9.5</a><BR>
-<B>Master FTP Site</B>: <A HREF="ftp://ftp.remotesensing.org/pub/libtiff">
-ftp.remotesensing.org</a>, directory pub/libtiff</A><BR>
-<B>Master HTTP Site</B>: <A HREF="http://download.osgeo.org/libtiff">
-http://download.osgeo.org/libtiff</a>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+ftp://download.osgeo.org/libtiff</a>
<HR SIZE=4 WIDTH=65% ALIGN=left>
</UL>
@@ -263,7 +263,7 @@ Other important backward incompatible changes in the public API:
<UL>
</UL>
-Last updated $Date: 2011-04-09 21:01:00 $.
+Last updated $Date: 2016-09-25 20:05:47 $.
</BODY>
</HTML>
diff --git a/tiff/html/v4.0.1.html b/tiff/html/v4.0.1.html
new file mode 100644
index 000000000..d75cd2406
--- /dev/null
+++ b/tiff/html/v4.0.1.html
@@ -0,0 +1,113 @@
+<HTML>
+<HEAD>
+<TITLE>
+ Changes in TIFF v4.0.1
+</TITLE>
+</HEAD>
+
+<BODY BGCOLOR=white>
+<FONT FACE="Helvetica, Arial, Sans">
+
+<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>: v4.0.1<BR>
+<B>Previous Version</B>: <A HREF=v4.0.0.html>v4.0.0</a><BR>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
+<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="#highlights">Major Changes</A>
+<LI><A HREF="#configure">Changes in the software configuration</A>
+<LI><A HREF="#libtiff">Changes in libtiff</A>
+<LI><A HREF="#tools">Changes in the tools</A>
+<LI><A HREF="#contrib">Changes in the contrib area</A>
+</UL>
+<p>
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>
+
+<UL>
+
+ <li> None
+
+</UL>
+
+
+<P><HR WIDTH=65% ALIGN=left>
+<!--------------------------------------------------------------------------->
+
+<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
+
+<UL>
+
+ <li> --enable-ld-version-script: New configure option to
+ enable shared library symbol versioning on ELF-based systems
+ (e.g. Linux and FreeBSD) which use the GNU linker. This
+ allows multiple major versions of libtiff to be loaded
+ simultaneously into the same application or library without
+ conflict, as long as all libtiffs involved are built with
+ versioned symbols. This option is not enabled by default.
+
+ <li> Added libtiff private dependency on -llzma for pkg-config.
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
+
+<UL>
+ <li> libtiff/tif_dir.c, libtiff/tif_dirread.c: Extra caution around
+ assumption tag fetching is always successful.
+
+ <li> libtiff/tif_jpeg.c: Extra caution for case where sp is NULL.
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!-------------------------------------------------------------------------->
+
+<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
+
+<UL>
+
+ <li> None
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
+
+<UL>
+
+ <li> None
+
+</UL>
+
+Last updated $Date: 2016-09-25 20:05:47 $.
+
+</BODY>
+</HTML>
diff --git a/tiff/html/v4.0.2.html b/tiff/html/v4.0.2.html
new file mode 100644
index 000000000..8dade5f3d
--- /dev/null
+++ b/tiff/html/v4.0.2.html
@@ -0,0 +1,118 @@
+<HTML>
+<HEAD>
+<TITLE>
+ Changes in TIFF v4.0.2
+</TITLE>
+</HEAD>
+
+<BODY BGCOLOR=white>
+<FONT FACE="Helvetica, Arial, Sans">
+
+<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>: v4.0.2<BR>
+<B>Previous Version</B>: <A HREF=v4.0.1.html>v4.0.1</a><BR>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
+<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="#highlights">Major Changes</A>
+<LI><A HREF="#configure">Changes in the software configuration</A>
+<LI><A HREF="#libtiff">Changes in libtiff</A>
+<LI><A HREF="#tools">Changes in the tools</A>
+<LI><A HREF="#contrib">Changes in the contrib area</A>
+</UL>
+<p>
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>
+
+<UL>
+
+ <li> None
+
+</UL>
+
+
+<P><HR WIDTH=65% ALIGN=left>
+<!--------------------------------------------------------------------------->
+
+<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
+
+<UL>
+
+ <li> None
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
+
+<UL>
+
+ <li> tif_getimage.c: added support for _SEPARATED CMYK images.
+
+ <li> tif_getimage.c: Added support for greyscale + alpha.
+
+ <li> Added TIFFCreateCustomDirectory() and TIFFCreateEXIFDirectory() functions.
+ <li> tif_print.c: Lots of fixes around printing corrupt or
+ hostile input.
+
+ <li> Improve handling of corrupt ycbcrsubsampling values.
+
+ <li> tif_unix.c: use strerror to get meaningful error messages.
+
+ <li> tif_jpeg.c: fix serious bugs in JPEGDecodeRaw().
+
+ <li> tif_jpeg.c: Fix size overflow (zdi-can-1221,CVE-2012-1173).
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!-------------------------------------------------------------------------->
+
+<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
+
+<UL>
+
+ <li> tiff2pdf: Defend against integer overflows while
+ calculating required buffer sizes (CVE-2012-2113).
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
+
+<UL>
+
+ <li> None
+
+</UL>
+
+Last updated $Date: 2016-09-25 20:05:47 $.
+
+</BODY>
+</HTML>
diff --git a/tiff/html/v4.0.3.html b/tiff/html/v4.0.3.html
new file mode 100644
index 000000000..1e9e79251
--- /dev/null
+++ b/tiff/html/v4.0.3.html
@@ -0,0 +1,125 @@
+<HTML>
+<HEAD>
+<TITLE>
+ Changes in TIFF v4.0.3
+</TITLE>
+</HEAD>
+
+<BODY BGCOLOR=white>
+<FONT FACE="Helvetica, Arial, Sans">
+
+<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>: v4.0.3<BR>
+<B>Previous Version</B>: <A HREF=v4.0.2.html>v4.0.2</a><BR>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
+<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="#highlights">Major Changes</A>
+<LI><A HREF="#configure">Changes in the software configuration</A>
+<LI><A HREF="#libtiff">Changes in libtiff</A>
+<LI><A HREF="#tools">Changes in the tools</A>
+<LI><A HREF="#contrib">Changes in the contrib area</A>
+</UL>
+<p>
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>
+
+<UL>
+
+ <li> None
+
+</UL>
+
+
+<P><HR WIDTH=65% ALIGN=left>
+<!--------------------------------------------------------------------------->
+
+<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
+
+<UL>
+
+ <li> Updated to use Automake 1.12.4. Avoids security problem with
+ 'make distcheck' (CVE-2012-3386).
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
+
+<UL>
+
+ <li> Various memory buffer access fixes.
+
+ <li> Fix handling when writing RGBA jpeg compressed imagery
+ (<A HREF="http://trac.osgeo.org/gdal/ticket/4732">http://trac.osgeo.org/gdal/ticket/4732</A>).
+
+ <li> Fix to work properly with IJG JPEG 7+.
+
+ <li> New functions TIFFFieldTag(), TIFFFieldName(),
+ TIFFFieldDataType(), TIFFFieldPassCount(), TIFFFieldReadCount(),
+ TIFFFieldWriteCount() to use as external accessors for the opaque
+ type TIFFField.
+
+ <li> Fix bug rewriting image tiles in a compressed
+ file (<A HREF="http://trac.osgeo.org/gdal/ticket/4771">http://trac.osgeo.org/gdal/ticket/4771</A>).
+
+ <li> Add TIFF/FX tag support in libtiff.
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!-------------------------------------------------------------------------->
+
+<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
+
+<UL>
+
+ <li> tiff2pdf: Fail when TIFFSetDirectory() fails. This prevents
+ core dumps or perhaps even arbitrary code execution when processing
+ a corrupt input file (CVE-2012-3401).
+
+ <li> tiff2pdf: Fix two places where t2p_error didn't get set after a
+ malloc failure. No crash risk AFAICS, but the program might not
+ report exit code 1 as desired.
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
+
+<UL>
+
+ <li> None
+
+</UL>
+
+Last updated $Date: 2016-09-25 20:05:47 $.
+
+</BODY>
+</HTML>
diff --git a/tiff/html/v4.0.4.html b/tiff/html/v4.0.4.html
new file mode 100644
index 000000000..6ddf2a1e2
--- /dev/null
+++ b/tiff/html/v4.0.4.html
@@ -0,0 +1,274 @@
+<HTML>
+<HEAD>
+<TITLE>
+ Changes in TIFF v4.0.4
+</TITLE>
+</HEAD>
+
+<BODY BGCOLOR=white>
+<FONT FACE="Helvetica, Arial, Sans">
+
+<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>: v4.0.4<BR>
+<B>Previous Version</B>: <A HREF=v4.0.4beta.html>v4.0.4beta</a><BR>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
+<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="#highlights">Major Changes</A>
+<LI><A HREF="#configure">Changes in the software configuration</A>
+<LI><A HREF="#libtiff">Changes in libtiff</A>
+<LI><A HREF="#tools">Changes in the tools</A>
+<LI><A HREF="#contrib">Changes in the contrib area</A>
+</UL>
+<p>
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>
+
+<UL>
+
+ <li> None
+
+</UL>
+
+
+<P><HR WIDTH=65% ALIGN=left>
+<!--------------------------------------------------------------------------->
+
+<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
+
+<UL>
+
+ <LI> configure.ac / configure
+ <UL>
+ <LI> Bugzilla Bug #2405: Correct shell equality operator.
+ <LI> Bugzilla Bug #2498: Adds an option to select the file I/O style on Windows hosts.
+ </UL>
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
+
+<UL>
+
+ <LI> tif_dir.c:
+ <UL>
+ <LI> TIFFNumberOfDirectories: Coverity 1134470 "Logically dead code"
+ </UL>
+
+ <LI> tif_dirread.c:
+ <UL>
+ <LI> TIFFReadDirEntryDoubleArray: Coverity 298626 "Logically dead code".
+ <LI> TIFFReadDirEntryFloatArray: Coverity 298627 "Logically dead code".
+ <LI> TIFFReadDirEntryIfd8Array: Coverity 298628 "Logically dead code".
+ <LI> TIFFReadDirEntrySlong8Array: Coverity 298629 "Logically dead code"
+ </UL>
+
+ <LI> tif_dirwrite.c
+ <UL>
+ <LI> _TIFFRewriteField: Coverity 1024310 "Resource leak".
+ </UL>
+
+ <LI> tif_jpeg.c
+ <UL>
+ <LI> JPEGCleanup: Coverity 298624 "Dereference before null check".
+ <LI> JPEGDecode: Coverity 602597 "Operands don't affect result".
+ </UL>
+
+ <LI> tif_getimage.c
+ <UL>
+ <LI> Bugzilla Bug #2409: Correct reading of certain tiled TIFFs.
+ </UL>
+
+ <LI> tif_luv.c
+ <UL>
+ <LI> LogLuvDecodeStrip: Coverity 991239 "Division or modulo by zero".
+ <LI> LogLuvDecodeTile: Coverity 991227 "Division or modulo by zero".
+ <LI> LogLuvEncodeStrip: Coverity 991240 "Division or modulo by zero".
+ <LI> LogLuvEncodeTile: Coverity 991241 "Division or modulo by zero".
+ </UL>
+
+ <LI> tif_lzw.c
+ <UL>
+ <LI> Decode files that contain consecutive CODE_CLEAR codes.
+ </UL>
+
+ <LI> tif_ojpeg.c
+ <UL>
+ <LI> OJPEGReadBufferFill: Coverity 603400 "Missing break in switch".
+ <LI> OJPEGReadHeaderInfoSecStreamDht: Coverity 601720 "Resource leak".
+ </UL>
+
+ <LI> tif_read.c
+ <UL>
+ <LI> TIFFStartTile: Coverity 715973 and 715974 "Division or modulo by zero".
+ </UL>
+
+ <LI> tif_unix.c
+ <UL>
+ <LI> Bugzilla Bug #2510: Fix several harmless but still annoying warnings.
+ </UL>
+
+ <LI> tif_write
+ <UL>
+ <LI> TIFFWriteEncodedStrip: Coverity 715975 "Division or modulo by zero".
+ <LI> TIFFWriteEncodedTile: Coverity 715976 and 715977 "Division or modulo by zero".
+ <LI> TIFFWriteRawStrip: Coverity 715978 "Division or modulo by zero".
+ <LI> TIFFWriteScanline: Coverity 715979 "Division or modulo by zero".
+ </UL>
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!-------------------------------------------------------------------------->
+
+<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
+
+<UL>
+
+ <LI> bmp2tiff
+ <UL>
+ <LI> Coverity 1024225 "Untrusted value as argument".
+ <LI> Coverity 1024678 "Unchecked return value from library".
+ <LI> Coverity 1024679 "Unchecked return value from library".
+ <LI> Coverity 1214160 "Ignoring number of bytes read".
+ </UL>
+
+ <LI> gif2tiff
+ <UL>
+ <LI> Coverity 1024222 "Untrusted value as argument".
+ <LI> Coverity 1024890 "Ignoring number of bytes read".
+ <LI> Coverity 1024891 "Ignoring number of bytes read".
+ <LI> Coverity 1024892 "Ignoring number of bytes read".
+ <LI> Coverity 1024893 "Ignoring number of bytes read".
+ <LI> Coverity 1024894 "Ignoring number of bytes read".
+ </UL>
+
+ <LI> ras2tiff
+ <UL>
+ <LI> Corrected Sun Raster header definition to be safe for
+ 64-bit systems. Add some header validations. Fixes many
+ (unspecified) Coverity issues.
+ <LI> Coverity 1024223 "Untrusted value as argument".
+ <LI> Coverity 1301206: "Integer handling issues (BAD_SHIFT)".
+ </UL>
+
+ <LI> raw2tiff
+ <UL>
+ <LI> Coverity 1024887 "Unchecked return value from library".
+ <LI> Coverity 1024888 "Unchecked return value from library".
+ <LI> Coverity 1024889 "Unchecked return value from library".
+ <LI> Coverity 1214162 "Ignoring number of bytes read".
+ </UL>
+
+ <LI> tiff2pdf
+ <UL>
+ <LI> Bugzilla Bug #2078. Suppress initial output of the header.
+ <LI> Bugzilla Bug #2150. Change ColorTransform from "0" to "1".
+ <LI> Take care in using the return value from snprintf().
+ <LI> Coverity 1024181 "Structurally dead code".
+ <LI> Coverity 1024181 "Structurally dead code".
+ <LI> Coverity 1227690 "Unused value".
+ <LI> Coverity 298621 "Resource leak".
+ </UL>
+
+ <LI> tiff2ps
+ <UL>
+ <LI> Correct sizing and scaling problems with output document.
+ </UL>
+
+ <LI> tiffcp
+ <UL>
+ <LI> Coverity 1024306, 1024307, 1024308, 1024309 "Resource leak".
+ </UL>
+
+ <LI> tiffcrop
+ <UL>
+ <LI> Correctly copy the compression tag from the source TIFF.
+ <LI> Coverity 1024545 "Division or modulo by zero".
+ <LI> Coverity 1024586 "Logically dead code".
+ <LI> Coverity 1024796 "Nesting level does not match indentation".
+ <LI> Coverity 1024797 "Nesting level does not match indentation".
+ <LI> Coverity 1294542 "Logical vs. bitwise operator".
+ <LI> Coverity 1299740 "Out-of-bounds write".
+ <LI> Coverity 1299741 "Dereference before null check".
+ </UL>
+
+ <LI> tiffdither
+ <UL>
+ <LI>Check memory allocations for failure. Also check
+ multiplication overflow. (Fixes #2501, CVE-2014-8128)
+ </UL>
+
+ <LI> tiffgt.c
+ <UL>
+ <LI> Bugzilla Bug #2401. Appropriately call glFlush().
+ </UL>
+
+ <LI> tiffmedian
+ <UL>
+ <LI> Coverity 1024386 "Out-of-bounds read".
+ <LI> Coverity 1024386 "Out-of-bounds read".
+ <LI> Coverity 1024795 "Nesting level does not match indentation".
+ <LI> Coverity 1024795 "Nesting level does not match indentation".
+ </UL>
+
+ <LI> tiffsplit
+ <UL>
+ <LI> Coverity 1024304 "Resource leak".
+ <LI> Coverity 1024305 "Resource leak".
+ </UL>
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
+
+<UL>
+
+ <LI> addtiffo
+ <UL>
+ <LI> Check buffer size calculation for overflow.
+ <LI> Coverity 298615 "Resource leak".
+ <LI> Coverity 1024649 "Unintended sign extension".
+ </UL>
+
+ <LI> iptcutil
+ <UL>
+ <LI> Coverity 1024468 "Infinite loop".
+ <LI> Coverity 1024727 "Truncated stdio return value".
+ <LI> Coverity 1214240 "Untrusted loop bound".
+ </UL>
+
+</UL>
+
+Last updated $Date: 2016-09-25 20:05:47 $.
+
+</BODY>
+</HTML>
diff --git a/tiff/html/v4.0.4beta.html b/tiff/html/v4.0.4beta.html
new file mode 100644
index 000000000..28c543fd4
--- /dev/null
+++ b/tiff/html/v4.0.4beta.html
@@ -0,0 +1,291 @@
+<HTML>
+<HEAD>
+<TITLE>
+ Changes in TIFF v4.0.4beta
+</TITLE>
+</HEAD>
+
+<BODY BGCOLOR=white>
+<FONT FACE="Helvetica, Arial, Sans">
+
+<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>: v4.0.4beta<BR>
+<B>Previous Version</B>: <A HREF=v4.0.3.html>v4.0.3</a><BR>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
+<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="#highlights">Major Changes</A>
+<LI><A HREF="#configure">Changes in the software configuration</A>
+<LI><A HREF="#libtiff">Changes in libtiff</A>
+<LI><A HREF="#tools">Changes in the tools</A>
+<LI><A HREF="#contrib">Changes in the contrib area</A>
+</UL>
+<p>
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>
+
+<UL>
+
+ <li> None
+
+</UL>
+
+
+<P><HR WIDTH=65% ALIGN=left>
+<!--------------------------------------------------------------------------->
+
+<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
+
+<UL>
+
+ <li> Updated to use Automake 1.15 and Libtool 2.4.5
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
+
+<UL>
+
+ <li> TIFFCheckDirOffset(): avoid uint16 overflow
+ when reading more than 65535 directories, and effectively error out when
+ eaching that limit.
+
+ <li> TIFFNumberOfDirectories(): generate error in case of directory count
+ overflow.
+
+ <li> TIFFAdvanceDirectory(): If nextdir is found to
+ be defective, then set it to zero before returning error in order
+ to terminate processing of truncated TIFF.
+
+ <li> JPEG-in-TIFF: recognize SOF2, SOF9 and SOF10
+ markers to avoid emitting a warning. Fix for compatibility with mozjpeg library.
+ Note: the default settings of mozjpeg will produce progressive scans, which
+ is forbidden by the TechNote.
+
+ <li> JPEG-in-TIFF: Fix regression introduced in 3.9.3/4.0.0 that caused
+ all tiles/strips to include quantization tables even when the jpegtablesmode
+ had the JPEGTABLESMODE_QUANT bit set.
+ Also add explicit removal of Huffman tables when jpegtablesmode has the
+ JPEGTABLESMODE_HUFF bit set, which avoids Huffman tables to be emitted in the
+ first tile/strip (only useful in update scenarios. create-only was
+ fine)
+
+ <li> JPEG-in-TIFF: fix segfault in JPEGFixupTagsSubsampling() on
+ corrupted image where tif->tif_dir.td_stripoffset == NULL.
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2471">#2471</a>)
+
+ <li> NeXT codec: add new tests to check that we don't read outside of
+ the compressed input stream buffer.
+
+ <li> NeXT codec: check that BitsPerSample = 2. Fixes
+ <a href="http://bugzilla.maptools.org/show_bug.cgi?id=2487">#2487</a> (CVE-2014-8129)
+
+ <li> NeXT codec: in the "run mode", use tilewidth for tiled images
+ instead of imagewidth to avoid crash
+
+ <li> tif_getimage.c: in OJPEG case, fix checks on strile width/height
+ in the putcontig8bitYCbCr42tile, putcontig8bitYCbCr41tile and
+ putcontig8bitYCbCr21tile cases.
+
+ <li> in TIFFDefaultDirectory(), reset any already existing
+ extented tags installed by user code through the extender mechaninm before
+ calling the extender callback (GDAL #5054)
+
+ <li> Fix warnings about unused parameters.
+
+ <li> Fix various typos in comments found by Debian lintian tool (GDAL #5756)
+
+ <li> tif_getimage.c: avoid divide by zero on invalid YCbCr subsampling.
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2235">#2235</a>)
+
+ <li> tif_dirread.c: In EstimateStripByteCounts(), check return code
+ of _TIFFFillStriles(). This solves crashing bug on corrupted
+ images generated by afl.
+
+ <li>tif_read.c: fix several invalid comparisons of a uint64 value with
+ &lt;= 0 by casting it to int64 first. This solves crashing bug on corrupted
+ images generated by afl.
+
+ <li>TIFFSetField(): refuse to set negative values for
+ TIFFTAG_XRESOLUTION and TIFFTAG_YRESOLUTION that cause asserts when writing
+ the directory
+
+ <li>TIFFReadDirectory(): refuse to read ColorMap or
+ TransferFunction if BitsPerSample has not yet been read, otherwise reading
+ it later will cause user code to crash if BitsPerSample > 1
+
+ <li> TIFFRGBAImageOK(): return FALSE if LOGLUV with
+ SamplesPerPixel != 3, or if CIELAB with SamplesPerPixel != 3 or BitsPerSample != 8
+
+ <li> tif_config.vc.h: no longer use "#define snprintf _snprintf" with
+ Visual Studio 2015 aka VC 14 aka MSVC 1900
+
+ <li> LZW codec: prevent potential null dereference of sp->dec_codetab in LZWPreDecode
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2459">#2459</a>)
+
+ <li> TIFFReadBufferSetup(): avoid passing -1 size
+ to TIFFmalloc() if passed user buffer size is 0
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2459">#2459</a>)
+
+ <li> TIFFReadDirEntryOutputErr(): Incorrect
+ count for tag should be a warning rather than an error since
+ errors terminate processing.
+
+ <li> tif_dirinfo.c (TIFFField) : Fix data type for TIFFTAG_GLOBALPARAMETERSIFD tag.
+
+ <li> Add definitions for TIFF/EP CFARepeatPatternDim and CFAPattern tags
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2457">#2457</a>)
+
+ <li> tif_codec.c, tif_dirinfo.c: Enlarge some fixed-size buffers that weren't
+ large enough, and eliminate substantially all uses of sprintf(buf,
+ ...) in favor of using snprintf(buf, sizeof(buf), ...)
+ <li> configure.ac: Improve pkg-config static linking by adding -lm to Libs.private when needed.
+
+ <li> tif_write.c: tmsize_t related casting warning fixed for
+ 64bit linux.
+
+ <li> tif_read.c: uint64/tmsize_t change for MSVC warnings.
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2427">#2427</a>)
+
+ <li> Fix TIFFPrintDirectory's handling of
+ field_passcount fields: it had the TIFF_VARIABLE and
+ TIFF_VARIABLE2 cases backwards.
+
+ <li> PixarLog codec: Improve previous patch for CVE-2012-4447
+ (to enlarge tbuf for possible partial stride at end) so that
+ overflow in the integer addition is detected.
+
+ <li>tif_{unix,vms,win32}.c (_TIFFmalloc): ANSI C does not
+ require malloc() to return NULL pointer if requested allocation
+ size is zero. Assure that _TIFFmalloc does.
+
+ <li>tif_zip.c: Avoid crash on NULL error messages.
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!-------------------------------------------------------------------------->
+
+<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
+
+<UL>
+
+ <li> tiff2pdf: Fis various crashes and memory buffer access errors (oCERT-2014-013).
+ <li> tiff2pdf: fix buffer overflow on some YCbCr JPEG compressed images.
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2445">#2445</a>)
+ <li> tiff2pdf: fix buffer overflow on YCbCr JPEG compressed image.
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2443">#2443</a>)
+ <li> tiff2pdf: check return code of TIFFGetField() when reading TIFFTAG_SAMPLESPERPIXEL
+ <li> tiff2pdf: fix crash due to invalid tile count.
+ <li> tiff2pdf: Detect invalid settings of BitsPerSample/SamplesPerPixel for CIELAB / ITULAB
+ <li> tiff2pdf: Assure that memory size calculations for
+ _TIFFmalloc() do not overflow the range of tmsize_t.
+ <li> tiff2pdf: Avoid crash when TIFFTAG_TRANSFERFUNCTION tag returns one channel,
+ with the other two channels set to NULL.
+ <li> tiff2pdf: close PDF file. (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2479">#2479</a>)
+ <li> tiff2pdf: Preserve input file directory order when pages
+ are tagged with the same page number.
+ <li> tiff2pdf.c: terminate after failure of allocating ycbcr buffer
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2449">#2449</a> CVE-2013-4232)
+ <li> tiff2pdf: Rewrite JPEG marker parsing in
+ t2p_process_jpeg_strip to be at least marginally competent. The
+ approach is still fundamentally flawed, but at least now it won't
+ stomp all over memory when given bogus input. Fixes CVE-2013-1960.
+ <li> tiffdump: Guard against arithmetic overflow when calculating allocation buffer sizes.
+ <li> tiffdump: fix crash due to overflow of entry count.
+ <li> tiffdump: Fix double-free bug.
+ <li> tiffdump: detect cycle in TIFF directory chaining.
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2463">#2463</a>)
+ <li> tiffdump: avoid passing a NULL pointer to read() if seek() failed before.
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2459">#2459</a>)
+ <li> tiff2bw: when Photometric=RGB, the utility only works if SamplesPerPixel = 3. Enforce that.
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2485">#2485</a>, CVE-2014-8127)
+ <li> pal2rgb, thumbnail: fix crash by disabling TIFFTAG_INKNAMES copying.
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2484">#2484</a>, CVE-2014-8127)
+ <li> thumbnail: fix out-of-buffer write.
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2489">#2489</a>, CVE-2014-8128)
+ <li> thumbnail, tiffcmp: only read/write TIFFTAG_GROUP3OPTIONS
+ or TIFFTAG_GROUP4OPTIONS if compression is COMPRESSION_CCITTFAX3 or
+ COMPRESSION_CCITTFAX4.
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2493">#2493</a>, CVE-2014-8128)
+ <li> tiffcp: fix crash when converting YCbCr JPEG-compressed to none.
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2480">#2480</a>)
+ <li> bmp2tiff: fix crash due to int overflow related to input BMP dimensions
+ <li> tiffcrop: fix crash due to invalid TileWidth/TileHeight
+ <li> tiffcrop: fix segfault if bad value passed to -Z option
+ ( <a href="http://bugzilla.maptools.org/show_bug.cgi?id=2459">#2459</a>)
+ and add missing va_end in dump_info
+ <li> thumbnail, tiffcrop: "fix" heap read over-run found with
+ Valgrind and Address Sanitizer on test suite
+ <li> fax2ps: check malloc()/realloc() result. (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2470">#2470</a>)
+ <li> gif2tiff: apply patch for CVE-2013-4243. (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2451">#2451</a>)
+ <li> gif2tiff: fix possible OOB write. (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2452">#2452</a>, CVE-2013-4244)
+ <li> gif2tiff: Be more careful about corrupt or hostile input files (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2450">#2450</a>, CVE-2013-4231)
+ <li> tiff2rgba: fix usage message in that zip was wrongly described
+ <li> tiffinfo: Default various values fetched with TIFFGetField() to avoid being uninitialized.
+ <li> tiff2ps: Fix bug in auto rotate option code.
+ <li> ppm2tiff: avoid zero size buffer vulnerability (CVE-2012-4564).
+ check the linebytes calculation too, get the max() calculation
+ straight, avoid redundant error messages, check for malloc
+ failure.
+ <li> tiffset: now supports a -u option to unset a tag.
+ (<a href="http://bugzilla.maptools.org/show_bug.cgi?id=2419">#2419</a>)
+ <li> Fix warnings about unused parameters.
+ <li> rgb2ycbcr, tiff2bw, tiff2pdf, tiff2ps, tiffcrop, tiffdither :
+ Enlarge some fixed-size buffers that weren't
+ large enough, and eliminate substantially all uses of sprintf(buf,
+ ...) in favor of using snprintf(buf, sizeof(buf), ...), so as to
+ protect against overflow of fixed-size buffers. This responds in
+ particular to CVE-2013-1961 concerning overflow in tiff2pdf.c's
+ t2p_write_pdf_page().
+ <li>html/man/tiff2ps.1.html, html/man/tiffcp.1.html,
+ html/man/tiffdither.1.html, man/tiff2ps.1, man/tiffcp.1,
+ man/tiffdither.1, tools/tiff2ps.c, tools/tiffcp.c,
+ tools/tiffdither.c: Sync tool usage printouts and man pages with
+ reality
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
+
+<UL>
+
+ <li> Fix warnings about variables set but not used.
+ <li> contrib/dbs/xtiff/xtiff.c: Enlarge some fixed-size buffers that weren't
+ large enough, and eliminate substantially all uses of sprintf(buf,
+ ...) in favor of using snprintf(buf, sizeof(buf), ...), so as to
+ protect against overflow of fixed-size buffers.
+</UL>
+
+Last updated $Date: 2016-09-25 20:05:47 $.
+
+</BODY>
+</HTML>
diff --git a/tiff/html/v4.0.5.html b/tiff/html/v4.0.5.html
new file mode 100644
index 000000000..ac91d72f6
--- /dev/null
+++ b/tiff/html/v4.0.5.html
@@ -0,0 +1,148 @@
+<HTML>
+<HEAD>
+<TITLE>
+ Changes in TIFF v4.0.5
+</TITLE>
+</HEAD>
+
+<BODY BGCOLOR=white>
+<FONT FACE="Helvetica, Arial, Sans">
+
+<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>: v4.0.5<BR>
+<B>Previous Version</B>: <A HREF=v4.0.4.html>v4.0.4</a><BR>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
+<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="#highlights">Major Changes</A>
+<LI><A HREF="#configure">Changes in the software configuration</A>
+<LI><A HREF="#libtiff">Changes in libtiff</A>
+<LI><A HREF="#tools">Changes in the tools</A>
+<LI><A HREF="#contrib">Changes in the contrib area</A>
+</UL>
+<p>
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>
+
+<UL>
+
+ <li> Support for configure/build using CMake.
+ <li> Support for large (> 2GB) files under Microsoft Windows.
+
+</UL>
+
+
+<P><HR WIDTH=65% ALIGN=left>
+<!--------------------------------------------------------------------------->
+
+<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
+
+<UL>
+
+ <LI> CMakeLists.txt / CMake
+ <UL>
+ <LI> Configuration and building using CMake is now supported
+ under Microsoft Windows and on Unix-type systems.
+ </UL>
+ </LI>
+
+ <LI> configure.ac / configure
+ <UL>
+ <LI> Test for and use fseeko() if it is available. This allows
+ supporting large files on Unix-type systems with a 32-bit 'long'
+ type and a 64-bit 'off_t' type.
+ </UL>
+ </LI>
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
+
+<UL>
+
+ <LI> tiffiop.h:
+ <UL>
+ <LI> Macros added to use 64-bit equivalents for all standard I/O
+ and POSIX APIs used by libtiff and its tools which are limited
+ to 2GB in Windows builds. Note that these 64-bit equivalents
+ were introduced by the CRT provided with Visual Studio 2005 and
+ if the necessary CRT is not installed on the target computer,
+ the program will not run. The wrapper macros will not be
+ activated unless the definition _MSC_VER is at least 1400 or
+ __MSVCRT_VERSION__ is at least 0x800.
+ </UL>
+
+ <LI> tif_unix.c:
+ <UL>
+ <LI> Updated to support large files under Microsoft Windows.
+ This makes tif_unix.c a completely viable candidate for use
+ under Windows (in spite of its name) if the CRT is modern
+ enough. Please note that tif_win32.c already supported large
+ files, but only 'tiffinfo' and 'tiffdump' made any provision to
+ support large files under Windows.
+ <LI> _tiffReadProc() and _tiffWriteProc() are modified to chunk
+ I/O to a maximum size of 2GB for extremely large I/O
+ requests. This surmounts limitations in the Microsoft Windows
+ read() and write() APIs (which are limited to the range of a
+ 32-bit 'int'), and may avoid poor behavior with extremely large
+ I/O requests on other systems.
+ </UL>
+
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!-------------------------------------------------------------------------->
+
+<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
+
+<UL>
+
+ <LI> All tools
+ <UL>
+ <LI> Updated to use I/O wrapper macros from tiffiop.h in order
+ to support large files under Microsoft Windows.
+ </UL>
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
+
+<UL>
+
+ <LI> None
+
+</UL>
+
+Last updated $Date: 2016-09-25 20:05:47 $.
+
+</BODY>
+</HTML>
diff --git a/tiff/html/v4.0.6.html b/tiff/html/v4.0.6.html
new file mode 100644
index 000000000..317491990
--- /dev/null
+++ b/tiff/html/v4.0.6.html
@@ -0,0 +1,139 @@
+<HTML>
+<HEAD>
+<TITLE>
+ Changes in TIFF v4.0.6
+</TITLE>
+</HEAD>
+
+<BODY BGCOLOR=white>
+<FONT FACE="Helvetica, Arial, Sans">
+
+<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>: v4.0.6<BR>
+<B>Previous Version</B>: <A HREF=v4.0.5.html>v4.0.5</a><BR>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a>
+<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="#highlights">Major Changes</A>
+<LI><A HREF="#configure">Changes in the software configuration</A>
+<LI><A HREF="#libtiff">Changes in libtiff</A>
+<LI><A HREF="#tools">Changes in the tools</A>
+<LI><A HREF="#contrib">Changes in the contrib area</A>
+</UL>
+<p>
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>
+
+<UL>
+
+ <li> Now builds with CMake 2.8.9 and newer (previously required 3.0.0)
+
+</UL>
+
+
+<P><HR WIDTH=65% ALIGN=left>
+<!--------------------------------------------------------------------------->
+
+<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
+
+<UL>
+
+ <LI> CMakeLists.txt / CMake
+ <UL>
+ <LI> Supports CMake 2.8.9 and later.
+ <LI> Add missing file which wasn't being distributed, causing
+ unit tests to fail.
+ <LI> Make shared/static library building configurable.
+ <LI> CMake reads all version information directly from
+ configure.ac to avoid duplication of values.
+ <LI> CMake builds are now included in 'distcheck' target.
+ </UL>
+ </LI>
+
+ <LI> Makefile.am
+ <UL>
+ <LI> Autotools 'make distcheck' now tests the CMake-based build
+ if CMake is available.
+ </UL>
+ </LI>
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
+
+<UL>
+
+ <LI> Fixes to avoid undefined behaviour of signed types (C
+ standard compliance).
+ <LI> Fixes to avoid possible isses when casting to unsigned char.
+ <LI> Fixes to avoid undefined behaviour with shifts.
+ <LI> Fix generation of output with 16 bit or 32 bit integer, when
+ byte swapping is needed, in horizontal predictor (#2521).
+ <LI> Fix decoding when there is a single pixel to decode (unlikely
+ case...) and byte swapping is involved.
+ <LI> Add add explicit masking with 0xff before casting to uchar in
+ floating-point horizontal differencing and accumulation routines.
+ <LI> Eliminate requirement for and use of 64-bit constant values.
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!-------------------------------------------------------------------------->
+
+<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
+
+<UL>
+
+ <LI> tiffgt
+ <UL>
+ <LI> Silence glut API deprecation warnings on MacOS X.
+ </UL>
+
+
+ <LI> fax2ps
+ <UL>
+ <LI> Detect failure to write to temporary file.
+ </UL>
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
+
+<UL>
+
+ <LI> None
+
+</UL>
+
+Last updated $Date: 2016-09-25 20:05:47 $.
+
+</BODY>
+</HTML>
diff --git a/tiff/html/v4.0.7.html b/tiff/html/v4.0.7.html
new file mode 100644
index 000000000..151861f49
--- /dev/null
+++ b/tiff/html/v4.0.7.html
@@ -0,0 +1,411 @@
+<HTML>
+<HEAD>
+<TITLE>
+ Changes in TIFF v4.0.7
+</TITLE>
+</HEAD>
+
+<BODY BGCOLOR=white>
+<FONT FACE="Helvetica, Arial, Sans">
+
+<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>: v4.0.7<BR>
+<B>Previous Version</B>: <A HREF=v4.0.6.html>v4.0.6</a><BR>
+<B>Master FTP Site</B>: <A HREF="ftp://download.osgeo.org/libtiff">
+download.osgeo.org</a>, directory pub/libtiff</A><BR>
+<B>Master HTTP Site #1</B>: <A HREF="http://www.simplesystems.org/libtiff/">
+http://www.simplesystems.org/libtiff/</a><BR>
+<B>Master HTTP Site #2</B>: <A HREF="http://libtiff.maptools.org/">
+http://libtiff.maptools.org/</a>
+<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="#highlights">Major Changes</A>
+<LI><A HREF="#configure">Changes in the software configuration</A>
+<LI><A HREF="#libtiff">Changes in libtiff</A>
+<LI><A HREF="#tools">Changes in the tools</A>
+<LI><A HREF="#contrib">Changes in the contrib area</A>
+</UL>
+<p>
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>
+
+<UL>
+
+ <LI> The libtiff tools bmp2tiff, gif2tiff, ras2tiff, sgi2tiff,
+ sgisv, and ycbcr are completely removed from the distribution.
+ These tools were written in the late 1980s and early 1990s for
+ test and demonstration purposes. In some cases the tools were
+ never updated to support updates to the file format, or the
+ file formats are now rarely used. In all cases these tools
+ increased the libtiff security and maintenance exposure beyond
+ the value offered by the tool.
+
+</UL>
+
+
+<P><HR WIDTH=65% ALIGN=left>
+<!--------------------------------------------------------------------------->
+
+<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
+
+<UL>
+
+ <LI> None
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
+
+<UL>
+
+ <LI> libtiff/tif_dirread.c: in TIFFFetchNormalTag(), do not
+ dereference NULL pointer when values of tags with
+ TIFF_SETGET_C16_ASCII / TIFF_SETGET_C32_ASCII access are
+ 0-byte arrays. Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2593 (regression
+ introduced by previous fix done on 2016-11-11 for
+ CVE-2016-9297). Reported by Henri Salo. Assigned as
+ CVE-2016-9448
+
+ <LI> libtiff/tif_aux.c: fix crash in TIFFVGetFieldDefaulted() when
+ requesting Predictor tag and that the zip/lzw codec is not
+ configured. Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2591
+
+ <LI> libtiff/tif_dirread.c: in TIFFFetchNormalTag(), make sure
+ that values of tags with TIFF_SETGET_C16_ASCII /
+ TIFF_SETGET_C32_ASCII access are null terminated, to avoid
+ potential read outside buffer in _TIFFPrintField(). Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2590
+
+ <LI> libtiff/tif_dirread.c: reject images with OJPEG compression
+ that have no TileOffsets/StripOffsets tag, when OJPEG
+ compression is disabled. Prevent null pointer dereference in
+ TIFFReadRawStrip1() and other functions that expect
+ td_stripbytecount to be non NULL. Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2585
+
+ <LI> libtiff/tif_strip.c: make TIFFNumberOfStrips() return the
+ td->td_nstrips value when it is non-zero, instead of
+ recomputing it. This is needed in TIFF_STRIPCHOP mode where
+ td_nstrips is modified. Fixes a read outsize of array in
+ tiffsplit (or other utilities using TIFFNumberOfStrips()).
+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2587
+ (CVE-2016-9273)
+
+ <LI> libtiff/tif_predict.h, libtiff/tif_predict.c: Replace
+ assertions by runtime checks to avoid assertions in debug
+ mode, or buffer overflows in release mode. Can happen when
+ dealing with unusual tile size like YCbCr with
+ subsampling. Reported as MSVR 35105 by Axel Souchet & Vishal
+ Chauhan from the MSRC Vulnerabilities & Mitigations
+
+ <LI> libtiff/tif_dir.c: discard values of SMinSampleValue and
+ SMaxSampleValue when they have been read and the value of
+ SamplesPerPixel is changed afterwards (like when reading a
+ OJPEG compressed image with a missing SamplesPerPixel tag, and
+ whose photometric is RGB or YCbCr, forcing SamplesPerPixel
+ being 3). Otherwise when rewriting the directory (for example
+ with tiffset, we will expect 3 values whereas the array had
+ been allocated with just one), thus causing a out of bound
+ read access. Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2500
+ (CVE-2014-8127, duplicate: CVE-2016-3658)
+
+ <LI> libtiff/tif_dirwrite.c: avoid null pointer dereference on
+ td_stripoffset when writing directory, if FIELD_STRIPOFFSETS
+ was artificially set for a hack case in OJPEG case. Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2500
+ (CVE-2014-8127, duplicate: CVE-2016-3658)
+
+ <LI> libtiff/tif_getimage.c (TIFFRGBAImageOK): Reject attempts to
+ read floating point images.
+
+ <LI> libtiff/tif_predict.c (PredictorSetup): Enforce
+ bits-per-sample requirements of floating point predictor (3).
+ Fixes CVE-2016-3622 "Divide By Zero in the tiff2rgba tool."
+
+ <LI> libtiff/tif_pixarlog.c: fix out-of-bounds write vulnerabilities
+ in heap allocated buffers. Reported as MSVR 35094. Discovered by
+ Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities &
+ Mitigations team.
+
+ <LI> libtiff/tif_write.c: fix issue in error code path of
+ TIFFFlushData1() that didn't reset the tif_rawcc and tif_rawcp
+ members. I'm not completely sure if that could happen in
+ practice outside of the odd behaviour of t2p_seekproc() of
+ tiff2pdf). The report points that a better fix could be to
+ check the return value of TIFFFlushData1() in places where it
+ isn't done currently, but it seems this patch is enough.
+ Reported as MSVR 35095. Discovered by Axel Souchet & Vishal
+ Chauhan & Suha Can from the MSRC Vulnerabilities & Mitigations
+ team.
+
+ <LI> libtiff/tif_pixarlog.c: Fix write buffer overflow in
+ PixarLogEncode if more input samples are provided than
+ expected by PixarLogSetupEncode. Idea based on
+ libtiff-CVE-2016-3990.patch from
+ libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro, but with
+ different and simpler check. (bugzilla #2544)
+
+ <LI> libtiff/tif_read.c: Fix out-of-bounds read on memory-mapped
+ files in TIFFReadRawStrip1() and TIFFReadRawTile1() when
+ stripoffset is beyond tmsize_t max value (reported by Mathias
+ Svensson)
+
+ <LI> libtiff/tif_read.c: make TIFFReadEncodedStrip() and
+ TIFFReadEncodedTile() directly use user provided buffer when
+ no compression (and other conditions) to save a memcpy()
+
+ <LI> libtiff/tif_write.c: make TIFFWriteEncodedStrip() and
+ TIFFWriteEncodedTile() directly use user provided buffer when
+ no compression to save a memcpy().
+
+ <LI> libtiff/tif_luv.c: validate that for COMPRESSION_SGILOG and
+ PHOTOMETRIC_LOGL, there is only one sample per pixel. Avoid
+ potential invalid memory write on corrupted/unexpected images
+ when using the TIFFRGBAImageBegin() interface (reported by
+ Clay Wood)
+
+ <LI> libtiff/tif_pixarlog.c: fix potential buffer write overrun in
+ PixarLogDecode() on corrupted/unexpected images (reported by
+ Mathias Svensson) (CVE-2016-5875)
+
+ <LI> libtiff/libtiff.def: Added _TIFFMultiply32 and
+ _TIFFMultiply64 to libtiff.def
+
+ <LI> libtiff/tif_config.vc.h (HAVE_SNPRINTF): Add a '1' to the
+ HAVE_SNPRINTF definition.
+
+ <LI> libtiff/tif_config.vc.h (HAVE_SNPRINTF): Applied patch by
+ Edward Lam to define HAVE_SNPRINTF for Visual Studio 2015.
+
+ <LI> libtiff/tif_dirread.c: when compiled with DEFER_STRILE_LOAD,
+ fix regression, introduced on 2014-12-23, when reading a
+ one-strip file without a StripByteCounts tag. GDAL #6490
+
+ <LI> libtiff/*: upstream typo fixes (mostly contributed by Kurt
+ Schwehr) coming from GDAL internal libtiff
+
+ <LI> libtiff/tif_fax3.h: make Param member of TIFFFaxTabEnt
+ structure a uint16 to reduce size of the binary.
+
+ <LI> libtiff/tif_read.c, tif_dirread.c: fix indentation issues
+ raised by GCC 6 -Wmisleading-indentation
+
+ <LI> libtiff/tif_pixarlog.c: avoid zlib error messages to pass a
+ NULL string to %s formatter, which is undefined behaviour in
+ sprintf().
+
+ <LI> libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode()
+ triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
+ (bugzilla #2508)
+
+ <LI> libtiff/tif_luv.c: fix potential out-of-bound writes in
+ decode functions in non debug builds by replacing assert()s by
+ regular if checks (bugzilla #2522). Fix potential
+ out-of-bound reads in case of short input data.
+
+ <LI> libtiff/tif_getimage.c: fix out-of-bound reads in
+ TIFFRGBAImage interface in case of unsupported values of
+ SamplesPerPixel/ExtraSamples for LogLUV / CIELab. Add explicit
+ call to TIFFRGBAImageOK() in TIFFRGBAImageBegin(). Fix
+ CVE-2015-8665 reported by limingxing and CVE-2015-8683
+ reported by zzf of Alibaba.
+
+ <LI> libtiff/tif_dirread.c: workaround false positive warning of
+ Clang Static Analyzer about null pointer dereference in
+ TIFFCheckDirOffset().
+
+ <LI> libtiff/tif_fax3.c: remove dead assignment in
+ Fax3PutEOLgdal(). Found by Clang Static Analyzer
+
+ <LI> libtiff/tif_dirwrite.c: fix truncation to 32 bit of file
+ offsets in TIFFLinkDirectory() and TIFFWriteDirectorySec()
+ when aligning directory offsets on a even offset (affects
+ BigTIFF). This was a regression of the changeset of
+ 2015-10-19.
+
+ <LI> libtiff/tif_write.c: TIFFWriteEncodedStrip() and
+ TIFFWriteEncodedTile() should return -1 in case of failure of
+ tif_encodestrip() as documented
+
+ <LI> libtiff/tif_dumpmode.c: DumpModeEncode() should return 0 in
+ case of failure so that the above mentionned functions detect
+ the error.
+
+ <LI> libtiff/*.c: fix MSVC warnings related to cast shortening and
+ assignment within conditional expression
+
+ <LI> libtiff/*.c: fix clang -Wshorten-64-to-32 warnings
+
+ <LI> libtiff/tif_dirread.c: prevent reading ColorMap or
+ TransferFunction if BitsPerPixel > 24, so as to avoid huge
+ memory allocation and file read attempts
+
+ <LI> libtiff/tif_dirread.c: remove duplicated assignment (reported
+ by Clang static analyzer)
+
+ <LI> libtiff/tif_dir.c, libtiff/tif_dirinfo.c,
+ libtiff/tif_compress.c, libtiff/tif_jpeg_12.c: suppress
+ warnings about 'no previous declaration/prototype'
+
+ <LI> libtiff/tiffiop.h, libtiff/tif_dirwrite.c: suffix constants
+ by U to fix 'warning: negative integer implicitly converted to
+ unsigned type' warning (part of -Wconversion)
+
+ <LI> libtiff/tif_dir.c, libtiff/tif_dirread.c,
+ libtiff/tif_getimage.c, libtiff/tif_print.c: fix -Wshadow
+ warnings (only in libtiff/)
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!-------------------------------------------------------------------------->
+
+<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
+
+<UL>
+
+ <LI> tools/Makefile.am: The libtiff tools bmp2tiff, gif2tiff,
+ ras2tiff, sgi2tiff, sgisv, and ycbcr are completely removed
+ from the distribution. The libtiff tools rgb2ycbcr and
+ thumbnail are only built in the build tree for testing. Old
+ files are put in new 'archive' subdirectory of the source
+ repository, but not in distribution archives. These changes
+ are made in order to lessen the maintenance burden.
+
+ <LI> tools/tiff2pdf.c: avoid undefined behaviour related to
+ overlapping of source and destination buffer in memcpy() call
+ in t2p_sample_rgbaa_to_rgb() Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2577
+
+ <LI> tools/tiff2pdf.c: fix potential integer overflows on 32 bit
+ builds in t2p_read_tiff_size() Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2576
+
+ <LI> tools/fax2tiff.c: fix segfault when specifying -r without
+ argument. Patch by Yuriy M. Kaminskiy. Fixes
+ http://bugzilla.maptools.org/show_bug.cgi?id=2572
+
+ <LI> tools/tiffinfo.c: fix out-of-bound read on some tiled images.
+ (http://bugzilla.maptools.org/show_bug.cgi?id=2517)
+
+ <LI> tools/tiffcrop.c: fix multiple uint32 overflows in
+ writeBufferToSeparateStrips(), writeBufferToContigTiles() and
+ writeBufferToSeparateTiles() that could cause heap buffer
+ overflows. Reported by Henri Salo from Nixu Corporation.
+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592
+
+ <LI> tools/tiffcrop.c: fix out-of-bound read of up to 3 bytes in
+ readContigTilesIntoBuffer(). Reported as MSVR 35092 by Axel
+ Souchet & Vishal Chauhan from the MSRC Vulnerabilities &
+ Mitigations team.
+
+ <LI> tools/tiff2pdf.c: fix write buffer overflow of 2 bytes on
+ JPEG compressed images. Reported by Tyler Bohan of Cisco Talos
+ as TALOS-CAN-0187 / CVE-2016-5652. Also prevents writing 2
+ extra uninitialized bytes to the file stream.
+
+ <LI> tools/tiffcp.c: fix out-of-bounds write on tiled images with odd
+ tile width vs image width. Reported as MSVR 35103
+ by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities &
+ Mitigations team.
+
+ <LI> tools/tiff2pdf.c: fix read -largely- outsize of buffer in
+ t2p_readwrite_pdf_image_tile(), causing crash, when reading a
+ JPEG compressed image with TIFFTAG_JPEGTABLES length being
+ one. Reported as MSVR 35101 by Axel Souchet and Vishal
+ Chauhan from the MSRC Vulnerabilities & Mitigations team.
+
+ <LI> tools/tiffcp.c: fix read of undefined variable in case of
+ missing required tags. Found on test case of MSVR 35100.
+
+ <LI> tools/tiffcrop.c: fix read of undefined buffer in
+ readContigStripsIntoBuffer() due to uint16 overflow. Probably
+ not a security issue but I can be wrong. Reported as MSVR
+ 35100 by Axel Souchet from the MSRC Vulnerabilities &
+ Mitigations team.
+
+ <LI> tools/tiffcrop.c: fix various out-of-bounds write
+ vulnerabilities in heap or stack allocated buffers. Reported
+ as MSVR 35093, MSVR 35096 and MSVR 35097. Discovered by Axel
+ Souchet and Vishal Chauhan from the MSRC Vulnerabilities &
+ Mitigations team.
+
+ <LI> tools/tiff2pdf.c: fix out-of-bounds write vulnerabilities in
+ heap allocate buffer in t2p_process_jpeg_strip(). Reported as
+ MSVR 35098. Discovered by Axel Souchet and Vishal Chauhan from
+ the MSRC Vulnerabilities & Mitigations team.
+
+ <LI> tools/tiff2bw.c: fix weight computation that could result of
+ color value overflow (no security implication). Fix bugzilla
+ #2550. Patch by Frank Freudenberg.
+
+ <LI> tools/rgb2ycbcr.c: validate values of -v and -h parameters to
+ avoid potential divide by zero. Fixes CVE-2016-3623 (bugzilla #2569)
+
+ <LI> tools/tiffcrop.c: Fix out-of-bounds write in loadImage().
+ From patch libtiff-CVE-2016-3991.patch from
+ libtiff-4.0.3-25.el7_2.src.rpm by Nikola Forro (bugzilla
+ #2543)
+
+ <LI> tools/tiff2rgba.c: Fix integer overflow in size of allocated
+ buffer, when -b mode is enabled, that could result in
+ out-of-bounds write. Based initially on patch
+ tiff-CVE-2016-3945.patch from libtiff-4.0.3-25.el7_2.src.rpm
+ by Nikola Forro, with correction for invalid tests that
+ rejected valid files. (bugzilla #2545)
+
+ <LI> tools/tiffcrop.c: Avoid access outside of stack allocated
+ array on a tiled separate TIFF with more than 8 samples per
+ pixel. Reported by Kaixiang Zhang of the Cloud Security Team,
+ Qihoo 360 (CVE-2016-5321 / CVE-2016-5323 , bugzilla #2558 /
+ #2559)
+
+ <LI> tools/tiffdump.c: fix a few misaligned 64-bit reads warned by
+ -fsanitize
+
+ <LI> tools/tiffdump.c (ReadDirectory): Remove uint32 cast to
+ _TIFFmalloc() argument which resulted in Coverity report.
+ Added more mutiplication overflow checks.
+
+</UL>
+
+<P><HR WIDTH=65% ALIGN=left>
+
+<!--------------------------------------------------------------------------->
+
+<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
+
+<UL>
+
+ <LI> None
+
+</UL>
+
+Last updated $Date: 2016-11-12 21:43:44 $.
+
+</BODY>
+</HTML>
diff --git a/tiff/libtiff/CMakeLists.txt b/tiff/libtiff/CMakeLists.txt
new file mode 100644
index 000000000..087dfa9ea
--- /dev/null
+++ b/tiff/libtiff/CMakeLists.txt
@@ -0,0 +1,165 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+# Generate headers
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tif_config.h.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/tif_config.h
+ @ONLY)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tiffconf.h.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h
+ @ONLY)
+
+extra_dist(
+ SConstruct
+ tif_config.h-vms
+ tif_config.vc.h
+ tif_config.wince.h
+ tiffconf.vc.h
+ tiffconf.wince.h
+ libtiff.def
+ libtiff.map
+ libtiffxx.map)
+
+set(tiff_HEADERS
+ tiff.h
+ tiffio.h
+ tiffvers.h)
+
+set(tiff_noinst_HEADERS
+ t4.h
+ tif_dir.h
+ tif_predict.h
+ tiffiop.h
+ uvcode.h)
+
+set(nodist_tiff_HEADERS
+ ${CMAKE_CURRENT_BINARY_DIR}/tiffconf.h)
+
+set(tiff_SOURCES
+ tif_aux.c
+ tif_close.c
+ tif_codec.c
+ tif_color.c
+ tif_compress.c
+ tif_dir.c
+ tif_dirinfo.c
+ tif_dirread.c
+ tif_dirwrite.c
+ tif_dumpmode.c
+ tif_error.c
+ tif_extension.c
+ tif_fax3.c
+ tif_fax3sm.c
+ tif_flush.c
+ tif_getimage.c
+ tif_jbig.c
+ tif_jpeg.c
+ tif_jpeg_12.c
+ tif_luv.c
+ tif_lzma.c
+ tif_lzw.c
+ tif_next.c
+ tif_ojpeg.c
+ tif_open.c
+ tif_packbits.c
+ tif_pixarlog.c
+ tif_predict.c
+ tif_print.c
+ tif_read.c
+ tif_strip.c
+ tif_swab.c
+ tif_thunder.c
+ tif_tile.c
+ tif_version.c
+ tif_warning.c
+ tif_write.c
+ tif_zip.c)
+
+set(tiffxx_HEADERS
+ tiffio.hxx)
+
+set(tiffxx_SOURCES
+ tif_stream.cxx)
+
+if(WIN32_IO)
+ extra_dist(tif_unix.c)
+ list(APPEND tiff_SOURCES tif_win32.c)
+else()
+ extra_dist(tif_win32.c)
+ list(APPEND tiff_SOURCES tif_unix.c)
+endif()
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${TIFF_INCLUDES})
+
+add_library(tiff ${tiff_SOURCES} ${tiff_HEADERS} ${nodist_tiff_HEADERS}
+ ${tiff_port_SOURCES} libtiff.def)
+target_link_libraries(tiff ${TIFF_LIBRARY_DEPS})
+set_target_properties(tiff PROPERTIES SOVERSION ${SO_COMPATVERSION})
+if(NOT CYGWIN)
+ # This property causes shared libraries on Linux to have the full version
+ # encoded into their final filename. We disable this on Cygwin because
+ # it causes cygz-${TIFF_FULL_VERSION}.dll to be created when cygz.dll
+ # seems to be the default.
+ set_target_properties(tiff PROPERTIES VERSION ${SO_VERSION})
+endif()
+if(HAVE_LD_VERSION_SCRIPT)
+ set_target_properties(tiff PROPERTIES LINK_FLAGS
+ "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiff.map")
+endif()
+
+install(TARGETS tiff
+ RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
+
+install(FILES ${tiff_HEADERS} ${nodist_tiff_HEADERS}
+ DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
+
+if(cxx)
+ add_library(tiffxx ${tiffxx_SOURCES} ${tiffxx_HEADERS})
+ target_link_libraries(tiffxx tiff)
+ set_target_properties(tiffxx PROPERTIES SOVERSION ${SO_COMPATVERSION})
+ if(NOT CYGWIN)
+ # This property causes shared libraries on Linux to have the full version
+ # encoded into their final filename. We disable this on Cygwin because
+ # it causes cygz-${TIFF_FULL_VERSION}.dll to be created when cygz.dll
+ # seems to be the default.
+ set_target_properties(tiffxx PROPERTIES VERSION ${SO_VERSION})
+ endif()
+ if(HAVE_LD_VERSION_SCRIPT)
+ set_target_properties(tiffxx PROPERTIES LINK_FLAGS
+ "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/libtiffxx.map")
+ endif()
+
+ install(TARGETS tiffxx
+ RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR})
+
+ install(FILES ${tiffxx_HEADERS}
+ DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
+
+endif()
diff --git a/tiff/libtiff/Makefile.am b/tiff/libtiff/Makefile.am
index 82fa31dc8..9cbc5b1d1 100644
--- a/tiff/libtiff/Makefile.am
+++ b/tiff/libtiff/Makefile.am
@@ -27,16 +27,20 @@ LIBPORT = $(top_builddir)/port/libport.la
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
libtiffincludedir = $(includedir)
-EXTRA_DIST = Makefile.vc \
- SConstruct \
- tif_config.h-vms \
- tif_config.vc.h \
- tif_config.wince.h \
- tiffconf.vc.h \
- tiffconf.wince.h \
- libtiff.def \
- libtiff.map \
- libtiffxx.map
+EXTRA_DIST = \
+ CMakeLists.txt \
+ Makefile.vc \
+ SConstruct \
+ libtiff.def \
+ libtiff.map \
+ libtiffxx.map \
+ tif_config.h-vms \
+ tif_config.h.cmake.in \
+ tif_config.vc.h \
+ tif_config.wince.h \
+ tiffconf.h.cmake.in \
+ tiffconf.vc.h \
+ tiffconf.wince.h
libtiffinclude_HEADERS = \
tiff.h \
diff --git a/tiff/libtiff/Makefile.in b/tiff/libtiff/Makefile.in
index da57021b5..62fb7bc87 100644
--- a/tiff/libtiff/Makefile.in
+++ b/tiff/libtiff/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -43,6 +42,61 @@
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -73,9 +127,6 @@ host_triplet = @host@
@HAVE_LD_VERSION_SCRIPT_TRUE@am__append_10 = -Wl,--version-script=$(srcdir)/libtiffxx.map
noinst_PROGRAMS = mkg3states$(EXEEXT)
subdir = libtiff
-DIST_COMMON = $(am__libtiffinclude_HEADERS_DIST) $(noinst_HEADERS) \
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/tif_config.h.in $(srcdir)/tiffconf.h.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -83,6 +134,8 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__libtiffinclude_HEADERS_DIST) \
+ $(noinst_HEADERS) $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = tif_config.h tiffconf.h
CONFIG_CLEAN_FILES =
@@ -145,6 +198,7 @@ libtiff_la_OBJECTS = $(am_libtiff_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
+am__v_lt_1 =
libtiff_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(libtiff_la_LDFLAGS) $(LDFLAGS) -o $@
@@ -158,6 +212,18 @@ PROGRAMS = $(noinst_PROGRAMS)
am_mkg3states_OBJECTS = mkg3states.$(OBJEXT)
mkg3states_OBJECTS = $(am_mkg3states_OBJECTS)
mkg3states_DEPENDENCIES = $(LIBPORT)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
@@ -170,17 +236,16 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
@@ -189,27 +254,52 @@ LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(AM_CXXFLAGS) $(CXXFLAGS)
AM_V_CXX = $(am__v_CXX_@AM_V@)
am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
-am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_0 = @echo " CXX " $@;
+am__v_CXX_1 =
CXXLD = $(CXX)
CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
-am__v_CXXLD_0 = @echo " CXXLD " $@;
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_CXXLD_0 = @echo " CXXLD " $@;
+am__v_CXXLD_1 =
SOURCES = $(libtiff_la_SOURCES) $(libtiffxx_la_SOURCES) \
$(mkg3states_SOURCES)
DIST_SOURCES = $(am__libtiff_la_SOURCES_DIST) $(libtiffxx_la_SOURCES) \
$(mkg3states_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__libtiffinclude_HEADERS_DIST = tiff.h tiffio.h tiffvers.h \
tiffio.hxx
HEADERS = $(libtiffinclude_HEADERS) $(nodist_libtiffinclude_HEADERS) \
$(noinst_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+ $(LISP)tif_config.h.in tiffconf.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/tif_config.h.in \
+ $(srcdir)/tiffconf.h.in $(top_srcdir)/config/depcomp \
+ $(top_srcdir)/config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -223,6 +313,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -270,6 +361,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -360,9 +452,11 @@ top_srcdir = @top_srcdir@
LIBPORT = $(top_builddir)/port/libport.la
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
libtiffincludedir = $(includedir)
-EXTRA_DIST = Makefile.vc SConstruct tif_config.h-vms tif_config.vc.h \
- tif_config.wince.h tiffconf.vc.h tiffconf.wince.h libtiff.def \
- libtiff.map libtiffxx.map $(am__append_2) $(am__append_4)
+EXTRA_DIST = CMakeLists.txt Makefile.vc SConstruct libtiff.def \
+ libtiff.map libtiffxx.map tif_config.h-vms \
+ tif_config.h.cmake.in tif_config.vc.h tif_config.wince.h \
+ tiffconf.h.cmake.in tiffconf.vc.h tiffconf.wince.h \
+ $(am__append_2) $(am__append_4)
libtiffinclude_HEADERS = tiff.h tiffio.h tiffvers.h $(am__append_1)
noinst_HEADERS = \
t4.h \
@@ -414,7 +508,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign libtiff/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign libtiff/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -434,8 +527,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
tif_config.h: stamp-h1
- @if test ! -f $@; then rm -f stamp-h1; else :; fi
- @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/tif_config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
@@ -446,8 +539,8 @@ $(srcdir)/tif_config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
touch $@
tiffconf.h: stamp-h2
- @if test ! -f $@; then rm -f stamp-h2; else :; fi
- @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h2; else :; fi
+ @test -f $@ || rm -f stamp-h2
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h2
stamp-h2: $(srcdir)/tiffconf.h.in $(top_builddir)/config.status
@rm -f stamp-h2
@@ -455,9 +548,9 @@ stamp-h2: $(srcdir)/tiffconf.h.in $(top_builddir)/config.status
distclean-hdr:
-rm -f tif_config.h stamp-h1 tiffconf.h stamp-h2
+
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
@@ -465,6 +558,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
else :; fi; \
done; \
test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
@@ -480,14 +575,18 @@ uninstall-libLTLIBRARIES:
clean-libLTLIBRARIES:
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
libtiff.la: $(libtiff_la_OBJECTS) $(libtiff_la_DEPENDENCIES) $(EXTRA_libtiff_la_DEPENDENCIES)
$(AM_V_CCLD)$(libtiff_la_LINK) -rpath $(libdir) $(libtiff_la_OBJECTS) $(libtiff_la_LIBADD) $(LIBS)
+
libtiffxx.la: $(libtiffxx_la_OBJECTS) $(libtiffxx_la_DEPENDENCIES) $(EXTRA_libtiffxx_la_DEPENDENCIES)
$(AM_V_CXXLD)$(libtiffxx_la_LINK) $(am_libtiffxx_la_rpath) $(libtiffxx_la_OBJECTS) $(libtiffxx_la_LIBADD) $(LIBS)
@@ -499,6 +598,7 @@ clean-noinstPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+
mkg3states$(EXEEXT): $(mkg3states_OBJECTS) $(mkg3states_DEPENDENCIES) $(EXTRA_mkg3states_DEPENDENCIES)
@rm -f mkg3states$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(mkg3states_OBJECTS) $(mkg3states_LDADD) $(LIBS)
@@ -557,14 +657,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -601,8 +701,11 @@ clean-libtool:
-rm -rf .libs _libs
install-libtiffincludeHEADERS: $(libtiffinclude_HEADERS)
@$(NORMAL_INSTALL)
- test -z "$(libtiffincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libtiffincludedir)"
@list='$(libtiffinclude_HEADERS)'; test -n "$(libtiffincludedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libtiffincludedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libtiffincludedir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -619,8 +722,11 @@ uninstall-libtiffincludeHEADERS:
dir='$(DESTDIR)$(libtiffincludedir)'; $(am__uninstall_files_from_dir)
install-nodist_libtiffincludeHEADERS: $(nodist_libtiffinclude_HEADERS)
@$(NORMAL_INSTALL)
- test -z "$(libtiffincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libtiffincludedir)"
@list='$(nodist_libtiffinclude_HEADERS)'; test -n "$(libtiffincludedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libtiffincludedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libtiffincludedir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -636,26 +742,15 @@ uninstall-nodist_libtiffincludeHEADERS:
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(libtiffincludedir)'; $(am__uninstall_files_from_dir)
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) tif_config.h.in tiffconf.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) tif_config.h.in tiffconf.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -667,15 +762,11 @@ TAGS: $(HEADERS) $(SOURCES) tif_config.h.in tiffconf.h.in $(TAGS_DEPENDENCIES)
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) tif_config.h.in tiffconf.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) tif_config.h.in tiffconf.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -684,6 +775,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -831,24 +937,26 @@ uninstall-am: uninstall-libLTLIBRARIES uninstall-libtiffincludeHEADERS \
.MAKE: all install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \
- distclean distclean-compile distclean-generic distclean-hdr \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-libLTLIBRARIES \
- install-libtiffincludeHEADERS install-man \
- install-nodist_libtiffincludeHEADERS install-pdf \
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am \
+ install-libLTLIBRARIES install-libtiffincludeHEADERS \
+ install-man install-nodist_libtiffincludeHEADERS install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags uninstall uninstall-am uninstall-libLTLIBRARIES \
+ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES \
uninstall-libtiffincludeHEADERS \
uninstall-nodist_libtiffincludeHEADERS
+.PRECIOUS: Makefile
+
faxtable: mkg3states
(rm -f tif_fax3sm.c && ./mkg3states -b -c const tif_fax3sm.c)
diff --git a/tiff/libtiff/Makefile.vc b/tiff/libtiff/Makefile.vc
index 42792ba13..b73091546 100644
--- a/tiff/libtiff/Makefile.vc
+++ b/tiff/libtiff/Makefile.vc
@@ -1,4 +1,4 @@
-# $Id: Makefile.vc,v 1.22 2009-06-23 18:25:43 fwarmerdam Exp $
+# $Id: Makefile.vc,v 1.23 2015-08-19 02:31:04 bfriesen Exp $
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
@@ -87,11 +87,11 @@ tiffconf.h: tiffconf.vc.h
copy tiffconf.vc.h tiffconf.h
libtiff.lib: tif_config.h tiffconf.h $(OBJ)
- $(AR) /out:libtiff.lib $(OBJ) $(LIBS)
+ $(AR) /out:libtiff.lib ..\port\libport.lib $(OBJ) $(LIBS)
$(DLLNAME): tif_config.h tiffconf.h libtiff.def $(OBJ)
$(LD) /debug /dll /def:libtiff.def /out:$(DLLNAME) \
- /implib:libtiff_i.lib $(OBJ) $(LIBS)
+ /implib:libtiff_i.lib ..\port\libport.lib $(OBJ) $(LIBS)
clean:
-del tif_config.h tiffconf.h
diff --git a/tiff/libtiff/libtiff.def b/tiff/libtiff/libtiff.def
index ce36cfdeb..acf8609d5 100644
--- a/tiff/libtiff/libtiff.def
+++ b/tiff/libtiff/libtiff.def
@@ -1,151 +1,166 @@
-EXPORTS TIFFOpen
- TIFFOpenW
- TIFFGetVersion
+EXPORTS TIFFAccessTagMethods
+ TIFFCIELabToRGBInit
+ TIFFCIELabToXYZ
+ TIFFCheckTile
+ TIFFCheckpointDirectory
TIFFCleanup
+ TIFFClientOpen
+ TIFFClientdata
TIFFClose
+ TIFFComputeStrip
+ TIFFComputeTile
+ TIFFCreateCustomDirectory
+ TIFFCreateDirectory
+ TIFFCreateEXIFDirectory
+ TIFFCurrentDirOffset
+ TIFFCurrentDirectory
+ TIFFCurrentRow
+ TIFFCurrentStrip
+ TIFFCurrentTile
+ TIFFDataWidth
+ TIFFDefaultStripSize
+ TIFFDefaultTileSize
+ TIFFError
+ TIFFErrorExt
+ TIFFFdOpen
+ TIFFFieldDataType
+ TIFFFieldName
+ TIFFFieldPassCount
+ TIFFFieldReadCount
+ TIFFFieldTag
+ TIFFFieldWithName
+ TIFFFieldWithTag
+ TIFFFieldWriteCount
+ TIFFFileName
+ TIFFFileno
+ TIFFFindCODEC
+ TIFFFindField
TIFFFlush
TIFFFlushData
+ TIFFFreeDirectory
+ TIFFGetBitRevTable
+ TIFFGetClientInfo
+ TIFFGetCloseProc
+ TIFFGetConfiguredCODECs
TIFFGetField
- TIFFVGetField
TIFFGetFieldDefaulted
- TIFFVGetFieldDefaulted
- TIFFGetTagListEntry
- TIFFGetTagListCount
- TIFFReadDirectory
- TIFFScanlineSize64
- TIFFScanlineSize
- TIFFStripSize64
- TIFFStripSize
- TIFFVStripSize64
- TIFFVStripSize
- TIFFRawStripSize64
- TIFFRawStripSize
- TIFFTileRowSize64
- TIFFTileRowSize
- TIFFTileSize64
- TIFFTileSize
- TIFFVTileSize64
- TIFFVTileSize
- TIFFFileno
- TIFFSetFileno
+ TIFFGetMapFileProc
TIFFGetMode
- TIFFIsTiled
- TIFFIsByteSwapped
+ TIFFGetReadProc
+ TIFFGetSeekProc
+ TIFFGetSizeProc
+ TIFFGetTagListCount
+ TIFFGetTagListEntry
+ TIFFGetUnmapFileProc
+ TIFFGetVersion
+ TIFFGetWriteProc
TIFFIsBigEndian
+ TIFFIsByteSwapped
+ TIFFIsCODECConfigured
TIFFIsMSB2LSB
+ TIFFIsTiled
TIFFIsUpSampled
- TIFFCIELabToRGBInit
- TIFFCIELabToXYZ
- TIFFXYZToRGB
- TIFFYCbCrToRGBInit
- TIFFYCbCrtoRGB
- TIFFCurrentRow
- TIFFCurrentDirectory
- TIFFCurrentStrip
- TIFFCurrentTile
- TIFFDataWidth
- TIFFReadBufferSetup
- TIFFWriteBufferSetup
- TIFFSetupStrips
TIFFLastDirectory
- TIFFSetDirectory
- TIFFSetSubDirectory
- TIFFUnlinkDirectory
- TIFFSetField
- TIFFVSetField
- TIFFCheckpointDirectory
- TIFFWriteDirectory
- TIFFRewriteDirectory
+ TIFFMergeFieldInfo
+ TIFFNumberOfDirectories
+ TIFFNumberOfStrips
+ TIFFNumberOfTiles
+ TIFFOpen
+ TIFFOpenW
TIFFPrintDirectory
- TIFFReadScanline
- TIFFWriteScanline
+ TIFFRGBAImageBegin
+ TIFFRGBAImageEnd
+ TIFFRGBAImageGet
+ TIFFRGBAImageOK
+ TIFFRasterScanlineSize
+ TIFFRasterScanlineSize64
+ TIFFRawStripSize
+ TIFFRawStripSize64
+ TIFFReadBufferSetup
+ TIFFReadCustomDirectory
+ TIFFReadDirectory
+ TIFFReadEXIFDirectory
+ TIFFReadEncodedStrip
+ TIFFReadEncodedTile
TIFFReadRGBAImage
TIFFReadRGBAImageOriented
- TIFFFdOpen
- TIFFClientOpen
- TIFFFileName
- TIFFError
- TIFFErrorExt
- TIFFWarning
- TIFFWarningExt
+ TIFFReadRGBAStrip
+ TIFFReadRGBATile
+ TIFFReadRawStrip
+ TIFFReadRawTile
+ TIFFReadScanline
+ TIFFReadTile
+ TIFFRegisterCODEC
+ TIFFReverseBits
+ TIFFRewriteDirectory
+ TIFFScanlineSize
+ TIFFScanlineSize64
+ TIFFSetClientInfo
+ TIFFSetClientdata
+ TIFFSetCompressionScheme
+ TIFFSetDirectory
TIFFSetErrorHandler
TIFFSetErrorHandlerExt
+ TIFFSetField
+ TIFFSetFileName
+ TIFFSetFileno
+ TIFFSetMode
+ TIFFSetSubDirectory
+ TIFFSetTagExtender
TIFFSetWarningHandler
TIFFSetWarningHandlerExt
- TIFFComputeTile
- TIFFCheckTile
- TIFFNumberOfTiles
- TIFFReadTile
- TIFFWriteTile
- TIFFComputeStrip
- TIFFNumberOfStrips
- TIFFRGBAImageBegin
- TIFFRGBAImageGet
- TIFFRGBAImageEnd
- TIFFReadEncodedStrip
- TIFFReadRawStrip
- TIFFReadEncodedTile
- TIFFReadRawTile
- TIFFReadRGBATile
- TIFFReadRGBAStrip
- TIFFWriteEncodedStrip
- TIFFWriteRawStrip
- TIFFWriteEncodedTile
- TIFFWriteRawTile
TIFFSetWriteOffset
- TIFFSwabFloat
- TIFFSwabDouble
- TIFFSwabShort
- TIFFSwabLong
- TIFFSwabArrayOfShort
- TIFFSwabArrayOfLong
- TIFFSwabArrayOfFloat
+ TIFFSetupStrips
+ TIFFStripSize
+ TIFFStripSize64
TIFFSwabArrayOfDouble
+ TIFFSwabArrayOfFloat
+ TIFFSwabArrayOfLong
+ TIFFSwabArrayOfLong8
+ TIFFSwabArrayOfShort
TIFFSwabArrayOfTriples
- TIFFReverseBits
- TIFFGetBitRevTable
- TIFFDefaultStripSize
- TIFFDefaultTileSize
- TIFFRasterScanlineSize64
- TIFFRasterScanlineSize
- _TIFFmalloc
- _TIFFrealloc
- _TIFFfree
- _TIFFmemset
- _TIFFmemcpy
- _TIFFmemcmp
- TIFFCreateDirectory
- TIFFSetTagExtender
- TIFFFieldWithName
- TIFFFieldWithTag
- TIFFCurrentDirOffset
- TIFFWriteCheck
- TIFFRGBAImageOK
- TIFFNumberOfDirectories
- TIFFSetFileName
- TIFFSetClientdata
- TIFFSetMode
- TIFFClientdata
- TIFFGetReadProc
- TIFFGetWriteProc
- TIFFGetSeekProc
- TIFFGetCloseProc
- TIFFGetSizeProc
- TIFFGetMapFileProc
- TIFFGetUnmapFileProc
- TIFFIsCODECConfigured
- TIFFGetConfiguredCODECs
- TIFFFindCODEC
- TIFFRegisterCODEC
- TIFFUnRegisterCODEC
- TIFFFreeDirectory
- TIFFReadCustomDirectory
- TIFFReadEXIFDirectory
- TIFFAccessTagMethods
- TIFFGetClientInfo
- TIFFSetClientInfo
+ TIFFSwabDouble
+ TIFFSwabFloat
+ TIFFSwabLong
TIFFSwabLong8
- TIFFSwabArrayOfLong8
- TIFFFindField
+ TIFFSwabShort
+ TIFFTileRowSize
+ TIFFTileRowSize64
+ TIFFTileSize
+ TIFFTileSize64
+ TIFFUnRegisterCODEC
+ TIFFUnlinkDirectory
TIFFUnsetField
- TIFFMergeFieldInfo
+ TIFFVGetField
+ TIFFVGetFieldDefaulted
+ TIFFVSetField
+ TIFFVStripSize
+ TIFFVStripSize64
+ TIFFVTileSize
+ TIFFVTileSize64
+ TIFFWarning
+ TIFFWarningExt
+ TIFFWriteBufferSetup
+ TIFFWriteCheck
+ TIFFWriteCustomDirectory
+ TIFFWriteDirectory
+ TIFFWriteEncodedStrip
+ TIFFWriteEncodedTile
+ TIFFWriteRawStrip
+ TIFFWriteRawTile
+ TIFFWriteScanline
+ TIFFWriteTile
+ TIFFXYZToRGB
+ TIFFYCbCrToRGBInit
+ TIFFYCbCrtoRGB
+ _TIFFCheckMalloc
+ _TIFFCheckRealloc
+ _TIFFRewriteField
+ _TIFFfree
+ _TIFFmalloc
+ _TIFFmemcmp
+ _TIFFmemcpy
+ _TIFFmemset
+ _TIFFrealloc
+ _TIFFMultiply32
+ _TIFFMultiply64
diff --git a/tiff/libtiff/mkg3states.c b/tiff/libtiff/mkg3states.c
index 1df9ccc5f..16ad3c237 100644
--- a/tiff/libtiff/mkg3states.c
+++ b/tiff/libtiff/mkg3states.c
@@ -1,4 +1,4 @@
-/* "$Id: mkg3states.c,v 1.11 2010-03-10 18:56:48 bfriesen Exp $ */
+/* "$Id: mkg3states.c,v 1.12 2015-06-21 01:09:09 bfriesen Exp $ */
/*
* Copyright (c) 1991-1997 Sam Leffler
@@ -383,8 +383,11 @@ main(int argc, char* argv[])
FILE* fd;
char* outputfile;
int c;
+
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char* optarg;
+#endif
while ((c = getopt(argc, argv, "c:s:bp")) != -1)
switch (c) {
diff --git a/tiff/libtiff/tif_aux.c b/tiff/libtiff/tif_aux.c
index 927150a49..3d35ba92b 100644
--- a/tiff/libtiff/tif_aux.c
+++ b/tiff/libtiff/tif_aux.c
@@ -1,4 +1,4 @@
-/* $Id: tif_aux.c,v 1.26 2010-07-01 15:33:28 dron Exp $ */
+/* $Id: tif_aux.c,v 1.29 2016-11-11 20:45:53 erouault Exp $ */
/*
* Copyright (c) 1991-1997 Sam Leffler
@@ -100,7 +100,8 @@ TIFFDefaultTransferFunction(TIFFDirectory* td)
n = ((tmsize_t)1)<<td->td_bitspersample;
nbytes = n * sizeof (uint16);
- if (!(tf[0] = (uint16 *)_TIFFmalloc(nbytes)))
+ tf[0] = (uint16 *)_TIFFmalloc(nbytes);
+ if (tf[0] == NULL)
return 0;
tf[0][0] = 0;
for (i = 1; i < n; i++) {
@@ -109,10 +110,12 @@ TIFFDefaultTransferFunction(TIFFDirectory* td)
}
if (td->td_samplesperpixel - td->td_extrasamples > 1) {
- if (!(tf[1] = (uint16 *)_TIFFmalloc(nbytes)))
+ tf[1] = (uint16 *)_TIFFmalloc(nbytes);
+ if(tf[1] == NULL)
goto bad;
_TIFFmemcpy(tf[1], tf[0], nbytes);
- if (!(tf[2] = (uint16 *)_TIFFmalloc(nbytes)))
+ tf[2] = (uint16 *)_TIFFmalloc(nbytes);
+ if (tf[2] == NULL)
goto bad;
_TIFFmemcpy(tf[2], tf[0], nbytes);
}
@@ -134,7 +137,8 @@ TIFFDefaultRefBlackWhite(TIFFDirectory* td)
{
int i;
- if (!(td->td_refblackwhite = (float *)_TIFFmalloc(6*sizeof (float))))
+ td->td_refblackwhite = (float *)_TIFFmalloc(6*sizeof (float));
+ if (td->td_refblackwhite == NULL)
return 0;
if (td->td_photometric == PHOTOMETRIC_YCBCR) {
/*
@@ -163,7 +167,7 @@ TIFFDefaultRefBlackWhite(TIFFDirectory* td)
* value if the tag is not present in the directory.
*
* NB: We use the value in the directory, rather than
- * explcit values so that defaults exist only one
+ * explicit values so that defaults exist only one
* place in the library -- in TIFFDefaultDirectory.
*/
int
@@ -208,11 +212,18 @@ TIFFVGetFieldDefaulted(TIFF* tif, uint32 tag, va_list ap)
*va_arg(ap, uint16 *) = td->td_resolutionunit;
return (1);
case TIFFTAG_PREDICTOR:
- {
- TIFFPredictorState* sp = (TIFFPredictorState*) tif->tif_data;
- *va_arg(ap, uint16*) = (uint16) sp->predictor;
- return 1;
- }
+ {
+ TIFFPredictorState* sp = (TIFFPredictorState*) tif->tif_data;
+ if( sp == NULL )
+ {
+ TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
+ "Cannot get \"Predictor\" tag as plugin is not configured");
+ *va_arg(ap, uint16*) = 0;
+ return 0;
+ }
+ *va_arg(ap, uint16*) = (uint16) sp->predictor;
+ return 1;
+ }
case TIFFTAG_DOTRANGE:
*va_arg(ap, uint16 *) = 0;
*va_arg(ap, uint16 *) = (1<<td->td_bitspersample)-1;
diff --git a/tiff/libtiff/tif_close.c b/tiff/libtiff/tif_close.c
index 13d2bab5c..a0cb66131 100644
--- a/tiff/libtiff/tif_close.c
+++ b/tiff/libtiff/tif_close.c
@@ -1,4 +1,4 @@
-/* $Id: tif_close.c,v 1.19 2010-03-10 18:56:48 bfriesen Exp $ */
+/* $Id: tif_close.c,v 1.21 2016-01-23 21:20:34 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -36,7 +36,7 @@
/**
* Auxiliary function to free the TIFF structure. Given structure will be
- * completetly freed, so you should save opened file handle and pointer
+ * completely freed, so you should save opened file handle and pointer
* to the close procedure in external variables before calling
* _TIFFCleanup(), if you will need these ones to close the file.
*
@@ -62,11 +62,11 @@ TIFFCleanup(TIFF* tif)
*/
while( tif->tif_clientinfo )
{
- TIFFClientInfoLink *link = tif->tif_clientinfo;
+ TIFFClientInfoLink *psLink = tif->tif_clientinfo;
- tif->tif_clientinfo = link->next;
- _TIFFfree( link->name );
- _TIFFfree( link );
+ tif->tif_clientinfo = psLink->next;
+ _TIFFfree( psLink->name );
+ _TIFFfree( psLink );
}
if (tif->tif_rawdata && (tif->tif_flags&TIFF_MYBUFFER))
diff --git a/tiff/libtiff/tif_codec.c b/tiff/libtiff/tif_codec.c
index e20166737..7cb46f630 100644
--- a/tiff/libtiff/tif_codec.c
+++ b/tiff/libtiff/tif_codec.c
@@ -1,4 +1,4 @@
-/* $Id: tif_codec.c,v 1.15 2010-12-14 12:53:00 dron Exp $ */
+/* $Id: tif_codec.c,v 1.17 2015-08-19 02:31:04 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -108,7 +108,7 @@ _notConfigured(TIFF* tif)
const TIFFCodec* c = TIFFFindCODEC(tif->tif_dir.td_compression);
char compression_code[20];
- sprintf( compression_code, "%d", tif->tif_dir.td_compression );
+ sprintf(compression_code, "%d",tif->tif_dir.td_compression );
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
"%s compression support is not configured",
c ? c->name : compression_code );
diff --git a/tiff/libtiff/tif_color.c b/tiff/libtiff/tif_color.c
index be4850ce6..89194c207 100644
--- a/tiff/libtiff/tif_color.c
+++ b/tiff/libtiff/tif_color.c
@@ -1,4 +1,4 @@
-/* $Id: tif_color.c,v 1.19 2010-12-14 02:22:42 faxguy Exp $ */
+/* $Id: tif_color.c,v 1.22 2016-09-04 21:32:56 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -126,37 +126,37 @@ TIFFCIELabToRGBInit(TIFFCIELabToRGB* cielab,
const TIFFDisplay *display, float *refWhite)
{
int i;
- double gamma;
+ double dfGamma;
cielab->range = CIELABTORGB_TABLE_RANGE;
_TIFFmemcpy(&cielab->display, display, sizeof(TIFFDisplay));
/* Red */
- gamma = 1.0 / cielab->display.d_gammaR ;
+ dfGamma = 1.0 / cielab->display.d_gammaR ;
cielab->rstep =
(cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range;
for(i = 0; i <= cielab->range; i++) {
cielab->Yr2r[i] = cielab->display.d_Vrwr
- * ((float)pow((double)i / cielab->range, gamma));
+ * ((float)pow((double)i / cielab->range, dfGamma));
}
/* Green */
- gamma = 1.0 / cielab->display.d_gammaG ;
+ dfGamma = 1.0 / cielab->display.d_gammaG ;
cielab->gstep =
(cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range;
for(i = 0; i <= cielab->range; i++) {
cielab->Yg2g[i] = cielab->display.d_Vrwg
- * ((float)pow((double)i / cielab->range, gamma));
+ * ((float)pow((double)i / cielab->range, dfGamma));
}
/* Blue */
- gamma = 1.0 / cielab->display.d_gammaB ;
+ dfGamma = 1.0 / cielab->display.d_gammaB ;
cielab->bstep =
(cielab->display.d_YCR - cielab->display.d_Y0R) / cielab->range;
for(i = 0; i <= cielab->range; i++) {
cielab->Yb2b[i] = cielab->display.d_Vrwb
- * ((float)pow((double)i / cielab->range, gamma));
+ * ((float)pow((double)i / cielab->range, dfGamma));
}
/* Init reference white point */
@@ -175,7 +175,7 @@ TIFFCIELabToRGBInit(TIFFCIELabToRGB* cielab,
#define SHIFT 16
#define FIX(x) ((int32)((x) * (1L<<SHIFT) + 0.5))
#define ONE_HALF ((int32)(1<<(SHIFT-1)))
-#define Code2V(c, RB, RW, CR) ((((c)-(int32)(RB))*(float)(CR))/(float)(((RW)-(RB)) ? ((RW)-(RB)) : 1))
+#define Code2V(c, RB, RW, CR) ((((c)-(int32)(RB))*(float)(CR))/(float)(((RW)-(RB)!=0) ? ((RW)-(RB)) : 1))
#define CLAMP(f,min,max) ((f)<(min)?(min):(f)>(max)?(max):(f))
#define HICLAMP(f,max) ((f)>(max)?(max):(f))
@@ -186,7 +186,9 @@ TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32 Y, int32 Cb, int32 Cr,
int32 i;
/* XXX: Only 8-bit YCbCr input supported for now */
- Y = HICLAMP(Y, 255), Cb = CLAMP(Cb, 0, 255), Cr = CLAMP(Cr, 0, 255);
+ Y = HICLAMP(Y, 255);
+ Cb = CLAMP(Cb, 0, 255);
+ Cr = CLAMP(Cr, 0, 255);
i = ycbcr->Y_tab[Y] + ycbcr->Cr_r_tab[Cr];
*r = CLAMP(i, 0, 255);
diff --git a/tiff/libtiff/tif_compress.c b/tiff/libtiff/tif_compress.c
index 20e72fd07..b571d1954 100644
--- a/tiff/libtiff/tif_compress.c
+++ b/tiff/libtiff/tif_compress.c
@@ -1,4 +1,4 @@
-/* $Id: tif_compress.c,v 1.22 2010-03-10 18:56:48 bfriesen Exp $ */
+/* $Id: tif_compress.c,v 1.25 2016-10-25 20:04:22 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -82,10 +82,10 @@ TIFFNoDecode(TIFF* tif, const char* method)
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
"Compression scheme %u %s decoding is not implemented",
tif->tif_dir.td_compression, method);
- return (-1);
+ return (0);
}
-int
+static int
_TIFFNoFixupTags(TIFF* tif)
{
(void) tif;
@@ -227,7 +227,7 @@ TIFFUnRegisterCODEC(TIFFCodec* c)
codec_t* cd;
codec_t** pcd;
- for (pcd = &registeredCODECS; (cd = *pcd); pcd = &cd->next)
+ for (pcd = &registeredCODECS; (cd = *pcd) != NULL; pcd = &cd->next)
if (cd->info == c) {
*pcd = cd->next;
_TIFFfree(cd);
diff --git a/tiff/libtiff/tif_config.h.cmake.in b/tiff/libtiff/tif_config.h.cmake.in
new file mode 100644
index 000000000..de0f3a3c2
--- /dev/null
+++ b/tiff/libtiff/tif_config.h.cmake.in
@@ -0,0 +1,261 @@
+/* libtiff/tif_config.h.cmake.in. Not generated, but originated from autoheader. */
+/* This file must be kept up-to-date with needed substitutions from libtiff/tif_config.h.in. */
+
+/* Support CCITT Group 3 & 4 algorithms */
+#cmakedefine CCITT_SUPPORT 1
+
+/* Pick up YCbCr subsampling info from the JPEG data stream to support files
+ lacking the tag (default enabled). */
+#cmakedefine CHECK_JPEG_YCBCR_SUBSAMPLING 1
+
+/* enable partial strip reading for large strips (experimental) */
+#cmakedefine CHUNKY_STRIP_READ_SUPPORT 1
+
+/* Support C++ stream API (requires C++ compiler) */
+#cmakedefine CXX_SUPPORT 1
+
+/* enable deferred strip/tile offset/size loading (experimental) */
+#cmakedefine DEFER_STRILE_LOAD 1
+
+/* Define to 1 if you have the <assert.h> header file. */
+#cmakedefine HAVE_ASSERT_H 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#cmakedefine HAVE_DLFCN_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#cmakedefine HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `floor' function. */
+#cmakedefine HAVE_FLOOR 1
+
+/* Define to 1 if you have the `getopt' function. */
+#cmakedefine HAVE_GETOPT 1
+
+/* Define to 1 if you have the <GLUT/glut.h> header file. */
+#cmakedefine HAVE_GLUT_GLUT_H 1
+
+/* Define to 1 if you have the <GL/glut.h> header file. */
+#cmakedefine HAVE_GL_GLUT_H 1
+
+/* Define to 1 if you have the <GL/glu.h> header file. */
+#cmakedefine HAVE_GL_GLU_H 1
+
+/* Define to 1 if you have the <GL/gl.h> header file. */
+#cmakedefine HAVE_GL_GL_H 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#cmakedefine HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the <io.h> header file. */
+#cmakedefine HAVE_IO_H 1
+
+/* Define to 1 if you have the `isascii' function. */
+#cmakedefine HAVE_ISASCII 1
+
+/* Define to 1 if you have the `jbg_newlen' function. */
+#cmakedefine HAVE_JBG_NEWLEN 1
+
+/* Define to 1 if you have the `lfind' function. */
+#cmakedefine HAVE_LFIND 1
+
+/* Define to 1 if you have the <limits.h> header file. */
+#cmakedefine HAVE_LIMITS_H 1
+
+/* Define to 1 if you have the <malloc.h> header file. */
+#cmakedefine HAVE_MALLOC_H 1
+
+/* Define to 1 if you have the `memmove' function. */
+#cmakedefine HAVE_MEMMOVE 1
+
+/* Define to 1 if you have the <memory.h> header file. */
+#cmakedefine HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `memset' function. */
+#cmakedefine HAVE_MEMSET 1
+
+/* Define to 1 if you have the `mmap' function. */
+#cmakedefine HAVE_MMAP 1
+
+/* Define to 1 if you have the <OpenGL/glu.h> header file. */
+#cmakedefine HAVE_OPENGL_GLU_H 1
+
+/* Define to 1 if you have the <OpenGL/gl.h> header file. */
+#cmakedefine HAVE_OPENGL_GL_H 1
+
+/* Define to 1 if you have the `pow' function. */
+#cmakedefine HAVE_POW 1
+
+/* Define to 1 if you have the <search.h> header file. */
+#cmakedefine HAVE_SEARCH_H 1
+
+/* Define to 1 if you have the `setmode' function. */
+#cmakedefine HAVE_SETMODE 1
+
+/* Define to 1 if you have the `snprintf' function. */
+#cmakedefine HAVE_SNPRINTF 1
+
+/* Define to 1 if you have the `sqrt' function. */
+#cmakedefine HAVE_SQRT 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#cmakedefine HAVE_STDINT_H 1
+
+/* Define to 1 if you have the `strcasecmp' function. */
+#cmakedefine HAVE_STRCASECMP 1
+
+/* Define to 1 if you have the `strchr' function. */
+#cmakedefine HAVE_STRCHR 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#cmakedefine HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#cmakedefine HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strrchr' function. */
+#cmakedefine HAVE_STRRCHR 1
+
+/* Define to 1 if you have the `strstr' function. */
+#cmakedefine HAVE_STRSTR 1
+
+/* Define to 1 if you have the `strtol' function. */
+#cmakedefine HAVE_STRTOL 1
+
+/* Define to 1 if you have the `strtoul' function. */
+#cmakedefine HAVE_STRTOUL 1
+
+/* Define to 1 if you have the `strtoull' function. */
+#cmakedefine HAVE_STRTOULL 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#cmakedefine HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#cmakedefine HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#cmakedefine HAVE_UNISTD_H 1
+
+/* 8/12 bit libjpeg dual mode enabled */
+#cmakedefine JPEG_DUAL_MODE_8_12 1
+
+/* 12bit libjpeg primary include file with path */
+#define LIBJPEG_12_PATH @LIBJPEG_12_PATH@
+
+/* Support LZMA2 compression */
+#cmakedefine LZMA_SUPPORT 1
+
+/* Name of package */
+#define PACKAGE "@PACKAGE_NAME@"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "@PACKAGE_NAME@"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "@PACKAGE_STRING@"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "@PACKAGE_TARNAME@"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL "@PACKAGE_URL@"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "@PACKAGE_VERSION@"
+
+/* The size of `signed int', as computed by sizeof. */
+#define SIZEOF_SIGNED_INT @SIZEOF_SIGNED_INT@
+
+/* The size of `signed long', as computed by sizeof. */
+#define SIZEOF_SIGNED_LONG @SIZEOF_SIGNED_LONG@
+
+/* The size of `signed long long', as computed by sizeof. */
+#define SIZEOF_SIGNED_LONG_LONG @SIZEOF_SIGNED_LONG_LONG@
+
+/* The size of `signed short', as computed by sizeof. */
+#define SIZEOF_SIGNED_SHORT @SIZEOF_SIGNED_SHORT@
+
+/* The size of `unsigned char *', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_CHAR_P @SIZEOF_UNSIGNED_CHAR_P@
+
+/* The size of `unsigned int', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_INT @SIZEOF_UNSIGNED_INT@
+
+/* The size of `unsigned long', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_LONG @SIZEOF_UNSIGNED_LONG@
+
+/* The size of `unsigned long long', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_LONG_LONG @SIZEOF_UNSIGNED_LONG_LONG@
+
+/* The size of `unsigned short', as computed by sizeof. */
+#define SIZEOF_UNSIGNED_SHORT @SIZEOF_UNSIGNED_SHORT@
+
+/* Default size of the strip in bytes (when strip chopping enabled) */
+#define STRIP_SIZE_DEFAULT @STRIP_SIZE_DEFAULT@
+
+/* Signed 32-bit type formatter */
+#define TIFF_INT32_FORMAT "@TIFF_INT32_FORMAT@"
+
+/* Signed 64-bit type formatter */
+#define TIFF_INT64_FORMAT "@TIFF_INT64_FORMAT@"
+
+/* Pointer difference type formatter */
+#define TIFF_PTRDIFF_FORMAT "@TIFF_PTRDIFF_FORMAT@"
+
+/* Unsigned size type formatter */
+#define TIFF_SIZE_FORMAT "@TIFF_SIZE_FORMAT@"
+
+/* Signed size type formatter */
+#define TIFF_SSIZE_FORMAT "@TIFF_SSIZE_FORMAT@"
+
+/* Unsigned 32-bit type formatter */
+#define TIFF_UINT32_FORMAT "@TIFF_UINT32_FORMAT@"
+
+/* Unsigned 64-bit type formatter */
+#define TIFF_UINT64_FORMAT "@TIFF_UINT64_FORMAT@"
+
+/* Unsigned 8-bit type */
+#define TIFF_UINT8_T @TIFF_UINT8_T@
+
+/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#cmakedefine TM_IN_SYS_TIME 1
+
+/* define to use win32 IO system */
+#cmakedefine USE_WIN32_FILEIO 1
+
+/* Version number of package */
+#define VERSION "@PACKAGE_VERSION@"
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#define _FILE_OFFSET_BITS @FILE_OFFSET_BITS@
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#define inline @INLINE_KEYWORD@
+#endif
+
+/* Define to `long int' if <sys/types.h> does not define. */
+#undef off_t
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
diff --git a/tiff/libtiff/tif_config.h.in b/tiff/libtiff/tif_config.h.in
index dfd6e38af..a4b2e60ac 100644
--- a/tiff/libtiff/tif_config.h.in
+++ b/tiff/libtiff/tif_config.h.in
@@ -27,6 +27,10 @@
/* Define to 1 if you have the <assert.h> header file. */
#undef HAVE_ASSERT_H
+/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't.
+ */
+#undef HAVE_DECL_OPTARG
+
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
@@ -36,6 +40,9 @@
/* Define to 1 if you have the `floor' function. */
#undef HAVE_FLOOR
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#undef HAVE_FSEEKO
+
/* Define to 1 if you have the `getopt' function. */
#undef HAVE_GETOPT
@@ -79,12 +86,6 @@
/* Define to 1 if you have the `lfind' function. */
#undef HAVE_LFIND
-/* Define to 1 if you have the `c' library (-lc). */
-#undef HAVE_LIBC
-
-/* Define to 1 if you have the `m' library (-lm). */
-#undef HAVE_LIBM
-
/* Define to 1 if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
@@ -121,6 +122,9 @@
/* Define to 1 if you have the `setmode' function. */
#undef HAVE_SETMODE
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
/* Define to 1 if you have the `sqrt' function. */
#undef HAVE_SQRT
@@ -197,8 +201,7 @@
/* Support LogLuv high dynamic range encoding */
#undef LOGLUV_SUPPORT
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
/* Support LZMA2 compression */
@@ -213,9 +216,6 @@
/* Support NeXT 2-bit RLE algorithm */
#undef NEXT_SUPPORT
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
-
/* Support Old JPEG compresson (read-only) */
#undef OJPEG_SUPPORT
@@ -262,6 +262,9 @@
/* The size of `signed short', as computed by sizeof. */
#undef SIZEOF_SIGNED_SHORT
+/* The size of `size_t', as computed by sizeof. */
+#undef SIZEOF_SIZE_T
+
/* The size of `unsigned char *', as computed by sizeof. */
#undef SIZEOF_UNSIGNED_CHAR_P
@@ -317,6 +320,12 @@
/* Pointer difference type */
#undef TIFF_PTRDIFF_T
+/* Size type formatter */
+#undef TIFF_SIZE_FORMAT
+
+/* Unsigned size type */
+#undef TIFF_SIZE_T
+
/* Signed size type formatter */
#undef TIFF_SSIZE_FORMAT
@@ -371,9 +380,17 @@
/* Support Deflate compression */
#undef ZIP_SUPPORT
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
/* Number of bits in a file offset, on hosts where this is settable. */
#undef _FILE_OFFSET_BITS
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#undef _LARGEFILE_SOURCE
+
/* Define for large files, on AIX-style hosts. */
#undef _LARGE_FILES
diff --git a/tiff/libtiff/tif_config.vc.h b/tiff/libtiff/tif_config.vc.h
index b97cf51b5..5cebfa02e 100644
--- a/tiff/libtiff/tif_config.vc.h
+++ b/tiff/libtiff/tif_config.vc.h
@@ -1,3 +1,6 @@
+#ifndef _TIF_CONFIG_H_
+#define _TIF_CONFIG_H_
+
/* Define to 1 if you have the <assert.h> header file. */
#define HAVE_ASSERT_H 1
@@ -26,6 +29,9 @@
/* Define to 1 if you have the `setmode' function. */
#define HAVE_SETMODE 1
+/* Define to 1 if you have the declaration of `optarg', and to 0 if you don't. */
+#define HAVE_DECL_OPTARG 0
+
/* The size of a `int', as computed by sizeof. */
#define SIZEOF_INT 4
@@ -44,16 +50,67 @@
/* Unsigned 64-bit type */
#define TIFF_UINT64_T unsigned __int64
+#if _WIN64
+/*
+ Windows 64-bit build
+*/
+
+/* Pointer difference type */
+# define TIFF_PTRDIFF_T TIFF_INT64_T
+
+/* The size of `size_t', as computed by sizeof. */
+# define SIZEOF_SIZE_T 8
+
+/* Size type formatter */
+# define TIFF_SIZE_FORMAT TIFF_INT64_FORMAT
+
+/* Unsigned size type */
+# define TIFF_SIZE_T TIFF_UINT64_T
+
+/* Signed size type formatter */
+# define TIFF_SSIZE_FORMAT TIFF_INT64_FORMAT
+
+/* Signed size type */
+# define TIFF_SSIZE_T TIFF_INT64_T
+
+#else
+/*
+ Windows 32-bit build
+*/
+
+/* Pointer difference type */
+# define TIFF_PTRDIFF_T signed int
+
+/* The size of `size_t', as computed by sizeof. */
+# define SIZEOF_SIZE_T 4
+
+/* Size type formatter */
+# define TIFF_SIZE_FORMAT "%u"
+
+/* Size type formatter */
+# define TIFF_SIZE_FORMAT "%u"
+
+/* Unsigned size type */
+# define TIFF_SIZE_T unsigned int
+
+/* Signed size type formatter */
+# define TIFF_SSIZE_FORMAT "%d"
+
+/* Signed size type */
+# define TIFF_SSIZE_T signed int
+
+#endif
+
/* Set the native cpu bit order */
#define HOST_FILLORDER FILLORDER_LSB2MSB
-#if defined(_MSC_VER) && _MSC_VER>=1900
-# define STDC99
+/* Visual Studio 2015 / VC 14 / MSVC 19.00 finally has snprintf() */
+#if defined(_MSC_VER) && _MSC_VER < 1900
+#define snprintf _snprintf
#else
-# define snprintf _snprintf
+#define HAVE_SNPRINTF 1
#endif
-
/* Define to 1 if your processor stores words with the most significant byte
first (like Motorola and SPARC, unlike Intel and VAX). */
/* #undef WORDS_BIGENDIAN */
@@ -67,6 +124,10 @@
#endif
#define lfind _lfind
+
+#pragma warning(disable : 4996) /* function deprecation warnings */
+
+#endif /* _TIF_CONFIG_H_ */
/*
* Local Variables:
* mode: c
diff --git a/tiff/libtiff/tif_dir.c b/tiff/libtiff/tif_dir.c
index 401a080e3..ad21655a6 100644
--- a/tiff/libtiff/tif_dir.c
+++ b/tiff/libtiff/tif_dir.c
@@ -1,4 +1,4 @@
-/* $Id: tif_dir.c,v 1.108 2012-02-01 01:51:00 fwarmerdam Exp $ */
+/* $Id: tif_dir.c,v 1.127 2016-10-25 21:35:15 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -43,8 +43,10 @@
static void
setByteArray(void** vpp, void* vp, size_t nmemb, size_t elem_size)
{
- if (*vpp)
- _TIFFfree(*vpp), *vpp = 0;
+ if (*vpp) {
+ _TIFFfree(*vpp);
+ *vpp = 0;
+ }
if (vp) {
tmsize_t bytes = (tmsize_t)(nmemb * elem_size);
if (elem_size && bytes / elem_size == nmemb)
@@ -57,13 +59,13 @@ void _TIFFsetByteArray(void** vpp, void* vp, uint32 n)
{ setByteArray(vpp, vp, n, 1); }
void _TIFFsetString(char** cpp, char* cp)
{ setByteArray((void**) cpp, (void*) cp, strlen(cp)+1, 1); }
-void _TIFFsetNString(char** cpp, char* cp, uint32 n)
+static void _TIFFsetNString(char** cpp, char* cp, uint32 n)
{ setByteArray((void**) cpp, (void*) cp, n, 1); }
void _TIFFsetShortArray(uint16** wpp, uint16* wp, uint32 n)
{ setByteArray((void**) wpp, (void*) wp, n, sizeof (uint16)); }
void _TIFFsetLongArray(uint32** lpp, uint32* lp, uint32 n)
{ setByteArray((void**) lpp, (void*) lp, n, sizeof (uint32)); }
-void _TIFFsetLong8Array(uint64** lpp, uint64* lp, uint32 n)
+static void _TIFFsetLong8Array(uint64** lpp, uint64* lp, uint32 n)
{ setByteArray((void**) lpp, (void*) lp, n, sizeof (uint64)); }
void _TIFFsetFloatArray(float** fpp, float* fp, uint32 n)
{ setByteArray((void**) fpp, (void*) fp, n, sizeof (float)); }
@@ -122,6 +124,10 @@ setExtraSamples(TIFFDirectory* td, va_list ap, uint32* v)
#undef EXTRASAMPLE_COREL_UNASSALPHA
}
+/*
+ * Confirm we have "samplesperpixel" ink names separated by \0. Returns
+ * zero if the ink names are not as expected.
+ */
static uint32
checkInkNamesString(TIFF* tif, uint32 slen, const char* s)
{
@@ -132,9 +138,9 @@ checkInkNamesString(TIFF* tif, uint32 slen, const char* s)
const char* ep = s+slen;
const char* cp = s;
for (; i > 0; i--) {
- for (; *cp != '\0'; cp++)
- if (cp >= ep)
- goto bad;
+ for (; cp < ep && *cp != '\0'; cp++) {}
+ if (cp >= ep)
+ goto bad;
cp++; /* skip \0 */
}
return ((uint32)(cp-s));
@@ -156,9 +162,23 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
TIFFDirectory* td = &tif->tif_dir;
int status = 1;
uint32 v32, i, v;
+ double dblval;
char* s;
+ const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY);
+ uint32 standard_tag = tag;
+ if( fip == NULL ) /* cannot happen since OkToChangeTag() already checks it */
+ return 0;
+ /*
+ * We want to force the custom code to be used for custom
+ * fields even if the tag happens to match a well known
+ * one - important for reinterpreted handling of standard
+ * tag values in custom directories (i.e. EXIF)
+ */
+ if (fip->field_bit == FIELD_CUSTOM) {
+ standard_tag = 0;
+ }
- switch (tag) {
+ switch (standard_tag) {
case TIFFTAG_SUBFILETYPE:
td->td_subfiletype = (uint32) va_arg(ap, uint32);
break;
@@ -236,6 +256,28 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
v = (uint16) va_arg(ap, uint16_vap);
if (v == 0)
goto badvalue;
+ if( v != td->td_samplesperpixel )
+ {
+ /* See http://bugzilla.maptools.org/show_bug.cgi?id=2500 */
+ if( td->td_sminsamplevalue != NULL )
+ {
+ TIFFWarningExt(tif->tif_clientdata,module,
+ "SamplesPerPixel tag value is changing, "
+ "but SMinSampleValue tag was read with a different value. Cancelling it");
+ TIFFClrFieldBit(tif,FIELD_SMINSAMPLEVALUE);
+ _TIFFfree(td->td_sminsamplevalue);
+ td->td_sminsamplevalue = NULL;
+ }
+ if( td->td_smaxsamplevalue != NULL )
+ {
+ TIFFWarningExt(tif->tif_clientdata,module,
+ "SamplesPerPixel tag value is changing, "
+ "but SMaxSampleValue tag was read with a different value. Cancelling it");
+ TIFFClrFieldBit(tif,FIELD_SMAXSAMPLEVALUE);
+ _TIFFfree(td->td_smaxsamplevalue);
+ td->td_smaxsamplevalue = NULL;
+ }
+ }
td->td_samplesperpixel = (uint16) v;
break;
case TIFFTAG_ROWSPERSTRIP:
@@ -267,10 +309,16 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
setDoubleArrayOneValue(&td->td_smaxsamplevalue, va_arg(ap, double), td->td_samplesperpixel);
break;
case TIFFTAG_XRESOLUTION:
- td->td_xresolution = (float) va_arg(ap, double);
+ dblval = va_arg(ap, double);
+ if( dblval < 0 )
+ goto badvaluedouble;
+ td->td_xresolution = (float) dblval;
break;
case TIFFTAG_YRESOLUTION:
- td->td_yresolution = (float) va_arg(ap, double);
+ dblval = va_arg(ap, double);
+ if( dblval < 0 )
+ goto badvaluedouble;
+ td->td_yresolution = (float) dblval;
break;
case TIFFTAG_PLANARCONFIG:
v = (uint16) va_arg(ap, uint16_vap);
@@ -378,7 +426,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
if ((tif->tif_flags & TIFF_INSUBIFD) == 0) {
td->td_nsubifd = (uint16) va_arg(ap, uint16_vap);
_TIFFsetLong8Array(&td->td_subifd, (uint64*) va_arg(ap, uint64*),
- (long) td->td_nsubifd);
+ (uint32) td->td_nsubifd);
} else {
TIFFErrorExt(tif->tif_clientdata, module,
"%s: Sorry, cannot nest SubIFDs",
@@ -397,7 +445,7 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
v = (td->td_samplesperpixel - td->td_extrasamples) > 1 ? 3 : 1;
for (i = 0; i < v; i++)
_TIFFsetShortArray(&td->td_transferfunction[i],
- va_arg(ap, uint16*), 1L<<td->td_bitspersample);
+ va_arg(ap, uint16*), 1U<<td->td_bitspersample);
break;
case TIFFTAG_REFERENCEBLACKWHITE:
/* XXX should check for null range */
@@ -423,7 +471,6 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
default: {
TIFFTagValue *tv;
int tv_size, iCustom;
- const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY);
/*
* This can happen if multiple images are open with different
@@ -434,11 +481,11 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
* happens, for example, when tiffcp is used to convert between
* compression schemes and codec-specific tags are blindly copied.
*/
- if(fip == NULL || fip->field_bit != FIELD_CUSTOM) {
+ if(fip->field_bit != FIELD_CUSTOM) {
TIFFErrorExt(tif->tif_clientdata, module,
"%s: Invalid %stag \"%s\" (not supported by codec)",
tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "",
- fip ? fip->field_name : "Unknown");
+ fip->field_name);
status = 0;
break;
}
@@ -550,111 +597,108 @@ _TIFFVSetField(TIFF* tif, uint32 tag, va_list ap)
goto end;
}
- if ((fip->field_passcount
- || fip->field_writecount == TIFF_VARIABLE
- || fip->field_writecount == TIFF_VARIABLE2
- || fip->field_writecount == TIFF_SPP
- || tv->count > 1)
- && fip->field_tag != TIFFTAG_PAGENUMBER
- && fip->field_tag != TIFFTAG_HALFTONEHINTS
- && fip->field_tag != TIFFTAG_YCBCRSUBSAMPLING
- && fip->field_tag != TIFFTAG_DOTRANGE) {
+ if (fip->field_tag == TIFFTAG_DOTRANGE
+ && strcmp(fip->field_name,"DotRange") == 0) {
+ /* TODO: This is an evil exception and should not have been
+ handled this way ... likely best if we move it into
+ the directory structure with an explicit field in
+ libtiff 4.1 and assign it a FIELD_ value */
+ uint16 v2[2];
+ v2[0] = (uint16)va_arg(ap, int);
+ v2[1] = (uint16)va_arg(ap, int);
+ _TIFFmemcpy(tv->value, &v2, 4);
+ }
+
+ else if (fip->field_passcount
+ || fip->field_writecount == TIFF_VARIABLE
+ || fip->field_writecount == TIFF_VARIABLE2
+ || fip->field_writecount == TIFF_SPP
+ || tv->count > 1) {
_TIFFmemcpy(tv->value, va_arg(ap, void *),
tv->count * tv_size);
} else {
- /*
- * XXX: The following loop required to handle
- * TIFFTAG_PAGENUMBER, TIFFTAG_HALFTONEHINTS,
- * TIFFTAG_YCBCRSUBSAMPLING and TIFFTAG_DOTRANGE tags.
- * These tags are actually arrays and should be passed as
- * array pointers to TIFFSetField() function, but actually
- * passed as a list of separate values. This behaviour
- * must be changed in the future!
- */
- int i;
char *val = (char *)tv->value;
-
- for (i = 0; i < tv->count; i++, val += tv_size) {
- switch (fip->field_type) {
- case TIFF_BYTE:
- case TIFF_UNDEFINED:
- {
- uint8 v = (uint8)va_arg(ap, int);
- _TIFFmemcpy(val, &v, tv_size);
- }
- break;
- case TIFF_SBYTE:
- {
- int8 v = (int8)va_arg(ap, int);
- _TIFFmemcpy(val, &v, tv_size);
- }
- break;
- case TIFF_SHORT:
- {
- uint16 v = (uint16)va_arg(ap, int);
- _TIFFmemcpy(val, &v, tv_size);
- }
- break;
- case TIFF_SSHORT:
- {
- int16 v = (int16)va_arg(ap, int);
- _TIFFmemcpy(val, &v, tv_size);
- }
- break;
- case TIFF_LONG:
- case TIFF_IFD:
- {
- uint32 v = va_arg(ap, uint32);
- _TIFFmemcpy(val, &v, tv_size);
- }
- break;
- case TIFF_SLONG:
- {
- int32 v = va_arg(ap, int32);
- _TIFFmemcpy(val, &v, tv_size);
- }
- break;
- case TIFF_LONG8:
- case TIFF_IFD8:
- {
- uint64 v = va_arg(ap, uint64);
- _TIFFmemcpy(val, &v, tv_size);
- }
- break;
- case TIFF_SLONG8:
- {
- int64 v = va_arg(ap, int64);
- _TIFFmemcpy(val, &v, tv_size);
- }
- break;
- case TIFF_RATIONAL:
- case TIFF_SRATIONAL:
- case TIFF_FLOAT:
- {
- float v = (float)va_arg(ap, double);
- _TIFFmemcpy(val, &v, tv_size);
- }
- break;
- case TIFF_DOUBLE:
- {
- double v = va_arg(ap, double);
- _TIFFmemcpy(val, &v, tv_size);
- }
- break;
- default:
- _TIFFmemset(val, 0, tv_size);
- status = 0;
- break;
+ assert( tv->count == 1 );
+
+ switch (fip->field_type) {
+ case TIFF_BYTE:
+ case TIFF_UNDEFINED:
+ {
+ uint8 v2 = (uint8)va_arg(ap, int);
+ _TIFFmemcpy(val, &v2, tv_size);
+ }
+ break;
+ case TIFF_SBYTE:
+ {
+ int8 v2 = (int8)va_arg(ap, int);
+ _TIFFmemcpy(val, &v2, tv_size);
+ }
+ break;
+ case TIFF_SHORT:
+ {
+ uint16 v2 = (uint16)va_arg(ap, int);
+ _TIFFmemcpy(val, &v2, tv_size);
+ }
+ break;
+ case TIFF_SSHORT:
+ {
+ int16 v2 = (int16)va_arg(ap, int);
+ _TIFFmemcpy(val, &v2, tv_size);
+ }
+ break;
+ case TIFF_LONG:
+ case TIFF_IFD:
+ {
+ uint32 v2 = va_arg(ap, uint32);
+ _TIFFmemcpy(val, &v2, tv_size);
+ }
+ break;
+ case TIFF_SLONG:
+ {
+ int32 v2 = va_arg(ap, int32);
+ _TIFFmemcpy(val, &v2, tv_size);
+ }
+ break;
+ case TIFF_LONG8:
+ case TIFF_IFD8:
+ {
+ uint64 v2 = va_arg(ap, uint64);
+ _TIFFmemcpy(val, &v2, tv_size);
+ }
+ break;
+ case TIFF_SLONG8:
+ {
+ int64 v2 = va_arg(ap, int64);
+ _TIFFmemcpy(val, &v2, tv_size);
}
+ break;
+ case TIFF_RATIONAL:
+ case TIFF_SRATIONAL:
+ case TIFF_FLOAT:
+ {
+ float v2 = (float)va_arg(ap, double);
+ _TIFFmemcpy(val, &v2, tv_size);
+ }
+ break;
+ case TIFF_DOUBLE:
+ {
+ double v2 = va_arg(ap, double);
+ _TIFFmemcpy(val, &v2, tv_size);
+ }
+ break;
+ default:
+ _TIFFmemset(val, 0, tv_size);
+ status = 0;
+ break;
}
}
}
}
}
if (status) {
- const TIFFField* fip=TIFFFieldWithTag(tif,tag);
- if (fip)
- TIFFSetFieldBit(tif, fip->field_bit);
+ const TIFFField* fip2=TIFFFieldWithTag(tif,tag);
+ if (fip2)
+ TIFFSetFieldBit(tif, fip2->field_bit);
tif->tif_flags |= TIFF_DIRTYDIRECT;
}
@@ -663,24 +707,34 @@ end:
return (status);
badvalue:
{
- const TIFFField* fip=TIFFFieldWithTag(tif,tag);
+ const TIFFField* fip2=TIFFFieldWithTag(tif,tag);
TIFFErrorExt(tif->tif_clientdata, module,
"%s: Bad value %u for \"%s\" tag",
tif->tif_name, v,
- fip ? fip->field_name : "Unknown");
+ fip2 ? fip2->field_name : "Unknown");
va_end(ap);
}
return (0);
badvalue32:
{
- const TIFFField* fip=TIFFFieldWithTag(tif,tag);
+ const TIFFField* fip2=TIFFFieldWithTag(tif,tag);
TIFFErrorExt(tif->tif_clientdata, module,
"%s: Bad value %u for \"%s\" tag",
tif->tif_name, v32,
- fip ? fip->field_name : "Unknown");
+ fip2 ? fip2->field_name : "Unknown");
va_end(ap);
}
return (0);
+badvaluedouble:
+ {
+ const TIFFField* fip2=TIFFFieldWithTag(tif,tag);
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "%s: Bad value %f for \"%s\" tag",
+ tif->tif_name, dblval,
+ fip2 ? fip2->field_name : "Unknown");
+ va_end(ap);
+ }
+ return (0);
}
/*
@@ -795,8 +849,22 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
{
TIFFDirectory* td = &tif->tif_dir;
int ret_val = 1;
+ uint32 standard_tag = tag;
+ const TIFFField* fip = TIFFFindField(tif, tag, TIFF_ANY);
+ if( fip == NULL ) /* cannot happen since TIFFGetField() already checks it */
+ return 0;
+
+ /*
+ * We want to force the custom code to be used for custom
+ * fields even if the tag happens to match a well known
+ * one - important for reinterpreted handling of standard
+ * tag values in custom directories (i.e. EXIF)
+ */
+ if (fip->field_bit == FIELD_CUSTOM) {
+ standard_tag = 0;
+ }
- switch (tag) {
+ switch (standard_tag) {
case TIFFTAG_SUBFILETYPE:
*va_arg(ap, uint32*) = td->td_subfiletype;
break;
@@ -841,7 +909,7 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
*va_arg(ap, double**) = td->td_sminsamplevalue;
else
{
- /* libtiff historially treats this as a single value. */
+ /* libtiff historically treats this as a single value. */
uint16 i;
double v = td->td_sminsamplevalue[0];
for (i=1; i < td->td_samplesperpixel; ++i)
@@ -855,7 +923,7 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
*va_arg(ap, double**) = td->td_smaxsamplevalue;
else
{
- /* libtiff historially treats this as a single value. */
+ /* libtiff historically treats this as a single value. */
uint16 i;
double v = td->td_smaxsamplevalue[0];
for (i=1; i < td->td_samplesperpixel; ++i)
@@ -971,8 +1039,6 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
break;
default:
{
- const TIFFField* fip =
- TIFFFindField(tif, tag, TIFF_ANY);
int i;
/*
@@ -984,14 +1050,14 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
* get a tag that is not valid for the image's
* codec then we'll arrive here.
*/
- if( fip == NULL || fip->field_bit != FIELD_CUSTOM )
+ if( fip->field_bit != FIELD_CUSTOM )
{
TIFFErrorExt(tif->tif_clientdata, "_TIFFVGetField",
"%s: Invalid %stag \"%s\" "
"(not supported by codec)",
tif->tif_name,
isPseudoTag(tag) ? "pseudo-" : "",
- fip ? fip->field_name : "Unknown");
+ fip->field_name);
ret_val = 0;
break;
}
@@ -1013,84 +1079,85 @@ _TIFFVGetField(TIFF* tif, uint32 tag, va_list ap)
*va_arg(ap, uint16*) = (uint16)tv->count;
*va_arg(ap, void **) = tv->value;
ret_val = 1;
+ } else if (fip->field_tag == TIFFTAG_DOTRANGE
+ && strcmp(fip->field_name,"DotRange") == 0) {
+ /* TODO: This is an evil exception and should not have been
+ handled this way ... likely best if we move it into
+ the directory structure with an explicit field in
+ libtiff 4.1 and assign it a FIELD_ value */
+ *va_arg(ap, uint16*) = ((uint16 *)tv->value)[0];
+ *va_arg(ap, uint16*) = ((uint16 *)tv->value)[1];
+ ret_val = 1;
} else {
- if ((fip->field_type == TIFF_ASCII
+ if (fip->field_type == TIFF_ASCII
|| fip->field_readcount == TIFF_VARIABLE
|| fip->field_readcount == TIFF_VARIABLE2
|| fip->field_readcount == TIFF_SPP
- || tv->count > 1)
- && fip->field_tag != TIFFTAG_PAGENUMBER
- && fip->field_tag != TIFFTAG_HALFTONEHINTS
- && fip->field_tag != TIFFTAG_YCBCRSUBSAMPLING
- && fip->field_tag != TIFFTAG_DOTRANGE) {
+ || tv->count > 1) {
*va_arg(ap, void **) = tv->value;
ret_val = 1;
} else {
- int j;
char *val = (char *)tv->value;
-
- for (j = 0; j < tv->count;
- j++, val += _TIFFDataSize(tv->info->field_type)) {
- switch (fip->field_type) {
- case TIFF_BYTE:
- case TIFF_UNDEFINED:
- *va_arg(ap, uint8*) =
- *(uint8 *)val;
- ret_val = 1;
- break;
- case TIFF_SBYTE:
- *va_arg(ap, int8*) =
- *(int8 *)val;
- ret_val = 1;
- break;
- case TIFF_SHORT:
- *va_arg(ap, uint16*) =
- *(uint16 *)val;
- ret_val = 1;
- break;
- case TIFF_SSHORT:
- *va_arg(ap, int16*) =
- *(int16 *)val;
- ret_val = 1;
- break;
- case TIFF_LONG:
- case TIFF_IFD:
- *va_arg(ap, uint32*) =
- *(uint32 *)val;
- ret_val = 1;
- break;
- case TIFF_SLONG:
- *va_arg(ap, int32*) =
- *(int32 *)val;
- ret_val = 1;
- break;
- case TIFF_LONG8:
- case TIFF_IFD8:
- *va_arg(ap, uint64*) =
- *(uint64 *)val;
- ret_val = 1;
- break;
- case TIFF_SLONG8:
- *va_arg(ap, int64*) =
- *(int64 *)val;
- ret_val = 1;
- break;
- case TIFF_RATIONAL:
- case TIFF_SRATIONAL:
- case TIFF_FLOAT:
- *va_arg(ap, float*) =
- *(float *)val;
- ret_val = 1;
- break;
- case TIFF_DOUBLE:
- *va_arg(ap, double*) =
- *(double *)val;
- ret_val = 1;
- break;
- default:
- ret_val = 0;
- break;
- }
+ assert( tv->count == 1 );
+ switch (fip->field_type) {
+ case TIFF_BYTE:
+ case TIFF_UNDEFINED:
+ *va_arg(ap, uint8*) =
+ *(uint8 *)val;
+ ret_val = 1;
+ break;
+ case TIFF_SBYTE:
+ *va_arg(ap, int8*) =
+ *(int8 *)val;
+ ret_val = 1;
+ break;
+ case TIFF_SHORT:
+ *va_arg(ap, uint16*) =
+ *(uint16 *)val;
+ ret_val = 1;
+ break;
+ case TIFF_SSHORT:
+ *va_arg(ap, int16*) =
+ *(int16 *)val;
+ ret_val = 1;
+ break;
+ case TIFF_LONG:
+ case TIFF_IFD:
+ *va_arg(ap, uint32*) =
+ *(uint32 *)val;
+ ret_val = 1;
+ break;
+ case TIFF_SLONG:
+ *va_arg(ap, int32*) =
+ *(int32 *)val;
+ ret_val = 1;
+ break;
+ case TIFF_LONG8:
+ case TIFF_IFD8:
+ *va_arg(ap, uint64*) =
+ *(uint64 *)val;
+ ret_val = 1;
+ break;
+ case TIFF_SLONG8:
+ *va_arg(ap, int64*) =
+ *(int64 *)val;
+ ret_val = 1;
+ break;
+ case TIFF_RATIONAL:
+ case TIFF_SRATIONAL:
+ case TIFF_FLOAT:
+ *va_arg(ap, float*) =
+ *(float *)val;
+ ret_val = 1;
+ break;
+ case TIFF_DOUBLE:
+ *va_arg(ap, double*) =
+ *(double *)val;
+ ret_val = 1;
+ break;
+ default:
+ ret_val = 0;
+ break;
}
}
}
@@ -1214,6 +1281,35 @@ TIFFCreateDirectory(TIFF* tif)
return 0;
}
+int
+TIFFCreateCustomDirectory(TIFF* tif, const TIFFFieldArray* infoarray)
+{
+ TIFFDefaultDirectory(tif);
+
+ /*
+ * Reset the field definitions to match the application provided list.
+ * Hopefully TIFFDefaultDirectory() won't have done anything irreversable
+ * based on it's assumption this is an image directory.
+ */
+ _TIFFSetupFields(tif, infoarray);
+
+ tif->tif_diroff = 0;
+ tif->tif_nextdiroff = 0;
+ tif->tif_curoff = 0;
+ tif->tif_row = (uint32) -1;
+ tif->tif_curstrip = (uint32) -1;
+
+ return 0;
+}
+
+int
+TIFFCreateEXIFDirectory(TIFF* tif)
+{
+ const TIFFFieldArray* exifFieldArray;
+ exifFieldArray = _TIFFGetExifFields();
+ return TIFFCreateCustomDirectory(tif, exifFieldArray);
+}
+
/*
* Setup a default directory structure.
*/
@@ -1250,8 +1346,20 @@ TIFFDefaultDirectory(TIFF* tif)
tif->tif_tagmethods.printdir = NULL;
/*
* Give client code a chance to install their own
- * tag extensions & methods, prior to compression overloads.
+ * tag extensions & methods, prior to compression overloads,
+ * but do some prior cleanup first. (http://trac.osgeo.org/gdal/ticket/5054)
*/
+ if (tif->tif_nfieldscompat > 0) {
+ uint32 i;
+
+ for (i = 0; i < tif->tif_nfieldscompat; i++) {
+ if (tif->tif_fieldscompat[i].allocated_size)
+ _TIFFfree(tif->tif_fieldscompat[i].fields);
+ }
+ _TIFFfree(tif->tif_fieldscompat);
+ tif->tif_nfieldscompat = 0;
+ tif->tif_fieldscompat = NULL;
+ }
if (_TIFFextender)
(*_TIFFextender)(tif);
(void) TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
@@ -1292,6 +1400,7 @@ TIFFAdvanceDirectory(TIFF* tif, uint64* nextdir, uint64* off)
if (((uint64)poffa!=poff)||(poffb<poffa)||(poffb<(tmsize_t)sizeof(uint16))||(poffb>tif->tif_size))
{
TIFFErrorExt(tif->tif_clientdata,module,"Error fetching directory count");
+ *nextdir=0;
return(0);
}
_TIFFmemcpy(&dircount,tif->tif_base+poffa,sizeof(uint16));
@@ -1401,7 +1510,8 @@ TIFFAdvanceDirectory(TIFF* tif, uint64* nextdir, uint64* off)
(void) TIFFSeekFile(tif,
dircount16*20, SEEK_CUR);
if (!ReadOK(tif, nextdir, sizeof (uint64))) {
- TIFFErrorExt(tif->tif_clientdata, module, "%s: Error fetching directory link",
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "%s: Error fetching directory link",
tif->tif_name);
return (0);
}
@@ -1418,6 +1528,7 @@ TIFFAdvanceDirectory(TIFF* tif, uint64* nextdir, uint64* off)
uint16
TIFFNumberOfDirectories(TIFF* tif)
{
+ static const char module[] = "TIFFNumberOfDirectories";
uint64 nextdir;
uint16 n;
if (!(tif->tif_flags&TIFF_BIGTIFF))
@@ -1426,7 +1537,18 @@ TIFFNumberOfDirectories(TIFF* tif)
nextdir = tif->tif_header.big.tiff_diroff;
n = 0;
while (nextdir != 0 && TIFFAdvanceDirectory(tif, &nextdir, NULL))
- n++;
+ {
+ if (n != 65535) {
+ ++n;
+ }
+ else
+ {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Directory count exceeded 65535 limit,"
+ " giving up on counting.");
+ return (65535);
+ }
+ }
return (n);
}
diff --git a/tiff/libtiff/tif_dirinfo.c b/tiff/libtiff/tif_dirinfo.c
index 06b5a5a00..23ad00205 100644
--- a/tiff/libtiff/tif_dirinfo.c
+++ b/tiff/libtiff/tif_dirinfo.c
@@ -1,4 +1,4 @@
-/* $Id: tif_dirinfo.c,v 1.114 2011-05-17 00:21:17 fwarmerdam Exp $ */
+/* $Id: tif_dirinfo.c,v 1.126 2016-11-18 02:52:13 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -37,15 +37,23 @@
*
* NOTE: The second field (field_readcount) and third field (field_writecount)
* sometimes use the values TIFF_VARIABLE (-1), TIFF_VARIABLE2 (-3)
- * and TIFFTAG_SPP (-2). The macros should be used but would throw off
- * the formatting of the code, so please interprete the -1, -2 and -3
+ * and TIFF_SPP (-2). The macros should be used but would throw off
+ * the formatting of the code, so please interpret the -1, -2 and -3
* values accordingly.
*/
-static TIFFFieldArray tiffFieldArray;
-static TIFFFieldArray exifFieldArray;
-
-static TIFFField
+/* const object should be initialized */
+#ifdef _MSC_VER
+#pragma warning( push )
+#pragma warning( disable : 4132 )
+#endif
+static const TIFFFieldArray tiffFieldArray;
+static const TIFFFieldArray exifFieldArray;
+#ifdef _MSC_VER
+#pragma warning( pop )
+#endif
+
+static const TIFFField
tiffFields[] = {
{ TIFFTAG_SUBFILETYPE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_SUBFILETYPE, 1, 0, "SubfileType", NULL },
{ TIFFTAG_OSUBFILETYPE, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_SUBFILETYPE, 1, 0, "OldSubfileType", NULL },
@@ -95,7 +103,7 @@ tiffFields[] = {
{ TIFFTAG_TILELENGTH, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_TILEDIMENSIONS, 0, 0, "TileLength", NULL },
{ TIFFTAG_TILEOFFSETS, -1, 1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPOFFSETS, 0, 0, "TileOffsets", NULL },
{ TIFFTAG_TILEBYTECOUNTS, -1, 1, TIFF_LONG8, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_STRIPBYTECOUNTS, 0, 0, "TileByteCounts", NULL },
- { TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, TIFF_SETGET_UNDEFINED, FIELD_SUBIFD, 1, 1, "SubIFD", &tiffFieldArray },
+ { TIFFTAG_SUBIFD, -1, -1, TIFF_IFD8, 0, TIFF_SETGET_C16_IFD8, TIFF_SETGET_UNDEFINED, FIELD_SUBIFD, 1, 1, "SubIFD", (TIFFFieldArray*) &tiffFieldArray },
{ TIFFTAG_INKSET, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "InkSet", NULL },
{ TIFFTAG_INKNAMES, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_C16_ASCII, TIFF_SETGET_UNDEFINED, FIELD_INKNAMES, 1, 1, "InkNames", NULL },
{ TIFFTAG_NUMBEROFINKS, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "NumberOfInks", NULL },
@@ -128,11 +136,13 @@ tiffFields[] = {
{ TIFFTAG_PIXAR_FOVCOT, 1, 1, TIFF_FLOAT, 0, TIFF_SETGET_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FieldOfViewCotangent", NULL },
{ TIFFTAG_PIXAR_MATRIX_WORLDTOSCREEN, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MatrixWorldToScreen", NULL },
{ TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA, 16, 16, TIFF_FLOAT, 0, TIFF_SETGET_C0_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "MatrixWorldToCamera", NULL },
+ { TIFFTAG_CFAREPEATPATTERNDIM, 2, 2, TIFF_SHORT, 0, TIFF_SETGET_C0_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CFARepeatPatternDim", NULL },
+ { TIFFTAG_CFAPATTERN, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CFAPattern" , NULL},
{ TIFFTAG_COPYRIGHT, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Copyright", NULL },
/* end Pixar tags */
{ TIFFTAG_RICHTIFFIPTC, -3, -3, TIFF_LONG, 0, TIFF_SETGET_C32_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "RichTIFFIPTC", NULL },
{ TIFFTAG_PHOTOSHOP, -3, -3, TIFF_BYTE, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "Photoshop", NULL },
- { TIFFTAG_EXIFIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "EXIFIFDOffset", &exifFieldArray },
+ { TIFFTAG_EXIFIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "EXIFIFDOffset", (TIFFFieldArray*) &exifFieldArray },
{ TIFFTAG_ICCPROFILE, -3, -3, TIFF_UNDEFINED, 0, TIFF_SETGET_C32_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ICC Profile", NULL },
{ TIFFTAG_GPSIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "GPSIFDOffset", NULL },
{ TIFFTAG_FAXRECVPARAMS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UINT32, FIELD_CUSTOM, TRUE, FALSE, "FaxRecvParams", NULL },
@@ -190,12 +200,26 @@ tiffFields[] = {
{ TIFFTAG_ASSHOTPREPROFILEMATRIX, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "AsShotPreProfileMatrix", NULL },
{ TIFFTAG_CURRENTICCPROFILE, -1, -1, TIFF_UNDEFINED, 0, TIFF_SETGET_C16_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "CurrentICCProfile", NULL },
{ TIFFTAG_CURRENTPREPROFILEMATRIX, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "CurrentPreProfileMatrix", NULL },
+ { TIFFTAG_PERSAMPLE, 0, 0, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "PerSample", NULL},
/* end DNG tags */
+ /* begin TIFF/FX tags */
+ { TIFFTAG_INDEXED, 1, 1, TIFF_SHORT, 0, TIFF_SETGET_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "Indexed", NULL },
+ { TIFFTAG_GLOBALPARAMETERSIFD, 1, 1, TIFF_IFD8, 0, TIFF_SETGET_IFD8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "GlobalParametersIFD", NULL },
+ { TIFFTAG_PROFILETYPE, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ProfileType", NULL },
+ { TIFFTAG_FAXPROFILE, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "FaxProfile", NULL },
+ { TIFFTAG_CODINGMETHODS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "CodingMethods", NULL },
+ { TIFFTAG_VERSIONYEAR, 4, 4, TIFF_BYTE, 0, TIFF_SETGET_C0_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "VersionYear", NULL },
+ { TIFFTAG_MODENUMBER, 1, 1, TIFF_BYTE, 0, TIFF_SETGET_UINT8, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ModeNumber", NULL },
+ { TIFFTAG_DECODE, -1, -1, TIFF_SRATIONAL, 0, TIFF_SETGET_C16_FLOAT, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "Decode", NULL },
+ { TIFFTAG_IMAGEBASECOLOR, -1, -1, TIFF_SHORT, 0, TIFF_SETGET_C16_UINT16, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "ImageBaseColor", NULL },
+ { TIFFTAG_T82OPTIONS, 1, 1, TIFF_LONG, 0, TIFF_SETGET_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "T82Options", NULL },
+ { TIFFTAG_STRIPROWCOUNTS, -1, -1, TIFF_LONG, 0, TIFF_SETGET_C16_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 1, "StripRowCounts", NULL },
+ { TIFFTAG_IMAGELAYER, 2, 2, TIFF_LONG, 0, TIFF_SETGET_C0_UINT32, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 0, 0, "ImageLayer", NULL },
+ /* end TIFF/FX tags */
/* begin pseudo tags */
- { TIFFTAG_PERSAMPLE, 0, 0, TIFF_SHORT, 0, TIFF_SETGET_UNDEFINED, TIFF_SETGET_UNDEFINED, FIELD_PSEUDO, TRUE, FALSE, "PerSample", NULL},
};
-static TIFFField
+static const TIFFField
exifFields[] = {
{ EXIFTAG_EXPOSURETIME, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ExposureTime", NULL },
{ EXIFTAG_FNUMBER, 1, 1, TIFF_RATIONAL, 0, TIFF_SETGET_DOUBLE, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "FNumber", NULL },
@@ -255,13 +279,13 @@ exifFields[] = {
{ EXIFTAG_IMAGEUNIQUEID, 33, 33, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "ImageUniqueID", NULL }
};
-static TIFFFieldArray
-tiffFieldArray = { tfiatImage, 0, TIFFArrayCount(tiffFields), tiffFields };
-static TIFFFieldArray
-exifFieldArray = { tfiatExif, 0, TIFFArrayCount(exifFields), exifFields };
+static const TIFFFieldArray
+tiffFieldArray = { tfiatImage, 0, TIFFArrayCount(tiffFields), (TIFFField*) tiffFields };
+static const TIFFFieldArray
+exifFieldArray = { tfiatExif, 0, TIFFArrayCount(exifFields), (TIFFField*) exifFields };
/*
- * We have our own local lfind() equivelent to avoid subtle differences
+ * We have our own local lfind() equivalent to avoid subtle differences
* in types passed to lfind() on different systems.
*/
@@ -348,7 +372,7 @@ _TIFFMergeFields(TIFF* tif, const TIFFField info[], uint32 n)
{
static const char module[] = "_TIFFMergeFields";
static const char reason[] = "for fields array";
- TIFFField** tp;
+ /* TIFFField** tp; */
uint32 i;
tif->tif_foundfield = NULL;
@@ -369,7 +393,7 @@ _TIFFMergeFields(TIFF* tif, const TIFFField info[], uint32 n)
return 0;
}
- tp = tif->tif_fields + tif->tif_nfields;
+ /* tp = tif->tif_fields + tif->tif_nfields; */
for (i = 0; i < n; i++) {
const TIFFField *fip =
TIFFFindField(tif, info[i].field_tag, TIFF_ANY);
@@ -505,7 +529,7 @@ TIFFFindField(TIFF* tif, uint32 tag, TIFFDataType dt)
return tif->tif_foundfield = (ret ? *ret : NULL);
}
-const TIFFField*
+static const TIFFField*
_TIFFFindFieldByName(TIFF* tif, const char *field_name, TIFFDataType dt)
{
TIFFField key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0, 0, 0, NULL, NULL};
@@ -556,6 +580,42 @@ TIFFFieldWithName(TIFF* tif, const char *field_name)
return (fip);
}
+uint32
+TIFFFieldTag(const TIFFField* fip)
+{
+ return fip->field_tag;
+}
+
+const char *
+TIFFFieldName(const TIFFField* fip)
+{
+ return fip->field_name;
+}
+
+TIFFDataType
+TIFFFieldDataType(const TIFFField* fip)
+{
+ return fip->field_type;
+}
+
+int
+TIFFFieldPassCount(const TIFFField* fip)
+{
+ return fip->field_passcount;
+}
+
+int
+TIFFFieldReadCount(const TIFFField* fip)
+{
+ return fip->field_readcount;
+}
+
+int
+TIFFFieldWriteCount(const TIFFField* fip)
+{
+ return fip->field_writecount;
+}
+
const TIFFField*
_TIFFFindOrRegisterField(TIFF *tif, uint32 tag, TIFFDataType dt)
@@ -661,7 +721,7 @@ _TIFFCreateAnonField(TIFF *tif, uint32 tag, TIFFDataType field_type)
* note that this name is a special sign to TIFFClose() and
* _TIFFSetupFields() to free the field
*/
- sprintf(fld->field_name, "Tag %d", (int) tag);
+ (void) snprintf(fld->field_name, 32, "Tag %d", (int) tag);
return fld;
}
diff --git a/tiff/libtiff/tif_dirread.c b/tiff/libtiff/tif_dirread.c
index c242d8fa5..01070f2ec 100644
--- a/tiff/libtiff/tif_dirread.c
+++ b/tiff/libtiff/tif_dirread.c
@@ -1,4 +1,4 @@
-/* $Id: tif_dirread.c,v 1.174 2012-02-01 02:24:47 fwarmerdam Exp $ */
+/* $Id: tif_dirread.c,v 1.204 2016-11-16 15:14:15 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -166,6 +166,8 @@ static int TIFFFetchSubjectDistance(TIFF*, TIFFDirEntry*);
static void ChopUpSingleUncompressedStrip(TIFF*);
static uint64 TIFFReadUInt64(const uint8 *value);
+static int _TIFFFillStrilesInternal( TIFF *tif, int loadStripByteCount );
+
typedef union _UInt64Aligned_t
{
double d;
@@ -2172,11 +2174,6 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntrySlong8Array(TIFF* tif, TIFFDirEn
break;
}
_TIFFfree(origdata);
- if (err!=TIFFReadDirEntryErrOk)
- {
- _TIFFfree(data);
- return(err);
- }
*value=data;
return(TIFFReadDirEntryErrOk);
}
@@ -2414,11 +2411,6 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryFloatArray(TIFF* tif, TIFFDirEnt
break;
}
_TIFFfree(origdata);
- if (err!=TIFFReadDirEntryErrOk)
- {
- _TIFFfree(data);
- return(err);
- }
*value=data;
return(TIFFReadDirEntryErrOk);
}
@@ -2657,11 +2649,6 @@ TIFFReadDirEntryDoubleArray(TIFF* tif, TIFFDirEntry* direntry, double** value)
break;
}
_TIFFfree(origdata);
- if (err!=TIFFReadDirEntryErrOk)
- {
- _TIFFfree(data);
- return(err);
- }
*value=data;
return(TIFFReadDirEntryErrOk);
}
@@ -2723,11 +2710,6 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryIfd8Array(TIFF* tif, TIFFDirEntr
break;
}
_TIFFfree(origdata);
- if (err!=TIFFReadDirEntryErrOk)
- {
- _TIFFfree(data);
- return(err);
- }
*value=data;
return(TIFFReadDirEntryErrOk);
}
@@ -3194,11 +3176,7 @@ static enum TIFFReadDirEntryErr TIFFReadDirEntryCheckRangeLongSlong(int32 value)
/*
* Largest 32-bit unsigned integer value.
*/
-#if defined(__WIN32__) && defined(_MSC_VER)
-# define TIFF_UINT32_MAX 0xFFFFFFFFI64
-#else
-# define TIFF_UINT32_MAX 0xFFFFFFFFLL
-#endif
+#define TIFF_UINT32_MAX 0xFFFFFFFFU
static enum TIFFReadDirEntryErr
TIFFReadDirEntryCheckRangeLongLong8(uint64 value)
@@ -3212,7 +3190,7 @@ TIFFReadDirEntryCheckRangeLongLong8(uint64 value)
static enum TIFFReadDirEntryErr
TIFFReadDirEntryCheckRangeLongSlong8(int64 value)
{
- if ((value<0) || (value > TIFF_UINT32_MAX))
+ if ((value < 0) || (value > (int64) TIFF_UINT32_MAX))
return(TIFFReadDirEntryErrRange);
else
return(TIFFReadDirEntryErrOk);
@@ -3229,19 +3207,21 @@ TIFFReadDirEntryCheckRangeSlongLong(uint32 value)
return(TIFFReadDirEntryErrOk);
}
+/* Check that the 8-byte unsigned value can fit in a 4-byte unsigned range */
static enum TIFFReadDirEntryErr
TIFFReadDirEntryCheckRangeSlongLong8(uint64 value)
{
- if (value > 0x7FFFFFFFUL)
+ if (value > 0x7FFFFFFF)
return(TIFFReadDirEntryErrRange);
else
return(TIFFReadDirEntryErrOk);
}
+/* Check that the 8-byte signed value can fit in a 4-byte signed range */
static enum TIFFReadDirEntryErr
TIFFReadDirEntryCheckRangeSlongSlong8(int64 value)
{
- if ((value < 0L-0x80000000L) || (value > 0x7FFFFFFFL))
+ if ((value < 0-((int64) 0x7FFFFFFF+1)) || (value > 0x7FFFFFFF))
return(TIFFReadDirEntryErrRange);
else
return(TIFFReadDirEntryErrOk);
@@ -3286,11 +3266,7 @@ TIFFReadDirEntryCheckRangeLong8Slong8(int64 value)
/*
* Largest 64-bit signed integer value.
*/
-#if defined(__WIN32__) && defined(_MSC_VER)
-# define TIFF_INT64_MAX 0x7FFFFFFFFFFFFFFFI64
-#else
-# define TIFF_INT64_MAX 0x7FFFFFFFFFFFFFFFLL
-#endif
+#define TIFF_INT64_MAX ((int64)(((uint64) ~0) >> 1))
static enum TIFFReadDirEntryErr
TIFFReadDirEntryCheckRangeSlong8Long8(uint64 value)
@@ -3313,10 +3289,15 @@ TIFFReadDirEntryData(TIFF* tif, uint64 offset, tmsize_t size, void* dest)
if (!ReadOK(tif,dest,size))
return(TIFFReadDirEntryErrIo);
} else {
- tmsize_t ma,mb;
- ma=(tmsize_t)offset;
+ size_t ma,mb;
+ ma=(size_t)offset;
mb=ma+size;
- if (((uint64)ma!=offset)||(mb<ma)||(mb<size)||(mb>tif->tif_size))
+ if (((uint64)ma!=offset)
+ || (mb < ma)
+ || (mb - ma != (size_t) size)
+ || (mb < (size_t)size)
+ || (mb > (size_t)tif->tif_size)
+ )
return(TIFFReadDirEntryErrIo);
_TIFFmemcpy(dest,tif->tif_base+ma,size);
}
@@ -3369,7 +3350,7 @@ static void TIFFReadDirEntryOutputErr(TIFF* tif, enum TIFFReadDirEntryErr err, c
} else {
switch (err) {
case TIFFReadDirEntryErrCount:
- TIFFErrorExt(tif->tif_clientdata, module,
+ TIFFWarningExt(tif->tif_clientdata, module,
"Incorrect count for \"%s\"; tag ignored",
tagname);
break;
@@ -3425,6 +3406,8 @@ TIFFReadDirectory(TIFF* tif)
const TIFFField* fip;
uint32 fii=FAILED_FII;
toff_t nextdiroff;
+ int bitspersample_read = FALSE;
+
tif->tif_diroff=tif->tif_nextdiroff;
if (!TIFFCheckDirOffset(tif,tif->tif_nextdiroff))
return 0; /* last offset or bad offset (IFD looping) */
@@ -3476,12 +3459,12 @@ TIFFReadDirectory(TIFF* tif)
* the fields to check type and tag information,
* and to extract info required to size data
* structures. A second pass is made afterwards
- * to read in everthing not taken in the first pass.
+ * to read in everything not taken in the first pass.
* But we must process the Compression tag first
* in order to merge in codec-private tag definitions (otherwise
* we may get complaints about unknown tags). However, the
* Compression tag may be dependent on the SamplesPerPixel
- * tag value because older TIFF specs permited Compression
+ * tag value because older TIFF specs permitted Compression
* to be written as a SamplesPerPixel-count tag entry.
* Thus if we don't first figure out the correct SamplesPerPixel
* tag value then we may end up ignoring the Compression tag
@@ -3645,6 +3628,7 @@ TIFFReadDirectory(TIFF* tif)
if (tif->tif_dir.td_planarconfig == PLANARCONFIG_SEPARATE)
tif->tif_dir.td_stripsperimage /= tif->tif_dir.td_samplesperpixel;
if (!TIFFFieldSet(tif, FIELD_STRIPOFFSETS)) {
+#ifdef OJPEG_SUPPORT
if ((tif->tif_dir.td_compression==COMPRESSION_OJPEG) &&
(isTiled(tif)==0) &&
(tif->tif_dir.td_nstrips==1)) {
@@ -3657,7 +3641,9 @@ TIFFReadDirectory(TIFF* tif)
* JpegInterchangeFormat stream.
*/
TIFFSetFieldBit(tif, FIELD_STRIPOFFSETS);
- } else {
+ } else
+#endif
+ {
MissingRequired(tif,
isTiled(tif) ? "TileOffsets" : "StripOffsets");
goto bad;
@@ -3682,7 +3668,7 @@ TIFFReadDirectory(TIFF* tif)
* DataType and SampleFormat tags are supposed to be
* written as one value/sample, but some vendors
* incorrectly write one value only -- so we accept
- * that as well (yech). Other vendors write correct
+ * that as well (yuck). Other vendors write correct
* value for NumberOfSamples, but incorrect one for
* BitsPerSample and friends, and we will read this
* too.
@@ -3701,13 +3687,15 @@ TIFFReadDirectory(TIFF* tif)
}
if (!TIFFSetField(tif,dp->tdir_tag,value))
goto bad;
+ if( dp->tdir_tag == TIFFTAG_BITSPERSAMPLE )
+ bitspersample_read = TRUE;
}
break;
case TIFFTAG_SMINSAMPLEVALUE:
case TIFFTAG_SMAXSAMPLEVALUE:
{
- double *data;
+ double *data = NULL;
enum TIFFReadDirEntryErr err;
uint32 saved_flags;
int m;
@@ -3758,7 +3746,32 @@ TIFFReadDirectory(TIFF* tif)
uint32 countrequired;
uint32 incrementpersample;
uint16* value=NULL;
- countpersample=(1L<<tif->tif_dir.td_bitspersample);
+ /* It would be dangerous to instantiate those tag values */
+ /* since if td_bitspersample has not yet been read (due to */
+ /* unordered tags), it could be read afterwards with a */
+ /* values greater than the default one (1), which may cause */
+ /* crashes in user code */
+ if( !bitspersample_read )
+ {
+ fip = TIFFFieldWithTag(tif,dp->tdir_tag);
+ TIFFWarningExt(tif->tif_clientdata,module,
+ "Ignoring %s since BitsPerSample tag not found",
+ fip ? fip->field_name : "unknown tagname");
+ continue;
+ }
+ /* ColorMap or TransferFunction for high bit */
+ /* depths do not make much sense and could be */
+ /* used as a denial of service vector */
+ if (tif->tif_dir.td_bitspersample > 24)
+ {
+ fip = TIFFFieldWithTag(tif,dp->tdir_tag);
+ TIFFWarningExt(tif->tif_clientdata,module,
+ "Ignoring %s because BitsPerSample=%d>24",
+ fip ? fip->field_name : "unknown tagname",
+ tif->tif_dir.td_bitspersample);
+ continue;
+ }
+ countpersample=(1U<<tif->tif_dir.td_bitspersample);
if ((dp->tdir_tag==TIFFTAG_TRANSFERFUNCTION)&&(dp->tdir_count==(uint64)countpersample))
{
countrequired=countpersample;
@@ -4146,7 +4159,7 @@ TIFFReadDirectoryFindFieldInfo(TIFF* tif, uint16 tagid, uint32* fii)
}
/*
- * Read custom directory from the arbitarry offset.
+ * Read custom directory from the arbitrary offset.
* The code is very similar to TIFFReadDirectory().
*/
int
@@ -4273,7 +4286,9 @@ EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount)
TIFFDirectory *td = &tif->tif_dir;
uint32 strip;
- _TIFFFillStriles( tif );
+ /* Do not try to load stripbytecount as we will compute it */
+ if( !_TIFFFillStrilesInternal( tif, 0 ) )
+ return -1;
if (td->td_stripbytecount)
_TIFFfree(td->td_stripbytecount);
@@ -4295,7 +4310,7 @@ EstimateStripByteCounts(TIFF* tif, TIFFDirEntry* dir, uint16 dircount)
/* calculate amount of space used by indirect values */
for (dp = dir, n = dircount; n > 0; n--, dp++)
{
- uint32 typewidth = TIFFDataWidth((TIFFDataType) dp->tdir_type);
+ uint32 typewidth;
uint64 datasize;
typewidth = TIFFDataWidth((TIFFDataType) dp->tdir_type);
if (typewidth == 0) {
@@ -4372,6 +4387,11 @@ TIFFCheckDirOffset(TIFF* tif, uint64 diroff)
if (diroff == 0) /* no more directories */
return 0;
+ if (tif->tif_dirnumber == 65535) {
+ TIFFErrorExt(tif->tif_clientdata, "TIFFCheckDirOffset",
+ "Cannot handle more than 65535 TIFF directories");
+ return 0;
+ }
for (n = 0; n < tif->tif_dirnumber && tif->tif_dirlist; n++) {
if (tif->tif_dirlist[n] == diroff)
@@ -4380,7 +4400,7 @@ TIFFCheckDirOffset(TIFF* tif, uint64 diroff)
tif->tif_dirnumber++;
- if (tif->tif_dirnumber > tif->tif_dirlistsize) {
+ if (tif->tif_dirlist == NULL || tif->tif_dirnumber > tif->tif_dirlistsize) {
uint64* new_dirlist;
/*
@@ -4391,7 +4411,10 @@ TIFFCheckDirOffset(TIFF* tif, uint64 diroff)
tif->tif_dirnumber, 2 * sizeof(uint64), "for IFD list");
if (!new_dirlist)
return 0;
- tif->tif_dirlistsize = 2 * tif->tif_dirnumber;
+ if( tif->tif_dirnumber >= 32768 )
+ tif->tif_dirlistsize = 65535;
+ else
+ tif->tif_dirlistsize = 2 * tif->tif_dirnumber;
tif->tif_dirlist = new_dirlist;
}
@@ -4567,7 +4590,6 @@ TIFFFetchDirectory(TIFF* tif, uint64 diroff, TIFFDirEntry** pdir,
}
else
{
- tmsize_t m;
uint64 dircount64;
m=off+sizeof(uint64);
if ((m<off)||(m<(tmsize_t)sizeof(uint64))||(m>tif->tif_size)) {
@@ -4703,6 +4725,7 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover)
return 0;
}
fip=tif->tif_fields[fii];
+ assert(fip != NULL); /* should not happen */
assert(fip->set_field_type!=TIFF_SETGET_OTHER); /* if so, we shouldn't arrive here but deal with this in specialized code */
assert(fip->set_field_type!=TIFF_SETGET_INT); /* if so, we shouldn't arrive here as this is only the case for pseudo-tags */
err=TIFFReadDirEntryErrOk;
@@ -4761,7 +4784,7 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover)
break;
case TIFF_SETGET_UINT8:
{
- uint8 data;
+ uint8 data=0;
assert(fip->field_readcount==1);
assert(fip->field_passcount==0);
err=TIFFReadDirEntryByte(tif,dp,&data);
@@ -4855,8 +4878,12 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover)
uint16* data;
assert(fip->field_readcount==2);
assert(fip->field_passcount==0);
- if (dp->tdir_count!=2)
+ if (dp->tdir_count!=2) {
+ TIFFWarningExt(tif->tif_clientdata,module,
+ "incorrect count for field \"%s\", expected 2, got %d",
+ fip->field_name,(int)dp->tdir_count);
return(0);
+ }
err=TIFFReadDirEntryShortArray(tif,dp,&data);
if (err==TIFFReadDirEntryErrOk)
{
@@ -4873,8 +4900,12 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover)
uint8* data;
assert(fip->field_readcount>=1);
assert(fip->field_passcount==0);
- if (dp->tdir_count!=(uint64)fip->field_readcount)
- /* corrupt file */;
+ if (dp->tdir_count!=(uint64)fip->field_readcount) {
+ TIFFWarningExt(tif->tif_clientdata,module,
+ "incorrect count for field \"%s\", expected %d, got %d",
+ fip->field_name,(int) fip->field_readcount, (int)dp->tdir_count);
+ return 0;
+ }
else
{
err=TIFFReadDirEntryByteArray(tif,dp,&data);
@@ -4969,6 +5000,11 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover)
if (err==TIFFReadDirEntryErrOk)
{
int m;
+ if( dp->tdir_count > 0 && data[dp->tdir_count-1] != '\0' )
+ {
+ TIFFWarningExt(tif->tif_clientdata,module,"ASCII value for tag \"%s\" does not end in null byte. Forcing it to be null",fip->field_name);
+ data[dp->tdir_count-1] = '\0';
+ }
m=TIFFSetField(tif,dp->tdir_tag,(uint16)(dp->tdir_count),data);
if (data!=0)
_TIFFfree(data);
@@ -5141,6 +5177,11 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover)
if (err==TIFFReadDirEntryErrOk)
{
int m;
+ if( dp->tdir_count > 0 && data[dp->tdir_count-1] != '\0' )
+ {
+ TIFFWarningExt(tif->tif_clientdata,module,"ASCII value for tag \"%s\" does not end in null byte. Forcing it to be null",fip->field_name);
+ data[dp->tdir_count-1] = '\0';
+ }
m=TIFFSetField(tif,dp->tdir_tag,(uint32)(dp->tdir_count),data);
if (data!=0)
_TIFFfree(data);
@@ -5342,7 +5383,7 @@ TIFFFetchNormalTag(TIFF* tif, TIFFDirEntry* dp, int recover)
}
if (err!=TIFFReadDirEntryErrOk)
{
- TIFFReadDirEntryOutputErr(tif,err,module,fip ? fip->field_name : "unknown tagname",recover);
+ TIFFReadDirEntryOutputErr(tif,err,module,fip->field_name,recover);
return(0);
}
return(1);
@@ -5544,6 +5585,11 @@ ChopUpSingleUncompressedStrip(TIFF* tif)
int _TIFFFillStriles( TIFF *tif )
{
+ return _TIFFFillStrilesInternal( tif, 1 );
+}
+
+static int _TIFFFillStrilesInternal( TIFF *tif, int loadStripByteCount )
+{
#if defined(DEFER_STRILE_LOAD)
register TIFFDirectory *td = &tif->tif_dir;
int return_value = 1;
@@ -5560,7 +5606,8 @@ int _TIFFFillStriles( TIFF *tif )
return_value = 0;
}
- if (!TIFFFetchStripThing(tif,&(td->td_stripbytecount_entry),
+ if (loadStripByteCount &&
+ !TIFFFetchStripThing(tif,&(td->td_stripbytecount_entry),
td->td_nstrips,&td->td_stripbytecount))
{
return_value = 0;
@@ -5585,6 +5632,7 @@ int _TIFFFillStriles( TIFF *tif )
return return_value;
#else /* !defined(DEFER_STRILE_LOAD) */
(void) tif;
+ (void) loadStripByteCount;
return 1;
#endif
}
diff --git a/tiff/libtiff/tif_dirwrite.c b/tiff/libtiff/tif_dirwrite.c
index 11738cfe7..d34f6f611 100644
--- a/tiff/libtiff/tif_dirwrite.c
+++ b/tiff/libtiff/tif_dirwrite.c
@@ -1,4 +1,4 @@
-/* $Id: tif_dirwrite.c,v 1.76 2011-02-18 20:53:04 fwarmerdam Exp $ */
+/* $Id: tif_dirwrite.c,v 1.83 2016-10-25 21:35:15 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -542,8 +542,20 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
{
if (!isTiled(tif))
{
- if (!TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_STRIPOFFSETS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripoffset))
- goto bad;
+ /* td_stripoffset might be NULL in an odd OJPEG case. See
+ * tif_dirread.c around line 3634.
+ * XXX: OJPEG hack.
+ * If a) compression is OJPEG, b) it's not a tiled TIFF,
+ * and c) the number of strips is 1,
+ * then we tolerate the absence of stripoffsets tag,
+ * because, presumably, all required data is in the
+ * JpegInterchangeFormat stream.
+ * We can get here when using tiffset on such a file.
+ * See http://bugzilla.maptools.org/show_bug.cgi?id=2500
+ */
+ if (tif->tif_dir.td_stripoffset != NULL &&
+ !TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_STRIPOFFSETS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripoffset))
+ goto bad;
}
else
{
@@ -645,7 +657,7 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
assert(o->field_passcount==0);
TIFFGetField(tif,o->field_tag,&pb);
pa=(uint32)(strlen(pb));
- if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,o->field_tag,pa,pb))
+ if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,(uint16)o->field_tag,pa,pb))
goto bad;
}
break;
@@ -656,7 +668,7 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
assert(o->field_readcount==1);
assert(o->field_passcount==0);
TIFFGetField(tif,o->field_tag,&p);
- if (!TIFFWriteDirectoryTagShort(tif,&ndir,dir,o->field_tag,p))
+ if (!TIFFWriteDirectoryTagShort(tif,&ndir,dir,(uint16)o->field_tag,p))
goto bad;
}
break;
@@ -667,7 +679,7 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
assert(o->field_readcount==1);
assert(o->field_passcount==0);
TIFFGetField(tif,o->field_tag,&p);
- if (!TIFFWriteDirectoryTagLong(tif,&ndir,dir,o->field_tag,p))
+ if (!TIFFWriteDirectoryTagLong(tif,&ndir,dir,(uint16)o->field_tag,p))
goto bad;
}
break;
@@ -679,7 +691,7 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
assert(o->field_readcount==TIFF_VARIABLE2);
assert(o->field_passcount==1);
TIFFGetField(tif,o->field_tag,&pa,&pb);
- if (!TIFFWriteDirectoryTagUndefinedArray(tif,&ndir,dir,o->field_tag,pa,pb))
+ if (!TIFFWriteDirectoryTagUndefinedArray(tif,&ndir,dir,(uint16)o->field_tag,pa,pb))
goto bad;
}
break;
@@ -693,70 +705,72 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
}
for (m=0; m<(uint32)(tif->tif_dir.td_customValueCount); m++)
{
+ uint16 tag = (uint16)tif->tif_dir.td_customValues[m].info->field_tag;
+ uint32 count = tif->tif_dir.td_customValues[m].count;
switch (tif->tif_dir.td_customValues[m].info->field_type)
{
case TIFF_ASCII:
- if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagAscii(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
case TIFF_UNDEFINED:
- if (!TIFFWriteDirectoryTagUndefinedArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagUndefinedArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
case TIFF_BYTE:
- if (!TIFFWriteDirectoryTagByteArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagByteArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
case TIFF_SBYTE:
- if (!TIFFWriteDirectoryTagSbyteArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagSbyteArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
case TIFF_SHORT:
- if (!TIFFWriteDirectoryTagShortArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagShortArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
case TIFF_SSHORT:
- if (!TIFFWriteDirectoryTagSshortArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagSshortArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
case TIFF_LONG:
- if (!TIFFWriteDirectoryTagLongArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagLongArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
case TIFF_SLONG:
- if (!TIFFWriteDirectoryTagSlongArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagSlongArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
case TIFF_LONG8:
- if (!TIFFWriteDirectoryTagLong8Array(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagLong8Array(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
case TIFF_SLONG8:
- if (!TIFFWriteDirectoryTagSlong8Array(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagSlong8Array(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
case TIFF_RATIONAL:
- if (!TIFFWriteDirectoryTagRationalArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagRationalArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
case TIFF_SRATIONAL:
- if (!TIFFWriteDirectoryTagSrationalArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagSrationalArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
case TIFF_FLOAT:
- if (!TIFFWriteDirectoryTagFloatArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagFloatArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
case TIFF_DOUBLE:
- if (!TIFFWriteDirectoryTagDoubleArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagDoubleArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
case TIFF_IFD:
- if (!TIFFWriteDirectoryTagIfdArray(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagIfdArray(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
case TIFF_IFD8:
- if (!TIFFWriteDirectoryTagIfdIfd8Array(tif,&ndir,dir,tif->tif_dir.td_customValues[m].info->field_tag,tif->tif_dir.td_customValues[m].count,tif->tif_dir.td_customValues[m].value))
+ if (!TIFFWriteDirectoryTagIfdIfd8Array(tif,&ndir,dir,tag,count,tif->tif_dir.td_customValues[m].value))
goto bad;
break;
default:
@@ -778,7 +792,7 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
goto bad;
}
else
- tif->tif_diroff=(TIFFSeekFile(tif,0,SEEK_END)+1)&(~1);
+ tif->tif_diroff=(TIFFSeekFile(tif,0,SEEK_END)+1)&(~((toff_t)1));
if (pdiroff!=NULL)
*pdiroff=tif->tif_diroff;
if (!(tif->tif_flags&TIFF_BIGTIFF))
@@ -828,7 +842,7 @@ TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
uint32 nTmp;
TIFFDirEntry* o;
n=dirmem;
- *(uint16*)n=ndir;
+ *(uint16*)n=(uint16)ndir;
if (tif->tif_flags&TIFF_SWAB)
TIFFSwabShort((uint16*)n);
n+=2;
@@ -2141,13 +2155,13 @@ TIFFWriteDirectoryTagCheckedRationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry*
}
else if (*na<1.0)
{
- nb[0]=(uint32)((*na)*0xFFFFFFFF);
+ nb[0]=(uint32)((double)(*na)*0xFFFFFFFF);
nb[1]=0xFFFFFFFF;
}
else
{
nb[0]=0xFFFFFFFF;
- nb[1]=(uint32)(0xFFFFFFFF/(*na));
+ nb[1]=(uint32)((double)0xFFFFFFFF/(*na));
}
}
if (tif->tif_flags&TIFF_SWAB)
@@ -2184,13 +2198,13 @@ TIFFWriteDirectoryTagCheckedSrationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry
}
else if (*na>-1.0)
{
- nb[0]=-(int32)((-*na)*0x7FFFFFFF);
+ nb[0]=-(int32)((double)(-*na)*0x7FFFFFFF);
nb[1]=0x7FFFFFFF;
}
else
{
nb[0]=-0x7FFFFFFF;
- nb[1]=(int32)(0x7FFFFFFF/(-*na));
+ nb[1]=(int32)((double)0x7FFFFFFF/(-*na));
}
}
else
@@ -2202,13 +2216,13 @@ TIFFWriteDirectoryTagCheckedSrationalArray(TIFF* tif, uint32* ndir, TIFFDirEntry
}
else if (*na<1.0)
{
- nb[0]=(int32)((*na)*0x7FFFFFFF);
+ nb[0]=(int32)((double)(*na)*0x7FFFFFFF);
nb[1]=0x7FFFFFFF;
}
else
{
nb[0]=0x7FFFFFFF;
- nb[1]=(int32)(0x7FFFFFFF/(*na));
+ nb[1]=(int32)((double)0x7FFFFFFF/(*na));
}
}
}
@@ -2368,7 +2382,7 @@ TIFFLinkDirectory(TIFF* tif)
{
static const char module[] = "TIFFLinkDirectory";
- tif->tif_diroff = (TIFFSeekFile(tif,0,SEEK_END)+1) &~ 1;
+ tif->tif_diroff = (TIFFSeekFile(tif,0,SEEK_END)+1) & (~((toff_t)1));
/*
* Handle SubIFDs
@@ -2570,7 +2584,7 @@ _TIFFRewriteField(TIFF* tif, uint16 tag, TIFFDataType in_datatype,
tmsize_t count, void* data)
{
static const char module[] = "TIFFResetField";
- const TIFFField* fip = NULL;
+ /* const TIFFField* fip = NULL; */
uint16 dircount;
tmsize_t dirsize;
uint8 direntry_raw[20];
@@ -2586,7 +2600,7 @@ _TIFFRewriteField(TIFF* tif, uint16 tag, TIFFDataType in_datatype,
/* -------------------------------------------------------------------- */
/* Find field definition. */
/* -------------------------------------------------------------------- */
- fip = TIFFFindField(tif, tag, TIFF_ANY);
+ /*fip =*/ TIFFFindField(tif, tag, TIFF_ANY);
/* -------------------------------------------------------------------- */
/* Do some checking this is a straight forward case. */
@@ -2839,14 +2853,15 @@ _TIFFRewriteField(TIFF* tif, uint16 tag, TIFFDataType in_datatype,
"Error writing directory link");
return (0);
}
-
- _TIFFfree( buf_to_write );
}
else
{
memcpy( &entry_offset, buf_to_write, count*TIFFDataWidth(datatype));
}
+ _TIFFfree( buf_to_write );
+ buf_to_write = 0;
+
/* -------------------------------------------------------------------- */
/* Adjust the directory entry. */
/* -------------------------------------------------------------------- */
diff --git a/tiff/libtiff/tif_dumpmode.c b/tiff/libtiff/tif_dumpmode.c
index a94cf0b34..a6a94c04d 100644
--- a/tiff/libtiff/tif_dumpmode.c
+++ b/tiff/libtiff/tif_dumpmode.c
@@ -1,4 +1,4 @@
-/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dumpmode.c,v 1.14 2011-04-02 20:54:09 bfriesen Exp $ */
+/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dumpmode.c,v 1.15 2015-12-12 18:04:26 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -66,7 +66,7 @@ DumpModeEncode(TIFF* tif, uint8* pp, tmsize_t cc, uint16 s)
cc -= n;
if (tif->tif_rawcc >= tif->tif_rawdatasize &&
!TIFFFlushData1(tif))
- return (-1);
+ return (0);
}
return (1);
}
diff --git a/tiff/libtiff/tif_extension.c b/tiff/libtiff/tif_extension.c
index 10afd4162..39fab4c7b 100644
--- a/tiff/libtiff/tif_extension.c
+++ b/tiff/libtiff/tif_extension.c
@@ -1,4 +1,4 @@
-/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_extension.c,v 1.7 2010-03-10 18:56:48 bfriesen Exp $ */
+/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_extension.c,v 1.8 2015-12-06 11:13:43 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -66,13 +66,13 @@ TIFFTagMethods *TIFFAccessTagMethods( TIFF *tif )
void *TIFFGetClientInfo( TIFF *tif, const char *name )
{
- TIFFClientInfoLink *link = tif->tif_clientinfo;
+ TIFFClientInfoLink *psLink = tif->tif_clientinfo;
- while( link != NULL && strcmp(link->name,name) != 0 )
- link = link->next;
+ while( psLink != NULL && strcmp(psLink->name,name) != 0 )
+ psLink = psLink->next;
- if( link != NULL )
- return link->data;
+ if( psLink != NULL )
+ return psLink->data;
else
return NULL;
}
@@ -80,18 +80,18 @@ void *TIFFGetClientInfo( TIFF *tif, const char *name )
void TIFFSetClientInfo( TIFF *tif, void *data, const char *name )
{
- TIFFClientInfoLink *link = tif->tif_clientinfo;
+ TIFFClientInfoLink *psLink = tif->tif_clientinfo;
/*
** Do we have an existing link with this name? If so, just
** set it.
*/
- while( link != NULL && strcmp(link->name,name) != 0 )
- link = link->next;
+ while( psLink != NULL && strcmp(psLink->name,name) != 0 )
+ psLink = psLink->next;
- if( link != NULL )
+ if( psLink != NULL )
{
- link->data = data;
+ psLink->data = data;
return;
}
@@ -99,15 +99,15 @@ void TIFFSetClientInfo( TIFF *tif, void *data, const char *name )
** Create a new link.
*/
- link = (TIFFClientInfoLink *) _TIFFmalloc(sizeof(TIFFClientInfoLink));
- assert (link != NULL);
- link->next = tif->tif_clientinfo;
- link->name = (char *) _TIFFmalloc((tmsize_t)(strlen(name)+1));
- assert (link->name != NULL);
- strcpy(link->name, name);
- link->data = data;
+ psLink = (TIFFClientInfoLink *) _TIFFmalloc(sizeof(TIFFClientInfoLink));
+ assert (psLink != NULL);
+ psLink->next = tif->tif_clientinfo;
+ psLink->name = (char *) _TIFFmalloc((tmsize_t)(strlen(name)+1));
+ assert (psLink->name != NULL);
+ strcpy(psLink->name, name);
+ psLink->data = data;
- tif->tif_clientinfo = link;
+ tif->tif_clientinfo = psLink;
}
/*
* Local Variables:
diff --git a/tiff/libtiff/tif_fax3.c b/tiff/libtiff/tif_fax3.c
index 52c16b403..16bb4d36f 100644
--- a/tiff/libtiff/tif_fax3.c
+++ b/tiff/libtiff/tif_fax3.c
@@ -1,4 +1,4 @@
-/* $Id: tif_fax3.c,v 1.72 2010-06-09 17:17:13 bfriesen Exp $ */
+/* $Id: tif_fax3.c,v 1.78 2016-09-04 21:32:56 erouault Exp $ */
/*
* Copyright (c) 1990-1997 Sam Leffler
@@ -442,8 +442,9 @@ _TIFFFax3fillruns(unsigned char* buf, uint32* runs, uint32* erun, uint32 lastx)
FILL(n, cp);
run &= 7;
}
+ /* Explicit 0xff masking to make icc -check=conversions happy */
if (run)
- cp[0] |= 0xff00 >> run;
+ cp[0] = (unsigned char)((cp[0] | (0xff00 >> run))&0xff);
} else
cp[0] |= _fillmasks[run]>>bx;
x += runs[1];
@@ -526,6 +527,7 @@ Fax3SetupState(TIFF* tif)
"for Group 3/4 run arrays");
if (dsp->runs == NULL)
return (0);
+ memset( dsp->runs, 0, TIFFSafeMultiply(uint32,nruns,2)*sizeof(uint32));
dsp->curruns = dsp->runs;
if (needsRefLine)
dsp->refruns = dsp->runs + nruns;
@@ -642,7 +644,8 @@ putspan(TIFF* tif, int32 span, const tableentry* tab)
while (span >= 2624) {
const tableentry* te = &tab[63 + (2560>>6)];
- code = te->code, length = te->length;
+ code = te->code;
+ length = te->length;
#ifdef FAX3_DEBUG
DEBUG_PRINT("MakeUp", te->runlen);
#endif
@@ -652,14 +655,16 @@ putspan(TIFF* tif, int32 span, const tableentry* tab)
if (span >= 64) {
const tableentry* te = &tab[63 + (span>>6)];
assert(te->runlen == 64*(span>>6));
- code = te->code, length = te->length;
+ code = te->code;
+ length = te->length;
#ifdef FAX3_DEBUG
DEBUG_PRINT("MakeUp", te->runlen);
#endif
_PutBits(tif, code, length);
span -= te->runlen;
}
- code = tab[span].code, length = tab[span].length;
+ code = tab[span].code;
+ length = tab[span].length;
#ifdef FAX3_DEBUG
DEBUG_PRINT(" Term", tab[span].runlen);
#endif
@@ -695,14 +700,16 @@ Fax3PutEOL(TIFF* tif)
align = sp->bit + (8 - align);
else
align = sp->bit - align;
- code = 0;
tparm=align;
_PutBits(tif, 0, tparm);
}
}
- code = EOL, length = 12;
- if (is2DEncoding(sp))
- code = (code<<1) | (sp->tag == G3_1D), length++;
+ code = EOL;
+ length = 12;
+ if (is2DEncoding(sp)) {
+ code = (code<<1) | (sp->tag == G3_1D);
+ length++;
+ }
_PutBits(tif, code, length);
sp->data = data;
@@ -813,7 +820,7 @@ find0span(unsigned char* bp, int32 bs, int32 be)
/*
* Check partial byte on lhs.
*/
- if (bits > 0 && (n = (bs & 7))) {
+ if (bits > 0 && (n = (bs & 7)) != 0) {
span = zeroruns[(*bp << n) & 0xff];
if (span > 8-n) /* table value too generous */
span = 8-n;
@@ -833,12 +840,14 @@ find0span(unsigned char* bp, int32 bs, int32 be)
while (!isAligned(bp, long)) {
if (*bp != 0x00)
return (span + zeroruns[*bp]);
- span += 8, bits -= 8;
+ span += 8;
+ bits -= 8;
bp++;
}
lp = (long*) bp;
while ((bits >= (int32)(8 * sizeof(long))) && (0 == *lp)) {
- span += 8*sizeof (long), bits -= 8*sizeof (long);
+ span += 8*sizeof (long);
+ bits -= 8*sizeof (long);
lp++;
}
bp = (unsigned char*) lp;
@@ -849,7 +858,8 @@ find0span(unsigned char* bp, int32 bs, int32 be)
while (bits >= 8) {
if (*bp != 0x00) /* end of run */
return (span + zeroruns[*bp]);
- span += 8, bits -= 8;
+ span += 8;
+ bits -= 8;
bp++;
}
/*
@@ -872,7 +882,7 @@ find1span(unsigned char* bp, int32 bs, int32 be)
/*
* Check partial byte on lhs.
*/
- if (bits > 0 && (n = (bs & 7))) {
+ if (bits > 0 && (n = (bs & 7)) != 0) {
span = oneruns[(*bp << n) & 0xff];
if (span > 8-n) /* table value too generous */
span = 8-n;
@@ -892,12 +902,14 @@ find1span(unsigned char* bp, int32 bs, int32 be)
while (!isAligned(bp, long)) {
if (*bp != 0xff)
return (span + oneruns[*bp]);
- span += 8, bits -= 8;
+ span += 8;
+ bits -= 8;
bp++;
}
lp = (long*) bp;
while ((bits >= (int32)(8 * sizeof(long))) && (~0 == *lp)) {
- span += 8*sizeof (long), bits -= 8*sizeof (long);
+ span += 8*sizeof (long);
+ bits -= 8*sizeof (long);
lp++;
}
bp = (unsigned char*) lp;
@@ -908,7 +920,8 @@ find1span(unsigned char* bp, int32 bs, int32 be)
while (bits >= 8) {
if (*bp != 0xff) /* end of run */
return (span + oneruns[*bp]);
- span += 8, bits -= 8;
+ span += 8;
+ bits -= 8;
bp++;
}
/*
@@ -1092,8 +1105,10 @@ Fax3Close(TIFF* tif)
unsigned int length = 12;
int i;
- if (is2DEncoding(sp))
- code = (code<<1) | (sp->tag == G3_1D), length++;
+ if (is2DEncoding(sp)) {
+ code = (code<<1) | (sp->tag == G3_1D);
+ length++;
+ }
for (i = 0; i < 6; i++)
Fax3PutBits(tif, code, length);
Fax3FlushBits(tif, sp);
@@ -1180,7 +1195,7 @@ Fax3VSetField(TIFF* tif, uint32 tag, va_list ap)
return (*sp->vsetparent)(tif, tag, ap);
}
- if ((fip = TIFFFieldWithTag(tif, tag)))
+ if ((fip = TIFFFieldWithTag(tif, tag)) != NULL)
TIFFSetFieldBit(tif, fip->field_bit);
else
return 0;
@@ -1239,10 +1254,14 @@ Fax3PrintDir(TIFF* tif, FILE* fd, long flags)
} else {
fprintf(fd, " Group 3 Options:");
- if (sp->groupoptions & GROUP3OPT_2DENCODING)
- fprintf(fd, "%s2-d encoding", sep), sep = "+";
- if (sp->groupoptions & GROUP3OPT_FILLBITS)
- fprintf(fd, "%sEOL padding", sep), sep = "+";
+ if (sp->groupoptions & GROUP3OPT_2DENCODING) {
+ fprintf(fd, "%s2-d encoding", sep);
+ sep = "+";
+ }
+ if (sp->groupoptions & GROUP3OPT_FILLBITS) {
+ fprintf(fd, "%sEOL padding", sep);
+ sep = "+";
+ }
if (sp->groupoptions & GROUP3OPT_UNCOMPRESSED)
fprintf(fd, "%suncompressed data", sep);
}
diff --git a/tiff/libtiff/tif_fax3.h b/tiff/libtiff/tif_fax3.h
index b0f46c9a4..e0b2ca6bf 100644
--- a/tiff/libtiff/tif_fax3.h
+++ b/tiff/libtiff/tif_fax3.h
@@ -1,4 +1,4 @@
-/* $Id: tif_fax3.h,v 1.9 2011-03-10 20:23:07 fwarmerdam Exp $ */
+/* $Id: tif_fax3.h,v 1.11 2016-01-23 21:20:34 erouault Exp $ */
/*
* Copyright (c) 1990-1997 Sam Leffler
@@ -39,7 +39,7 @@
/*
* To override the default routine used to image decoded
- * spans one can use the pseduo tag TIFFTAG_FAXFILLFUNC.
+ * spans one can use the pseudo tag TIFFTAG_FAXFILLFUNC.
* The routine must have the type signature given below;
* for example:
*
@@ -84,7 +84,7 @@ extern void _TIFFFax3fillruns(unsigned char*, uint32*, uint32*, uint32);
typedef struct { /* state table entry */
unsigned char State; /* see above */
unsigned char Width; /* width of code in bits */
- uint32 Param; /* unsigned 32-bit run length in bits */
+ uint16 Param; /* unsigned 16-bit run length in bits */
} TIFFFaxTabEnt;
extern const TIFFFaxTabEnt TIFFFaxMainTable[];
diff --git a/tiff/libtiff/tif_getimage.c b/tiff/libtiff/tif_getimage.c
index 6a09b4d25..0f5e932cd 100644
--- a/tiff/libtiff/tif_getimage.c
+++ b/tiff/libtiff/tif_getimage.c
@@ -1,4 +1,4 @@
-/* $Id: tif_getimage.c,v 1.78 2011-02-23 21:46:09 fwarmerdam Exp $ */
+/* $Id: tif_getimage.c,v 1.98 2016-11-18 02:47:45 bfriesen Exp $ */
/*
* Copyright (c) 1991-1997 Sam Leffler
@@ -95,6 +95,10 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
td->td_bitspersample);
return (0);
}
+ if (td->td_sampleformat == SAMPLEFORMAT_IEEEFP) {
+ sprintf(emsg, "Sorry, can not handle images with IEEE floating-point samples");
+ return (0);
+ }
colorchannels = td->td_samplesperpixel - td->td_extrasamples;
if (!TIFFGetField(tif, TIFFTAG_PHOTOMETRIC, &photometric)) {
switch (colorchannels) {
@@ -182,10 +186,25 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
"Planarconfiguration", td->td_planarconfig);
return (0);
}
+ if ( td->td_samplesperpixel != 3 || colorchannels != 3 ) {
+ sprintf(emsg,
+ "Sorry, can not handle image with %s=%d, %s=%d",
+ "Samples/pixel", td->td_samplesperpixel,
+ "colorchannels", colorchannels);
+ return 0;
+ }
break;
case PHOTOMETRIC_CIELAB:
+ if ( td->td_samplesperpixel != 3 || colorchannels != 3 || td->td_bitspersample != 8 ) {
+ sprintf(emsg,
+ "Sorry, can not handle image with %s=%d, %s=%d and %s=%d",
+ "Samples/pixel", td->td_samplesperpixel,
+ "colorchannels", colorchannels,
+ "Bits/sample", td->td_bitspersample);
+ return 0;
+ }
break;
- default:
+ default:
sprintf(emsg, "Sorry, can not handle image with %s=%d",
photoTag, photometric);
return (0);
@@ -196,20 +215,34 @@ TIFFRGBAImageOK(TIFF* tif, char emsg[1024])
void
TIFFRGBAImageEnd(TIFFRGBAImage* img)
{
- if (img->Map)
- _TIFFfree(img->Map), img->Map = NULL;
- if (img->BWmap)
- _TIFFfree(img->BWmap), img->BWmap = NULL;
- if (img->PALmap)
- _TIFFfree(img->PALmap), img->PALmap = NULL;
- if (img->ycbcr)
- _TIFFfree(img->ycbcr), img->ycbcr = NULL;
- if (img->cielab)
- _TIFFfree(img->cielab), img->cielab = NULL;
- if (img->UaToAa)
- _TIFFfree(img->UaToAa), img->UaToAa = NULL;
- if (img->Bitdepth16To8)
- _TIFFfree(img->Bitdepth16To8), img->Bitdepth16To8 = NULL;
+ if (img->Map) {
+ _TIFFfree(img->Map);
+ img->Map = NULL;
+ }
+ if (img->BWmap) {
+ _TIFFfree(img->BWmap);
+ img->BWmap = NULL;
+ }
+ if (img->PALmap) {
+ _TIFFfree(img->PALmap);
+ img->PALmap = NULL;
+ }
+ if (img->ycbcr) {
+ _TIFFfree(img->ycbcr);
+ img->ycbcr = NULL;
+ }
+ if (img->cielab) {
+ _TIFFfree(img->cielab);
+ img->cielab = NULL;
+ }
+ if (img->UaToAa) {
+ _TIFFfree(img->UaToAa);
+ img->UaToAa = NULL;
+ }
+ if (img->Bitdepth16To8) {
+ _TIFFfree(img->Bitdepth16To8);
+ img->Bitdepth16To8 = NULL;
+ }
if( img->redcmap ) {
_TIFFfree( img->redcmap );
@@ -240,6 +273,9 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024])
int colorchannels;
uint16 *red_orig, *green_orig, *blue_orig;
int n_color;
+
+ if( !TIFFRGBAImageOK(tif, emsg) )
+ return 0;
/* Initialize to normal values */
img->row_offset = 0;
@@ -323,7 +359,7 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024])
}
/* copy the colormaps so we can modify them */
- n_color = (1L << img->bitspersample);
+ n_color = (1U << img->bitspersample);
img->redcmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
img->greencmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
img->bluecmap = (uint16 *) _TIFFmalloc(sizeof(uint16)*n_color);
@@ -336,7 +372,7 @@ TIFFRGBAImageBegin(TIFFRGBAImage* img, TIFF* tif, int stop, char emsg[1024])
_TIFFmemcpy( img->greencmap, green_orig, n_color * 2 );
_TIFFmemcpy( img->bluecmap, blue_orig, n_color * 2 );
- /* fall thru... */
+ /* fall through... */
case PHOTOMETRIC_MINISWHITE:
case PHOTOMETRIC_MINISBLACK:
if (planarconfig == PLANARCONFIG_CONTIG
@@ -494,7 +530,7 @@ TIFFReadRGBAImageOriented(TIFF* tif,
int ok;
if (TIFFRGBAImageOK(tif, emsg) && TIFFRGBAImageBegin(&img, tif, stop, emsg)) {
- img.req_orientation = orientation;
+ img.req_orientation = (uint16)orientation;
/* XXX verify rwidth and rheight against width and height */
ok = TIFFRGBAImageGet(&img, raster+(rheight-img.height)*rwidth,
rwidth, img.height);
@@ -597,6 +633,10 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
int32 fromskew, toskew;
uint32 nrow;
int ret = 1, flip;
+ uint32 this_tw, tocol;
+ int32 this_toskew, leftmost_toskew;
+ int32 leftmost_fromskew;
+ uint32 leftmost_tw;
buf = (unsigned char*) _TIFFmalloc(TIFFTileSize(tif));
if (buf == 0) {
@@ -617,37 +657,50 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
toskew = -(int32)(tw - w);
}
+ /*
+ * Leftmost tile is clipped on left side if col_offset > 0.
+ */
+ leftmost_fromskew = img->col_offset % tw;
+ leftmost_tw = tw - leftmost_fromskew;
+ leftmost_toskew = toskew + leftmost_fromskew;
for (row = 0; row < h; row += nrow)
{
rowstoread = th - (row + img->row_offset) % th;
nrow = (row + rowstoread > h ? h - row : rowstoread);
- for (col = 0; col < w; col += tw)
+ fromskew = leftmost_fromskew;
+ this_tw = leftmost_tw;
+ this_toskew = leftmost_toskew;
+ tocol = 0;
+ col = img->col_offset;
+ while (tocol < w)
{
- if (TIFFReadTile(tif, buf, col+img->col_offset,
+ if (TIFFReadTile(tif, buf, col,
row+img->row_offset, 0, 0)==(tmsize_t)(-1) && img->stoponerr)
{
ret = 0;
break;
}
-
- pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif);
-
- if (col + tw > w)
- {
- /*
- * Tile is clipped horizontally. Calculate
- * visible portion and skewing factors.
- */
- uint32 npix = w - col;
- fromskew = tw - npix;
- (*put)(img, raster+y*w+col, col, y,
- npix, nrow, fromskew, toskew + fromskew, buf + pos);
- }
- else
- {
- (*put)(img, raster+y*w+col, col, y, tw, nrow, 0, toskew, buf + pos);
- }
- }
+ pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif) + \
+ ((tmsize_t) fromskew * img->samplesperpixel);
+ if (tocol + this_tw > w)
+ {
+ /*
+ * Rightmost tile is clipped on right side.
+ */
+ fromskew = tw - (w - tocol);
+ this_tw = tw - fromskew;
+ this_toskew = toskew + fromskew;
+ }
+ (*put)(img, raster+y*w+tocol, tocol, y, this_tw, nrow, fromskew, this_toskew, buf + pos);
+ tocol += this_tw;
+ col += this_tw;
+ /*
+ * After the leftmost tile, tiles are no longer clipped on left side.
+ */
+ fromskew = 0;
+ this_tw = tw;
+ this_toskew = toskew;
+ }
y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
}
@@ -664,7 +717,8 @@ gtTileContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
uint32 temp = *left;
*left = *right;
*right = temp;
- left++, right--;
+ left++;
+ right--;
}
}
}
@@ -692,19 +746,29 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
unsigned char* p2;
unsigned char* pa;
tmsize_t tilesize;
+ tmsize_t bufsize;
int32 fromskew, toskew;
int alpha = img->alpha;
uint32 nrow;
int ret = 1, flip;
- int colorchannels;
+ uint16 colorchannels;
+ uint32 this_tw, tocol;
+ int32 this_toskew, leftmost_toskew;
+ int32 leftmost_fromskew;
+ uint32 leftmost_tw;
tilesize = TIFFTileSize(tif);
- buf = (unsigned char*) _TIFFmalloc((alpha?4:3)*tilesize);
+ bufsize = TIFFSafeMultiply(tmsize_t,alpha?4:3,tilesize);
+ if (bufsize == 0) {
+ TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in %s", "gtTileSeparate");
+ return (0);
+ }
+ buf = (unsigned char*) _TIFFmalloc(bufsize);
if (buf == 0) {
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "%s", "No space for tile buffer");
return (0);
}
- _TIFFmemset(buf, 0, (alpha?4:3)*tilesize);
+ _TIFFmemset(buf, 0, bufsize);
p0 = buf;
p1 = p0 + tilesize;
p2 = p1 + tilesize;
@@ -736,20 +800,31 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
break;
}
+ /*
+ * Leftmost tile is clipped on left side if col_offset > 0.
+ */
+ leftmost_fromskew = img->col_offset % tw;
+ leftmost_tw = tw - leftmost_fromskew;
+ leftmost_toskew = toskew + leftmost_fromskew;
for (row = 0; row < h; row += nrow)
{
rowstoread = th - (row + img->row_offset) % th;
nrow = (row + rowstoread > h ? h - row : rowstoread);
- for (col = 0; col < w; col += tw)
+ fromskew = leftmost_fromskew;
+ this_tw = leftmost_tw;
+ this_toskew = leftmost_toskew;
+ tocol = 0;
+ col = img->col_offset;
+ while (tocol < w)
{
- if (TIFFReadTile(tif, p0, col+img->col_offset,
+ if (TIFFReadTile(tif, p0, col,
row+img->row_offset,0,0)==(tmsize_t)(-1) && img->stoponerr)
{
ret = 0;
break;
}
if (colorchannels > 1
- && TIFFReadTile(tif, p1, col+img->col_offset,
+ && TIFFReadTile(tif, p1, col,
row+img->row_offset,0,1) == (tmsize_t)(-1)
&& img->stoponerr)
{
@@ -757,7 +832,7 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
break;
}
if (colorchannels > 1
- && TIFFReadTile(tif, p2, col+img->col_offset,
+ && TIFFReadTile(tif, p2, col,
row+img->row_offset,0,2) == (tmsize_t)(-1)
&& img->stoponerr)
{
@@ -765,7 +840,7 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
break;
}
if (alpha
- && TIFFReadTile(tif,pa,col+img->col_offset,
+ && TIFFReadTile(tif,pa,col,
row+img->row_offset,0,colorchannels) == (tmsize_t)(-1)
&& img->stoponerr)
{
@@ -773,23 +848,27 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
break;
}
- pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif);
-
- if (col + tw > w)
+ pos = ((row+img->row_offset) % th) * TIFFTileRowSize(tif) + \
+ ((tmsize_t) fromskew * img->samplesperpixel);
+ if (tocol + this_tw > w)
{
/*
- * Tile is clipped horizontally. Calculate
- * visible portion and skewing factors.
+ * Rightmost tile is clipped on right side.
*/
- uint32 npix = w - col;
- fromskew = tw - npix;
- (*put)(img, raster+y*w+col, col, y,
- npix, nrow, fromskew, toskew + fromskew,
- p0 + pos, p1 + pos, p2 + pos, (alpha?(pa+pos):NULL));
- } else {
- (*put)(img, raster+y*w+col, col, y,
- tw, nrow, 0, toskew, p0 + pos, p1 + pos, p2 + pos, (alpha?(pa+pos):NULL));
+ fromskew = tw - (w - tocol);
+ this_tw = tw - fromskew;
+ this_toskew = toskew + fromskew;
}
+ (*put)(img, raster+y*w+tocol, tocol, y, this_tw, nrow, fromskew, this_toskew, \
+ p0 + pos, p1 + pos, p2 + pos, (alpha?(pa+pos):NULL));
+ tocol += this_tw;
+ col += this_tw;
+ /*
+ * After the leftmost tile, tiles are no longer clipped on left side.
+ */
+ fromskew = 0;
+ this_tw = tw;
+ this_toskew = toskew;
}
y += (flip & FLIP_VERTICALLY ?-(int32) nrow : (int32) nrow);
@@ -806,7 +885,8 @@ gtTileSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
uint32 temp = *left;
*left = *right;
*right = temp;
- left++, right--;
+ left++;
+ right--;
}
}
}
@@ -836,6 +916,12 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
int32 fromskew, toskew;
int ret = 1, flip;
+ TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, &subsamplinghor, &subsamplingver);
+ if( subsamplingver == 0 ) {
+ TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Invalid vertical YCbCr subsampling");
+ return (0);
+ }
+
buf = (unsigned char*) _TIFFmalloc(TIFFStripSize(tif));
if (buf == 0) {
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for strip buffer");
@@ -853,7 +939,7 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
}
TIFFGetFieldDefaulted(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
- TIFFGetFieldDefaulted(tif, TIFFTAG_YCBCRSUBSAMPLING, &subsamplinghor, &subsamplingver);
+
scanline = TIFFScanlineSize(tif);
fromskew = (w < imagewidth ? imagewidth - w : 0);
for (row = 0; row < h; row += nrow)
@@ -873,7 +959,8 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
break;
}
- pos = ((row + img->row_offset) % rowsperstrip) * scanline;
+ pos = ((row + img->row_offset) % rowsperstrip) * scanline + \
+ ((tmsize_t) img->col_offset * img->samplesperpixel);
(*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, buf + pos);
y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
}
@@ -889,7 +976,8 @@ gtStripContig(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
uint32 temp = *left;
*left = *right;
*right = temp;
- left++, right--;
+ left++;
+ right--;
}
}
}
@@ -917,17 +1005,24 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
uint32 rowsperstrip, offset_row;
uint32 imagewidth = img->width;
tmsize_t stripsize;
+ tmsize_t bufsize;
int32 fromskew, toskew;
int alpha = img->alpha;
- int ret = 1, flip, colorchannels;
+ int ret = 1, flip;
+ uint16 colorchannels;
stripsize = TIFFStripSize(tif);
- p0 = buf = (unsigned char *)_TIFFmalloc((alpha?4:3)*stripsize);
+ bufsize = TIFFSafeMultiply(tmsize_t,alpha?4:3,stripsize);
+ if (bufsize == 0) {
+ TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "Integer overflow in %s", "gtStripSeparate");
+ return (0);
+ }
+ p0 = buf = (unsigned char *)_TIFFmalloc(bufsize);
if (buf == 0) {
TIFFErrorExt(tif->tif_clientdata, TIFFFileName(tif), "No space for tile buffer");
return (0);
}
- _TIFFmemset(buf, 0, (alpha?4:3)*stripsize);
+ _TIFFmemset(buf, 0, bufsize);
p1 = p0 + stripsize;
p2 = p1 + stripsize;
pa = (alpha?(p2+stripsize):NULL);
@@ -998,7 +1093,8 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
}
}
- pos = ((row + img->row_offset) % rowsperstrip) * scanline;
+ pos = ((row + img->row_offset) % rowsperstrip) * scanline + \
+ ((tmsize_t) img->col_offset * img->samplesperpixel);
(*put)(img, raster+y*w, 0, y, w, nrow, fromskew, toskew, p0 + pos, p1 + pos,
p2 + pos, (alpha?(pa+pos):NULL));
y += (flip & FLIP_VERTICALLY ? -(int32) nrow : (int32) nrow);
@@ -1015,7 +1111,8 @@ gtStripSeparate(TIFFRGBAImage* img, uint32* raster, uint32 w, uint32 h)
uint32 temp = *left;
*left = *right;
*right = temp;
- left++, right--;
+ left++;
+ right--;
}
}
}
@@ -1197,6 +1294,26 @@ DECLAREContigPutFunc(putgreytile)
}
/*
+ * 8-bit greyscale with associated alpha => colormap/RGBA
+ */
+DECLAREContigPutFunc(putagreytile)
+{
+ int samplesperpixel = img->samplesperpixel;
+ uint32** BWmap = img->BWmap;
+
+ (void) y;
+ while (h-- > 0) {
+ for (x = w; x-- > 0;)
+ {
+ *cp++ = BWmap[*pp][0] & (*(pp+1) << 24 | ~A1);
+ pp += samplesperpixel;
+ }
+ cp += toskew;
+ pp += fromskew;
+ }
+}
+
+/*
* 16-bit greyscale => colormap/RGB
*/
DECLAREContigPutFunc(put16bitbwtile)
@@ -1323,7 +1440,7 @@ DECLAREContigPutFunc(putRGBUAcontig8bittile)
uint8* m;
for (x = w; x-- > 0;) {
a = pp[3];
- m = img->UaToAa+(a<<8);
+ m = img->UaToAa+((size_t) a<<8);
r = m[pp[0]];
g = m[pp[1]];
b = m[pp[2]];
@@ -1394,7 +1511,7 @@ DECLAREContigPutFunc(putRGBUAcontig16bittile)
uint8* m;
for (x = w; x-- > 0;) {
a = img->Bitdepth16To8[wp[3]];
- m = img->UaToAa+(a<<8);
+ m = img->UaToAa+((size_t) a<<8);
r = m[img->Bitdepth16To8[wp[0]]];
g = m[img->Bitdepth16To8[wp[1]]];
b = m[img->Bitdepth16To8[wp[2]]];
@@ -1495,6 +1612,26 @@ DECLARESepPutFunc(putRGBAAseparate8bittile)
}
/*
+ * 8-bit unpacked CMYK samples => RGBA
+ */
+DECLARESepPutFunc(putCMYKseparate8bittile)
+{
+ (void) img; (void) y;
+ while (h-- > 0) {
+ uint32 rv, gv, bv, kv;
+ for (x = w; x-- > 0;) {
+ kv = 255 - *a++;
+ rv = (kv*(255-*r++))/255;
+ gv = (kv*(255-*g++))/255;
+ bv = (kv*(255-*b++))/255;
+ *cp++ = PACK4(rv,gv,bv,255);
+ }
+ SKEW4(r, g, b, a, fromskew);
+ cp += toskew;
+ }
+}
+
+/*
* 8-bit unpacked samples => RGBA w/ unassociated alpha
*/
DECLARESepPutFunc(putRGBUAseparate8bittile)
@@ -1505,7 +1642,7 @@ DECLARESepPutFunc(putRGBUAseparate8bittile)
uint8* m;
for (x = w; x-- > 0;) {
av = *a++;
- m = img->UaToAa+(av<<8);
+ m = img->UaToAa+((size_t) av<<8);
rv = m[*r++];
gv = m[*g++];
bv = m[*b++];
@@ -1567,15 +1704,15 @@ DECLARESepPutFunc(putRGBUAseparate16bittile)
uint16 *wa = (uint16*) a;
(void) img; (void) y;
while (h-- > 0) {
- uint32 r,g,b,a;
+ uint32 r2,g2,b2,a2;
uint8* m;
for (x = w; x-- > 0;) {
- a = img->Bitdepth16To8[*wa++];
- m = img->UaToAa+(a<<8);
- r = m[img->Bitdepth16To8[*wr++]];
- g = m[img->Bitdepth16To8[*wg++]];
- b = m[img->Bitdepth16To8[*wb++]];
- *cp++ = PACK4(r,g,b,a);
+ a2 = img->Bitdepth16To8[*wa++];
+ m = img->UaToAa+((size_t) a2<<8);
+ r2 = m[img->Bitdepth16To8[*wr++]];
+ g2 = m[img->Bitdepth16To8[*wg++]];
+ b2 = m[img->Bitdepth16To8[*wb++]];
+ *cp++ = PACK4(r2,g2,b2,a2);
}
SKEW4(wr, wg, wb, wa, fromskew);
cp += toskew;
@@ -1730,10 +1867,16 @@ DECLAREContigPutFunc(putcontig8bitYCbCr44tile)
YCbCrtoRGB(cp3[2], pp[14]);
YCbCrtoRGB(cp3[3], pp[15]);
- cp += 4, cp1 += 4, cp2 += 4, cp3 += 4;
+ cp += 4;
+ cp1 += 4;
+ cp2 += 4;
+ cp3 += 4;
pp += 18;
} while (--x);
- cp += incr, cp1 += incr, cp2 += incr, cp3 += incr;
+ cp += incr;
+ cp1 += incr;
+ cp2 += incr;
+ cp3 += incr;
pp += fromskew;
}
} else {
@@ -1784,7 +1927,10 @@ DECLAREContigPutFunc(putcontig8bitYCbCr44tile)
if (h <= 4)
break;
h -= 4;
- cp += incr, cp1 += incr, cp2 += incr, cp3 += incr;
+ cp += incr;
+ cp1 += incr;
+ cp2 += incr;
+ cp3 += incr;
pp += fromskew;
}
}
@@ -1800,7 +1946,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr42tile)
(void) y;
fromskew = (fromskew * 10) / 4;
- if ((h & 3) == 0 && (w & 1) == 0) {
+ if ((w & 3) == 0 && (h & 1) == 0) {
for (; h >= 2; h -= 2) {
x = w>>2;
do {
@@ -1816,10 +1962,12 @@ DECLAREContigPutFunc(putcontig8bitYCbCr42tile)
YCbCrtoRGB(cp1[2], pp[6]);
YCbCrtoRGB(cp1[3], pp[7]);
- cp += 4, cp1 += 4;
+ cp += 4;
+ cp1 += 4;
pp += 10;
} while (--x);
- cp += incr, cp1 += incr;
+ cp += incr;
+ cp1 += incr;
pp += fromskew;
}
} else {
@@ -1862,7 +2010,8 @@ DECLAREContigPutFunc(putcontig8bitYCbCr42tile)
if (h <= 2)
break;
h -= 2;
- cp += incr, cp1 += incr;
+ cp += incr;
+ cp1 += incr;
pp += fromskew;
}
}
@@ -1877,7 +2026,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr41tile)
/* XXX adjust fromskew */
do {
x = w>>2;
- do {
+ while(x>0) {
int32 Cb = pp[4];
int32 Cr = pp[5];
@@ -1888,7 +2037,8 @@ DECLAREContigPutFunc(putcontig8bitYCbCr41tile)
cp += 4;
pp += 6;
- } while (--x);
+ x--;
+ }
if( (w&3) != 0 )
{
@@ -1979,7 +2129,7 @@ DECLAREContigPutFunc(putcontig8bitYCbCr21tile)
fromskew = (fromskew * 4) / 2;
do {
x = w>>1;
- do {
+ while(x>0) {
int32 Cb = pp[2];
int32 Cr = pp[3];
@@ -1988,7 +2138,8 @@ DECLAREContigPutFunc(putcontig8bitYCbCr21tile)
cp += 2;
pp += 4;
- } while (--x);
+ x --;
+ }
if( (w&1) != 0 )
{
@@ -2249,7 +2400,8 @@ setupMap(TIFFRGBAImage* img)
if (!makebwmap(img))
return (0);
/* no longer need Map, free it */
- _TIFFfree(img->Map), img->Map = NULL;
+ _TIFFfree(img->Map);
+ img->Map = NULL;
}
return (1);
}
@@ -2357,7 +2509,7 @@ buildMap(TIFFRGBAImage* img)
case PHOTOMETRIC_SEPARATED:
if (img->bitspersample == 8)
break;
- /* fall thru... */
+ /* fall through... */
case PHOTOMETRIC_MINISBLACK:
case PHOTOMETRIC_MINISWHITE:
if (!setupMap(img))
@@ -2395,29 +2547,33 @@ PickContigCase(TIFFRGBAImage* img)
case PHOTOMETRIC_RGB:
switch (img->bitspersample) {
case 8:
- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
+ if (img->alpha == EXTRASAMPLE_ASSOCALPHA &&
+ img->samplesperpixel >= 4)
img->put.contig = putRGBAAcontig8bittile;
- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
+ else if (img->alpha == EXTRASAMPLE_UNASSALPHA &&
+ img->samplesperpixel >= 4)
{
if (BuildMapUaToAa(img))
img->put.contig = putRGBUAcontig8bittile;
}
- else
+ else if( img->samplesperpixel >= 3 )
img->put.contig = putRGBcontig8bittile;
break;
case 16:
- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
+ if (img->alpha == EXTRASAMPLE_ASSOCALPHA &&
+ img->samplesperpixel >=4 )
{
if (BuildMapBitdepth16To8(img))
img->put.contig = putRGBAAcontig16bittile;
}
- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
+ else if (img->alpha == EXTRASAMPLE_UNASSALPHA &&
+ img->samplesperpixel >=4 )
{
if (BuildMapBitdepth16To8(img) &&
BuildMapUaToAa(img))
img->put.contig = putRGBUAcontig16bittile;
}
- else
+ else if( img->samplesperpixel >=3 )
{
if (BuildMapBitdepth16To8(img))
img->put.contig = putRGBcontig16bittile;
@@ -2426,7 +2582,7 @@ PickContigCase(TIFFRGBAImage* img)
}
break;
case PHOTOMETRIC_SEPARATED:
- if (buildMap(img)) {
+ if (img->samplesperpixel >=4 && buildMap(img)) {
if (img->bitspersample == 8) {
if (!img->Map)
img->put.contig = putRGBcontig8bitCMYKtile;
@@ -2461,7 +2617,10 @@ PickContigCase(TIFFRGBAImage* img)
img->put.contig = put16bitbwtile;
break;
case 8:
- img->put.contig = putgreytile;
+ if (img->alpha && img->samplesperpixel == 2)
+ img->put.contig = putagreytile;
+ else
+ img->put.contig = putgreytile;
break;
case 4:
img->put.contig = put4bitbwtile;
@@ -2486,7 +2645,7 @@ PickContigCase(TIFFRGBAImage* img)
* must always be <= horizontal subsampling; so
* there are only a few possibilities and we just
* enumerate the cases.
- * Joris: added support for the [1,2] case, nonetheless, to accomodate
+ * Joris: added support for the [1,2] case, nonetheless, to accommodate
* some OJPEG files
*/
uint16 SubsamplingHor;
@@ -2519,7 +2678,7 @@ PickContigCase(TIFFRGBAImage* img)
}
break;
case PHOTOMETRIC_CIELAB:
- if (buildMap(img)) {
+ if (img->samplesperpixel == 3 && buildMap(img)) {
if (img->bitspersample == 8)
img->put.contig = initCIELabConversion(img);
break;
@@ -2540,58 +2699,65 @@ PickSeparateCase(TIFFRGBAImage* img)
img->get = TIFFIsTiled(img->tif) ? gtTileSeparate : gtStripSeparate;
img->put.separate = NULL;
switch (img->photometric) {
- case PHOTOMETRIC_MINISWHITE:
- case PHOTOMETRIC_MINISBLACK:
- /* greyscale images processed pretty much as RGB by gtTileSeparate */
- case PHOTOMETRIC_RGB:
- switch (img->bitspersample) {
- case 8:
- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
- img->put.separate = putRGBAAseparate8bittile;
- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
- {
- if (BuildMapUaToAa(img))
- img->put.separate = putRGBUAseparate8bittile;
- }
- else
- img->put.separate = putRGBseparate8bittile;
- break;
- case 16:
- if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
- {
- if (BuildMapBitdepth16To8(img))
- img->put.separate = putRGBAAseparate16bittile;
- }
- else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
- {
- if (BuildMapBitdepth16To8(img) &&
- BuildMapUaToAa(img))
- img->put.separate = putRGBUAseparate16bittile;
- }
- else
- {
- if (BuildMapBitdepth16To8(img))
- img->put.separate = putRGBseparate16bittile;
- }
- break;
+ case PHOTOMETRIC_MINISWHITE:
+ case PHOTOMETRIC_MINISBLACK:
+ /* greyscale images processed pretty much as RGB by gtTileSeparate */
+ case PHOTOMETRIC_RGB:
+ switch (img->bitspersample) {
+ case 8:
+ if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
+ img->put.separate = putRGBAAseparate8bittile;
+ else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
+ {
+ if (BuildMapUaToAa(img))
+ img->put.separate = putRGBUAseparate8bittile;
}
+ else
+ img->put.separate = putRGBseparate8bittile;
break;
- case PHOTOMETRIC_YCBCR:
- if ((img->bitspersample==8) && (img->samplesperpixel==3))
+ case 16:
+ if (img->alpha == EXTRASAMPLE_ASSOCALPHA)
{
- if (initYCbCrConversion(img)!=0)
- {
- uint16 hs, vs;
- TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRSUBSAMPLING, &hs, &vs);
- switch ((hs<<4)|vs) {
- case 0x11:
- img->put.separate = putseparate8bitYCbCr11tile;
- break;
- /* TODO: add other cases here */
- }
- }
+ if (BuildMapBitdepth16To8(img))
+ img->put.separate = putRGBAAseparate16bittile;
+ }
+ else if (img->alpha == EXTRASAMPLE_UNASSALPHA)
+ {
+ if (BuildMapBitdepth16To8(img) &&
+ BuildMapUaToAa(img))
+ img->put.separate = putRGBUAseparate16bittile;
+ }
+ else
+ {
+ if (BuildMapBitdepth16To8(img))
+ img->put.separate = putRGBseparate16bittile;
}
break;
+ }
+ break;
+ case PHOTOMETRIC_SEPARATED:
+ if (img->bitspersample == 8 && img->samplesperpixel == 4)
+ {
+ img->alpha = 1; // Not alpha, but seems like the only way to get 4th band
+ img->put.separate = putCMYKseparate8bittile;
+ }
+ break;
+ case PHOTOMETRIC_YCBCR:
+ if ((img->bitspersample==8) && (img->samplesperpixel==3))
+ {
+ if (initYCbCrConversion(img)!=0)
+ {
+ uint16 hs, vs;
+ TIFFGetFieldDefaulted(img->tif, TIFFTAG_YCBCRSUBSAMPLING, &hs, &vs);
+ switch ((hs<<4)|vs) {
+ case 0x11:
+ img->put.separate = putseparate8bitYCbCr11tile;
+ break;
+ /* TODO: add other cases here */
+ }
+ }
+ }
+ break;
}
return ((img->get!=NULL) && (img->put.separate!=NULL));
}
@@ -2613,7 +2779,7 @@ BuildMapUaToAa(TIFFRGBAImage* img)
for (na=0; na<256; na++)
{
for (nv=0; nv<256; nv++)
- *m++=(nv*na+127)/255;
+ *m++=(uint8)((nv*na+127)/255);
}
return(1);
}
@@ -2633,7 +2799,7 @@ BuildMapBitdepth16To8(TIFFRGBAImage* img)
}
m=img->Bitdepth16To8;
for (n=0; n<65536; n++)
- *m++=(n+128)/257;
+ *m++=(uint8)((n+128)/257);
return(1);
}
diff --git a/tiff/libtiff/tif_jpeg.c b/tiff/libtiff/tif_jpeg.c
index f0e0aab8e..70b72d83c 100644
--- a/tiff/libtiff/tif_jpeg.c
+++ b/tiff/libtiff/tif_jpeg.c
@@ -1,4 +1,4 @@
-/* $Id: tif_jpeg.c,v 1.105 2012-02-01 01:51:00 fwarmerdam Exp $ */
+/* $Id: tif_jpeg.c,v 1.123 2016-01-23 21:20:34 erouault Exp $ */
/*
* Copyright (c) 1994-1997 Sam Leffler
@@ -58,7 +58,7 @@ int TIFFReInitJPEG_12( TIFF *tif, int scheme, int is_encode );
Libjpeg's jmorecfg.h defines INT16 and INT32, but only if XMD_H is
not defined. Unfortunately, the MinGW and Borland compilers include
a typedef for INT32, which causes a conflict. MSVC does not include
- a conficting typedef given the headers which are included.
+ a conflicting typedef given the headers which are included.
*/
#if defined(__BORLANDC__) || defined(__MINGW32__)
# define XMD_H 1
@@ -252,6 +252,9 @@ TIFFjpeg_create_compress(JPEGState* sp)
sp->err.error_exit = TIFFjpeg_error_exit;
sp->err.output_message = TIFFjpeg_output_message;
+ /* set client_data to avoid UMR warning from tools like Purify */
+ sp->cinfo.c.client_data = NULL;
+
return CALLVJPEG(sp, jpeg_create_compress(&sp->cinfo.c));
}
@@ -263,6 +266,9 @@ TIFFjpeg_create_decompress(JPEGState* sp)
sp->err.error_exit = TIFFjpeg_error_exit;
sp->err.output_message = TIFFjpeg_output_message;
+ /* set client_data to avoid UMR warning from tools like Purify */
+ sp->cinfo.d.client_data = NULL;
+
return CALLVJPEG(sp, jpeg_create_decompress(&sp->cinfo.d));
}
@@ -658,7 +664,9 @@ alloc_downsampled_buffers(TIFF* tif, jpeg_component_info* comp_info,
#define JPEG_MARKER_SOF0 0xC0
#define JPEG_MARKER_SOF1 0xC1
-#define JPEG_MARKER_SOF3 0xC3
+#define JPEG_MARKER_SOF2 0xC2
+#define JPEG_MARKER_SOF9 0xC9
+#define JPEG_MARKER_SOF10 0xCA
#define JPEG_MARKER_DHT 0xC4
#define JPEG_MARKER_SOI 0xD8
#define JPEG_MARKER_SOS 0xDA
@@ -729,6 +737,7 @@ JPEGFixupTagsSubsampling(TIFF* tif)
_TIFFFillStriles( tif );
if( tif->tif_dir.td_stripbytecount == NULL
+ || tif->tif_dir.td_stripoffset == NULL
|| tif->tif_dir.td_stripbytecount[0] == 0 )
{
/* Do not even try to check if the first strip/tile does not
@@ -816,8 +825,11 @@ JPEGFixupTagsSubsamplingSec(struct JPEGFixupTagsSubsamplingData* data)
JPEGFixupTagsSubsamplingSkip(data,n);
}
break;
- case JPEG_MARKER_SOF0:
- case JPEG_MARKER_SOF1:
+ case JPEG_MARKER_SOF0: /* Baseline sequential Huffman */
+ case JPEG_MARKER_SOF1: /* Extended sequential Huffman */
+ case JPEG_MARKER_SOF2: /* Progressive Huffman: normally not allowed by TechNote, but that doesn't hurt supporting it */
+ case JPEG_MARKER_SOF9: /* Extended sequential arithmetic */
+ case JPEG_MARKER_SOF10: /* Progressive arithmetic: normally not allowed by TechNote, but that doesn't hurt supporting it */
/* this marker contains the subsampling factors we're scanning for */
{
uint16 n;
@@ -925,7 +937,7 @@ JPEGFixupTagsSubsamplingSkip(struct JPEGFixupTagsSubsamplingData* data, uint16 s
else
{
uint16 m;
- m=skiplength-data->bufferbytesleft;
+ m=(uint16)(skiplength-data->bufferbytesleft);
if (m<=data->filebytesleft)
{
data->bufferbytesleft=0;
@@ -992,7 +1004,7 @@ JPEGSetupDecode(TIFF* tif)
/*
* Set up for decoding a strip or tile.
*/
-static int
+/*ARGSUSED*/ static int
JPEGPreDecode(TIFF* tif, uint16 s)
{
JPEGState *sp = JState(tif);
@@ -1095,50 +1107,13 @@ JPEGPreDecode(TIFF* tif, uint16 s)
/* Component 0 should have expected sampling factors */
if (sp->cinfo.d.comp_info[0].h_samp_factor != sp->h_sampling ||
sp->cinfo.d.comp_info[0].v_samp_factor != sp->v_sampling) {
- TIFFWarningExt(tif->tif_clientdata, module,
- "Improper JPEG sampling factors %d,%d\n"
- "Apparently should be %d,%d.",
- sp->cinfo.d.comp_info[0].h_samp_factor,
- sp->cinfo.d.comp_info[0].v_samp_factor,
- sp->h_sampling, sp->v_sampling);
-
- /*
- * There are potential security issues here
- * for decoders that have already allocated
- * buffers based on the expected sampling
- * factors. Lets check the sampling factors
- * dont exceed what we were expecting.
- */
- if (sp->cinfo.d.comp_info[0].h_samp_factor
- > sp->h_sampling
- || sp->cinfo.d.comp_info[0].v_samp_factor
- > sp->v_sampling) {
- TIFFErrorExt(tif->tif_clientdata,
- module,
- "Cannot honour JPEG sampling factors"
- " that exceed those specified.");
- return (0);
- }
-
- /*
- * XXX: Files written by the Intergraph software
- * has different sampling factors stored in the
- * TIFF tags and in the JPEG structures. We will
- * try to deduce Intergraph files by the presense
- * of the tag 33918.
- */
- if (!TIFFFindField(tif, 33918, TIFF_ANY)) {
- TIFFWarningExt(tif->tif_clientdata, module,
- "Decompressor will try reading with "
- "sampling %d,%d.",
- sp->cinfo.d.comp_info[0].h_samp_factor,
- sp->cinfo.d.comp_info[0].v_samp_factor);
-
- sp->h_sampling = (uint16)
- sp->cinfo.d.comp_info[0].h_samp_factor;
- sp->v_sampling = (uint16)
- sp->cinfo.d.comp_info[0].v_samp_factor;
- }
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Improper JPEG sampling factors %d,%d\n"
+ "Apparently should be %d,%d.",
+ sp->cinfo.d.comp_info[0].h_samp_factor,
+ sp->cinfo.d.comp_info[0].v_samp_factor,
+ sp->h_sampling, sp->v_sampling);
+ return (0);
}
/* Rest should have sampling factors 1,1 */
for (ci = 1; ci < sp->cinfo.d.num_components; ci++) {
@@ -1160,11 +1135,11 @@ JPEGPreDecode(TIFF* tif, uint16 s)
if (td->td_planarconfig == PLANARCONFIG_CONTIG &&
sp->photometric == PHOTOMETRIC_YCBCR &&
sp->jpegcolormode == JPEGCOLORMODE_RGB) {
- /* Convert YCbCr to RGB */
+ /* Convert YCbCr to RGB */
sp->cinfo.d.jpeg_color_space = JCS_YCbCr;
sp->cinfo.d.out_color_space = JCS_RGB;
} else {
- /* Suppress colorspace handling */
+ /* Suppress colorspace handling */
sp->cinfo.d.jpeg_color_space = JCS_UNKNOWN;
sp->cinfo.d.out_color_space = JCS_UNKNOWN;
if (td->td_planarconfig == PLANARCONFIG_CONTIG &&
@@ -1175,6 +1150,9 @@ JPEGPreDecode(TIFF* tif, uint16 s)
if (downsampled_output) {
/* Need to use raw-data interface to libjpeg */
sp->cinfo.d.raw_data_out = TRUE;
+#if JPEG_LIB_VERSION >= 70
+ sp->cinfo.d.do_fancy_upsampling = FALSE;
+#endif /* JPEG_LIB_VERSION >= 70 */
tif->tif_decoderow = DecodeRowError;
tif->tif_decodestrip = JPEGDecodeRaw;
tif->tif_decodetile = JPEGDecodeRaw;
@@ -1202,7 +1180,8 @@ JPEGPreDecode(TIFF* tif, uint16 s)
* Decode a chunk of pixels.
* "Standard" case: returned data is not downsampled.
*/
-/*ARGSUSED*/ static int
+#if !JPEG_LIB_MK1_OR_12BIT
+static int
JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
{
JPEGState *sp = JState(tif);
@@ -1221,91 +1200,137 @@ JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
nrows = cc / sp->bytesperline;
if (cc % sp->bytesperline)
- TIFFWarningExt(tif->tif_clientdata, tif->tif_name, "fractional scanline not read");
+ TIFFWarningExt(tif->tif_clientdata, tif->tif_name,
+ "fractional scanline not read");
if( nrows > (tmsize_t) sp->cinfo.d.image_height )
nrows = sp->cinfo.d.image_height;
/* data is expected to be read in multiples of a scanline */
if (nrows)
- {
- JSAMPROW line_work_buf = NULL;
+ {
+ do
+ {
+ /*
+ * In the libjpeg6b-9a 8bit case. We read directly into
+ * the TIFF buffer.
+ */
+ JSAMPROW bufptr = (JSAMPROW)buf;
- /*
- * For 6B, only use temporary buffer for 12 bit imagery.
- * For Mk1 always use it.
- */
-#if !defined(JPEG_LIB_MK1)
- if( sp->cinfo.d.data_precision == 12 )
-#endif
- {
- line_work_buf = (JSAMPROW)
- _TIFFmalloc(sizeof(short) * sp->cinfo.d.output_width
- * sp->cinfo.d.num_components );
- }
+ if (TIFFjpeg_read_scanlines(sp, &bufptr, 1) != 1)
+ return (0);
- do {
- if( line_work_buf != NULL )
- {
- /*
- * In the MK1 case, we aways read into a 16bit buffer, and then
- * pack down to 12bit or 8bit. In 6B case we only read into 16
- * bit buffer for 12bit data, which we need to repack.
- */
- if (TIFFjpeg_read_scanlines(sp, &line_work_buf, 1) != 1)
- return (0);
+ ++tif->tif_row;
+ buf += sp->bytesperline;
+ cc -= sp->bytesperline;
+ } while (--nrows > 0);
+ }
- if( sp->cinfo.d.data_precision == 12 )
- {
- int value_pairs = (sp->cinfo.d.output_width
- * sp->cinfo.d.num_components) / 2;
- int iPair;
+ /* Update information on consumed data */
+ tif->tif_rawcp = (uint8*) sp->src.next_input_byte;
+ tif->tif_rawcc = sp->src.bytes_in_buffer;
+
+ /* Close down the decompressor if we've finished the strip or tile. */
+ return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height
+ || TIFFjpeg_finish_decompress(sp);
+}
+#endif /* !JPEG_LIB_MK1_OR_12BIT */
- for( iPair = 0; iPair < value_pairs; iPair++ )
- {
- unsigned char *out_ptr =
- ((unsigned char *) buf) + iPair * 3;
- JSAMPLE *in_ptr = line_work_buf + iPair * 2;
-
- out_ptr[0] = (in_ptr[0] & 0xff0) >> 4;
- out_ptr[1] = ((in_ptr[0] & 0xf) << 4)
- | ((in_ptr[1] & 0xf00) >> 8);
- out_ptr[2] = ((in_ptr[1] & 0xff) >> 0);
- }
- }
- else if( sp->cinfo.d.data_precision == 8 )
- {
- int value_count = (sp->cinfo.d.output_width
- * sp->cinfo.d.num_components);
- int iValue;
+#if JPEG_LIB_MK1_OR_12BIT
+/*ARGSUSED*/ static int
+JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
+{
+ JPEGState *sp = JState(tif);
+ tmsize_t nrows;
+ (void) s;
- for( iValue = 0; iValue < value_count; iValue++ )
- {
- ((unsigned char *) buf)[iValue] =
- line_work_buf[iValue] & 0xff;
- }
- }
- }
- else
- {
- /*
- * In the libjpeg6b 8bit case. We read directly into the
- * TIFF buffer.
- */
- JSAMPROW bufptr = (JSAMPROW)buf;
+ /*
+ ** Update available information, buffer may have been refilled
+ ** between decode requests
+ */
+ sp->src.next_input_byte = (const JOCTET*) tif->tif_rawcp;
+ sp->src.bytes_in_buffer = (size_t) tif->tif_rawcc;
- if (TIFFjpeg_read_scanlines(sp, &bufptr, 1) != 1)
- return (0);
- }
+ if( sp->bytesperline == 0 )
+ return 0;
+
+ nrows = cc / sp->bytesperline;
+ if (cc % sp->bytesperline)
+ TIFFWarningExt(tif->tif_clientdata, tif->tif_name,
+ "fractional scanline not read");
- ++tif->tif_row;
- buf += sp->bytesperline;
- cc -= sp->bytesperline;
- } while (--nrows > 0);
+ if( nrows > (tmsize_t) sp->cinfo.d.image_height )
+ nrows = sp->cinfo.d.image_height;
- if( line_work_buf != NULL )
- _TIFFfree( line_work_buf );
- }
+ /* data is expected to be read in multiples of a scanline */
+ if (nrows)
+ {
+ JSAMPROW line_work_buf = NULL;
+
+ /*
+ * For 6B, only use temporary buffer for 12 bit imagery.
+ * For Mk1 always use it.
+ */
+ if( sp->cinfo.d.data_precision == 12 )
+ {
+ line_work_buf = (JSAMPROW)
+ _TIFFmalloc(sizeof(short) * sp->cinfo.d.output_width
+ * sp->cinfo.d.num_components );
+ }
+
+ do
+ {
+ if( line_work_buf != NULL )
+ {
+ /*
+ * In the MK1 case, we always read into a 16bit
+ * buffer, and then pack down to 12bit or 8bit.
+ * In 6B case we only read into 16 bit buffer
+ * for 12bit data, which we need to repack.
+ */
+ if (TIFFjpeg_read_scanlines(sp, &line_work_buf, 1) != 1)
+ return (0);
+
+ if( sp->cinfo.d.data_precision == 12 )
+ {
+ int value_pairs = (sp->cinfo.d.output_width
+ * sp->cinfo.d.num_components) / 2;
+ int iPair;
+
+ for( iPair = 0; iPair < value_pairs; iPair++ )
+ {
+ unsigned char *out_ptr =
+ ((unsigned char *) buf) + iPair * 3;
+ JSAMPLE *in_ptr = line_work_buf + iPair * 2;
+
+ out_ptr[0] = (unsigned char)((in_ptr[0] & 0xff0) >> 4);
+ out_ptr[1] = (unsigned char)(((in_ptr[0] & 0xf) << 4)
+ | ((in_ptr[1] & 0xf00) >> 8));
+ out_ptr[2] = (unsigned char)(((in_ptr[1] & 0xff) >> 0));
+ }
+ }
+ else if( sp->cinfo.d.data_precision == 8 )
+ {
+ int value_count = (sp->cinfo.d.output_width
+ * sp->cinfo.d.num_components);
+ int iValue;
+
+ for( iValue = 0; iValue < value_count; iValue++ )
+ {
+ ((unsigned char *) buf)[iValue] =
+ line_work_buf[iValue] & 0xff;
+ }
+ }
+ }
+
+ ++tif->tif_row;
+ buf += sp->bytesperline;
+ cc -= sp->bytesperline;
+ } while (--nrows > 0);
+
+ if( line_work_buf != NULL )
+ _TIFFfree( line_work_buf );
+ }
/* Update information on consumed data */
tif->tif_rawcp = (uint8*) sp->src.next_input_byte;
@@ -1313,8 +1338,9 @@ JPEGDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
/* Close down the decompressor if we've finished the strip or tile. */
return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height
- || TIFFjpeg_finish_decompress(sp);
+ || TIFFjpeg_finish_decompress(sp);
}
+#endif /* JPEG_LIB_MK1_OR_12BIT */
/*ARGSUSED*/ static int
DecodeRowError(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
@@ -1341,7 +1367,7 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
(void) s;
/* data is expected to be read in multiples of a scanline */
- if ( (nrows = sp->cinfo.d.image_height) ) {
+ if ( (nrows = sp->cinfo.d.image_height) != 0 ) {
/* Cb,Cr both have sampling factors 1, so this is correct */
JDIMENSION clumps_per_line = sp->cinfo.d.comp_info[1].downsampled_width;
@@ -1349,8 +1375,8 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
#if defined(JPEG_LIB_MK1_OR_12BIT)
unsigned short* tmpbuf = _TIFFmalloc(sizeof(unsigned short) *
- sp->cinfo.d.output_width *
- sp->cinfo.d.num_components);
+ sp->cinfo.d.output_width *
+ sp->cinfo.d.num_components);
if(tmpbuf==NULL) {
TIFFErrorExt(tif->tif_clientdata, "JPEGDecodeRaw",
"Out of memory");
@@ -1362,10 +1388,10 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
jpeg_component_info *compptr;
int ci, clumpoffset;
- if( cc < sp->bytesperline * sp->v_sampling ) {
- TIFFErrorExt(tif->tif_clientdata, "JPEGDecodeRaw",
- "application buffer not large enough for all data.");
- return 0;
+ if( cc < sp->bytesperline ) {
+ TIFFErrorExt(tif->tif_clientdata, "JPEGDecodeRaw",
+ "application buffer not large enough for all data.");
+ return 0;
}
/* Reload downsampled-data buffer if needed */
@@ -1381,20 +1407,25 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
*/
clumpoffset = 0; /* first sample in clump */
for (ci = 0, compptr = sp->cinfo.d.comp_info;
- ci < sp->cinfo.d.num_components;
- ci++, compptr++) {
+ ci < sp->cinfo.d.num_components;
+ ci++, compptr++) {
int hsamp = compptr->h_samp_factor;
int vsamp = compptr->v_samp_factor;
int ypos;
for (ypos = 0; ypos < vsamp; ypos++) {
JSAMPLE *inptr = sp->ds_buffer[ci][sp->scancount*vsamp + ypos];
+ JDIMENSION nclump;
#if defined(JPEG_LIB_MK1_OR_12BIT)
JSAMPLE *outptr = (JSAMPLE*)tmpbuf + clumpoffset;
#else
JSAMPLE *outptr = (JSAMPLE*)buf + clumpoffset;
+ if (cc < (tmsize_t) (clumpoffset + samples_per_clump*(clumps_per_line-1) + hsamp)) {
+ TIFFErrorExt(tif->tif_clientdata, "JPEGDecodeRaw",
+ "application buffer not large enough for all data, possible subsampling issue");
+ return 0;
+ }
#endif
- JDIMENSION nclump;
if (hsamp == 1) {
/* fast path for at least Cb and Cr */
@@ -1405,7 +1436,7 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
} else {
int xpos;
- /* general case */
+ /* general case */
for (nclump = clumps_per_line; nclump-- > 0; ) {
for (xpos = 0; xpos < hsamp; xpos++)
outptr[xpos] = *inptr++;
@@ -1428,18 +1459,18 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
}
}
else
- { /* 12-bit */
+ { /* 12-bit */
int value_pairs = (sp->cinfo.d.output_width
- * sp->cinfo.d.num_components) / 2;
+ * sp->cinfo.d.num_components) / 2;
int iPair;
for( iPair = 0; iPair < value_pairs; iPair++ )
{
unsigned char *out_ptr = ((unsigned char *) buf) + iPair * 3;
JSAMPLE *in_ptr = (JSAMPLE *) (tmpbuf + iPair * 2);
- out_ptr[0] = (in_ptr[0] & 0xff0) >> 4;
- out_ptr[1] = ((in_ptr[0] & 0xf) << 4)
- | ((in_ptr[1] & 0xf00) >> 8);
- out_ptr[2] = ((in_ptr[1] & 0xff) >> 0);
+ out_ptr[0] = (unsigned char)((in_ptr[0] & 0xff0) >> 4);
+ out_ptr[1] = (unsigned char)(((in_ptr[0] & 0xf) << 4)
+ | ((in_ptr[1] & 0xf00) >> 8));
+ out_ptr[2] = (unsigned char)(((in_ptr[1] & 0xff) >> 0));
}
}
}
@@ -1447,12 +1478,9 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
sp->scancount ++;
tif->tif_row += sp->v_sampling;
-/*
- buf += clumps_per_line*samples_per_clump;
- cc -= clumps_per_line*samples_per_clump;
-*/
- buf += sp->bytesperline * sp->v_sampling;
- cc -= sp->bytesperline * sp->v_sampling;
+
+ buf += sp->bytesperline;
+ cc -= sp->bytesperline;
nrows -= sp->v_sampling;
} while (nrows > 0);
@@ -1465,7 +1493,7 @@ JPEGDecodeRaw(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
/* Close down the decompressor if done. */
return sp->cinfo.d.output_scanline < sp->cinfo.d.output_height
- || TIFFjpeg_finish_decompress(sp);
+ || TIFFjpeg_finish_decompress(sp);
}
@@ -1483,6 +1511,15 @@ unsuppress_quant_table (JPEGState* sp, int tblno)
}
static void
+suppress_quant_table (JPEGState* sp, int tblno)
+{
+ JQUANT_TBL* qtbl;
+
+ if ((qtbl = sp->cinfo.c.quant_tbl_ptrs[tblno]) != NULL)
+ qtbl->sent_table = TRUE;
+}
+
+static void
unsuppress_huff_table (JPEGState* sp, int tblno)
{
JHUFF_TBL* htbl;
@@ -1493,6 +1530,17 @@ unsuppress_huff_table (JPEGState* sp, int tblno)
htbl->sent_table = FALSE;
}
+static void
+suppress_huff_table (JPEGState* sp, int tblno)
+{
+ JHUFF_TBL* htbl;
+
+ if ((htbl = sp->cinfo.c.dc_huff_tbl_ptrs[tblno]) != NULL)
+ htbl->sent_table = TRUE;
+ if ((htbl = sp->cinfo.c.ac_huff_tbl_ptrs[tblno]) != NULL)
+ htbl->sent_table = TRUE;
+}
+
static int
prepare_JPEGTables(TIFF* tif)
{
@@ -1542,17 +1590,38 @@ JPEGSetupEncode(TIFF* tif)
assert(sp != NULL);
assert(!sp->cinfo.comm.is_decompressor);
+ sp->photometric = td->td_photometric;
+
/*
* Initialize all JPEG parameters to default values.
* Note that jpeg_set_defaults needs legal values for
* in_color_space and input_components.
*/
- sp->cinfo.c.in_color_space = JCS_UNKNOWN;
- sp->cinfo.c.input_components = 1;
+ if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
+ sp->cinfo.c.input_components = td->td_samplesperpixel;
+ if (sp->photometric == PHOTOMETRIC_YCBCR) {
+ if (sp->jpegcolormode == JPEGCOLORMODE_RGB) {
+ sp->cinfo.c.in_color_space = JCS_RGB;
+ } else {
+ sp->cinfo.c.in_color_space = JCS_YCbCr;
+ }
+ } else {
+ if ((td->td_photometric == PHOTOMETRIC_MINISWHITE || td->td_photometric == PHOTOMETRIC_MINISBLACK) && td->td_samplesperpixel == 1)
+ sp->cinfo.c.in_color_space = JCS_GRAYSCALE;
+ else if (td->td_photometric == PHOTOMETRIC_RGB && td->td_samplesperpixel == 3)
+ sp->cinfo.c.in_color_space = JCS_RGB;
+ else if (td->td_photometric == PHOTOMETRIC_SEPARATED && td->td_samplesperpixel == 4)
+ sp->cinfo.c.in_color_space = JCS_CMYK;
+ else
+ sp->cinfo.c.in_color_space = JCS_UNKNOWN;
+ }
+ } else {
+ sp->cinfo.c.input_components = 1;
+ sp->cinfo.c.in_color_space = JCS_UNKNOWN;
+ }
if (!TIFFjpeg_set_defaults(sp))
return (0);
/* Set per-file parameters */
- sp->photometric = td->td_photometric;
switch (sp->photometric) {
case PHOTOMETRIC_YCBCR:
sp->h_sampling = td->td_ycbcrsubsampling[0];
@@ -1712,10 +1781,7 @@ JPEGPreEncode(TIFF* tif, uint16 s)
if (td->td_planarconfig == PLANARCONFIG_CONTIG) {
sp->cinfo.c.input_components = td->td_samplesperpixel;
if (sp->photometric == PHOTOMETRIC_YCBCR) {
- if (sp->jpegcolormode == JPEGCOLORMODE_RGB) {
- sp->cinfo.c.in_color_space = JCS_RGB;
- } else {
- sp->cinfo.c.in_color_space = JCS_YCbCr;
+ if (sp->jpegcolormode != JPEGCOLORMODE_RGB) {
if (sp->h_sampling != 1 || sp->v_sampling != 1)
downsampled_input = TRUE;
}
@@ -1728,21 +1794,11 @@ JPEGPreEncode(TIFF* tif, uint16 s)
sp->cinfo.c.comp_info[0].h_samp_factor = sp->h_sampling;
sp->cinfo.c.comp_info[0].v_samp_factor = sp->v_sampling;
} else {
- if ((td->td_photometric == PHOTOMETRIC_MINISWHITE || td->td_photometric == PHOTOMETRIC_MINISBLACK) && td->td_samplesperpixel == 1)
- sp->cinfo.c.in_color_space = JCS_GRAYSCALE;
- else if (td->td_photometric == PHOTOMETRIC_RGB)
- sp->cinfo.c.in_color_space = JCS_RGB;
- else if (td->td_photometric == PHOTOMETRIC_SEPARATED && td->td_samplesperpixel == 4)
- sp->cinfo.c.in_color_space = JCS_CMYK;
- else
- sp->cinfo.c.in_color_space = JCS_UNKNOWN;
if (!TIFFjpeg_set_colorspace(sp, sp->cinfo.c.in_color_space))
return (0);
/* jpeg_set_colorspace set all sampling factors to 1 */
}
} else {
- sp->cinfo.c.input_components = 1;
- sp->cinfo.c.in_color_space = JCS_UNKNOWN;
if (!TIFFjpeg_set_colorspace(sp, JCS_UNKNOWN))
return (0);
sp->cinfo.c.comp_info[0].component_id = s;
@@ -1757,14 +1813,30 @@ JPEGPreEncode(TIFF* tif, uint16 s)
sp->cinfo.c.write_JFIF_header = FALSE;
sp->cinfo.c.write_Adobe_marker = FALSE;
/* set up table handling correctly */
- if (!TIFFjpeg_set_quality(sp, sp->jpegquality, FALSE))
+ /* calling TIFFjpeg_set_quality() causes quantization tables to be flagged */
+ /* as being to be emitted, which we don't want in the JPEGTABLESMODE_QUANT */
+ /* mode, so we must manually suppress them. However TIFFjpeg_set_quality() */
+ /* should really be called when dealing with files with directories with */
+ /* mixed qualities. see http://trac.osgeo.org/gdal/ticket/3539 */
+ if (!TIFFjpeg_set_quality(sp, sp->jpegquality, FALSE))
return (0);
- if (! (sp->jpegtablesmode & JPEGTABLESMODE_QUANT)) {
+ if (sp->jpegtablesmode & JPEGTABLESMODE_QUANT) {
+ suppress_quant_table(sp, 0);
+ suppress_quant_table(sp, 1);
+ }
+ else {
unsuppress_quant_table(sp, 0);
unsuppress_quant_table(sp, 1);
}
if (sp->jpegtablesmode & JPEGTABLESMODE_HUFF)
+ {
+ /* Explicit suppression is only needed if we did not go through the */
+ /* prepare_JPEGTables() code path, which may be the case if updating */
+ /* an existing file */
+ suppress_huff_table(sp, 0);
+ suppress_huff_table(sp, 1);
sp->cinfo.c.optimize_coding = FALSE;
+ }
else
sp->cinfo.c.optimize_coding = TRUE;
if (downsampled_input) {
@@ -1821,9 +1893,16 @@ JPEGEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
if( sp->cinfo.c.data_precision == 12 )
{
- line16_count = (sp->bytesperline * 2) / 3;
+ line16_count = (int)((sp->bytesperline * 2) / 3);
line16 = (short *) _TIFFmalloc(sizeof(short) * line16_count);
- // FIXME: undiagnosed malloc failure
+ if (!line16)
+ {
+ TIFFErrorExt(tif->tif_clientdata,
+ "JPEGEncode",
+ "Failed to allocate memory");
+
+ return 0;
+ }
}
while (nrows-- > 0) {
@@ -1998,13 +2077,10 @@ JPEGCleanup(TIFF* tif)
tif->tif_tagmethods.vgetfield = sp->vgetparent;
tif->tif_tagmethods.vsetfield = sp->vsetparent;
tif->tif_tagmethods.printdir = sp->printdir;
-
- if( sp != NULL ) {
- if( sp->cinfo_initialized )
- TIFFjpeg_destroy(sp); /* release libjpeg resources */
- if (sp->jpegtables) /* tag value */
- _TIFFfree(sp->jpegtables);
- }
+ if( sp->cinfo_initialized )
+ TIFFjpeg_destroy(sp); /* release libjpeg resources */
+ if (sp->jpegtables) /* tag value */
+ _TIFFfree(sp->jpegtables);
_TIFFfree(tif->tif_data); /* release local state */
tif->tif_data = NULL;
@@ -2062,8 +2138,7 @@ JPEGVSetField(TIFF* tif, uint32 tag, va_list ap)
/* XXX */
return (0);
}
- _TIFFsetByteArray(&sp->jpegtables, va_arg(ap, void*),
- (long) v32);
+ _TIFFsetByteArray(&sp->jpegtables, va_arg(ap, void*), v32);
sp->jpegtables_length = v32;
TIFFSetFieldBit(tif, FIELD_JPEGTABLES);
break;
@@ -2092,7 +2167,7 @@ JPEGVSetField(TIFF* tif, uint32 tag, va_list ap)
return (*sp->vsetparent)(tif, tag, ap);
}
- if ((fip = TIFFFieldWithTag(tif, tag))) {
+ if ((fip = TIFFFieldWithTag(tif, tag)) != NULL) {
TIFFSetFieldBit(tif, fip->field_bit);
} else {
return (0);
@@ -2316,8 +2391,17 @@ here hopefully is harmless.
*/
sp->jpegtables_length = SIZE_OF_JPEGTABLES;
sp->jpegtables = (void *) _TIFFmalloc(sp->jpegtables_length);
- // FIXME: NULL-deref after malloc failure
- _TIFFmemset(sp->jpegtables, 0, SIZE_OF_JPEGTABLES);
+ if (sp->jpegtables)
+ {
+ _TIFFmemset(sp->jpegtables, 0, SIZE_OF_JPEGTABLES);
+ }
+ else
+ {
+ TIFFErrorExt(tif->tif_clientdata,
+ "TIFFInitJPEG",
+ "Failed to allocate memory for JPEG tables");
+ return 0;
+ }
#undef SIZE_OF_JPEGTABLES
}
diff --git a/tiff/libtiff/tif_jpeg_12.c b/tiff/libtiff/tif_jpeg_12.c
index 87aaa19e0..8499e6498 100644
--- a/tiff/libtiff/tif_jpeg_12.c
+++ b/tiff/libtiff/tif_jpeg_12.c
@@ -5,6 +5,9 @@
# define TIFFInitJPEG TIFFInitJPEG_12
+int
+TIFFInitJPEG_12(TIFF* tif, int scheme);
+
# include LIBJPEG_12_PATH
# include "tif_jpeg.c"
diff --git a/tiff/libtiff/tif_luv.c b/tiff/libtiff/tif_luv.c
index eba6c08eb..ca08f30a7 100644
--- a/tiff/libtiff/tif_luv.c
+++ b/tiff/libtiff/tif_luv.c
@@ -1,4 +1,4 @@
-/* $Id: tif_luv.c,v 1.35 2011-04-02 20:54:09 bfriesen Exp $ */
+/* $Id: tif_luv.c,v 1.43 2016-09-04 21:32:56 erouault Exp $ */
/*
* Copyright (c) 1997 Greg Ward Larson
@@ -202,7 +202,11 @@ LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
if (sp->user_datafmt == SGILOGDATAFMT_16BIT)
tp = (int16*) op;
else {
- assert(sp->tbuflen >= npixels);
+ if(sp->tbuflen < npixels) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Translation buffer too short");
+ return (0);
+ }
tp = (int16*) sp->tbuf;
}
_TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0]));
@@ -211,9 +215,11 @@ LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
cc = tif->tif_rawcc;
/* get each byte string */
for (shft = 2*8; (shft -= 8) >= 0; ) {
- for (i = 0; i < npixels && cc > 0; )
+ for (i = 0; i < npixels && cc > 0; ) {
if (*bp >= 128) { /* run */
- rc = *bp++ + (2-128); /* TODO: potential input buffer overrun when decoding corrupt or truncated data */
+ if( cc < 2 )
+ break;
+ rc = *bp++ + (2-128);
b = (int16)(*bp++ << shft);
cc -= 2;
while (rc-- && i < npixels)
@@ -223,6 +229,7 @@ LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
while (--cc && rc-- && i < npixels)
tp[i++] |= (int16)*bp++ << shft;
}
+ }
if (i != npixels) {
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
TIFFErrorExt(tif->tif_clientdata, module,
@@ -268,13 +275,17 @@ LogLuvDecode24(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
if (sp->user_datafmt == SGILOGDATAFMT_RAW)
tp = (uint32 *)op;
else {
- assert(sp->tbuflen >= npixels);
+ if(sp->tbuflen < npixels) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Translation buffer too short");
+ return (0);
+ }
tp = (uint32 *) sp->tbuf;
}
/* copy to array of uint32 */
bp = (unsigned char*) tif->tif_rawcp;
cc = tif->tif_rawcc;
- for (i = 0; i < npixels && cc > 0; i++) {
+ for (i = 0; i < npixels && cc >= 3; i++) {
tp[i] = bp[0] << 16 | bp[1] << 8 | bp[2];
bp += 3;
cc -= 3;
@@ -325,7 +336,11 @@ LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
if (sp->user_datafmt == SGILOGDATAFMT_RAW)
tp = (uint32*) op;
else {
- assert(sp->tbuflen >= npixels);
+ if(sp->tbuflen < npixels) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Translation buffer too short");
+ return (0);
+ }
tp = (uint32*) sp->tbuf;
}
_TIFFmemset((void*) tp, 0, npixels*sizeof (tp[0]));
@@ -334,11 +349,13 @@ LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
cc = tif->tif_rawcc;
/* get each byte string */
for (shft = 4*8; (shft -= 8) >= 0; ) {
- for (i = 0; i < npixels && cc > 0; )
+ for (i = 0; i < npixels && cc > 0; ) {
if (*bp >= 128) { /* run */
+ if( cc < 2 )
+ break;
rc = *bp++ + (2-128);
b = (uint32)*bp++ << shft;
- cc -= 2; /* TODO: potential input buffer overrun when decoding corrupt or truncated data */
+ cc -= 2;
while (rc-- && i < npixels)
tp[i++] |= b;
} else { /* non-run */
@@ -346,6 +363,7 @@ LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
while (--cc && rc-- && i < npixels)
tp[i++] |= (uint32)*bp++ << shft;
}
+ }
if (i != npixels) {
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
TIFFErrorExt(tif->tif_clientdata, module,
@@ -379,9 +397,14 @@ LogLuvDecodeStrip(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
{
tmsize_t rowlen = TIFFScanlineSize(tif);
+ if (rowlen == 0)
+ return 0;
+
assert(cc%rowlen == 0);
- while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s))
- bp += rowlen, cc -= rowlen;
+ while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s)) {
+ bp += rowlen;
+ cc -= rowlen;
+ }
return (cc == 0);
}
@@ -395,9 +418,14 @@ LogLuvDecodeTile(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
{
tmsize_t rowlen = TIFFTileRowSize(tif);
+ if (rowlen == 0)
+ return 0;
+
assert(cc%rowlen == 0);
- while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s))
- bp += rowlen, cc -= rowlen;
+ while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s)) {
+ bp += rowlen;
+ cc -= rowlen;
+ }
return (cc == 0);
}
@@ -407,6 +435,7 @@ LogLuvDecodeTile(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
static int
LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
{
+ static const char module[] = "LogL16Encode";
LogLuvState* sp = EncoderState(tif);
int shft;
tmsize_t i;
@@ -427,7 +456,11 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
tp = (int16*) bp;
else {
tp = (int16*) sp->tbuf;
- assert(sp->tbuflen >= npixels);
+ if(sp->tbuflen < npixels) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Translation buffer too short");
+ return (0);
+ }
(*sp->tfunc)(sp, bp, npixels);
}
/* compress each byte string */
@@ -500,6 +533,7 @@ LogL16Encode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
static int
LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
{
+ static const char module[] = "LogLuvEncode24";
LogLuvState* sp = EncoderState(tif);
tmsize_t i;
tmsize_t npixels;
@@ -515,7 +549,11 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
tp = (uint32*) bp;
else {
tp = (uint32*) sp->tbuf;
- assert(sp->tbuflen >= npixels);
+ if(sp->tbuflen < npixels) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Translation buffer too short");
+ return (0);
+ }
(*sp->tfunc)(sp, bp, npixels);
}
/* write out encoded pixels */
@@ -547,6 +585,7 @@ LogLuvEncode24(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
static int
LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
{
+ static const char module[] = "LogLuvEncode32";
LogLuvState* sp = EncoderState(tif);
int shft;
tmsize_t i;
@@ -568,7 +607,11 @@ LogLuvEncode32(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
tp = (uint32*) bp;
else {
tp = (uint32*) sp->tbuf;
- assert(sp->tbuflen >= npixels);
+ if(sp->tbuflen < npixels) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Translation buffer too short");
+ return (0);
+ }
(*sp->tfunc)(sp, bp, npixels);
}
/* compress each byte string */
@@ -644,9 +687,14 @@ LogLuvEncodeStrip(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
{
tmsize_t rowlen = TIFFScanlineSize(tif);
+ if (rowlen == 0)
+ return 0;
+
assert(cc%rowlen == 0);
- while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 1)
- bp += rowlen, cc -= rowlen;
+ while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 1) {
+ bp += rowlen;
+ cc -= rowlen;
+ }
return (cc == 0);
}
@@ -659,9 +707,14 @@ LogLuvEncodeTile(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
{
tmsize_t rowlen = TIFFTileRowSize(tif);
+ if (rowlen == 0)
+ return 0;
+
assert(cc%rowlen == 0);
- while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 1)
- bp += rowlen, cc -= rowlen;
+ while (cc && (*tif->tif_encoderow)(tif, bp, rowlen, s) == 1) {
+ bp += rowlen;
+ cc -= rowlen;
+ }
return (cc == 0);
}
@@ -683,7 +736,9 @@ LogLuvEncodeTile(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
+#undef log2 /* Conflict with C'99 function */
#define log2(x) ((1./M_LN2)*log(x))
+#undef exp2 /* Conflict with C'99 function */
#define exp2(x) exp(M_LN2*(x))
#define itrunc(x,m) ((m)==SGILOGENCODE_NODITHER ? \
@@ -1229,6 +1284,14 @@ LogL16InitState(TIFF* tif)
assert(sp != NULL);
assert(td->td_photometric == PHOTOMETRIC_LOGL);
+ if( td->td_samplesperpixel != 1 )
+ {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Sorry, can not handle LogL image with %s=%d",
+ "Samples/pixel", td->td_samplesperpixel);
+ return 0;
+ }
+
/* for some reason, we can't do this in TIFFInitLogL16 */
if (sp->user_datafmt == SGILOGDATAFMT_UNKNOWN)
sp->user_datafmt = LogL16GuessDataFmt(td);
@@ -1551,17 +1614,21 @@ LogLuvVSetField(TIFF* tif, uint32 tag, va_list ap)
*/
switch (sp->user_datafmt) {
case SGILOGDATAFMT_FLOAT:
- bps = 32, fmt = SAMPLEFORMAT_IEEEFP;
+ bps = 32;
+ fmt = SAMPLEFORMAT_IEEEFP;
break;
case SGILOGDATAFMT_16BIT:
- bps = 16, fmt = SAMPLEFORMAT_INT;
+ bps = 16;
+ fmt = SAMPLEFORMAT_INT;
break;
case SGILOGDATAFMT_RAW:
- bps = 32, fmt = SAMPLEFORMAT_UINT;
+ bps = 32;
+ fmt = SAMPLEFORMAT_UINT;
TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
break;
case SGILOGDATAFMT_8BIT:
- bps = 8, fmt = SAMPLEFORMAT_UINT;
+ bps = 8;
+ fmt = SAMPLEFORMAT_UINT;
break;
default:
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
diff --git a/tiff/libtiff/tif_lzma.c b/tiff/libtiff/tif_lzma.c
index dedf1d948..80fc39424 100644
--- a/tiff/libtiff/tif_lzma.c
+++ b/tiff/libtiff/tif_lzma.c
@@ -1,4 +1,4 @@
-/* $Id: tif_lzma.c,v 1.4 2011-12-22 00:29:29 bfriesen Exp $ */
+/* $Id: tif_lzma.c,v 1.6 2016-09-17 09:18:59 erouault Exp $ */
/*
* Copyright (c) 2010, Andrey Kiselev <dron@ak4719.spb.edu>
@@ -95,7 +95,7 @@ LZMAStrerror(lzma_ret ret)
case LZMA_PROG_ERROR:
return "programming error";
default:
- return "unindentified liblzma error";
+ return "unidentified liblzma error";
}
}
@@ -490,6 +490,6 @@ bad:
"No space for LZMA2 state block");
return 0;
}
-#endif /* LZMA_SUPORT */
+#endif /* LZMA_SUPPORT */
/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/tiff/libtiff/tif_lzw.c b/tiff/libtiff/tif_lzw.c
index fd9c7a0a7..240e19c2e 100644
--- a/tiff/libtiff/tif_lzw.c
+++ b/tiff/libtiff/tif_lzw.c
@@ -1,4 +1,4 @@
-/* $Id: tif_lzw.c,v 1.45 2011-04-02 20:54:09 bfriesen Exp $ */
+/* $Id: tif_lzw.c,v 1.52 2016-09-04 21:32:56 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -94,7 +94,7 @@ typedef struct {
unsigned short nbits; /* # of bits/code */
unsigned short maxcode; /* maximum code for lzw_nbits */
unsigned short free_ent; /* next free entry in hash table */
- long nextdata; /* next bits of i/o */
+ unsigned long nextdata; /* next bits of i/o */
long nextbits; /* # of valid bits in lzw_nextdata */
int rw_mode; /* preserve rw_mode from init */
@@ -240,8 +240,8 @@ LZWSetupDecode(TIFF* tif)
*/
code = 255;
do {
- sp->dec_codetab[code].value = code;
- sp->dec_codetab[code].firstchar = code;
+ sp->dec_codetab[code].value = (unsigned char)code;
+ sp->dec_codetab[code].firstchar = (unsigned char)code;
sp->dec_codetab[code].length = 1;
sp->dec_codetab[code].next = NULL;
} while (code--);
@@ -268,6 +268,8 @@ LZWPreDecode(TIFF* tif, uint16 s)
if( sp->dec_codetab == NULL )
{
tif->tif_setupdecode( tif );
+ if( sp->dec_codetab == NULL )
+ return (0);
}
/*
@@ -365,7 +367,8 @@ LZWDecode(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
unsigned char *bp;
hcode_t code;
int len;
- long nbits, nextbits, nextdata, nbitsmask;
+ long nbits, nextbits, nbitsmask;
+ unsigned long nextdata;
code_t *codep, *free_entp, *maxcodep, *oldcodep;
(void) s;
@@ -408,14 +411,15 @@ LZWDecode(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
/*
* Residue satisfies only part of the decode request.
*/
- op += residue, occ -= residue;
+ op += residue;
+ occ -= residue;
tp = op;
do {
int t;
--tp;
t = codep->value;
codep = codep->next;
- *tp = t;
+ *tp = (char)t;
} while (--residue && codep);
sp->dec_restart = 0;
}
@@ -434,22 +438,25 @@ LZWDecode(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
if (code == CODE_EOI)
break;
if (code == CODE_CLEAR) {
- free_entp = sp->dec_codetab + CODE_FIRST;
- _TIFFmemset(free_entp, 0,
- (CSIZE - CODE_FIRST) * sizeof (code_t));
- nbits = BITS_MIN;
- nbitsmask = MAXCODE(BITS_MIN);
- maxcodep = sp->dec_codetab + nbitsmask-1;
- NextCode(tif, sp, bp, code, GetNextCode);
+ do {
+ free_entp = sp->dec_codetab + CODE_FIRST;
+ _TIFFmemset(free_entp, 0,
+ (CSIZE - CODE_FIRST) * sizeof (code_t));
+ nbits = BITS_MIN;
+ nbitsmask = MAXCODE(BITS_MIN);
+ maxcodep = sp->dec_codetab + nbitsmask-1;
+ NextCode(tif, sp, bp, code, GetNextCode);
+ } while (code == CODE_CLEAR); /* consecutive CODE_CLEAR codes */
if (code == CODE_EOI)
break;
- if (code >= CODE_CLEAR) {
+ if (code > CODE_CLEAR) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
"LZWDecode: Corrupted LZW table at scanline %d",
tif->tif_row);
return (0);
}
- *op++ = (char)code, occ--;
+ *op++ = (char)code;
+ occ--;
oldcodep = sp->dec_codetab + code;
continue;
}
@@ -527,16 +534,19 @@ LZWDecode(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
--tp;
t = codep->value;
codep = codep->next;
- *tp = t;
+ *tp = (char)t;
} while (codep && tp > op);
if (codep) {
codeLoop(tif, module);
break;
}
assert(occ >= len);
- op += len, occ -= len;
- } else
- *op++ = (char)code, occ--;
+ op += len;
+ occ -= len;
+ } else {
+ *op++ = (char)code;
+ occ--;
+ }
}
tif->tif_rawcp = (uint8*) bp;
@@ -630,7 +640,8 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
/*
* Residue satisfies only part of the decode request.
*/
- op += residue, occ -= residue;
+ op += residue;
+ occ -= residue;
tp = op;
do {
*--tp = codep->value;
@@ -653,22 +664,25 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
if (code == CODE_EOI)
break;
if (code == CODE_CLEAR) {
- free_entp = sp->dec_codetab + CODE_FIRST;
- _TIFFmemset(free_entp, 0,
- (CSIZE - CODE_FIRST) * sizeof (code_t));
- nbits = BITS_MIN;
- nbitsmask = MAXCODE(BITS_MIN);
- maxcodep = sp->dec_codetab + nbitsmask;
- NextCode(tif, sp, bp, code, GetNextCodeCompat);
+ do {
+ free_entp = sp->dec_codetab + CODE_FIRST;
+ _TIFFmemset(free_entp, 0,
+ (CSIZE - CODE_FIRST) * sizeof (code_t));
+ nbits = BITS_MIN;
+ nbitsmask = MAXCODE(BITS_MIN);
+ maxcodep = sp->dec_codetab + nbitsmask;
+ NextCode(tif, sp, bp, code, GetNextCodeCompat);
+ } while (code == CODE_CLEAR); /* consecutive CODE_CLEAR codes */
if (code == CODE_EOI)
break;
- if (code >= CODE_CLEAR) {
+ if (code > CODE_CLEAR) {
TIFFErrorExt(tif->tif_clientdata, tif->tif_name,
"LZWDecode: Corrupted LZW table at scanline %d",
tif->tif_row);
return (0);
}
- *op++ = code, occ--;
+ *op++ = (char)code;
+ occ--;
oldcodep = sp->dec_codetab + code;
continue;
}
@@ -734,17 +748,20 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
break;
}
assert(occ >= codep->length);
- op += codep->length, occ -= codep->length;
+ op += codep->length;
+ occ -= codep->length;
tp = op;
do {
*--tp = codep->value;
} while( (codep = codep->next) != NULL );
- } else
- *op++ = code, occ--;
+ } else {
+ *op++ = (char)code;
+ occ--;
+ }
}
tif->tif_rawcp = (uint8*) bp;
- sp->lzw_nbits = nbits;
+ sp->lzw_nbits = (unsigned short)nbits;
sp->lzw_nextdata = nextdata;
sp->lzw_nextbits = nextbits;
sp->dec_nbitsmask = nbitsmask;
@@ -830,13 +847,15 @@ LZWPreEncode(TIFF* tif, uint16 s)
} else \
rat = (incount<<8) / outcount; \
}
+
+/* Explicit 0xff masking to make icc -check=conversions happy */
#define PutNextCode(op, c) { \
nextdata = (nextdata << nbits) | c; \
nextbits += nbits; \
- *op++ = (unsigned char)(nextdata >> (nextbits-8)); \
+ *op++ = (unsigned char)((nextdata >> (nextbits-8))&0xff); \
nextbits -= 8; \
if (nextbits >= 8) { \
- *op++ = (unsigned char)(nextdata >> (nextbits-8)); \
+ *op++ = (unsigned char)((nextdata >> (nextbits-8))&0xff); \
nextbits -= 8; \
} \
outcount += nbits; \
@@ -866,7 +885,8 @@ LZWEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
hcode_t ent;
long disp;
long incount, outcount, checkpoint;
- long nextdata, nextbits;
+ unsigned long nextdata;
+ long nextbits;
int free_ent, maxcode, nbits;
uint8* op;
uint8* limit;
@@ -890,7 +910,7 @@ LZWEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
nbits = sp->lzw_nbits;
op = tif->tif_rawcp;
limit = sp->enc_rawlimit;
- ent = sp->enc_oldcode;
+ ent = (hcode_t)sp->enc_oldcode;
if (ent == (hcode_t) -1 && cc > 0) {
/*
@@ -926,7 +946,7 @@ LZWEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
disp = 1;
do {
/*
- * Avoid pointer arithmetic 'cuz of
+ * Avoid pointer arithmetic because of
* wraparound problems with segments.
*/
if ((h -= disp) < 0)
@@ -953,8 +973,8 @@ LZWEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
op = tif->tif_rawdata;
}
PutNextCode(op, ent);
- ent = c;
- hp->code = free_ent++;
+ ent = (hcode_t)c;
+ hp->code = (hcode_t)(free_ent++);
hp->hash = fcode;
if (free_ent == CODE_MAX-1) {
/* table is full, emit clear code and reset */
@@ -1011,9 +1031,9 @@ LZWEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
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;
+ sp->lzw_free_ent = (unsigned short)free_ent;
+ sp->lzw_maxcode = (unsigned short)maxcode;
+ sp->lzw_nbits = (unsigned short)nbits;
tif->tif_rawcp = op;
return (1);
}
@@ -1028,7 +1048,7 @@ LZWPostEncode(TIFF* tif)
register LZWCodecState *sp = EncoderState(tif);
uint8* op = tif->tif_rawcp;
long nextbits = sp->lzw_nextbits;
- long nextdata = sp->lzw_nextdata;
+ unsigned long nextdata = sp->lzw_nextdata;
long outcount = sp->enc_outcount;
int nbits = sp->lzw_nbits;
@@ -1042,8 +1062,9 @@ LZWPostEncode(TIFF* tif)
sp->enc_oldcode = (hcode_t) -1;
}
PutNextCode(op, CODE_EOI);
+ /* Explicit 0xff masking to make icc -check=conversions happy */
if (nextbits > 0)
- *op++ = (unsigned char)(nextdata << (8-nextbits));
+ *op++ = (unsigned char)((nextdata << (8-nextbits))&0xff);
tif->tif_rawcc = (tmsize_t)(op - tif->tif_rawdata);
return (1);
}
diff --git a/tiff/libtiff/tif_next.c b/tiff/libtiff/tif_next.c
index 524e127c1..08211788a 100644
--- a/tiff/libtiff/tif_next.c
+++ b/tiff/libtiff/tif_next.c
@@ -1,4 +1,4 @@
-/* $Id: tif_next.c,v 1.13 2010-03-10 18:56:48 bfriesen Exp $ */
+/* $Id: tif_next.c,v 1.19 2016-09-04 21:32:56 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -37,7 +37,7 @@
case 0: op[0] = (unsigned char) ((v) << 6); break; \
case 1: op[0] |= (v) << 4; break; \
case 2: op[0] |= (v) << 2; break; \
- case 3: *op++ |= (v); break; \
+ case 3: *op++ |= (v); op_offset++; break; \
} \
}
@@ -71,8 +71,9 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)
TIFFErrorExt(tif->tif_clientdata, module, "Fractional scanlines cannot be read");
return (0);
}
- for (row = buf; occ > 0; occ -= scanline, row += scanline) {
- n = *bp++, cc--;
+ for (row = buf; cc > 0 && occ > 0; occ -= scanline, row += scanline) {
+ n = *bp++;
+ cc--;
switch (n) {
case LITERALROW:
/*
@@ -90,6 +91,8 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)
* The scanline has a literal span that begins at some
* offset.
*/
+ if( cc < 4 )
+ goto bad;
off = (bp[0] * 256) + bp[1];
n = (bp[2] * 256) + bp[3];
if (cc < 4+n || off+n > scanline)
@@ -101,7 +104,10 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)
}
default: {
uint32 npixels = 0, grey;
+ tmsize_t op_offset = 0;
uint32 imagewidth = tif->tif_dir.td_imagewidth;
+ if( isTiled(tif) )
+ imagewidth = tif->tif_dir.td_tilewidth;
/*
* The scanline is composed of a sequence of constant
@@ -118,13 +124,19 @@ NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)
* bounds, potentially resulting in a security
* issue.
*/
- while (n-- > 0 && npixels < imagewidth)
+ while (n-- > 0 && npixels < imagewidth && op_offset < scanline)
SETPIXEL(op, grey);
if (npixels >= imagewidth)
break;
+ if (op_offset >= scanline ) {
+ TIFFErrorExt(tif->tif_clientdata, module, "Invalid data for scanline %ld",
+ (long) tif->tif_row);
+ return (0);
+ }
if (cc == 0)
goto bad;
- n = *bp++, cc--;
+ n = *bp++;
+ cc--;
}
break;
}
@@ -139,10 +151,27 @@ bad:
return (0);
}
+static int
+NeXTPreDecode(TIFF* tif, uint16 s)
+{
+ static const char module[] = "NeXTPreDecode";
+ TIFFDirectory *td = &tif->tif_dir;
+ (void)s;
+
+ if( td->td_bitspersample != 2 )
+ {
+ TIFFErrorExt(tif->tif_clientdata, module, "Unsupported BitsPerSample = %d",
+ td->td_bitspersample);
+ return (0);
+ }
+ return (1);
+}
+
int
TIFFInitNeXT(TIFF* tif, int scheme)
{
(void) scheme;
+ tif->tif_predecode = NeXTPreDecode;
tif->tif_decoderow = NeXTDecode;
tif->tif_decodestrip = NeXTDecode;
tif->tif_decodetile = NeXTDecode;
diff --git a/tiff/libtiff/tif_ojpeg.c b/tiff/libtiff/tif_ojpeg.c
index 0c9301d99..30a181263 100644
--- a/tiff/libtiff/tif_ojpeg.c
+++ b/tiff/libtiff/tif_ojpeg.c
@@ -1,4 +1,4 @@
-/* $Id: tif_ojpeg.c,v 1.54 2011-05-31 17:05:07 bfriesen Exp $ */
+/* $Id: tif_ojpeg.c,v 1.65 2016-09-04 21:32:56 erouault Exp $ */
/* WARNING: The type of JPEG encapsulation defined by the TIFF Version 6.0
specification is now totally obsolete and deprecated for new applications and
@@ -39,7 +39,7 @@
OF THIS SOFTWARE.
Joris Van Damme and/or AWare Systems may be available for custom
- developement. If you like what you see, and need anything similar or related,
+ development. If you like what you see, and need anything similar or related,
contact <info@awaresystems.be>.
*/
@@ -75,7 +75,7 @@
OJPEGSubsamplingCorrect, making no note of any other data, reporting no warnings
or errors, up to the point where either these values are read, or it's clear they
aren't there. This means that some of the data is read twice, but we feel speed
- in correcting these values is important enough to warrant this sacrifice. Allthough
+ in correcting these values is important enough to warrant this sacrifice. Although
there is currently no define or other configuration mechanism to disable this behaviour,
the actual header scanning is build to robustly respond with error report if it
should encounter an uncorrected mismatch of subsampling values. See
@@ -84,7 +84,7 @@
The restart interval and restart markers are the most tricky part... The restart
interval can be specified in a tag. It can also be set inside the input JPEG stream.
It can be used inside the input JPEG stream. If reading from strile data, we've
- consistenly discovered the need to insert restart markers in between the different
+ consistently discovered the need to insert restart markers in between the different
striles, as is also probably the most likely interpretation of the original TIFF 6.0
specification. With all this setting of interval, and actual use of markers that is not
predictable at the time of valid JPEG header assembly, the restart thing may turn
@@ -113,7 +113,7 @@
planarconfig is not separate (vast majority). We may one day use that to build
converters to JPEG, and/or to new-style JPEG compression inside TIFF.
- A dissadvantage is the lack of random access to the individual striles. This is the
+ A disadvantage is the lack of random access to the individual striles. This is the
reason for much of the complicated restart-and-position stuff inside OJPEGPreDecode.
Applications would do well accessing all striles in order, as this will result in
a single sequential scan of the input stream, and no restarting of LibJpeg decoding
@@ -135,13 +135,13 @@
* The default mode, without JPEG_ENCAP_EXTERNAL, implements the call encapsulators
* here, internally, with normal longjump.
* SETJMP, LONGJMP, JMP_BUF: On some machines/environments a longjump equivalent is
- * conviniently available, but still it may be worthwhile to use _setjmp or sigsetjmp
+ * conveniently available, but still it may be worthwhile to use _setjmp or sigsetjmp
* in place of plain setjmp. These macros will make it easier. It is useless
* to fiddle with these if you define JPEG_ENCAP_EXTERNAL.
* OJPEG_BUFFER: Define the size of the desired buffer here. Should be small enough so as to guarantee
* instant processing, optimal streaming and optimal use of processor cache, but also big
* enough so as to not result in significant call overhead. It should be at least a few
- * bytes to accomodate some structures (this is verified in asserts), but it would not be
+ * bytes to accommodate some structures (this is verified in asserts), but it would not be
* sensible to make it this small anyway, and it should be at most 64K since it is indexed
* with uint16. We recommend 2K.
* EGYPTIANWALK: You could also define EGYPTIANWALK here, but it is not used anywhere and has
@@ -200,7 +200,7 @@ static const TIFFField ojpegFields[] = {
Libjpeg's jmorecfg.h defines INT16 and INT32, but only if XMD_H is
not defined. Unfortunately, the MinGW and Borland compilers include
a typedef for INT32, which causes a conflict. MSVC does not include
- a conficting typedef given the headers which are included.
+ a conflicting typedef given the headers which are included.
*/
#if defined(__BORLANDC__) || defined(__MINGW32__)
# define XMD_H 1
@@ -528,6 +528,8 @@ OJPEGVSetField(TIFF* tif, uint32 tag, va_list ap)
uint32 ma;
uint64* mb;
uint32 n;
+ const TIFFField* fip;
+
switch(tag)
{
case TIFFTAG_JPEGIFOFFSET:
@@ -597,7 +599,10 @@ OJPEGVSetField(TIFF* tif, uint32 tag, va_list ap)
default:
return (*sp->vsetparent)(tif,tag,ap);
}
- TIFFSetFieldBit(tif,TIFFFieldWithTag(tif,tag)->field_bit);
+ fip = TIFFFieldWithTag(tif,tag);
+ if( fip == NULL ) /* shouldn't happen */
+ return(0);
+ TIFFSetFieldBit(tif,fip->field_bit);
tif->tif_flags|=TIFF_DIRTYDIRECT;
return(1);
}
@@ -1076,7 +1081,7 @@ OJPEGReadHeaderInfo(TIFF* tif)
TIFFErrorExt(tif->tif_clientdata,module,"Incompatible vertical subsampling and image strip/tile length");
return(0);
}
- sp->restart_interval=((sp->strile_width+sp->subsampling_hor*8-1)/(sp->subsampling_hor*8))*(sp->strile_length/(sp->subsampling_ver*8));
+ sp->restart_interval=(uint16)(((sp->strile_width+sp->subsampling_hor*8-1)/(sp->subsampling_hor*8))*(sp->strile_length/(sp->subsampling_ver*8)));
}
if (OJPEGReadHeaderInfoSec(tif)==0)
return(0);
@@ -1098,7 +1103,7 @@ OJPEGReadSecondarySos(TIFF* tif, uint16 s)
assert(s<3);
assert(sp->sos_end[0].log!=0);
assert(sp->sos_end[s].log==0);
- sp->plane_sample_offset=s-1;
+ sp->plane_sample_offset=(uint8)(s-1);
while(sp->sos_end[sp->plane_sample_offset].log==0)
sp->plane_sample_offset--;
sp->in_buffer_source=sp->sos_end[sp->plane_sample_offset].in_buffer_source;
@@ -1146,7 +1151,9 @@ OJPEGWriteHeaderInfo(TIFF* tif)
OJPEGState* sp=(OJPEGState*)tif->tif_data;
uint8** m;
uint32 n;
- assert(sp->libjpeg_session_active==0);
+ /* if a previous attempt failed, don't try again */
+ if (sp->libjpeg_session_active != 0)
+ return 0;
sp->out_state=ososSoi;
sp->restart_index=0;
jpeg_std_error(&(sp->libjpeg_jpeg_error_mgr));
@@ -1374,7 +1381,8 @@ OJPEGReadHeaderInfoSec(TIFF* tif)
static int
OJPEGReadHeaderInfoSecStreamDri(TIFF* tif)
{
- /* this could easilly cause trouble in some cases... but no such cases have occured sofar */
+ /* This could easily cause trouble in some cases... but no such cases have
+ occurred so far */
static const char module[]="OJPEGReadHeaderInfoSecStreamDri";
OJPEGState* sp=(OJPEGState*)tif->tif_data;
uint16 m;
@@ -1490,14 +1498,17 @@ OJPEGReadHeaderInfoSecStreamDht(TIFF* tif)
nb[sizeof(uint32)+1]=JPEG_MARKER_DHT;
nb[sizeof(uint32)+2]=(m>>8);
nb[sizeof(uint32)+3]=(m&255);
- if (OJPEGReadBlock(sp,m-2,&nb[sizeof(uint32)+4])==0)
+ if (OJPEGReadBlock(sp,m-2,&nb[sizeof(uint32)+4])==0) {
+ _TIFFfree(nb);
return(0);
+ }
o=nb[sizeof(uint32)+4];
if ((o&240)==0)
{
if (3<o)
{
TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DHT marker in JPEG data");
+ _TIFFfree(nb);
return(0);
}
if (sp->dctable[o]!=0)
@@ -1509,12 +1520,14 @@ OJPEGReadHeaderInfoSecStreamDht(TIFF* tif)
if ((o&240)!=16)
{
TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DHT marker in JPEG data");
+ _TIFFfree(nb);
return(0);
}
o&=15;
if (3<o)
{
TIFFErrorExt(tif->tif_clientdata,module,"Corrupt DHT marker in JPEG data");
+ _TIFFfree(nb);
return(0);
}
if (sp->actable[o]!=0)
@@ -1767,7 +1780,7 @@ OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif)
ob[sizeof(uint32)+3]=67;
ob[sizeof(uint32)+4]=m;
TIFFSeekFile(tif,sp->qtable_offset[m],SEEK_SET);
- p=TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);
+ p=(uint32)TIFFReadFile(tif,&ob[sizeof(uint32)+5],64);
if (p!=64)
return(0);
sp->qtable[m]=ob;
@@ -1810,7 +1823,7 @@ OJPEGReadHeaderInfoSecTablesDcTable(TIFF* tif)
}
}
TIFFSeekFile(tif,sp->dctable_offset[m],SEEK_SET);
- p=TIFFReadFile(tif,o,16);
+ p=(uint32)TIFFReadFile(tif,o,16);
if (p!=16)
return(0);
q=0;
@@ -1826,12 +1839,12 @@ OJPEGReadHeaderInfoSecTablesDcTable(TIFF* tif)
*(uint32*)rb=ra;
rb[sizeof(uint32)]=255;
rb[sizeof(uint32)+1]=JPEG_MARKER_DHT;
- rb[sizeof(uint32)+2]=((19+q)>>8);
+ rb[sizeof(uint32)+2]=(uint8)((19+q)>>8);
rb[sizeof(uint32)+3]=((19+q)&255);
rb[sizeof(uint32)+4]=m;
for (n=0; n<16; n++)
rb[sizeof(uint32)+5+n]=o[n];
- p=TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q);
+ p=(uint32)TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q);
if (p!=q)
return(0);
sp->dctable[m]=rb;
@@ -1874,7 +1887,7 @@ OJPEGReadHeaderInfoSecTablesAcTable(TIFF* tif)
}
}
TIFFSeekFile(tif,sp->actable_offset[m],SEEK_SET);
- p=TIFFReadFile(tif,o,16);
+ p=(uint32)TIFFReadFile(tif,o,16);
if (p!=16)
return(0);
q=0;
@@ -1890,12 +1903,12 @@ OJPEGReadHeaderInfoSecTablesAcTable(TIFF* tif)
*(uint32*)rb=ra;
rb[sizeof(uint32)]=255;
rb[sizeof(uint32)+1]=JPEG_MARKER_DHT;
- rb[sizeof(uint32)+2]=((19+q)>>8);
+ rb[sizeof(uint32)+2]=(uint8)((19+q)>>8);
rb[sizeof(uint32)+3]=((19+q)&255);
rb[sizeof(uint32)+4]=(16|m);
for (n=0; n<16; n++)
rb[sizeof(uint32)+5+n]=o[n];
- p=TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q);
+ p=(uint32)TIFFReadFile(tif,&(rb[sizeof(uint32)+21]),q);
if (p!=q)
return(0);
sp->actable[m]=rb;
@@ -1953,7 +1966,13 @@ OJPEGReadBufferFill(OJPEGState* sp)
break;
case osibsJpegInterchangeFormat:
sp->in_buffer_source=osibsStrile;
+ break;
case osibsStrile:
+ if (!_TIFFFillStriles( sp->tif )
+ || sp->tif->tif_dir.td_stripoffset == NULL
+ || sp->tif->tif_dir.td_stripbytecount == NULL)
+ return 0;
+
if (sp->in_buffer_next_strile==sp->in_buffer_strile_count)
sp->in_buffer_source=osibsEof;
else
@@ -2251,10 +2270,10 @@ OJPEGWriteStreamSof(TIFF* tif, void** mem, uint32* len)
/* P */
sp->out_buffer[4]=8;
/* Y */
- sp->out_buffer[5]=(sp->sof_y>>8);
+ sp->out_buffer[5]=(uint8)(sp->sof_y>>8);
sp->out_buffer[6]=(sp->sof_y&255);
/* X */
- sp->out_buffer[7]=(sp->sof_x>>8);
+ sp->out_buffer[7]=(uint8)(sp->sof_x>>8);
sp->out_buffer[8]=(sp->sof_x&255);
/* Nf */
sp->out_buffer[9]=sp->samples_per_pixel_per_plane;
@@ -2367,7 +2386,12 @@ OJPEGWriteStreamEoi(TIFF* tif, void** mem, uint32* len)
static int
jpeg_create_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo)
{
- return(SETJMP(sp->exit_jmpbuf)?0:(jpeg_create_decompress(cinfo),1));
+ if( SETJMP(sp->exit_jmpbuf) )
+ return 0;
+ else {
+ jpeg_create_decompress(cinfo);
+ return 1;
+ }
}
#endif
@@ -2375,7 +2399,12 @@ jpeg_create_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo)
static int
jpeg_read_header_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, uint8 require_image)
{
- return(SETJMP(sp->exit_jmpbuf)?0:(jpeg_read_header(cinfo,require_image),1));
+ if( SETJMP(sp->exit_jmpbuf) )
+ return 0;
+ else {
+ jpeg_read_header(cinfo,require_image);
+ return 1;
+ }
}
#endif
@@ -2383,7 +2412,12 @@ jpeg_read_header_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, uint8 requ
static int
jpeg_start_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo)
{
- return(SETJMP(sp->exit_jmpbuf)?0:(jpeg_start_decompress(cinfo),1));
+ if( SETJMP(sp->exit_jmpbuf) )
+ return 0;
+ else {
+ jpeg_start_decompress(cinfo);
+ return 1;
+ }
}
#endif
@@ -2391,7 +2425,12 @@ jpeg_start_decompress_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo)
static int
jpeg_read_scanlines_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* scanlines, uint32 max_lines)
{
- return(SETJMP(sp->exit_jmpbuf)?0:(jpeg_read_scanlines(cinfo,scanlines,max_lines),1));
+ if( SETJMP(sp->exit_jmpbuf) )
+ return 0;
+ else {
+ jpeg_read_scanlines(cinfo,scanlines,max_lines);
+ return 1;
+ }
}
#endif
@@ -2399,7 +2438,12 @@ jpeg_read_scanlines_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* s
static int
jpeg_read_raw_data_encap(OJPEGState* sp, jpeg_decompress_struct* cinfo, void* data, uint32 max_lines)
{
- return(SETJMP(sp->exit_jmpbuf)?0:(jpeg_read_raw_data(cinfo,data,max_lines),1));
+ if( SETJMP(sp->exit_jmpbuf) )
+ return 0;
+ else {
+ jpeg_read_raw_data(cinfo,data,max_lines);
+ return 1;
+ }
}
#endif
@@ -2461,6 +2505,10 @@ OJPEGLibjpegJpegSourceMgrSkipInputData(jpeg_decompress_struct* cinfo, long num_b
jpeg_encap_unwind(tif);
}
+#ifdef _MSC_VER
+#pragma warning( push )
+#pragma warning( disable : 4702 ) /* unreachable code */
+#endif
static boolean
OJPEGLibjpegJpegSourceMgrResyncToRestart(jpeg_decompress_struct* cinfo, int desired)
{
@@ -2470,6 +2518,9 @@ OJPEGLibjpegJpegSourceMgrResyncToRestart(jpeg_decompress_struct* cinfo, int desi
jpeg_encap_unwind(tif);
return(0);
}
+#ifdef _MSC_VER
+#pragma warning( pop )
+#endif
static void
OJPEGLibjpegJpegSourceMgrTermSource(jpeg_decompress_struct* cinfo)
diff --git a/tiff/libtiff/tif_open.c b/tiff/libtiff/tif_open.c
index 8c88328cf..5c9036e6b 100644
--- a/tiff/libtiff/tif_open.c
+++ b/tiff/libtiff/tif_open.c
@@ -1,4 +1,4 @@
-/* $Id: tif_open.c,v 1.46 2010-12-06 16:54:54 faxguy Exp $ */
+/* $Id: tif_open.c,v 1.47 2016-01-23 21:20:34 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -168,7 +168,7 @@ TIFFClientOpen(
* The following flags may be used to control intrinsic library
* behaviour that may or may not be desirable (usually for
* compatibility with some application that claims to support
- * TIFF but only supports some braindead idea of what the
+ * TIFF but only supports some brain dead idea of what the
* vendor thinks TIFF is):
*
* 'l' use little-endian byte order for creating a file
@@ -198,8 +198,8 @@ TIFFClientOpen(
* The 'L', 'B', and 'H' flags are intended for applications
* that can optimize operations on data by using a particular
* bit order. By default the library returns data in MSB2LSB
- * bit order for compatibiltiy with older versions of this
- * library. Returning data in the bit order of the native cpu
+ * bit order for compatibility with older versions of this
+ * library. Returning data in the bit order of the native CPU
* makes the most sense but also requires applications to check
* the value of the FillOrder tag; something they probably do
* not do right now.
diff --git a/tiff/libtiff/tif_packbits.c b/tiff/libtiff/tif_packbits.c
index a79abe860..d2a0165de 100644
--- a/tiff/libtiff/tif_packbits.c
+++ b/tiff/libtiff/tif_packbits.c
@@ -1,4 +1,4 @@
-/* $Id: tif_packbits.c,v 1.20 2010-03-10 18:56:49 bfriesen Exp $ */
+/* $Id: tif_packbits.c,v 1.24 2016-09-04 21:32:56 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -38,7 +38,8 @@ PackBitsPreEncode(TIFF* tif, uint16 s)
{
(void) s;
- if (!(tif->tif_data = (uint8*)_TIFFmalloc(sizeof(tmsize_t))))
+ tif->tif_data = (uint8*)_TIFFmalloc(sizeof(tmsize_t));
+ if (tif->tif_data == NULL)
return (0);
/*
* Calculate the scanline/tile-width size in bytes.
@@ -81,7 +82,9 @@ PackBitsEncode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
/*
* Find the longest string of identical bytes.
*/
- b = *bp++, cc--, n = 1;
+ b = *bp++;
+ cc--;
+ n = 1;
for (; cc > 0 && b == *bp; cc--, bp++)
n++;
again:
@@ -222,7 +225,8 @@ PackBitsDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
bp = (char*) tif->tif_rawcp;
cc = tif->tif_rawcc;
while (cc > 0 && occ > 0) {
- n = (long) *bp++, cc--;
+ n = (long) *bp++;
+ cc--;
/*
* Watch out for compilers that
* don't sign extend chars...
@@ -241,7 +245,8 @@ PackBitsDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
n = (long)occ;
}
occ -= n;
- b = *bp++, cc--; /* TODO: may be reading past input buffer here when input data is corrupt or ends prematurely */
+ b = *bp++;
+ cc--;
while (n-- > 0)
*op++ = (uint8) b;
} else { /* copy next n+1 bytes literally */
@@ -252,7 +257,13 @@ PackBitsDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
(unsigned long) ((tmsize_t)n - occ + 1));
n = (long)occ - 1;
}
- _TIFFmemcpy(op, bp, ++n); /* TODO: may be reading past input buffer here when input data is corrupt or ends prematurely */
+ if (cc < (tmsize_t) (n+1))
+ {
+ TIFFWarningExt(tif->tif_clientdata, module,
+ "Terminating PackBitsDecode due to lack of data.");
+ break;
+ }
+ _TIFFmemcpy(op, bp, ++n);
op += n; occ -= n;
bp += n; cc -= n;
}
diff --git a/tiff/libtiff/tif_pixarlog.c b/tiff/libtiff/tif_pixarlog.c
index 4cb266d20..ef78b7066 100644
--- a/tiff/libtiff/tif_pixarlog.c
+++ b/tiff/libtiff/tif_pixarlog.c
@@ -1,4 +1,4 @@
-/* $Id: tif_pixarlog.c,v 1.35 2011-01-06 16:00:23 fwarmerdam Exp $ */
+/* $Id: tif_pixarlog.c,v 1.48 2016-09-23 22:12:18 erouault Exp $ */
/*
* Copyright (c) 1996-1997 Sam Leffler
@@ -45,15 +45,15 @@
* input is assumed to be unsigned linear color values that represent
* the range 0-1. In the case of IEEE values, the 0-1 range is assumed to
* be the normal linear color range, in addition over 1 values are
- * accepted up to a value of about 25.0 to encode "hot" hightlights and such.
+ * accepted up to a value of about 25.0 to encode "hot" highlights and such.
* The encoding is lossless for 8-bit values, slightly lossy for the
* other bit depths. The actual color precision should be better
* than the human eye can perceive with extra room to allow for
* error introduced by further image computation. As with any quantized
* color format, it is possible to perform image calculations which
* expose the quantization error. This format should certainly be less
- * susceptable to such errors than standard 8-bit encodings, but more
- * susceptable than straight 16-bit or 32-bit encodings.
+ * susceptible to such errors than standard 8-bit encodings, but more
+ * susceptible than straight 16-bit or 32-bit encodings.
*
* On reading the internal format is converted to the desired output format.
* The program can request which format it desires by setting the internal
@@ -117,9 +117,9 @@ horizontalAccumulateF(uint16 *wp, int n, int stride, float *op,
if (n >= stride) {
mask = CODE_MASK;
if (stride == 3) {
- t0 = ToLinearF[cr = wp[0]];
- t1 = ToLinearF[cg = wp[1]];
- t2 = ToLinearF[cb = wp[2]];
+ t0 = ToLinearF[cr = (wp[0] & mask)];
+ t1 = ToLinearF[cg = (wp[1] & mask)];
+ t2 = ToLinearF[cb = (wp[2] & mask)];
op[0] = t0;
op[1] = t1;
op[2] = t2;
@@ -136,10 +136,10 @@ horizontalAccumulateF(uint16 *wp, int n, int stride, float *op,
op[2] = t2;
}
} else if (stride == 4) {
- t0 = ToLinearF[cr = wp[0]];
- t1 = ToLinearF[cg = wp[1]];
- t2 = ToLinearF[cb = wp[2]];
- t3 = ToLinearF[ca = wp[3]];
+ t0 = ToLinearF[cr = (wp[0] & mask)];
+ t1 = ToLinearF[cg = (wp[1] & mask)];
+ t2 = ToLinearF[cb = (wp[2] & mask)];
+ t3 = ToLinearF[ca = (wp[3] & mask)];
op[0] = t0;
op[1] = t1;
op[2] = t2;
@@ -183,9 +183,9 @@ horizontalAccumulate12(uint16 *wp, int n, int stride, int16 *op,
if (n >= stride) {
mask = CODE_MASK;
if (stride == 3) {
- t0 = ToLinearF[cr = wp[0]] * SCALE12;
- t1 = ToLinearF[cg = wp[1]] * SCALE12;
- t2 = ToLinearF[cb = wp[2]] * SCALE12;
+ t0 = ToLinearF[cr = (wp[0] & mask)] * SCALE12;
+ t1 = ToLinearF[cg = (wp[1] & mask)] * SCALE12;
+ t2 = ToLinearF[cb = (wp[2] & mask)] * SCALE12;
op[0] = CLAMP12(t0);
op[1] = CLAMP12(t1);
op[2] = CLAMP12(t2);
@@ -202,10 +202,10 @@ horizontalAccumulate12(uint16 *wp, int n, int stride, int16 *op,
op[2] = CLAMP12(t2);
}
} else if (stride == 4) {
- t0 = ToLinearF[cr = wp[0]] * SCALE12;
- t1 = ToLinearF[cg = wp[1]] * SCALE12;
- t2 = ToLinearF[cb = wp[2]] * SCALE12;
- t3 = ToLinearF[ca = wp[3]] * SCALE12;
+ t0 = ToLinearF[cr = (wp[0] & mask)] * SCALE12;
+ t1 = ToLinearF[cg = (wp[1] & mask)] * SCALE12;
+ t2 = ToLinearF[cb = (wp[2] & mask)] * SCALE12;
+ t3 = ToLinearF[ca = (wp[3] & mask)] * SCALE12;
op[0] = CLAMP12(t0);
op[1] = CLAMP12(t1);
op[2] = CLAMP12(t2);
@@ -247,9 +247,9 @@ horizontalAccumulate16(uint16 *wp, int n, int stride, uint16 *op,
if (n >= stride) {
mask = CODE_MASK;
if (stride == 3) {
- op[0] = ToLinear16[cr = wp[0]];
- op[1] = ToLinear16[cg = wp[1]];
- op[2] = ToLinear16[cb = wp[2]];
+ op[0] = ToLinear16[cr = (wp[0] & mask)];
+ op[1] = ToLinear16[cg = (wp[1] & mask)];
+ op[2] = ToLinear16[cb = (wp[2] & mask)];
n -= 3;
while (n > 0) {
wp += 3;
@@ -260,10 +260,10 @@ horizontalAccumulate16(uint16 *wp, int n, int stride, uint16 *op,
op[2] = ToLinear16[(cb += wp[2]) & mask];
}
} else if (stride == 4) {
- op[0] = ToLinear16[cr = wp[0]];
- op[1] = ToLinear16[cg = wp[1]];
- op[2] = ToLinear16[cb = wp[2]];
- op[3] = ToLinear16[ca = wp[3]];
+ op[0] = ToLinear16[cr = (wp[0] & mask)];
+ op[1] = ToLinear16[cg = (wp[1] & mask)];
+ op[2] = ToLinear16[cb = (wp[2] & mask)];
+ op[3] = ToLinear16[ca = (wp[3] & mask)];
n -= 4;
while (n > 0) {
wp += 4;
@@ -293,33 +293,35 @@ horizontalAccumulate16(uint16 *wp, int n, int stride, uint16 *op,
static void
horizontalAccumulate11(uint16 *wp, int n, int stride, uint16 *op)
{
- register unsigned int cr, cg, cb, ca, mask;
+ register unsigned int cr, cg, cb, ca, mask;
if (n >= stride) {
mask = CODE_MASK;
if (stride == 3) {
- op[0] = cr = wp[0]; op[1] = cg = wp[1]; op[2] = cb = wp[2];
+ op[0] = wp[0]; op[1] = wp[1]; op[2] = wp[2];
+ cr = wp[0]; cg = wp[1]; cb = wp[2];
n -= 3;
while (n > 0) {
wp += 3;
op += 3;
n -= 3;
- op[0] = (cr += wp[0]) & mask;
- op[1] = (cg += wp[1]) & mask;
- op[2] = (cb += wp[2]) & mask;
+ op[0] = (uint16)((cr += wp[0]) & mask);
+ op[1] = (uint16)((cg += wp[1]) & mask);
+ op[2] = (uint16)((cb += wp[2]) & mask);
}
} else if (stride == 4) {
- op[0] = cr = wp[0]; op[1] = cg = wp[1];
- op[2] = cb = wp[2]; op[3] = ca = wp[3];
+ op[0] = wp[0]; op[1] = wp[1];
+ op[2] = wp[2]; op[3] = wp[3];
+ cr = wp[0]; cg = wp[1]; cb = wp[2]; ca = wp[3];
n -= 4;
while (n > 0) {
wp += 4;
op += 4;
n -= 4;
- op[0] = (cr += wp[0]) & mask;
- op[1] = (cg += wp[1]) & mask;
- op[2] = (cb += wp[2]) & mask;
- op[3] = (ca += wp[3]) & mask;
+ op[0] = (uint16)((cr += wp[0]) & mask);
+ op[1] = (uint16)((cg += wp[1]) & mask);
+ op[2] = (uint16)((cb += wp[2]) & mask);
+ op[3] = (uint16)((ca += wp[3]) & mask);
}
} else {
REPEAT(stride, *op = *wp&mask; wp++; op++)
@@ -342,9 +344,9 @@ horizontalAccumulate8(uint16 *wp, int n, int stride, unsigned char *op,
if (n >= stride) {
mask = CODE_MASK;
if (stride == 3) {
- op[0] = ToLinear8[cr = wp[0]];
- op[1] = ToLinear8[cg = wp[1]];
- op[2] = ToLinear8[cb = wp[2]];
+ op[0] = ToLinear8[cr = (wp[0] & mask)];
+ op[1] = ToLinear8[cg = (wp[1] & mask)];
+ op[2] = ToLinear8[cb = (wp[2] & mask)];
n -= 3;
while (n > 0) {
n -= 3;
@@ -355,10 +357,10 @@ horizontalAccumulate8(uint16 *wp, int n, int stride, unsigned char *op,
op[2] = ToLinear8[(cb += wp[2]) & mask];
}
} else if (stride == 4) {
- op[0] = ToLinear8[cr = wp[0]];
- op[1] = ToLinear8[cg = wp[1]];
- op[2] = ToLinear8[cb = wp[2]];
- op[3] = ToLinear8[ca = wp[3]];
+ op[0] = ToLinear8[cr = (wp[0] & mask)];
+ op[1] = ToLinear8[cg = (wp[1] & mask)];
+ op[2] = ToLinear8[cb = (wp[2] & mask)];
+ op[3] = ToLinear8[ca = (wp[3] & mask)];
n -= 4;
while (n > 0) {
n -= 4;
@@ -393,9 +395,9 @@ horizontalAccumulate8abgr(uint16 *wp, int n, int stride, unsigned char *op,
mask = CODE_MASK;
if (stride == 3) {
op[0] = 0;
- t1 = ToLinear8[cb = wp[2]];
- t2 = ToLinear8[cg = wp[1]];
- t3 = ToLinear8[cr = wp[0]];
+ t1 = ToLinear8[cb = (wp[2] & mask)];
+ t2 = ToLinear8[cg = (wp[1] & mask)];
+ t3 = ToLinear8[cr = (wp[0] & mask)];
op[1] = t1;
op[2] = t2;
op[3] = t3;
@@ -413,10 +415,10 @@ horizontalAccumulate8abgr(uint16 *wp, int n, int stride, unsigned char *op,
op[3] = t3;
}
} else if (stride == 4) {
- t0 = ToLinear8[ca = wp[3]];
- t1 = ToLinear8[cb = wp[2]];
- t2 = ToLinear8[cg = wp[1]];
- t3 = ToLinear8[cr = wp[0]];
+ t0 = ToLinear8[ca = (wp[3] & mask)];
+ t1 = ToLinear8[cb = (wp[2] & mask)];
+ t2 = ToLinear8[cg = (wp[1] & mask)];
+ t3 = ToLinear8[cr = (wp[0] & mask)];
op[0] = t0;
op[1] = t1;
op[2] = t2;
@@ -454,6 +456,7 @@ horizontalAccumulate8abgr(uint16 *wp, int n, int stride, unsigned char *op,
typedef struct {
TIFFPredictorState predict;
z_stream stream;
+ tmsize_t tbuf_size; /* only set/used on reading for now */
uint16 *tbuf;
uint16 stride;
int state;
@@ -556,7 +559,7 @@ PixarLogMakeTables(PixarLogState *sp)
for (i = 0; i < lt2size; i++) {
if ((i*linstep)*(i*linstep) > ToLinearF[j]*ToLinearF[j+1])
j++;
- FromLT2[i] = j;
+ FromLT2[i] = (uint16)j;
}
/*
@@ -568,14 +571,14 @@ PixarLogMakeTables(PixarLogState *sp)
for (i = 0; i < 16384; i++) {
while ((i/16383.)*(i/16383.) > ToLinearF[j]*ToLinearF[j+1])
j++;
- From14[i] = j;
+ From14[i] = (uint16)j;
}
j = 0;
for (i = 0; i < 256; i++) {
while ((i/255.)*(i/255.) > ToLinearF[j]*ToLinearF[j+1])
j++;
- From8[i] = j;
+ From8[i] = (uint16)j;
}
sp->Fltsize = (float)(lt2size/2);
@@ -644,6 +647,20 @@ multiply_ms(tmsize_t m1, tmsize_t m2)
return bytes;
}
+static tmsize_t
+add_ms(tmsize_t m1, tmsize_t m2)
+{
+ tmsize_t bytes = m1 + m2;
+
+ /* if either input is zero, assume overflow already occurred */
+ if (m1 == 0 || m2 == 0)
+ bytes = 0;
+ else if (bytes <= m1 || bytes <= m2)
+ bytes = 0;
+
+ return bytes;
+}
+
static int
PixarLogFixupTags(TIFF* tif)
{
@@ -671,11 +688,14 @@ PixarLogSetupDecode(TIFF* tif)
td->td_samplesperpixel : 1);
tbuf_size = multiply_ms(multiply_ms(multiply_ms(sp->stride, td->td_imagewidth),
td->td_rowsperstrip), sizeof(uint16));
+ /* add one more stride in case input ends mid-stride */
+ tbuf_size = add_ms(tbuf_size, sizeof(uint16) * sp->stride);
if (tbuf_size == 0)
return (0); /* TODO: this is an error return without error report through TIFFErrorExt */
sp->tbuf = (uint16 *) _TIFFmalloc(tbuf_size);
if (sp->tbuf == NULL)
return (0);
+ sp->tbuf_size = tbuf_size;
if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN)
sp->user_datafmt = PixarLogGuessDataFmt(td);
if (sp->user_datafmt == PIXARLOGDATAFMT_UNKNOWN) {
@@ -686,7 +706,7 @@ PixarLogSetupDecode(TIFF* tif)
}
if (inflateInit(&sp->stream) != Z_OK) {
- TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg);
+ TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg ? sp->stream.msg : "(null)");
return (0);
} else {
sp->state |= PLSTATE_INIT;
@@ -709,7 +729,7 @@ PixarLogPreDecode(TIFF* tif, uint16 s)
assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised,
we need to simplify this code to reflect a ZLib that is likely updated
to deal with 8byte memory sizes, though this code will respond
- apropriately even before we simplify it */
+ appropriately even before we simplify it */
sp->stream.avail_in = (uInt) tif->tif_rawcc;
if ((tmsize_t)sp->stream.avail_in != tif->tif_rawcc)
{
@@ -758,13 +778,19 @@ PixarLogDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised,
we need to simplify this code to reflect a ZLib that is likely updated
to deal with 8byte memory sizes, though this code will respond
- apropriately even before we simplify it */
+ appropriately even before we simplify it */
sp->stream.avail_out = (uInt) (nsamples * sizeof(uint16));
if (sp->stream.avail_out != nsamples * sizeof(uint16))
{
TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size");
return (0);
}
+ /* Check that we will not fill more than what was allocated */
+ if ((tmsize_t)sp->stream.avail_out > sp->tbuf_size)
+ {
+ TIFFErrorExt(tif->tif_clientdata, module, "sp->stream.avail_out > sp->tbuf_size");
+ return (0);
+ }
do {
int state = inflate(&sp->stream, Z_PARTIAL_FLUSH);
if (state == Z_STREAM_END) {
@@ -773,14 +799,14 @@ PixarLogDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
if (state == Z_DATA_ERROR) {
TIFFErrorExt(tif->tif_clientdata, module,
"Decoding error at scanline %lu, %s",
- (unsigned long) tif->tif_row, sp->stream.msg);
+ (unsigned long) tif->tif_row, sp->stream.msg ? sp->stream.msg : "(null)");
if (inflateSync(&sp->stream) != Z_OK)
return (0);
continue;
}
if (state != Z_OK) {
TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s",
- sp->stream.msg);
+ sp->stream.msg ? sp->stream.msg : "(null)");
return (0);
}
} while (sp->stream.avail_out > 0);
@@ -882,7 +908,7 @@ PixarLogSetupEncode(TIFF* tif)
}
if (deflateInit(&sp->stream, sp->quality) != Z_OK) {
- TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg);
+ TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg ? sp->stream.msg : "(null)");
return (0);
} else {
sp->state |= PLSTATE_INIT;
@@ -905,8 +931,8 @@ PixarLogPreEncode(TIFF* tif, uint16 s)
assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised,
we need to simplify this code to reflect a ZLib that is likely updated
to deal with 8byte memory sizes, though this code will respond
- apropriately even before we simplify it */
- sp->stream.avail_out = tif->tif_rawdatasize;
+ appropriately even before we simplify it */
+ sp->stream.avail_out = (uInt)tif->tif_rawdatasize;
if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize)
{
TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size");
@@ -919,15 +945,16 @@ static void
horizontalDifferenceF(PixarLogState *sp, float *ip, int n, int stride, uint16 *wp, uint16 *FromLT2)
{
int32 r1, g1, b1, a1, r2, g2, b2, a2, mask;
+ float fltsize = sp->Fltsize;
-#define CLAMP(v) ( (v<(float)0.) ? 0 \
- : (v<(float)2.) ? sp->FromLT2[(int)(v*sp->Fltsize)] \
- : (v>(float)24.2) ? 2047 \
- : sp->LogK1*log(v*sp->LogK2) + 0.5 )
+#define CLAMP(v) ( (v<(float)0.) ? 0 \
+ : (v<(float)2.) ? FromLT2[(int)(v*fltsize)] \
+ : (v>(float)24.2) ? 2047 \
+ : sp->LogK1*log(v*sp->LogK2) + 0.5 )
mask = CODE_MASK;
- if (n >= sp->stride) {
- if (sp->stride == 3) {
+ if (n >= stride) {
+ if (stride == 3) {
r2 = wp[0] = (uint16) CLAMP(ip[0]);
g2 = wp[1] = (uint16) CLAMP(ip[1]);
b2 = wp[2] = (uint16) CLAMP(ip[2]);
@@ -936,9 +963,9 @@ horizontalDifferenceF(PixarLogState *sp, float *ip, int n, int stride, uint16 *w
n -= 3;
wp += 3;
ip += 3;
- r1 = (int32) CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
- g1 = (int32) CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
- b1 = (int32) CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
+ r1 = (int32) CLAMP(ip[0]); wp[0] = (uint16)((r1-r2) & mask); r2 = r1;
+ g1 = (int32) CLAMP(ip[1]); wp[1] = (uint16)((g1-g2) & mask); g2 = g1;
+ b1 = (int32) CLAMP(ip[2]); wp[2] = (uint16)((b1-b2) & mask); b2 = b1;
}
} else if (sp->stride == 4) {
r2 = wp[0] = (uint16) CLAMP(ip[0]);
@@ -950,23 +977,20 @@ horizontalDifferenceF(PixarLogState *sp, float *ip, int n, int stride, uint16 *w
n -= 4;
wp += 4;
ip += 4;
- r1 = (int32) CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
- g1 = (int32) CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
- b1 = (int32) CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
- a1 = (int32) CLAMP(ip[3]); wp[3] = (a1-a2) & mask; a2 = a1;
+ r1 = (int32) CLAMP(ip[0]); wp[0] = (uint16)((r1-r2) & mask); r2 = r1;
+ g1 = (int32) CLAMP(ip[1]); wp[1] = (uint16)((g1-g2) & mask); g2 = g1;
+ b1 = (int32) CLAMP(ip[2]); wp[2] = (uint16)((b1-b2) & mask); b2 = b1;
+ a1 = (int32) CLAMP(ip[3]); wp[3] = (uint16)((a1-a2) & mask); a2 = a1;
}
} else {
- ip += n - 1; /* point to last one */
- wp += n - 1; /* point to last one */
- n -= sp->stride;
- while (n > 0) {
- REPEAT(sp->stride, wp[0] = (uint16) CLAMP(ip[0]);
- wp[sp->stride] -= wp[0];
- wp[sp->stride] &= mask;
- wp--; ip--)
- n -= sp->stride;
- }
- REPEAT(sp->stride, wp[0] = (uint16) CLAMP(ip[0]); wp--; ip--)
+ REPEAT(stride, wp[0] = (uint16) CLAMP(ip[0]); wp++; ip++)
+ n -= stride;
+ while (n > 0) {
+ REPEAT(stride,
+ wp[0] = (uint16)(((int32)CLAMP(ip[0])-(int32)CLAMP(ip[-stride])) & mask);
+ wp++; ip++)
+ n -= stride;
+ }
}
}
}
@@ -991,9 +1015,9 @@ horizontalDifference16(unsigned short *ip, int n, int stride,
n -= 3;
wp += 3;
ip += 3;
- r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
- g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
- b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
+ r1 = CLAMP(ip[0]); wp[0] = (uint16)((r1-r2) & mask); r2 = r1;
+ g1 = CLAMP(ip[1]); wp[1] = (uint16)((g1-g2) & mask); g2 = g1;
+ b1 = CLAMP(ip[2]); wp[2] = (uint16)((b1-b2) & mask); b2 = b1;
}
} else if (stride == 4) {
r2 = wp[0] = CLAMP(ip[0]); g2 = wp[1] = CLAMP(ip[1]);
@@ -1003,23 +1027,20 @@ horizontalDifference16(unsigned short *ip, int n, int stride,
n -= 4;
wp += 4;
ip += 4;
- r1 = CLAMP(ip[0]); wp[0] = (r1-r2) & mask; r2 = r1;
- g1 = CLAMP(ip[1]); wp[1] = (g1-g2) & mask; g2 = g1;
- b1 = CLAMP(ip[2]); wp[2] = (b1-b2) & mask; b2 = b1;
- a1 = CLAMP(ip[3]); wp[3] = (a1-a2) & mask; a2 = a1;
+ r1 = CLAMP(ip[0]); wp[0] = (uint16)((r1-r2) & mask); r2 = r1;
+ g1 = CLAMP(ip[1]); wp[1] = (uint16)((g1-g2) & mask); g2 = g1;
+ b1 = CLAMP(ip[2]); wp[2] = (uint16)((b1-b2) & mask); b2 = b1;
+ a1 = CLAMP(ip[3]); wp[3] = (uint16)((a1-a2) & mask); a2 = a1;
}
} else {
- ip += n - 1; /* point to last one */
- wp += n - 1; /* point to last one */
+ REPEAT(stride, wp[0] = CLAMP(ip[0]); wp++; ip++)
n -= stride;
while (n > 0) {
- REPEAT(stride, wp[0] = CLAMP(ip[0]);
- wp[stride] -= wp[0];
- wp[stride] &= mask;
- wp--; ip--)
- n -= stride;
- }
- REPEAT(stride, wp[0] = CLAMP(ip[0]); wp--; ip--)
+ REPEAT(stride,
+ wp[0] = (uint16)((CLAMP(ip[0])-CLAMP(ip[-stride])) & mask);
+ wp++; ip++)
+ n -= stride;
+ }
}
}
}
@@ -1042,9 +1063,9 @@ horizontalDifference8(unsigned char *ip, int n, int stride,
n -= 3;
while (n > 0) {
n -= 3;
- r1 = CLAMP(ip[3]); wp[3] = (r1-r2) & mask; r2 = r1;
- g1 = CLAMP(ip[4]); wp[4] = (g1-g2) & mask; g2 = g1;
- b1 = CLAMP(ip[5]); wp[5] = (b1-b2) & mask; b2 = b1;
+ r1 = CLAMP(ip[3]); wp[3] = (uint16)((r1-r2) & mask); r2 = r1;
+ g1 = CLAMP(ip[4]); wp[4] = (uint16)((g1-g2) & mask); g2 = g1;
+ b1 = CLAMP(ip[5]); wp[5] = (uint16)((b1-b2) & mask); b2 = b1;
wp += 3;
ip += 3;
}
@@ -1054,26 +1075,23 @@ horizontalDifference8(unsigned char *ip, int n, int stride,
n -= 4;
while (n > 0) {
n -= 4;
- r1 = CLAMP(ip[4]); wp[4] = (r1-r2) & mask; r2 = r1;
- g1 = CLAMP(ip[5]); wp[5] = (g1-g2) & mask; g2 = g1;
- b1 = CLAMP(ip[6]); wp[6] = (b1-b2) & mask; b2 = b1;
- a1 = CLAMP(ip[7]); wp[7] = (a1-a2) & mask; a2 = a1;
+ r1 = CLAMP(ip[4]); wp[4] = (uint16)((r1-r2) & mask); r2 = r1;
+ g1 = CLAMP(ip[5]); wp[5] = (uint16)((g1-g2) & mask); g2 = g1;
+ b1 = CLAMP(ip[6]); wp[6] = (uint16)((b1-b2) & mask); b2 = b1;
+ a1 = CLAMP(ip[7]); wp[7] = (uint16)((a1-a2) & mask); a2 = a1;
wp += 4;
ip += 4;
}
} else {
- wp += n + stride - 1; /* point to last one */
- ip += n + stride - 1; /* point to last one */
- n -= stride;
- while (n > 0) {
- REPEAT(stride, wp[0] = CLAMP(ip[0]);
- wp[stride] -= wp[0];
- wp[stride] &= mask;
- wp--; ip--)
- n -= stride;
- }
- REPEAT(stride, wp[0] = CLAMP(ip[0]); wp--; ip--)
- }
+ REPEAT(stride, wp[0] = CLAMP(ip[0]); wp++; ip++)
+ n -= stride;
+ while (n > 0) {
+ REPEAT(stride,
+ wp[0] = (uint16)((CLAMP(ip[0])-CLAMP(ip[-stride])) & mask);
+ wp++; ip++)
+ n -= stride;
+ }
+ }
}
}
@@ -1114,11 +1132,19 @@ PixarLogEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
}
llen = sp->stride * td->td_imagewidth;
+ /* Check against the number of elements (of size uint16) of sp->tbuf */
+ if( n > (tmsize_t)(td->td_rowsperstrip * llen) )
+ {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Too many input bytes provided");
+ return 0;
+ }
for (i = 0, up = sp->tbuf; i < n; i += llen, up += llen) {
switch (sp->user_datafmt) {
case PIXARLOGDATAFMT_FLOAT:
- horizontalDifferenceF(sp, (float *)bp, llen, sp->stride, up, sp->FromLT2);
+ horizontalDifferenceF(sp, (float *)bp, llen,
+ sp->stride, up, sp->FromLT2);
bp += llen * sizeof(float);
break;
case PIXARLOGDATAFMT_16BIT:
@@ -1143,7 +1169,7 @@ PixarLogEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised,
we need to simplify this code to reflect a ZLib that is likely updated
to deal with 8byte memory sizes, though this code will respond
- apropriately even before we simplify it */
+ appropriately even before we simplify it */
sp->stream.avail_in = (uInt) (n * sizeof(uint16));
if ((sp->stream.avail_in / sizeof(uint16)) != (uInt) n)
{
@@ -1155,7 +1181,7 @@ PixarLogEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
do {
if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) {
TIFFErrorExt(tif->tif_clientdata, module, "Encoder error: %s",
- sp->stream.msg);
+ sp->stream.msg ? sp->stream.msg : "(null)");
return (0);
}
if (sp->stream.avail_out == 0) {
@@ -1197,7 +1223,7 @@ PixarLogPostEncode(TIFF* tif)
break;
default:
TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s",
- sp->stream.msg);
+ sp->stream.msg ? sp->stream.msg : "(null)");
return (0);
}
} while (state != Z_STREAM_END);
@@ -1209,7 +1235,7 @@ PixarLogClose(TIFF* tif)
{
TIFFDirectory *td = &tif->tif_dir;
- /* In a really sneaky (and really incorrect, and untruthfull, and
+ /* In a really sneaky (and really incorrect, and untruthful, and
* troublesome, and error-prone) maneuver that completely goes against
* the spirit of TIFF, and breaks TIFF, on close, we covertly
* modify both bitspersample and sampleformat in the directory to
@@ -1267,7 +1293,7 @@ PixarLogVSetField(TIFF* tif, uint32 tag, va_list ap)
if (deflateParams(&sp->stream,
sp->quality, Z_DEFAULT_STRATEGY) != Z_OK) {
TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s",
- sp->stream.msg);
+ sp->stream.msg ? sp->stream.msg : "(null)");
return (0);
}
}
diff --git a/tiff/libtiff/tif_predict.c b/tiff/libtiff/tif_predict.c
index f93c6645f..0b185d2e2 100644
--- a/tiff/libtiff/tif_predict.c
+++ b/tiff/libtiff/tif_predict.c
@@ -1,4 +1,4 @@
-/* $Id: tif_predict.c,v 1.32 2010-03-10 18:56:49 bfriesen Exp $ */
+/* $Id: tif_predict.c,v 1.40 2016-11-04 09:19:13 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -34,16 +34,18 @@
#define PredictorState(tif) ((TIFFPredictorState*) (tif)->tif_data)
-static void horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc);
-static void horAcc16(TIFF* tif, uint8* cp0, tmsize_t cc);
-static void horAcc32(TIFF* tif, uint8* cp0, tmsize_t cc);
-static void swabHorAcc16(TIFF* tif, uint8* cp0, tmsize_t cc);
-static void swabHorAcc32(TIFF* tif, uint8* cp0, tmsize_t cc);
-static void horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc);
-static void horDiff16(TIFF* tif, uint8* cp0, tmsize_t cc);
-static void horDiff32(TIFF* tif, uint8* cp0, tmsize_t cc);
-static void fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc);
-static void fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc);
+static int horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc);
+static int horAcc16(TIFF* tif, uint8* cp0, tmsize_t cc);
+static int horAcc32(TIFF* tif, uint8* cp0, tmsize_t cc);
+static int swabHorAcc16(TIFF* tif, uint8* cp0, tmsize_t cc);
+static int swabHorAcc32(TIFF* tif, uint8* cp0, tmsize_t cc);
+static int horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc);
+static int horDiff16(TIFF* tif, uint8* cp0, tmsize_t cc);
+static int horDiff32(TIFF* tif, uint8* cp0, tmsize_t cc);
+static int swabHorDiff16(TIFF* tif, uint8* cp0, tmsize_t cc);
+static int swabHorDiff32(TIFF* tif, uint8* cp0, tmsize_t cc);
+static int fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc);
+static int fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc);
static int PredictorDecodeRow(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s);
static int PredictorDecodeTile(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s);
static int PredictorEncodeRow(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s);
@@ -78,6 +80,15 @@ PredictorSetup(TIFF* tif)
td->td_sampleformat);
return 0;
}
+ if (td->td_bitspersample != 16
+ && td->td_bitspersample != 24
+ && td->td_bitspersample != 32
+ && td->td_bitspersample != 64) { /* Should 64 be allowed? */
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Floating point \"Predictor\" not supported with %d-bit samples",
+ td->td_bitspersample);
+ return 0;
+ }
break;
default:
TIFFErrorExt(tif->tif_clientdata, module,
@@ -172,7 +183,7 @@ PredictorSetupDecode(TIFF* tif)
}
/*
* Allocate buffer to keep the decoded bytes before
- * rearranging in the ight order
+ * rearranging in the right order
*/
}
@@ -207,7 +218,24 @@ PredictorSetupEncode(TIFF* tif)
sp->encodetile = tif->tif_encodetile;
tif->tif_encodetile = PredictorEncodeTile;
}
- }
+
+ /*
+ * If the data is horizontally differenced 16-bit data that
+ * requires byte-swapping, then it must be byte swapped after
+ * the differentiation step. We do this with a special-purpose
+ * routine and override the normal post decoding logic that
+ * the library setup when the directory was read.
+ */
+ if (tif->tif_flags & TIFF_SWAB) {
+ if (sp->encodepfunc == horDiff16) {
+ sp->encodepfunc = swabHorDiff16;
+ tif->tif_postdecode = _TIFFNoPostDecode;
+ } else if (sp->encodepfunc == horDiff32) {
+ sp->encodepfunc = swabHorDiff32;
+ tif->tif_postdecode = _TIFFNoPostDecode;
+ }
+ }
+ }
else if (sp->predictor == 3) {
sp->encodepfunc = fpDiff;
@@ -239,13 +267,25 @@ PredictorSetupEncode(TIFF* tif)
case 0: ; \
}
-static void
+/* Remarks related to C standard compliance in all below functions : */
+/* - to avoid any undefined behaviour, we only operate on unsigned types */
+/* since the behaviour of "overflows" is defined (wrap over) */
+/* - when storing into the byte stream, we explicitly mask with 0xff so */
+/* as to make icc -check=conversions happy (not necessary by the standard) */
+
+static int
horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc)
{
tmsize_t stride = PredictorState(tif)->stride;
- char* cp = (char*) cp0;
- assert((cc%stride)==0);
+ unsigned char* cp = (unsigned char*) cp0;
+ if((cc%stride)!=0)
+ {
+ TIFFErrorExt(tif->tif_clientdata, "horAcc8",
+ "%s", "(cc%stride)!=0");
+ return 0;
+ }
+
if (cc > stride) {
/*
* Pipeline the most common cases.
@@ -257,9 +297,9 @@ horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc)
cc -= 3;
cp += 3;
while (cc>0) {
- cp[0] = (char) (cr += cp[0]);
- cp[1] = (char) (cg += cp[1]);
- cp[2] = (char) (cb += cp[2]);
+ cp[0] = (unsigned char) ((cr += cp[0]) & 0xff);
+ cp[1] = (unsigned char) ((cg += cp[1]) & 0xff);
+ cp[2] = (unsigned char) ((cb += cp[2]) & 0xff);
cc -= 3;
cp += 3;
}
@@ -271,10 +311,10 @@ horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc)
cc -= 4;
cp += 4;
while (cc>0) {
- cp[0] = (char) (cr += cp[0]);
- cp[1] = (char) (cg += cp[1]);
- cp[2] = (char) (cb += cp[2]);
- cp[3] = (char) (ca += cp[3]);
+ cp[0] = (unsigned char) ((cr += cp[0]) & 0xff);
+ cp[1] = (unsigned char) ((cg += cp[1]) & 0xff);
+ cp[2] = (unsigned char) ((cb += cp[2]) & 0xff);
+ cp[3] = (unsigned char) ((ca += cp[3]) & 0xff);
cc -= 4;
cp += 4;
}
@@ -282,77 +322,71 @@ horAcc8(TIFF* tif, uint8* cp0, tmsize_t cc)
cc -= stride;
do {
REPEAT4(stride, cp[stride] =
- (char) (cp[stride] + *cp); cp++)
+ (unsigned char) ((cp[stride] + *cp) & 0xff); cp++)
cc -= stride;
} while (cc>0);
}
}
+ return 1;
}
-static void
+static int
swabHorAcc16(TIFF* tif, uint8* cp0, tmsize_t cc)
{
- tmsize_t stride = PredictorState(tif)->stride;
uint16* wp = (uint16*) cp0;
tmsize_t wc = cc / 2;
- assert((cc%(2*stride))==0);
-
- if (wc > stride) {
- TIFFSwabArrayOfShort(wp, wc);
- wc -= stride;
- do {
- REPEAT4(stride, wp[stride] += wp[0]; wp++)
- wc -= stride;
- } while (wc > 0);
- }
+ TIFFSwabArrayOfShort(wp, wc);
+ return horAcc16(tif, cp0, cc);
}
-static void
+static int
horAcc16(TIFF* tif, uint8* cp0, tmsize_t cc)
{
tmsize_t stride = PredictorState(tif)->stride;
uint16* wp = (uint16*) cp0;
tmsize_t wc = cc / 2;
- assert((cc%(2*stride))==0);
+ if((cc%(2*stride))!=0)
+ {
+ TIFFErrorExt(tif->tif_clientdata, "horAcc16",
+ "%s", "cc%(2*stride))!=0");
+ return 0;
+ }
if (wc > stride) {
wc -= stride;
do {
- REPEAT4(stride, wp[stride] += wp[0]; wp++)
+ REPEAT4(stride, wp[stride] = (uint16)(((unsigned int)wp[stride] + (unsigned int)wp[0]) & 0xffff); wp++)
wc -= stride;
} while (wc > 0);
}
+ return 1;
}
-static void
+static int
swabHorAcc32(TIFF* tif, uint8* cp0, tmsize_t cc)
{
- tmsize_t stride = PredictorState(tif)->stride;
uint32* wp = (uint32*) cp0;
tmsize_t wc = cc / 4;
- assert((cc%(4*stride))==0);
-
- if (wc > stride) {
- TIFFSwabArrayOfLong(wp, wc);
- wc -= stride;
- do {
- REPEAT4(stride, wp[stride] += wp[0]; wp++)
- wc -= stride;
- } while (wc > 0);
- }
+ TIFFSwabArrayOfLong(wp, wc);
+ return horAcc32(tif, cp0, cc);
}
-static void
+static int
horAcc32(TIFF* tif, uint8* cp0, tmsize_t cc)
{
tmsize_t stride = PredictorState(tif)->stride;
uint32* wp = (uint32*) cp0;
tmsize_t wc = cc / 4;
- assert((cc%(4*stride))==0);
+ if((cc%(4*stride))!=0)
+ {
+ TIFFErrorExt(tif->tif_clientdata, "horAcc32",
+ "%s", "cc%(4*stride))!=0");
+ return 0;
+ }
if (wc > stride) {
wc -= stride;
@@ -361,12 +395,13 @@ horAcc32(TIFF* tif, uint8* cp0, tmsize_t cc)
wc -= stride;
} while (wc > 0);
}
+ return 1;
}
/*
* Floating point predictor accumulation routine.
*/
-static void
+static int
fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc)
{
tmsize_t stride = PredictorState(tif)->stride;
@@ -374,15 +409,22 @@ fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc)
tmsize_t wc = cc / bps;
tmsize_t count = cc;
uint8 *cp = (uint8 *) cp0;
- uint8 *tmp = (uint8 *)_TIFFmalloc(cc);
+ uint8 *tmp;
- assert((cc%(bps*stride))==0);
+ if(cc%(bps*stride)!=0)
+ {
+ TIFFErrorExt(tif->tif_clientdata, "fpAcc",
+ "%s", "cc%(bps*stride))!=0");
+ return 0;
+ }
+ tmp = (uint8 *)_TIFFmalloc(cc);
if (!tmp)
- return;
+ return 0;
while (count > stride) {
- REPEAT4(stride, cp[stride] += cp[0]; cp++)
+ REPEAT4(stride, cp[stride] =
+ (unsigned char) ((cp[stride] + cp[0]) & 0xff); cp++)
count -= stride;
}
@@ -400,6 +442,7 @@ fpAcc(TIFF* tif, uint8* cp0, tmsize_t cc)
}
}
_TIFFfree(tmp);
+ return 1;
}
/*
@@ -415,8 +458,7 @@ PredictorDecodeRow(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
assert(sp->decodepfunc != NULL);
if ((*sp->decoderow)(tif, op0, occ0, s)) {
- (*sp->decodepfunc)(tif, op0, occ0);
- return 1;
+ return (*sp->decodepfunc)(tif, op0, occ0);
} else
return 0;
}
@@ -439,10 +481,16 @@ PredictorDecodeTile(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
if ((*sp->decodetile)(tif, op0, occ0, s)) {
tmsize_t rowsize = sp->rowsize;
assert(rowsize > 0);
- assert((occ0%rowsize)==0);
+ if((occ0%rowsize) !=0)
+ {
+ TIFFErrorExt(tif->tif_clientdata, "PredictorDecodeTile",
+ "%s", "occ0%rowsize != 0");
+ return 0;
+ }
assert(sp->decodepfunc != NULL);
while (occ0 > 0) {
- (*sp->decodepfunc)(tif, op0, rowsize);
+ if( !(*sp->decodepfunc)(tif, op0, rowsize) )
+ return 0;
occ0 -= rowsize;
op0 += rowsize;
}
@@ -451,14 +499,19 @@ PredictorDecodeTile(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
return 0;
}
-static void
+static int
horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc)
{
TIFFPredictorState* sp = PredictorState(tif);
tmsize_t stride = sp->stride;
- char* cp = (char*) cp0;
+ unsigned char* cp = (unsigned char*) cp0;
- assert((cc%stride)==0);
+ if((cc%stride)!=0)
+ {
+ TIFFErrorExt(tif->tif_clientdata, "horDiff8",
+ "%s", "(cc%stride)!=0");
+ return 0;
+ }
if (cc > stride) {
cc -= stride;
@@ -466,67 +519,92 @@ horDiff8(TIFF* tif, uint8* cp0, tmsize_t cc)
* Pipeline the most common cases.
*/
if (stride == 3) {
- int r1, g1, b1;
- int r2 = cp[0];
- int g2 = cp[1];
- int b2 = cp[2];
+ unsigned int r1, g1, b1;
+ unsigned int r2 = cp[0];
+ unsigned int g2 = cp[1];
+ unsigned int b2 = cp[2];
do {
- r1 = cp[3]; cp[3] = r1-r2; r2 = r1;
- g1 = cp[4]; cp[4] = g1-g2; g2 = g1;
- b1 = cp[5]; cp[5] = b1-b2; b2 = b1;
+ r1 = cp[3]; cp[3] = (unsigned char)((r1-r2)&0xff); r2 = r1;
+ g1 = cp[4]; cp[4] = (unsigned char)((g1-g2)&0xff); g2 = g1;
+ b1 = cp[5]; cp[5] = (unsigned char)((b1-b2)&0xff); b2 = b1;
cp += 3;
} while ((cc -= 3) > 0);
} else if (stride == 4) {
- int r1, g1, b1, a1;
- int r2 = cp[0];
- int g2 = cp[1];
- int b2 = cp[2];
- int a2 = cp[3];
+ unsigned int r1, g1, b1, a1;
+ unsigned int r2 = cp[0];
+ unsigned int g2 = cp[1];
+ unsigned int b2 = cp[2];
+ unsigned int a2 = cp[3];
do {
- r1 = cp[4]; cp[4] = r1-r2; r2 = r1;
- g1 = cp[5]; cp[5] = g1-g2; g2 = g1;
- b1 = cp[6]; cp[6] = b1-b2; b2 = b1;
- a1 = cp[7]; cp[7] = a1-a2; a2 = a1;
+ r1 = cp[4]; cp[4] = (unsigned char)((r1-r2)&0xff); r2 = r1;
+ g1 = cp[5]; cp[5] = (unsigned char)((g1-g2)&0xff); g2 = g1;
+ b1 = cp[6]; cp[6] = (unsigned char)((b1-b2)&0xff); b2 = b1;
+ a1 = cp[7]; cp[7] = (unsigned char)((a1-a2)&0xff); a2 = a1;
cp += 4;
} while ((cc -= 4) > 0);
} else {
cp += cc - 1;
do {
- REPEAT4(stride, cp[stride] -= cp[0]; cp--)
+ REPEAT4(stride, cp[stride] = (unsigned char)((cp[stride] - cp[0])&0xff); cp--)
} while ((cc -= stride) > 0);
}
}
+ return 1;
}
-static void
+static int
horDiff16(TIFF* tif, uint8* cp0, tmsize_t cc)
{
TIFFPredictorState* sp = PredictorState(tif);
tmsize_t stride = sp->stride;
- int16 *wp = (int16*) cp0;
+ uint16 *wp = (uint16*) cp0;
tmsize_t wc = cc/2;
- assert((cc%(2*stride))==0);
+ if((cc%(2*stride))!=0)
+ {
+ TIFFErrorExt(tif->tif_clientdata, "horDiff8",
+ "%s", "(cc%(2*stride))!=0");
+ return 0;
+ }
if (wc > stride) {
wc -= stride;
wp += wc - 1;
do {
- REPEAT4(stride, wp[stride] -= wp[0]; wp--)
+ REPEAT4(stride, wp[stride] = (uint16)(((unsigned int)wp[stride] - (unsigned int)wp[0]) & 0xffff); wp--)
wc -= stride;
} while (wc > 0);
}
+ return 1;
}
-static void
+static int
+swabHorDiff16(TIFF* tif, uint8* cp0, tmsize_t cc)
+{
+ uint16* wp = (uint16*) cp0;
+ tmsize_t wc = cc / 2;
+
+ if( !horDiff16(tif, cp0, cc) )
+ return 0;
+
+ TIFFSwabArrayOfShort(wp, wc);
+ return 1;
+}
+
+static int
horDiff32(TIFF* tif, uint8* cp0, tmsize_t cc)
{
TIFFPredictorState* sp = PredictorState(tif);
tmsize_t stride = sp->stride;
- int32 *wp = (int32*) cp0;
+ uint32 *wp = (uint32*) cp0;
tmsize_t wc = cc/4;
- assert((cc%(4*stride))==0);
+ if((cc%(4*stride))!=0)
+ {
+ TIFFErrorExt(tif->tif_clientdata, "horDiff32",
+ "%s", "(cc%(4*stride))!=0");
+ return 0;
+ }
if (wc > stride) {
wc -= stride;
@@ -536,12 +614,26 @@ horDiff32(TIFF* tif, uint8* cp0, tmsize_t cc)
wc -= stride;
} while (wc > 0);
}
+ return 1;
+}
+
+static int
+swabHorDiff32(TIFF* tif, uint8* cp0, tmsize_t cc)
+{
+ uint32* wp = (uint32*) cp0;
+ tmsize_t wc = cc / 4;
+
+ if( !horDiff32(tif, cp0, cc) )
+ return 0;
+
+ TIFFSwabArrayOfLong(wp, wc);
+ return 1;
}
/*
* Floating point predictor differencing routine.
*/
-static void
+static int
fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc)
{
tmsize_t stride = PredictorState(tif)->stride;
@@ -549,12 +641,18 @@ fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc)
tmsize_t wc = cc / bps;
tmsize_t count;
uint8 *cp = (uint8 *) cp0;
- uint8 *tmp = (uint8 *)_TIFFmalloc(cc);
+ uint8 *tmp;
- assert((cc%(bps*stride))==0);
+ if((cc%(bps*stride))!=0)
+ {
+ TIFFErrorExt(tif->tif_clientdata, "fpDiff",
+ "%s", "(cc%(bps*stride))!=0");
+ return 0;
+ }
+ tmp = (uint8 *)_TIFFmalloc(cc);
if (!tmp)
- return;
+ return 0;
_TIFFmemcpy(tmp, cp0, cc);
for (count = 0; count < wc; count++) {
@@ -573,7 +671,8 @@ fpDiff(TIFF* tif, uint8* cp0, tmsize_t cc)
cp = (uint8 *) cp0;
cp += cc - stride - 1;
for (count = cc; count > stride; count -= stride)
- REPEAT4(stride, cp[stride] -= cp[0]; cp--)
+ REPEAT4(stride, cp[stride] = (unsigned char)((cp[stride] - cp[0])&0xff); cp--)
+ return 1;
}
static int
@@ -586,7 +685,8 @@ PredictorEncodeRow(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
assert(sp->encoderow != NULL);
/* XXX horizontal differencing alters user's data XXX */
- (*sp->encodepfunc)(tif, bp, cc);
+ if( !(*sp->encodepfunc)(tif, bp, cc) )
+ return 0;
return (*sp->encoderow)(tif, bp, cc, s);
}
@@ -621,7 +721,13 @@ PredictorEncodeTile(TIFF* tif, uint8* bp0, tmsize_t cc0, uint16 s)
rowsize = sp->rowsize;
assert(rowsize > 0);
- assert((cc0%rowsize)==0);
+ if((cc0%rowsize)!=0)
+ {
+ TIFFErrorExt(tif->tif_clientdata, "PredictorEncodeTile",
+ "%s", "(cc0%rowsize)!=0");
+ _TIFFfree( working_copy );
+ return 0;
+ }
while (cc > 0) {
(*sp->encodepfunc)(tif, bp, rowsize);
cc -= rowsize;
@@ -670,7 +776,7 @@ PredictorVGetField(TIFF* tif, uint32 tag, va_list ap)
switch (tag) {
case TIFFTAG_PREDICTOR:
- *va_arg(ap, uint16*) = sp->predictor;
+ *va_arg(ap, uint16*) = (uint16)sp->predictor;
break;
default:
return (*sp->vgetparent)(tif, tag, ap);
diff --git a/tiff/libtiff/tif_predict.h b/tiff/libtiff/tif_predict.h
index dc7144c69..6c68e21ac 100644
--- a/tiff/libtiff/tif_predict.h
+++ b/tiff/libtiff/tif_predict.h
@@ -1,4 +1,4 @@
-/* $Id: tif_predict.h,v 1.8 2010-03-10 18:56:49 bfriesen Exp $ */
+/* $Id: tif_predict.h,v 1.9 2016-10-31 17:24:26 erouault Exp $ */
/*
* Copyright (c) 1995-1997 Sam Leffler
@@ -30,6 +30,8 @@
* ``Library-private'' Support for the Predictor Tag
*/
+typedef int (*TIFFEncodeDecodeMethod)(TIFF* tif, uint8* buf, tmsize_t size);
+
/*
* Codecs that want to support the Predictor tag must place
* this structure first in their private state block so that
@@ -43,12 +45,12 @@ typedef struct {
TIFFCodeMethod encoderow; /* parent codec encode/decode row */
TIFFCodeMethod encodestrip; /* parent codec encode/decode strip */
TIFFCodeMethod encodetile; /* parent codec encode/decode tile */
- TIFFPostMethod encodepfunc; /* horizontal differencer */
+ TIFFEncodeDecodeMethod encodepfunc; /* horizontal differencer */
TIFFCodeMethod decoderow; /* parent codec encode/decode row */
TIFFCodeMethod decodestrip; /* parent codec encode/decode strip */
TIFFCodeMethod decodetile; /* parent codec encode/decode tile */
- TIFFPostMethod decodepfunc; /* horizontal accumulator */
+ TIFFEncodeDecodeMethod decodepfunc; /* horizontal accumulator */
TIFFVGetMethod vgetparent; /* super-class method */
TIFFVSetMethod vsetparent; /* super-class method */
diff --git a/tiff/libtiff/tif_print.c b/tiff/libtiff/tif_print.c
index 9481eb62c..186f2ee5c 100644
--- a/tiff/libtiff/tif_print.c
+++ b/tiff/libtiff/tif_print.c
@@ -1,4 +1,4 @@
-/* $Id: tif_print.c,v 1.54 2011-04-02 20:54:09 bfriesen Exp $ */
+/* $Id: tif_print.c,v 1.64 2015-12-06 22:19:56 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -34,7 +34,10 @@
#include <ctype.h>
-static const char *photoNames[] = {
+static void
+_TIFFprintAsciiBounded(FILE* fd, const char* cp, size_t max_chars);
+
+static const char * const photoNames[] = {
"min-is-white", /* PHOTOMETRIC_MINISWHITE */
"min-is-black", /* PHOTOMETRIC_MINISBLACK */
"RGB color", /* PHOTOMETRIC_RGB */
@@ -44,10 +47,12 @@ static const char *photoNames[] = {
"YCbCr", /* PHOTOMETRIC_YCBCR */
"7 (0x7)",
"CIE L*a*b*", /* PHOTOMETRIC_CIELAB */
+ "ICC L*a*b*", /* PHOTOMETRIC_ICCLAB */
+ "ITU L*a*b*" /* PHOTOMETRIC_ITULAB */
};
#define NPHOTONAMES (sizeof (photoNames) / sizeof (photoNames[0]))
-static const char *orientNames[] = {
+static const char * const orientNames[] = {
"0 (0x0)",
"row 0 top, col 0 lhs", /* ORIENTATION_TOPLEFT */
"row 0 top, col 0 rhs", /* ORIENTATION_TOPRIGHT */
@@ -135,34 +140,51 @@ _TIFFPrintField(FILE* fd, const TIFFField *fip,
}
static int
-_TIFFPrettyPrintField(TIFF* tif, FILE* fd, uint32 tag,
+_TIFFPrettyPrintField(TIFF* tif, const TIFFField *fip, FILE* fd, uint32 tag,
uint32 value_count, void *raw_data)
{
(void) tif;
+
+ /* do not try to pretty print auto-defined fields */
+ if (strncmp(fip->field_name,"Tag ", 4) == 0) {
+ return 0;
+ }
switch (tag)
{
case TIFFTAG_INKSET:
- fprintf(fd, " Ink Set: ");
- switch (*((uint16*)raw_data)) {
+ if (value_count == 2 && fip->field_type == TIFF_SHORT) {
+ fprintf(fd, " Ink Set: ");
+ switch (*((uint16*)raw_data)) {
case INKSET_CMYK:
fprintf(fd, "CMYK\n");
break;
default:
fprintf(fd, "%u (0x%x)\n",
- *((uint16*)raw_data),
- *((uint16*)raw_data));
+ *((uint16*)raw_data),
+ *((uint16*)raw_data));
break;
+ }
+ return 1;
}
- return 1;
+ return 0;
+
case TIFFTAG_DOTRANGE:
- fprintf(fd, " Dot Range: %u-%u\n",
- ((uint16*)raw_data)[0], ((uint16*)raw_data)[1]);
- return 1;
+ if (value_count == 2 && fip->field_type == TIFF_SHORT) {
+ fprintf(fd, " Dot Range: %u-%u\n",
+ ((uint16*)raw_data)[0], ((uint16*)raw_data)[1]);
+ return 1;
+ }
+ return 0;
+
case TIFFTAG_WHITEPOINT:
- fprintf(fd, " White Point: %g-%g\n",
- ((float *)raw_data)[0], ((float *)raw_data)[1]);
- return 1;
+ if (value_count == 2 && fip->field_type == TIFF_RATIONAL) {
+ fprintf(fd, " White Point: %g-%g\n",
+ ((float *)raw_data)[0], ((float *)raw_data)[1]);
+ return 1;
+ }
+ return 0;
+
case TIFFTAG_XMLPACKET:
{
uint32 i;
@@ -182,19 +204,25 @@ _TIFFPrettyPrintField(TIFF* tif, FILE* fd, uint32 tag,
" RichTIFFIPTC Data: <present>, %lu bytes\n",
(unsigned long) value_count * 4);
return 1;
+
case TIFFTAG_PHOTOSHOP:
fprintf(fd, " Photoshop Data: <present>, %lu bytes\n",
(unsigned long) value_count);
return 1;
+
case TIFFTAG_ICCPROFILE:
fprintf(fd, " ICC Profile: <present>, %lu bytes\n",
(unsigned long) value_count);
return 1;
+
case TIFFTAG_STONITS:
- fprintf(fd,
- " Sample to Nits conversion factor: %.4e\n",
- *((double*)raw_data));
- return 1;
+ if (value_count == 1 && fip->field_type == TIFF_DOUBLE) {
+ fprintf(fd,
+ " Sample to Nits conversion factor: %.4e\n",
+ *((double*)raw_data));
+ return 1;
+ }
+ return 0;
}
return 0;
@@ -209,7 +237,6 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
{
TIFFDirectory *td = &tif->tif_dir;
char *sep;
- uint16 i;
long l, n;
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
@@ -337,6 +364,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
}
}
if (TIFFFieldSet(tif,FIELD_EXTRASAMPLES) && td->td_extrasamples) {
+ uint16 i;
fprintf(fd, " Extra Samples: %u<", td->td_extrasamples);
sep = "";
for (i = 0; i < td->td_extrasamples; i++) {
@@ -361,12 +389,17 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
}
if (TIFFFieldSet(tif,FIELD_INKNAMES)) {
char* cp;
+ uint16 i;
fprintf(fd, " Ink Names: ");
i = td->td_samplesperpixel;
sep = "";
- for (cp = td->td_inknames; i > 0; cp = strchr(cp,'\0')+1, i--) {
+ for (cp = td->td_inknames;
+ i > 0 && cp < td->td_inknames + td->td_inknameslen;
+ cp = strchr(cp,'\0')+1, i--) {
+ size_t max_chars =
+ td->td_inknameslen - (cp - td->td_inknames);
fputs(sep, fd);
- _TIFFprintAscii(fd, cp);
+ _TIFFprintAsciiBounded(fd, cp, max_chars);
sep = ", ";
}
fputs("\n", fd);
@@ -449,14 +482,18 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
if (TIFFFieldSet(tif,FIELD_MAXSAMPLEVALUE))
fprintf(fd, " Max Sample Value: %u\n", td->td_maxsamplevalue);
if (TIFFFieldSet(tif,FIELD_SMINSAMPLEVALUE)) {
+ int i;
+ int count = (tif->tif_flags & TIFF_PERSAMPLE) ? td->td_samplesperpixel : 1;
fprintf(fd, " SMin Sample Value:");
- for (i = 0; i < td->td_samplesperpixel; ++i)
+ for (i = 0; i < count; ++i)
fprintf(fd, " %g", td->td_sminsamplevalue[i]);
fprintf(fd, "\n");
}
if (TIFFFieldSet(tif,FIELD_SMAXSAMPLEVALUE)) {
+ int i;
+ int count = (tif->tif_flags & TIFF_PERSAMPLE) ? td->td_samplesperpixel : 1;
fprintf(fd, " SMax Sample Value:");
- for (i = 0; i < td->td_samplesperpixel; ++i)
+ for (i = 0; i < count; ++i)
fprintf(fd, " %g", td->td_smaxsamplevalue[i]);
fprintf(fd, "\n");
}
@@ -493,6 +530,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
fprintf(fd, "(present)\n");
}
if (TIFFFieldSet(tif,FIELD_REFBLACKWHITE)) {
+ int i;
fprintf(fd, " Reference Black/White:\n");
for (i = 0; i < 3; i++)
fprintf(fd, " %2d: %5g %5g\n", i,
@@ -505,6 +543,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
fprintf(fd, "\n");
n = 1L<<td->td_bitspersample;
for (l = 0; l < n; l++) {
+ uint16 i;
fprintf(fd, " %2lu: %5u",
l, td->td_transferfunction[0][l]);
for (i = 1; i < td->td_samplesperpixel; i++)
@@ -516,6 +555,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
fprintf(fd, "(present)\n");
}
if (TIFFFieldSet(tif, FIELD_SUBIFD) && (td->td_subifd)) {
+ uint16 i;
fprintf(fd, " SubIFD Offsets:");
for (i = 0; i < td->td_nsubifd; i++)
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
@@ -548,8 +588,19 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
continue;
if(fip->field_passcount) {
- if(TIFFGetField(tif, tag, &value_count, &raw_data) != 1)
+ if (fip->field_readcount == TIFF_VARIABLE2 ) {
+ if(TIFFGetField(tif, tag, &value_count, &raw_data) != 1)
+ continue;
+ } else if (fip->field_readcount == TIFF_VARIABLE ) {
+ uint16 small_value_count;
+ if(TIFFGetField(tif, tag, &small_value_count, &raw_data) != 1)
+ continue;
+ value_count = small_value_count;
+ } else {
+ assert (fip->field_readcount == TIFF_VARIABLE
+ || fip->field_readcount == TIFF_VARIABLE2);
continue;
+ }
} else {
if (fip->field_readcount == TIFF_VARIABLE
|| fip->field_readcount == TIFF_VARIABLE2)
@@ -558,46 +609,28 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
value_count = td->td_samplesperpixel;
else
value_count = fip->field_readcount;
- if ((fip->field_type == TIFF_ASCII
- || fip->field_readcount == TIFF_VARIABLE
- || fip->field_readcount == TIFF_VARIABLE2
- || fip->field_readcount == TIFF_SPP
- || value_count > 1)
- && fip->field_tag != TIFFTAG_PAGENUMBER
- && fip->field_tag != TIFFTAG_HALFTONEHINTS
- && fip->field_tag != TIFFTAG_YCBCRSUBSAMPLING
- && fip->field_tag != TIFFTAG_DOTRANGE) {
+ if (fip->field_tag == TIFFTAG_DOTRANGE
+ && strcmp(fip->field_name,"DotRange") == 0) {
+ /* TODO: This is an evil exception and should not have been
+ handled this way ... likely best if we move it into
+ the directory structure with an explicit field in
+ libtiff 4.1 and assign it a FIELD_ value */
+ static uint16 dotrange[2];
+ raw_data = dotrange;
+ TIFFGetField(tif, tag, dotrange+0, dotrange+1);
+ } else if (fip->field_type == TIFF_ASCII
+ || fip->field_readcount == TIFF_VARIABLE
+ || fip->field_readcount == TIFF_VARIABLE2
+ || fip->field_readcount == TIFF_SPP
+ || value_count > 1) {
if(TIFFGetField(tif, tag, &raw_data) != 1)
continue;
- } else if (fip->field_tag != TIFFTAG_PAGENUMBER
- && fip->field_tag != TIFFTAG_HALFTONEHINTS
- && fip->field_tag != TIFFTAG_YCBCRSUBSAMPLING
- && fip->field_tag != TIFFTAG_DOTRANGE) {
- raw_data = _TIFFmalloc(
- _TIFFDataSize(fip->field_type)
- * value_count);
- mem_alloc = 1;
- if(TIFFGetField(tif, tag, raw_data) != 1) {
- _TIFFfree(raw_data);
- continue;
- }
} else {
- /*
- * XXX: Should be fixed and removed,
- * see the notes related to
- * TIFFTAG_PAGENUMBER,
- * TIFFTAG_HALFTONEHINTS,
- * TIFFTAG_YCBCRSUBSAMPLING and
- * TIFFTAG_DOTRANGE tags in tif_dir.c.
- */
- char *tmp;
raw_data = _TIFFmalloc(
_TIFFDataSize(fip->field_type)
* value_count);
- tmp = raw_data;
mem_alloc = 1;
- if(TIFFGetField(tif, tag, tmp,
- tmp + _TIFFDataSize(fip->field_type)) != 1) {
+ if(TIFFGetField(tif, tag, raw_data) != 1) {
_TIFFfree(raw_data);
continue;
}
@@ -610,7 +643,7 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
* _TIFFPrettyPrintField() fall down and print it as
* any other tag.
*/
- if (!_TIFFPrettyPrintField(tif, fd, tag, value_count, raw_data))
+ if (!_TIFFPrettyPrintField(tif, fip, fd, tag, value_count, raw_data))
_TIFFPrintField(fd, fip, value_count, raw_data);
if(mem_alloc)
@@ -648,7 +681,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
void
_TIFFprintAscii(FILE* fd, const char* cp)
{
- for (; *cp != '\0'; cp++) {
+ _TIFFprintAsciiBounded( fd, cp, strlen(cp));
+}
+
+static void
+_TIFFprintAsciiBounded(FILE* fd, const char* cp, size_t max_chars)
+{
+ for (; max_chars > 0 && *cp != '\0'; cp++, max_chars--) {
const char* tp;
if (isprint((int)*cp)) {
diff --git a/tiff/libtiff/tif_read.c b/tiff/libtiff/tif_read.c
index 594733f87..80035929f 100644
--- a/tiff/libtiff/tif_read.c
+++ b/tiff/libtiff/tif_read.c
@@ -1,4 +1,4 @@
-/* $Id: tif_read.c,v 1.38 2011-12-09 03:29:10 fwarmerdam Exp $ */
+/* $Id: tif_read.c,v 1.49 2016-07-10 18:00:21 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -31,6 +31,9 @@
#include "tiffiop.h"
#include <stdio.h>
+#define TIFF_SIZE_T_MAX ((size_t) ~ ((size_t)0))
+#define TIFF_TMSIZE_T_MAX (tmsize_t)(TIFF_SIZE_T_MAX >> 1)
+
int TIFFFillStrip(TIFF* tif, uint32 strip);
int TIFFFillTile(TIFF* tif, uint32 tile);
static int TIFFStartStrip(TIFF* tif, uint32 strip);
@@ -38,6 +41,8 @@ static int TIFFStartTile(TIFF* tif, uint32 tile);
static int TIFFCheckRead(TIFF*, int);
static tmsize_t
TIFFReadRawStrip1(TIFF* tif, uint32 strip, void* buf, tmsize_t size,const char* module);
+static tmsize_t
+TIFFReadRawTile1(TIFF* tif, uint32 tile, void* buf, tmsize_t size, const char* module);
#define NOSTRIP ((uint32)(-1)) /* undefined state */
#define NOTILE ((uint32)(-1)) /* undefined state */
@@ -47,10 +52,10 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart )
{
static const char module[] = "TIFFFillStripPartial";
register TIFFDirectory *td = &tif->tif_dir;
- uint64 unused_data;
+ tmsize_t unused_data;
uint64 read_offset;
tmsize_t cc, to_read;
- tmsize_t bytecountm;
+ /* tmsize_t bytecountm; */
if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount)
return 0;
@@ -61,7 +66,7 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart )
* bound on the size of a buffer we'll use?).
*/
- bytecountm=(tmsize_t) td->td_stripbytecount[strip];
+ /* bytecountm=(tmsize_t) td->td_stripbytecount[strip]; */
if (read_ahead*2 > tif->tif_rawdatasize) {
assert( restart );
@@ -93,6 +98,7 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart )
if( unused_data > 0 )
{
+ assert((tif->tif_flags&TIFF_BUFFERMMAP)==0);
memmove( tif->tif_rawdata, tif->tif_rawcp, unused_data );
}
@@ -116,10 +122,11 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart )
if( (uint64) to_read > td->td_stripbytecount[strip]
- tif->tif_rawdataoff - tif->tif_rawdataloaded )
{
- to_read = td->td_stripbytecount[strip]
+ to_read = (tmsize_t) td->td_stripbytecount[strip]
- tif->tif_rawdataoff - tif->tif_rawdataloaded;
}
+ assert((tif->tif_flags&TIFF_BUFFERMMAP)==0);
cc = TIFFReadFile(tif, tif->tif_rawdata + unused_data, to_read);
if (cc != to_read) {
@@ -145,8 +152,10 @@ TIFFFillStripPartial( TIFF *tif, int strip, tmsize_t read_ahead, int restart )
tif->tif_rawcp = tif->tif_rawdata;
if (!isFillOrder(tif, td->td_fillorder) &&
- (tif->tif_flags & TIFF_NOBITREV) == 0)
+ (tif->tif_flags & TIFF_NOBITREV) == 0) {
+ assert((tif->tif_flags&TIFF_BUFFERMMAP)==0);
TIFFReverseBits(tif->tif_rawdata + unused_data, to_read );
+ }
/*
** When starting a strip from the beginning we need to
@@ -339,13 +348,31 @@ TIFFReadEncodedStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size)
rowsperstrip=td->td_imagelength;
stripsperplane=((td->td_imagelength+rowsperstrip-1)/rowsperstrip);
stripinplane=(strip%stripsperplane);
- plane=(strip/stripsperplane);
+ plane=(uint16)(strip/stripsperplane);
rows=td->td_imagelength-stripinplane*rowsperstrip;
if (rows>rowsperstrip)
rows=rowsperstrip;
stripsize=TIFFVStripSize(tif,rows);
if (stripsize==0)
return((tmsize_t)(-1));
+
+ /* shortcut to avoid an extra memcpy() */
+ if( td->td_compression == COMPRESSION_NONE &&
+ size!=(tmsize_t)(-1) && size >= stripsize &&
+ !isMapped(tif) &&
+ ((tif->tif_flags&TIFF_NOREADRAW)==0) )
+ {
+ if (TIFFReadRawStrip1(tif, strip, buf, stripsize, module) != stripsize)
+ return ((tmsize_t)(-1));
+
+ if (!isFillOrder(tif, td->td_fillorder) &&
+ (tif->tif_flags & TIFF_NOBITREV) == 0)
+ TIFFReverseBits(buf,stripsize);
+
+ (*tif->tif_postdecode)(tif,buf,stripsize);
+ return (stripsize);
+ }
+
if ((size!=(tmsize_t)(-1))&&(size<stripsize))
stripsize=size;
if (!TIFFFillStrip(tif,strip))
@@ -397,7 +424,7 @@ TIFFReadRawStrip1(TIFF* tif, uint32 strip, void* buf, tmsize_t size,
tmsize_t n;
ma=(tmsize_t)td->td_stripoffset[strip];
mb=ma+size;
- if (((uint64)ma!=td->td_stripoffset[strip])||(ma>tif->tif_size))
+ if ((td->td_stripoffset[strip] > (uint64)TIFF_TMSIZE_T_MAX)||(ma>tif->tif_size))
n=0;
else if ((mb<ma)||(mb<size)||(mb>tif->tif_size))
n=tif->tif_size-ma;
@@ -454,7 +481,7 @@ TIFFReadRawStrip(TIFF* tif, uint32 strip, void* buf, tmsize_t size)
return ((tmsize_t)(-1));
}
bytecount = td->td_stripbytecount[strip];
- if (bytecount <= 0) {
+ if ((int64)bytecount <= 0) {
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
TIFFErrorExt(tif->tif_clientdata, module,
"%I64u: Invalid strip byte count, strip %lu",
@@ -488,13 +515,13 @@ TIFFFillStrip(TIFF* tif, uint32 strip)
static const char module[] = "TIFFFillStrip";
TIFFDirectory *td = &tif->tif_dir;
- if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount)
- return 0;
-
+ if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount)
+ return 0;
+
if ((tif->tif_flags&TIFF_NOREADRAW)==0)
{
uint64 bytecount = td->td_stripbytecount[strip];
- if (bytecount <= 0) {
+ if ((int64)bytecount <= 0) {
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
TIFFErrorExt(tif->tif_clientdata, module,
"Invalid strip byte count %I64u, strip %lu",
@@ -522,8 +549,11 @@ TIFFFillStrip(TIFF* tif, uint32 strip)
* buffer (if they try to, the application will get a
* fault since the file is mapped read-only).
*/
- if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata)
+ if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) {
_TIFFfree(tif->tif_rawdata);
+ tif->tif_rawdata = NULL;
+ tif->tif_rawdatasize = 0;
+ }
tif->tif_flags &= ~TIFF_MYBUFFER;
/*
* We must check for overflow, potentially causing
@@ -565,6 +595,14 @@ TIFFFillStrip(TIFF* tif, uint32 strip)
tif->tif_rawdata = tif->tif_base + (tmsize_t)td->td_stripoffset[strip];
tif->tif_rawdataoff = 0;
tif->tif_rawdataloaded = (tmsize_t) bytecount;
+
+ /*
+ * When we have tif_rawdata reference directly into the memory mapped file
+ * we need to be pretty careful about how we use the rawdata. It is not
+ * a general purpose working buffer as it normally otherwise is. So we
+ * keep track of this fact to avoid using it improperly.
+ */
+ tif->tif_flags |= TIFF_BUFFERMMAP;
} else {
/*
* Expand raw data buffer, if needed, to hold data
@@ -589,6 +627,11 @@ TIFFFillStrip(TIFF* tif, uint32 strip)
if (!TIFFReadBufferSetup(tif, 0, bytecountm))
return (0);
}
+ if (tif->tif_flags&TIFF_BUFFERMMAP) {
+ tif->tif_curstrip = NOSTRIP;
+ if (!TIFFReadBufferSetup(tif, 0, bytecountm))
+ return (0);
+ }
if (TIFFReadRawStrip1(tif, strip, tif->tif_rawdata,
bytecountm, module) != bytecountm)
return (0);
@@ -641,6 +684,24 @@ TIFFReadEncodedTile(TIFF* tif, uint32 tile, void* buf, tmsize_t size)
(unsigned long) tile, (unsigned long) td->td_nstrips);
return ((tmsize_t)(-1));
}
+
+ /* shortcut to avoid an extra memcpy() */
+ if( td->td_compression == COMPRESSION_NONE &&
+ size!=(tmsize_t)(-1) && size >= tilesize &&
+ !isMapped(tif) &&
+ ((tif->tif_flags&TIFF_NOREADRAW)==0) )
+ {
+ if (TIFFReadRawTile1(tif, tile, buf, tilesize, module) != tilesize)
+ return ((tmsize_t)(-1));
+
+ if (!isFillOrder(tif, td->td_fillorder) &&
+ (tif->tif_flags & TIFF_NOBITREV) == 0)
+ TIFFReverseBits(buf,tilesize);
+
+ (*tif->tif_postdecode)(tif,buf,tilesize);
+ return (tilesize);
+ }
+
if (size == (tmsize_t)(-1))
size = tilesize;
else if (size > tilesize)
@@ -697,7 +758,7 @@ TIFFReadRawTile1(TIFF* tif, uint32 tile, void* buf, tmsize_t size, const char* m
tmsize_t n;
ma=(tmsize_t)td->td_stripoffset[tile];
mb=ma+size;
- if (((uint64)ma!=td->td_stripoffset[tile])||(ma>tif->tif_size))
+ if ((td->td_stripoffset[tile] > (uint64)TIFF_TMSIZE_T_MAX)||(ma>tif->tif_size))
n=0;
else if ((mb<ma)||(mb<size)||(mb>tif->tif_size))
n=tif->tif_size-ma;
@@ -775,13 +836,13 @@ TIFFFillTile(TIFF* tif, uint32 tile)
static const char module[] = "TIFFFillTile";
TIFFDirectory *td = &tif->tif_dir;
- if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount)
- return 0;
-
+ if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount)
+ return 0;
+
if ((tif->tif_flags&TIFF_NOREADRAW)==0)
{
uint64 bytecount = td->td_stripbytecount[tile];
- if (bytecount <= 0) {
+ if ((int64)bytecount <= 0) {
#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
TIFFErrorExt(tif->tif_clientdata, module,
"%I64u: Invalid tile byte count, tile %lu",
@@ -809,8 +870,11 @@ TIFFFillTile(TIFF* tif, uint32 tile)
* buffer (if they try to, the application will get a
* fault since the file is mapped read-only).
*/
- if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata)
+ if ((tif->tif_flags & TIFF_MYBUFFER) && tif->tif_rawdata) {
_TIFFfree(tif->tif_rawdata);
+ tif->tif_rawdata = NULL;
+ tif->tif_rawdatasize = 0;
+ }
tif->tif_flags &= ~TIFF_MYBUFFER;
/*
* We must check for overflow, potentially causing
@@ -831,6 +895,7 @@ TIFFFillTile(TIFF* tif, uint32 tile)
tif->tif_base + (tmsize_t)td->td_stripoffset[tile];
tif->tif_rawdataoff = 0;
tif->tif_rawdataloaded = (tmsize_t) bytecount;
+ tif->tif_flags |= TIFF_BUFFERMMAP;
} else {
/*
* Expand raw data buffer, if needed, to hold data
@@ -855,6 +920,12 @@ TIFFFillTile(TIFF* tif, uint32 tile)
if (!TIFFReadBufferSetup(tif, 0, bytecountm))
return (0);
}
+ if (tif->tif_flags&TIFF_BUFFERMMAP) {
+ tif->tif_curtile = NOTILE;
+ if (!TIFFReadBufferSetup(tif, 0, bytecountm))
+ return (0);
+ }
+
if (TIFFReadRawTile1(tif, tile, tif->tif_rawdata,
bytecountm, module) != bytecountm)
return (0);
@@ -886,10 +957,13 @@ TIFFReadBufferSetup(TIFF* tif, void* bp, tmsize_t size)
static const char module[] = "TIFFReadBufferSetup";
assert((tif->tif_flags&TIFF_NOREADRAW)==0);
+ tif->tif_flags &= ~TIFF_BUFFERMMAP;
+
if (tif->tif_rawdata) {
if (tif->tif_flags & TIFF_MYBUFFER)
_TIFFfree(tif->tif_rawdata);
tif->tif_rawdata = NULL;
+ tif->tif_rawdatasize = 0;
}
if (bp) {
tif->tif_rawdatasize = size;
@@ -897,8 +971,11 @@ TIFFReadBufferSetup(TIFF* tif, void* bp, tmsize_t size)
tif->tif_flags &= ~TIFF_MYBUFFER;
} else {
tif->tif_rawdatasize = (tmsize_t)TIFFroundup_64((uint64)size, 1024);
- if (tif->tif_rawdatasize==0)
- tif->tif_rawdatasize=(tmsize_t)(-1);
+ if (tif->tif_rawdatasize==0) {
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Invalid buffer size");
+ return (0);
+ }
tif->tif_rawdata = (uint8*) _TIFFmalloc(tif->tif_rawdatasize);
tif->tif_flags |= TIFF_MYBUFFER;
}
@@ -921,8 +998,8 @@ TIFFStartStrip(TIFF* tif, uint32 strip)
{
TIFFDirectory *td = &tif->tif_dir;
- if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount)
- return 0;
+ if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount)
+ return 0;
if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
if (!(*tif->tif_setupdecode)(tif))
@@ -954,10 +1031,12 @@ TIFFStartStrip(TIFF* tif, uint32 strip)
static int
TIFFStartTile(TIFF* tif, uint32 tile)
{
+ static const char module[] = "TIFFStartTile";
TIFFDirectory *td = &tif->tif_dir;
+ uint32 howmany32;
- if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount)
- return 0;
+ if (!_TIFFFillStriles( tif ) || !tif->tif_dir.td_stripbytecount)
+ return 0;
if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
if (!(*tif->tif_setupdecode)(tif))
@@ -965,12 +1044,18 @@ TIFFStartTile(TIFF* tif, uint32 tile)
tif->tif_flags |= TIFF_CODERSETUP;
}
tif->tif_curtile = tile;
- tif->tif_row =
- (tile % TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth)) *
- td->td_tilelength;
- tif->tif_col =
- (tile % TIFFhowmany_32(td->td_imagelength, td->td_tilelength)) *
- td->td_tilewidth;
+ howmany32=TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth);
+ if (howmany32 == 0) {
+ TIFFErrorExt(tif->tif_clientdata,module,"Zero tiles");
+ return 0;
+ }
+ tif->tif_row = (tile % howmany32) * td->td_tilelength;
+ howmany32=TIFFhowmany_32(td->td_imagelength, td->td_tilelength);
+ if (howmany32 == 0) {
+ TIFFErrorExt(tif->tif_clientdata,module,"Zero tiles");
+ return 0;
+ }
+ tif->tif_col = (tile % howmany32) * td->td_tilewidth;
tif->tif_flags &= ~TIFF_BUF4WRITE;
if (tif->tif_flags&TIFF_NOREADRAW)
{
diff --git a/tiff/libtiff/tif_stream.cxx b/tiff/libtiff/tif_stream.cxx
index 163447ebd..ecca1fd54 100644
--- a/tiff/libtiff/tif_stream.cxx
+++ b/tiff/libtiff/tif_stream.cxx
@@ -1,4 +1,4 @@
-/* $Id: tif_stream.cxx,v 1.11 2010-12-11 23:12:29 faxguy Exp $ */
+/* $Id: tif_stream.cxx,v 1.13 2015-05-28 01:50:22 bfriesen Exp $ */
/*
* Copyright (c) 1988-1996 Sam Leffler
@@ -340,12 +340,16 @@ _tiffisCloseProc(thandle_t fd)
static int
_tiffDummyMapProc(thandle_t , void** base, toff_t* size )
{
+ (void) base;
+ (void) size;
return (0);
}
static void
_tiffDummyUnmapProc(thandle_t , void* base, toff_t size )
{
+ (void) base;
+ (void) size;
}
/*
@@ -417,9 +421,10 @@ TIFFStreamOpen(const char* name, istream *is)
/* vim: set ts=8 sts=8 sw=8 noet: */
/*
- Local Variables:
- mode: c
- indent-tabs-mode: true
- c-basic-offset: 8
- End:
-*/
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 8
+ * fill-column: 78
+ * End:
+ */
+
diff --git a/tiff/libtiff/tif_strip.c b/tiff/libtiff/tif_strip.c
index 3ced5a8d5..b6098dd31 100644
--- a/tiff/libtiff/tif_strip.c
+++ b/tiff/libtiff/tif_strip.c
@@ -1,4 +1,4 @@
-/* $Id: tif_strip.c,v 1.34 2011-04-02 20:54:09 bfriesen Exp $ */
+/* $Id: tif_strip.c,v 1.37 2016-11-09 23:00:49 erouault Exp $ */
/*
* Copyright (c) 1991-1997 Sam Leffler
@@ -63,6 +63,15 @@ TIFFNumberOfStrips(TIFF* tif)
TIFFDirectory *td = &tif->tif_dir;
uint32 nstrips;
+ /* If the value was already computed and store in td_nstrips, then return it,
+ since ChopUpSingleUncompressedStrip might have altered and resized the
+ since the td_stripbytecount and td_stripoffset arrays to the new value
+ after the initial affectation of td_nstrips = TIFFNumberOfStrips() in
+ tif_dirread.c ~line 3612.
+ See http://bugzilla.maptools.org/show_bug.cgi?id=2587 */
+ if( td->td_nstrips )
+ return td->td_nstrips;
+
nstrips = (td->td_rowsperstrip == (uint32) -1 ? 1 :
TIFFhowmany_32(td->td_imagelength, td->td_rowsperstrip));
if (td->td_planarconfig == PLANARCONFIG_SEPARATE)
@@ -107,11 +116,13 @@ TIFFVStripSize64(TIFF* tif, uint32 nrows)
}
TIFFGetFieldDefaulted(tif,TIFFTAG_YCBCRSUBSAMPLING,ycbcrsubsampling+0,
ycbcrsubsampling+1);
- if (((ycbcrsubsampling[0]!=1)&&(ycbcrsubsampling[0]!=2)&&(ycbcrsubsampling[0]!=4)) ||
- ((ycbcrsubsampling[1]!=1)&&(ycbcrsubsampling[1]!=2)&&(ycbcrsubsampling[1]!=4)))
+ if ((ycbcrsubsampling[0] != 1 && ycbcrsubsampling[0] != 2 && ycbcrsubsampling[0] != 4)
+ ||(ycbcrsubsampling[1] != 1 && ycbcrsubsampling[1] != 2 && ycbcrsubsampling[1] != 4))
{
TIFFErrorExt(tif->tif_clientdata,module,
- "Invalid YCbCr subsampling");
+ "Invalid YCbCr subsampling (%dx%d)",
+ ycbcrsubsampling[0],
+ ycbcrsubsampling[1] );
return 0;
}
samplingblock_samples=ycbcrsubsampling[0]*ycbcrsubsampling[1]+2;
@@ -315,7 +326,14 @@ TIFFScanlineSize64(TIFF* tif)
}
}
else
+ {
scanline_size=TIFFhowmany_64(_TIFFMultiply64(tif,td->td_imagewidth,td->td_bitspersample,module),8);
+ }
+ if (scanline_size == 0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Computed scanline size is zero");
+ return 0;
+ }
return(scanline_size);
}
tmsize_t
@@ -326,8 +344,7 @@ TIFFScanlineSize(TIFF* tif)
tmsize_t n;
m=TIFFScanlineSize64(tif);
n=(tmsize_t)m;
- if ((uint64)n!=m)
- {
+ if ((uint64)n!=m) {
TIFFErrorExt(tif->tif_clientdata,module,"Integer arithmetic overflow");
n=0;
}
diff --git a/tiff/libtiff/tif_swab.c b/tiff/libtiff/tif_swab.c
index f37e33f1c..211dc576e 100644
--- a/tiff/libtiff/tif_swab.c
+++ b/tiff/libtiff/tif_swab.c
@@ -1,4 +1,4 @@
-/* $Id: tif_swab.c,v 1.13 2010-03-10 18:56:49 bfriesen Exp $ */
+/* $Id: tif_swab.c,v 1.14 2016-09-04 21:32:56 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -296,8 +296,10 @@ TIFFReverseBits(uint8* cp, tmsize_t n)
cp[7] = TIFFBitRevTable[cp[7]];
cp += 8;
}
- while (n-- > 0)
- *cp = TIFFBitRevTable[*cp], cp++;
+ while (n-- > 0) {
+ *cp = TIFFBitRevTable[*cp];
+ cp++;
+ }
}
/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/tiff/libtiff/tif_thunder.c b/tiff/libtiff/tif_thunder.c
index 390891c98..183199de7 100644
--- a/tiff/libtiff/tif_thunder.c
+++ b/tiff/libtiff/tif_thunder.c
@@ -1,4 +1,4 @@
-/* $Id: tif_thunder.c,v 1.12 2011-04-02 20:54:09 bfriesen Exp $ */
+/* $Id: tif_thunder.c,v 1.13 2016-09-04 21:32:56 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -100,7 +100,8 @@ ThunderDecode(TIFF* tif, uint8* op, tmsize_t maxpixels)
while (cc > 0 && npixels < maxpixels) {
int n, delta;
- n = *bp++, cc--;
+ n = *bp++;
+ cc--;
switch (n & THUNDER_CODE) {
case THUNDER_RUN: /* pixel run */
/*
diff --git a/tiff/libtiff/tif_tile.c b/tiff/libtiff/tif_tile.c
index 062d943f6..388e168ac 100644
--- a/tiff/libtiff/tif_tile.c
+++ b/tiff/libtiff/tif_tile.c
@@ -1,4 +1,4 @@
-/* $Id: tif_tile.c,v 1.22 2010-07-01 15:33:28 dron Exp $ */
+/* $Id: tif_tile.c,v 1.24 2015-06-07 22:35:40 bfriesen Exp $ */
/*
* Copyright (c) 1991-1997 Sam Leffler
@@ -143,17 +143,40 @@ TIFFNumberOfTiles(TIFF* tif)
uint64
TIFFTileRowSize64(TIFF* tif)
{
+ static const char module[] = "TIFFTileRowSize64";
TIFFDirectory *td = &tif->tif_dir;
uint64 rowsize;
+ uint64 tilerowsize;
- if (td->td_tilelength == 0 || td->td_tilewidth == 0)
+ if (td->td_tilelength == 0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Tile length is zero");
+ return 0;
+ }
+ if (td->td_tilewidth == 0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Tile width is zero");
return (0);
+ }
rowsize = _TIFFMultiply64(tif, td->td_bitspersample, td->td_tilewidth,
"TIFFTileRowSize");
if (td->td_planarconfig == PLANARCONFIG_CONTIG)
+ {
+ if (td->td_samplesperpixel == 0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Samples per pixel is zero");
+ return 0;
+ }
rowsize = _TIFFMultiply64(tif, rowsize, td->td_samplesperpixel,
"TIFFTileRowSize");
- return (TIFFhowmany8_64(rowsize));
+ }
+ tilerowsize=TIFFhowmany8_64(rowsize);
+ if (tilerowsize == 0)
+ {
+ TIFFErrorExt(tif->tif_clientdata,module,"Computed tile row size is zero");
+ return 0;
+ }
+ return (tilerowsize);
}
tmsize_t
TIFFTileRowSize(TIFF* tif)
@@ -203,12 +226,13 @@ TIFFVTileSize64(TIFF* tif, uint32 nrows)
uint64 samplingrow_size;
TIFFGetFieldDefaulted(tif,TIFFTAG_YCBCRSUBSAMPLING,ycbcrsubsampling+0,
ycbcrsubsampling+1);
- assert((ycbcrsubsampling[0]==1)||(ycbcrsubsampling[0]==2)||(ycbcrsubsampling[0]==4));
- assert((ycbcrsubsampling[1]==1)||(ycbcrsubsampling[1]==2)||(ycbcrsubsampling[1]==4));
- if (ycbcrsubsampling[0]*ycbcrsubsampling[1]==0)
+ if ((ycbcrsubsampling[0] != 1 && ycbcrsubsampling[0] != 2 && ycbcrsubsampling[0] != 4)
+ ||(ycbcrsubsampling[1] != 1 && ycbcrsubsampling[1] != 2 && ycbcrsubsampling[1] != 4))
{
TIFFErrorExt(tif->tif_clientdata,module,
- "Invalid YCbCr subsampling");
+ "Invalid YCbCr subsampling (%dx%d)",
+ ycbcrsubsampling[0],
+ ycbcrsubsampling[1] );
return 0;
}
samplingblock_samples=ycbcrsubsampling[0]*ycbcrsubsampling[1]+2;
diff --git a/tiff/libtiff/tif_unix.c b/tiff/libtiff/tif_unix.c
index 41fb99515..81e9d6653 100644
--- a/tiff/libtiff/tif_unix.c
+++ b/tiff/libtiff/tif_unix.c
@@ -1,4 +1,4 @@
-/* $Id: tif_unix.c,v 1.22 2010-03-10 18:56:49 bfriesen Exp $ */
+/* $Id: tif_unix.c,v 1.27 2015-08-19 02:31:04 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -55,53 +55,102 @@
#include "tiffiop.h"
+
+#define TIFF_IO_MAX 2147483647U
+
+
+typedef union fd_as_handle_union
+{
+ int fd;
+ thandle_t h;
+} fd_as_handle_union_t;
+
static tmsize_t
_tiffReadProc(thandle_t fd, void* buf, tmsize_t size)
{
- size_t size_io = (size_t) size;
- if ((tmsize_t) size_io != size)
+ fd_as_handle_union_t fdh;
+ const size_t bytes_total = (size_t) size;
+ size_t bytes_read;
+ tmsize_t count = -1;
+ if ((tmsize_t) bytes_total != size)
{
errno=EINVAL;
return (tmsize_t) -1;
}
- return ((tmsize_t) read((int)(size_t) fd, buf, size_io));
+ fdh.h = fd;
+ for (bytes_read=0; bytes_read < bytes_total; bytes_read+=count)
+ {
+ char *buf_offset = (char *) buf+bytes_read;
+ size_t io_size = bytes_total-bytes_read;
+ if (io_size > TIFF_IO_MAX)
+ io_size = TIFF_IO_MAX;
+ count=read(fdh.fd, buf_offset, (TIFFIOSize_t) io_size);
+ if (count <= 0)
+ break;
+ }
+ if (count < 0)
+ return (tmsize_t)-1;
+ return (tmsize_t) bytes_read;
}
static tmsize_t
_tiffWriteProc(thandle_t fd, void* buf, tmsize_t size)
{
- size_t size_io = (size_t) size;
- if ((tmsize_t) size_io != size)
+ fd_as_handle_union_t fdh;
+ const size_t bytes_total = (size_t) size;
+ size_t bytes_written;
+ tmsize_t count = -1;
+ if ((tmsize_t) bytes_total != size)
{
errno=EINVAL;
return (tmsize_t) -1;
}
- return ((tmsize_t) write((int)(size_t) fd, buf, size_io));
+ fdh.h = fd;
+ for (bytes_written=0; bytes_written < bytes_total; bytes_written+=count)
+ {
+ const char *buf_offset = (char *) buf+bytes_written;
+ size_t io_size = bytes_total-bytes_written;
+ if (io_size > TIFF_IO_MAX)
+ io_size = TIFF_IO_MAX;
+ count=write(fdh.fd, buf_offset, (TIFFIOSize_t) io_size);
+ if (count <= 0)
+ break;
+ }
+ if (count < 0)
+ return (tmsize_t)-1;
+ return (tmsize_t) bytes_written;
+ /* return ((tmsize_t) write(fdh.fd, buf, bytes_total)); */
}
static uint64
_tiffSeekProc(thandle_t fd, uint64 off, int whence)
{
- off_t off_io = (off_t) off;
+ fd_as_handle_union_t fdh;
+ _TIFF_off_t off_io = (_TIFF_off_t) off;
if ((uint64) off_io != off)
{
errno=EINVAL;
return (uint64) -1; /* this is really gross */
}
- return((uint64)lseek((int)(size_t)fd,off_io,whence));
+ fdh.h = fd;
+ return((uint64)_TIFF_lseek_f(fdh.fd,off_io,whence));
}
static int
_tiffCloseProc(thandle_t fd)
{
- return(close((int)(size_t)fd));
+ fd_as_handle_union_t fdh;
+ fdh.h = fd;
+ return(close(fdh.fd));
}
static uint64
_tiffSizeProc(thandle_t fd)
{
- struct stat sb;
- if (fstat((int)(size_t)fd,&sb)<0)
+ _TIFF_stat_s sb;
+ fd_as_handle_union_t fdh;
+ fdh.h = fd;
+ if (_TIFF_fstat_f(fdh.fd,&sb)<0)
return(0);
else
return((uint64)sb.st_size);
@@ -116,8 +165,10 @@ _tiffMapProc(thandle_t fd, void** pbase, toff_t* psize)
uint64 size64 = _tiffSizeProc(fd);
tmsize_t sizem = (tmsize_t)size64;
if ((uint64)sizem==size64) {
+ fd_as_handle_union_t fdh;
+ fdh.h = fd;
*pbase = (void*)
- mmap(0, (size_t)sizem, PROT_READ, MAP_SHARED, (int)(size_t) fd, 0);
+ mmap(0, (size_t)sizem, PROT_READ, MAP_SHARED, fdh.fd, 0);
if (*pbase != (void*) -1) {
*psize = (tmsize_t)sizem;
return (1);
@@ -155,8 +206,10 @@ TIFFFdOpen(int fd, const char* name, const char* mode)
{
TIFF* tif;
+ fd_as_handle_union_t fdh;
+ fdh.fd = fd;
tif = TIFFClientOpen(name, mode,
- (thandle_t)(size_t) fd,
+ fdh.h,
_tiffReadProc, _tiffWriteProc,
_tiffSeekProc, _tiffCloseProc, _tiffSizeProc,
_tiffMapProc, _tiffUnmapProc);
@@ -186,11 +239,15 @@ TIFFOpen(const char* name, const char* mode)
fd = open(name, m, 0666);
if (fd < 0) {
- TIFFErrorExt(0, module, "%s: Cannot open", name);
+ if (errno > 0 && strerror(errno) != NULL ) {
+ TIFFErrorExt(0, module, "%s: %s", name, strerror(errno) );
+ } else {
+ TIFFErrorExt(0, module, "%s: Cannot open", name);
+ }
return ((TIFF *)0);
}
- tif = TIFFFdOpen(fd, name, mode);
+ tif = TIFFFdOpen((int)fd, name, mode);
if(!tif)
close(fd);
return tif;
@@ -221,7 +278,7 @@ TIFFOpenW(const wchar_t* name, const char* mode)
fd = _wopen(name, m, 0666);
if (fd < 0) {
- TIFFErrorExt(0, module, "%s: Cannot open", name);
+ TIFFErrorExt(0, module, "%ls: Cannot open", name);
return ((TIFF *)0);
}
@@ -253,6 +310,9 @@ TIFFOpenW(const wchar_t* name, const char* mode)
void*
_TIFFmalloc(tmsize_t s)
{
+ if (s == 0)
+ return ((void *) NULL);
+
return (malloc((size_t) s));
}
diff --git a/tiff/libtiff/tif_win32.c b/tiff/libtiff/tif_win32.c
index 2cf1de93f..24b824f1b 100644
--- a/tiff/libtiff/tif_win32.c
+++ b/tiff/libtiff/tif_win32.c
@@ -1,4 +1,4 @@
-/* $Id: tif_win32.c,v 1.39 2011-12-22 17:07:57 bfriesen Exp $ */
+/* $Id: tif_win32.c,v 1.41 2015-08-23 20:12:44 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -28,6 +28,31 @@
* TIFF Library Win32-specific Routines. Adapted from tif_unix.c 4/5/95 by
* Scott Wagner (wagner@itek.com), Itek Graphix, Rochester, NY USA
*/
+
+/*
+ CreateFileA/CreateFileW return type 'HANDLE'.
+
+ thandle_t is declared like
+
+ DECLARE_HANDLE(thandle_t);
+
+ in tiffio.h.
+
+ Windows (from winnt.h) DECLARE_HANDLE logic looks like
+
+ #ifdef STRICT
+ typedef void *HANDLE;
+ #define DECLARE_HANDLE(name) struct name##__ { int unused; }; typedef struct name##__ *name
+ #else
+ typedef PVOID HANDLE;
+ #define DECLARE_HANDLE(name) typedef HANDLE name
+ #endif
+
+ See http://bugzilla.maptools.org/show_bug.cgi?id=1941 for problems in WIN64
+ builds resulting from this. Unfortunately, the proposed patch was lost.
+
+*/
+
#include "tiffiop.h"
#include <windows.h>
@@ -214,7 +239,7 @@ TIFFFdOpen(int ifd, const char* name, const char* mode)
break;
}
}
- tif = TIFFClientOpen(name, mode, (thandle_t)ifd,
+ tif = TIFFClientOpen(name, mode, (thandle_t)ifd, /* FIXME: WIN64 cast to pointer warning */
_tiffReadProc, _tiffWriteProc,
_tiffSeekProc, _tiffCloseProc, _tiffSizeProc,
fSuppressMap ? _tiffDummyMapProc : _tiffMapProc,
@@ -259,7 +284,7 @@ TIFFOpen(const char* name, const char* mode)
return ((TIFF *)0);
}
- tif = TIFFFdOpen((int)fd, name, mode);
+ tif = TIFFFdOpen((int)fd, name, mode); /* FIXME: WIN64 cast from pointer to int warning */
if(!tif)
CloseHandle(fd);
return tif;
@@ -314,7 +339,7 @@ TIFFOpenW(const wchar_t* name, const char* mode)
NULL, NULL);
}
- tif = TIFFFdOpen((int)fd,
+ tif = TIFFFdOpen((int)fd, /* FIXME: WIN64 cast from pointer to int warning */
(mbname != NULL) ? mbname : "<unknown>", mode);
if(!tif)
CloseHandle(fd);
@@ -329,6 +354,9 @@ TIFFOpenW(const wchar_t* name, const char* mode)
void*
_TIFFmalloc(tmsize_t s)
{
+ if (s == 0)
+ return ((void *) NULL);
+
return (malloc((size_t) s));
}
diff --git a/tiff/libtiff/tif_write.c b/tiff/libtiff/tif_write.c
index eaa1f8143..34c4d81a0 100644
--- a/tiff/libtiff/tif_write.c
+++ b/tiff/libtiff/tif_write.c
@@ -1,4 +1,4 @@
-/* $Id: tif_write.c,v 1.36 2011-02-18 20:53:04 fwarmerdam Exp $ */
+/* $Id: tif_write.c,v 1.45 2016-09-23 22:12:18 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -115,6 +115,10 @@ TIFFWriteScanline(TIFF* tif, void* buf, uint32 row, uint16 sample)
if (strip >= td->td_stripsperimage && imagegrew)
td->td_stripsperimage =
TIFFhowmany_32(td->td_imagelength,td->td_rowsperstrip);
+ if (td->td_stripsperimage == 0) {
+ TIFFErrorExt(tif->tif_clientdata, module, "Zero strips per image");
+ return (-1);
+ }
tif->tif_row =
(strip % td->td_stripsperimage) * td->td_rowsperstrip;
if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
@@ -220,24 +224,57 @@ TIFFWriteEncodedStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc)
tif->tif_flags |= TIFF_BUF4WRITE;
tif->tif_curstrip = strip;
+ if (td->td_stripsperimage == 0) {
+ TIFFErrorExt(tif->tif_clientdata, module, "Zero strips per image");
+ return ((tmsize_t) -1);
+ }
+
tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip;
if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
if (!(*tif->tif_setupencode)(tif))
return ((tmsize_t) -1);
tif->tif_flags |= TIFF_CODERSETUP;
}
-
- tif->tif_rawcc = 0;
- tif->tif_rawcp = tif->tif_rawdata;
if( td->td_stripbytecount[strip] > 0 )
{
+ /* Make sure that at the first attempt of rewriting the tile, we will have */
+ /* more bytes available in the output buffer than the previous byte count, */
+ /* so that TIFFAppendToStrip() will detect the overflow when it is called the first */
+ /* time if the new compressed tile is bigger than the older one. (GDAL #4771) */
+ if( tif->tif_rawdatasize <= (tmsize_t)td->td_stripbytecount[strip] )
+ {
+ if( !(TIFFWriteBufferSetup(tif, NULL,
+ (tmsize_t)TIFFroundup_64((uint64)(td->td_stripbytecount[strip] + 1), 1024))) )
+ return ((tmsize_t)(-1));
+ }
+
/* Force TIFFAppendToStrip() to consider placing data at end
of file. */
tif->tif_curoff = 0;
}
-
+
+ tif->tif_rawcc = 0;
+ tif->tif_rawcp = tif->tif_rawdata;
+
tif->tif_flags &= ~TIFF_POSTENCODE;
+
+ /* shortcut to avoid an extra memcpy() */
+ if( td->td_compression == COMPRESSION_NONE )
+ {
+ /* swab if needed - note that source buffer will be altered */
+ tif->tif_postdecode( tif, (uint8*) data, cc );
+
+ if (!isFillOrder(tif, td->td_fillorder) &&
+ (tif->tif_flags & TIFF_NOBITREV) == 0)
+ TIFFReverseBits((uint8*) data, cc);
+
+ if (cc > 0 &&
+ !TIFFAppendToStrip(tif, strip, (uint8*) data, cc))
+ return ((tmsize_t) -1);
+ return (cc);
+ }
+
sample = (uint16)(strip / td->td_stripsperimage);
if (!(*tif->tif_preencode)(tif, sample))
return ((tmsize_t) -1);
@@ -246,7 +283,7 @@ TIFFWriteEncodedStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc)
tif->tif_postdecode( tif, (uint8*) data, cc );
if (!(*tif->tif_encodestrip)(tif, (uint8*) data, cc, sample))
- return (0);
+ return ((tmsize_t) -1);
if (!(*tif->tif_postencode)(tif))
return ((tmsize_t) -1);
if (!isFillOrder(tif, td->td_fillorder) &&
@@ -300,6 +337,10 @@ TIFFWriteRawStrip(TIFF* tif, uint32 strip, void* data, tmsize_t cc)
return ((tmsize_t) -1);
}
tif->tif_curstrip = strip;
+ if (td->td_stripsperimage == 0) {
+ TIFFErrorExt(tif->tif_clientdata, module,"Zero strips per image");
+ return ((tmsize_t) -1);
+ }
tif->tif_row = (strip % td->td_stripsperimage) * td->td_rowsperstrip;
return (TIFFAppendToStrip(tif, strip, (uint8*) data, cc) ?
cc : (tmsize_t) -1);
@@ -342,6 +383,7 @@ TIFFWriteEncodedTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc)
static const char module[] = "TIFFWriteEncodedTile";
TIFFDirectory *td;
uint16 sample;
+ uint32 howmany32;
if (!WRITECHECKTILES(tif, module))
return ((tmsize_t)(-1));
@@ -362,24 +404,43 @@ TIFFWriteEncodedTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc)
tif->tif_flags |= TIFF_BUF4WRITE;
tif->tif_curtile = tile;
- tif->tif_rawcc = 0;
- tif->tif_rawcp = tif->tif_rawdata;
-
if( td->td_stripbytecount[tile] > 0 )
{
+ /* Make sure that at the first attempt of rewriting the tile, we will have */
+ /* more bytes available in the output buffer than the previous byte count, */
+ /* so that TIFFAppendToStrip() will detect the overflow when it is called the first */
+ /* time if the new compressed tile is bigger than the older one. (GDAL #4771) */
+ if( tif->tif_rawdatasize <= (tmsize_t) td->td_stripbytecount[tile] )
+ {
+ if( !(TIFFWriteBufferSetup(tif, NULL,
+ (tmsize_t)TIFFroundup_64((uint64)(td->td_stripbytecount[tile] + 1), 1024))) )
+ return ((tmsize_t)(-1));
+ }
+
/* Force TIFFAppendToStrip() to consider placing data at end
of file. */
tif->tif_curoff = 0;
}
-
+
+ tif->tif_rawcc = 0;
+ tif->tif_rawcp = tif->tif_rawdata;
+
/*
* Compute tiles per row & per column to compute
* current row and column
*/
- tif->tif_row = (tile % TIFFhowmany_32(td->td_imagelength, td->td_tilelength))
- * td->td_tilelength;
- tif->tif_col = (tile % TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth))
- * td->td_tilewidth;
+ howmany32=TIFFhowmany_32(td->td_imagelength, td->td_tilelength);
+ if (howmany32 == 0) {
+ TIFFErrorExt(tif->tif_clientdata,module,"Zero tiles");
+ return ((tmsize_t)(-1));
+ }
+ tif->tif_row = (tile % howmany32) * td->td_tilelength;
+ howmany32=TIFFhowmany_32(td->td_imagewidth, td->td_tilewidth);
+ if (howmany32 == 0) {
+ TIFFErrorExt(tif->tif_clientdata,module,"Zero tiles");
+ return ((tmsize_t)(-1));
+ }
+ tif->tif_col = (tile % howmany32) * td->td_tilewidth;
if ((tif->tif_flags & TIFF_CODERSETUP) == 0) {
if (!(*tif->tif_setupencode)(tif))
@@ -387,9 +448,7 @@ TIFFWriteEncodedTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc)
tif->tif_flags |= TIFF_CODERSETUP;
}
tif->tif_flags &= ~TIFF_POSTENCODE;
- sample = (uint16)(tile/td->td_stripsperimage);
- if (!(*tif->tif_preencode)(tif, sample))
- return ((tmsize_t)(-1));
+
/*
* Clamp write amount to the tile size. This is mostly
* done so that callers can pass in some large number
@@ -398,11 +457,30 @@ TIFFWriteEncodedTile(TIFF* tif, uint32 tile, void* data, tmsize_t cc)
if ( cc < 1 || cc > tif->tif_tilesize)
cc = tif->tif_tilesize;
+ /* shortcut to avoid an extra memcpy() */
+ if( td->td_compression == COMPRESSION_NONE )
+ {
+ /* swab if needed - note that source buffer will be altered */
+ tif->tif_postdecode( tif, (uint8*) data, cc );
+
+ if (!isFillOrder(tif, td->td_fillorder) &&
+ (tif->tif_flags & TIFF_NOBITREV) == 0)
+ TIFFReverseBits((uint8*) data, cc);
+
+ if (cc > 0 &&
+ !TIFFAppendToStrip(tif, tile, (uint8*) data, cc))
+ return ((tmsize_t) -1);
+ return (cc);
+ }
+
+ sample = (uint16)(tile/td->td_stripsperimage);
+ if (!(*tif->tif_preencode)(tif, sample))
+ return ((tmsize_t)(-1));
/* swab if needed - note that source buffer will be altered */
tif->tif_postdecode( tif, (uint8*) data, cc );
if (!(*tif->tif_encodetile)(tif, (uint8*) data, cc, sample))
- return (0);
+ return ((tmsize_t) -1);
if (!(*tif->tif_postencode)(tif))
return ((tmsize_t)(-1));
if (!isFillOrder(tif, td->td_fillorder) &&
@@ -720,7 +798,14 @@ TIFFFlushData1(TIFF* tif)
if (!TIFFAppendToStrip(tif,
isTiled(tif) ? tif->tif_curtile : tif->tif_curstrip,
tif->tif_rawdata, tif->tif_rawcc))
+ {
+ /* We update those variables even in case of error since there's */
+ /* code that doesn't really check the return code of this */
+ /* function */
+ tif->tif_rawcc = 0;
+ tif->tif_rawcp = tif->tif_rawdata;
return (0);
+ }
tif->tif_rawcc = 0;
tif->tif_rawcp = tif->tif_rawdata;
}
diff --git a/tiff/libtiff/tif_zip.c b/tiff/libtiff/tif_zip.c
index f5aa2a964..8c35aea83 100644
--- a/tiff/libtiff/tif_zip.c
+++ b/tiff/libtiff/tif_zip.c
@@ -1,4 +1,4 @@
-/* $Id: tif_zip.c,v 1.31 2011-01-06 16:00:23 fwarmerdam Exp $ */
+/* $Id: tif_zip.c,v 1.36 2016-11-12 16:48:28 erouault Exp $ */
/*
* Copyright (c) 1995-1997 Sam Leffler
@@ -36,7 +36,7 @@
* 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
+ * older versions of this codec avoided this bug by suppressing 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.
@@ -61,6 +61,8 @@
#error "Antiquated ZLIB software; you must use version 1.0 or later"
#endif
+#define SAFE_MSG(sp) ((sp)->stream.msg == NULL ? "" : (sp)->stream.msg)
+
/*
* State block for each open TIFF
* file using ZIP compression/decompression.
@@ -106,7 +108,7 @@ ZIPSetupDecode(TIFF* tif)
}
if (inflateInit(&sp->stream) != Z_OK) {
- TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg);
+ TIFFErrorExt(tif->tif_clientdata, module, "%s", SAFE_MSG(sp));
return (0);
} else {
sp->state |= ZSTATE_INIT_DECODE;
@@ -133,7 +135,7 @@ ZIPPreDecode(TIFF* tif, uint16 s)
assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised,
we need to simplify this code to reflect a ZLib that is likely updated
to deal with 8byte memory sizes, though this code will respond
- apropriately even before we simplify it */
+ appropriately even before we simplify it */
sp->stream.avail_in = (uInt) tif->tif_rawcc;
if ((tmsize_t)sp->stream.avail_in != tif->tif_rawcc)
{
@@ -160,7 +162,7 @@ ZIPDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised,
we need to simplify this code to reflect a ZLib that is likely updated
to deal with 8byte memory sizes, though this code will respond
- apropriately even before we simplify it */
+ appropriately even before we simplify it */
sp->stream.avail_out = (uInt) occ;
if ((tmsize_t)sp->stream.avail_out != occ)
{
@@ -174,14 +176,14 @@ ZIPDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
if (state == Z_DATA_ERROR) {
TIFFErrorExt(tif->tif_clientdata, module,
"Decoding error at scanline %lu, %s",
- (unsigned long) tif->tif_row, sp->stream.msg);
+ (unsigned long) tif->tif_row, SAFE_MSG(sp));
if (inflateSync(&sp->stream) != Z_OK)
return (0);
continue;
}
if (state != Z_OK) {
- TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s",
- sp->stream.msg);
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "ZLib error: %s", SAFE_MSG(sp));
return (0);
}
} while (sp->stream.avail_out > 0);
@@ -211,7 +213,7 @@ ZIPSetupEncode(TIFF* tif)
}
if (deflateInit(&sp->stream, sp->zipquality) != Z_OK) {
- TIFFErrorExt(tif->tif_clientdata, module, "%s", sp->stream.msg);
+ TIFFErrorExt(tif->tif_clientdata, module, "%s", SAFE_MSG(sp));
return (0);
} else {
sp->state |= ZSTATE_INIT_ENCODE;
@@ -237,8 +239,8 @@ ZIPPreEncode(TIFF* tif, uint16 s)
assert(sizeof(sp->stream.avail_out)==4); /* if this assert gets raised,
we need to simplify this code to reflect a ZLib that is likely updated
to deal with 8byte memory sizes, though this code will respond
- apropriately even before we simplify it */
- sp->stream.avail_out = tif->tif_rawdatasize;
+ appropriately even before we simplify it */
+ sp->stream.avail_out = (uInt)tif->tif_rawdatasize;
if ((tmsize_t)sp->stream.avail_out != tif->tif_rawdatasize)
{
TIFFErrorExt(tif->tif_clientdata, module, "ZLib cannot deal with buffers this size");
@@ -264,7 +266,7 @@ ZIPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
assert(sizeof(sp->stream.avail_in)==4); /* if this assert gets raised,
we need to simplify this code to reflect a ZLib that is likely updated
to deal with 8byte memory sizes, though this code will respond
- apropriately even before we simplify it */
+ appropriately even before we simplify it */
sp->stream.avail_in = (uInt) cc;
if ((tmsize_t)sp->stream.avail_in != cc)
{
@@ -273,8 +275,9 @@ ZIPEncode(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s)
}
do {
if (deflate(&sp->stream, Z_NO_FLUSH) != Z_OK) {
- TIFFErrorExt(tif->tif_clientdata, module, "Encoder error: %s",
- sp->stream.msg);
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "Encoder error: %s",
+ SAFE_MSG(sp));
return (0);
}
if (sp->stream.avail_out == 0) {
@@ -313,8 +316,8 @@ ZIPPostEncode(TIFF* tif)
}
break;
default:
- TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s",
- sp->stream.msg);
+ TIFFErrorExt(tif->tif_clientdata, module,
+ "ZLib error: %s", SAFE_MSG(sp));
return (0);
}
} while (state != Z_STREAM_END);
@@ -359,7 +362,7 @@ ZIPVSetField(TIFF* tif, uint32 tag, va_list ap)
if (deflateParams(&sp->stream,
sp->zipquality, Z_DEFAULT_STRATEGY) != Z_OK) {
TIFFErrorExt(tif->tif_clientdata, module, "ZLib error: %s",
- sp->stream.msg);
+ SAFE_MSG(sp));
return (0);
}
}
@@ -457,7 +460,7 @@ bad:
"No space for ZIP state block");
return (0);
}
-#endif /* ZIP_SUPORT */
+#endif /* ZIP_SUPPORT */
/* vim: set ts=8 sts=8 sw=8 noet: */
/*
diff --git a/tiff/libtiff/tiff.h b/tiff/libtiff/tiff.h
index 5c32d3ae9..fb39634c4 100644
--- a/tiff/libtiff/tiff.h
+++ b/tiff/libtiff/tiff.h
@@ -1,4 +1,4 @@
-/* $Id: tiff.h,v 1.67 2011-01-24 21:06:32 olivier Exp $ */
+/* $Id: tiff.h,v 1.70 2016-01-23 21:20:34 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -166,6 +166,8 @@ typedef enum {
#define COMPRESSION_LZW 5 /* Lempel-Ziv & Welch */
#define COMPRESSION_OJPEG 6 /* !6.0 JPEG */
#define COMPRESSION_JPEG 7 /* %JPEG DCT compression */
+#define COMPRESSION_T85 9 /* !TIFF/FX T.85 JBIG compression */
+#define COMPRESSION_T43 10 /* !TIFF/FX T.43 colour by layered JBIG compression */
#define COMPRESSION_NEXT 32766 /* NeXT 2-bit RLE */
#define COMPRESSION_CCITTRLEW 32771 /* #1 w/ word alignment */
#define COMPRESSION_PACKBITS 32773 /* Macintosh RLE */
@@ -199,6 +201,7 @@ typedef enum {
#define PHOTOMETRIC_CIELAB 8 /* !1976 CIE L*a*b* */
#define PHOTOMETRIC_ICCLAB 9 /* ICC L*a*b* [Adobe TIFF Technote 4] */
#define PHOTOMETRIC_ITULAB 10 /* ITU L*a*b* */
+#define PHOTOMETRIC_CFA 32803 /* color filter array */
#define PHOTOMETRIC_LOGL 32844 /* CIE Log2(L) */
#define PHOTOMETRIC_LOGLUV 32845 /* CIE Log2(L) (u',v') */
#define TIFFTAG_THRESHHOLDING 263 /* +thresholding used on data */
@@ -276,7 +279,7 @@ typedef enum {
#define PREDICTOR_FLOATINGPOINT 3 /* floating point predictor */
#define TIFFTAG_WHITEPOINT 318 /* image white point */
#define TIFFTAG_PRIMARYCHROMATICITIES 319 /* !primary chromaticities */
-#define TIFFTAG_COLORMAP 320 /* RGB map for pallette image */
+#define TIFFTAG_COLORMAP 320 /* RGB map for palette image */
#define TIFFTAG_HALFTONEHINTS 321 /* !highlight+shadow info */
#define TIFFTAG_TILEWIDTH 322 /* !tile width in pixels */
#define TIFFTAG_TILELENGTH 323 /* !tile height in pixels */
@@ -319,6 +322,30 @@ typedef enum {
[Adobe TIFF Technote 3] */
#define TIFFTAG_JPEGTABLES 347 /* %JPEG table stream */
#define TIFFTAG_OPIPROXY 351 /* %OPI Proxy [Adobe TIFF technote] */
+/* Tags 400-435 are from the TIFF/FX spec */
+#define TIFFTAG_GLOBALPARAMETERSIFD 400 /* ! */
+#define TIFFTAG_PROFILETYPE 401 /* ! */
+#define PROFILETYPE_UNSPECIFIED 0 /* ! */
+#define PROFILETYPE_G3_FAX 1 /* ! */
+#define TIFFTAG_FAXPROFILE 402 /* ! */
+#define FAXPROFILE_S 1 /* !TIFF/FX FAX profile S */
+#define FAXPROFILE_F 2 /* !TIFF/FX FAX profile F */
+#define FAXPROFILE_J 3 /* !TIFF/FX FAX profile J */
+#define FAXPROFILE_C 4 /* !TIFF/FX FAX profile C */
+#define FAXPROFILE_L 5 /* !TIFF/FX FAX profile L */
+#define FAXPROFILE_M 6 /* !TIFF/FX FAX profile LM */
+#define TIFFTAG_CODINGMETHODS 403 /* !TIFF/FX coding methods */
+#define CODINGMETHODS_T4_1D (1 << 1) /* !T.4 1D */
+#define CODINGMETHODS_T4_2D (1 << 2) /* !T.4 2D */
+#define CODINGMETHODS_T6 (1 << 3) /* !T.6 */
+#define CODINGMETHODS_T85 (1 << 4) /* !T.85 JBIG */
+#define CODINGMETHODS_T42 (1 << 5) /* !T.42 JPEG */
+#define CODINGMETHODS_T43 (1 << 6) /* !T.43 colour by layered JBIG */
+#define TIFFTAG_VERSIONYEAR 404 /* !TIFF/FX version year */
+#define TIFFTAG_MODENUMBER 405 /* !TIFF/FX mode number */
+#define TIFFTAG_DECODE 433 /* !TIFF/FX decode */
+#define TIFFTAG_IMAGEBASECOLOR 434 /* !TIFF/FX image base colour */
+#define TIFFTAG_T82OPTIONS 435 /* !TIFF/FX T.82 options */
/*
* Tags 512-521 are obsoleted by Technical Note #2 which specifies a
* revised JPEG-in-TIFF scheme.
@@ -331,7 +358,7 @@ typedef enum {
#define TIFFTAG_JPEGRESTARTINTERVAL 515 /* !restart interval length */
#define TIFFTAG_JPEGLOSSLESSPREDICTORS 517 /* !lossless proc predictor */
#define TIFFTAG_JPEGPOINTTRANSFORM 518 /* !lossless point transform */
-#define TIFFTAG_JPEGQTABLES 519 /* !Q matrice offsets */
+#define TIFFTAG_JPEGQTABLES 519 /* !Q matrix offsets */
#define TIFFTAG_JPEGDCTABLES 520 /* !DCT table offsets */
#define TIFFTAG_JPEGACTABLES 521 /* !AC coefficient offsets */
#define TIFFTAG_YCBCRCOEFFICIENTS 529 /* !RGB -> YCbCr transform */
@@ -340,6 +367,7 @@ typedef enum {
#define YCBCRPOSITION_CENTERED 1 /* !as in PostScript Level 2 */
#define YCBCRPOSITION_COSITED 2 /* !as in CCIR 601-1 */
#define TIFFTAG_REFERENCEBLACKWHITE 532 /* !colorimetry info */
+#define TIFFTAG_STRIPROWCOUNTS 559 /* !TIFF/FX strip row counts */
#define TIFFTAG_XMLPACKET 700 /* %XML packet
[Adobe XMP Specification,
January 2004 */
@@ -375,6 +403,8 @@ typedef enum {
#define TIFFTAG_PIXAR_MATRIX_WORLDTOCAMERA 33306
/* tag 33405 is a private tag registered to Eastman Kodak */
#define TIFFTAG_WRITERSERIALNUMBER 33405 /* device serial number */
+#define TIFFTAG_CFAREPEATPATTERNDIM 33421 /* dimensions of CFA pattern */
+#define TIFFTAG_CFAPATTERN 33422 /* color filter array pattern */
/* tag 33432 is listed in the 6.0 spec w/ unknown ownership */
#define TIFFTAG_COPYRIGHT 33432 /* copyright string */
/* IPTC TAG from RichTIFF specifications */
@@ -406,6 +436,7 @@ typedef enum {
#define TIFFTAG_EXIFIFD 34665 /* Pointer to EXIF private directory */
/* tag 34750 is a private tag registered to Adobe? */
#define TIFFTAG_ICCPROFILE 34675 /* ICC profile data */
+#define TIFFTAG_IMAGELAYER 34732 /* !TIFF/FX image layer information */
/* tag 34750 is a private tag registered to Pixel Magic */
#define TIFFTAG_JBIGOPTIONS 34750 /* JBIG options */
#define TIFFTAG_GPSIFD 34853 /* Pointer to GPS private directory */
diff --git a/tiff/libtiff/tiffconf.h.cmake.in b/tiff/libtiff/tiffconf.h.cmake.in
new file mode 100644
index 000000000..de8a807eb
--- /dev/null
+++ b/tiff/libtiff/tiffconf.h.cmake.in
@@ -0,0 +1,130 @@
+/*
+ Configuration defines for installed libtiff.
+ This file maintained for backward compatibility. Do not use definitions
+ from this file in your programs.
+*/
+
+#ifndef _TIFFCONF_
+#define _TIFFCONF_
+
+/* Signed 16-bit type */
+#define TIFF_INT16_T @TIFF_INT16_T@
+
+/* Signed 32-bit type */
+#define TIFF_INT32_T @TIFF_INT32_T@
+
+/* Signed 64-bit type */
+#define TIFF_INT64_T @TIFF_INT64_T@
+
+/* Signed 8-bit type */
+#define TIFF_INT8_T @TIFF_INT8_T@
+
+/* Unsigned 16-bit type */
+#define TIFF_UINT16_T @TIFF_UINT16_T@
+
+/* Unsigned 32-bit type */
+#define TIFF_UINT32_T @TIFF_UINT32_T@
+
+/* Unsigned 64-bit type */
+#define TIFF_UINT64_T @TIFF_UINT64_T@
+
+/* Unsigned 8-bit type */
+#define TIFF_UINT8_T @TIFF_UINT8_T@
+
+/* Unsigned size type */
+#define TIFF_SIZE_T @TIFF_SIZE_T@
+
+/* Signed size type */
+#define TIFF_SSIZE_T @TIFF_SSIZE_T@
+
+/* Pointer difference type */
+#define TIFF_PTRDIFF_T @TIFF_PTRDIFF_T@
+
+/* Define to 1 if the system has the type `int16'. */
+#cmakedefine HAVE_INT16 1
+
+/* Define to 1 if the system has the type `int32'. */
+#cmakedefine HAVE_INT32 1
+
+/* Define to 1 if the system has the type `int8'. */
+#cmakedefine HAVE_INT8 1
+
+/* Compatibility stuff. */
+
+/* Define as 0 or 1 according to the floating point format suported by the
+ machine */
+#cmakedefine HAVE_IEEEFP 1
+
+/* Set the native cpu bit order (FILLORDER_LSB2MSB or FILLORDER_MSB2LSB) */
+#define HOST_FILLORDER @HOST_FILLORDER@
+
+/* Native cpu byte order: 1 if big-endian (Motorola) or 0 if little-endian
+ (Intel) */
+#define HOST_BIGENDIAN @HOST_BIG_ENDIAN@
+
+/* Support CCITT Group 3 & 4 algorithms */
+#cmakedefine CCITT_SUPPORT 1
+
+/* Support JPEG compression (requires IJG JPEG library) */
+#cmakedefine JPEG_SUPPORT 1
+
+/* Support JBIG compression (requires JBIG-KIT library) */
+#cmakedefine JBIG_SUPPORT
+
+/* Support LogLuv high dynamic range encoding */
+#cmakedefine LOGLUV_SUPPORT 1
+
+/* Support LZW algorithm */
+#cmakedefine LZW_SUPPORT 1
+
+/* Support NeXT 2-bit RLE algorithm */
+#cmakedefine NEXT_SUPPORT 1
+
+/* Support Old JPEG compresson (read contrib/ojpeg/README first! Compilation
+ fails with unpatched IJG JPEG library) */
+#cmakedefine OJPEG_SUPPORT 1
+
+/* Support Macintosh PackBits algorithm */
+#cmakedefine PACKBITS_SUPPORT 1
+
+/* Support Pixar log-format algorithm (requires Zlib) */
+#cmakedefine PIXARLOG_SUPPORT 1
+
+/* Support ThunderScan 4-bit RLE algorithm */
+#cmakedefine THUNDER_SUPPORT 1
+
+/* Support Deflate compression */
+#cmakedefine ZIP_SUPPORT 1
+
+/* Support strip chopping (whether or not to convert single-strip uncompressed
+ images to mutiple strips of ~8Kb to reduce memory usage) */
+#cmakedefine STRIPCHOP_DEFAULT 1
+
+/* Enable SubIFD tag (330) support */
+#cmakedefine SUBIFD_SUPPORT 1
+
+/* Treat extra sample as alpha (default enabled). The RGBA interface will
+ treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA. Many
+ packages produce RGBA files but don't mark the alpha properly. */
+#cmakedefine DEFAULT_EXTRASAMPLE_AS_ALPHA 1
+
+/* Pick up YCbCr subsampling info from the JPEG data stream to support files
+ lacking the tag (default enabled). */
+#cmakedefine CHECK_JPEG_YCBCR_SUBSAMPLING 1
+
+/* Support MS MDI magic number files as TIFF */
+#cmakedefine MDI_SUPPORT 1
+
+/*
+ * Feature support definitions.
+ * XXX: These macros are obsoleted. Don't use them in your apps!
+ * Macros stays here for backward compatibility and should be always defined.
+ */
+#define COLORIMETRY_SUPPORT
+#define YCBCR_SUPPORT
+#define CMYK_SUPPORT
+#define ICC_SUPPORT
+#define PHOTOSHOP_SUPPORT
+#define IPTC_SUPPORT
+
+#endif /* _TIFFCONF_ */
diff --git a/tiff/libtiff/tiffconf.vc.h b/tiff/libtiff/tiffconf.vc.h
index 680f839f1..c8c6c6566 100644
--- a/tiff/libtiff/tiffconf.vc.h
+++ b/tiff/libtiff/tiffconf.vc.h
@@ -55,22 +55,23 @@
/* Unsigned 64-bit type */
#define TIFF_UINT64_T unsigned __int64
+#if _WIN64
+/*
+ Windows 64-bit build
+*/
+
/* Signed size type */
-#if defined(_WIN64)
-#define TIFF_SSIZE_T signed __int64
-#else
-#define TIFF_SSIZE_T signed int
-#endif
+# define TIFF_SSIZE_T TIFF_INT64_T
-/* Signed size type formatter */
-#if defined(_WIN64)
-#define TIFF_SSIZE_FORMAT "%I64d"
#else
-#define TIFF_SSIZE_FORMAT "%ld"
-#endif
+/*
+ Windows 32-bit build
+*/
-/* Pointer difference type */
-#define TIFF_PTRDIFF_T long
+/* Signed size type */
+# define TIFF_SSIZE_T signed int
+
+#endif
/* Compatibility stuff. */
diff --git a/tiff/libtiff/tiffio.h b/tiff/libtiff/tiffio.h
index 6ca743431..6a84d803a 100644
--- a/tiff/libtiff/tiffio.h
+++ b/tiff/libtiff/tiffio.h
@@ -1,4 +1,4 @@
-/* $Id: tiffio.h,v 1.89 2012-02-18 16:20:26 bfriesen Exp $ */
+/* $Id: tiffio.h,v 1.92 2016-01-23 21:20:34 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -208,7 +208,7 @@ struct _TIFFRGBAImage {
uint16 orientation; /* image orientation */
uint16 req_orientation; /* requested orientation */
uint16 photometric; /* image photometric interp */
- uint16* redcmap; /* colormap pallete */
+ uint16* redcmap; /* colormap palette */
uint16* greencmap;
uint16* bluecmap;
/* get image data routine */
@@ -225,7 +225,7 @@ struct _TIFFRGBAImage {
TIFFYCbCrToRGB* ycbcr; /* YCbCr conversion state */
TIFFCIELabToRGB* cielab; /* CIE L*a*b conversion state */
- uint8* UaToAa; /* Unassociated alpha to associated alpha convertion LUT */
+ uint8* UaToAa; /* Unassociated alpha to associated alpha conversion LUT */
uint8* Bitdepth16To8; /* LUT for conversion from 16bit to 8bit values */
int row_offset;
@@ -319,6 +319,13 @@ extern const TIFFField* TIFFFindField(TIFF *, uint32, TIFFDataType);
extern const TIFFField* TIFFFieldWithTag(TIFF*, uint32);
extern const TIFFField* TIFFFieldWithName(TIFF*, const char *);
+extern uint32 TIFFFieldTag(const TIFFField*);
+extern const char* TIFFFieldName(const TIFFField*);
+extern TIFFDataType TIFFFieldDataType(const TIFFField*);
+extern int TIFFFieldPassCount(const TIFFField*);
+extern int TIFFFieldReadCount(const TIFFField*);
+extern int TIFFFieldWriteCount(const TIFFField*);
+
typedef int (*TIFFVSetMethod)(TIFF*, uint32, va_list);
typedef int (*TIFFVGetMethod)(TIFF*, uint32, va_list);
typedef void (*TIFFPrintMethod)(TIFF*, FILE*, long);
@@ -392,6 +399,8 @@ extern int TIFFSetupStrips(TIFF *);
extern int TIFFWriteCheck(TIFF*, int, const char *);
extern void TIFFFreeDirectory(TIFF*);
extern int TIFFCreateDirectory(TIFF*);
+extern int TIFFCreateCustomDirectory(TIFF*,const TIFFFieldArray*);
+extern int TIFFCreateEXIFDirectory(TIFF*);
extern int TIFFLastDirectory(TIFF*);
extern int TIFFSetDirectory(TIFF*, uint16);
extern int TIFFSetSubDirectory(TIFF*, uint64);
@@ -400,6 +409,7 @@ extern int TIFFSetField(TIFF*, uint32, ...);
extern int TIFFVSetField(TIFF*, uint32, va_list);
extern int TIFFUnsetField(TIFF*, uint32);
extern int TIFFWriteDirectory(TIFF *);
+extern int TIFFWriteCustomDirectory(TIFF *, uint64 *);
extern int TIFFCheckpointDirectory(TIFF *);
extern int TIFFRewriteDirectory(TIFF *);
diff --git a/tiff/libtiff/tiffiop.h b/tiff/libtiff/tiffiop.h
index 2b6bd71a6..cf020d077 100644
--- a/tiff/libtiff/tiffiop.h
+++ b/tiff/libtiff/tiffiop.h
@@ -1,4 +1,4 @@
-/* $Id: tiffiop.h,v 1.82 2011-02-18 20:53:05 fwarmerdam Exp $ */
+/* $Id: tiffiop.h,v 1.89 2016-01-23 21:20:34 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -34,6 +34,8 @@
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
+#endif
+
#ifndef O_RDONLY
#define O_RDONLY _O_RDONLY
#endif
@@ -49,7 +51,6 @@
#ifndef O_TRUNC
#define O_TRUNC _O_TRUNC
#endif
-#endif
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
@@ -72,6 +73,14 @@ extern void *lfind(const void *, const void *, size_t *, size_t,
int (*)(const void *, const void *));
#endif
+#if !defined(__WIN32__)
+#if !defined(HAVE_SNPRINTF) && !defined(HAVE__SNPRINTF)
+#undef snprintf
+#define snprintf _TIFF_snprintf_f
+extern int snprintf(char* str, size_t size, const char* format, ...);
+#endif
+#endif
+
#include "tiffio.h"
#include "tif_dir.h"
@@ -95,7 +104,7 @@ typedef struct client_info {
/*
* Typedefs for ``method pointers'' used internally.
- * these are depriciated and provided only for backwards compatibility
+ * these are deprecated and provided only for backwards compatibility.
*/
typedef unsigned char tidataval_t; /* internal image data value type */
typedef tidataval_t* tidata_t; /* reference to internal image data */
@@ -114,32 +123,33 @@ struct tiff {
int tif_fd; /* open file descriptor */
int tif_mode; /* open mode (O_*) */
uint32 tif_flags;
- #define TIFF_FILLORDER 0x00003 /* natural bit fill order for machine */
- #define TIFF_DIRTYHEADER 0x00004 /* header must be written on close */
- #define TIFF_DIRTYDIRECT 0x00008 /* current directory must be written */
- #define TIFF_BUFFERSETUP 0x00010 /* data buffers setup */
- #define TIFF_CODERSETUP 0x00020 /* encoder/decoder setup done */
- #define TIFF_BEENWRITING 0x00040 /* written 1+ scanlines to file */
- #define TIFF_SWAB 0x00080 /* byte swap file information */
- #define TIFF_NOBITREV 0x00100 /* inhibit bit reversal logic */
- #define TIFF_MYBUFFER 0x00200 /* my raw data buffer; free on close */
- #define TIFF_ISTILED 0x00400 /* file is tile, not strip- based */
- #define TIFF_MAPPED 0x00800 /* file is mapped into memory */
- #define TIFF_POSTENCODE 0x01000 /* need call to postencode routine */
- #define TIFF_INSUBIFD 0x02000 /* currently writing a subifd */
- #define TIFF_UPSAMPLED 0x04000 /* library is doing data up-sampling */
- #define TIFF_STRIPCHOP 0x08000 /* enable strip chopping support */
- #define TIFF_HEADERONLY 0x10000 /* read header only, do not process the first directory */
- #define TIFF_NOREADRAW 0x20000 /* skip reading of raw uncompressed image data */
- #define TIFF_INCUSTOMIFD 0x40000 /* currently writing a custom IFD */
- #define TIFF_BIGTIFF 0x80000 /* read/write bigtiff */
- #define TIFF_BUF4WRITE 0x100000 /* rawcc bytes are for writing */
- #define TIFF_DIRTYSTRIP 0x200000 /* stripoffsets/stripbytecount dirty*/
- #define TIFF_PERSAMPLE 0x400000 /* get/set per sample tags as arrays */
+ #define TIFF_FILLORDER 0x00003U /* natural bit fill order for machine */
+ #define TIFF_DIRTYHEADER 0x00004U /* header must be written on close */
+ #define TIFF_DIRTYDIRECT 0x00008U /* current directory must be written */
+ #define TIFF_BUFFERSETUP 0x00010U /* data buffers setup */
+ #define TIFF_CODERSETUP 0x00020U /* encoder/decoder setup done */
+ #define TIFF_BEENWRITING 0x00040U /* written 1+ scanlines to file */
+ #define TIFF_SWAB 0x00080U /* byte swap file information */
+ #define TIFF_NOBITREV 0x00100U /* inhibit bit reversal logic */
+ #define TIFF_MYBUFFER 0x00200U /* my raw data buffer; free on close */
+ #define TIFF_ISTILED 0x00400U /* file is tile, not strip- based */
+ #define TIFF_MAPPED 0x00800U /* file is mapped into memory */
+ #define TIFF_POSTENCODE 0x01000U /* need call to postencode routine */
+ #define TIFF_INSUBIFD 0x02000U /* currently writing a subifd */
+ #define TIFF_UPSAMPLED 0x04000U /* library is doing data up-sampling */
+ #define TIFF_STRIPCHOP 0x08000U /* enable strip chopping support */
+ #define TIFF_HEADERONLY 0x10000U /* read header only, do not process the first directory */
+ #define TIFF_NOREADRAW 0x20000U /* skip reading of raw uncompressed image data */
+ #define TIFF_INCUSTOMIFD 0x40000U /* currently writing a custom IFD */
+ #define TIFF_BIGTIFF 0x80000U /* read/write bigtiff */
+ #define TIFF_BUF4WRITE 0x100000U /* rawcc bytes are for writing */
+ #define TIFF_DIRTYSTRIP 0x200000U /* stripoffsets/stripbytecount dirty*/
+ #define TIFF_PERSAMPLE 0x400000U /* get/set per sample tags as arrays */
+ #define TIFF_BUFFERMMAP 0x800000U /* read buffer (tif_rawdata) points into mmap() memory */
uint64 tif_diroff; /* file offset of current directory */
uint64 tif_nextdiroff; /* file offset of following directory */
uint64* tif_dirlist; /* list of offsets to already seen directories to prevent IFD looping */
- uint16 tif_dirlistsize; /* number of entires in offset list */
+ uint16 tif_dirlistsize; /* number of entries in offset list */
uint16 tif_dirnumber; /* number of already seen directories */
TIFFDirectory tif_dir; /* internal rep of current directory */
TIFFDirectory tif_customdir; /* custom IFDs are separated from the main ones */
@@ -265,13 +275,60 @@ struct tiff {
#define TIFFroundup_64(x, y) (TIFFhowmany_64(x,y)*(y))
/* Safe multiply which returns zero if there is an integer overflow */
-#define TIFFSafeMultiply(t,v,m) ((((t)m != (t)0) && (((t)((v*m)/m)) == (t)v)) ? (t)(v*m) : (t)0)
+#define TIFFSafeMultiply(t,v,m) ((((t)(m) != (t)0) && (((t)(((v)*(m))/(m))) == (t)(v))) ? (t)((v)*(m)) : (t)0)
#define TIFFmax(A,B) ((A)>(B)?(A):(B))
#define TIFFmin(A,B) ((A)<(B)?(A):(B))
#define TIFFArrayCount(a) (sizeof (a) / sizeof ((a)[0]))
+/*
+ Support for large files.
+
+ Windows read/write APIs support only 'unsigned int' rather than 'size_t'.
+ Windows off_t is only 32-bit, even in 64-bit builds.
+*/
+#if defined(HAVE_FSEEKO)
+/*
+ Use fseeko() and ftello() if they are available since they use
+ 'off_t' rather than 'long'. It is wrong to use fseeko() and
+ ftello() only on systems with special LFS support since some systems
+ (e.g. FreeBSD) support a 64-bit off_t by default.
+
+ For MinGW, __MSVCRT_VERSION__ must be at least 0x800 to expose these
+ interfaces. The MinGW compiler must support the requested version. MinGW
+ does not distribute the CRT (it is supplied by Microsoft) so the correct CRT
+ must be available on the target computer in order for the program to run.
+*/
+#if defined(HAVE_FSEEKO)
+# define fseek(stream,offset,whence) fseeko(stream,offset,whence)
+# define ftell(stream,offset,whence) ftello(stream,offset,whence)
+#endif
+#endif
+#if defined(__WIN32__) && \
+ !(defined(_MSC_VER) && _MSC_VER < 1400) && \
+ !(defined(__MSVCRT_VERSION__) && __MSVCRT_VERSION__ < 0x800)
+typedef unsigned int TIFFIOSize_t;
+#define _TIFF_lseek_f(fildes,offset,whence) _lseeki64(fildes,/* __int64 */ offset,whence)
+/* #define _TIFF_tell_f(fildes) /\* __int64 *\/ _telli64(fildes) */
+#define _TIFF_fseek_f(stream,offset,whence) _fseeki64(stream,/* __int64 */ offset,whence)
+#define _TIFF_fstat_f(fildes,stat_buff) _fstati64(fildes,/* struct _stati64 */ stat_buff)
+/* #define _TIFF_ftell_f(stream) /\* __int64 *\/ _ftelli64(stream) */
+/* #define _TIFF_stat_f(path,stat_buff) _stati64(path,/\* struct _stati64 *\/ stat_buff) */
+#define _TIFF_stat_s struct _stati64
+#define _TIFF_off_t __int64
+#else
+typedef size_t TIFFIOSize_t;
+#define _TIFF_lseek_f(fildes,offset,whence) lseek(fildes,offset,whence)
+/* #define _TIFF_tell_f(fildes) (_TIFF_lseek_f(fildes,0,SEEK_CUR)) */
+#define _TIFF_fseek_f(stream,offset,whence) fseek(stream,offset,whence)
+#define _TIFF_fstat_f(fildes,stat_buff) fstat(fildes,stat_buff)
+/* #define _TIFF_ftell_f(stream) ftell(stream) */
+/* #define _TIFF_stat_f(path,stat_buff) stat(path,stat_buff) */
+#define _TIFF_stat_s struct stat
+#define _TIFF_off_t off_t
+#endif
+
#if defined(__cplusplus)
extern "C" {
#endif
diff --git a/tiff/libtiff/tiffvers.h b/tiff/libtiff/tiffvers.h
index fbdc5a10e..fe55c726c 100644
--- a/tiff/libtiff/tiffvers.h
+++ b/tiff/libtiff/tiffvers.h
@@ -1,4 +1,4 @@
-#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.0.1\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc."
+#define TIFFLIB_VERSION_STR "LIBTIFF, Version 4.0.7\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc."
/*
* This define can be used in code that requires
* compilation-related definitions specific to a
@@ -6,4 +6,4 @@
* version checking should be done based on the
* string returned by TIFFGetVersion.
*/
-#define TIFFLIB_VERSION 20120218
+#define TIFFLIB_VERSION 20161119
diff --git a/tiff/libtiff/uvcode.h b/tiff/libtiff/uvcode.h
index 50f11d7e0..6286cfbb0 100644
--- a/tiff/libtiff/uvcode.h
+++ b/tiff/libtiff/uvcode.h
@@ -3,7 +3,7 @@
#define UV_NDIVS 16289
#define UV_VSTART (float)0.016940
#define UV_NVS 163
-static struct {
+static const struct {
float ustart;
short nus, ncum;
} uv_row[UV_NVS] = {
diff --git a/tiff/man/CMakeLists.txt b/tiff/man/CMakeLists.txt
new file mode 100644
index 000000000..1db7556d5
--- /dev/null
+++ b/tiff/man/CMakeLists.txt
@@ -0,0 +1,99 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+set(man1_MANS
+ fax2ps.1
+ fax2tiff.1
+ pal2rgb.1
+ ppm2tiff.1
+ raw2tiff.1
+ rgb2ycbcr.1
+ thumbnail.1
+ tiff2bw.1
+ tiff2pdf.1
+ tiff2ps.1
+ tiff2rgba.1
+ tiffcmp.1
+ tiffcp.1
+ tiffcrop.1
+ tiffdither.1
+ tiffdump.1
+ tiffgt.1
+ tiffinfo.1
+ tiffmedian.1
+ tiffset.1
+ tiffsplit.1)
+
+set(man3_MANS
+ libtiff.3tiff
+ TIFFbuffer.3tiff
+ TIFFClose.3tiff
+ TIFFcodec.3tiff
+ TIFFcolor.3tiff
+ TIFFDataWidth.3tiff
+ TIFFError.3tiff
+ TIFFFieldDataType.3tiff
+ TIFFFieldName.3tiff
+ TIFFFieldPassCount.3tiff
+ TIFFFieldReadCount.3tiff
+ TIFFFieldTag.3tiff
+ TIFFFieldWriteCount.3tiff
+ TIFFFlush.3tiff
+ TIFFGetField.3tiff
+ TIFFmemory.3tiff
+ TIFFOpen.3tiff
+ TIFFPrintDirectory.3tiff
+ TIFFquery.3tiff
+ TIFFReadDirectory.3tiff
+ TIFFReadEncodedStrip.3tiff
+ TIFFReadEncodedTile.3tiff
+ TIFFReadRawStrip.3tiff
+ TIFFReadRawTile.3tiff
+ TIFFReadRGBAImage.3tiff
+ TIFFReadRGBAStrip.3tiff
+ TIFFReadRGBATile.3tiff
+ TIFFReadScanline.3tiff
+ TIFFReadTile.3tiff
+ TIFFRGBAImage.3tiff
+ TIFFSetDirectory.3tiff
+ TIFFSetField.3tiff
+ TIFFsize.3tiff
+ TIFFstrip.3tiff
+ TIFFswab.3tiff
+ TIFFtile.3tiff
+ TIFFWarning.3tiff
+ TIFFWriteDirectory.3tiff
+ TIFFWriteEncodedStrip.3tiff
+ TIFFWriteEncodedTile.3tiff
+ TIFFWriteRawStrip.3tiff
+ TIFFWriteRawTile.3tiff
+ TIFFWriteScanline.3tiff
+ TIFFWriteTile.3tiff)
+
+install(FILES ${man1_MANS}
+ DESTINATION "${CMAKE_INSTALL_FULL_MANDIR}/man1")
+install(FILES ${man3_MANS}
+ DESTINATION "${CMAKE_INSTALL_FULL_MANDIR}/man3")
+
+extra_dist(${man1_MANS} ${man3_MANS})
diff --git a/tiff/man/Makefile.am b/tiff/man/Makefile.am
index 745912bfe..08b8749b0 100644
--- a/tiff/man/Makefile.am
+++ b/tiff/man/Makefile.am
@@ -24,16 +24,12 @@
# Process this file with automake to produce Makefile.in.
dist_man1_MANS = \
- bmp2tiff.1 \
fax2ps.1 \
fax2tiff.1 \
- gif2tiff.1 \
pal2rgb.1 \
ppm2tiff.1 \
- ras2tiff.1 \
raw2tiff.1 \
rgb2ycbcr.1 \
- sgi2tiff.1 \
thumbnail.1 \
tiff2bw.1 \
tiff2pdf.1 \
@@ -48,8 +44,7 @@ dist_man1_MANS = \
tiffinfo.1 \
tiffmedian.1 \
tiffset.1 \
- tiffsplit.1 \
- tiffsv.1
+ tiffsplit.1
dist_man3_MANS = \
libtiff.3tiff \
@@ -59,6 +54,12 @@ dist_man3_MANS = \
TIFFcolor.3tiff \
TIFFDataWidth.3tiff \
TIFFError.3tiff \
+ TIFFFieldDataType.3tiff \
+ TIFFFieldName.3tiff \
+ TIFFFieldPassCount.3tiff \
+ TIFFFieldReadCount.3tiff \
+ TIFFFieldTag.3tiff \
+ TIFFFieldWriteCount.3tiff \
TIFFFlush.3tiff \
TIFFGetField.3tiff \
TIFFmemory.3tiff \
@@ -90,3 +91,6 @@ dist_man3_MANS = \
TIFFWriteRawTile.3tiff \
TIFFWriteScanline.3tiff \
TIFFWriteTile.3tiff
+
+EXTRA_DIST = \
+ CMakeLists.txt
diff --git a/tiff/man/Makefile.in b/tiff/man/Makefile.in
index ce61c206f..3f19b8c36 100644
--- a/tiff/man/Makefile.in
+++ b/tiff/man/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -40,6 +39,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -59,8 +113,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = man
-DIST_COMMON = $(dist_man1_MANS) $(dist_man3_MANS) \
- $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -68,19 +120,31 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
AM_V_GEN = $(am__v_GEN_@AM_V@)
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
AM_V_at = $(am__v_at_@AM_V@)
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
am__v_at_0 = @
+am__v_at_1 =
SOURCES =
DIST_SOURCES =
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -113,6 +177,9 @@ am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)"
man3dir = $(mandir)/man3
NROFF = nroff
MANS = $(dist_man1_MANS) $(dist_man3_MANS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+am__DIST_COMMON = $(dist_man1_MANS) $(dist_man3_MANS) \
+ $(srcdir)/Makefile.in $(top_srcdir)/config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -126,6 +193,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -173,6 +241,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -261,16 +330,12 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
dist_man1_MANS = \
- bmp2tiff.1 \
fax2ps.1 \
fax2tiff.1 \
- gif2tiff.1 \
pal2rgb.1 \
ppm2tiff.1 \
- ras2tiff.1 \
raw2tiff.1 \
rgb2ycbcr.1 \
- sgi2tiff.1 \
thumbnail.1 \
tiff2bw.1 \
tiff2pdf.1 \
@@ -285,8 +350,7 @@ dist_man1_MANS = \
tiffinfo.1 \
tiffmedian.1 \
tiffset.1 \
- tiffsplit.1 \
- tiffsv.1
+ tiffsplit.1
dist_man3_MANS = \
libtiff.3tiff \
@@ -296,6 +360,12 @@ dist_man3_MANS = \
TIFFcolor.3tiff \
TIFFDataWidth.3tiff \
TIFFError.3tiff \
+ TIFFFieldDataType.3tiff \
+ TIFFFieldName.3tiff \
+ TIFFFieldPassCount.3tiff \
+ TIFFFieldReadCount.3tiff \
+ TIFFFieldTag.3tiff \
+ TIFFFieldWriteCount.3tiff \
TIFFFlush.3tiff \
TIFFGetField.3tiff \
TIFFmemory.3tiff \
@@ -328,6 +398,9 @@ dist_man3_MANS = \
TIFFWriteScanline.3tiff \
TIFFWriteTile.3tiff
+EXTRA_DIST = \
+ CMakeLists.txt
+
all: all-am
.SUFFIXES:
@@ -343,7 +416,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign man/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign man/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -369,9 +441,18 @@ clean-libtool:
-rm -rf .libs _libs
install-man1: $(dist_man1_MANS)
@$(NORMAL_INSTALL)
- test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
- @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
- { for i in $$list; do echo "$$i"; done; \
+ @list1='$(dist_man1_MANS)'; \
+ list2=''; \
+ test -n "$(man1dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.1[a-z]*$$/p'; \
+ fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
@@ -401,9 +482,18 @@ uninstall-man1:
dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
install-man3: $(dist_man3_MANS)
@$(NORMAL_INSTALL)
- test -z "$(man3dir)" || $(MKDIR_P) "$(DESTDIR)$(man3dir)"
- @list='$(dist_man3_MANS)'; test -n "$(man3dir)" || exit 0; \
- { for i in $$list; do echo "$$i"; done; \
+ @list1='$(dist_man3_MANS)'; \
+ list2=''; \
+ test -n "$(man3dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.3[a-z]*$$/p'; \
+ fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
@@ -431,27 +521,14 @@ uninstall-man3:
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir)
-tags: TAGS
-TAGS:
+tags TAGS:
+
+ctags CTAGS:
-ctags: CTAGS
-CTAGS:
+cscope cscopelist:
distdir: $(DISTFILES)
- @list='$(MANS)'; if test -n "$$list"; then \
- list=`for p in $$list; do \
- if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
- if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
- if test -n "$$list" && \
- grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
- echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
- grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
- echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
- echo " typically \`make maintainer-clean' will remove them" >&2; \
- exit 1; \
- else :; fi; \
- else :; fi
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
@@ -589,17 +666,19 @@ uninstall-man: uninstall-man1 uninstall-man3
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
- distclean distclean-generic distclean-libtool distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-man1 \
- install-man3 install-pdf install-pdf-am install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
- ps ps-am uninstall uninstall-am uninstall-man uninstall-man1 \
- uninstall-man3
+ cscopelist-am ctags-am distclean distclean-generic \
+ distclean-libtool distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-man1 install-man3 install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+ uninstall-am uninstall-man uninstall-man1 uninstall-man3
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tiff/man/TIFFClose.3tiff b/tiff/man/TIFFClose.3tiff
index bcb760443..a6a7d82a1 100644
--- a/tiff/man/TIFFClose.3tiff
+++ b/tiff/man/TIFFClose.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFClose.3tiff,v 1.3 2009-08-24 19:13:40 bfriesen Exp $
+.\" $Id: TIFFClose.3tiff,v 1.4 2016-09-25 20:05:49 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -50,4 +50,4 @@ routine.
.BR TIFFOpen (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFDataWidth.3tiff b/tiff/man/TIFFDataWidth.3tiff
index cb274d891..af67777d2 100644
--- a/tiff/man/TIFFDataWidth.3tiff
+++ b/tiff/man/TIFFDataWidth.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFDataWidth.3tiff,v 1.3 2006-03-23 14:54:02 dron Exp $
+.\" $Id: TIFFDataWidth.3tiff,v 1.4 2016-09-25 20:05:49 bfriesen Exp $
.\"
.\" Copyright (c) 2002, Andrey Kiselev <dron@ak4719.spb.edu>
.\"
@@ -71,4 +71,4 @@ uknown data type supplied.
.BR libtiff (3TIFF),
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFError.3tiff b/tiff/man/TIFFError.3tiff
index 761ff08c4..6924c7f43 100644
--- a/tiff/man/TIFFError.3tiff
+++ b/tiff/man/TIFFError.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFError.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFError.3tiff,v 1.3 2016-09-25 20:05:49 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -66,4 +66,4 @@ returns a reference to the previous error handling function.
.BR printf (3)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFFieldDataType.3tiff b/tiff/man/TIFFFieldDataType.3tiff
new file mode 100644
index 000000000..4fb1e2cfa
--- /dev/null
+++ b/tiff/man/TIFFFieldDataType.3tiff
@@ -0,0 +1,53 @@
+.\" $Id: TIFFFieldDataType.3tiff,v 1.2 2016-09-25 20:05:49 bfriesen Exp $
+.\"
+.\" Copyright (c) 2012, Tom Lane <tgl@sss.pgh.pa.us>
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFFieldDataType 3TIFF "July 26, 2012" "libtiff"
+.SH NAME
+TIFFFieldDataType \- Get TIFF data type from field information
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "TIFFDataType TIFFFieldDataType(const TIFFField* " fip ")"
+.SH DESCRIPTION
+.BR TIFFFieldDataType
+returns the data type stored in a TIFF field.
+.P
+.I fip
+is a field information pointer previously returned by
+.BR TIFFFindField ,
+.BR TIFFFieldWithTag ,
+or
+.BR TIFFFieldWithName .
+.br
+.SH "RETURN VALUES"
+.br
+.BR TIFFFieldDataType
+returns a member of the enum type
+.BR TIFFDataType .
+.br
+.SH "SEE ALSO"
+.BR libtiff (3TIFF),
+.PP
+Libtiff library home page:
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFFieldName.3tiff b/tiff/man/TIFFFieldName.3tiff
new file mode 100644
index 000000000..0f49c3377
--- /dev/null
+++ b/tiff/man/TIFFFieldName.3tiff
@@ -0,0 +1,52 @@
+.\" $Id: TIFFFieldName.3tiff,v 1.2 2016-09-25 20:05:49 bfriesen Exp $
+.\"
+.\" Copyright (c) 2012, Tom Lane <tgl@sss.pgh.pa.us>
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFFieldName 3TIFF "July 26, 2012" "libtiff"
+.SH NAME
+TIFFFieldName \- Get TIFF field name from field information
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "const char* TIFFFieldName(const TIFFField* " fip ")"
+.SH DESCRIPTION
+.BR TIFFFieldName
+returns the textual name for a TIFF field.
+.P
+.I fip
+is a field information pointer previously returned by
+.BR TIFFFindField ,
+.BR TIFFFieldWithTag ,
+or
+.BR TIFFFieldWithName .
+.br
+.SH "RETURN VALUES"
+.br
+.BR TIFFFieldName
+returns a constant C string.
+.br
+.SH "SEE ALSO"
+.BR libtiff (3TIFF),
+.PP
+Libtiff library home page:
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFFieldPassCount.3tiff b/tiff/man/TIFFFieldPassCount.3tiff
new file mode 100644
index 000000000..07324f809
--- /dev/null
+++ b/tiff/man/TIFFFieldPassCount.3tiff
@@ -0,0 +1,73 @@
+.\" $Id: TIFFFieldPassCount.3tiff,v 1.2 2016-09-25 20:05:49 bfriesen Exp $
+.\"
+.\" Copyright (c) 2012, Tom Lane <tgl@sss.pgh.pa.us>
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFFieldPassCount 3TIFF "July 26, 2012" "libtiff"
+.SH NAME
+TIFFFieldPassCount \- Get whether to pass a count to TIFFGet/SetField
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "int TIFFFieldPassCount(const TIFFField* " fip ")"
+.SH DESCRIPTION
+.BR TIFFFieldPassCount
+returns true (nonzero) if
+.BR TIFFGetField
+and
+.BR TIFFSetField
+expect a
+.I count
+value to be passed before the actual data pointer.
+.P
+.I fip
+is a field information pointer previously returned by
+.BR TIFFFindField ,
+.BR TIFFFieldWithTag ,
+or
+.BR TIFFFieldWithName .
+.P
+When a
+.I count
+is required, it will be of type
+.BR uint32
+when
+.BR TIFFFieldReadCount
+reports
+.BR TIFF_VARIABLE2 ,
+and of type
+.BR uint16
+otherwise. (This distinction is critical for use of
+.BR TIFFGetField ,
+but normally not so for use of
+.BR TIFFSetField .)
+.br
+.SH "RETURN VALUES"
+.br
+.BR TIFFFieldPassCount
+returns an integer that is always 1 (true) or 0 (false).
+.br
+.SH "SEE ALSO"
+.BR libtiff (3TIFF),
+.PP
+Libtiff library home page:
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFFieldReadCount.3tiff b/tiff/man/TIFFFieldReadCount.3tiff
new file mode 100644
index 000000000..88d67fd16
--- /dev/null
+++ b/tiff/man/TIFFFieldReadCount.3tiff
@@ -0,0 +1,77 @@
+.\" $Id: TIFFFieldReadCount.3tiff,v 1.2 2016-09-25 20:05:49 bfriesen Exp $
+.\"
+.\" Copyright (c) 2012, Tom Lane <tgl@sss.pgh.pa.us>
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFFieldReadCount 3TIFF "July 26, 2012" "libtiff"
+.SH NAME
+TIFFFieldReadCount \- Get number of values to be read from field
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "int TIFFFieldReadCount(const TIFFField* " fip ")"
+.SH DESCRIPTION
+.BR TIFFFieldReadCount
+returns the number of values available to be read from the specified
+TIFF field; that is, the number of arguments that should be supplied to
+.BR TIFFGetField .
+For most field types this is a small positive integer, typically 1 or 2,
+but there are some special values:
+.br
+.BR TIFF_VARIABLE
+indicates that a variable number of values is possible; then, a
+.BR uint16
+.I count
+argument and a pointer
+.I data
+argument must be supplied to
+.BR TIFFGetField .
+.br
+.BR TIFF_VARIABLE2
+is the same as
+.BR TIFF_VARIABLE
+except that the
+.I count
+argument must have type
+.BR uint32 .
+.br
+.BR TIFF_SPP
+indicates that the number of arguments is equal to the image's
+number of samples per pixel.
+.P
+.I fip
+is a field information pointer previously returned by
+.BR TIFFFindField ,
+.BR TIFFFieldWithTag ,
+or
+.BR TIFFFieldWithName .
+.br
+.SH "RETURN VALUES"
+.br
+.BR TIFFFieldReadCount
+returns an integer.
+.br
+.SH "SEE ALSO"
+.BR libtiff (3TIFF),
+.PP
+Libtiff library home page:
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFFieldTag.3tiff b/tiff/man/TIFFFieldTag.3tiff
new file mode 100644
index 000000000..f94f1be98
--- /dev/null
+++ b/tiff/man/TIFFFieldTag.3tiff
@@ -0,0 +1,56 @@
+.\" $Id: TIFFFieldTag.3tiff,v 1.2 2016-09-25 20:05:49 bfriesen Exp $
+.\"
+.\" Copyright (c) 2012, Tom Lane <tgl@sss.pgh.pa.us>
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFFieldTag 3TIFF "July 26, 2012" "libtiff"
+.SH NAME
+TIFFFieldTag \- Get TIFF field tag value from field information
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "uint32 TIFFFieldTag(const TIFFField* " fip ")"
+.SH DESCRIPTION
+.BR TIFFFieldTag
+returns the numeric tag value for a TIFF field.
+This can be compared to various constants exported by the
+.BR libtiff
+header files, such as
+.BR TIFFTAG_IMAGEWIDTH .
+.P
+.I fip
+is a field information pointer previously returned by
+.BR TIFFFindField ,
+.BR TIFFFieldWithTag ,
+or
+.BR TIFFFieldWithName .
+.br
+.SH "RETURN VALUES"
+.br
+.BR TIFFFieldTag
+returns an integer tag value.
+.br
+.SH "SEE ALSO"
+.BR libtiff (3TIFF),
+.PP
+Libtiff library home page:
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFFieldWriteCount.3tiff b/tiff/man/TIFFFieldWriteCount.3tiff
new file mode 100644
index 000000000..68a3b043f
--- /dev/null
+++ b/tiff/man/TIFFFieldWriteCount.3tiff
@@ -0,0 +1,88 @@
+.\" $Id: TIFFFieldWriteCount.3tiff,v 1.2 2016-09-25 20:05:49 bfriesen Exp $
+.\"
+.\" Copyright (c) 2012, Tom Lane <tgl@sss.pgh.pa.us>
+.\"
+.\" 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.
+.\"
+.if n .po 0
+.TH TIFFFieldWriteCount 3TIFF "July 26, 2012" "libtiff"
+.SH NAME
+TIFFFieldWriteCount \- Get number of values to be written to field
+.SH SYNOPSIS
+.B "#include <tiffio.h>"
+.sp
+.BI "int TIFFFieldWriteCount(const TIFFField* " fip ")"
+.SH DESCRIPTION
+.BR TIFFFieldWriteCount
+returns the number of values to be written into the specified
+TIFF field; that is, the number of arguments that should be supplied to
+.BR TIFFSetField .
+For most field types this is a small positive integer, typically 1 or 2,
+but there are some special values:
+.br
+.BR TIFF_VARIABLE
+indicates that a variable number of values is possible; then, a
+.BR uint16
+.I count
+argument and a pointer
+.I data
+argument must be supplied to
+.BR TIFFSetField .
+.br
+.BR TIFF_VARIABLE2
+is the same as
+.BR TIFF_VARIABLE
+except that the
+.I count
+argument must have type
+.BR uint32 .
+(On most modern machines, this makes no practical difference, and the
+.I count
+argument can simply be an
+.BR int
+in either case.)
+.br
+.BR TIFF_SPP
+indicates that the number of arguments must be equal to the image's
+number of samples per pixel.
+.P
+.I fip
+is a field information pointer previously returned by
+.BR TIFFFindField ,
+.BR TIFFFieldWithTag ,
+or
+.BR TIFFFieldWithName .
+.P
+For most field types,
+.BR TIFFFieldWriteCount
+returns the same value as
+.BR TIFFFieldReadCount ,
+but there are some exceptions.
+.br
+.SH "RETURN VALUES"
+.br
+.BR TIFFFieldWriteCount
+returns an integer.
+.br
+.SH "SEE ALSO"
+.BR libtiff (3TIFF),
+.PP
+Libtiff library home page:
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFFlush.3tiff b/tiff/man/TIFFFlush.3tiff
index af3235036..27520da3a 100644
--- a/tiff/man/TIFFFlush.3tiff
+++ b/tiff/man/TIFFFlush.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFFlush.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFFlush.3tiff,v 1.3 2016-09-25 20:05:49 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -61,4 +61,4 @@ routine.
.BR libtiff (3TIFF),
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFGetField.3tiff b/tiff/man/TIFFGetField.3tiff
index 4d241ab22..bdf41a259 100644
--- a/tiff/man/TIFFGetField.3tiff
+++ b/tiff/man/TIFFGetField.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFGetField.3tiff,v 1.5 2010-05-06 02:54:46 olivier Exp $
+.\" $Id: TIFFGetField.3tiff,v 1.7 2016-09-25 20:05:49 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -188,14 +188,16 @@ is one, then a single array is returned; otherwise three arrays are returned.
Annex B.3 "Embedding ICC Profiles in TIFF Files" (available at
http://www.color.org) for an explanation.
.SH AUTOREGISTERED TAGS
-If you can't find the tag in the table above that means this is unsupported
-tag. But you still be able to read it's value if you know the data type of
+If you can't find the tag in the table above that means this is an unsupported
+tag and is not directly supported by
+.BR libtiff(3TIFF)
+library. You will still be able to read it's value if you know the data type of
that tag. For example, if you want to read the LONG value from the tag 33424
and ASCII string from the tag 36867 you can use the following code:
.PP
.RS
.nf
-uint16 count;
+uint32 count;
void *data;
TIFFGetField(tiff, 33424, &count, &data);
@@ -205,11 +207,6 @@ printf("Tag %d: %s, count %d\n", 36867, (char *)data, count);
.fi
.RE
.PP
-
-
-is not supported by
-.BR libtiff(3TIFF),
-library
.SH RETURN VALUES
1 is returned if the tag is defined in the current directory; otherwise a 0 is
returned.
@@ -229,4 +226,4 @@ An unknown tag was supplied.
.BR libtiff (3TIFF),
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFRGBAImage.3tiff b/tiff/man/TIFFRGBAImage.3tiff
index ef1a85cb4..86c936806 100644
--- a/tiff/man/TIFFRGBAImage.3tiff
+++ b/tiff/man/TIFFRGBAImage.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFRGBAImage.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFRGBAImage.3tiff,v 1.3 2016-09-25 20:05:49 bfriesen Exp $
.\"
.\" Copyright (c) 1991-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -283,4 +283,4 @@ data to 8-bit
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFReadDirectory.3tiff b/tiff/man/TIFFReadDirectory.3tiff
index 000bf0ae0..e13586fd6 100644
--- a/tiff/man/TIFFReadDirectory.3tiff
+++ b/tiff/man/TIFFReadDirectory.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFReadDirectory.3tiff,v 1.3 2010-12-12 01:45:35 faxguy Exp $
+.\" $Id: TIFFReadDirectory.3tiff,v 1.4 2016-09-25 20:05:49 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -161,4 +161,4 @@ the missing value based on the file size.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFReadEncodedStrip.3tiff b/tiff/man/TIFFReadEncodedStrip.3tiff
index d2d7b6746..afde8e74f 100644
--- a/tiff/man/TIFFReadEncodedStrip.3tiff
+++ b/tiff/man/TIFFReadEncodedStrip.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFReadEncodedStrip.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFReadEncodedStrip.3tiff,v 1.3 2016-09-25 20:05:49 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -75,4 +75,4 @@ routine.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFReadEncodedTile.3tiff b/tiff/man/TIFFReadEncodedTile.3tiff
index 5f6d90089..99d3e4599 100644
--- a/tiff/man/TIFFReadEncodedTile.3tiff
+++ b/tiff/man/TIFFReadEncodedTile.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFReadEncodedTile.3tiff,v 1.3 2006-10-13 07:22:01 dron Exp $
+.\" $Id: TIFFReadEncodedTile.3tiff,v 1.4 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -73,4 +73,4 @@ routine.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFReadRGBAImage.3tiff b/tiff/man/TIFFReadRGBAImage.3tiff
index 5d43ce396..7373e2aec 100644
--- a/tiff/man/TIFFReadRGBAImage.3tiff
+++ b/tiff/man/TIFFReadRGBAImage.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFReadRGBAImage.3tiff,v 1.4 2006-10-13 07:22:01 dron Exp $
+.\" $Id: TIFFReadRGBAImage.3tiff,v 1.5 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1991-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -215,4 +215,4 @@ data to 8-bit
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFReadRGBAStrip.3tiff b/tiff/man/TIFFReadRGBAStrip.3tiff
index a8bb18995..db889a0a9 100644
--- a/tiff/man/TIFFReadRGBAStrip.3tiff
+++ b/tiff/man/TIFFReadRGBAStrip.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFReadRGBAStrip.3tiff,v 1.3 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFReadRGBAStrip.3tiff,v 1.4 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1991-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -166,5 +166,5 @@ There was insufficient memory to allocate a table used to map data to 8-bit
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFReadRGBATile.3tiff b/tiff/man/TIFFReadRGBATile.3tiff
index dfae1a9a2..5cb76553e 100644
--- a/tiff/man/TIFFReadRGBATile.3tiff
+++ b/tiff/man/TIFFReadRGBATile.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFReadRGBATile.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFReadRGBATile.3tiff,v 1.3 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1991-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -168,4 +168,4 @@ There was insufficient memory to allocate a table used to map data to 8-bit
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFReadRawStrip.3tiff b/tiff/man/TIFFReadRawStrip.3tiff
index 1f2d1d1eb..6fe326b78 100644
--- a/tiff/man/TIFFReadRawStrip.3tiff
+++ b/tiff/man/TIFFReadRawStrip.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFReadRawStrip.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFReadRawStrip.3tiff,v 1.3 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -61,4 +61,4 @@ routine.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFReadRawTile.3tiff b/tiff/man/TIFFReadRawTile.3tiff
index 3945dd904..2844573e6 100644
--- a/tiff/man/TIFFReadRawTile.3tiff
+++ b/tiff/man/TIFFReadRawTile.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFReadRawTile.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFReadRawTile.3tiff,v 1.3 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -62,4 +62,4 @@ routine.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFReadScanline.3tiff b/tiff/man/TIFFReadScanline.3tiff
index 7baf65199..2d9c85a31 100644
--- a/tiff/man/TIFFReadScanline.3tiff
+++ b/tiff/man/TIFFReadScanline.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFReadScanline.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFReadScanline.3tiff,v 1.3 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -91,4 +91,4 @@ tile-based interfaces to read these formats.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFReadTile.3tiff b/tiff/man/TIFFReadTile.3tiff
index 4a9b20d58..f1107dc32 100644
--- a/tiff/man/TIFFReadTile.3tiff
+++ b/tiff/man/TIFFReadTile.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFReadTile.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFReadTile.3tiff,v 1.3 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -81,4 +81,4 @@ routine.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFSetDirectory.3tiff b/tiff/man/TIFFSetDirectory.3tiff
index 162d3107d..93faf1930 100644
--- a/tiff/man/TIFFSetDirectory.3tiff
+++ b/tiff/man/TIFFSetDirectory.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFSetDirectory.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFSetDirectory.3tiff,v 1.3 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -76,4 +76,4 @@ next directory in a file.
.IR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFSetField.3tiff b/tiff/man/TIFFSetField.3tiff
index 33e94717f..1754827cc 100644
--- a/tiff/man/TIFFSetField.3tiff
+++ b/tiff/man/TIFFSetField.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFSetField.3tiff,v 1.5 2010-05-06 02:54:46 olivier Exp $
+.\" $Id: TIFFSetField.3tiff,v 1.6 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -214,4 +214,4 @@ An invalid value was supplied for the named tag.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFWarning.3tiff b/tiff/man/TIFFWarning.3tiff
index c21dd3ef9..0d302ed8f 100644
--- a/tiff/man/TIFFWarning.3tiff
+++ b/tiff/man/TIFFWarning.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFWarning.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFWarning.3tiff,v 1.4 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -31,7 +31,7 @@ TIFFWarning, TIFFSetWarningHandler \- library warning interface
.sp
.BI "void TIFFWarning(const char *" module ", const char *" fmt ", " ... ")"
.sp
-.B "#include <stdargh.h>"
+.B "#include <stdarg.h>"
.sp
.BI "typedef void (*TIFFWarningHandler)(const char *" module ", const char *" fmt ", va_list " ap ");"
.sp
@@ -67,4 +67,4 @@ returns a reference to the previous error handling function.
.BR printf (3)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFWriteDirectory.3tiff b/tiff/man/TIFFWriteDirectory.3tiff
index b8de6bf58..9f0d24922 100644
--- a/tiff/man/TIFFWriteDirectory.3tiff
+++ b/tiff/man/TIFFWriteDirectory.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFWriteDirectory.3tiff,v 1.3 2010-12-12 01:45:35 faxguy Exp $
+.\" $Id: TIFFWriteDirectory.3tiff,v 1.4 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -135,4 +135,4 @@ written.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFWriteEncodedStrip.3tiff b/tiff/man/TIFFWriteEncodedStrip.3tiff
index 41306343c..a31f6e00c 100644
--- a/tiff/man/TIFFWriteEncodedStrip.3tiff
+++ b/tiff/man/TIFFWriteEncodedStrip.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFWriteEncodedStrip.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFWriteEncodedStrip.3tiff,v 1.3 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -99,4 +99,4 @@ counts.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFWriteEncodedTile.3tiff b/tiff/man/TIFFWriteEncodedTile.3tiff
index 4bb471f8c..476cbbb4b 100644
--- a/tiff/man/TIFFWriteEncodedTile.3tiff
+++ b/tiff/man/TIFFWriteEncodedTile.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFWriteEncodedTile.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFWriteEncodedTile.3tiff,v 1.3 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -93,4 +93,4 @@ counts.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFWriteRawStrip.3tiff b/tiff/man/TIFFWriteRawStrip.3tiff
index 0fed3aa37..8d145a078 100644
--- a/tiff/man/TIFFWriteRawStrip.3tiff
+++ b/tiff/man/TIFFWriteRawStrip.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFWriteRawStrip.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFWriteRawStrip.3tiff,v 1.3 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -93,4 +93,4 @@ currently specified image dimensions.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFWriteRawTile.3tiff b/tiff/man/TIFFWriteRawTile.3tiff
index d422e588c..78b23ed73 100644
--- a/tiff/man/TIFFWriteRawTile.3tiff
+++ b/tiff/man/TIFFWriteRawTile.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFWriteRawTile.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFWriteRawTile.3tiff,v 1.3 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -81,4 +81,4 @@ dimensions.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFWriteScanline.3tiff b/tiff/man/TIFFWriteScanline.3tiff
index 0dd35f51b..a2691b552 100644
--- a/tiff/man/TIFFWriteScanline.3tiff
+++ b/tiff/man/TIFFWriteScanline.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFWriteScanline.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFWriteScanline.3tiff,v 1.3 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -151,4 +151,4 @@ the library does not pack the block-interleaved samples.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFWriteTile.3tiff b/tiff/man/TIFFWriteTile.3tiff
index 08250f7ce..3755fc789 100644
--- a/tiff/man/TIFFWriteTile.3tiff
+++ b/tiff/man/TIFFWriteTile.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFWriteTile.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFWriteTile.3tiff,v 1.3 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -74,4 +74,4 @@ routine.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFbuffer.3tiff b/tiff/man/TIFFbuffer.3tiff
index a4446cd96..edda2dbc0 100644
--- a/tiff/man/TIFFbuffer.3tiff
+++ b/tiff/man/TIFFbuffer.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFbuffer.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFbuffer.3tiff,v 1.3 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1995 Sam Leffler
.\" Copyright (c) 1995 Silicon Graphics, Inc.
@@ -74,4 +74,4 @@ was unable to dynamically allocate space for a data buffer.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFcodec.3tiff b/tiff/man/TIFFcodec.3tiff
index 78a0f02e9..6c480c497 100644
--- a/tiff/man/TIFFcodec.3tiff
+++ b/tiff/man/TIFFcodec.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFcodec.3tiff,v 1.3 2011-08-02 14:09:43 bfriesen Exp $
+.\" $Id: TIFFcodec.3tiff,v 1.4 2016-09-25 20:05:50 bfriesen Exp $
.\"
.\" Copyright (c) 1995 Sam Leffler
.\" Copyright (c) 1995 Silicon Graphics, Inc.
@@ -79,4 +79,4 @@ compression schemes.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFcolor.3tiff b/tiff/man/TIFFcolor.3tiff
index e5d27270e..987ac9d62 100644
--- a/tiff/man/TIFFcolor.3tiff
+++ b/tiff/man/TIFFcolor.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFcolor.3tiff,v 1.4 2009-11-30 12:22:26 fwarmerdam Exp $
+.\" $Id: TIFFcolor.3tiff,v 1.5 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 2003, Andrey Kiselev <dron@ak4719.spb.edu>
.\"
@@ -265,4 +265,4 @@ _TIFFfree(cielab);
.BR libtiff (3TIFF),
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFmemory.3tiff b/tiff/man/TIFFmemory.3tiff
index 55f446b44..6c4412ddc 100644
--- a/tiff/man/TIFFmemory.3tiff
+++ b/tiff/man/TIFFmemory.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFmemory.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFmemory.3tiff,v 1.3 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 1995 Sam Leffler
.\" Copyright (c) 1995 Silicon Graphics, Inc.
@@ -87,4 +87,4 @@ None.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFsize.3tiff b/tiff/man/TIFFsize.3tiff
index 6de9084ad..4b90a59b5 100644
--- a/tiff/man/TIFFsize.3tiff
+++ b/tiff/man/TIFFsize.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFsize.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFsize.3tiff,v 1.3 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -56,4 +56,4 @@ None.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFstrip.3tiff b/tiff/man/TIFFstrip.3tiff
index bb9658e50..da59b0efe 100644
--- a/tiff/man/TIFFstrip.3tiff
+++ b/tiff/man/TIFFstrip.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFstrip.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFstrip.3tiff,v 1.3 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 1992-1997 Sam Leffler
.\" Copyright (c) 1992-1997 Silicon Graphics, Inc.
@@ -96,4 +96,4 @@ None.
.BR libtiff (3TIFF),
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFswab.3tiff b/tiff/man/TIFFswab.3tiff
index d6432fa52..2294156f7 100644
--- a/tiff/man/TIFFswab.3tiff
+++ b/tiff/man/TIFFswab.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFswab.3tiff,v 1.2 2005-11-02 11:07:18 dron Exp $
+.\" $Id: TIFFswab.3tiff,v 1.3 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -77,4 +77,4 @@ None.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/TIFFtile.3tiff b/tiff/man/TIFFtile.3tiff
index 5431f31a8..5bdbe551f 100644
--- a/tiff/man/TIFFtile.3tiff
+++ b/tiff/man/TIFFtile.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: TIFFtile.3tiff,v 1.2 2005-11-02 11:07:19 dron Exp $
+.\" $Id: TIFFtile.3tiff,v 1.3 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -128,4 +128,4 @@ None.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/bmp2tiff.1 b/tiff/man/bmp2tiff.1
deleted file mode 100644
index f5d68ce01..000000000
--- a/tiff/man/bmp2tiff.1
+++ /dev/null
@@ -1,85 +0,0 @@
-.\" $Id: bmp2tiff.1,v 1.7 2006-04-20 12:17:19 dron Exp $
-.\"
-.\" Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
-.\"
-.\" 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.
-.\"
-.if n .po 0
-.TH BMP2TIFF 1 "15 October, 2004" "libtiff"
-.SH NAME
-bmp2tiff \- create a
-.SM TIFF
-file from a Microsoft Windows Device Independent Bitmap image file
-.SH SYNOPSIS
-.B bmp2tiff
-[
-.I options
-]
-.I input.bmp
-[
-.I input2.bmp ...\&
-]
-.I output.tiff
-.SH DESCRIPTION
-.I bmp2tiff
-converts a Microsoft Windows Device Independent Bitmap image file to
-.SM TIFF.
-If several input BMP files are being specified the multipage
-.SM TIFF
-output file will be created. By default, the
-.SM TIFF
-image is created with data samples packed (\c
-.IR PlanarConfiguration =1),
-compressed with the PackBits algorithm (\c
-.IR Compression =32773),
-and with each strip no more than 8 kilobytes.
-These characteristics can overridden, or explicitly specified
-with the options described below.
-.SH OPTIONS
-.TP
-.B \-c
-Specify a compression scheme to use when writing image data:
-.B "\-c none"
-for no compression,
-.B "\-c packbits"
-for the PackBits compression algorithm (the default),
-.B "\-c jpeg"
-for the baseline JPEG compression algorithm,
-.B "\-c zip"
-for the Deflate compression algorithm,
-and
-.B "\-c lzw"
-for Lempel-Ziv & Welch.
-.TP
-.BI \-r " number"
-Write data with a specified number of rows per strip;
-by default the number of rows/strip is selected so that each strip
-is approximately 8 kilobytes.
-.SH "SEE ALSO"
-.BR gif2tiff (1),
-.BR pal2rgb (1),
-.BR ppm2tiff (1),
-.BR raw2tiff (1),
-.BR ras2tiff (1),
-.BR sgi2tiff (1),
-.BR libtiff (3TIFF)
-.PP
-Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/fax2ps.1 b/tiff/man/fax2ps.1
index 9525f20b0..f82e252ba 100644
--- a/tiff/man/fax2ps.1
+++ b/tiff/man/fax2ps.1
@@ -1,4 +1,4 @@
-.\" $Id: fax2ps.1,v 1.4 2006-04-20 12:17:19 dron Exp $
+.\" $Id: fax2ps.1,v 1.5 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 1991-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -156,4 +156,4 @@ job of compressing the output and just generate
.BR libtiff (3)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/fax2tiff.1 b/tiff/man/fax2tiff.1
index 873cab176..7ce4ffe3d 100644
--- a/tiff/man/fax2tiff.1
+++ b/tiff/man/fax2tiff.1
@@ -1,4 +1,4 @@
-.\" $Id: fax2tiff.1,v 1.7 2006-04-20 12:17:19 dron Exp $
+.\" $Id: fax2tiff.1,v 1.8 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 1990-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -283,4 +283,4 @@ an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies.
.BR libtiff (3)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/gif2tiff.1 b/tiff/man/gif2tiff.1
deleted file mode 100644
index 5f01d8dcd..000000000
--- a/tiff/man/gif2tiff.1
+++ /dev/null
@@ -1,81 +0,0 @@
-.\" $Id: gif2tiff.1,v 1.4 2006-04-20 12:17:19 dron Exp $
-.\"
-.\" Copyright (c) 1991-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 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.
-.\"
-.if n .po 0
-.TH GIF2TIFF 1 "November 2, 2005" "libtiff"
-.SH NAME
-gif2tiff \- create a
-.SM TIFF
-file from a GIF87 format image file
-.SH SYNOPSIS
-.B gif2tiff
-[
-.I options
-]
-.I input.gif
-.I output.tif
-.SH DESCRIPTION
-.I Gif2tiff
-converts a file in the GIF87 format to
-.SM TIFF.
-The
-.SM TIFF
-image is created as a palette image, with samples
-compressed with the Lempel-Ziv & Welch algorithm (\c
-.IR Compression =5).
-These characteristics can overridden, or explicitly specified
-with the options described below.
-.SH OPTIONS
-.TP
-.B \-c
-Specify a compression scheme to use when writing image data:
-.B "\-c none"
-for no compression,
-.B "\-c packbits"
-for the PackBits compression algorithm,
-.B "\-c zip"
-for the Deflate compression algorithm,
-and
-.B "\-c lzw"
-for Lempel-Ziv & Welch (the default).
-.TP
-.B \-r
-Write data with a specified number of rows per strip;
-by default the number of rows/strip is selected so that each strip
-is approximately 8 kilobytes.
-.SH NOTES
-The program is based on Paul Haeberli's
-.I fromgif
-program which, in turn, is based on Marcel J.E. Mol's GIF reader.
-.SH BUGS
-Should have more options to control output format.
-.SH "SEE ALSO"
-.BR pal2rgb (1),
-.BR tiffinfo (1),
-.BR tiffcp (1),
-.BR tiffmedian (1),
-.BR libtiff (3)
-.PP
-Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/libtiff.3tiff b/tiff/man/libtiff.3tiff
index 710f9085e..924d17a87 100644
--- a/tiff/man/libtiff.3tiff
+++ b/tiff/man/libtiff.3tiff
@@ -1,4 +1,4 @@
-.\" $Id: libtiff.3tiff,v 1.3 2005-11-02 11:07:19 dron Exp $
+.\" $Id: libtiff.3tiff,v 1.5 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -163,9 +163,18 @@ TIFFCurrentTile return index of current tile
TIFFDataWidth return the size of TIFF data types
TIFFError library error handler
TIFFFdOpen open a file for reading or writing
+TIFFFieldDataType get data type from field information
+TIFFFieldName get field name from field information
+TIFFFieldPassCount get whether to pass a value count to Get/SetField
+TIFFFieldReadCount get number of values to be read from field
+TIFFFieldTag get tag value from field information
+TIFFFieldWithName get field information given field name
+TIFFFieldWithTag get field information given tag
+TIFFFieldWriteCount get number of values to be written to field
TIFFFileName return name of open file
TIFFFileno return open file descriptor
TIFFFindCODEC find standard codec for the specific scheme
+TIFFFindField get field information given tag and data type
TIFFFlush flush all pending writes
TIFFFlushData flush pending data writes
TIFFGetBitRevTable return bit reversal table
@@ -527,7 +536,7 @@ an Aldus Technical Memorandum.
an appendix to the TIFF 5.0 specification prepared by Cygnet Technologies.
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
.SH BUGS
The library does not support multi-sample images
where some samples have different bits/sample.
diff --git a/tiff/man/pal2rgb.1 b/tiff/man/pal2rgb.1
index 0ac2e5af4..428f93a80 100644
--- a/tiff/man/pal2rgb.1
+++ b/tiff/man/pal2rgb.1
@@ -1,4 +1,4 @@
-.\" $Id: pal2rgb.1,v 1.3 2005-11-02 11:07:19 dron Exp $
+.\" $Id: pal2rgb.1,v 1.4 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 1990-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -108,4 +108,4 @@ Only 8-bit images are handled.
.BR libtiff (3)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/ppm2tiff.1 b/tiff/man/ppm2tiff.1
index 882fd0451..2c940fb3b 100644
--- a/tiff/man/ppm2tiff.1
+++ b/tiff/man/ppm2tiff.1
@@ -1,4 +1,4 @@
-.\" $Id: ppm2tiff.1,v 1.5 2006-03-01 11:20:33 dron Exp $
+.\" $Id: ppm2tiff.1,v 1.6 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 1991-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -102,4 +102,4 @@ dots/inch).
.BR libtiff (3)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/ras2tiff.1 b/tiff/man/ras2tiff.1
deleted file mode 100644
index 0c78ddb62..000000000
--- a/tiff/man/ras2tiff.1
+++ /dev/null
@@ -1,96 +0,0 @@
-.\" $Id: ras2tiff.1,v 1.4 2006-04-20 12:17:19 dron Exp $
-.\"
-.\" Copyright (c) 1990-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 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.
-.\"
-.if n .po 0
-.TH RAS2TIFF 1 "November 2, 2005" "libtiff"
-.SH NAME
-ras2tiff \- create a
-.SM TIFF
-file from a Sun rasterfile
-.SH SYNOPSIS
-.B ras2tiff
-[
-.I options
-]
-.I input.ras
-.I output.tif
-.SH DESCRIPTION
-.I ras2tiff
-converts a file in the Sun rasterfile format to
-.SM TIFF.
-By default, the
-.SM TIFF
-image is created with data samples packed (\c
-.IR PlanarConfiguration =1),
-compressed with the Lempel-Ziv & Welch algorithm (\c
-.IR Compression =5),
-and with each strip no more than 8 kilobytes.
-These characteristics can overridden, or explicitly specified
-with the options described below.
-.PP
-Any colormap information in the rasterfile is carried over to the
-.SM TIFF
-file by including a
-.I Colormap
-tag in the output file.
-If the rasterfile has a colormap, the
-.I PhotometricInterpretation
-tag is set to 3 (palette);
-otherwise it is set to 2 (RGB) if the depth
-is 24 or 1 (min-is-black) if the depth is not 24.
-.SH OPTIONS
-.TP
-.B \-c
-Specify a compression scheme to use when writing image data:
-.B "\-c none"
-for no compression,
-.B "\-c packbits"
-for the PackBits compression algorithm,
-.B "\-c jpeg"
-for the baseline JPEG compression algorithm,
-.B "\-c zip
-for the Deflate compression algorithm,
-and
-.B "\-c lzw"
-for Lempel-Ziv & Welch (the default).
-.TP
-.B \-r
-Write data with a specified number of rows per strip;
-by default the number of rows/strip is selected so that each strip
-is approximately 8 kilobytes.
-.SH BUGS
-Does not handle all possible rasterfiles.
-In particular,
-.I ras2tiff
-does not handle run-length encoded images.
-.SH "SEE ALSO"
-.BR pal2rgb (1),
-.BR tiffinfo (1),
-.BR tiffcp (1),
-.BR tiffmedian (1),
-.BR libtiff (3)
-.PP
-Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
-
diff --git a/tiff/man/raw2tiff.1 b/tiff/man/raw2tiff.1
index 3e832df28..184a5d10f 100644
--- a/tiff/man/raw2tiff.1
+++ b/tiff/man/raw2tiff.1
@@ -1,4 +1,4 @@
-.\" $Id: raw2tiff.1,v 1.7 2009-08-24 19:13:40 bfriesen Exp $
+.\" $Id: raw2tiff.1,v 1.8 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 1990-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -193,4 +193,4 @@ in some cases. But for most ordinary images guessing method will work fine.
.BR libtiff (3)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/rgb2ycbcr.1 b/tiff/man/rgb2ycbcr.1
index 01a332ca0..e3be491e9 100644
--- a/tiff/man/rgb2ycbcr.1
+++ b/tiff/man/rgb2ycbcr.1
@@ -1,4 +1,4 @@
-.\" $Header: /cvs/maptools/cvsroot/libtiff/man/rgb2ycbcr.1,v 1.4 2006-04-20 12:17:19 dron Exp $
+.\" $Header: /cvs/maptools/cvsroot/libtiff/man/rgb2ycbcr.1,v 1.5 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 1991-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -96,4 +96,4 @@ Set the vertical sampling dimension to one of: 1, 2 (default), or 4.
.BR libtiff (3)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff
+.BR http://www.simplesystems.org/libtiff
diff --git a/tiff/man/sgi2tiff.1 b/tiff/man/sgi2tiff.1
deleted file mode 100644
index 650adb3cc..000000000
--- a/tiff/man/sgi2tiff.1
+++ /dev/null
@@ -1,93 +0,0 @@
-.\" $Id: sgi2tiff.1,v 1.4 2006-04-20 12:17:19 dron Exp $
-.\"
-.\" Copyright (c) 1991-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 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.
-.\"
-.if n .po 0
-.TH SGI2TIFF 1 "November 2, 2005" "libtiff"
-.SH NAME
-sgi2tiff \- create a
-.SM TIFF
-file from an
-.SM SGI
-image file
-.SH SYNOPSIS
-.B sgi2tiff
-[
-.I options
-]
-.I input.rgb
-.I output.tif
-.SH DESCRIPTION
-.I sgi2tiff
-converts a file in the
-.SM SGI
-image format to
-.SM TIFF.
-By default, the
-.SM TIFF
-image is created with data samples packed (\c
-.IR PlanarConfiguration =1),
-compressed with the Lempel-Ziv & Welch algorithm (\c
-.IR Compression =5),
-and with each strip no more than 8 kilobytes.
-These characteristics can overridden, or explicitly specified
-with the options described below.
-.SH OPTIONS
-.TP
-.B \-c
-Specify a compression scheme to use when writing image data:
-.B "\-c none"
-for no compression,
-.B "\-c packbits"
-for the PackBits compression algorithm),
-.B "\-c jpeg"
-for the baseline JPEG compression algorithm,
-.B "\-c zip
-for the Deflate compression algorithm,
-and
-.B "\-c lzw"
-for Lempel-Ziv & Welch (the default).
-.TP
-.B \-p
-Explicitly select the planar configuration used in organizing
-data samples in the output image:
-.B "\-p contig"
-for samples packed contiguously, and
-.B "\-p separate"
-for samples stored separately.
-By default samples are packed.
-.TP
-.B \-r
-Write data with a specified number of rows per strip;
-by default the number of rows/strip is selected so that each strip
-is approximately 8 kilobytes.
-.SH BUGS
-Does not record colormap information.
-.SH "SEE ALSO"
-.BR tiffinfo (1),
-.BR tiffcp (1),
-.BR tiffmedian (1),
-.BR libtiff (3)
-.PP
-Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/man/thumbnail.1 b/tiff/man/thumbnail.1
index f4172bb6f..5ae87eda7 100644
--- a/tiff/man/thumbnail.1
+++ b/tiff/man/thumbnail.1
@@ -1,4 +1,4 @@
-.\" $Id: thumbnail.1,v 1.2 2005-11-02 11:07:19 dron Exp $
+.\" $Id: thumbnail.1,v 1.3 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 1994-1997 Sam Leffler
.\" Copyright (c) 1994-1997 Silicon Graphics, Inc.
@@ -87,4 +87,4 @@ There are no options to control the format of the saved thumbnail images.
.BR libtiff (3)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/tiff2bw.1 b/tiff/man/tiff2bw.1
index ccbe7e8fa..182ebbec0 100644
--- a/tiff/man/tiff2bw.1
+++ b/tiff/man/tiff2bw.1
@@ -1,4 +1,4 @@
-.\" $Id: tiff2bw.1,v 1.3 2006-04-20 12:17:19 dron Exp $
+.\" $Id: tiff2bw.1,v 1.4 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -91,4 +91,4 @@ Specify the percentage of the blue channel to use (default 11).
.BR libtiff (3)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/tiff2pdf.1 b/tiff/man/tiff2pdf.1
index ba670cfba..de80599e8 100644
--- a/tiff/man/tiff2pdf.1
+++ b/tiff/man/tiff2pdf.1
@@ -1,4 +1,4 @@
-.\" $Id: tiff2pdf.1,v 1.7 2010-12-11 22:47:49 faxguy Exp $
+.\" $Id: tiff2pdf.1,v 1.8 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 2003 Ross Finlayson
.\"
@@ -251,4 +251,4 @@ Please report bugs via the web interface at
.BR tiff2ps (1)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/tiff2ps.1 b/tiff/man/tiff2ps.1
index c3a9bacf6..e3b57ec5f 100644
--- a/tiff/man/tiff2ps.1
+++ b/tiff/man/tiff2ps.1
@@ -1,4 +1,4 @@
-.\" $Id: tiff2ps.1,v 1.10 2009-01-12 02:05:19 bfriesen Exp $
+.\" $Id: tiff2ps.1,v 1.12 2016-09-25 20:05:51 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -100,6 +100,9 @@ Generate \*(Ps Level 2.
Generate \*(Ps Level 3. It basically allows one to use the /flateDecode
filter for ZIP compressed TIFF images.
.TP
+.B \-8
+Disable use of ASCII85 encoding with \*(Ps Level 2/3.
+.TP
.B \-a
Generate output for all IFDs (pages) in the input file.
.TP
@@ -115,6 +118,9 @@ and the
.B \-h
option are given.
.TP
+.B \-C
+Specify the document creator name.
+.TP
.B \-d
Set the initial
.SM TIFF
@@ -123,6 +129,9 @@ directory to the specified directory number.
This option is useful for selecting individual pages in a
multi-page (e.g. facsimile) file.
.TP
+.B \-D
+Enable duplex printing (two pages per sheet of paper).
+.TP
.B \-e
Force the generation of Encapsulated \*(Ps (implies
.BR \-z ).
@@ -135,14 +144,6 @@ Specify the maximum height of image (in inches). Images with larger sizes will
be split in several pages. Option
.B \-L
may be used for specifying size of split images overlapping.
-.TP
-.B \-W
-Specify the maximum width of image (in inches). Images with larger sizes will
-be split in several pages. Options
-.B \-L
-and
-.B \-W
-are mutually exclusive.
.B \-i
Enable/disable pixel interpolation. This option requires a
single numeric value: zero to disable pixel interpolation and
@@ -152,9 +153,9 @@ non-zero to enable. The default is enabled.
Specify the size of overlapping for split images (in inches). Used in
conjunction with
.B \-H
-option and
+and
.B \-W
-option.
+options.
.TP
.B \-l
Specify the left margin for the output (in inches). This does not affect
@@ -185,9 +186,15 @@ like which are hidden using the
.I SubIFD
tag.
.TP
+.B \-O
+Write \*(Ps to specified file instead of standard output.
+.TP
.B \-p
Force the generation of (non-Encapsulated) \*(Ps.
.TP
+.B \-P L|P
+Set optional PageOrientation DSC comment to Landscape or Portrait.
+.TP
.B \-r 90|180|270|auto
Rotate image by 90, 180, 270 degrees or auto. Auto picks the best
fit for the image on the specified paper size (eg portrait
@@ -197,9 +204,23 @@ counterclockwise. Auto rotates 90 degrees ccw to produce landscape.
.B \-s
Generate output for a single IFD (page) in the input file.
.TP
+.B \-t
+Specify the document title string.
+.TP
+.B \-T
+Print pages for top edge binding.
+.TP
.B \-w
Specify the horizontal size of the printed area (in inches).
.TP
+.B \-W
+Specify the maximum width of image (in inches). Images with larger sizes will
+be split in several pages. Options
+.B \-L
+and
+.B \-W
+are mutually exclusive.
+.TP
.B \-x
Override resolution units specified in the TIFF as centimeters.
.TP
@@ -270,4 +291,4 @@ Does not handle tiled images when generating \*(Ps Level I output.
.BR libtiff (3)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/tiff2rgba.1 b/tiff/man/tiff2rgba.1
index c55165638..f0af0a1ca 100644
--- a/tiff/man/tiff2rgba.1
+++ b/tiff/man/tiff2rgba.1
@@ -1,4 +1,4 @@
-.\" $Id: tiff2rgba.1,v 1.4 2006-04-20 12:17:19 dron Exp $
+.\" $Id: tiff2rgba.1,v 1.5 2016-09-25 20:05:52 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -94,4 +94,4 @@ flag is also in effect.
.BR libtiff (3)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/tiffcmp.1 b/tiff/man/tiffcmp.1
index 961d81223..3d111a4d6 100644
--- a/tiff/man/tiffcmp.1
+++ b/tiff/man/tiffcmp.1
@@ -1,4 +1,4 @@
-.\" $Id: tiffcmp.1,v 1.6 2009-08-24 19:13:40 bfriesen Exp $
+.\" $Id: tiffcmp.1,v 1.7 2016-09-25 20:05:52 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -84,4 +84,4 @@ in some exotic cases.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/tiffcp.1 b/tiff/man/tiffcp.1
index 5fdcc474d..fee463952 100644
--- a/tiff/man/tiffcp.1
+++ b/tiff/man/tiffcp.1
@@ -1,4 +1,4 @@
-.\" $Id: tiffcp.1,v 1.12 2010-12-23 13:38:47 dron Exp $
+.\" $Id: tiffcp.1,v 1.14 2016-09-25 20:05:52 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -60,6 +60,9 @@ in a file, but it is explicitly intended to not alter or convert
the image data content in any way.
.SH OPTIONS
.TP
+.B \-a
+Append to an existing output file instead of overwriting it.
+.TP
.BI \-b " image"
subtract the following monochrome image from all others
processed. This can be used to remove a noise bias
@@ -91,9 +94,11 @@ for LZMA2 compression,
for baseline JPEG compression,
.B g3
for CCITT Group 3 (T.4) compression,
-and
.B g4
-for CCITT Group 4 (T.6) compression.
+for CCITT Group 4 (T.6) compression,
+or
+.B sgilog
+for SGILOG compression.
By default
.I tiffcp
will compress data according to the value of the
@@ -179,6 +184,9 @@ overwritten and not when it is appended to.
.B \-M
Suppress the use of memory-mapped files when reading images.
.TP
+.BI \-o " offset"
+Set initial directory offset.
+.TP
.B \-p
Specify the planar configuration to use in writing image data
that has one 8-bit sample per pixel.
@@ -228,6 +236,9 @@ appear in a tile.
.B \-x
Force the output file to be written with PAGENUMBER value in sequence.
.TP
+.B \-8
+Write BigTIFF instead of classic TIFF format.
+.TP
.BI \-,= character
substitute
.I character
@@ -303,4 +314,4 @@ tiffcp \-c none \-,=% \-b CCD,X.tif CCD,X%1%.tif result.tif
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/tiffcrop.1 b/tiff/man/tiffcrop.1
index 0423fb2f5..3fa6bb67e 100644
--- a/tiff/man/tiffcrop.1
+++ b/tiff/man/tiffcrop.1
@@ -1,4 +1,4 @@
-.\" $Id: tiffcrop.1,v 1.7 2010-12-12 01:45:35 faxguy Exp $
+.\" $Id: tiffcrop.1,v 1.8 2016-09-25 20:05:52 bfriesen Exp $
.\" tiffcrop -- a port of tiffcp.c extended to include extended processing of images
.\"
.\" Original code:
@@ -567,5 +567,5 @@ in research or remote sensing scenarios.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/tiffdither.1 b/tiff/man/tiffdither.1
index ab0d32a78..d5214ceee 100644
--- a/tiff/man/tiffdither.1
+++ b/tiff/man/tiffdither.1
@@ -1,4 +1,4 @@
-.\" $Id: tiffdither.1,v 1.4 2006-04-20 12:17:19 dron Exp $
+.\" $Id: tiffdither.1,v 1.6 2016-09-25 20:05:52 bfriesen Exp $
.\"
.\" Copyright (c) 1990-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -113,6 +113,9 @@ will force data to be written with the
tag set to
.SM MSB2LSB .
.TP
+.B \-r
+Make each strip have no more than the given number of rows.
+.TP
.B \-t
Set the threshold value for dithering.
By default the threshold value is 128.
@@ -129,4 +132,4 @@ program (written by Paul Heckbert).
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/tiffdump.1 b/tiff/man/tiffdump.1
index 076f9ffee..a5eeccda7 100644
--- a/tiff/man/tiffdump.1
+++ b/tiff/man/tiffdump.1
@@ -1,4 +1,4 @@
-.\" $Id: tiffdump.1,v 1.5 2006-04-20 12:17:19 dron Exp $
+.\" $Id: tiffdump.1,v 1.6 2016-09-25 20:05:52 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -78,4 +78,4 @@ i.e. a leading ``0x'' for hexadecimal and a leading ``0'' for octal.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/tiffgt.1 b/tiff/man/tiffgt.1
index 680a49a04..53031018b 100644
--- a/tiff/man/tiffgt.1
+++ b/tiff/man/tiffgt.1
@@ -1,4 +1,4 @@
-.\" $Id: tiffgt.1,v 1.4 2006-04-20 12:17:19 dron Exp $
+.\" $Id: tiffgt.1,v 1.5 2016-09-25 20:05:52 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -242,4 +242,4 @@ crashing old versions of the window manager.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/tiffinfo.1 b/tiff/man/tiffinfo.1
index 2d5737520..89637bb23 100644
--- a/tiff/man/tiffinfo.1
+++ b/tiff/man/tiffinfo.1
@@ -1,4 +1,4 @@
-.\" $Id: tiffinfo.1,v 1.2 2005-11-02 11:07:19 dron Exp $
+.\" $Id: tiffinfo.1,v 1.3 2016-09-25 20:05:52 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -85,4 +85,4 @@ directory to
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/tiffmedian.1 b/tiff/man/tiffmedian.1
index c584b97fe..428ca9adf 100644
--- a/tiff/man/tiffmedian.1
+++ b/tiff/man/tiffmedian.1
@@ -1,4 +1,4 @@
-.\" $Id: tiffmedian.1,v 1.3 2005-11-02 11:07:19 dron Exp $
+.\" $Id: tiffmedian.1,v 1.4 2016-09-25 20:05:52 bfriesen Exp $
.\"
.\" Copyright (c) 1990-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -109,4 +109,4 @@ program.
Paul Heckbert, SIGGRAPH proceedings, 1982, pp. 297-307.
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/tiffset.1 b/tiff/man/tiffset.1
index ed0d12fb0..d7c48fa5d 100644
--- a/tiff/man/tiffset.1
+++ b/tiff/man/tiffset.1
@@ -1,4 +1,4 @@
-.\" $Id: tiffset.1,v 1.5 2011-03-26 12:07:20 fwarmerdam Exp $
+.\" $Id: tiffset.1,v 1.7 2016-09-25 20:05:52 bfriesen Exp $
.\"
.\" Copyright (c) 1988-1997 Sam Leffler
.\" Copyright (c) 1991-1997 Silicon Graphics, Inc.
@@ -23,9 +23,9 @@
.\" OF THIS SOFTWARE.
.\"
.if n .po 0
-.TH TIFFSET 1 "November 21, 2004" "libtiff"
+.TH TIFFSET 1 "December 3, 2012" "libtiff"
.SH NAME
-tiffset \- set a field in a
+tiffset \- set or unset a field in a
.SM TIFF
header
.SH SYNOPSIS
@@ -38,7 +38,7 @@ header
.I Tiffset
sets the value of a
.SM TIFF
-header to a specified value.
+header to a specified value or removes an existing setting.
.SH OPTIONS
.TP
.BI \-d " dirnumber"
@@ -53,6 +53,9 @@ change the current directory by offset.
.BI \-sf " tagnumber filename"
Set the value of the tag to the contents of filename. This option is
supported for ASCII tags only.
+.TP
+.BI \-u " tagnumber"
+Unset the tag.
.SH EXAMPLES
The following example sets the image description tag (270) of a.tif to
the contents of the file descrip:
@@ -93,4 +96,4 @@ tiffset -d 2 -s 262 1 a.tif
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/tiffsplit.1 b/tiff/man/tiffsplit.1
index 411ebf488..f01b3f466 100644
--- a/tiff/man/tiffsplit.1
+++ b/tiff/man/tiffsplit.1
@@ -1,4 +1,4 @@
-.\" $Id: tiffsplit.1,v 1.6 2009-08-24 19:13:40 bfriesen Exp $
+.\" $Id: tiffsplit.1,v 1.7 2016-09-25 20:05:52 bfriesen Exp $
.\"
.\" Copyright (c) 1992-1997 Sam Leffler
.\" Copyright (c) 1992-1997 Silicon Graphics, Inc.
@@ -66,4 +66,4 @@ Only a select set of ``known tags'' is copied when splitting.
.BR libtiff (3TIFF)
.PP
Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
+.BR http://www.simplesystems.org/libtiff/
diff --git a/tiff/man/tiffsv.1 b/tiff/man/tiffsv.1
deleted file mode 100644
index 206df5676..000000000
--- a/tiff/man/tiffsv.1
+++ /dev/null
@@ -1,142 +0,0 @@
-.\" $Id: tiffsv.1,v 1.3 2005-11-02 11:07:19 dron Exp $
-.\"
-.\" Copyright (c) 1988-1997 Sam Leffler
-.\" Copyright (c) 1991-1997 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.
-.\"
-.if n .po 0
-.TH TIFFSV 1 "September 20, 2005" "libtiff"
-.SH NAME
-tiffsv \- save an image from the framebuffer in a
-.SM TIFF
-file (Silicon Graphics version)
-.SH SYNOPSIS
-.B tiffsv
-[
-.I options
-]
-.I output.tif
-[
-.I "x1 x2 y1 y2"
-]
-.SH DESCRIPTION
-.I tiffsv
-saves all or part of the framebuffer in a file using the
-Tag Image File Format, Revision 6.0.
-By default, the image is saved with data samples packed (\c
-.IR PlanarConfiguration =1),
-compressed with the Lempel-Ziv & Welch algorithm (\c
-.IR Compression =5),
-and with each strip no more than 8 kilobytes.
-These characteristics can be overridden, or explicitly specified
-with the options described below.
-.SH OPTIONS
-.TP
-.B \-b
-Save the image as a greyscale image
-as if it were processed by
-.IR tiff2bw (1).
-This option is included for compatibility with the standard
-.IR scrsave (6D)
-program.
-.TP
-.B \-c
-Specify the compression to use for data written to the output file:
-.B none
-for no compression,
-.B packbits
-for PackBits compression,
-.B jpeg
-for baseline JPEG compression,
-.B zip
-for Deflate compression,
-and
-.B lzw
-for Lempel-Ziv & Welch compression (default).
-.IP
-.SM LZW
-compression can be specified together with a
-.I predictor
-value.
-A predictor value of 2 causes
-each scanline of the output image to undergo horizontal
-differencing before it is encoded; a value
-of 1 forces each scanline to be encoded without differencing.
-LZW-specific options are specified by appending a ``:''-separated
-list to the ``lzw'' option; e.g.
-.B "\-c lzw:2"
-for
-.SM LZW
-compression with horizontal differencing.
-.TP
-.B \-p
-Specify the planar configuration to use in writing image data.
-By default,
-.I tiffsv
-will create a new file with the data samples packed contiguously.
-Specifying
-.B "\-p contig"
-will force data to be written with multi-sample data packed
-together, while
-.B "\-p separate"
-will force samples to be written in separate planes.
-.TP
-.B \-r
-Specify the number of rows (scanlines) in each strip of data
-written to the output file.
-By default,
-.I tiffsv
-attempts to set the rows/strip
-that no more than 8 kilobytes of data appear in a strip.
-.SH NOTE
-Except for the use of
-.SM TIFF,
-this program is equivalent to the standard
-.I scrsave
-program.
-This means, for example, that you can use it in conjunction with
-the standard
-.IR icut
-program simply by creating a link called
-.IR scrsave ,
-or by creating a shell script called
-.I scrsave
-that invokes
-.I tiffgt
-with the appropriate options.
-.SH BUGS
-If data are saved compressed and in separate planes, then the
-rows in each strip is silently set to one to avoid limitations
-in the
-.BR libtiff (3TIFF)
-library.
-.SH "SEE ALSO"
-.BR scrsave (6D)
-.BR pal2rgb (1),
-.BR tiffdump (1),
-.BR tiffgt (1),
-.BR tiffinfo (1),
-.BR tiffcp (1),
-.BR tiffmedian (1),
-.BR libtiff (3TIFF)
-.PP
-Libtiff library home page:
-.BR http://www.remotesensing.org/libtiff/
diff --git a/tiff/nmake.opt b/tiff/nmake.opt
index 400ba58c5..74b97007b 100644
--- a/tiff/nmake.opt
+++ b/tiff/nmake.opt
@@ -1,4 +1,4 @@
-# $Id: nmake.opt,v 1.18 2006/06/07 16:33:45 dron Exp $
+# $Id: nmake.opt,v 1.19 2015-08-28 22:19:26 bfriesen Exp $
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
diff --git a/tiff/port/CMakeLists.txt b/tiff/port/CMakeLists.txt
new file mode 100644
index 000000000..8b221d1d0
--- /dev/null
+++ b/tiff/port/CMakeLists.txt
@@ -0,0 +1,60 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+set(port_HEADERS libport.h)
+set(port_SOURCES dummy.c)
+set(port_optional_SOURCES
+ getopt.c
+ lfind.c
+ strcasecmp.c
+ strtoul.c
+ strtoull.c)
+
+set(port_USED_FILES ${port_SOURCES} ${port_HEADERS})
+
+if(NOT HAVE_GETOPT)
+ list(APPEND port_USED_FILES getopt.c)
+endif()
+if(NOT HAVE_LFIND)
+ list(APPEND port_USED_FILES lfind.c)
+endif()
+if(MSVC AND NOT HAVE_SNPRINTF)
+ list(APPEND port_USED_FILES snprintf.c)
+endif()
+if(NOT HAVE_STRCASECMP)
+ list(APPEND port_USED_FILES strcasecmp.c)
+endif()
+if(NOT HAVE_STRTOUL)
+ list(APPEND port_USED_FILES strtoul.c)
+endif()
+if(NOT HAVE_STRTOULL)
+ list(APPEND port_USED_FILES strtoull.c)
+endif()
+
+add_library(port STATIC ${port_USED_FILES})
+
+foreach(file ${port_USED_FILES})
+ list(APPEND tiff_port_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/${file}")
+endforeach()
+set(tiff_port_SOURCES ${tiff_port_SOURCES} PARENT_SCOPE)
diff --git a/tiff/port/Makefile.am b/tiff/port/Makefile.am
index 94504fd80..4d6e11d0c 100644
--- a/tiff/port/Makefile.am
+++ b/tiff/port/Makefile.am
@@ -23,7 +23,11 @@
# Process this file with automake to produce Makefile.in.
-EXTRA_DIST = Makefile.vc libport.h
+EXTRA_DIST = \
+ CMakeLists.txt \
+ Makefile.vc \
+ libport.h \
+ snprintf.c
noinst_LTLIBRARIES = libport.la
libport_la_SOURCES = dummy.c libport.h
diff --git a/tiff/port/Makefile.in b/tiff/port/Makefile.in
index 2b2dbe52d..55e09e6ef 100644
--- a/tiff/port/Makefile.in
+++ b/tiff/port/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -41,6 +40,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -60,8 +114,6 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = port
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in getopt.c \
- lfind.c strcasecmp.c strtoul.c strtoull.c
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -69,6 +121,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
@@ -81,6 +134,19 @@ libport_la_OBJECTS = $(am_libport_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
+am__v_lt_1 =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libtiff
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
@@ -93,24 +159,45 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
SOURCES = $(libport_la_SOURCES)
DIST_SOURCES = $(libport_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \
+ $(top_srcdir)/config/mkinstalldirs getopt.c lfind.c snprintf.c \
+ strcasecmp.c strtoul.c strtoull.c
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -124,6 +211,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -171,6 +259,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -258,7 +347,12 @@ tiff_libs_private = @tiff_libs_private@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-EXTRA_DIST = Makefile.vc libport.h
+EXTRA_DIST = \
+ CMakeLists.txt \
+ Makefile.vc \
+ libport.h \
+ snprintf.c
+
noinst_LTLIBRARIES = libport.la
libport_la_SOURCES = dummy.c libport.h
libport_la_LIBADD = @LTLIBOBJS@
@@ -278,7 +372,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign port/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign port/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -299,12 +392,15 @@ $(am__aclocal_m4_deps):
clean-noinstLTLIBRARIES:
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
- @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
+ @list='$(noinst_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
libport.la: $(libport_la_OBJECTS) $(libport_la_DEPENDENCIES) $(EXTRA_libport_la_DEPENDENCIES)
$(AM_V_CCLD)$(LINK) $(libport_la_OBJECTS) $(libport_la_LIBADD) $(LIBS)
@@ -316,6 +412,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/getopt.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lfind.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/snprintf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strcasecmp.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtoul.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/strtoull.Plo@am__quote@
@@ -326,14 +423,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -348,26 +445,15 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -379,15 +465,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -396,6 +478,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -537,18 +634,21 @@ uninstall-am:
.MAKE: install-am install-strip
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libtool clean-noinstLTLIBRARIES ctags distclean \
- distclean-compile distclean-generic distclean-libtool \
- distclean-tags distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/tiff/port/Makefile.vc b/tiff/port/Makefile.vc
index f5c85c6ba..bde480487 100644
--- a/tiff/port/Makefile.vc
+++ b/tiff/port/Makefile.vc
@@ -1,4 +1,4 @@
-# $Id: Makefile.vc,v 1.4 2006/03/23 14:54:02 dron Exp $
+# $Id: Makefile.vc,v 1.5 2015-08-19 02:31:04 bfriesen Exp $
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
@@ -29,6 +29,7 @@
!INCLUDE ..\nmake.opt
OBJ = \
+ snprintf.obj \
strcasecmp.obj \
getopt.obj
diff --git a/tiff/port/libport.h b/tiff/port/libport.h
index 802f478bd..d9b042151 100644
--- a/tiff/port/libport.h
+++ b/tiff/port/libport.h
@@ -1,4 +1,4 @@
-/* $Id: libport.h,v 1.2 2009-11-02 14:44:13 bfriesen Exp $ */
+/* $Id: libport.h,v 1.5 2015-08-19 02:31:04 bfriesen Exp $ */
/*
* Copyright (c) 2009 Frank Warmerdam
@@ -48,4 +48,13 @@ lfind(const void *key, const void *base, size_t *nmemb, size_t size,
int(*compar)(const void *, const void *));
#endif
+#if !defined(HAVE_SNPRINTF)
+#undef vsnprintf
+#define vsnprintf _TIFF_vsnprintf_f
+
+#undef snprintf
+#define snprintf _TIFF_snprintf_f
+int snprintf(char* str, size_t size, const char* format, ...);
+#endif
+
#endif /* ndef _LIBPORT_ */
diff --git a/tiff/port/snprintf.c b/tiff/port/snprintf.c
new file mode 100644
index 000000000..1c4ac0878
--- /dev/null
+++ b/tiff/port/snprintf.c
@@ -0,0 +1,38 @@
+/**
+ * Workaround for lack of snprintf(3) in Visual Studio. See
+ * http://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010/8712996#8712996
+ * It's a trivial wrapper around the builtin _vsnprintf_s and
+ * _vscprintf functions.
+ */
+
+#ifdef _MSC_VER
+
+#include <stdio.h>
+#include <stdarg.h>
+#include "libport.h"
+
+int _TIFF_vsnprintf_f(char* str, size_t size, const char* format, va_list ap)
+{
+ int count = -1;
+
+ if (size != 0)
+ count = _vsnprintf_s(str, size, _TRUNCATE, format, ap);
+ if (count == -1)
+ count = _vscprintf(format, ap);
+
+ return count;
+}
+
+int _TIFF_snprintf_f(char* str, size_t size, const char* format, ...)
+{
+ int count;
+ va_list ap;
+
+ va_start(ap, format);
+ count = vsnprintf(str, size, format, ap);
+ va_end(ap);
+
+ return count;
+}
+
+#endif // _MSC_VER
diff --git a/tiff/port/strcasecmp.c b/tiff/port/strcasecmp.c
index 1ff4312b9..de7e42321 100644
--- a/tiff/port/strcasecmp.c
+++ b/tiff/port/strcasecmp.c
@@ -1,4 +1,4 @@
-/* $Id: strcasecmp.c,v 1.3 2009-01-22 20:53:07 fwarmerdam Exp $ */
+/* $Id: strcasecmp.c,v 1.4 2015-06-21 01:09:09 bfriesen Exp $ */
/*
* Copyright (c) 1987, 1993
@@ -44,8 +44,8 @@ strcasecmp(const char *s1, const char *s2)
const unsigned char *us1 = (const unsigned char *)s1,
*us2 = (const unsigned char *)s2;
- while (tolower(*us1) == tolower(*us2++))
+ while (tolower((int) *us1) == tolower((int) *us2++))
if (*us1++ == '\0')
return (0);
- return (tolower(*us1) - tolower(*--us2));
+ return (tolower((int) *us1) - tolower((int) *--us2));
}
diff --git a/tiff/test/CMakeLists.txt b/tiff/test/CMakeLists.txt
new file mode 100644
index 000000000..b9e373f96
--- /dev/null
+++ b/tiff/test/CMakeLists.txt
@@ -0,0 +1,374 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+include_directories(${PROJECT_SOURCE_DIR}/libtiff
+ ${PROJECT_BINARY_DIR}/libtiff
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${TIFF_INCLUDES})
+
+# Test scripts (not used by CMake)
+set(TESTSCRIPTS
+ bmp2tiff_palette.sh
+ bmp2tiff_rgb.sh
+ gif2tiff.sh
+ ppm2tiff_pbm.sh
+ ppm2tiff_pgm.sh
+ ppm2tiff_ppm.sh
+ tiffcp-g3.sh
+ tiffcp-g3-1d.sh
+ tiffcp-g3-1d-fill.sh
+ tiffcp-g3-2d.sh
+ tiffcp-g3-2d-fill.sh
+ tiffcp-g4.sh
+ tiffcp-logluv.sh
+ tiffcp-thumbnail.sh
+ tiffdump.sh
+ tiffinfo.sh
+ tiffcp-split.sh
+ tiffcp-split-join.sh
+ tiff2ps-PS1.sh
+ tiff2ps-PS2.sh
+ tiff2ps-PS3.sh
+ tiff2ps-EPS1.sh
+ tiff2pdf.sh
+ tiffcrop-doubleflip-logluv-3c-16b.sh
+ tiffcrop-doubleflip-minisblack-1c-16b.sh
+ tiffcrop-doubleflip-minisblack-1c-8b.sh
+ tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh
+ tiffcrop-doubleflip-miniswhite-1c-1b.sh
+ tiffcrop-doubleflip-palette-1c-1b.sh
+ tiffcrop-doubleflip-palette-1c-4b.sh
+ tiffcrop-doubleflip-palette-1c-8b.sh
+ tiffcrop-doubleflip-rgb-3c-16b.sh
+ tiffcrop-doubleflip-rgb-3c-8b.sh
+ tiffcrop-extract-logluv-3c-16b.sh
+ tiffcrop-extract-minisblack-1c-16b.sh
+ tiffcrop-extract-minisblack-1c-8b.sh
+ tiffcrop-extract-minisblack-2c-8b-alpha.sh
+ tiffcrop-extract-miniswhite-1c-1b.sh
+ tiffcrop-extract-palette-1c-1b.sh
+ tiffcrop-extract-palette-1c-4b.sh
+ tiffcrop-extract-palette-1c-8b.sh
+ tiffcrop-extract-rgb-3c-16b.sh
+ tiffcrop-extract-rgb-3c-8b.sh
+ tiffcrop-extractz14-logluv-3c-16b.sh
+ tiffcrop-extractz14-minisblack-1c-16b.sh
+ tiffcrop-extractz14-minisblack-1c-8b.sh
+ tiffcrop-extractz14-minisblack-2c-8b-alpha.sh
+ tiffcrop-extractz14-miniswhite-1c-1b.sh
+ tiffcrop-extractz14-palette-1c-1b.sh
+ tiffcrop-extractz14-palette-1c-4b.sh
+ tiffcrop-extractz14-palette-1c-8b.sh
+ tiffcrop-extractz14-rgb-3c-16b.sh
+ tiffcrop-extractz14-rgb-3c-8b.sh
+ tiffcrop-R90-logluv-3c-16b.sh
+ tiffcrop-R90-minisblack-1c-16b.sh
+ tiffcrop-R90-minisblack-1c-8b.sh
+ tiffcrop-R90-minisblack-2c-8b-alpha.sh
+ tiffcrop-R90-miniswhite-1c-1b.sh
+ tiffcrop-R90-palette-1c-1b.sh
+ tiffcrop-R90-palette-1c-4b.sh
+ tiffcrop-R90-palette-1c-8b.sh
+ tiffcrop-R90-rgb-3c-16b.sh
+ tiffcrop-R90-rgb-3c-8b.sh
+ tiff2rgba-logluv-3c-16b.sh
+ tiff2rgba-minisblack-1c-16b.sh
+ tiff2rgba-minisblack-1c-8b.sh
+ tiff2rgba-minisblack-2c-8b-alpha.sh
+ tiff2rgba-miniswhite-1c-1b.sh
+ tiff2rgba-palette-1c-1b.sh
+ tiff2rgba-palette-1c-4b.sh
+ tiff2rgba-palette-1c-8b.sh
+ tiff2rgba-rgb-3c-16b.sh
+ tiff2rgba-rgb-3c-8b.sh
+ tiff2rgba-quad-tile.jpg.sh)
+
+# This list should contain all of the TIFF files in the 'images'
+# subdirectory which are intended to be used as input images for
+# tests. All of these files should use the extension ".tiff".
+set(TIFFIMAGES
+ images/logluv-3c-16b.tiff
+ images/minisblack-1c-16b.tiff
+ images/minisblack-1c-8b.tiff
+ images/minisblack-2c-8b-alpha.tiff
+ images/miniswhite-1c-1b.tiff
+ images/palette-1c-1b.tiff
+ images/palette-1c-4b.tiff
+ images/palette-1c-8b.tiff
+ images/rgb-3c-16b.tiff
+ images/rgb-3c-8b.tiff
+ images/quad-tile.jpg.tiff)
+
+set(BMPIMAGES
+ images/palette-1c-8b.bmp
+ images/rgb-3c-8b.bmp)
+
+set(GIFIMAGES
+ images/palette-1c-8b.gif)
+
+set(PNMIMAGES
+ images/minisblack-1c-8b.pgm
+ images/miniswhite-1c-1b.pbm
+ images/rgb-3c-8b.ppm)
+
+# All uncompressed image files
+set(UNCOMPRESSEDIMAGES
+ images/minisblack-1c-16b.tiff
+ images/minisblack-1c-8b.tiff
+ images/miniswhite-1c-1b.tiff
+ images/palette-1c-1b.tiff
+ images/palette-1c-4b.tiff
+ images/palette-1c-8b.tiff
+ images/rgb-3c-8b.tiff)
+
+# This list should include all of the files in the 'images'
+# subdirectory which are intended to be distributed. This may include
+# files which are not currently used by the tests.
+set(IMAGES_EXTRA_DIST
+ images/README.txt
+ ${BMPIMAGES}
+ ${GIFIMAGES}
+ ${PNMIMAGES}
+ ${TIFFIMAGES})
+
+extra_dist(
+ ${TESTSCRIPTS}
+ ${IMAGES_EXTRA_DIST}
+ common.sh)
+
+set(noinst_HEADERS tifftest.h)
+
+add_executable(ascii_tag ascii_tag.c)
+target_link_libraries(ascii_tag tiff port)
+
+add_executable(long_tag long_tag.c check_tag.c)
+target_link_libraries(long_tag tiff port)
+
+add_executable(short_tag short_tag.c check_tag.c)
+target_link_libraries(short_tag tiff port)
+
+add_executable(strip_rw strip_rw.c strip.c test_arrays.c test_arrays.h)
+target_link_libraries(strip_rw tiff port)
+
+add_executable(rewrite rewrite_tag.c)
+target_link_libraries(rewrite tiff port)
+
+if(JPEG_SUPPORT)
+ add_executable(raw_decode raw_decode.c)
+ target_link_libraries(raw_decode tiff port)
+endif()
+
+add_executable(custom_dir custom_dir.c)
+target_link_libraries(custom_dir tiff port)
+
+set(TEST_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/output")
+file(MAKE_DIRECTORY "${TEST_OUTPUT}")
+
+macro(tiff_test_convert name command1 command2 command3 infile outfile validate)
+ add_test(NAME "${name}"
+ COMMAND "${CMAKE_COMMAND}"
+ "-DCONVERT_COMMAND1=${command1}"
+ "-DCONVERT_COMMAND2=${command2}"
+ "-DCONVERT_COMMAND3=${command3}"
+ "-DINFILE=${infile}"
+ "-DOUTFILE=${outfile}"
+ "-DTIFFINFO=$<TARGET_FILE:tiffinfo>"
+ "-DLIBTIFF=$<TARGET_FILE:tiff>"
+ "-DVALIDATE=${validate}"
+ -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffTest.cmake")
+endmacro()
+
+macro(tiff_test_stdout name command infile outfile)
+ add_test(NAME "${name}"
+ COMMAND "${CMAKE_COMMAND}"
+ "-DSTDOUT_COMMAND=${command}"
+ "-DINFILE=${infile}"
+ "-DOUTFILE=${outfile}"
+ "-DTIFFINFO=$<TARGET_FILE:tiffinfo>"
+ "-DLIBTIFF=$<TARGET_FILE:tiff>"
+ -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffTest.cmake")
+endmacro()
+
+macro(tiff_test_reader name command infile)
+ add_test(NAME "${name}"
+ COMMAND "${CMAKE_COMMAND}"
+ "-DREADER_COMMAND=${command}"
+ "-DINFILE=${infile}"
+ "-DTIFFINFO=$<TARGET_FILE:tiffinfo>"
+ "-DLIBTIFF=$<TARGET_FILE:tiff>"
+ -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffTest.cmake")
+endmacro()
+
+macro(add_convert_test_multi commandname1 commandname2 commandname3
+ categoryname commandargs1 commandargs2 commandargs3
+ image validate)
+ string(REPLACE " " "^" escaped_commandargs1 "${commandargs1}")
+ string(REPLACE " " "^" escaped_commandargs2 "${commandargs2}")
+ string(REPLACE " " "^" escaped_commandargs3 "${commandargs3}")
+ get_filename_component(name "${image}" NAME)
+ get_filename_component(base "${image}" NAME_WE)
+ set(testname "${commandname1}-${categoryname}-${base}")
+ if(commandname1)
+ set(command1
+ "$<TARGET_FILE:${commandname1}>^${escaped_commandargs1}")
+ else()
+ set(command1)
+ endif()
+ if(commandname2)
+ set(command2
+ "$<TARGET_FILE:${commandname2}>^${escaped_commandargs2}")
+ else()
+ set(command2)
+ endif()
+ if(commandname3)
+ set(command3
+ "$<TARGET_FILE:${commandname3}>^${escaped_commandargs3}")
+ else()
+ set(command3)
+ endif()
+ set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${image}")
+ set(outfile "${TEST_OUTPUT}/${commandname1}-${categoryname}-${name}")
+ string(REGEX REPLACE "\\.tiff\$" "" name "${name}")
+ tiff_test_convert("${testname}" "${command1}" "${command2}" "${command3}"
+ "${infile}" "${outfile}" "${validate}")
+endmacro()
+
+macro(add_convert_test commandname
+ categoryname commandargs
+ image validate)
+ add_convert_test_multi("${commandname}" "" ""
+ "${categoryname}" "${commandargs}" "" ""
+ "${image}" "${validate}")
+endmacro()
+
+macro(add_convert_tests_multi commandname commandname2 commandname3
+ categoryname
+ commandargs1 commandargs2 commandargs3
+ images validate)
+ foreach(file ${${images}})
+ add_convert_test_multi("${commandname1}" "${commandname2}"
+ "${commandname3}" "${categoryname}"
+ "${commandargs1}" "${commandargs2}"
+ "${commandargs3}" "${file}" "${validate}")
+ endforeach()
+endmacro()
+
+macro(add_convert_tests commandname categoryname commandargs images validate)
+ foreach(file ${${images}})
+ add_convert_test("${commandname}" "${categoryname}"
+ "${commandargs}" "${file}" "${validate}")
+ endforeach()
+endmacro()
+
+macro(add_stdout_test commandname commandargs image)
+ string(REPLACE " " "^" escaped_commandargs "${commandargs}")
+ get_filename_component(name "${image}" NAME)
+ get_filename_component(base "${image}" NAME_WE)
+ set(testname "${commandname}-${base}")
+ set(command "$<TARGET_FILE:${commandname}>^${escaped_commandargs}")
+ set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${image}")
+ set(outfile "${TEST_OUTPUT}/${commandname}-${name}")
+ string(REGEX REPLACE "\\.tiff\$" "" name "${name}")
+ tiff_test_stdout("${testname}" "${command}" "${infile}" "${outfile}")
+endmacro()
+
+macro(add_reader_test commandname commandargs image)
+ string(REPLACE " " "^" escaped_commandargs "${commandargs}")
+ get_filename_component(name "${image}" NAME)
+ get_filename_component(base "${image}" NAME_WE)
+ set(testname "${commandname}-${base}")
+ set(command "$<TARGET_FILE:${commandname}>^${escaped_commandargs}")
+ set(infile "${CMAKE_CURRENT_SOURCE_DIR}/${image}")
+ string(REGEX REPLACE "\\.tiff\$" "" name "${name}")
+ tiff_test_reader("${testname}" "${command}" "${infile}")
+endmacro()
+
+# BMP
+add_convert_test(bmp2tiff palette "" "images/palette-1c-8b.bmp" TRUE)
+add_convert_test(bmp2tiff rgb "" "images/rgb-3c-8b.bmp" TRUE)
+
+# GIF
+add_convert_test(gif2tiff palette "" "images/palette-1c-8b.gif" TRUE)
+
+# PPM
+add_convert_test(ppm2tiff miniswhite "" "images/miniswhite-1c-1b.pbm" TRUE)
+add_convert_test(ppm2tiff minisblack "" "images/minisblack-1c-8b.pgm" TRUE)
+add_convert_test(ppm2tiff rgb "" "images/rgb-3c-8b.ppm" TRUE)
+
+# tiffcp
+add_convert_test(tiffcp g3 "-c g3" "images/miniswhite-1c-1b.tiff" FALSE)
+add_convert_test(tiffcp g31d "-c g3:1d" "images/miniswhite-1c-1b.tiff" FALSE)
+add_convert_test(tiffcp g31dfill "-c g3:1d:fill" "images/miniswhite-1c-1b.tiff" FALSE)
+add_convert_test(tiffcp g32d "-c g3:2d" "images/miniswhite-1c-1b.tiff" FALSE)
+add_convert_test(tiffcp g32dfill "-c g3:2d:fill" "images/miniswhite-1c-1b.tiff" FALSE)
+add_convert_test(tiffcp g4 "-c g4" "images/miniswhite-1c-1b.tiff" FALSE)
+add_convert_test_multi(tiffcp tiffcp "" logluv "-c none" "-c sgilog" ""
+ "images/logluv-3c-16b.tiff" FALSE)
+add_convert_test_multi(tiffcp thumbnail "" thumbnail "g3:1d" "" ""
+ "images/miniswhite-1c-1b.tiff" FALSE)
+
+# tiffdump
+add_reader_test(tiffdump "" "images/miniswhite-1c-1b.tiff")
+
+# tiffinfo
+add_reader_test(tiffinfo "-c -D -d -j -s" "images/minisblack-1c-16b.tiff")
+
+# tiffcp split/join
+foreach(image ${UNCOMPRESSEDIMAGES})
+ list(APPEND ESCAPED_UNCOMPRESSED "${CMAKE_CURRENT_SOURCE_DIR}/${image}")
+endforeach()
+string(REPLACE ";" "^" ESCAPED_UNCOMPRESSED "${ESCAPED_UNCOMPRESSED}")
+add_test(NAME "tiffcp-split"
+ COMMAND "${CMAKE_COMMAND}"
+ "-DTESTFILES=${ESCAPED_UNCOMPRESSED}"
+ "-DCONJOINED=${TEST_OUTPUT}/tiffcp-split-conjoined.tif"
+ "-DSPLITFILE=${TEST_OUTPUT}/tiffcp-split-split-"
+ "-DTIFFCP=$<TARGET_FILE:tiffcp>"
+ "-DTIFFSPLIT=$<TARGET_FILE:tiffsplit>"
+ "-DLIBTIFF=$<TARGET_FILE:tiff>"
+ -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffSplitTest.cmake")
+add_test(NAME "tiffcp-split-join"
+ COMMAND "${CMAKE_COMMAND}"
+ "-DTESTFILES=${ESCAPED_UNCOMPRESSED}"
+ "-DCONJOINED=${TEST_OUTPUT}/tiffcp-split-join-conjoined.tif"
+ "-DSPLITFILE=${TEST_OUTPUT}/tiffcp-split-join-split-"
+ "-DRECONJOINED=${TEST_OUTPUT}/tiffcp-split-join-reconjoined.tif"
+ "-DTIFFCP=$<TARGET_FILE:tiffcp>"
+ "-DTIFFSPLIT=$<TARGET_FILE:tiffsplit>"
+ "-DLIBTIFF=$<TARGET_FILE:tiff>"
+ -P "${CMAKE_CURRENT_SOURCE_DIR}/TiffSplitTest.cmake")
+
+# PDF
+add_stdout_test(tiff2pdf "" "images/miniswhite-1c-1b.tiff" TRUE)
+
+# RGBA
+add_convert_tests(tiff2rgba default "" TIFFIMAGES TRUE)
+# Test rotations
+add_convert_tests(tiffcrop R90 "-R90" TIFFIMAGES TRUE)
+# Test flip (mirror)
+add_convert_tests(tiffcrop doubleflip "-F both" TIFFIMAGES TRUE)
+# Test extracting a section 60 pixels wide and 60 pixels high
+add_convert_tests(tiffcrop extract "-U px -E top -X 60 -Y 60" TIFFIMAGES TRUE)
+# Test extracting the first and fourth quarters from the left side.
+add_convert_tests(tiffcrop extractz14 "-E left -Z1:4,2:4" TIFFIMAGES TRUE)
diff --git a/tiff/test/Makefile.am b/tiff/test/Makefile.am
index de9289a6d..df5c082d7 100644
--- a/tiff/test/Makefile.am
+++ b/tiff/test/Makefile.am
@@ -23,7 +23,7 @@
# Process this file with automake to produce Makefile.in.
-AUTOMAKE_OPTIONS = 1.11 color-tests parallel-tests foreign
+AUTOMAKE_OPTIONS = 1.12 color-tests parallel-tests foreign
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
@@ -36,7 +36,11 @@ TESTS_ENVIRONMENT = \
EXTRA_DIST = \
$(TESTSCRIPTS) \
$(IMAGES_EXTRA_DIST) \
- common.sh
+ CMakeLists.txt \
+ common.sh \
+ TiffSplitTest.cmake \
+ TiffTestCommon.cmake \
+ TiffTest.cmake
# All of the tests to execute via 'make check'
TESTS = $(check_PROGRAMS) $(TESTSCRIPTS)
@@ -47,14 +51,21 @@ XFAIL_TESTS =
# Extra files which should be cleaned by 'make clean'
CLEANFILES = test_packbits.tif o-*
+if HAVE_JPEG
+JPEG_DEPENDENT_CHECK_PROG=raw_decode
+JPEG_DEPENDENT_TESTSCRIPTS=tiff2rgba-quad-tile.jpg.sh
+else
+JPEG_DEPENDENT_CHECK_PROG=
+JPEG_DEPENDENT_TESTSCRIPTS=
+endif
+
# Executable programs which need to be built in order to support tests
-check_PROGRAMS = ascii_tag long_tag short_tag strip_rw rewrite
+check_PROGRAMS = \
+ ascii_tag long_tag short_tag strip_rw rewrite custom_dir \
+ $(JPEG_DEPENDENT_CHECK_PROG)
# Test scripts to execute
TESTSCRIPTS = \
- bmp2tiff_palette.sh \
- bmp2tiff_rgb.sh \
- gif2tiff.sh \
ppm2tiff_pbm.sh \
ppm2tiff_pgm.sh \
ppm2tiff_ppm.sh \
@@ -124,7 +135,8 @@ TESTSCRIPTS = \
tiff2rgba-palette-1c-4b.sh \
tiff2rgba-palette-1c-8b.sh \
tiff2rgba-rgb-3c-16b.sh \
- tiff2rgba-rgb-3c-8b.sh
+ tiff2rgba-rgb-3c-8b.sh \
+ $(JPEG_DEPENDENT_TESTSCRIPTS)
# This list should contain all of the TIFF files in the 'images'
# subdirectory which are intended to be used as input images for
@@ -139,14 +151,8 @@ TIFFIMAGES = \
images/palette-1c-4b.tiff \
images/palette-1c-8b.tiff \
images/rgb-3c-16b.tiff \
- images/rgb-3c-8b.tiff
-
-BMPIMAGES = \
- images/palette-1c-8b.bmp \
- images/rgb-3c-8b.bmp
-
-GIFIMAGES = \
- images/palette-1c-8b.gif
+ images/rgb-3c-8b.tiff \
+ images/quad-tile.jpg.tiff
PNMIMAGES = \
images/minisblack-1c-8b.pgm \
@@ -158,8 +164,6 @@ PNMIMAGES = \
# files which are not currently used by the tests.
IMAGES_EXTRA_DIST = \
images/README.txt \
- $(BMPIMAGES) \
- $(GIFIMAGES) \
$(PNMIMAGES) \
$(TIFFIMAGES)
@@ -175,12 +179,29 @@ strip_rw_SOURCES = strip_rw.c strip.c test_arrays.c test_arrays.h
strip_rw_LDADD = $(LIBTIFF)
rewrite_SOURCES = rewrite_tag.c
rewrite_LDADD = $(LIBTIFF)
+raw_decode_SOURCES = raw_decode.c
+raw_decode_LDADD = $(LIBTIFF)
+custom_dir_SOURCES = custom_dir.c
+custom_dir_LDADD = $(LIBTIFF)
-INCLUDES = -I$(top_srcdir)/libtiff
+AM_CPPFLAGS = -I$(top_srcdir)/libtiff
-# memcheck: valgrind's memory access checker
+# memcheck: valgrind's memory access checker.
+#
+# The suppressions which come with valgrind are sometimes insufficient
+# to handle certain system library aspects which may be reported and
+# which are unrelated to libtiff. When first starting with a new
+# system (or after a major system update), it is good to execute the
+# test suite (known to already be passing!) like 'make memcheck
+# VALGRIND_EXTRA_OPTS=--gen-suppressions=all' to create valgrind
+# suppression entries in the test log. Make sure that none of the
+# suppressions are due to libtiff itself. Tell valgrind about the
+# suppressions by creating a .valgrindrc file with content like:
+# --memcheck:suppressions=mysupp.supp
memcheck:
- $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes --track-origins=yes --num-callers=12 --quiet $(VALGRIND_EXTRA_OPTS)' check
+ $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes \
+ --error-exitcode=2 --track-origins=yes --num-callers=12 \
+ --quiet $(VALGRIND_EXTRA_OPTS)' check
# ptrcheck: valgrind's experimental pointer checking tool.
ptrcheck:
diff --git a/tiff/test/Makefile.in b/tiff/test/Makefile.in
index 555ca2edb..92a416536 100644
--- a/tiff/test/Makefile.in
+++ b/tiff/test/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -41,6 +40,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -59,12 +113,12 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+TESTS = $(check_PROGRAMS) $(am__EXEEXT_3)
XFAIL_TESTS =
check_PROGRAMS = ascii_tag$(EXEEXT) long_tag$(EXEEXT) \
- short_tag$(EXEEXT) strip_rw$(EXEEXT) rewrite$(EXEEXT)
+ short_tag$(EXEEXT) strip_rw$(EXEEXT) rewrite$(EXEEXT) \
+ custom_dir$(EXEEXT) $(am__EXEEXT_1)
subdir = test
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -72,20 +126,30 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
+ $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
+@HAVE_JPEG_TRUE@am__EXEEXT_1 = raw_decode$(EXEEXT)
am_ascii_tag_OBJECTS = ascii_tag.$(OBJEXT)
ascii_tag_OBJECTS = $(am_ascii_tag_OBJECTS)
ascii_tag_DEPENDENCIES = $(LIBTIFF)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
am__v_lt_0 = --silent
+am__v_lt_1 =
+am_custom_dir_OBJECTS = custom_dir.$(OBJEXT)
+custom_dir_OBJECTS = $(am_custom_dir_OBJECTS)
+custom_dir_DEPENDENCIES = $(LIBTIFF)
am_long_tag_OBJECTS = long_tag.$(OBJEXT) check_tag.$(OBJEXT)
long_tag_OBJECTS = $(am_long_tag_OBJECTS)
long_tag_DEPENDENCIES = $(LIBTIFF)
+am_raw_decode_OBJECTS = raw_decode.$(OBJEXT)
+raw_decode_OBJECTS = $(am_raw_decode_OBJECTS)
+raw_decode_DEPENDENCIES = $(LIBTIFF)
am_rewrite_OBJECTS = rewrite_tag.$(OBJEXT)
rewrite_OBJECTS = $(am_rewrite_OBJECTS)
rewrite_DEPENDENCIES = $(LIBTIFF)
@@ -96,6 +160,18 @@ am_strip_rw_OBJECTS = strip_rw.$(OBJEXT) strip.$(OBJEXT) \
test_arrays.$(OBJEXT)
strip_rw_OBJECTS = $(am_strip_rw_OBJECTS)
strip_rw_DEPENDENCIES = $(LIBTIFF)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libtiff
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
@@ -108,41 +184,68 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = $(ascii_tag_SOURCES) $(long_tag_SOURCES) $(rewrite_SOURCES) \
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(ascii_tag_SOURCES) $(custom_dir_SOURCES) \
+ $(long_tag_SOURCES) $(raw_decode_SOURCES) $(rewrite_SOURCES) \
$(short_tag_SOURCES) $(strip_rw_SOURCES)
-DIST_SOURCES = $(ascii_tag_SOURCES) $(long_tag_SOURCES) \
- $(rewrite_SOURCES) $(short_tag_SOURCES) $(strip_rw_SOURCES)
+DIST_SOURCES = $(ascii_tag_SOURCES) $(custom_dir_SOURCES) \
+ $(long_tag_SOURCES) $(raw_decode_SOURCES) $(rewrite_SOURCES) \
+ $(short_tag_SOURCES) $(strip_rw_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
HEADERS = $(noinst_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
-# If stdout is a non-dumb tty, use colors. If test -t is not supported,
-# then this fails; a conservative approach. Of course do not redirect
-# stdout here, just stderr.
-am__tty_colors = \
-red=; grn=; lgn=; blu=; std=; \
-test "X$(AM_COLOR_TESTS)" != Xno \
-&& test "X$$TERM" != Xdumb \
-&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \
-&& { \
- red=''; \
- grn=''; \
- lgn=''; \
- blu=''; \
- std=''; \
+am__tty_colors_dummy = \
+ mgn= red= grn= lgn= blu= brg= std=; \
+ am__color_tests=no
+am__tty_colors = { \
+ $(am__tty_colors_dummy); \
+ if test "X$(AM_COLOR_TESTS)" = Xno; then \
+ am__color_tests=no; \
+ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
+ am__color_tests=yes; \
+ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
+ am__color_tests=yes; \
+ fi; \
+ if test $$am__color_tests = yes; then \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ mgn=''; \
+ brg=''; \
+ std=''; \
+ fi; \
}
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
@@ -171,91 +274,212 @@ am__uninstall_files_from_dir = { \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
-# Restructured Text title and section.
-am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//'
-am__rst_section = sed 'p;s/./=/g;p;g'
-# Put stdin (possibly several lines separated by ". ") in a box.
-# Prefix each line by 'col' and terminate each with 'std', for coloring.
-# Multi line coloring is problematic with "less -R", so we really need
-# to color each line individually.
-am__text_box = $(AWK) '{ \
- n = split($$0, lines, "\\. "); max = 0; \
- for (i = 1; i <= n; ++i) \
- if (max < length(lines[i])) \
- max = length(lines[i]); \
- for (i = 0; i < max; ++i) \
- line = line "="; \
- print col line std; \
- for (i = 1; i <= n; ++i) \
- if (lines[i]) \
- print col lines[i] std; \
- print col line std; \
+am__recheck_rx = ^[ ]*:recheck:[ ]*
+am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
+am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
+# A command that, given a newline-separated list of test names on the
+# standard input, print the name of the tests that are to be re-run
+# upon "make recheck".
+am__list_recheck_tests = $(AWK) '{ \
+ recheck = 1; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ { \
+ if ((getline line2 < ($$0 ".log")) < 0) \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
+ { \
+ recheck = 0; \
+ break; \
+ } \
+ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
+ { \
+ break; \
+ } \
+ }; \
+ if (recheck) \
+ print $$0; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
+}'
+# A command that, given a newline-separated list of test names on the
+# standard input, create the global log from their .trs and .log files.
+am__create_global_log = $(AWK) ' \
+function fatal(msg) \
+{ \
+ print "fatal: making $@: " msg | "cat >&2"; \
+ exit 1; \
+} \
+function rst_section(header) \
+{ \
+ print header; \
+ len = length(header); \
+ for (i = 1; i <= len; i = i + 1) \
+ printf "="; \
+ printf "\n\n"; \
+} \
+{ \
+ copy_in_global_log = 1; \
+ global_test_result = "RUN"; \
+ while ((rc = (getline line < ($$0 ".trs"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".trs"); \
+ if (line ~ /$(am__global_test_result_rx)/) \
+ { \
+ sub("$(am__global_test_result_rx)", "", line); \
+ sub("[ ]*$$", "", line); \
+ global_test_result = line; \
+ } \
+ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
+ copy_in_global_log = 0; \
+ }; \
+ if (copy_in_global_log) \
+ { \
+ rst_section(global_test_result ": " $$0); \
+ while ((rc = (getline line < ($$0 ".log"))) != 0) \
+ { \
+ if (rc < 0) \
+ fatal("failed to read from " $$0 ".log"); \
+ print line; \
+ }; \
+ printf "\n"; \
+ }; \
+ close ($$0 ".trs"); \
+ close ($$0 ".log"); \
}'
+# Restructured Text title.
+am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
# Solaris 10 'make', and several other traditional 'make' implementations,
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
# by disabling -e (using the XSI extension "set +e") if it's set.
am__sh_e_setup = case $$- in *e*) set +e;; esac
+# Default flags passed to test drivers.
+am__common_driver_flags = \
+ --color-tests "$$am__color_tests" \
+ --enable-hard-errors "$$am__enable_hard_errors" \
+ --expect-failure "$$am__expect_failure"
# To be inserted before the command running the test. Creates the
# directory for the log if needed. Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log, and passes
-# TESTS_ENVIRONMENT. Save and restore TERM around use of
-# TESTS_ENVIRONMENT, in case that unsets it.
+# containing $f, in $tst the test, in $log the log. Executes the
+# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
+# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
+# will run the test scripts (or their associated LOG_COMPILER, if
+# thy have one).
am__check_pre = \
$(am__sh_e_setup); \
$(am__vpath_adj_setup) $(am__vpath_adj) \
+$(am__tty_colors); \
srcdir=$(srcdir); export srcdir; \
-rm -f $@-t; \
-am__trap='rm -f '\''$(abs_builddir)/$@-t'\''; (exit $$st); exit $$st'; \
-trap "st=129; $$am__trap" 1; trap "st=130; $$am__trap" 2; \
-trap "st=141; $$am__trap" 13; trap "st=143; $$am__trap" 15; \
-am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \
-test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \
+case "$@" in \
+ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
+ *) am__odir=.;; \
+esac; \
+test "x$$am__odir" = x"." || test -d "$$am__odir" \
+ || $(MKDIR_P) "$$am__odir" || exit $$?; \
if test -f "./$$f"; then dir=./; \
elif test -f "$$f"; then dir=; \
else dir="$(srcdir)/"; fi; \
-tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM; \
-$(TESTS_ENVIRONMENT)
-# To be appended to the command running the test. Handle the stdout
-# and stderr redirection, and catch the exit status.
-am__check_post = \
->$@-t 2>&1; \
-estatus=$$?; \
-if test -n '$(DISABLE_HARD_ERRORS)' \
- && test $$estatus -eq 99; then \
- estatus=1; \
-fi; \
-TERM=$$__SAVED_TERM; export TERM; \
-$(am__tty_colors); \
-xfailed=PASS; \
+tst=$$dir$$f; log='$@'; \
+if test -n '$(DISABLE_HARD_ERRORS)'; then \
+ am__enable_hard_errors=no; \
+else \
+ am__enable_hard_errors=yes; \
+fi; \
case " $(XFAIL_TESTS) " in \
*[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
- xfailed=XFAIL;; \
-esac; \
-case $$estatus.$$xfailed in \
- 0.XFAIL) col=$$red; res=XPASS;; \
- 0.*) col=$$grn; res=PASS ;; \
- 77.*) col=$$blu; res=SKIP ;; \
- 99.*) col=$$red; res=FAIL ;; \
- *.XFAIL) col=$$lgn; res=XFAIL;; \
- *.*) col=$$red; res=FAIL ;; \
-esac; \
-echo "$${col}$$res$${std}: $$f"; \
-echo "$$res: $$f (exit: $$estatus)" | \
- $(am__rst_section) >$@; \
-cat $@-t >>$@; \
-rm -f $@-t
+ am__expect_failure=yes;; \
+ *) \
+ am__expect_failure=no;; \
+esac; \
+$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
+# A shell command to get the names of the tests scripts with any registered
+# extension removed (i.e., equivalently, the names of the test logs, with
+# the '.log' extension removed). The result is saved in the shell variable
+# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
+# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
+# since that might cause problem with VPATH rewrites for suffix-less tests.
+# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
+am__set_TESTS_bases = \
+ bases='$(TEST_LOGS)'; \
+ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
+ bases=`echo $$bases`
RECHECK_LOGS = $(TEST_LOGS)
-AM_RECURSIVE_TARGETS = check recheck check-html recheck-html
-TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
+AM_RECURSIVE_TARGETS = check recheck
+@HAVE_JPEG_TRUE@am__EXEEXT_2 = tiff2rgba-quad-tile.jpg.sh
+am__EXEEXT_3 = ppm2tiff_pbm.sh ppm2tiff_pgm.sh ppm2tiff_ppm.sh \
+ tiffcp-g3.sh tiffcp-g3-1d.sh tiffcp-g3-1d-fill.sh \
+ tiffcp-g3-2d.sh tiffcp-g3-2d-fill.sh tiffcp-g4.sh \
+ tiffcp-logluv.sh tiffcp-thumbnail.sh tiffdump.sh tiffinfo.sh \
+ tiffcp-split.sh tiffcp-split-join.sh tiff2ps-PS1.sh \
+ tiff2ps-PS2.sh tiff2ps-PS3.sh tiff2ps-EPS1.sh tiff2pdf.sh \
+ tiffcrop-doubleflip-logluv-3c-16b.sh \
+ tiffcrop-doubleflip-minisblack-1c-16b.sh \
+ tiffcrop-doubleflip-minisblack-1c-8b.sh \
+ tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh \
+ tiffcrop-doubleflip-miniswhite-1c-1b.sh \
+ tiffcrop-doubleflip-palette-1c-1b.sh \
+ tiffcrop-doubleflip-palette-1c-4b.sh \
+ tiffcrop-doubleflip-palette-1c-8b.sh \
+ tiffcrop-doubleflip-rgb-3c-16b.sh \
+ tiffcrop-doubleflip-rgb-3c-8b.sh \
+ tiffcrop-extract-logluv-3c-16b.sh \
+ tiffcrop-extract-minisblack-1c-16b.sh \
+ tiffcrop-extract-minisblack-1c-8b.sh \
+ tiffcrop-extract-minisblack-2c-8b-alpha.sh \
+ tiffcrop-extract-miniswhite-1c-1b.sh \
+ tiffcrop-extract-palette-1c-1b.sh \
+ tiffcrop-extract-palette-1c-4b.sh \
+ tiffcrop-extract-palette-1c-8b.sh \
+ tiffcrop-extract-rgb-3c-16b.sh tiffcrop-extract-rgb-3c-8b.sh \
+ tiffcrop-extractz14-logluv-3c-16b.sh \
+ tiffcrop-extractz14-minisblack-1c-16b.sh \
+ tiffcrop-extractz14-minisblack-1c-8b.sh \
+ tiffcrop-extractz14-minisblack-2c-8b-alpha.sh \
+ tiffcrop-extractz14-miniswhite-1c-1b.sh \
+ tiffcrop-extractz14-palette-1c-1b.sh \
+ tiffcrop-extractz14-palette-1c-4b.sh \
+ tiffcrop-extractz14-palette-1c-8b.sh \
+ tiffcrop-extractz14-rgb-3c-16b.sh \
+ tiffcrop-extractz14-rgb-3c-8b.sh tiffcrop-R90-logluv-3c-16b.sh \
+ tiffcrop-R90-minisblack-1c-16b.sh \
+ tiffcrop-R90-minisblack-1c-8b.sh \
+ tiffcrop-R90-minisblack-2c-8b-alpha.sh \
+ tiffcrop-R90-miniswhite-1c-1b.sh tiffcrop-R90-palette-1c-1b.sh \
+ tiffcrop-R90-palette-1c-4b.sh tiffcrop-R90-palette-1c-8b.sh \
+ tiffcrop-R90-rgb-3c-16b.sh tiffcrop-R90-rgb-3c-8b.sh \
+ tiff2rgba-logluv-3c-16b.sh tiff2rgba-minisblack-1c-16b.sh \
+ tiff2rgba-minisblack-1c-8b.sh \
+ tiff2rgba-minisblack-2c-8b-alpha.sh \
+ tiff2rgba-miniswhite-1c-1b.sh tiff2rgba-palette-1c-1b.sh \
+ tiff2rgba-palette-1c-4b.sh tiff2rgba-palette-1c-8b.sh \
+ tiff2rgba-rgb-3c-16b.sh tiff2rgba-rgb-3c-8b.sh $(am__EXEEXT_2)
TEST_SUITE_LOG = test-suite.log
TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver
LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__set_b = \
+ case '$@' in \
+ */*) \
+ case '$*' in \
+ */*) b='$*';; \
+ *) b=`echo '$@' | sed 's/\.log$$//'`; \
+ esac;; \
+ *) \
+ b='$*';; \
+ esac
am__test_logs1 = $(TESTS:=.log)
am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver
TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
$(TEST_LOG_FLAGS)
-TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \
+ $(top_srcdir)/config/mkinstalldirs \
+ $(top_srcdir)/config/test-driver
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -269,6 +493,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -316,6 +541,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -403,7 +629,7 @@ tiff_libs_private = @tiff_libs_private@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = 1.11 color-tests parallel-tests foreign
+AUTOMAKE_OPTIONS = 1.12 color-tests parallel-tests foreign
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
# Environment parameters to be used during tests
@@ -415,20 +641,22 @@ TESTS_ENVIRONMENT = \
EXTRA_DIST = \
$(TESTSCRIPTS) \
$(IMAGES_EXTRA_DIST) \
- common.sh
+ CMakeLists.txt \
+ common.sh \
+ TiffSplitTest.cmake \
+ TiffTestCommon.cmake \
+ TiffTest.cmake
-# All of the tests to execute via 'make check'
-TESTS = $(check_PROGRAMS) $(TESTSCRIPTS)
-
# Extra files which should be cleaned by 'make clean'
CLEANFILES = test_packbits.tif o-*
+@HAVE_JPEG_FALSE@JPEG_DEPENDENT_CHECK_PROG =
+@HAVE_JPEG_TRUE@JPEG_DEPENDENT_CHECK_PROG = raw_decode
+@HAVE_JPEG_FALSE@JPEG_DEPENDENT_TESTSCRIPTS =
+@HAVE_JPEG_TRUE@JPEG_DEPENDENT_TESTSCRIPTS = tiff2rgba-quad-tile.jpg.sh
# Test scripts to execute
TESTSCRIPTS = \
- bmp2tiff_palette.sh \
- bmp2tiff_rgb.sh \
- gif2tiff.sh \
ppm2tiff_pbm.sh \
ppm2tiff_pgm.sh \
ppm2tiff_ppm.sh \
@@ -498,7 +726,8 @@ TESTSCRIPTS = \
tiff2rgba-palette-1c-4b.sh \
tiff2rgba-palette-1c-8b.sh \
tiff2rgba-rgb-3c-16b.sh \
- tiff2rgba-rgb-3c-8b.sh
+ tiff2rgba-rgb-3c-8b.sh \
+ $(JPEG_DEPENDENT_TESTSCRIPTS)
# This list should contain all of the TIFF files in the 'images'
@@ -514,14 +743,8 @@ TIFFIMAGES = \
images/palette-1c-4b.tiff \
images/palette-1c-8b.tiff \
images/rgb-3c-16b.tiff \
- images/rgb-3c-8b.tiff
-
-BMPIMAGES = \
- images/palette-1c-8b.bmp \
- images/rgb-3c-8b.bmp
-
-GIFIMAGES = \
- images/palette-1c-8b.gif
+ images/rgb-3c-8b.tiff \
+ images/quad-tile.jpg.tiff
PNMIMAGES = \
images/minisblack-1c-8b.pgm \
@@ -534,8 +757,6 @@ PNMIMAGES = \
# files which are not currently used by the tests.
IMAGES_EXTRA_DIST = \
images/README.txt \
- $(BMPIMAGES) \
- $(GIFIMAGES) \
$(PNMIMAGES) \
$(TIFFIMAGES)
@@ -550,11 +771,15 @@ strip_rw_SOURCES = strip_rw.c strip.c test_arrays.c test_arrays.h
strip_rw_LDADD = $(LIBTIFF)
rewrite_SOURCES = rewrite_tag.c
rewrite_LDADD = $(LIBTIFF)
-INCLUDES = -I$(top_srcdir)/libtiff
+raw_decode_SOURCES = raw_decode.c
+raw_decode_LDADD = $(LIBTIFF)
+custom_dir_SOURCES = custom_dir.c
+custom_dir_LDADD = $(LIBTIFF)
+AM_CPPFLAGS = -I$(top_srcdir)/libtiff
all: all-am
.SUFFIXES:
-.SUFFIXES: .c .html .lo .log .o .obj .test .test$(EXEEXT)
+.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
@@ -567,7 +792,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign test/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign test/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -594,18 +818,31 @@ clean-checkPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
+
ascii_tag$(EXEEXT): $(ascii_tag_OBJECTS) $(ascii_tag_DEPENDENCIES) $(EXTRA_ascii_tag_DEPENDENCIES)
@rm -f ascii_tag$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(ascii_tag_OBJECTS) $(ascii_tag_LDADD) $(LIBS)
+
+custom_dir$(EXEEXT): $(custom_dir_OBJECTS) $(custom_dir_DEPENDENCIES) $(EXTRA_custom_dir_DEPENDENCIES)
+ @rm -f custom_dir$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(custom_dir_OBJECTS) $(custom_dir_LDADD) $(LIBS)
+
long_tag$(EXEEXT): $(long_tag_OBJECTS) $(long_tag_DEPENDENCIES) $(EXTRA_long_tag_DEPENDENCIES)
@rm -f long_tag$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(long_tag_OBJECTS) $(long_tag_LDADD) $(LIBS)
+
+raw_decode$(EXEEXT): $(raw_decode_OBJECTS) $(raw_decode_DEPENDENCIES) $(EXTRA_raw_decode_DEPENDENCIES)
+ @rm -f raw_decode$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(raw_decode_OBJECTS) $(raw_decode_LDADD) $(LIBS)
+
rewrite$(EXEEXT): $(rewrite_OBJECTS) $(rewrite_DEPENDENCIES) $(EXTRA_rewrite_DEPENDENCIES)
@rm -f rewrite$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(rewrite_OBJECTS) $(rewrite_LDADD) $(LIBS)
+
short_tag$(EXEEXT): $(short_tag_OBJECTS) $(short_tag_DEPENDENCIES) $(EXTRA_short_tag_DEPENDENCIES)
@rm -f short_tag$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(short_tag_OBJECTS) $(short_tag_LDADD) $(LIBS)
+
strip_rw$(EXEEXT): $(strip_rw_OBJECTS) $(strip_rw_DEPENDENCIES) $(EXTRA_strip_rw_DEPENDENCIES)
@rm -f strip_rw$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(strip_rw_OBJECTS) $(strip_rw_LDADD) $(LIBS)
@@ -618,7 +855,9 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ascii_tag.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_tag.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/custom_dir.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/long_tag.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw_decode.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rewrite_tag.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/short_tag.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strip.Po@am__quote@
@@ -630,14 +869,14 @@ distclean-compile:
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -652,26 +891,15 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -683,15 +911,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -700,297 +924,726 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+# Recover from deleted '.trs' file; this should ensure that
+# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
+# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
+# to avoid problems with "make -n".
+.log.trs:
+ rm -f $< $@
+ $(MAKE) $(AM_MAKEFLAGS) $<
+
+# Leading 'am--fnord' is there to ensure the list of targets does not
+# expand to empty, as could happen e.g. with make check TESTS=''.
+am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
+am--force-recheck:
+ @:
+
$(TEST_SUITE_LOG): $(TEST_LOGS)
- @$(am__sh_e_setup); \
- list='$(TEST_LOGS)'; \
- results=`for f in $$list; do \
- test -r $$f && read line < $$f && echo "$$line" \
- || echo FAIL; \
- done`; \
- all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[ ]*//'`; \
- fail=`echo "$$results" | grep -c '^FAIL'`; \
- pass=`echo "$$results" | grep -c '^PASS'`; \
- skip=`echo "$$results" | grep -c '^SKIP'`; \
- xfail=`echo "$$results" | grep -c '^XFAIL'`; \
- xpass=`echo "$$results" | grep -c '^XPASS'`; \
- failures=`expr $$fail + $$xpass`; \
- all=`expr $$all - $$skip`; \
- if test "$$all" -eq 1; then tests=test; All=; \
- else tests=tests; All="All "; fi; \
- case fail=$$fail:xpass=$$xpass:xfail=$$xfail in \
- fail=0:xpass=0:xfail=0) \
- msg="$$All$$all $$tests passed. "; \
- exit=true;; \
- fail=0:xpass=0:xfail=*) \
- msg="$$All$$all $$tests behaved as expected"; \
- if test "$$xfail" -eq 1; then xfailures=failure; \
- else xfailures=failures; fi; \
- msg="$$msg ($$xfail expected $$xfailures). "; \
- exit=true;; \
- fail=*:xpass=0:xfail=*) \
- msg="$$fail of $$all $$tests failed. "; \
- exit=false;; \
- fail=*:xpass=*:xfail=*) \
- msg="$$failures of $$all $$tests did not behave as expected"; \
- if test "$$xpass" -eq 1; then xpasses=pass; \
- else xpasses=passes; fi; \
- msg="$$msg ($$xpass unexpected $$xpasses). "; \
- exit=false;; \
- *) \
- echo >&2 "incorrect case"; exit 4;; \
- esac; \
- if test "$$skip" -ne 0; then \
- if test "$$skip" -eq 1; then \
- msg="$$msg($$skip test was not run). "; \
- else \
- msg="$$msg($$skip tests were not run). "; \
- fi; \
- fi; \
+ @$(am__set_TESTS_bases); \
+ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
+ redo_bases=`for i in $$bases; do \
+ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
+ done`; \
+ if test -n "$$redo_bases"; then \
+ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
+ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
+ if $(am__make_dryrun); then :; else \
+ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
+ fi; \
+ fi; \
+ if test -n "$$am__remaking_logs"; then \
+ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
+ "recursion detected" >&2; \
+ elif test -n "$$redo_logs"; then \
+ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
+ fi; \
+ if $(am__make_dryrun); then :; else \
+ st=0; \
+ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
+ for i in $$redo_bases; do \
+ test -f $$i.trs && test -r $$i.trs \
+ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \
+ test -f $$i.log && test -r $$i.log \
+ || { echo "$$errmsg $$i.log" >&2; st=1; }; \
+ done; \
+ test $$st -eq 0 || exit 1; \
+ fi
+ @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
+ ws='[ ]'; \
+ results=`for b in $$bases; do echo $$b.trs; done`; \
+ test -n "$$results" || results=/dev/null; \
+ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
+ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
+ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
+ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
+ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
+ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
+ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
+ if test `expr $$fail + $$xpass + $$error` -eq 0; then \
+ success=true; \
+ else \
+ success=false; \
+ fi; \
+ br='==================='; br=$$br$$br$$br$$br; \
+ result_count () \
+ { \
+ if test x"$$1" = x"--maybe-color"; then \
+ maybe_colorize=yes; \
+ elif test x"$$1" = x"--no-color"; then \
+ maybe_colorize=no; \
+ else \
+ echo "$@: invalid 'result_count' usage" >&2; exit 4; \
+ fi; \
+ shift; \
+ desc=$$1 count=$$2; \
+ if test $$maybe_colorize = yes && test $$count -gt 0; then \
+ color_start=$$3 color_end=$$std; \
+ else \
+ color_start= color_end=; \
+ fi; \
+ echo "$${color_start}# $$desc $$count$${color_end}"; \
+ }; \
+ create_testsuite_report () \
+ { \
+ result_count $$1 "TOTAL:" $$all "$$brg"; \
+ result_count $$1 "PASS: " $$pass "$$grn"; \
+ result_count $$1 "SKIP: " $$skip "$$blu"; \
+ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
+ result_count $$1 "FAIL: " $$fail "$$red"; \
+ result_count $$1 "XPASS:" $$xpass "$$red"; \
+ result_count $$1 "ERROR:" $$error "$$mgn"; \
+ }; \
{ \
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
$(am__rst_title); \
- echo "$$msg"; \
+ create_testsuite_report --no-color; \
echo; \
echo ".. contents:: :depth: 2"; \
echo; \
- for f in $$list; do \
- test -r $$f && read line < $$f || line=; \
- case $$line in \
- PASS:*|XFAIL:*);; \
- *) echo; cat $$f;; \
- esac; \
- done; \
- } >$(TEST_SUITE_LOG).tmp; \
+ for b in $$bases; do echo $$b; done \
+ | $(am__create_global_log); \
+ } >$(TEST_SUITE_LOG).tmp || exit 1; \
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
- if test "$$failures" -ne 0; then \
- msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG). "; \
- if test -n "$(PACKAGE_BUGREPORT)"; then \
- msg="$${msg}Please report to $(PACKAGE_BUGREPORT). "; \
- fi; \
- fi; \
- test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG); \
- $(am__tty_colors); \
- if $$exit; then \
+ if $$success; then \
col="$$grn"; \
else \
col="$$red"; \
+ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
fi; \
- echo "$$msg" | $(am__text_box) "col=$$col" "std=$$std"; \
- $$exit || exit 1
-
-check-TESTS recheck:
- @if test $@ != recheck; then \
- list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list; \
- fi
- @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
- @list='' list2='$(TEST_LOGS)'; for f in $$list2; do \
- test .log = $$f && continue; \
- if test $@ = recheck; then \
- test -f $$f || continue; \
- if test -r $$f && read line < $$f; then \
- case $$line in FAIL*|XPASS*) : ;; *) continue;; esac; \
- fi; \
- fi; \
- if test -z "$$list"; then list=$$f; else list="$$list $$f"; fi; \
- done; \
- if test $@ = recheck && test -n "$$list"; then \
- echo "am--clean: ; rm -f $$list" \
- | $(MAKE) $(AM_MAKEFLAGS) -f - am--clean || exit 1; \
- fi; \
- $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
-recheck: $(check_PROGRAMS)
-
-am--mostlyclean-test-html:
- list='$(TEST_LOGS:.log=.html)'; test -z "$$list" || rm -f $$list
- rm -f $(TEST_SUITE_HTML)
-
-.log.html:
- @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py'; \
- for r2h in $$list; do \
- if ($$r2h --version) >/dev/null 2>&1; then \
- R2H=$$r2h; \
+ echo "$${col}$$br$${std}"; \
+ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
+ echo "$${col}$$br$${std}"; \
+ create_testsuite_report --maybe-color; \
+ echo "$$col$$br$$std"; \
+ if $$success; then :; else \
+ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
fi; \
- done; \
- if test -z "$$R2H"; then \
- echo >&2 "cannot find rst2html, cannot create $@"; \
- exit 2; \
+ echo "$$col$$br$$std"; \
fi; \
- $$R2H $< >$@.tmp
- @mv $@.tmp $@
-
-# Be sure to run check first, and then to convert the result.
-# Beware of concurrent executions. Run "check" not "check-TESTS", as
-# check-SCRIPTS and other dependencies are rebuilt by the former only.
-# And expect check to fail.
-check-html recheck-html:
- @target=`echo $@ | sed 's/-html$$//'`; \
- rv=0; $(MAKE) $(AM_MAKEFLAGS) $$target || rv=$$?; \
- $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) TEST_LOGS= || exit 4; \
- exit $$rv
+ $$success || exit 1
+
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ trs_list=`for i in $$bases; do echo $$i.trs; done`; \
+ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
+ exit $$?;
+recheck: all $(check_PROGRAMS)
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @set +e; $(am__set_TESTS_bases); \
+ bases=`for i in $$bases; do echo $$i; done \
+ | $(am__list_recheck_tests)` || exit 1; \
+ log_list=`for i in $$bases; do echo $$i.log; done`; \
+ log_list=`echo $$log_list`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
+ am__force_recheck=am--force-recheck \
+ TEST_LOGS="$$log_list"; \
+ exit $$?
ascii_tag.log: ascii_tag$(EXEEXT)
- @p='ascii_tag$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='ascii_tag$(EXEEXT)'; \
+ b='ascii_tag'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
long_tag.log: long_tag$(EXEEXT)
- @p='long_tag$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='long_tag$(EXEEXT)'; \
+ b='long_tag'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
short_tag.log: short_tag$(EXEEXT)
- @p='short_tag$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='short_tag$(EXEEXT)'; \
+ b='short_tag'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
strip_rw.log: strip_rw$(EXEEXT)
- @p='strip_rw$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='strip_rw$(EXEEXT)'; \
+ b='strip_rw'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
rewrite.log: rewrite$(EXEEXT)
- @p='rewrite$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
-bmp2tiff_palette.sh.log: bmp2tiff_palette.sh
- @p='bmp2tiff_palette.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
-bmp2tiff_rgb.sh.log: bmp2tiff_rgb.sh
- @p='bmp2tiff_rgb.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
-gif2tiff.sh.log: gif2tiff.sh
- @p='gif2tiff.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='rewrite$(EXEEXT)'; \
+ b='rewrite'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+custom_dir.log: custom_dir$(EXEEXT)
+ @p='custom_dir$(EXEEXT)'; \
+ b='custom_dir'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+raw_decode.log: raw_decode$(EXEEXT)
+ @p='raw_decode$(EXEEXT)'; \
+ b='raw_decode'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
ppm2tiff_pbm.sh.log: ppm2tiff_pbm.sh
- @p='ppm2tiff_pbm.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='ppm2tiff_pbm.sh'; \
+ b='ppm2tiff_pbm.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
ppm2tiff_pgm.sh.log: ppm2tiff_pgm.sh
- @p='ppm2tiff_pgm.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='ppm2tiff_pgm.sh'; \
+ b='ppm2tiff_pgm.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
ppm2tiff_ppm.sh.log: ppm2tiff_ppm.sh
- @p='ppm2tiff_ppm.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='ppm2tiff_ppm.sh'; \
+ b='ppm2tiff_ppm.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcp-g3.sh.log: tiffcp-g3.sh
- @p='tiffcp-g3.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcp-g3.sh'; \
+ b='tiffcp-g3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcp-g3-1d.sh.log: tiffcp-g3-1d.sh
- @p='tiffcp-g3-1d.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcp-g3-1d.sh'; \
+ b='tiffcp-g3-1d.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcp-g3-1d-fill.sh.log: tiffcp-g3-1d-fill.sh
- @p='tiffcp-g3-1d-fill.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcp-g3-1d-fill.sh'; \
+ b='tiffcp-g3-1d-fill.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcp-g3-2d.sh.log: tiffcp-g3-2d.sh
- @p='tiffcp-g3-2d.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcp-g3-2d.sh'; \
+ b='tiffcp-g3-2d.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcp-g3-2d-fill.sh.log: tiffcp-g3-2d-fill.sh
- @p='tiffcp-g3-2d-fill.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcp-g3-2d-fill.sh'; \
+ b='tiffcp-g3-2d-fill.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcp-g4.sh.log: tiffcp-g4.sh
- @p='tiffcp-g4.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcp-g4.sh'; \
+ b='tiffcp-g4.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcp-logluv.sh.log: tiffcp-logluv.sh
- @p='tiffcp-logluv.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcp-logluv.sh'; \
+ b='tiffcp-logluv.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcp-thumbnail.sh.log: tiffcp-thumbnail.sh
- @p='tiffcp-thumbnail.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcp-thumbnail.sh'; \
+ b='tiffcp-thumbnail.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffdump.sh.log: tiffdump.sh
- @p='tiffdump.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffdump.sh'; \
+ b='tiffdump.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffinfo.sh.log: tiffinfo.sh
- @p='tiffinfo.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffinfo.sh'; \
+ b='tiffinfo.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcp-split.sh.log: tiffcp-split.sh
- @p='tiffcp-split.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcp-split.sh'; \
+ b='tiffcp-split.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcp-split-join.sh.log: tiffcp-split-join.sh
- @p='tiffcp-split-join.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcp-split-join.sh'; \
+ b='tiffcp-split-join.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiff2ps-PS1.sh.log: tiff2ps-PS1.sh
- @p='tiff2ps-PS1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiff2ps-PS1.sh'; \
+ b='tiff2ps-PS1.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiff2ps-PS2.sh.log: tiff2ps-PS2.sh
- @p='tiff2ps-PS2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiff2ps-PS2.sh'; \
+ b='tiff2ps-PS2.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiff2ps-PS3.sh.log: tiff2ps-PS3.sh
- @p='tiff2ps-PS3.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiff2ps-PS3.sh'; \
+ b='tiff2ps-PS3.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiff2ps-EPS1.sh.log: tiff2ps-EPS1.sh
- @p='tiff2ps-EPS1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiff2ps-EPS1.sh'; \
+ b='tiff2ps-EPS1.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiff2pdf.sh.log: tiff2pdf.sh
- @p='tiff2pdf.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiff2pdf.sh'; \
+ b='tiff2pdf.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-doubleflip-logluv-3c-16b.sh.log: tiffcrop-doubleflip-logluv-3c-16b.sh
- @p='tiffcrop-doubleflip-logluv-3c-16b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-doubleflip-logluv-3c-16b.sh'; \
+ b='tiffcrop-doubleflip-logluv-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-doubleflip-minisblack-1c-16b.sh.log: tiffcrop-doubleflip-minisblack-1c-16b.sh
- @p='tiffcrop-doubleflip-minisblack-1c-16b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-doubleflip-minisblack-1c-16b.sh'; \
+ b='tiffcrop-doubleflip-minisblack-1c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-doubleflip-minisblack-1c-8b.sh.log: tiffcrop-doubleflip-minisblack-1c-8b.sh
- @p='tiffcrop-doubleflip-minisblack-1c-8b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-doubleflip-minisblack-1c-8b.sh'; \
+ b='tiffcrop-doubleflip-minisblack-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh.log: tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh
- @p='tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh'; \
+ b='tiffcrop-doubleflip-minisblack-2c-8b-alpha.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-doubleflip-miniswhite-1c-1b.sh.log: tiffcrop-doubleflip-miniswhite-1c-1b.sh
- @p='tiffcrop-doubleflip-miniswhite-1c-1b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-doubleflip-miniswhite-1c-1b.sh'; \
+ b='tiffcrop-doubleflip-miniswhite-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-doubleflip-palette-1c-1b.sh.log: tiffcrop-doubleflip-palette-1c-1b.sh
- @p='tiffcrop-doubleflip-palette-1c-1b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-doubleflip-palette-1c-1b.sh'; \
+ b='tiffcrop-doubleflip-palette-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-doubleflip-palette-1c-4b.sh.log: tiffcrop-doubleflip-palette-1c-4b.sh
- @p='tiffcrop-doubleflip-palette-1c-4b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-doubleflip-palette-1c-4b.sh'; \
+ b='tiffcrop-doubleflip-palette-1c-4b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-doubleflip-palette-1c-8b.sh.log: tiffcrop-doubleflip-palette-1c-8b.sh
- @p='tiffcrop-doubleflip-palette-1c-8b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-doubleflip-palette-1c-8b.sh'; \
+ b='tiffcrop-doubleflip-palette-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-doubleflip-rgb-3c-16b.sh.log: tiffcrop-doubleflip-rgb-3c-16b.sh
- @p='tiffcrop-doubleflip-rgb-3c-16b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-doubleflip-rgb-3c-16b.sh'; \
+ b='tiffcrop-doubleflip-rgb-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-doubleflip-rgb-3c-8b.sh.log: tiffcrop-doubleflip-rgb-3c-8b.sh
- @p='tiffcrop-doubleflip-rgb-3c-8b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-doubleflip-rgb-3c-8b.sh'; \
+ b='tiffcrop-doubleflip-rgb-3c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extract-logluv-3c-16b.sh.log: tiffcrop-extract-logluv-3c-16b.sh
- @p='tiffcrop-extract-logluv-3c-16b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extract-logluv-3c-16b.sh'; \
+ b='tiffcrop-extract-logluv-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extract-minisblack-1c-16b.sh.log: tiffcrop-extract-minisblack-1c-16b.sh
- @p='tiffcrop-extract-minisblack-1c-16b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extract-minisblack-1c-16b.sh'; \
+ b='tiffcrop-extract-minisblack-1c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extract-minisblack-1c-8b.sh.log: tiffcrop-extract-minisblack-1c-8b.sh
- @p='tiffcrop-extract-minisblack-1c-8b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extract-minisblack-1c-8b.sh'; \
+ b='tiffcrop-extract-minisblack-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extract-minisblack-2c-8b-alpha.sh.log: tiffcrop-extract-minisblack-2c-8b-alpha.sh
- @p='tiffcrop-extract-minisblack-2c-8b-alpha.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extract-minisblack-2c-8b-alpha.sh'; \
+ b='tiffcrop-extract-minisblack-2c-8b-alpha.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extract-miniswhite-1c-1b.sh.log: tiffcrop-extract-miniswhite-1c-1b.sh
- @p='tiffcrop-extract-miniswhite-1c-1b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extract-miniswhite-1c-1b.sh'; \
+ b='tiffcrop-extract-miniswhite-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extract-palette-1c-1b.sh.log: tiffcrop-extract-palette-1c-1b.sh
- @p='tiffcrop-extract-palette-1c-1b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extract-palette-1c-1b.sh'; \
+ b='tiffcrop-extract-palette-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extract-palette-1c-4b.sh.log: tiffcrop-extract-palette-1c-4b.sh
- @p='tiffcrop-extract-palette-1c-4b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extract-palette-1c-4b.sh'; \
+ b='tiffcrop-extract-palette-1c-4b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extract-palette-1c-8b.sh.log: tiffcrop-extract-palette-1c-8b.sh
- @p='tiffcrop-extract-palette-1c-8b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extract-palette-1c-8b.sh'; \
+ b='tiffcrop-extract-palette-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extract-rgb-3c-16b.sh.log: tiffcrop-extract-rgb-3c-16b.sh
- @p='tiffcrop-extract-rgb-3c-16b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extract-rgb-3c-16b.sh'; \
+ b='tiffcrop-extract-rgb-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extract-rgb-3c-8b.sh.log: tiffcrop-extract-rgb-3c-8b.sh
- @p='tiffcrop-extract-rgb-3c-8b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extract-rgb-3c-8b.sh'; \
+ b='tiffcrop-extract-rgb-3c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extractz14-logluv-3c-16b.sh.log: tiffcrop-extractz14-logluv-3c-16b.sh
- @p='tiffcrop-extractz14-logluv-3c-16b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extractz14-logluv-3c-16b.sh'; \
+ b='tiffcrop-extractz14-logluv-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extractz14-minisblack-1c-16b.sh.log: tiffcrop-extractz14-minisblack-1c-16b.sh
- @p='tiffcrop-extractz14-minisblack-1c-16b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extractz14-minisblack-1c-16b.sh'; \
+ b='tiffcrop-extractz14-minisblack-1c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extractz14-minisblack-1c-8b.sh.log: tiffcrop-extractz14-minisblack-1c-8b.sh
- @p='tiffcrop-extractz14-minisblack-1c-8b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extractz14-minisblack-1c-8b.sh'; \
+ b='tiffcrop-extractz14-minisblack-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extractz14-minisblack-2c-8b-alpha.sh.log: tiffcrop-extractz14-minisblack-2c-8b-alpha.sh
- @p='tiffcrop-extractz14-minisblack-2c-8b-alpha.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extractz14-minisblack-2c-8b-alpha.sh'; \
+ b='tiffcrop-extractz14-minisblack-2c-8b-alpha.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extractz14-miniswhite-1c-1b.sh.log: tiffcrop-extractz14-miniswhite-1c-1b.sh
- @p='tiffcrop-extractz14-miniswhite-1c-1b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extractz14-miniswhite-1c-1b.sh'; \
+ b='tiffcrop-extractz14-miniswhite-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extractz14-palette-1c-1b.sh.log: tiffcrop-extractz14-palette-1c-1b.sh
- @p='tiffcrop-extractz14-palette-1c-1b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extractz14-palette-1c-1b.sh'; \
+ b='tiffcrop-extractz14-palette-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extractz14-palette-1c-4b.sh.log: tiffcrop-extractz14-palette-1c-4b.sh
- @p='tiffcrop-extractz14-palette-1c-4b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extractz14-palette-1c-4b.sh'; \
+ b='tiffcrop-extractz14-palette-1c-4b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extractz14-palette-1c-8b.sh.log: tiffcrop-extractz14-palette-1c-8b.sh
- @p='tiffcrop-extractz14-palette-1c-8b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extractz14-palette-1c-8b.sh'; \
+ b='tiffcrop-extractz14-palette-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extractz14-rgb-3c-16b.sh.log: tiffcrop-extractz14-rgb-3c-16b.sh
- @p='tiffcrop-extractz14-rgb-3c-16b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extractz14-rgb-3c-16b.sh'; \
+ b='tiffcrop-extractz14-rgb-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-extractz14-rgb-3c-8b.sh.log: tiffcrop-extractz14-rgb-3c-8b.sh
- @p='tiffcrop-extractz14-rgb-3c-8b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-extractz14-rgb-3c-8b.sh'; \
+ b='tiffcrop-extractz14-rgb-3c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-R90-logluv-3c-16b.sh.log: tiffcrop-R90-logluv-3c-16b.sh
- @p='tiffcrop-R90-logluv-3c-16b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-R90-logluv-3c-16b.sh'; \
+ b='tiffcrop-R90-logluv-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-R90-minisblack-1c-16b.sh.log: tiffcrop-R90-minisblack-1c-16b.sh
- @p='tiffcrop-R90-minisblack-1c-16b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-R90-minisblack-1c-16b.sh'; \
+ b='tiffcrop-R90-minisblack-1c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-R90-minisblack-1c-8b.sh.log: tiffcrop-R90-minisblack-1c-8b.sh
- @p='tiffcrop-R90-minisblack-1c-8b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-R90-minisblack-1c-8b.sh'; \
+ b='tiffcrop-R90-minisblack-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-R90-minisblack-2c-8b-alpha.sh.log: tiffcrop-R90-minisblack-2c-8b-alpha.sh
- @p='tiffcrop-R90-minisblack-2c-8b-alpha.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-R90-minisblack-2c-8b-alpha.sh'; \
+ b='tiffcrop-R90-minisblack-2c-8b-alpha.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-R90-miniswhite-1c-1b.sh.log: tiffcrop-R90-miniswhite-1c-1b.sh
- @p='tiffcrop-R90-miniswhite-1c-1b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-R90-miniswhite-1c-1b.sh'; \
+ b='tiffcrop-R90-miniswhite-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-R90-palette-1c-1b.sh.log: tiffcrop-R90-palette-1c-1b.sh
- @p='tiffcrop-R90-palette-1c-1b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-R90-palette-1c-1b.sh'; \
+ b='tiffcrop-R90-palette-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-R90-palette-1c-4b.sh.log: tiffcrop-R90-palette-1c-4b.sh
- @p='tiffcrop-R90-palette-1c-4b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-R90-palette-1c-4b.sh'; \
+ b='tiffcrop-R90-palette-1c-4b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-R90-palette-1c-8b.sh.log: tiffcrop-R90-palette-1c-8b.sh
- @p='tiffcrop-R90-palette-1c-8b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-R90-palette-1c-8b.sh'; \
+ b='tiffcrop-R90-palette-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-R90-rgb-3c-16b.sh.log: tiffcrop-R90-rgb-3c-16b.sh
- @p='tiffcrop-R90-rgb-3c-16b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-R90-rgb-3c-16b.sh'; \
+ b='tiffcrop-R90-rgb-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiffcrop-R90-rgb-3c-8b.sh.log: tiffcrop-R90-rgb-3c-8b.sh
- @p='tiffcrop-R90-rgb-3c-8b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiffcrop-R90-rgb-3c-8b.sh'; \
+ b='tiffcrop-R90-rgb-3c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiff2rgba-logluv-3c-16b.sh.log: tiff2rgba-logluv-3c-16b.sh
- @p='tiff2rgba-logluv-3c-16b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiff2rgba-logluv-3c-16b.sh'; \
+ b='tiff2rgba-logluv-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiff2rgba-minisblack-1c-16b.sh.log: tiff2rgba-minisblack-1c-16b.sh
- @p='tiff2rgba-minisblack-1c-16b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiff2rgba-minisblack-1c-16b.sh'; \
+ b='tiff2rgba-minisblack-1c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiff2rgba-minisblack-1c-8b.sh.log: tiff2rgba-minisblack-1c-8b.sh
- @p='tiff2rgba-minisblack-1c-8b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiff2rgba-minisblack-1c-8b.sh'; \
+ b='tiff2rgba-minisblack-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiff2rgba-minisblack-2c-8b-alpha.sh.log: tiff2rgba-minisblack-2c-8b-alpha.sh
- @p='tiff2rgba-minisblack-2c-8b-alpha.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiff2rgba-minisblack-2c-8b-alpha.sh'; \
+ b='tiff2rgba-minisblack-2c-8b-alpha.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiff2rgba-miniswhite-1c-1b.sh.log: tiff2rgba-miniswhite-1c-1b.sh
- @p='tiff2rgba-miniswhite-1c-1b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiff2rgba-miniswhite-1c-1b.sh'; \
+ b='tiff2rgba-miniswhite-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiff2rgba-palette-1c-1b.sh.log: tiff2rgba-palette-1c-1b.sh
- @p='tiff2rgba-palette-1c-1b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiff2rgba-palette-1c-1b.sh'; \
+ b='tiff2rgba-palette-1c-1b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiff2rgba-palette-1c-4b.sh.log: tiff2rgba-palette-1c-4b.sh
- @p='tiff2rgba-palette-1c-4b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiff2rgba-palette-1c-4b.sh'; \
+ b='tiff2rgba-palette-1c-4b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiff2rgba-palette-1c-8b.sh.log: tiff2rgba-palette-1c-8b.sh
- @p='tiff2rgba-palette-1c-8b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiff2rgba-palette-1c-8b.sh'; \
+ b='tiff2rgba-palette-1c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiff2rgba-rgb-3c-16b.sh.log: tiff2rgba-rgb-3c-16b.sh
- @p='tiff2rgba-rgb-3c-16b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiff2rgba-rgb-3c-16b.sh'; \
+ b='tiff2rgba-rgb-3c-16b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
tiff2rgba-rgb-3c-8b.sh.log: tiff2rgba-rgb-3c-8b.sh
- @p='tiff2rgba-rgb-3c-8b.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='tiff2rgba-rgb-3c-8b.sh'; \
+ b='tiff2rgba-rgb-3c-8b.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
+tiff2rgba-quad-tile.jpg.sh.log: tiff2rgba-quad-tile.jpg.sh
+ @p='tiff2rgba-quad-tile.jpg.sh'; \
+ b='tiff2rgba-quad-tile.jpg.sh'; \
+ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
.test.log:
- @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
+ @p='$<'; \
+ $(am__set_b); \
+ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+ --log-file $$b.log --trs-file $$b.trs \
+ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+ "$$tst" $(AM_TESTS_FD_REDIRECT)
@am__EXEEXT_TRUE@.test$(EXEEXT).log:
-@am__EXEEXT_TRUE@ @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
+@am__EXEEXT_TRUE@ @p='$<'; \
+@am__EXEEXT_TRUE@ $(am__set_b); \
+@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \
+@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \
+@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \
+@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT)
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -1049,7 +1702,7 @@ install-strip:
fi
mostlyclean-generic:
-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
- -test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
+ -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs)
-test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
clean-generic:
@@ -1120,8 +1773,8 @@ maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
-mostlyclean-am: am--mostlyclean-test-html mostlyclean-compile \
- mostlyclean-generic mostlyclean-libtool
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
pdf: pdf-am
@@ -1133,26 +1786,41 @@ ps-am:
uninstall-am:
-.MAKE: check-am check-html install-am install-strip recheck-html
-
-.PHONY: CTAGS GTAGS all all-am am--mostlyclean-test-html check \
- check-TESTS check-am check-html clean clean-checkPROGRAMS \
- clean-generic clean-libtool ctags distclean distclean-compile \
- distclean-generic distclean-libtool distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-man install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- installcheck installcheck-am installdirs maintainer-clean \
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \
+ clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \
+ ctags ctags-am distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- recheck recheck-html tags uninstall uninstall-am
+ recheck tags tags-am uninstall uninstall-am
+
+.PRECIOUS: Makefile
-# memcheck: valgrind's memory access checker
+# memcheck: valgrind's memory access checker.
+#
+# The suppressions which come with valgrind are sometimes insufficient
+# to handle certain system library aspects which may be reported and
+# which are unrelated to libtiff. When first starting with a new
+# system (or after a major system update), it is good to execute the
+# test suite (known to already be passing!) like 'make memcheck
+# VALGRIND_EXTRA_OPTS=--gen-suppressions=all' to create valgrind
+# suppression entries in the test log. Make sure that none of the
+# suppressions are due to libtiff itself. Tell valgrind about the
+# suppressions by creating a .valgrindrc file with content like:
+# --memcheck:suppressions=mysupp.supp
memcheck:
- $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes --track-origins=yes --num-callers=12 --quiet $(VALGRIND_EXTRA_OPTS)' check
+ $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full --read-var-info=yes \
+ --error-exitcode=2 --track-origins=yes --num-callers=12 \
+ --quiet $(VALGRIND_EXTRA_OPTS)' check
# ptrcheck: valgrind's experimental pointer checking tool.
ptrcheck:
diff --git a/tiff/test/TiffSplitTest.cmake b/tiff/test/TiffSplitTest.cmake
new file mode 100644
index 000000000..cf31f4426
--- /dev/null
+++ b/tiff/test/TiffSplitTest.cmake
@@ -0,0 +1,34 @@
+# CMake tests for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+include(${CMAKE_CURRENT_LIST_DIR}/TiffTestCommon.cmake)
+
+string(REPLACE "^" ";" TESTFILES "${TESTFILES}")
+
+test_convert_multi("${TIFFCP}" "${TESTFILES}" "${CONJOINED}")
+test_convert("${TIFFSPLIT}" "${CONJOINED}" "${SPLITFILE}")
+if (RECONJOINED)
+ file(GLOB SPLITFILES "${SPLITFILE}*")
+ test_convert_multi("${TIFFCP}" "${SPLITFILES}" "${RECONJOINED}")
+endif()
diff --git a/tiff/test/TiffTest.cmake b/tiff/test/TiffTest.cmake
new file mode 100644
index 000000000..c1cf4d05b
--- /dev/null
+++ b/tiff/test/TiffTest.cmake
@@ -0,0 +1,63 @@
+# CMake tests for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+include(${CMAKE_CURRENT_LIST_DIR}/TiffTestCommon.cmake)
+
+string(REPLACE "^" ";" CONVERT_COMMAND1 "${CONVERT_COMMAND1}")
+string(REPLACE "^" ";" CONVERT_COMMAND2 "${CONVERT_COMMAND2}")
+string(REPLACE "^" ";" CONVERT_COMMAND3 "${CONVERT_COMMAND3}")
+string(REPLACE "^" ";" STDOUT_COMMAND "${STDOUT_COMMAND}")
+string(REPLACE "^" ";" READER_COMMAND "${READER_COMMAND}")
+
+if(CONVERT_COMMAND1)
+ test_convert("${CONVERT_COMMAND1}" "${INFILE}" "${OUTFILE}")
+ if(VALIDATE)
+ tiffinfo_validate("${OUTFILE}")
+ endif()
+endif()
+
+get_filename_component(base "${OUTFILE}" NAME)
+get_filename_component(ext "${OUTFILE}" EXT)
+
+if(CONVERT_COMMAND2)
+ test_convert("${CONVERT_COMMAND2}" "${OUTFILE}" "${base}-2${ext}")
+ if(VALIDATE)
+ tiffinfo_validate("${base}-2${ext}")
+ endif()
+endif()
+
+if(CONVERT_COMMAND3)
+ test_convert("${CONVERT_COMMAND3}" "${base}-2${ext}" "${base}-3${ext}")
+ if(VALIDATE)
+ tiffinfo_validate("${base}-3${ext}")
+ endif()
+endif()
+
+if(STDOUT_COMMAND)
+ test_stdout("${STDOUT_COMMAND}" "${INFILE}" "${OUTFILE}")
+endif()
+
+if(READER_COMMAND)
+ test_reader("${READER_COMMAND}" "${INFILE}")
+endif()
diff --git a/tiff/test/TiffTestCommon.cmake b/tiff/test/TiffTestCommon.cmake
new file mode 100644
index 000000000..50a4c34a4
--- /dev/null
+++ b/tiff/test/TiffTestCommon.cmake
@@ -0,0 +1,103 @@
+# CMake tests for libtiff (common functionality)
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+#
+# Test a simple convert-like command.
+#
+# test_convert command infile outfile
+macro(test_convert command infile outfile)
+ file(TO_NATIVE_PATH "${infile}" native_infile)
+ file(TO_NATIVE_PATH "${outfile}" native_outfile)
+ file(REMOVE "${outfile}")
+ message(STATUS Running "${MEMCHECK} ${command} ${native_infile} ${native_outfile}")
+ execute_process(COMMAND ${MEMCHECK} ${command} "${native_infile}" "${native_outfile}"
+ RESULT_VARIABLE TEST_STATUS)
+ if(TEST_STATUS)
+ message(FATAL_ERROR "Returned failed status ${TEST_STATUS}! Output (if any) is in \"${native_outfile}\"")
+ endif()
+endmacro()
+
+#
+# Test a simple convert-like command.
+#
+# test_convert command infile outfile
+macro(test_convert_multi command infile outfile)
+ foreach(file ${infile})
+ file(TO_NATIVE_PATH "${file}" native_file)
+ list(APPEND native_infile "${native_file}")
+ endforeach()
+ file(TO_NATIVE_PATH "${outfile}" native_outfile)
+ file(REMOVE "${outfile}")
+ message(STATUS Running "${MEMCHECK} ${command} ${native_infile} ${native_outfile}")
+ execute_process(COMMAND ${MEMCHECK} ${command} ${native_infile} "${native_outfile}"
+ RESULT_VARIABLE TEST_STATUS)
+ if(TEST_STATUS)
+ message(FATAL_ERROR "Returned failed status ${TEST_STATUS}! Output (if any) is in \"${native_outfile}\"")
+ endif()
+endmacro()
+#
+# Test a simple command which sends output to stdout
+#
+# test_stdout command infile outfile
+macro(test_stdout command infile outfile)
+ file(TO_NATIVE_PATH "${infile}" native_infile)
+ file(TO_NATIVE_PATH "${outfile}" native_outfile)
+ file(REMOVE "${outfile}")
+ message(STATUS "Running ${MEMCHECK} ${command} ${native_infile} > ${native_outfile}")
+ execute_process(COMMAND ${MEMCHECK} ${command} "${native_infile}"
+ OUTPUT_FILE "${outfile}"
+ RESULT_VARIABLE TEST_STATUS)
+ if(TEST_STATUS)
+ message(FATAL_ERROR "Returned failed status ${TEST_STATUS}! Output (if any) is in \"${native_outfile}")
+ endif()
+endmacro()
+
+#
+# Execute a simple command (e.g. tiffinfo) with one input file
+#
+# test_exec command infile
+macro(test_reader command infile)
+ file(TO_NATIVE_PATH "${infile}" native_infile)
+ message(STATUS "Running ${MEMCHECK} ${command} ${native_infile}")
+ execute_process(COMMAND ${MEMCHECK} ${command} "${native_infile}"
+ RESULT_VARIABLE TEST_STATUS)
+ if(TEST_STATUS)
+ message(FATAL_ERROR "Returned failed status ${TEST_STATUS}! Output (if any) is in \"${native_outfile}")
+ endif()
+endmacro()
+
+#
+# Execute tiffinfo on a specified file to validate it
+#
+# tiffinfo_validate infile
+macro(tiffinfo_validate file)
+ test_reader("${TIFFINFO};-D" "${file}")
+endmacro()
+
+# Add the directory containing libtiff to the PATH (Windows only)
+if(WIN32)
+ get_filename_component(LIBTIFF_DIR "${LIBTIFF}" DIRECTORY)
+ file(TO_NATIVE_PATH "${LIBTIFF_DIR}" LIBTIFF_DIR)
+ set(ENV{PATH} "${LIBTIFF_DIR};$ENV{PATH}")
+endif()
diff --git a/tiff/test/ascii_tag.c b/tiff/test/ascii_tag.c
index 58f02ebf1..6337900ba 100644
--- a/tiff/test/ascii_tag.c
+++ b/tiff/test/ascii_tag.c
@@ -1,4 +1,4 @@
-/* $Id: ascii_tag.c,v 1.7 2008/04/15 13:32:12 dron Exp $ */
+/* $Id: ascii_tag.c,v 1.8 2013-12-17 14:41:57 bfriesen Exp $ */
/*
* Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
@@ -129,7 +129,7 @@ main()
}
/* Write dummy pixel data. */
- if (!TIFFWriteScanline(tif, buf, 0, 0) < 0) {
+ if (TIFFWriteScanline(tif, buf, 0, 0) == -1) {
fprintf (stderr, "Can't write image data.\n");
goto failure;
}
diff --git a/tiff/test/bmp2tiff_palette.sh b/tiff/test/bmp2tiff_palette.sh
deleted file mode 100755
index 1992623e1..000000000
--- a/tiff/test/bmp2tiff_palette.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-# Generated file, master is Makefile.am
-. ${srcdir:-.}/common.sh
-infile="$IMG_PALETTE_1C_8B_BMP"
-outfile="o-bmp2tiff_palette.tiff"
-f_test_convert "$BMP2TIFF" $infile $outfile
-f_tiffinfo_validate $outfile
diff --git a/tiff/test/bmp2tiff_rgb.sh b/tiff/test/bmp2tiff_rgb.sh
deleted file mode 100755
index 2e940ce43..000000000
--- a/tiff/test/bmp2tiff_rgb.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-# Generated file, master is Makefile.am
-. ${srcdir:-.}/common.sh
-infile="$IMG_RGB_3C_8B_BMP"
-outfile="o-bmp2tiff_rgb.tiff"
-f_test_convert "$BMP2TIFF" $infile $outfile
-f_tiffinfo_validate $outfile
diff --git a/tiff/test/common.sh b/tiff/test/common.sh
index 643104b27..6f9b28202 100644
--- a/tiff/test/common.sh
+++ b/tiff/test/common.sh
@@ -9,13 +9,10 @@ TOOLS=`cd ../tools && pwd`
IMAGES="${SRCDIR}/images"
# Aliases for built tools
-BMP2TIFF=${TOOLS}/bmp2tiff
FAX2PS=${TOOLS}/fax2ps
FAX2TIFF=${TOOLS}/fax2tiff
-GIF2TIFF=${TOOLS}/gif2tiff
PAL2RGB=${TOOLS}/pal2rgb
PPM2TIFF=${TOOLS}/ppm2tiff
-RAS2TIFF=${TOOLS}/ras2tiff
RAW2TIFF=${TOOLS}/raw2tiff
RGB2YCBCR=${TOOLS}/rgb2ycbcr
THUMBNAIL=${TOOLS}/thumbnail
@@ -44,11 +41,6 @@ IMG_RGB_3C_16B=${IMAGES}/rgb-3c-16b.tiff
IMG_RGB_3C_8B=${IMAGES}/rgb-3c-8b.tiff
IMG_MINISBLACK_2C_8B_ALPHA=${IMAGES}/minisblack-2c-8b-alpha.tiff
-IMG_PALETTE_1C_8B_BMP=${IMAGES}/palette-1c-8b.bmp
-IMG_RGB_3C_8B_BMP=${IMAGES}/rgb-3c-8b.bmp
-
-IMG_PALETTE_1C_8B_GIF=${IMAGES}/palette-1c-8b.gif
-
IMG_MINISWHITE_1C_1B_PBM=${IMAGES}/miniswhite-1c-1b.pbm
IMG_MINISBLACK_1C_8B_PGM=${IMAGES}/minisblack-1c-8b.pgm
IMG_RGB_3C_8B_PPM=${IMAGES}/rgb-3c-8b.ppm
diff --git a/tiff/test/custom_dir.c b/tiff/test/custom_dir.c
new file mode 100644
index 000000000..acf55ce5d
--- /dev/null
+++ b/tiff/test/custom_dir.c
@@ -0,0 +1,247 @@
+/* $Id: custom_dir.c,v 1.3 2013-12-17 14:41:58 bfriesen Exp $ */
+
+/*
+ * Copyright (c) 2012, Frank Warmerdam <warmerdam@pobox.com>
+ *
+ * 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.
+ */
+
+/*
+ * TIFF Library
+ *
+ * Module to handling of custom directories like EXIF.
+ */
+
+#include "tif_config.h"
+#include <stdio.h>
+#include <string.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "tiffio.h"
+#include "tif_dir.h"
+#include "tifftest.h"
+
+static const char filename[] = "custom_dir.tif";
+
+#define SPP 3 /* Samples per pixel */
+const uint16 width = 1;
+const uint16 length = 1;
+const uint16 bps = 8;
+const uint16 photometric = PHOTOMETRIC_RGB;
+const uint16 rows_per_strip = 1;
+const uint16 planarconfig = PLANARCONFIG_CONTIG;
+
+static TIFFField
+customFields[] = {
+ { TIFFTAG_IMAGEWIDTH, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Custom1", NULL },
+ { TIFFTAG_DOTRANGE, -1, -1, TIFF_ASCII, 0, TIFF_SETGET_ASCII, TIFF_SETGET_UNDEFINED, FIELD_CUSTOM, 1, 0, "Custom2", NULL },
+};
+
+static TIFFFieldArray customFieldArray = { tfiatOther, 0, 2, customFields };
+
+int
+main()
+{
+ TIFF *tif;
+ unsigned char buf[SPP] = { 0, 127, 255 };
+ uint64 dir_offset = 0, dir_offset2 = 0;
+ uint64 read_dir_offset = 0, read_dir_offset2 = 0;
+ uint64 *dir_offset2_ptr = NULL;
+ char *ascii_value;
+ uint16 count16 = 0;
+
+
+ /* We write the main directory as a simple image. */
+ tif = TIFFOpen(filename, "w+");
+ if (!tif) {
+ fprintf (stderr, "Can't create test TIFF file %s.\n", filename);
+ return 1;
+ }
+
+ if (!TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, width)) {
+ fprintf (stderr, "Can't set ImageWidth tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_IMAGELENGTH, length)) {
+ fprintf (stderr, "Can't set ImageLength tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bps)) {
+ fprintf (stderr, "Can't set BitsPerSample tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, SPP)) {
+ fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rows_per_strip)) {
+ fprintf (stderr, "Can't set SamplesPerPixel tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_PLANARCONFIG, planarconfig)) {
+ fprintf (stderr, "Can't set PlanarConfiguration tag.\n");
+ goto failure;
+ }
+ if (!TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric)) {
+ fprintf (stderr, "Can't set PhotometricInterpretation tag.\n");
+ goto failure;
+ }
+
+ /* Write dummy pixel data. */
+ if (TIFFWriteScanline(tif, buf, 0, 0) == -1) {
+ fprintf (stderr, "Can't write image data.\n");
+ goto failure;
+ }
+
+ if (!TIFFWriteDirectory( tif )) {
+ fprintf (stderr, "TIFFWriteDirectory() failed.\n");
+ goto failure;
+ }
+
+ /*
+ * Now create an EXIF directory.
+ */
+ if (TIFFCreateEXIFDirectory(tif) != 0) {
+ fprintf (stderr, "TIFFCreateEXIFDirectory() failed.\n" );
+ goto failure;
+ }
+
+ if (!TIFFSetField( tif, EXIFTAG_SPECTRALSENSITIVITY, "EXIF Spectral Sensitivity")) {
+ fprintf (stderr, "Can't write SPECTRALSENSITIVITY\n" );
+ goto failure;
+ }
+
+ if (!TIFFWriteCustomDirectory( tif, &dir_offset )) {
+ fprintf (stderr, "TIFFWriteCustomDirectory() with EXIF failed.\n");
+ goto failure;
+ }
+
+ /*
+ * Now create a custom directory with tags that conflict with mainline
+ * TIFF tags.
+ */
+
+ TIFFFreeDirectory( tif );
+ if (TIFFCreateCustomDirectory(tif, &customFieldArray) != 0) {
+ fprintf (stderr, "TIFFCreateEXIFDirectory() failed.\n" );
+ goto failure;
+ }
+
+ if (!TIFFSetField( tif, TIFFTAG_IMAGEWIDTH, "*Custom1")) { /* not really IMAGEWIDTH */
+ fprintf (stderr, "Can't write pseudo-IMAGEWIDTH.\n" );
+ goto failure;
+ }
+
+ if (!TIFFSetField( tif, TIFFTAG_DOTRANGE, "*Custom2")) { /* not really DOTWIDTH */
+ fprintf (stderr, "Can't write pseudo-DOTWIDTH.\n" );
+ goto failure;
+ }
+
+ if (!TIFFWriteCustomDirectory( tif, &dir_offset2 )) {
+ fprintf (stderr, "TIFFWriteCustomDirectory() with EXIF failed.\n");
+ goto failure;
+ }
+
+ /*
+ * Go back to the first directory, and add the EXIFIFD pointer.
+ */
+ TIFFSetDirectory(tif, 0);
+ TIFFSetField(tif, TIFFTAG_EXIFIFD, dir_offset );
+ TIFFSetField(tif, TIFFTAG_SUBIFD, 1, &dir_offset2 );
+
+ TIFFClose(tif);
+
+ /* Ok, now test whether we can read written values in the EXIF directory. */
+ tif = TIFFOpen(filename, "r");
+
+ TIFFGetField(tif, TIFFTAG_EXIFIFD, &read_dir_offset );
+ if( read_dir_offset != dir_offset ) {
+ fprintf (stderr, "Did not get expected EXIFIFD.\n" );
+ goto failure;
+ }
+
+ TIFFGetField(tif, TIFFTAG_SUBIFD, &count16, &dir_offset2_ptr );
+ read_dir_offset2 = dir_offset2_ptr[0];
+ if( read_dir_offset2 != dir_offset2 || count16 != 1) {
+ fprintf (stderr, "Did not get expected SUBIFD.\n" );
+ goto failure;
+ }
+
+ if( !TIFFReadEXIFDirectory(tif, read_dir_offset) ) {
+ fprintf (stderr, "TIFFReadEXIFDirectory() failed.\n" );
+ goto failure;
+ }
+
+ if (!TIFFGetField( tif, EXIFTAG_SPECTRALSENSITIVITY, &ascii_value) ) {
+ fprintf (stderr, "reading SPECTRALSENSITIVITY failed.\n" );
+ goto failure;
+ }
+
+ if( strcmp(ascii_value,"EXIF Spectral Sensitivity") != 0) {
+ fprintf (stderr, "got wrong SPECTRALSENSITIVITY value.\n" );
+ goto failure;
+ }
+
+ /* Try reading the Custom directory */
+
+ if( !TIFFReadCustomDirectory(tif, read_dir_offset2, &customFieldArray) ) {
+ fprintf (stderr, "TIFFReadCustomDirectory() failed.\n" );
+ goto failure;
+ }
+
+ if (!TIFFGetField( tif, TIFFTAG_IMAGEWIDTH, &ascii_value) ) {
+ fprintf (stderr, "reading pseudo-IMAGEWIDTH failed.\n" );
+ goto failure;
+ }
+
+ if( strcmp(ascii_value,"*Custom1") != 0) {
+ fprintf (stderr, "got wrong pseudo-IMAGEWIDTH value.\n" );
+ goto failure;
+ }
+
+ if (!TIFFGetField( tif, TIFFTAG_DOTRANGE, &ascii_value) ) {
+ fprintf (stderr, "reading pseudo-DOTRANGE failed.\n" );
+ goto failure;
+ }
+
+ if( strcmp(ascii_value,"*Custom2") != 0) {
+ fprintf (stderr, "got wrong pseudo-DOTRANGE value.\n" );
+ goto failure;
+ }
+
+ TIFFClose(tif);
+
+ /* All tests passed; delete file and exit with success status. */
+ unlink(filename);
+ return 0;
+
+failure:
+ /*
+ * Something goes wrong; close file and return unsuccessful status.
+ * Do not remove the file for further manual investigation.
+ */
+ TIFFClose(tif);
+ return 1;
+}
+
+/* vim: set ts=8 sts=8 sw=8 noet: */
diff --git a/tiff/test/gif2tiff.sh b/tiff/test/gif2tiff.sh
deleted file mode 100755
index 6bf9a1241..000000000
--- a/tiff/test/gif2tiff.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-# Generated file, master is Makefile.am
-. ${srcdir:-.}/common.sh
-infile="$IMG_PALETTE_1C_8B_GIF"
-outfile="o-gif2tiff.tiff"
-f_test_convert "$GIF2TIFF" $infile $outfile
-f_tiffinfo_validate $outfile
diff --git a/tiff/test/images/palette-1c-8b.bmp b/tiff/test/images/palette-1c-8b.bmp
deleted file mode 100644
index 215f4c50d..000000000
--- a/tiff/test/images/palette-1c-8b.bmp
+++ /dev/null
Binary files differ
diff --git a/tiff/test/images/palette-1c-8b.gif b/tiff/test/images/palette-1c-8b.gif
deleted file mode 100644
index f83dfa382..000000000
--- a/tiff/test/images/palette-1c-8b.gif
+++ /dev/null
Binary files differ
diff --git a/tiff/test/images/quad-tile.jpg.tiff b/tiff/test/images/quad-tile.jpg.tiff
new file mode 100644
index 000000000..99b0bc2e7
--- /dev/null
+++ b/tiff/test/images/quad-tile.jpg.tiff
Binary files differ
diff --git a/tiff/test/images/rgb-3c-8b.bmp b/tiff/test/images/rgb-3c-8b.bmp
deleted file mode 100644
index e6a86dcbf..000000000
--- a/tiff/test/images/rgb-3c-8b.bmp
+++ /dev/null
Binary files differ
diff --git a/tiff/test/long_tag.c b/tiff/test/long_tag.c
index e20b15bb4..ab1440af8 100644
--- a/tiff/test/long_tag.c
+++ b/tiff/test/long_tag.c
@@ -1,4 +1,4 @@
-/* $Id: long_tag.c,v 1.4 2008/03/28 01:42:06 bfriesen Exp $ */
+/* $Id: long_tag.c,v 1.5 2013-12-17 14:41:58 bfriesen Exp $ */
/*
* Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
@@ -111,7 +111,7 @@ main(int argc, char **argv)
}
/* Write dummy pixel data. */
- if (!TIFFWriteScanline(tif, buf, 0, 0) < 0) {
+ if (TIFFWriteScanline(tif, buf, 0, 0) == -1) {
fprintf (stderr, "Can't write image data.\n");
goto failure;
}
diff --git a/tiff/test/raw_decode.c b/tiff/test/raw_decode.c
new file mode 100644
index 000000000..f81aa059f
--- /dev/null
+++ b/tiff/test/raw_decode.c
@@ -0,0 +1,304 @@
+/* $Id: raw_decode.c,v 1.7 2015-08-16 20:08:21 bfriesen Exp $ */
+
+/*
+ * Copyright (c) 2012, Frank Warmerdam <warmerdam@pobox.com>
+ *
+ * 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.
+ */
+
+/*
+ * TIFF Library
+ *
+ * The objective of this test suite is to test the JPEGRawDecode()
+ * interface via TIFReadEncodedTile(). This function with YCbCr subsampling
+ * is a frequent source of bugs.
+ */
+
+#include "tif_config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "tiffio.h"
+
+/*
+ Libjpeg's jmorecfg.h defines INT16 and INT32, but only if XMD_H is
+ not defined. Unfortunately, the MinGW and Borland compilers include
+ a typedef for INT32, which causes a conflict. MSVC does not include
+ a conficting typedef given the headers which are included.
+*/
+#if defined(__BORLANDC__) || defined(__MINGW32__)
+# define XMD_H 1
+#endif
+
+/*
+ The windows RPCNDR.H file defines boolean, but defines it with the
+ unsigned char size. You should compile JPEG library using appropriate
+ definitions in jconfig.h header, but many users compile library in wrong
+ way. That causes errors of the following type:
+
+ "JPEGLib: JPEG parameter struct mismatch: library thinks size is 432,
+ caller expects 464"
+
+ For such users we wil fix the problem here. See install.doc file from
+ the JPEG library distribution for details.
+*/
+
+/* Define "boolean" as unsigned char, not int, per Windows custom. */
+#if defined(__WIN32__) && !defined(__MINGW32__)
+# ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
+ typedef unsigned char boolean;
+# endif
+# define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
+#endif
+#include "jpeglib.h" /* Needed for JPEG_LIB_VERSION */
+
+static unsigned char cluster_0[] = { 0, 0, 2, 0, 138, 139 };
+static unsigned char cluster_64[] = { 0, 0, 9, 6, 134, 119 };
+static unsigned char cluster_128[] = { 44, 40, 63, 59, 230, 95 };
+
+static int check_cluster( int cluster, unsigned char *buffer, unsigned char *expected_cluster ) {
+ unsigned char *target = buffer + cluster*6;
+
+ if (memcmp(target, expected_cluster, 6) == 0) {
+ return 0;
+ }
+
+ fprintf( stderr, "Cluster %d did not match expected results.\n", cluster );
+ fprintf( stderr,
+ "Expect: %3d %3d %3d %3d\n"
+ " %3d %3d\n",
+ expected_cluster[0], expected_cluster[1],
+ expected_cluster[4], expected_cluster[5],
+ expected_cluster[2], expected_cluster[3] );
+ fprintf( stderr,
+ " Got: %3d %3d %3d %3d\n"
+ " %3d %3d\n",
+ target[0], target[1],
+ target[4], target[5],
+ target[2], target[3] );
+ return 1;
+}
+
+static int check_rgb_pixel( int pixel,
+ int min_red, int max_red,
+ int min_green, int max_green,
+ int min_blue, int max_blue,
+ unsigned char *buffer ) {
+ unsigned char *rgb = buffer + 3 * pixel;
+
+ if( rgb[0] >= min_red && rgb[0] <= max_red &&
+ rgb[1] >= min_green && rgb[1] <= max_green &&
+ rgb[2] >= min_blue && rgb[2] <= max_blue ) {
+ return 0;
+ }
+
+ fprintf( stderr, "Pixel %d did not match expected results.\n", pixel );
+ fprintf( stderr, "Got R=%d (expected %d..%d), G=%d (expected %d..%d), B=%d (expected %d..%d)\n",
+ rgb[0], min_red, max_red,
+ rgb[1], min_green, max_green,
+ rgb[2], min_blue, max_blue );
+ return 1;
+}
+
+static int check_rgba_pixel( int pixel,
+ int min_red, int max_red,
+ int min_green, int max_green,
+ int min_blue, int max_blue,
+ int min_alpha, int max_alpha,
+ uint32 *buffer ) {
+ /* RGBA images are upside down - adjust for normal ordering */
+ int adjusted_pixel = pixel % 128 + (127 - (pixel/128)) * 128;
+ uint32 rgba = buffer[adjusted_pixel];
+
+ if( TIFFGetR(rgba) >= (uint32) min_red &&
+ TIFFGetR(rgba) <= (uint32) max_red &&
+ TIFFGetG(rgba) >= (uint32) min_green &&
+ TIFFGetG(rgba) <= (uint32) max_green &&
+ TIFFGetB(rgba) >= (uint32) min_blue &&
+ TIFFGetB(rgba) <= (uint32) max_blue &&
+ TIFFGetA(rgba) >= (uint32) min_alpha &&
+ TIFFGetA(rgba) <= (uint32) max_alpha ) {
+ return 0;
+ }
+
+ fprintf( stderr, "Pixel %d did not match expected results.\n", pixel );
+ fprintf( stderr, "Got R=%d (expected %d..%d), G=%d (expected %d..%d), B=%d (expected %d..%d), A=%d (expected %d..%d)\n",
+ TIFFGetR(rgba), min_red, max_red,
+ TIFFGetG(rgba), min_green, max_green,
+ TIFFGetB(rgba), min_blue, max_blue,
+ TIFFGetA(rgba), min_alpha, max_alpha );
+ return 1;
+}
+
+int
+main(int argc, char **argv)
+{
+ TIFF *tif;
+ static const char *srcfilerel = "images/quad-tile.jpg.tiff";
+ char *srcdir = NULL;
+ char srcfile[1024];
+ unsigned short h, v;
+ int status;
+ unsigned char *buffer;
+ uint32 *rgba_buffer;
+ tsize_t sz, szout;
+ unsigned int pixel_status = 0;
+
+ (void) argc;
+ (void) argv;
+
+ if ((srcdir = getenv("srcdir")) == NULL) {
+ srcdir = ".";
+ }
+ if ((strlen(srcdir) + 1 + strlen(srcfilerel)) >= sizeof(srcfile)) {
+ fprintf( stderr, "srcdir too long %s\n", srcdir);
+ exit( 1 );
+ }
+ strcpy(srcfile,srcdir);
+ strcat(srcfile,"/");
+ strcat(srcfile,srcfilerel);
+
+ tif = TIFFOpen(srcfile,"r");
+ if ( tif == NULL ) {
+ fprintf( stderr, "Could not open %s\n", srcfile);
+ exit( 1 );
+ }
+
+ status = TIFFGetField(tif,TIFFTAG_YCBCRSUBSAMPLING, &h, &v);
+ if ( status == 0 || h != 2 || v != 2) {
+ fprintf( stderr, "Could not retrieve subsampling tag.\n" );
+ exit(1);
+ }
+
+ /*
+ * What is the appropriate size of a YCbCr encoded tile?
+ */
+ sz = TIFFTileSize(tif);
+ if( sz != 24576) {
+ fprintf(stderr, "tiles are %d bytes\n", (int)sz);
+ exit(1);
+ }
+
+ buffer = (unsigned char *) malloc(sz);
+
+ /*
+ * Read a tile in decompressed form, but still YCbCr subsampled.
+ */
+ szout = TIFFReadEncodedTile(tif,9,buffer,sz);
+ if (szout != sz) {
+ fprintf( stderr,
+ "Did not get expected result code from TIFFReadEncodedTile()(%d instead of %d)\n",
+ (int) szout, (int) sz );
+ return 1;
+ }
+
+ if( check_cluster( 0, buffer, cluster_0 )
+ || check_cluster( 64, buffer, cluster_64 )
+ || check_cluster( 128, buffer, cluster_128 ) ) {
+ exit(1);
+ }
+ free(buffer);
+
+ /*
+ * Read a tile using the built-in conversion to RGB format provided by the JPEG library.
+ */
+ TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB);
+
+ sz = TIFFTileSize(tif);
+ if( sz != 128*128*3) {
+ fprintf(stderr, "tiles are %d bytes\n", (int)sz);
+ exit(1);
+ }
+
+ buffer = (unsigned char *) malloc(sz);
+
+ szout = TIFFReadEncodedTile(tif,9,buffer,sz);
+ if (szout != sz) {
+ fprintf( stderr,
+ "Did not get expected result code from TIFFReadEncodedTile()(%d instead of %d)\n",
+ (int) szout, (int) sz );
+ return 1;
+ }
+
+ /*
+ * JPEG decoding is inherently inexact, so we can't test for exact
+ * pixel values. (Well, if we knew exactly which libjpeg version
+ * we were using, and with what settings, we could expect specific
+ * values ... but it's not worth the trouble to keep track of.)
+ * Hence, use ranges of expected values. The ranges may need to be
+ * widened over time as more versions of libjpeg appear.
+ */
+ pixel_status |= check_rgb_pixel( 0, 15, 18, 0, 0, 18, 41, buffer );
+ pixel_status |= check_rgb_pixel( 64, 0, 0, 0, 0, 0, 2, buffer );
+ pixel_status |= check_rgb_pixel( 512, 5, 6, 34, 36, 182, 196, buffer );
+
+ free( buffer );
+
+ TIFFClose(tif);
+
+ /*
+ * Reopen and test reading using the RGBA interface.
+ */
+ tif = TIFFOpen(srcfile,"r");
+
+ sz = 128 * 128 * sizeof(uint32);
+ rgba_buffer = (uint32 *) malloc(sz);
+
+ if (!TIFFReadRGBATile( tif, 1*128, 2*128, rgba_buffer )) {
+ fprintf( stderr, "TIFFReadRGBATile() returned failure code.\n" );
+ return 1;
+ }
+
+ /*
+ * Currently TIFFReadRGBATile() just uses JPEGCOLORMODE_RGB so this
+ * trivally matches the last results. Eventually we should actually
+ * accomplish it from the YCbCr subsampled buffer ourselves in which
+ * case the results may be subtly different but similar.
+ */
+ pixel_status |= check_rgba_pixel( 0, 15, 18, 0, 0, 18, 41, 255, 255,
+ rgba_buffer );
+ pixel_status |= check_rgba_pixel( 64, 0, 0, 0, 0, 0, 2, 255, 255,
+ rgba_buffer );
+ pixel_status |= check_rgba_pixel( 512, 5, 6, 34, 36, 182, 196, 255, 255,
+ rgba_buffer );
+
+ free( rgba_buffer );
+ TIFFClose(tif);
+
+ if (pixel_status) {
+ exit(1);
+ }
+
+ exit( 0 );
+}
+
+/* vim: set ts=8 sts=8 sw=8 noet: */
+/*
+ * Local Variables:
+ * mode: c
+ * c-basic-offset: 8
+ * fill-column: 78
+ * End:
+ */
diff --git a/tiff/test/rewrite_tag.c b/tiff/test/rewrite_tag.c
index 5b8d9cb7e..5db3e4ba7 100644
--- a/tiff/test/rewrite_tag.c
+++ b/tiff/test/rewrite_tag.c
@@ -1,4 +1,4 @@
-/* $Id: rewrite_tag.c,v 1.4 2008-12-31 03:06:27 bfriesen Exp $ */
+/* $Id: rewrite_tag.c,v 1.9 2015-08-23 14:23:00 bfriesen Exp $ */
/*
* Copyright (c) 2007, Frank Warmerdam <warmerdam@pobox.com>
@@ -122,7 +122,7 @@ int test_packbits()
TIFFClose(tif);
- /* unlink(filename); */
+ unlink(filename);
return 0;
@@ -191,7 +191,7 @@ int rewrite_test( const char *filename, int length, int bigtiff,
for (i = 0; i < length; i++ )
{
- if( !TIFFWriteScanline( tif, buf, i, 0 ) )
+ if( TIFFWriteScanline( tif, buf, i, 0 ) == -1 )
{
fprintf (stderr, "Can't write image data.\n");
goto failure;
@@ -320,10 +320,8 @@ int rewrite_test( const char *filename, int length, int bigtiff,
/* main() */
/************************************************************************/
int
-main(int argc, char **argv)
+main(void)
{
- (void) argc;
- (void) argv;
int failure = 0;
failure |= test_packbits();
diff --git a/tiff/test/short_tag.c b/tiff/test/short_tag.c
index 7d5a07cca..efc7da5b2 100644
--- a/tiff/test/short_tag.c
+++ b/tiff/test/short_tag.c
@@ -1,4 +1,4 @@
-/* $Id: short_tag.c,v 1.8 2008/04/15 14:20:30 dron Exp $ */
+/* $Id: short_tag.c,v 1.9 2013-12-17 14:41:58 bfriesen Exp $ */
/*
* Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
@@ -140,7 +140,7 @@ main()
}
/* Write dummy pixel data. */
- if (!TIFFWriteScanline(tif, buf, 0, 0) < 0) {
+ if (TIFFWriteScanline(tif, buf, 0, 0) == -1) {
fprintf (stderr, "Can't write image data.\n");
goto failure;
}
diff --git a/tiff/test/strip.c b/tiff/test/strip.c
index 447cb49f8..59422262a 100644
--- a/tiff/test/strip.c
+++ b/tiff/test/strip.c
@@ -1,4 +1,4 @@
-/* $Id: strip.c,v 1.4 2008/03/28 01:42:06 bfriesen Exp $ */
+/* $Id: strip.c,v 1.5 2013-12-17 14:41:58 bfriesen Exp $ */
/*
* Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
@@ -277,7 +277,7 @@ write_scanlines(TIFF *tif, const tdata_t array, const tsize_t size)
}
for (offset = 0, row = 0; row < length; offset+=scanlinesize, row++) {
- if (TIFFWriteScanline(tif, (char *)array + offset, row, 0) < 0) {
+ if (TIFFWriteScanline(tif, (char *)array + offset, row, 0) == -1) {
fprintf (stderr,
"Can't write image data at row %lu.\n", (long) row);
return -1;
diff --git a/tiff/test/tiff2rgba-quad-tile.jpg.sh b/tiff/test/tiff2rgba-quad-tile.jpg.sh
new file mode 100755
index 000000000..e921b9730
--- /dev/null
+++ b/tiff/test/tiff2rgba-quad-tile.jpg.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Generated file, master is Makefile.am
+. ${srcdir:-.}/common.sh
+infile="$srcdir/images/quad-tile.jpg.tiff"
+outfile="o-tiff2rgba-quad-tile.jpg.tiff"
+f_test_convert "$TIFF2RGBA" $infile $outfile
+f_tiffinfo_validate $outfile
diff --git a/tiff/tools/CMakeLists.txt b/tiff/tools/CMakeLists.txt
new file mode 100644
index 000000000..331f83c05
--- /dev/null
+++ b/tiff/tools/CMakeLists.txt
@@ -0,0 +1,125 @@
+# CMake build for libtiff
+#
+# Copyright © 2015 Open Microscopy Environment / University of Dundee
+# Written by Roger Leigh <rleigh@codelibre.net>
+#
+# 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.
+
+extra_dist(Makefile.vc)
+
+include_directories(${PROJECT_SOURCE_DIR}/libtiff
+ ${PROJECT_BINARY_DIR}/libtiff
+ ${PROJECT_SOURCE_DIR}/port
+ ${CMAKE_CURRENT_BINARY_DIR})
+
+add_executable(fax2ps fax2ps.c)
+target_link_libraries(fax2ps tiff port)
+
+add_executable(fax2tiff fax2tiff.c)
+target_link_libraries(fax2tiff tiff port)
+
+add_executable(pal2rgb pal2rgb.c)
+target_link_libraries(pal2rgb tiff port)
+
+add_executable(ppm2tiff ppm2tiff.c)
+target_link_libraries(ppm2tiff tiff port)
+
+add_executable(raw2tiff raw2tiff.c)
+target_link_libraries(raw2tiff tiff port)
+
+add_executable(rgb2ycbcr rgb2ycbcr.c)
+target_link_libraries(rgb2ycbcr tiff port)
+
+add_executable(thumbnail thumbnail.c)
+target_link_libraries(thumbnail tiff port)
+
+add_executable(tiff2bw tiff2bw.c)
+target_link_libraries(tiff2bw tiff port)
+
+add_executable(tiff2pdf tiff2pdf.c)
+target_link_libraries(tiff2pdf tiff port)
+
+add_executable(tiff2ps tiff2ps.c)
+target_link_libraries(tiff2ps tiff port)
+
+add_executable(tiff2rgba tiff2rgba.c)
+target_link_libraries(tiff2rgba tiff port)
+
+add_executable(tiffcmp tiffcmp.c)
+target_link_libraries(tiffcmp tiff port)
+
+add_executable(tiffcp tiffcp.c)
+target_link_libraries(tiffcp tiff port)
+
+add_executable(tiffcrop tiffcrop.c)
+target_link_libraries(tiffcrop tiff port)
+
+add_executable(tiffdither tiffdither.c)
+target_link_libraries(tiffdither tiff port)
+
+add_executable(tiffdump tiffdump.c)
+target_link_libraries(tiffdump tiff port)
+
+add_executable(tiffinfo tiffinfo.c)
+target_link_libraries(tiffinfo tiff port)
+
+add_executable(tiffmedian tiffmedian.c)
+target_link_libraries(tiffmedian tiff port)
+
+add_executable(tiffset tiffset.c)
+target_link_libraries(tiffset tiff port)
+
+add_executable(tiffsplit tiffsplit.c)
+target_link_libraries(tiffsplit tiff port)
+
+install(TARGETS fax2ps
+ fax2tiff
+ pal2rgb
+ ppm2tiff
+ raw2tiff
+ tiff2bw
+ tiff2pdf
+ tiff2ps
+ tiff2rgba
+ tiffcmp
+ tiffcp
+ tiffcrop
+ tiffdither
+ tiffdump
+ tiffinfo
+ tiffmedian
+ tiffset
+ tiffsplit
+ RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}")
+
+if(HAVE_OPENGL)
+ if(OPENGL_INCLUDE_DIR)
+ include_directories(${OPENGL_INCLUDE_DIR})
+ endif()
+ if(GLUT_INCLUDE_DIR)
+ include_directories(${GLUT_INCLUDE_DIR})
+ endif()
+
+ add_executable(tiffgt tiffgt.c)
+ target_link_libraries(tiffgt tiff ${GLUT_LIBRARIES} ${OPENGL_LIBRARIES})
+
+ install(TARGETS tiffgt
+ RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}")
+endif()
diff --git a/tiff/tools/Makefile.am b/tiff/tools/Makefile.am
index c2b735c44..3054bee3f 100644
--- a/tiff/tools/Makefile.am
+++ b/tiff/tools/Makefile.am
@@ -26,19 +26,16 @@
LIBPORT = $(top_builddir)/port/libport.la
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
-EXTRA_DIST = Makefile.vc
+EXTRA_DIST = \
+ CMakeLists.txt \
+ Makefile.vc
bin_PROGRAMS = \
- bmp2tiff \
fax2ps \
fax2tiff \
- gif2tiff \
pal2rgb \
ppm2tiff \
- ras2tiff \
raw2tiff \
- rgb2ycbcr \
- thumbnail \
tiff2bw \
tiff2pdf \
tiff2ps \
@@ -56,33 +53,29 @@ if HAVE_OPENGL
bin_PROGRAMS += tiffgt
endif
-EXTRA_PROGRAMS = sgi2tiff sgisv ycbcr
+EXTRA_PROGRAMS = rgb2ycbcr thumbnail
+
+# Executable programs which need to be built in order to support tests
+check_PROGRAMS = \
+ rgb2ycbcr \
+ thumbnail
if HAVE_RPATH
AM_LDFLAGS = $(LIBDIR)
endif
-bmp2tiff_SOURCES = bmp2tiff.c
-bmp2tiff_LDADD = $(LIBTIFF) $(LIBPORT)
-
fax2ps_SOURCES = fax2ps.c
fax2ps_LDADD = $(LIBTIFF) $(LIBPORT)
fax2tiff_SOURCES = fax2tiff.c
fax2tiff_LDADD = $(LIBTIFF) $(LIBPORT)
-gif2tiff_SOURCES = gif2tiff.c
-gif2tiff_LDADD = $(LIBTIFF) $(LIBPORT)
-
pal2rgb_SOURCES = pal2rgb.c
pal2rgb_LDADD = $(LIBTIFF) $(LIBPORT)
ppm2tiff_SOURCES = ppm2tiff.c
ppm2tiff_LDADD = $(LIBTIFF) $(LIBPORT)
-ras2tiff_SOURCES = ras2tiff.c rasterfile.h
-ras2tiff_LDADD = $(LIBTIFF) $(LIBPORT)
-
raw2tiff_SOURCES = raw2tiff.c
raw2tiff_LDADD = $(LIBTIFF) $(LIBPORT)
@@ -135,7 +128,7 @@ tiffgt_SOURCES = tiffgt.c
tiffgt_CFLAGS = $(CFLAGS) $(GLUT_CFLAGS) $(AM_CFLAGS)
tiffgt_LDADD = $(LIBTIFF) $(LIBPORT) $(X_LIBS) $(GLUT_LIBS)
-INCLUDES = -I$(top_srcdir)/libtiff
+AM_CPPFLAGS = -I$(top_srcdir)/libtiff
echo:
(echo $(CFLAGS))
diff --git a/tiff/tools/Makefile.in b/tiff/tools/Makefile.in
index b6ada8b0a..d7d560409 100644
--- a/tiff/tools/Makefile.in
+++ b/tiff/tools/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.15 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -41,6 +40,61 @@
# Process this file with automake to produce Makefile.in.
VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
@@ -59,18 +113,17 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-bin_PROGRAMS = bmp2tiff$(EXEEXT) fax2ps$(EXEEXT) fax2tiff$(EXEEXT) \
- gif2tiff$(EXEEXT) pal2rgb$(EXEEXT) ppm2tiff$(EXEEXT) \
- ras2tiff$(EXEEXT) raw2tiff$(EXEEXT) rgb2ycbcr$(EXEEXT) \
- thumbnail$(EXEEXT) tiff2bw$(EXEEXT) tiff2pdf$(EXEEXT) \
- tiff2ps$(EXEEXT) tiff2rgba$(EXEEXT) tiffcmp$(EXEEXT) \
- tiffcp$(EXEEXT) tiffcrop$(EXEEXT) tiffdither$(EXEEXT) \
- tiffdump$(EXEEXT) tiffinfo$(EXEEXT) tiffmedian$(EXEEXT) \
- tiffset$(EXEEXT) tiffsplit$(EXEEXT) $(am__EXEEXT_1)
+bin_PROGRAMS = fax2ps$(EXEEXT) fax2tiff$(EXEEXT) pal2rgb$(EXEEXT) \
+ ppm2tiff$(EXEEXT) raw2tiff$(EXEEXT) tiff2bw$(EXEEXT) \
+ tiff2pdf$(EXEEXT) tiff2ps$(EXEEXT) tiff2rgba$(EXEEXT) \
+ tiffcmp$(EXEEXT) tiffcp$(EXEEXT) tiffcrop$(EXEEXT) \
+ tiffdither$(EXEEXT) tiffdump$(EXEEXT) tiffinfo$(EXEEXT) \
+ tiffmedian$(EXEEXT) tiffset$(EXEEXT) tiffsplit$(EXEEXT) \
+ $(am__EXEEXT_1)
@HAVE_OPENGL_TRUE@am__append_1 = tiffgt
-EXTRA_PROGRAMS = sgi2tiff$(EXEEXT) sgisv$(EXEEXT) ycbcr$(EXEEXT)
+EXTRA_PROGRAMS = rgb2ycbcr$(EXEEXT) thumbnail$(EXEEXT)
+check_PROGRAMS = rgb2ycbcr$(EXEEXT) thumbnail$(EXEEXT)
subdir = tools
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
@@ -78,6 +131,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acinclude.m4 \
$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/libtiff/tif_config.h \
$(top_builddir)/libtiff/tiffconf.h
@@ -86,42 +140,28 @@ CONFIG_CLEAN_VPATH_FILES =
@HAVE_OPENGL_TRUE@am__EXEEXT_1 = tiffgt$(EXEEXT)
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
-am_bmp2tiff_OBJECTS = bmp2tiff.$(OBJEXT)
-bmp2tiff_OBJECTS = $(am_bmp2tiff_OBJECTS)
-bmp2tiff_DEPENDENCIES = $(LIBTIFF) $(LIBPORT)
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
am_fax2ps_OBJECTS = fax2ps.$(OBJEXT)
fax2ps_OBJECTS = $(am_fax2ps_OBJECTS)
fax2ps_DEPENDENCIES = $(LIBTIFF) $(LIBPORT)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
am_fax2tiff_OBJECTS = fax2tiff.$(OBJEXT)
fax2tiff_OBJECTS = $(am_fax2tiff_OBJECTS)
fax2tiff_DEPENDENCIES = $(LIBTIFF) $(LIBPORT)
-am_gif2tiff_OBJECTS = gif2tiff.$(OBJEXT)
-gif2tiff_OBJECTS = $(am_gif2tiff_OBJECTS)
-gif2tiff_DEPENDENCIES = $(LIBTIFF) $(LIBPORT)
am_pal2rgb_OBJECTS = pal2rgb.$(OBJEXT)
pal2rgb_OBJECTS = $(am_pal2rgb_OBJECTS)
pal2rgb_DEPENDENCIES = $(LIBTIFF) $(LIBPORT)
am_ppm2tiff_OBJECTS = ppm2tiff.$(OBJEXT)
ppm2tiff_OBJECTS = $(am_ppm2tiff_OBJECTS)
ppm2tiff_DEPENDENCIES = $(LIBTIFF) $(LIBPORT)
-am_ras2tiff_OBJECTS = ras2tiff.$(OBJEXT)
-ras2tiff_OBJECTS = $(am_ras2tiff_OBJECTS)
-ras2tiff_DEPENDENCIES = $(LIBTIFF) $(LIBPORT)
am_raw2tiff_OBJECTS = raw2tiff.$(OBJEXT)
raw2tiff_OBJECTS = $(am_raw2tiff_OBJECTS)
raw2tiff_DEPENDENCIES = $(LIBTIFF) $(LIBPORT)
am_rgb2ycbcr_OBJECTS = rgb2ycbcr.$(OBJEXT)
rgb2ycbcr_OBJECTS = $(am_rgb2ycbcr_OBJECTS)
rgb2ycbcr_DEPENDENCIES = $(LIBTIFF) $(LIBPORT)
-sgi2tiff_SOURCES = sgi2tiff.c
-sgi2tiff_OBJECTS = sgi2tiff.$(OBJEXT)
-sgi2tiff_LDADD = $(LDADD)
-sgisv_SOURCES = sgisv.c
-sgisv_OBJECTS = sgisv.$(OBJEXT)
-sgisv_LDADD = $(LDADD)
am_thumbnail_OBJECTS = thumbnail.$(OBJEXT)
thumbnail_OBJECTS = $(am_thumbnail_OBJECTS)
thumbnail_DEPENDENCIES = $(LIBTIFF) $(LIBPORT)
@@ -172,9 +212,18 @@ tiffset_DEPENDENCIES = $(LIBTIFF) $(LIBPORT)
am_tiffsplit_OBJECTS = tiffsplit.$(OBJEXT)
tiffsplit_OBJECTS = $(am_tiffsplit_OBJECTS)
tiffsplit_DEPENDENCIES = $(LIBTIFF) $(LIBPORT)
-ycbcr_SOURCES = ycbcr.c
-ycbcr_OBJECTS = ycbcr.$(OBJEXT)
-ycbcr_LDADD = $(LDADD)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libtiff
depcomp = $(SHELL) $(top_srcdir)/config/depcomp
am__depfiles_maybe = depfiles
@@ -187,40 +236,57 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
-am__v_CC_0 = @echo " CC " $@;
-AM_V_at = $(am__v_at_@AM_V@)
-am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
-am__v_at_0 = @
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
CCLD = $(CC)
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
-am__v_CCLD_0 = @echo " CCLD " $@;
-AM_V_GEN = $(am__v_GEN_@AM_V@)
-am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
-am__v_GEN_0 = @echo " GEN " $@;
-SOURCES = $(bmp2tiff_SOURCES) $(fax2ps_SOURCES) $(fax2tiff_SOURCES) \
- $(gif2tiff_SOURCES) $(pal2rgb_SOURCES) $(ppm2tiff_SOURCES) \
- $(ras2tiff_SOURCES) $(raw2tiff_SOURCES) $(rgb2ycbcr_SOURCES) \
- sgi2tiff.c sgisv.c $(thumbnail_SOURCES) $(tiff2bw_SOURCES) \
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(fax2ps_SOURCES) $(fax2tiff_SOURCES) $(pal2rgb_SOURCES) \
+ $(ppm2tiff_SOURCES) $(raw2tiff_SOURCES) $(rgb2ycbcr_SOURCES) \
+ $(thumbnail_SOURCES) $(tiff2bw_SOURCES) $(tiff2pdf_SOURCES) \
+ $(tiff2ps_SOURCES) $(tiff2rgba_SOURCES) $(tiffcmp_SOURCES) \
+ $(tiffcp_SOURCES) $(tiffcrop_SOURCES) $(tiffdither_SOURCES) \
+ $(tiffdump_SOURCES) $(tiffgt_SOURCES) $(tiffinfo_SOURCES) \
+ $(tiffmedian_SOURCES) $(tiffset_SOURCES) $(tiffsplit_SOURCES)
+DIST_SOURCES = $(fax2ps_SOURCES) $(fax2tiff_SOURCES) \
+ $(pal2rgb_SOURCES) $(ppm2tiff_SOURCES) $(raw2tiff_SOURCES) \
+ $(rgb2ycbcr_SOURCES) $(thumbnail_SOURCES) $(tiff2bw_SOURCES) \
$(tiff2pdf_SOURCES) $(tiff2ps_SOURCES) $(tiff2rgba_SOURCES) \
$(tiffcmp_SOURCES) $(tiffcp_SOURCES) $(tiffcrop_SOURCES) \
$(tiffdither_SOURCES) $(tiffdump_SOURCES) $(tiffgt_SOURCES) \
$(tiffinfo_SOURCES) $(tiffmedian_SOURCES) $(tiffset_SOURCES) \
- $(tiffsplit_SOURCES) ycbcr.c
-DIST_SOURCES = $(bmp2tiff_SOURCES) $(fax2ps_SOURCES) \
- $(fax2tiff_SOURCES) $(gif2tiff_SOURCES) $(pal2rgb_SOURCES) \
- $(ppm2tiff_SOURCES) $(ras2tiff_SOURCES) $(raw2tiff_SOURCES) \
- $(rgb2ycbcr_SOURCES) sgi2tiff.c sgisv.c $(thumbnail_SOURCES) \
- $(tiff2bw_SOURCES) $(tiff2pdf_SOURCES) $(tiff2ps_SOURCES) \
- $(tiff2rgba_SOURCES) $(tiffcmp_SOURCES) $(tiffcp_SOURCES) \
- $(tiffcrop_SOURCES) $(tiffdither_SOURCES) $(tiffdump_SOURCES) \
- $(tiffgt_SOURCES) $(tiffinfo_SOURCES) $(tiffmedian_SOURCES) \
- $(tiffset_SOURCES) $(tiffsplit_SOURCES) ycbcr.c
+ $(tiffsplit_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
ETAGS = etags
CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp \
+ $(top_srcdir)/config/mkinstalldirs
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -234,6 +300,7 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CMAKE = @CMAKE@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
@@ -281,6 +348,7 @@ LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
@@ -370,22 +438,19 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
LIBPORT = $(top_builddir)/port/libport.la
LIBTIFF = $(top_builddir)/libtiff/libtiff.la
-EXTRA_DIST = Makefile.vc
+EXTRA_DIST = \
+ CMakeLists.txt \
+ Makefile.vc
+
@HAVE_RPATH_TRUE@AM_LDFLAGS = $(LIBDIR)
-bmp2tiff_SOURCES = bmp2tiff.c
-bmp2tiff_LDADD = $(LIBTIFF) $(LIBPORT)
fax2ps_SOURCES = fax2ps.c
fax2ps_LDADD = $(LIBTIFF) $(LIBPORT)
fax2tiff_SOURCES = fax2tiff.c
fax2tiff_LDADD = $(LIBTIFF) $(LIBPORT)
-gif2tiff_SOURCES = gif2tiff.c
-gif2tiff_LDADD = $(LIBTIFF) $(LIBPORT)
pal2rgb_SOURCES = pal2rgb.c
pal2rgb_LDADD = $(LIBTIFF) $(LIBPORT)
ppm2tiff_SOURCES = ppm2tiff.c
ppm2tiff_LDADD = $(LIBTIFF) $(LIBPORT)
-ras2tiff_SOURCES = ras2tiff.c rasterfile.h
-ras2tiff_LDADD = $(LIBTIFF) $(LIBPORT)
raw2tiff_SOURCES = raw2tiff.c
raw2tiff_LDADD = $(LIBTIFF) $(LIBPORT)
rgb2ycbcr_SOURCES = rgb2ycbcr.c
@@ -421,7 +486,7 @@ tiffsplit_LDADD = $(LIBTIFF) $(LIBPORT)
tiffgt_SOURCES = tiffgt.c
tiffgt_CFLAGS = $(CFLAGS) $(GLUT_CFLAGS) $(AM_CFLAGS)
tiffgt_LDADD = $(LIBTIFF) $(LIBPORT) $(X_LIBS) $(GLUT_LIBS)
-INCLUDES = -I$(top_srcdir)/libtiff
+AM_CPPFLAGS = -I$(top_srcdir)/libtiff
all: all-am
.SUFFIXES:
@@ -438,7 +503,6 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tools/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign tools/Makefile
-.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -458,14 +522,19 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
- while read p p1; do if test -f $$p || test -f $$p1; \
- then echo "$$p"; echo "$$p"; else :; fi; \
+ while read p p1; do if test -f $$p \
+ || test -f $$p1 \
+ ; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
- sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ sed -e 'p;s,.*/,,;n;h' \
+ -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
@@ -486,7 +555,8 @@ uninstall-binPROGRAMS:
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
- -e 's/$$/$(EXEEXT)/' `; \
+ -e 's/$$/$(EXEEXT)/' \
+ `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
@@ -499,87 +569,99 @@ clean-binPROGRAMS:
list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
echo " rm -f" $$list; \
rm -f $$list
-bmp2tiff$(EXEEXT): $(bmp2tiff_OBJECTS) $(bmp2tiff_DEPENDENCIES) $(EXTRA_bmp2tiff_DEPENDENCIES)
- @rm -f bmp2tiff$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(bmp2tiff_OBJECTS) $(bmp2tiff_LDADD) $(LIBS)
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
fax2ps$(EXEEXT): $(fax2ps_OBJECTS) $(fax2ps_DEPENDENCIES) $(EXTRA_fax2ps_DEPENDENCIES)
@rm -f fax2ps$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(fax2ps_OBJECTS) $(fax2ps_LDADD) $(LIBS)
+
fax2tiff$(EXEEXT): $(fax2tiff_OBJECTS) $(fax2tiff_DEPENDENCIES) $(EXTRA_fax2tiff_DEPENDENCIES)
@rm -f fax2tiff$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(fax2tiff_OBJECTS) $(fax2tiff_LDADD) $(LIBS)
-gif2tiff$(EXEEXT): $(gif2tiff_OBJECTS) $(gif2tiff_DEPENDENCIES) $(EXTRA_gif2tiff_DEPENDENCIES)
- @rm -f gif2tiff$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(gif2tiff_OBJECTS) $(gif2tiff_LDADD) $(LIBS)
+
pal2rgb$(EXEEXT): $(pal2rgb_OBJECTS) $(pal2rgb_DEPENDENCIES) $(EXTRA_pal2rgb_DEPENDENCIES)
@rm -f pal2rgb$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(pal2rgb_OBJECTS) $(pal2rgb_LDADD) $(LIBS)
+
ppm2tiff$(EXEEXT): $(ppm2tiff_OBJECTS) $(ppm2tiff_DEPENDENCIES) $(EXTRA_ppm2tiff_DEPENDENCIES)
@rm -f ppm2tiff$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(ppm2tiff_OBJECTS) $(ppm2tiff_LDADD) $(LIBS)
-ras2tiff$(EXEEXT): $(ras2tiff_OBJECTS) $(ras2tiff_DEPENDENCIES) $(EXTRA_ras2tiff_DEPENDENCIES)
- @rm -f ras2tiff$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(ras2tiff_OBJECTS) $(ras2tiff_LDADD) $(LIBS)
+
raw2tiff$(EXEEXT): $(raw2tiff_OBJECTS) $(raw2tiff_DEPENDENCIES) $(EXTRA_raw2tiff_DEPENDENCIES)
@rm -f raw2tiff$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(raw2tiff_OBJECTS) $(raw2tiff_LDADD) $(LIBS)
+
rgb2ycbcr$(EXEEXT): $(rgb2ycbcr_OBJECTS) $(rgb2ycbcr_DEPENDENCIES) $(EXTRA_rgb2ycbcr_DEPENDENCIES)
@rm -f rgb2ycbcr$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(rgb2ycbcr_OBJECTS) $(rgb2ycbcr_LDADD) $(LIBS)
-sgi2tiff$(EXEEXT): $(sgi2tiff_OBJECTS) $(sgi2tiff_DEPENDENCIES) $(EXTRA_sgi2tiff_DEPENDENCIES)
- @rm -f sgi2tiff$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sgi2tiff_OBJECTS) $(sgi2tiff_LDADD) $(LIBS)
-sgisv$(EXEEXT): $(sgisv_OBJECTS) $(sgisv_DEPENDENCIES) $(EXTRA_sgisv_DEPENDENCIES)
- @rm -f sgisv$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(sgisv_OBJECTS) $(sgisv_LDADD) $(LIBS)
+
thumbnail$(EXEEXT): $(thumbnail_OBJECTS) $(thumbnail_DEPENDENCIES) $(EXTRA_thumbnail_DEPENDENCIES)
@rm -f thumbnail$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(thumbnail_OBJECTS) $(thumbnail_LDADD) $(LIBS)
+
tiff2bw$(EXEEXT): $(tiff2bw_OBJECTS) $(tiff2bw_DEPENDENCIES) $(EXTRA_tiff2bw_DEPENDENCIES)
@rm -f tiff2bw$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiff2bw_OBJECTS) $(tiff2bw_LDADD) $(LIBS)
+
tiff2pdf$(EXEEXT): $(tiff2pdf_OBJECTS) $(tiff2pdf_DEPENDENCIES) $(EXTRA_tiff2pdf_DEPENDENCIES)
@rm -f tiff2pdf$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiff2pdf_OBJECTS) $(tiff2pdf_LDADD) $(LIBS)
+
tiff2ps$(EXEEXT): $(tiff2ps_OBJECTS) $(tiff2ps_DEPENDENCIES) $(EXTRA_tiff2ps_DEPENDENCIES)
@rm -f tiff2ps$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiff2ps_OBJECTS) $(tiff2ps_LDADD) $(LIBS)
+
tiff2rgba$(EXEEXT): $(tiff2rgba_OBJECTS) $(tiff2rgba_DEPENDENCIES) $(EXTRA_tiff2rgba_DEPENDENCIES)
@rm -f tiff2rgba$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiff2rgba_OBJECTS) $(tiff2rgba_LDADD) $(LIBS)
+
tiffcmp$(EXEEXT): $(tiffcmp_OBJECTS) $(tiffcmp_DEPENDENCIES) $(EXTRA_tiffcmp_DEPENDENCIES)
@rm -f tiffcmp$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiffcmp_OBJECTS) $(tiffcmp_LDADD) $(LIBS)
+
tiffcp$(EXEEXT): $(tiffcp_OBJECTS) $(tiffcp_DEPENDENCIES) $(EXTRA_tiffcp_DEPENDENCIES)
@rm -f tiffcp$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiffcp_OBJECTS) $(tiffcp_LDADD) $(LIBS)
+
tiffcrop$(EXEEXT): $(tiffcrop_OBJECTS) $(tiffcrop_DEPENDENCIES) $(EXTRA_tiffcrop_DEPENDENCIES)
@rm -f tiffcrop$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiffcrop_OBJECTS) $(tiffcrop_LDADD) $(LIBS)
+
tiffdither$(EXEEXT): $(tiffdither_OBJECTS) $(tiffdither_DEPENDENCIES) $(EXTRA_tiffdither_DEPENDENCIES)
@rm -f tiffdither$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiffdither_OBJECTS) $(tiffdither_LDADD) $(LIBS)
+
tiffdump$(EXEEXT): $(tiffdump_OBJECTS) $(tiffdump_DEPENDENCIES) $(EXTRA_tiffdump_DEPENDENCIES)
@rm -f tiffdump$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiffdump_OBJECTS) $(tiffdump_LDADD) $(LIBS)
+
tiffgt$(EXEEXT): $(tiffgt_OBJECTS) $(tiffgt_DEPENDENCIES) $(EXTRA_tiffgt_DEPENDENCIES)
@rm -f tiffgt$(EXEEXT)
$(AM_V_CCLD)$(tiffgt_LINK) $(tiffgt_OBJECTS) $(tiffgt_LDADD) $(LIBS)
+
tiffinfo$(EXEEXT): $(tiffinfo_OBJECTS) $(tiffinfo_DEPENDENCIES) $(EXTRA_tiffinfo_DEPENDENCIES)
@rm -f tiffinfo$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiffinfo_OBJECTS) $(tiffinfo_LDADD) $(LIBS)
+
tiffmedian$(EXEEXT): $(tiffmedian_OBJECTS) $(tiffmedian_DEPENDENCIES) $(EXTRA_tiffmedian_DEPENDENCIES)
@rm -f tiffmedian$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiffmedian_OBJECTS) $(tiffmedian_LDADD) $(LIBS)
+
tiffset$(EXEEXT): $(tiffset_OBJECTS) $(tiffset_DEPENDENCIES) $(EXTRA_tiffset_DEPENDENCIES)
@rm -f tiffset$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiffset_OBJECTS) $(tiffset_LDADD) $(LIBS)
+
tiffsplit$(EXEEXT): $(tiffsplit_OBJECTS) $(tiffsplit_DEPENDENCIES) $(EXTRA_tiffsplit_DEPENDENCIES)
@rm -f tiffsplit$(EXEEXT)
$(AM_V_CCLD)$(LINK) $(tiffsplit_OBJECTS) $(tiffsplit_LDADD) $(LIBS)
-ycbcr$(EXEEXT): $(ycbcr_OBJECTS) $(ycbcr_DEPENDENCIES) $(EXTRA_ycbcr_DEPENDENCIES)
- @rm -f ycbcr$(EXEEXT)
- $(AM_V_CCLD)$(LINK) $(ycbcr_OBJECTS) $(ycbcr_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -587,17 +669,12 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmp2tiff.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fax2ps.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fax2tiff.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gif2tiff.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pal2rgb.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ppm2tiff.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ras2tiff.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raw2tiff.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rgb2ycbcr.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgi2tiff.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sgisv.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/thumbnail.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff2bw.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff2pdf.Po@am__quote@
@@ -613,21 +690,20 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffmedian.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffset.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiffsplit.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ycbcr.Po@am__quote@
.c.o:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $<
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
.c.obj:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'`
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
.c.lo:
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@@ -656,26 +732,15 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -687,15 +752,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
@@ -704,6 +765,21 @@ GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -739,6 +815,7 @@ distdir: $(DISTFILES)
fi; \
done
check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
@@ -777,7 +854,8 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
+ clean-libtool mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -845,21 +923,24 @@ ps-am:
uninstall-am: uninstall-binPROGRAMS
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
- clean-generic clean-libtool ctags distclean distclean-compile \
- distclean-generic distclean-libtool distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-binPROGRAMS install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-binPROGRAMS
+.MAKE: check-am install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+ clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
+ clean-libtool cscopelist-am ctags ctags-am distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-binPROGRAMS install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS
+
+.PRECIOUS: Makefile
echo:
diff --git a/tiff/tools/Makefile.vc b/tiff/tools/Makefile.vc
index c8d69cddf..646c76775 100644
--- a/tiff/tools/Makefile.vc
+++ b/tiff/tools/Makefile.vc
@@ -1,4 +1,4 @@
-# $Id: Makefile.vc,v 1.15 2009-01-22 20:53:07 fwarmerdam Exp $
+# $Id: Makefile.vc,v 1.16 2016-06-05 19:54:03 bfriesen Exp $
#
# Copyright (C) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
#
@@ -28,9 +28,9 @@
!INCLUDE ..\nmake.opt
-TARGETS = bmp2tiff.exe tiffinfo.exe tiffdump.exe fax2tiff.exe \
- fax2ps.exe gif2tiff.exe pal2rgb.exe ppm2tiff.exe \
- rgb2ycbcr.exe thumbnail.exe ras2tiff.exe raw2tiff.exe \
+TARGETS = tiffinfo.exe tiffdump.exe fax2tiff.exe \
+ fax2ps.exe pal2rgb.exe ppm2tiff.exe \
+ rgb2ycbcr.exe thumbnail.exe raw2tiff.exe \
tiff2bw.exe tiff2rgba.exe tiff2pdf.exe tiff2ps.exe \
tiffcmp.exe tiffcp.exe tiffcrop.exe tiffdither.exe \
tiffmedian.exe tiffset.exe tiffsplit.exe
diff --git a/tiff/tools/bmp2tiff.c b/tiff/tools/bmp2tiff.c
deleted file mode 100644
index c66a8d217..000000000
--- a/tiff/tools/bmp2tiff.c
+++ /dev/null
@@ -1,854 +0,0 @@
-/* $Id: bmp2tiff.c,v 1.23 2010-03-10 18:56:49 bfriesen Exp $
- *
- * Project: libtiff tools
- * Purpose: Convert Windows BMP files in TIFF.
- * Author: Andrey Kiselev, dron@ak4719.spb.edu
- *
- ******************************************************************************
- * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu>
- *
- * 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.
- */
-
-#include "tif_config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_IO_H
-# include <io.h>
-#endif
-
-#ifdef NEED_LIBPORT
-# include "libport.h"
-#endif
-
-#include "tiffio.h"
-
-#ifndef O_BINARY
-# define O_BINARY 0
-#endif
-
-enum BMPType
-{
- BMPT_WIN4, /* BMP used in Windows 3.0/NT 3.51/95 */
- BMPT_WIN5, /* BMP used in Windows NT 4.0/98/Me/2000/XP */
- BMPT_OS21, /* BMP used in OS/2 PM 1.x */
- BMPT_OS22 /* BMP used in OS/2 PM 2.x */
-};
-
-/*
- * Bitmap file consists of a BMPFileHeader structure followed by a
- * BMPInfoHeader structure. An array of BMPColorEntry structures (also called
- * a colour table) follows the bitmap information header structure. The colour
- * table is followed by a second array of indexes into the colour table (the
- * actual bitmap data). Data may be comressed, for 4-bpp and 8-bpp used RLE
- * compression.
- *
- * +---------------------+
- * | BMPFileHeader |
- * +---------------------+
- * | BMPInfoHeader |
- * +---------------------+
- * | BMPColorEntry array |
- * +---------------------+
- * | Colour-index array |
- * +---------------------+
- *
- * All numbers stored in Intel order with least significant byte first.
- */
-
-enum BMPComprMethod
-{
- BMPC_RGB = 0L, /* Uncompressed */
- BMPC_RLE8 = 1L, /* RLE for 8 bpp images */
- BMPC_RLE4 = 2L, /* RLE for 4 bpp images */
- BMPC_BITFIELDS = 3L, /* Bitmap is not compressed and the colour table
- * consists of three DWORD color masks that specify
- * the red, green, and blue components of each
- * pixel. This is valid when used with
- * 16- and 32-bpp bitmaps. */
- BMPC_JPEG = 4L, /* Indicates that the image is a JPEG image. */
- BMPC_PNG = 5L /* Indicates that the image is a PNG image. */
-};
-
-enum BMPLCSType /* Type of logical color space. */
-{
- BMPLT_CALIBRATED_RGB = 0, /* This value indicates that endpoints and
- * gamma values are given in the appropriate
- * fields. */
- BMPLT_DEVICE_RGB = 1,
- BMPLT_DEVICE_CMYK = 2
-};
-
-typedef struct
-{
- int32 iCIEX;
- int32 iCIEY;
- int32 iCIEZ;
-} BMPCIEXYZ;
-
-typedef struct /* This structure contains the x, y, and z */
-{ /* coordinates of the three colors that */
- /* correspond */
- BMPCIEXYZ iCIERed; /* to the red, green, and blue endpoints for */
- BMPCIEXYZ iCIEGreen; /* a specified logical color space. */
- BMPCIEXYZ iCIEBlue;
-} BMPCIEXYZTriple;
-
-typedef struct
-{
- char bType[2]; /* Signature "BM" */
- uint32 iSize; /* Size in bytes of the bitmap file. Should
- * always be ignored while reading because
- * of error in Windows 3.0 SDK's description
- * of this field */
- uint16 iReserved1; /* Reserved, set as 0 */
- uint16 iReserved2; /* Reserved, set as 0 */
- uint32 iOffBits; /* Offset of the image from file start in bytes */
-} BMPFileHeader;
-
-/* File header size in bytes: */
-const int BFH_SIZE = 14;
-
-typedef struct
-{
- uint32 iSize; /* Size of BMPInfoHeader structure in bytes.
- * Should be used to determine start of the
- * colour table */
- int32 iWidth; /* Image width */
- int32 iHeight; /* Image height. If positive, image has bottom
- * left origin, if negative --- top left. */
- int16 iPlanes; /* Number of image planes (must be set to 1) */
- int16 iBitCount; /* Number of bits per pixel (1, 4, 8, 16, 24
- * or 32). If 0 then the number of bits per
- * pixel is specified or is implied by the
- * JPEG or PNG format. */
- uint32 iCompression; /* Compression method */
- uint32 iSizeImage; /* Size of uncomressed image in bytes. May
- * be 0 for BMPC_RGB bitmaps. If iCompression
- * is BI_JPEG or BI_PNG, iSizeImage indicates
- * the size of the JPEG or PNG image buffer. */
- int32 iXPelsPerMeter; /* X resolution, pixels per meter (0 if not used) */
- int32 iYPelsPerMeter; /* Y resolution, pixels per meter (0 if not used) */
- uint32 iClrUsed; /* Size of colour table. If 0, iBitCount should
- * be used to calculate this value
- * (1<<iBitCount). This value should be
- * unsigned for proper shifting. */
- int32 iClrImportant; /* Number of important colours. If 0, all
- * colours are required */
-
- /*
- * Fields above should be used for bitmaps, compatible with Windows NT 3.51
- * and earlier. Windows 98/Me, Windows 2000/XP introduces additional fields:
- */
-
- int32 iRedMask; /* Colour mask that specifies the red component
- * of each pixel, valid only if iCompression
- * is set to BI_BITFIELDS. */
- int32 iGreenMask; /* The same for green component */
- int32 iBlueMask; /* The same for blue component */
- int32 iAlphaMask; /* Colour mask that specifies the alpha
- * component of each pixel. */
- uint32 iCSType; /* Colour space of the DIB. */
- BMPCIEXYZTriple sEndpoints; /* This member is ignored unless the iCSType
- * member specifies BMPLT_CALIBRATED_RGB. */
- int32 iGammaRed; /* Toned response curve for red. This member
- * is ignored unless color values are
- * calibrated RGB values and iCSType is set to
- * BMPLT_CALIBRATED_RGB. Specified
- * in 16^16 format. */
- int32 iGammaGreen; /* Toned response curve for green. */
- int32 iGammaBlue; /* Toned response curve for blue. */
-} BMPInfoHeader;
-
-/*
- * Info header size in bytes:
- */
-const unsigned int BIH_WIN4SIZE = 40; /* for BMPT_WIN4 */
-const unsigned int BIH_WIN5SIZE = 57; /* for BMPT_WIN5 */
-const unsigned int BIH_OS21SIZE = 12; /* for BMPT_OS21 */
-const unsigned int BIH_OS22SIZE = 64; /* for BMPT_OS22 */
-
-/*
- * We will use plain byte array instead of this structure, but declaration
- * provided for reference
- */
-typedef struct
-{
- char bBlue;
- char bGreen;
- char bRed;
- char bReserved; /* Must be 0 */
-} BMPColorEntry;
-
-static uint16 compression = (uint16) -1;
-static int jpegcolormode = JPEGCOLORMODE_RGB;
-static int quality = 75; /* JPEG quality */
-static uint16 predictor = 0;
-
-static void usage(void);
-static int processCompressOptions(char*);
-static void rearrangePixels(char *, uint32, uint32);
-
-int
-main(int argc, char* argv[])
-{
- uint32 width, length;
- uint16 nbands = 1; /* number of bands in input image */
- uint16 depth = 8; /* bits per pixel in input image */
- uint32 rowsperstrip = (uint32) -1;
- uint16 photometric = PHOTOMETRIC_MINISBLACK;
- int fd = 0;
- struct stat instat;
- char *outfilename = NULL, *infilename = NULL;
- TIFF *out = NULL;
-
- BMPFileHeader file_hdr;
- BMPInfoHeader info_hdr;
- int bmp_type;
- uint32 clr_tbl_size, n_clr_elems = 3;
- unsigned char *clr_tbl;
- unsigned short *red_tbl = NULL, *green_tbl = NULL, *blue_tbl = NULL;
- uint32 row, clr;
-
- int c;
- extern int optind;
- extern char* optarg;
-
- while ((c = getopt(argc, argv, "c:r:o:h")) != -1) {
- switch (c) {
- case 'c': /* compression scheme */
- if (!processCompressOptions(optarg))
- usage();
- break;
- case 'r': /* rows/strip */
- rowsperstrip = atoi(optarg);
- break;
- case 'o':
- outfilename = optarg;
- break;
- case 'h':
- usage();
- default:
- break;
- }
- }
-
- if (argc - optind < 2)
- usage();
-
- if (outfilename == NULL)
- outfilename = argv[argc-1];
- out = TIFFOpen(outfilename, "w");
- if (out == NULL) {
- TIFFError(infilename, "Cannot open file %s for output",
- outfilename);
- goto bad3;
- }
-
-
- while (optind < argc-1) {
- infilename = argv[optind];
- optind++;
-
- fd = open(infilename, O_RDONLY|O_BINARY, 0);
- if (fd < 0) {
- TIFFError(infilename, "Cannot open input file");
- return -1;
- }
-
- read(fd, file_hdr.bType, 2);
- if(file_hdr.bType[0] != 'B' || file_hdr.bType[1] != 'M') {
- TIFFError(infilename, "File is not BMP");
- goto bad;
- }
-
-/* -------------------------------------------------------------------- */
-/* Read the BMPFileHeader. We need iOffBits value only */
-/* -------------------------------------------------------------------- */
- lseek(fd, 10, SEEK_SET);
- read(fd, &file_hdr.iOffBits, 4);
-#ifdef WORDS_BIGENDIAN
- TIFFSwabLong(&file_hdr.iOffBits);
-#endif
- fstat(fd, &instat);
- file_hdr.iSize = instat.st_size;
-
-/* -------------------------------------------------------------------- */
-/* Read the BMPInfoHeader. */
-/* -------------------------------------------------------------------- */
-
- lseek(fd, BFH_SIZE, SEEK_SET);
- read(fd, &info_hdr.iSize, 4);
-#ifdef WORDS_BIGENDIAN
- TIFFSwabLong(&info_hdr.iSize);
-#endif
-
- if (info_hdr.iSize == BIH_WIN4SIZE)
- bmp_type = BMPT_WIN4;
- else if (info_hdr.iSize == BIH_OS21SIZE)
- bmp_type = BMPT_OS21;
- else if (info_hdr.iSize == BIH_OS22SIZE
- || info_hdr.iSize == 16)
- bmp_type = BMPT_OS22;
- else
- bmp_type = BMPT_WIN5;
-
- if (bmp_type == BMPT_WIN4
- || bmp_type == BMPT_WIN5
- || bmp_type == BMPT_OS22) {
- read(fd, &info_hdr.iWidth, 4);
- read(fd, &info_hdr.iHeight, 4);
- read(fd, &info_hdr.iPlanes, 2);
- read(fd, &info_hdr.iBitCount, 2);
- read(fd, &info_hdr.iCompression, 4);
- read(fd, &info_hdr.iSizeImage, 4);
- read(fd, &info_hdr.iXPelsPerMeter, 4);
- read(fd, &info_hdr.iYPelsPerMeter, 4);
- read(fd, &info_hdr.iClrUsed, 4);
- read(fd, &info_hdr.iClrImportant, 4);
-#ifdef WORDS_BIGENDIAN
- TIFFSwabLong((uint32*) &info_hdr.iWidth);
- TIFFSwabLong((uint32*) &info_hdr.iHeight);
- TIFFSwabShort((uint16*) &info_hdr.iPlanes);
- TIFFSwabShort((uint16*) &info_hdr.iBitCount);
- TIFFSwabLong((uint32*) &info_hdr.iCompression);
- TIFFSwabLong((uint32*) &info_hdr.iSizeImage);
- TIFFSwabLong((uint32*) &info_hdr.iXPelsPerMeter);
- TIFFSwabLong((uint32*) &info_hdr.iYPelsPerMeter);
- TIFFSwabLong((uint32*) &info_hdr.iClrUsed);
- TIFFSwabLong((uint32*) &info_hdr.iClrImportant);
-#endif
- n_clr_elems = 4;
- }
-
- if (bmp_type == BMPT_OS22) {
- /*
- * FIXME: different info in different documents
- * regarding this!
- */
- n_clr_elems = 3;
- }
-
- if (bmp_type == BMPT_OS21) {
- int16 iShort;
-
- read(fd, &iShort, 2);
-#ifdef WORDS_BIGENDIAN
- TIFFSwabShort((uint16*) &iShort);
-#endif
- info_hdr.iWidth = iShort;
- read(fd, &iShort, 2);
-#ifdef WORDS_BIGENDIAN
- TIFFSwabShort((uint16*) &iShort);
-#endif
- info_hdr.iHeight = iShort;
- read(fd, &iShort, 2);
-#ifdef WORDS_BIGENDIAN
- TIFFSwabShort((uint16*) &iShort);
-#endif
- info_hdr.iPlanes = iShort;
- read(fd, &iShort, 2);
-#ifdef WORDS_BIGENDIAN
- TIFFSwabShort((uint16*) &iShort);
-#endif
- info_hdr.iBitCount = iShort;
- info_hdr.iCompression = BMPC_RGB;
- n_clr_elems = 3;
- }
-
- if (info_hdr.iBitCount != 1 && info_hdr.iBitCount != 4 &&
- info_hdr.iBitCount != 8 && info_hdr.iBitCount != 16 &&
- info_hdr.iBitCount != 24 && info_hdr.iBitCount != 32) {
- TIFFError(infilename,
- "Cannot process BMP file with bit count %d",
- info_hdr.iBitCount);
- close(fd);
- return 0;
- }
-
- width = info_hdr.iWidth;
- length = (info_hdr.iHeight > 0) ? info_hdr.iHeight : -info_hdr.iHeight;
-
- switch (info_hdr.iBitCount)
- {
- case 1:
- case 4:
- case 8:
- nbands = 1;
- depth = info_hdr.iBitCount;
- photometric = PHOTOMETRIC_PALETTE;
- /* Allocate memory for colour table and read it. */
- if (info_hdr.iClrUsed)
- clr_tbl_size =
- ((uint32)(1<<depth)<info_hdr.iClrUsed)
- ? (uint32) (1 << depth)
- : info_hdr.iClrUsed;
- else
- clr_tbl_size = 1 << depth;
- clr_tbl = (unsigned char *)
- _TIFFmalloc(n_clr_elems * clr_tbl_size);
- if (!clr_tbl) {
- TIFFError(infilename,
- "Can't allocate space for color table");
- goto bad;
- }
-
- lseek(fd, BFH_SIZE + info_hdr.iSize, SEEK_SET);
- read(fd, clr_tbl, n_clr_elems * clr_tbl_size);
-
- red_tbl = (unsigned short*)
- _TIFFmalloc(((tmsize_t)1)<<depth * sizeof(unsigned short));
- if (!red_tbl) {
- TIFFError(infilename,
- "Can't allocate space for red component table");
- _TIFFfree(clr_tbl);
- goto bad1;
- }
- green_tbl = (unsigned short*)
- _TIFFmalloc(((tmsize_t)1)<<depth * sizeof(unsigned short));
- if (!green_tbl) {
- TIFFError(infilename,
- "Can't allocate space for green component table");
- _TIFFfree(clr_tbl);
- goto bad2;
- }
- blue_tbl = (unsigned short*)
- _TIFFmalloc(((tmsize_t)1)<<depth * sizeof(unsigned short));
- if (!blue_tbl) {
- TIFFError(infilename,
- "Can't allocate space for blue component table");
- _TIFFfree(clr_tbl);
- goto bad3;
- }
-
- for(clr = 0; clr < clr_tbl_size; clr++) {
- red_tbl[clr] = 257*clr_tbl[clr*n_clr_elems+2];
- green_tbl[clr] = 257*clr_tbl[clr*n_clr_elems+1];
- blue_tbl[clr] = 257*clr_tbl[clr*n_clr_elems];
- }
-
- _TIFFfree(clr_tbl);
- break;
- case 16:
- case 24:
- nbands = 3;
- depth = info_hdr.iBitCount / nbands;
- photometric = PHOTOMETRIC_RGB;
- break;
- case 32:
- nbands = 3;
- depth = 8;
- photometric = PHOTOMETRIC_RGB;
- break;
- default:
- break;
- }
-
-/* -------------------------------------------------------------------- */
-/* Create output file. */
-/* -------------------------------------------------------------------- */
-
- TIFFSetField(out, TIFFTAG_IMAGEWIDTH, width);
- TIFFSetField(out, TIFFTAG_IMAGELENGTH, length);
- TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
- TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, nbands);
- TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, depth);
- TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
- TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric);
- TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
- TIFFDefaultStripSize(out, rowsperstrip));
-
- if (red_tbl && green_tbl && blue_tbl) {
- TIFFSetField(out, TIFFTAG_COLORMAP,
- red_tbl, green_tbl, blue_tbl);
- }
-
- if (compression == (uint16) -1)
- compression = COMPRESSION_PACKBITS;
- TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
- switch (compression) {
- case COMPRESSION_JPEG:
- if (photometric == PHOTOMETRIC_RGB
- && jpegcolormode == JPEGCOLORMODE_RGB)
- photometric = PHOTOMETRIC_YCBCR;
- TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality);
- TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
- break;
- case COMPRESSION_LZW:
- case COMPRESSION_DEFLATE:
- if (predictor != 0)
- TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
- break;
- }
-
-/* -------------------------------------------------------------------- */
-/* Read uncompressed image data. */
-/* -------------------------------------------------------------------- */
-
- if (info_hdr.iCompression == BMPC_RGB) {
- uint32 offset, size;
- char *scanbuf;
-
- /* XXX: Avoid integer overflow. We can calculate size
- * in one step using
- *
- * size = ((width * info_hdr.iBitCount + 31) & ~31) / 8
- *
- * formulae, but we should check for overflow
- * conditions during calculation.
- */
- size = width * info_hdr.iBitCount + 31;
- if (!width || !info_hdr.iBitCount
- || (size - 31) / info_hdr.iBitCount != width ) {
- TIFFError(infilename,
- "Wrong image parameters; can't "
- "allocate space for scanline buffer");
- goto bad3;
- }
- size = (size & ~31) / 8;
-
- scanbuf = (char *) _TIFFmalloc(size);
- if (!scanbuf) {
- TIFFError(infilename,
- "Can't allocate space for scanline buffer");
- goto bad3;
- }
-
- for (row = 0; row < length; row++) {
- if (info_hdr.iHeight > 0)
- offset = file_hdr.iOffBits+(length-row-1)*size;
- else
- offset = file_hdr.iOffBits + row * size;
- if (lseek(fd, offset, SEEK_SET) == (off_t)-1) {
- TIFFError(infilename,
- "scanline %lu: Seek error",
- (unsigned long) row);
- break;
- }
-
- if (read(fd, scanbuf, size) < 0) {
- TIFFError(infilename,
- "scanline %lu: Read error",
- (unsigned long) row);
- break;
- }
-
- rearrangePixels(scanbuf, width, info_hdr.iBitCount);
-
- if (TIFFWriteScanline(out, scanbuf, row, 0)<0) {
- TIFFError(infilename,
- "scanline %lu: Write error",
- (unsigned long) row);
- break;
- }
- }
-
- _TIFFfree(scanbuf);
-
-/* -------------------------------------------------------------------- */
-/* Read compressed image data. */
-/* -------------------------------------------------------------------- */
-
- } else if ( info_hdr.iCompression == BMPC_RLE8
- || info_hdr.iCompression == BMPC_RLE4 ) {
- uint32 i, j, k, runlength;
- uint32 compr_size, uncompr_size;
- unsigned char *comprbuf;
- unsigned char *uncomprbuf;
-
- compr_size = file_hdr.iSize - file_hdr.iOffBits;
- uncompr_size = width * length;
- comprbuf = (unsigned char *) _TIFFmalloc( compr_size );
- if (!comprbuf) {
- TIFFError(infilename,
- "Can't allocate space for compressed scanline buffer");
- goto bad3;
- }
- uncomprbuf = (unsigned char *)_TIFFmalloc(uncompr_size);
- if (!uncomprbuf) {
- TIFFError(infilename,
- "Can't allocate space for uncompressed scanline buffer");
- goto bad3;
- }
-
- lseek(fd, file_hdr.iOffBits, SEEK_SET);
- read(fd, comprbuf, compr_size);
- i = 0;
- j = 0;
- if (info_hdr.iBitCount == 8) { /* RLE8 */
- while(j < uncompr_size && i < compr_size) {
- if ( comprbuf[i] ) {
- runlength = comprbuf[i++];
- while( runlength > 0
- && j < uncompr_size
- && i < compr_size ) {
- uncomprbuf[j++] = comprbuf[i];
- runlength--;
- }
- i++;
- } else {
- i++;
- if (comprbuf[i] == 0) /* Next scanline */
- i++;
- else if (comprbuf[i] == 1) /* End of image */
- break;
- else if (comprbuf[i] == 2) { /* Move to... */
- i++;
- if (i < compr_size - 1) {
- j+=comprbuf[i]+comprbuf[i+1]*width;
- i += 2;
- }
- else
- break;
- } else { /* Absolute mode */
- runlength = comprbuf[i++];
- for (k = 0; k < runlength && j < uncompr_size && i < compr_size; k++)
- uncomprbuf[j++] = comprbuf[i++];
- if ( k & 0x01 )
- i++;
- }
- }
- }
- }
- else { /* RLE4 */
- while( j < uncompr_size && i < compr_size ) {
- if ( comprbuf[i] ) {
- runlength = comprbuf[i++];
- while( runlength > 0 && j < uncompr_size && i < compr_size ) {
- if ( runlength & 0x01 )
- uncomprbuf[j++] = (comprbuf[i] & 0xF0) >> 4;
- else
- uncomprbuf[j++] = comprbuf[i] & 0x0F;
- runlength--;
- }
- i++;
- } else {
- i++;
- if (comprbuf[i] == 0) /* Next scanline */
- i++;
- else if (comprbuf[i] == 1) /* End of image */
- break;
- else if (comprbuf[i] == 2) { /* Move to... */
- i++;
- if (i < compr_size - 1) {
- j+=comprbuf[i]+comprbuf[i+1]*width;
- i += 2;
- }
- else
- break;
- } else { /* Absolute mode */
- runlength = comprbuf[i++];
- for (k = 0; k < runlength && j < uncompr_size && i < compr_size; k++) {
- if (k & 0x01)
- uncomprbuf[j++] = comprbuf[i++] & 0x0F;
- else
- uncomprbuf[j++] = (comprbuf[i] & 0xF0) >> 4;
- }
- if (k & 0x01)
- i++;
- }
- }
- }
- }
-
- _TIFFfree(comprbuf);
-
- for (row = 0; row < length; row++) {
- if (TIFFWriteScanline(out,
- uncomprbuf + (length - row - 1) * width,
- row, 0) < 0) {
- TIFFError(infilename,
- "scanline %lu: Write error.\n",
- (unsigned long) row);
- }
- }
-
- _TIFFfree(uncomprbuf);
- }
- TIFFWriteDirectory(out);
- if (blue_tbl) {
- _TIFFfree(blue_tbl);
- blue_tbl=NULL;
- }
- if (green_tbl) {
- _TIFFfree(green_tbl);
- green_tbl=NULL;
- }
- if (red_tbl) {
- _TIFFfree(red_tbl);
- red_tbl=NULL;
- }
- }
-
-bad3:
- if (blue_tbl)
- _TIFFfree(blue_tbl);
-bad2:
- if (green_tbl)
- _TIFFfree(green_tbl);
-bad1:
- if (red_tbl)
- _TIFFfree(red_tbl);
-bad:
- close(fd);
-
- if (out)
- TIFFClose(out);
- return 0;
-}
-
-/*
- * Image data in BMP file stored in BGR (or ABGR) format. We should rearrange
- * pixels to RGB (RGBA) format.
- */
-static void
-rearrangePixels(char *buf, uint32 width, uint32 bit_count)
-{
- char tmp;
- uint32 i;
-
- switch(bit_count) {
- case 16: /* FIXME: need a sample file */
- break;
- case 24:
- for (i = 0; i < width; i++, buf += 3) {
- tmp = *buf;
- *buf = *(buf + 2);
- *(buf + 2) = tmp;
- }
- break;
- case 32:
- {
- char *buf1 = buf;
-
- for (i = 0; i < width; i++, buf += 4) {
- tmp = *buf;
- *buf1++ = *(buf + 2);
- *buf1++ = *(buf + 1);
- *buf1++ = tmp;
- }
- }
- break;
- default:
- break;
- }
-}
-
-static int
-processCompressOptions(char* opt)
-{
- if (strcmp(opt, "none") == 0)
- compression = COMPRESSION_NONE;
- else if (strcmp(opt, "packbits") == 0)
- compression = COMPRESSION_PACKBITS;
- else if (strncmp(opt, "jpeg", 4) == 0) {
- char* cp = strchr(opt, ':');
-
- compression = COMPRESSION_JPEG;
- while( cp )
- {
- if (isdigit((int)cp[1]))
- quality = atoi(cp+1);
- else if (cp[1] == 'r' )
- jpegcolormode = JPEGCOLORMODE_RAW;
- else
- usage();
-
- cp = strchr(cp+1,':');
- }
- } else if (strncmp(opt, "lzw", 3) == 0) {
- char* cp = strchr(opt, ':');
- if (cp)
- predictor = atoi(cp+1);
- compression = COMPRESSION_LZW;
- } else if (strncmp(opt, "zip", 3) == 0) {
- char* cp = strchr(opt, ':');
- if (cp)
- predictor = atoi(cp+1);
- compression = COMPRESSION_DEFLATE;
- } else
- return (0);
- return (1);
-}
-
-static char* stuff[] = {
-"bmp2tiff --- convert Windows BMP files to TIFF",
-"usage: bmp2tiff [options] input.bmp [input2.bmp ...] output.tif",
-"where options are:",
-" -r # make each strip have no more than # rows",
-"",
-" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding",
-" -c zip[:opts] compress output with deflate encoding",
-" -c jpeg[:opts]compress output with JPEG encoding",
-" -c packbits compress output with packbits encoding",
-" -c none use no compression algorithm on output",
-"",
-"JPEG options:",
-" # set compression quality level (0-100, default 75)",
-" r output color image as RGB rather than YCbCr",
-"For example, -c jpeg:r:50 to get JPEG-encoded RGB data with 50% comp. quality",
-"",
-"LZW and deflate options:",
-" # set predictor value",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-" -o out.tif write output to out.tif",
-" -h this help message",
-NULL
-};
-
-static void
-usage(void)
-{
- char buf[BUFSIZ];
- int i;
-
- setbuf(stderr, buf);
- fprintf(stderr, "%s\n\n", TIFFGetVersion());
- for (i = 0; stuff[i] != NULL; i++)
- fprintf(stderr, "%s\n", stuff[i]);
- exit(-1);
-}
-
-/* vim: set ts=8 sts=8 sw=8 noet: */
-/*
- * Local Variables:
- * mode: c
- * c-basic-offset: 8
- * fill-column: 78
- * End:
- */
diff --git a/tiff/tools/fax2ps.c b/tiff/tools/fax2ps.c
index b8cdf89f6..c49533157 100644
--- a/tiff/tools/fax2ps.c
+++ b/tiff/tools/fax2ps.c
@@ -1,4 +1,4 @@
-/* $Id: fax2ps.c,v 1.27 2011-04-02 19:30:20 bfriesen Exp $" */
+/* $Id: fax2ps.c,v 1.31 2015-09-06 18:24:27 bfriesen Exp $" */
/*
* Copyright (c) 1991-1997 Sam Leffler
@@ -47,6 +47,7 @@
# include "libport.h"
#endif
+#include "tiffiop.h"
#include "tiffio.h"
float defxres = 204.; /* default x resolution (pixels/inch) */
@@ -323,8 +324,10 @@ static void usage(int code);
int
main(int argc, char** argv)
{
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char* optarg;
+#endif
uint16 *pages = NULL, npages = 0, pageNumber;
int c, dowarnings = 0; /* if 1, enable library warnings */
TIFF* tif;
@@ -346,6 +349,11 @@ main(int argc, char** argv)
pages = (uint16*) realloc(pages, (npages+1)*sizeof(uint16));
else
pages = (uint16*) malloc(sizeof(uint16));
+ if( pages == NULL )
+ {
+ fprintf(stderr, "Out of memory\n");
+ exit(-1);
+ }
pages[npages++] = pageNumber;
break;
case 'w':
@@ -390,9 +398,15 @@ main(int argc, char** argv)
#if defined(HAVE_SETMODE) && defined(O_BINARY)
setmode(fileno(stdin), O_BINARY);
#endif
- while ((n = read(fileno(stdin), buf, sizeof (buf))) > 0)
- write(fileno(fd), buf, n);
- lseek(fileno(fd), 0, SEEK_SET);
+ while ((n = read(fileno(stdin), buf, sizeof (buf))) > 0) {
+ if (write(fileno(fd), buf, n) != n) {
+ fclose(fd);
+ fprintf(stderr,
+ "Could not copy stdin to temporary file.\n");
+ exit(-2);
+ }
+ }
+ _TIFF_lseek_f(fileno(fd), 0, SEEK_SET);
#if defined(_WIN32) && defined(USE_WIN32_FILEIO)
tif = TIFFFdOpen(_get_osfhandle(fileno(fd)), "temp", "r");
#else
diff --git a/tiff/tools/fax2tiff.c b/tiff/tools/fax2tiff.c
index 8881e5fc7..e00de5277 100644
--- a/tiff/tools/fax2tiff.c
+++ b/tiff/tools/fax2tiff.c
@@ -1,4 +1,4 @@
-/* $Id: fax2tiff.c,v 1.22 2010-03-10 18:56:49 bfriesen Exp $ */
+/* $Id: fax2tiff.c,v 1.25 2016-10-25 22:22:45 erouault Exp $ */
/*
* Copyright (c) 1990-1997 Sam Leffler
@@ -72,11 +72,26 @@ uint32 badfaxlines;
int copyFaxFile(TIFF* tifin, TIFF* tifout);
static void usage(void);
+/*
+ Struct to carry client data. Note that it does not appear that the client
+ data is actually used in this program.
+*/
+typedef struct _FAX_Client_Data
+{
+#if defined(_WIN32) && defined(USE_WIN32_FILEIO)
+ intptr_t fh; /* Operating system file handle */
+#else
+ int fd; /* Integer file descriptor */
+#endif
+
+} FAX_Client_Data;
+
int
main(int argc, char* argv[])
{
FILE *in;
TIFF *out = NULL;
+ FAX_Client_Data client_data;
TIFFErrorHandler whandler = NULL;
int compression_in = COMPRESSION_CCITTFAX3;
int compression_out = COMPRESSION_CCITTFAX3;
@@ -95,11 +110,13 @@ main(int argc, char* argv[])
int c;
int pn, npages;
float resY = 196.0;
+
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char* optarg;
+#endif
-
- while ((c = getopt(argc, argv, "R:X:o:1234ABLMPUW5678abcflmprsuvwz?")) != -1)
+ while ((c = getopt(argc, argv, "R:X:o:r:1234ABLMPUW5678abcflmprsuvwz?")) != -1)
switch (c) {
/* input-related options */
case '3': /* input is g3-encoded */
@@ -265,10 +282,11 @@ main(int argc, char* argv[])
continue;
}
#if defined(_WIN32) && defined(USE_WIN32_FILEIO)
- TIFFSetClientdata(faxTIFF, (thandle_t)_get_osfhandle(fileno(in)));
+ client_data.fh = _get_osfhandle(fileno(in));
#else
- TIFFSetClientdata(faxTIFF, (thandle_t)fileno(in));
+ client_data.fd = fileno(in);
#endif
+ TIFFSetClientdata(faxTIFF, (thandle_t) &client_data);
TIFFSetFileName(faxTIFF, (const char*)argv[optind]);
TIFFSetField(out, TIFFTAG_IMAGEWIDTH, xsize);
TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 1);
diff --git a/tiff/tools/gif2tiff.c b/tiff/tools/gif2tiff.c
deleted file mode 100644
index 17f7a19e6..000000000
--- a/tiff/tools/gif2tiff.c
+++ /dev/null
@@ -1,530 +0,0 @@
-/* $Id: gif2tiff.c,v 1.12 2010-12-15 00:22:44 faxguy Exp $ */
-
-/*
- * Copyright (c) 1990-1997 Sam Leffler
- * Copyright (c) 1991-1997 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.
- */
-
-/*
- * convert a GIF file into a TIFF file.
- * based on Paul Haeberli's fromgif program which in turn is
- * based on a GIF file reader by Marcel J.E. Mol March 23 1989
- *
- * if input is 320 by 200 pixel aspect is probably 1.2
- * if input is 640 350 pixel aspect is probably 1.37
- *
- */
-#include "tif_config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#ifdef NEED_LIBPORT
-# include "libport.h"
-#endif
-
-#include "tiffio.h"
-
-#define GIFGAMMA (1.5) /* smaller makes output img brighter */
-#define IMAX 0xffff /* max intensity value */
-#define EXTRAFUDGE 128 /* some people write BAD .gif files */
-
-#define streq(a,b) (strcmp(a,b) == 0)
-#define strneq(a,b,n) (strncmp(a,b,n) == 0)
-
-unsigned short gamtab[256];
-
-void
-makegamtab(float gam)
-{
- int i;
-
- for(i=0; i<256; i++)
- gamtab[i] = (unsigned short) (IMAX*pow(i/255.0,gam)+0.5);
-}
-
-char* stuff[] = {
-"usage: gif2tiff [options] input.gif output.tif",
-"where options are:",
-" -r # make each strip have no more than # rows",
-"",
-" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding",
-" -c zip[:opts] compress output with deflate encoding",
-" -c packbits compress output with packbits encoding",
-" -c none use no compression algorithm on output",
-"",
-"LZW and deflate options:",
-" # set predictor value",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-NULL
-};
-
-static void
-usage(void)
-{
- char buf[BUFSIZ];
- int i;
-
- setbuf(stderr, buf);
- fprintf(stderr, "%s\n\n", TIFFGetVersion());
- for (i = 0; stuff[i] != NULL; i++)
- fprintf(stderr, "%s\n", stuff[i]);
- exit(-1);
-}
-
-#define COLSIZE 256
-
-unsigned char *stackp;
-unsigned int prefix[4096];
-unsigned char suffix[4096];
-unsigned char stack[4096];
-int datasize,codesize,codemask; /* Decoder working variables */
-int clear,eoi; /* Special code values */
-int avail, oldcode;
-
-FILE *infile;
-int global; /* Is there a global color map? */
-int globalbits; /* Number of bits of global colors */
-unsigned char globalmap[COLSIZE][3];/* RGB values for global color map */
-unsigned char *raster; /* Decoded image data */
-unsigned long width, height;
-unsigned short red[COLSIZE];
-unsigned short green[COLSIZE];
-unsigned short blue[COLSIZE];
-char *filename, *imagename;
-
-static uint16 compression = COMPRESSION_PACKBITS;
-static uint16 predictor = 0;
-static uint32 rowsperstrip = (uint32) -1;
-static int processCompressOptions(char*);
-
-int convert(void);
-int checksignature(void);
-void readscreen(void);
-int readgifimage(char*);
-void readextension(void);
-int readraster(void);
-int process(int, unsigned char**);
-void initcolors(unsigned char [COLSIZE][3], int);
-void rasterize(int, char*);
-
-int
-main(int argc, char* argv[])
-{
- extern int optind;
- extern char *optarg;
- int c, status;
-
- while ((c = getopt(argc, argv, "c:r:")) != -1)
- switch (c) {
- case 'c': /* compression scheme */
- if (!processCompressOptions(optarg))
- usage();
- break;
- case 'r': /* rows/strip */
- rowsperstrip = atoi(optarg);
- break;
- case '?':
- usage();
- /*NOTREACHED*/
- }
- if (argc - optind != 2)
- usage();
-
- makegamtab(GIFGAMMA);
- filename = argv[optind];
- imagename = argv[optind+1];
- if ((infile = fopen(imagename, "rb")) != NULL) {
- int c;
- fclose(infile);
- printf("overwrite %s? ", imagename); fflush(stdout);
- c = getc(stdin);
- if (c != 'y' && c != 'Y')
- return (1);
- }
- if ((infile = fopen(filename, "rb")) == NULL) {
- perror(filename);
- return (1);
- }
- status = convert();
- fclose(infile);
- return (status);
-}
-
-static int
-processCompressOptions(char* opt)
-{
- if (streq(opt, "none"))
- compression = COMPRESSION_NONE;
- else if (streq(opt, "packbits"))
- compression = COMPRESSION_PACKBITS;
- else if (strneq(opt, "lzw", 3)) {
- char* cp = strchr(opt, ':');
- if (cp)
- predictor = atoi(cp+1);
- compression = COMPRESSION_LZW;
- } else if (strneq(opt, "zip", 3)) {
- char* cp = strchr(opt, ':');
- if (cp)
- predictor = atoi(cp+1);
- compression = COMPRESSION_DEFLATE;
- } else
- return (0);
- return (1);
-}
-
-int
-convert(void)
-{
- int ch;
- char* mode = "w";
-
- if (!checksignature())
- return (-1);
- readscreen();
- while ((ch = getc(infile)) != ';' && ch != EOF) {
- switch (ch) {
- case '\0': break; /* this kludge for non-standard files */
- case ',': if (!readgifimage(mode))
- return (-1);
- mode = "a"; /* subsequent images append */
- break;
- case '!': readextension();
- break;
- default: fprintf(stderr, "illegal GIF block type\n");
- return (-1);
- }
- }
- return (0);
-}
-
-int
-checksignature(void)
-{
- char buf[6];
-
- fread(buf,1,6,infile);
- if (strncmp(buf,"GIF",3)) {
- fprintf(stderr, "file is not a GIF file\n");
- return 0;
- }
- if (strncmp(&buf[3],"87a",3)) {
- fprintf(stderr, "unknown GIF version number\n");
- return 0;
- }
- return 1;
-}
-
-/*
- * readscreen -
- * Get information which is global to all the images stored
- * in the file
- */
-void
-readscreen(void)
-{
- unsigned char buf[7];
-
- fread(buf,1,7,infile);
- global = buf[4] & 0x80;
- if (global) {
- globalbits = (buf[4] & 0x07) + 1;
- fread(globalmap,3,((size_t)1)<<globalbits,infile);
- }
-}
-
-int
-readgifimage(char* mode)
-{
- unsigned char buf[9];
- int local, interleaved;
- unsigned char localmap[256][3];
- int localbits;
- int status;
-
- if (fread(buf, 1, 9, infile) == 0) {
- perror(filename);
- return (0);
- }
- width = buf[4] + (buf[5] << 8);
- height = buf[6] + (buf[7] << 8);
- local = buf[8] & 0x80;
- interleaved = buf[8] & 0x40;
-
- if (local == 0 && global == 0) {
- fprintf(stderr, "no colormap present for image\n");
- return (0);
- }
- if ((raster = (unsigned char*) _TIFFmalloc(width*height+EXTRAFUDGE)) == NULL) {
- fprintf(stderr, "not enough memory for image\n");
- return (0);
- }
- if (local) {
- localbits = (buf[8] & 0x7) + 1;
-
- fprintf(stderr, " local colors: %d\n", 1<<localbits);
-
- fread(localmap, 3, ((size_t)1)<<localbits, infile);
- initcolors(localmap, 1<<localbits);
- } else if (global) {
- initcolors(globalmap, 1<<globalbits);
- }
- if ((status = readraster()))
- rasterize(interleaved, mode);
- _TIFFfree(raster);
- return status;
-}
-
-/*
- * readextension -
- * Read a GIF extension block (and do nothing with it).
- *
- */
-void
-readextension(void)
-{
- int count;
- char buf[255];
-
- (void) getc(infile);
- while ((count = getc(infile)))
- fread(buf, 1, count, infile);
-}
-
-/*
- * readraster -
- * Decode a raster image
- *
- */
-int
-readraster(void)
-{
- unsigned char *fill = raster;
- unsigned char buf[255];
- register int bits=0;
- register unsigned long datum=0;
- register unsigned char *ch;
- register int count, code;
- int status = 1;
-
- datasize = getc(infile);
- clear = 1 << datasize;
- eoi = clear + 1;
- avail = clear + 2;
- oldcode = -1;
- codesize = datasize + 1;
- codemask = (1 << codesize) - 1;
- for (code = 0; code < clear; code++) {
- prefix[code] = 0;
- suffix[code] = code;
- }
- stackp = stack;
- for (count = getc(infile); count > 0; count = getc(infile)) {
- fread(buf,1,count,infile);
- for (ch=buf; count-- > 0; ch++) {
- datum += (unsigned long) *ch << bits;
- bits += 8;
- while (bits >= codesize) {
- code = datum & codemask;
- datum >>= codesize;
- bits -= codesize;
- if (code == eoi) { /* This kludge put in */
- goto exitloop; /* because some GIF files*/
- } /* aren't standard */
- if (!process(code, &fill)) {
- status = 0;
- goto exitloop;
- }
- }
- }
- if (fill >= raster + width*height) {
- fprintf(stderr, "raster full before eoi code\n");
- break;
- }
- }
-exitloop:
- if (fill != raster + width*height) {
- fprintf(stderr, "warning: wrong rastersize: %ld bytes\n",
- (long) (fill-raster));
- fprintf(stderr, " instead of %ld bytes\n",
- (long) width*height);
- }
- return status;
-}
-
-/*
- * process -
- * Process a compression code. "clear" resets the code table.
- * Otherwise make a new code table entry, and output the bytes
- * associated with the code.
- */
-int
-process(register int code, unsigned char** fill)
-{
- int incode;
- static unsigned char firstchar;
-
- if (code == clear) {
- codesize = datasize + 1;
- codemask = (1 << codesize) - 1;
- avail = clear + 2;
- oldcode = -1;
- return 1;
- }
-
- if (oldcode == -1) {
- *(*fill)++ = suffix[code];
- firstchar = oldcode = code;
- return 1;
- }
- if (code > avail) {
- fprintf(stderr, "code %d too large for %d\n", code, avail);
- return 0;
- }
-
- incode = code;
- if (code == avail) { /* the first code is always < avail */
- *stackp++ = firstchar;
- code = oldcode;
- }
- while (code > clear) {
- *stackp++ = suffix[code];
- code = prefix[code];
- }
-
- *stackp++ = firstchar = suffix[code];
- prefix[avail] = oldcode;
- suffix[avail] = firstchar;
- avail++;
-
- if (((avail & codemask) == 0) && (avail < 4096)) {
- codesize++;
- codemask += avail;
- }
- oldcode = incode;
- do {
- *(*fill)++ = *--stackp;
- } while (stackp > stack);
- return 1;
-}
-
-/*
- * initcolors -
- * Convert a color map (local or global) to arrays with R, G and B
- * values.
- *
- */
-void
-initcolors(unsigned char colormap[COLSIZE][3], int ncolors)
-{
- register int i;
-
- for (i = 0; i < ncolors; i++) {
- red[i] = gamtab[colormap[i][0]];
- green[i] = gamtab[colormap[i][1]];
- blue[i] = gamtab[colormap[i][2]];
- }
-}
-
-void
-rasterize(int interleaved, char* mode)
-{
- register unsigned long row;
- unsigned char *newras;
- unsigned char *ras;
- TIFF *tif;
- tstrip_t strip;
- tsize_t stripsize;
-
- if ((newras = (unsigned char*) _TIFFmalloc(width*height+EXTRAFUDGE)) == NULL) {
- fprintf(stderr, "not enough memory for image\n");
- return;
- }
-#define DRAWSEGMENT(offset, step) { \
- for (row = offset; row < height; row += step) { \
- _TIFFmemcpy(newras + row*width, ras, width);\
- ras += width; \
- } \
- }
- ras = raster;
- if (interleaved) {
- DRAWSEGMENT(0, 8);
- DRAWSEGMENT(4, 8);
- DRAWSEGMENT(2, 4);
- DRAWSEGMENT(1, 2);
- } else
- DRAWSEGMENT(0, 1);
-#undef DRAWSEGMENT
-
- tif = TIFFOpen(imagename, mode);
- if (!tif) {
- TIFFError(imagename,"Can not open output image");
- exit(-1);
- }
- TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32) width);
- TIFFSetField(tif, TIFFTAG_IMAGELENGTH, (uint32) height);
- TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
- TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
- TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
- TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8);
- TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP,
- rowsperstrip = TIFFDefaultStripSize(tif, rowsperstrip));
- TIFFSetField(tif, TIFFTAG_COMPRESSION, compression);
- switch (compression) {
- case COMPRESSION_LZW:
- case COMPRESSION_DEFLATE:
- if (predictor != 0)
- TIFFSetField(tif, TIFFTAG_PREDICTOR, predictor);
- break;
- }
- TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);
- TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
- strip = 0;
- stripsize = TIFFStripSize(tif);
- for (row=0; row<height; row += rowsperstrip) {
- if (rowsperstrip > height-row) {
- rowsperstrip = height-row;
- stripsize = TIFFVStripSize(tif, rowsperstrip);
- }
- if (TIFFWriteEncodedStrip(tif, strip, newras+row*width, stripsize) < 0)
- break;
- strip++;
- }
- TIFFClose(tif);
-
- _TIFFfree(newras);
-}
-
-/* vim: set ts=8 sts=8 sw=8 noet: */
-/*
- * Local Variables:
- * mode: c
- * c-basic-offset: 8
- * fill-column: 78
- * End:
- */
diff --git a/tiff/tools/pal2rgb.c b/tiff/tools/pal2rgb.c
index 8608aad1e..7a5780069 100644
--- a/tiff/tools/pal2rgb.c
+++ b/tiff/tools/pal2rgb.c
@@ -1,4 +1,4 @@
-/* $Id: pal2rgb.c,v 1.13 2010-07-02 12:02:56 dron Exp $ */
+/* $Id: pal2rgb.c,v 1.15 2015-06-21 01:09:10 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -81,8 +81,11 @@ main(int argc, char* argv[])
int cmap = -1;
TIFF *in, *out;
int c;
+
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char* optarg;
+#endif
while ((c = getopt(argc, argv, "C:c:p:r:")) != -1)
switch (c) {
@@ -372,7 +375,7 @@ static struct cpTag {
{ TIFFTAG_CLEANFAXDATA, 1, TIFF_SHORT },
{ TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG },
{ TIFFTAG_INKSET, 1, TIFF_SHORT },
- { TIFFTAG_INKNAMES, 1, TIFF_ASCII },
+ /*{ TIFFTAG_INKNAMES, 1, TIFF_ASCII },*/ /* Needs much more complicated logic. See tiffcp */
{ TIFFTAG_DOTRANGE, 2, TIFF_SHORT },
{ TIFFTAG_TARGETPRINTER, 1, TIFF_ASCII },
{ TIFFTAG_SAMPLEFORMAT, 1, TIFF_SHORT },
diff --git a/tiff/tools/ppm2tiff.c b/tiff/tools/ppm2tiff.c
index f78d5d4ec..91415e96c 100644
--- a/tiff/tools/ppm2tiff.c
+++ b/tiff/tools/ppm2tiff.c
@@ -1,4 +1,4 @@
-/* $Id: ppm2tiff.c,v 1.16 2010-04-10 19:22:34 bfriesen Exp $ */
+/* $Id: ppm2tiff.c,v 1.19 2015-06-21 01:09:10 bfriesen Exp $ */
/*
* Copyright (c) 1991-1997 Sam Leffler
@@ -72,6 +72,17 @@ BadPPM(char* file)
exit(-2);
}
+static tmsize_t
+multiply_ms(tmsize_t m1, tmsize_t m2)
+{
+ tmsize_t bytes = m1 * m2;
+
+ if (m1 && bytes / m1 != m2)
+ bytes = 0;
+
+ return bytes;
+}
+
int
main(int argc, char* argv[])
{
@@ -79,7 +90,7 @@ main(int argc, char* argv[])
uint32 rowsperstrip = (uint32) -1;
double resolution = -1;
unsigned char *buf = NULL;
- tsize_t linebytes = 0;
+ tmsize_t linebytes = 0;
uint16 spp = 1;
uint16 bpp = 8;
TIFF *out;
@@ -87,8 +98,11 @@ main(int argc, char* argv[])
unsigned int w, h, prec, row;
char *infile;
int c;
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char* optarg;
+#endif
+ tmsize_t scanline_size;
if (argc < 2) {
fprintf(stderr, "%s: Too few arguments\n", argv[0]);
@@ -221,7 +235,8 @@ main(int argc, char* argv[])
}
switch (bpp) {
case 1:
- linebytes = (spp * w + (8 - 1)) / 8;
+ /* if round-up overflows, result will be zero, OK */
+ linebytes = (multiply_ms(spp, w) + (8 - 1)) / 8;
if (rowsperstrip == (uint32) -1) {
TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, h);
} else {
@@ -230,15 +245,31 @@ main(int argc, char* argv[])
}
break;
case 8:
- linebytes = spp * w;
+ linebytes = multiply_ms(spp, w);
TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
TIFFDefaultStripSize(out, rowsperstrip));
break;
}
- if (TIFFScanlineSize(out) > linebytes)
+ if (linebytes == 0) {
+ fprintf(stderr, "%s: scanline size overflow\n", infile);
+ (void) TIFFClose(out);
+ exit(-2);
+ }
+ scanline_size = TIFFScanlineSize(out);
+ if (scanline_size == 0) {
+ /* overflow - TIFFScanlineSize already printed a message */
+ (void) TIFFClose(out);
+ exit(-2);
+ }
+ if (scanline_size < linebytes)
buf = (unsigned char *)_TIFFmalloc(linebytes);
else
- buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
+ buf = (unsigned char *)_TIFFmalloc(scanline_size);
+ if (buf == NULL) {
+ fprintf(stderr, "%s: Not enough memory\n", infile);
+ (void) TIFFClose(out);
+ exit(-2);
+ }
if (resolution > 0) {
TIFFSetField(out, TIFFTAG_XRESOLUTION, resolution);
TIFFSetField(out, TIFFTAG_YRESOLUTION, resolution);
diff --git a/tiff/tools/ras2tiff.c b/tiff/tools/ras2tiff.c
deleted file mode 100644
index ec8a07125..000000000
--- a/tiff/tools/ras2tiff.c
+++ /dev/null
@@ -1,316 +0,0 @@
-/* $Id: ras2tiff.c,v 1.18 2010-03-10 18:56:49 bfriesen Exp $ */
-
-/*
- * Copyright (c) 1988-1997 Sam Leffler
- * Copyright (c) 1991-1997 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.
- */
-
-#include "tif_config.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#ifdef NEED_LIBPORT
-# include "libport.h"
-#endif
-
-#include "rasterfile.h"
-#include "tiffio.h"
-
-#ifndef howmany
-#define howmany(x, y) (((x)+((y)-1))/(y))
-#endif
-#define streq(a,b) (strcmp(a,b) == 0)
-#define strneq(a,b,n) (strncmp(a,b,n) == 0)
-
-static uint16 compression = (uint16) -1;
-static int jpegcolormode = JPEGCOLORMODE_RGB;
-static int quality = 75; /* JPEG quality */
-static uint16 predictor = 0;
-
-static void usage(void);
-static int processCompressOptions(char*);
-
-int
-main(int argc, char* argv[])
-{
- unsigned char* buf;
- long row;
- tsize_t linebytes, scanline;
- TIFF *out;
- FILE *in;
- struct rasterfile h;
- uint16 photometric;
- uint16 config = PLANARCONFIG_CONTIG;
- uint32 rowsperstrip = (uint32) -1;
- int c;
- extern int optind;
- extern char* optarg;
-
- while ((c = getopt(argc, argv, "c:r:h")) != -1)
- switch (c) {
- case 'c': /* compression scheme */
- if (!processCompressOptions(optarg))
- usage();
- break;
- case 'r': /* rows/strip */
- rowsperstrip = atoi(optarg);
- break;
- case 'h':
- usage();
- /*NOTREACHED*/
- }
- if (argc - optind != 2)
- usage();
- in = fopen(argv[optind], "rb");
- if (in == NULL) {
- fprintf(stderr, "%s: Can not open.\n", argv[optind]);
- return (-1);
- }
- if (fread(&h, sizeof (h), 1, in) != 1) {
- fprintf(stderr, "%s: Can not read header.\n", argv[optind]);
- fclose(in);
- return (-2);
- }
- if (strcmp(h.ras_magic, RAS_MAGIC) == 0) {
-#ifndef WORDS_BIGENDIAN
- TIFFSwabLong((uint32 *)&h.ras_width);
- TIFFSwabLong((uint32 *)&h.ras_height);
- TIFFSwabLong((uint32 *)&h.ras_depth);
- TIFFSwabLong((uint32 *)&h.ras_length);
- TIFFSwabLong((uint32 *)&h.ras_type);
- TIFFSwabLong((uint32 *)&h.ras_maptype);
- TIFFSwabLong((uint32 *)&h.ras_maplength);
-#endif
- } else if (strcmp(h.ras_magic, RAS_MAGIC_INV) == 0) {
-#ifdef WORDS_BIGENDIAN
- TIFFSwabLong((uint32 *)&h.ras_width);
- TIFFSwabLong((uint32 *)&h.ras_height);
- TIFFSwabLong((uint32 *)&h.ras_depth);
- TIFFSwabLong((uint32 *)&h.ras_length);
- TIFFSwabLong((uint32 *)&h.ras_type);
- TIFFSwabLong((uint32 *)&h.ras_maptype);
- TIFFSwabLong((uint32 *)&h.ras_maplength);
-#endif
- } else {
- fprintf(stderr, "%s: Not a rasterfile.\n", argv[optind]);
- fclose(in);
- return (-3);
- }
- out = TIFFOpen(argv[optind+1], "w");
- if (out == NULL)
- {
- fclose(in);
- return (-4);
- }
- TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) h.ras_width);
- TIFFSetField(out, TIFFTAG_IMAGELENGTH, (uint32) h.ras_height);
- TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
- TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, h.ras_depth > 8 ? 3 : 1);
- TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, h.ras_depth > 1 ? 8 : 1);
- TIFFSetField(out, TIFFTAG_PLANARCONFIG, config);
- if (h.ras_maptype != RMT_NONE) {
- uint16* red;
- register uint16* map;
- register int i, j;
- int mapsize;
-
- buf = (unsigned char *)_TIFFmalloc(h.ras_maplength);
- if (buf == NULL) {
- fprintf(stderr, "No space to read in colormap.\n");
- return (-5);
- }
- if (fread(buf, h.ras_maplength, 1, in) != 1) {
- fprintf(stderr, "%s: Read error on colormap.\n",
- argv[optind]);
- return (-6);
- }
- mapsize = 1<<h.ras_depth;
- if (h.ras_maplength > mapsize*3) {
- fprintf(stderr,
- "%s: Huh, %ld colormap entries, should be %d?\n",
- argv[optind], h.ras_maplength, mapsize*3);
- return (-7);
- }
- red = (uint16*)_TIFFmalloc(mapsize * 3 * sizeof (uint16));
- if (red == NULL) {
- fprintf(stderr, "No space for colormap.\n");
- return (-8);
- }
- map = red;
- for (j = 0; j < 3; j++) {
-#define SCALE(x) (((x)*((1L<<16)-1))/255)
- for (i = h.ras_maplength/3; i-- > 0;)
- *map++ = SCALE(*buf++);
- if ((i = h.ras_maplength/3) < mapsize) {
- i = mapsize - i;
- _TIFFmemset(map, 0, i*sizeof (uint16));
- map += i;
- }
- }
- TIFFSetField(out, TIFFTAG_COLORMAP,
- red, red + mapsize, red + 2*mapsize);
- photometric = PHOTOMETRIC_PALETTE;
- if (compression == (uint16) -1)
- compression = COMPRESSION_PACKBITS;
- TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
- } else {
- /* XXX this is bogus... */
- photometric = h.ras_depth == 24 ?
- PHOTOMETRIC_RGB : PHOTOMETRIC_MINISBLACK;
- if (compression == (uint16) -1)
- compression = COMPRESSION_LZW;
- TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
- }
- switch (compression) {
- case COMPRESSION_JPEG:
- if (photometric == PHOTOMETRIC_RGB && jpegcolormode == JPEGCOLORMODE_RGB)
- photometric = PHOTOMETRIC_YCBCR;
- TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality);
- TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
- break;
- case COMPRESSION_LZW:
- case COMPRESSION_DEFLATE:
- if (predictor != 0)
- TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
- break;
- }
- TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric);
- linebytes = ((h.ras_depth*h.ras_width+15) >> 3) &~ 1;
- scanline = TIFFScanlineSize(out);
- if (scanline > linebytes) {
- buf = (unsigned char *)_TIFFmalloc(scanline);
- _TIFFmemset(buf+linebytes, 0, scanline-linebytes);
- } else
- buf = (unsigned char *)_TIFFmalloc(linebytes);
- TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
- TIFFDefaultStripSize(out, rowsperstrip));
- for (row = 0; row < h.ras_height; row++) {
- if (fread(buf, linebytes, 1, in) != 1) {
- fprintf(stderr, "%s: scanline %ld: Read error.\n",
- argv[optind], row);
- break;
- }
- if (h.ras_type == RT_STANDARD && h.ras_depth == 24) {
- tsize_t cc = h.ras_width;
- unsigned char* cp = buf;
-#define SWAP(a,b) { unsigned char t = (a); (a) = (b); (b) = t; }
- do {
- SWAP(cp[0], cp[2]);
- cp += 3;
- } while (--cc);
- }
- if (TIFFWriteScanline(out, buf, row, 0) < 0)
- break;
- }
- (void) TIFFClose(out);
- fclose(in);
- return (0);
-}
-
-static int
-processCompressOptions(char* opt)
-{
- if (streq(opt, "none"))
- compression = COMPRESSION_NONE;
- else if (streq(opt, "packbits"))
- compression = COMPRESSION_PACKBITS;
- else if (strneq(opt, "jpeg", 4)) {
- char* cp = strchr(opt, ':');
-
- compression = COMPRESSION_JPEG;
- while( cp )
- {
- if (isdigit((int)cp[1]))
- quality = atoi(cp+1);
- else if (cp[1] == 'r' )
- jpegcolormode = JPEGCOLORMODE_RAW;
- else
- usage();
-
- cp = strchr(cp+1,':');
- }
- } else if (strneq(opt, "lzw", 3)) {
- char* cp = strchr(opt, ':');
- if (cp)
- predictor = atoi(cp+1);
- compression = COMPRESSION_LZW;
- } else if (strneq(opt, "zip", 3)) {
- char* cp = strchr(opt, ':');
- if (cp)
- predictor = atoi(cp+1);
- compression = COMPRESSION_DEFLATE;
- } else
- return (0);
- return (1);
-}
-
-char* stuff[] = {
-"usage: ras2tiff [options] input.ras output.tif",
-"where options are:",
-" -r # make each strip have no more than # rows",
-"",
-" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding",
-" -c zip[:opts] compress output with deflate encoding",
-" -c jpeg[:opts] compress output with JPEG encoding",
-" -c packbits compress output with packbits encoding",
-" -c none use no compression algorithm on output",
-"",
-"JPEG options:",
-" # set compression quality level (0-100, default 75)",
-" r output color image as RGB rather than YCbCr",
-"For example, -c jpeg:r:50 to get JPEG-encoded RGB data with 50% comp. quality",
-"",
-"LZW and deflate options:",
-" # set predictor value",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-" -h this help message",
-NULL
-};
-
-static void
-usage(void)
-{
- char buf[BUFSIZ];
- int i;
-
- setbuf(stderr, buf);
- fprintf(stderr, "%s\n\n", TIFFGetVersion());
- for (i = 0; stuff[i] != NULL; i++)
- fprintf(stderr, "%s\n", stuff[i]);
- exit(-1);
-}
-
-/* vim: set ts=8 sts=8 sw=8 noet: */
-/*
- * Local Variables:
- * mode: c
- * c-basic-offset: 8
- * fill-column: 78
- * End:
- */
diff --git a/tiff/tools/rasterfile.h b/tiff/tools/rasterfile.h
deleted file mode 100644
index 833e095c7..000000000
--- a/tiff/tools/rasterfile.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* $Header: /cvs/libtiff/tools/rasterfile.h,v 1.3 2003/11/12 19:14:33 dron Exp $ */
-
-/*
- * Description of header for files containing raster images
- */
-struct rasterfile {
- char ras_magic[4]; /* magic number */
- long ras_width; /* width (pixels) of image */
- long ras_height; /* height (pixels) of image */
- long ras_depth; /* depth (1, 8, or 24 bits) of pixel */
- long ras_length; /* length (bytes) of image */
- long ras_type; /* type of file; see RT_* below */
- long ras_maptype; /* type of colormap; see RMT_* below */
- long ras_maplength; /* length (bytes) of following map */
- /* color map follows for ras_maplength bytes, followed by image */
-};
-#define RAS_MAGIC "\x59\xa6\x6a\x95"
-#define RAS_MAGIC_INV "\x95\x6a\xa6\x59"
-
- /* Sun supported ras_type's */
-#define RT_OLD 0 /* Raw pixrect image in 68000 byte order */
-#define RT_STANDARD 1 /* Raw pixrect image in 68000 byte order */
-#define RT_BYTE_ENCODED 2 /* Run-length compression of bytes */
-#define RT_EXPERIMENTAL 0xffff /* Reserved for testing */
-
- /* Sun registered ras_maptype's */
-#define RMT_RAW 2
- /* Sun supported ras_maptype's */
-#define RMT_NONE 0 /* ras_maplength is expected to be 0 */
-#define RMT_EQUAL_RGB 1 /* red[ras_maplength/3],green[],blue[] */
-
-/*
- * NOTES:
- * Each line of the image is rounded out to a multiple of 16 bits.
- * This corresponds to the rounding convention used by the memory pixrect
- * package (/usr/include/pixrect/memvar.h) of the SunWindows system.
- * The ras_encoding field (always set to 0 by Sun's supported software)
- * was renamed to ras_length in release 2.0. As a result, rasterfiles
- * of type 0 generated by the old software claim to have 0 length; for
- * compatibility, code reading rasterfiles must be prepared to compute the
- * true length from the width, height, and depth fields.
- */
diff --git a/tiff/tools/raw2tiff.c b/tiff/tools/raw2tiff.c
index 9ab980e51..7298e80a9 100644
--- a/tiff/tools/raw2tiff.c
+++ b/tiff/tools/raw2tiff.c
@@ -1,4 +1,4 @@
-/* $Id: raw2tiff.c,v 1.25 2010-03-10 18:56:49 bfriesen Exp $
+/* $Id: raw2tiff.c,v 1.28 2015-08-19 02:31:04 bfriesen Exp $
*
* Project: libtiff tools
* Purpose: Convert raw byte sequences in TIFF images
@@ -57,6 +57,7 @@
# include "libport.h"
#endif
+#include "tiffiop.h"
#include "tiffio.h"
#ifndef HAVE_GETOPT
@@ -78,7 +79,7 @@ static int quality = 75; /* JPEG quality */
static uint16 predictor = 0;
static void swapBytesInScanline(void *, uint32, TIFFDataType);
-static int guessSize(int, TIFFDataType, off_t, uint32, int,
+static int guessSize(int, TIFFDataType, _TIFF_off_t, uint32, int,
uint32 *, uint32 *);
static double correlation(void *, void *, uint32, TIFFDataType);
static void usage(void);
@@ -89,7 +90,7 @@ main(int argc, char* argv[])
{
uint32 width = 0, length = 0, linebytes, bufsize;
uint32 nbands = 1; /* number of bands in input image*/
- off_t hdr_size = 0; /* size of the header to skip */
+ _TIFF_off_t hdr_size = 0; /* size of the header to skip */
TIFFDataType dtype = TIFF_BYTE;
int16 depth = 1; /* bytes per pixel in input image */
int swab = 0; /* byte swapping flag */
@@ -105,8 +106,10 @@ main(int argc, char* argv[])
uint32 row, col, band;
int c;
unsigned char *buf = NULL, *buf1 = NULL;
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char* optarg;
+#endif
while ((c = getopt(argc, argv, "c:r:H:w:l:b:d:LMp:si:o:h")) != -1) {
switch (c) {
@@ -281,20 +284,26 @@ main(int argc, char* argv[])
}
TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, rowsperstrip );
- lseek(fd, hdr_size, SEEK_SET); /* Skip the file header */
+ _TIFF_lseek_f(fd, hdr_size, SEEK_SET); /* Skip the file header */
for (row = 0; row < length; row++) {
switch(interleaving) {
case BAND: /* band interleaved data */
for (band = 0; band < nbands; band++) {
- lseek(fd,
- hdr_size + (length*band+row)*linebytes,
- SEEK_SET);
+ if (_TIFF_lseek_f(fd,
+ hdr_size + (length*band+row)*linebytes,
+ SEEK_SET) == (_TIFF_off_t)-1) {
+ fprintf(stderr,
+ "%s: %s: scanline %lu: seek error.\n",
+ argv[0], argv[optind],
+ (unsigned long) row);
+ break;
+ }
if (read(fd, buf, linebytes) < 0) {
fprintf(stderr,
- "%s: %s: scanline %lu: Read error.\n",
- argv[0], argv[optind],
- (unsigned long) row);
- break;
+ "%s: %s: scanline %lu: Read error.\n",
+ argv[0], argv[optind],
+ (unsigned long) row);
+ break;
}
if (swab) /* Swap bytes if needed */
swapBytesInScanline(buf, width, dtype);
@@ -356,17 +365,20 @@ swapBytesInScanline(void *buf, uint32 width, TIFFDataType dtype)
}
static int
-guessSize(int fd, TIFFDataType dtype, off_t hdr_size, uint32 nbands,
+guessSize(int fd, TIFFDataType dtype, _TIFF_off_t hdr_size, uint32 nbands,
int swab, uint32 *width, uint32 *length)
{
const float longt = 40.0; /* maximum possible height/width ratio */
char *buf1, *buf2;
- struct stat filestat;
+ _TIFF_stat_s filestat;
uint32 w, h, scanlinesize, imagesize;
uint32 depth = TIFFDataWidth(dtype);
float cor_coef = 0, tmp;
- fstat(fd, &filestat);
+ if (_TIFF_fstat_f(fd, &filestat) == -1) {
+ fprintf(stderr, "Failed to obtain file size.\n");
+ return -1;
+ }
if (filestat.st_size < hdr_size) {
fprintf(stderr, "Too large header size specified.\n");
@@ -394,6 +406,7 @@ guessSize(int fd, TIFFDataType dtype, off_t hdr_size, uint32 nbands,
return 1;
} else if (*width == 0 && *length == 0) {
+ unsigned int fail = 0;
fprintf(stderr, "Image width and height are not specified.\n");
for (w = (uint32) sqrt(imagesize / longt);
@@ -404,33 +417,53 @@ guessSize(int fd, TIFFDataType dtype, off_t hdr_size, uint32 nbands,
buf1 = _TIFFmalloc(scanlinesize);
buf2 = _TIFFmalloc(scanlinesize);
h = imagesize / w;
- lseek(fd, hdr_size + (int)(h/2)*scanlinesize,
- SEEK_SET);
- read(fd, buf1, scanlinesize);
- read(fd, buf2, scanlinesize);
- if (swab) {
- swapBytesInScanline(buf1, w, dtype);
- swapBytesInScanline(buf2, w, dtype);
- }
- tmp = (float) fabs(correlation(buf1, buf2,
- w, dtype));
- if (tmp > cor_coef) {
- cor_coef = tmp;
- *width = w, *length = h;
- }
-
- _TIFFfree(buf1);
+ do {
+ if (_TIFF_lseek_f(fd, hdr_size + (int)(h/2)*scanlinesize,
+ SEEK_SET) == (_TIFF_off_t)-1) {
+ fprintf(stderr, "seek error.\n");
+ fail=1;
+ break;
+ }
+ if (read(fd, buf1, scanlinesize) !=
+ (long) scanlinesize) {
+ fprintf(stderr, "read error.\n");
+ fail=1;
+ break;
+ }
+ if (read(fd, buf2, scanlinesize) !=
+ (long) scanlinesize) {
+ fprintf(stderr, "read error.\n");
+ fail=1;
+ break;
+ }
+ if (swab) {
+ swapBytesInScanline(buf1, w, dtype);
+ swapBytesInScanline(buf2, w, dtype);
+ }
+ tmp = (float) fabs(correlation(buf1, buf2,
+ w, dtype));
+ if (tmp > cor_coef) {
+ cor_coef = tmp;
+ *width = w, *length = h;
+ }
+ } while (0);
+
+ _TIFFfree(buf1);
_TIFFfree(buf2);
}
}
+ if (fail) {
+ return -1;
+ }
+
fprintf(stderr,
"Width is guessed as %lu, height is guessed as %lu.\n",
(unsigned long)*width, (unsigned long)*length);
return 1;
} else {
- if (filestat.st_size<(off_t)(hdr_size+(*width)*(*length)*nbands*depth)) {
+ if (filestat.st_size<(_TIFF_off_t)(hdr_size+(*width)*(*length)*nbands*depth)) {
fprintf(stderr, "Input file too small.\n");
return -1;
}
diff --git a/tiff/tools/rgb2ycbcr.c b/tiff/tools/rgb2ycbcr.c
index 162aac10e..7a9d705e6 100644
--- a/tiff/tools/rgb2ycbcr.c
+++ b/tiff/tools/rgb2ycbcr.c
@@ -1,4 +1,4 @@
-/* $Id: rgb2ycbcr.c,v 1.14 2011-05-31 17:03:16 bfriesen Exp $ */
+/* $Id: rgb2ycbcr.c,v 1.17 2016-08-15 21:26:56 erouault Exp $ */
/*
* Copyright (c) 1991-1997 Sam Leffler
@@ -72,8 +72,10 @@ main(int argc, char* argv[])
{
TIFF *in, *out;
int c;
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char *optarg;
+#endif
while ((c = getopt(argc, argv, "c:h:r:v:z")) != -1)
switch (c) {
@@ -93,9 +95,13 @@ main(int argc, char* argv[])
break;
case 'h':
horizSubSampling = atoi(optarg);
+ if( horizSubSampling != 1 && horizSubSampling != 2 && horizSubSampling != 4 )
+ usage(-1);
break;
case 'v':
vertSubSampling = atoi(optarg);
+ if( vertSubSampling != 1 && vertSubSampling != 2 && vertSubSampling != 4 )
+ usage(-1);
break;
case 'r':
rowsperstrip = atoi(optarg);
@@ -332,7 +338,8 @@ tiffcvt(TIFF* in, TIFF* out)
TIFFSetField(out, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
{ char buf[2048];
char *cp = strrchr(TIFFFileName(in), '/');
- sprintf(buf, "YCbCr conversion of %s", cp ? cp+1 : TIFFFileName(in));
+ snprintf(buf, sizeof(buf), "YCbCr conversion of %s",
+ cp ? cp+1 : TIFFFileName(in));
TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, buf);
}
TIFFSetField(out, TIFFTAG_SOFTWARE, TIFFGetVersion());
diff --git a/tiff/tools/sgi2tiff.c b/tiff/tools/sgi2tiff.c
deleted file mode 100644
index 227e62107..000000000
--- a/tiff/tools/sgi2tiff.c
+++ /dev/null
@@ -1,335 +0,0 @@
-/* $Id: sgi2tiff.c,v 1.6 2010-03-10 18:56:49 bfriesen Exp $ */
-
-/*
- * Copyright (c) 1991-1997 Sam Leffler
- * Copyright (c) 1991-1997 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.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <gl/image.h>
-#include <ctype.h>
-
-#include "tiffio.h"
-
-#define streq(a,b) (strcmp(a,b) == 0)
-#define strneq(a,b,n) (strncmp(a,b,n) == 0)
-
-static short config = PLANARCONFIG_CONTIG;
-static uint16 compression = COMPRESSION_PACKBITS;
-static uint16 predictor = 0;
-static uint16 fillorder = 0;
-static uint32 rowsperstrip = (uint32) -1;
-static int jpegcolormode = JPEGCOLORMODE_RGB;
-static int quality = 75; /* JPEG quality */
-static uint16 photometric;
-
-static void usage(void);
-static int cpContig(IMAGE*, TIFF*);
-static int cpSeparate(IMAGE*, TIFF*);
-static int processCompressOptions(char*);
-
-/* XXX image library has no prototypes */
-extern IMAGE* iopen(const char*, const char*);
-extern void iclose(IMAGE*);
-extern void getrow(IMAGE*, short*, int, int);
-
-int
-main(int argc, char* argv[])
-{
- IMAGE *in;
- TIFF *out;
- int c;
- extern int optind;
- extern char* optarg;
-
- while ((c = getopt(argc, argv, "c:p:r:")) != -1)
- switch (c) {
- case 'c': /* compression scheme */
- if (!processCompressOptions(optarg))
- usage();
- break;
- case 'f': /* fill order */
- if (streq(optarg, "lsb2msb"))
- fillorder = FILLORDER_LSB2MSB;
- else if (streq(optarg, "msb2lsb"))
- fillorder = FILLORDER_MSB2LSB;
- else
- usage();
- break;
- case 'p': /* planar configuration */
- if (streq(optarg, "separate"))
- config = PLANARCONFIG_SEPARATE;
- else if (streq(optarg, "contig"))
- config = PLANARCONFIG_CONTIG;
- else
- usage();
- break;
- case 'r': /* rows/strip */
- rowsperstrip = atoi(optarg);
- break;
- case '?':
- usage();
- /*NOTREACHED*/
- }
- if (argc - optind != 2)
- usage();
- in = iopen(argv[optind], "r");
- if (in == NULL)
- return (-1);
- out = TIFFOpen(argv[optind+1], "w");
- if (out == NULL)
- return (-2);
- TIFFSetField(out, TIFFTAG_IMAGEWIDTH, (uint32) in->xsize);
- TIFFSetField(out, TIFFTAG_IMAGELENGTH, (uint32) in->ysize);
- TIFFSetField(out, TIFFTAG_BITSPERSAMPLE, 8);
- TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
- if (in->zsize == 1)
- photometric = PHOTOMETRIC_MINISBLACK;
- else
- photometric = PHOTOMETRIC_RGB;
- switch (compression) {
- case COMPRESSION_JPEG:
- if (photometric == PHOTOMETRIC_RGB && jpegcolormode == JPEGCOLORMODE_RGB)
- photometric = PHOTOMETRIC_YCBCR;
- TIFFSetField(out, TIFFTAG_JPEGQUALITY, quality);
- TIFFSetField(out, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
- break;
- case COMPRESSION_LZW:
- case COMPRESSION_DEFLATE:
- if (predictor != 0)
- TIFFSetField(out, TIFFTAG_PREDICTOR, predictor);
- break;
- }
- TIFFSetField(out, TIFFTAG_PHOTOMETRIC, photometric);
- if (fillorder != 0)
- TIFFSetField(out, TIFFTAG_FILLORDER, fillorder);
- TIFFSetField(out, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
- TIFFSetField(out, TIFFTAG_SAMPLESPERPIXEL, in->zsize);
- if (in->zsize > 3) {
- uint16 v[1];
- v[0] = EXTRASAMPLE_UNASSALPHA;
- TIFFSetField(out, TIFFTAG_EXTRASAMPLES, 1, v);
- }
- TIFFSetField(out, TIFFTAG_MINSAMPLEVALUE, (uint16) in->min);
- TIFFSetField(out, TIFFTAG_MAXSAMPLEVALUE, (uint16) in->max);
- TIFFSetField(out, TIFFTAG_PLANARCONFIG, config);
- if (config != PLANARCONFIG_SEPARATE)
- TIFFSetField(out, TIFFTAG_ROWSPERSTRIP,
- TIFFDefaultStripSize(out, rowsperstrip));
- else /* force 1 row/strip for library limitation */
- TIFFSetField(out, TIFFTAG_ROWSPERSTRIP, 1L);
- if (in->name[0] != '\0')
- TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, in->name);
- if (config == PLANARCONFIG_CONTIG)
- cpContig(in, out);
- else
- cpSeparate(in, out);
- (void) iclose(in);
- (void) TIFFClose(out);
- return (0);
-}
-
-static int
-processCompressOptions(char* opt)
-{
- if (streq(opt, "none"))
- compression = COMPRESSION_NONE;
- else if (streq(opt, "packbits"))
- compression = COMPRESSION_PACKBITS;
- else if (strneq(opt, "jpeg", 4)) {
- char* cp = strchr(opt, ':');
-
- defcompression = COMPRESSION_JPEG;
- while( cp )
- {
- if (isdigit((int)cp[1]))
- quality = atoi(cp+1);
- else if (cp[1] == 'r' )
- jpegcolormode = JPEGCOLORMODE_RAW;
- else
- usage();
-
- cp = strchr(cp+1,':');
- }
- } else if (strneq(opt, "lzw", 3)) {
- char* cp = strchr(opt, ':');
- if (cp)
- predictor = atoi(cp+1);
- compression = COMPRESSION_LZW;
- } else if (strneq(opt, "zip", 3)) {
- char* cp = strchr(opt, ':');
- if (cp)
- predictor = atoi(cp+1);
- compression = COMPRESSION_DEFLATE;
- } else
- return (0);
- return (1);
-}
-
-static int
-cpContig(IMAGE* in, TIFF* out)
-{
- tdata_t buf = _TIFFmalloc(TIFFScanlineSize(out));
- short *r = NULL;
- int x, y;
-
- if (in->zsize == 3) {
- short *g, *b;
-
- r = (short *)_TIFFmalloc(3 * in->xsize * sizeof (short));
- g = r + in->xsize;
- b = g + in->xsize;
- for (y = in->ysize-1; y >= 0; y--) {
- uint8* pp = (uint8*) buf;
-
- getrow(in, r, y, 0);
- getrow(in, g, y, 1);
- getrow(in, b, y, 2);
- for (x = 0; x < in->xsize; x++) {
- pp[0] = r[x];
- pp[1] = g[x];
- pp[2] = b[x];
- pp += 3;
- }
- if (TIFFWriteScanline(out, buf, in->ysize-y-1, 0) < 0)
- goto bad;
- }
- } else if (in->zsize == 4) {
- short *g, *b, *a;
-
- r = (short *)_TIFFmalloc(4 * in->xsize * sizeof (short));
- g = r + in->xsize;
- b = g + in->xsize;
- a = b + in->xsize;
- for (y = in->ysize-1; y >= 0; y--) {
- uint8* pp = (uint8*) buf;
-
- getrow(in, r, y, 0);
- getrow(in, g, y, 1);
- getrow(in, b, y, 2);
- getrow(in, a, y, 3);
- for (x = 0; x < in->xsize; x++) {
- pp[0] = r[x];
- pp[1] = g[x];
- pp[2] = b[x];
- pp[3] = a[x];
- pp += 4;
- }
- if (TIFFWriteScanline(out, buf, in->ysize-y-1, 0) < 0)
- goto bad;
- }
- } else {
- uint8* pp = (uint8*) buf;
-
- r = (short *)_TIFFmalloc(in->xsize * sizeof (short));
- for (y = in->ysize-1; y >= 0; y--) {
- getrow(in, r, y, 0);
- for (x = in->xsize-1; x >= 0; x--)
- pp[x] = r[x];
- if (TIFFWriteScanline(out, buf, in->ysize-y-1, 0) < 0)
- goto bad;
- }
- }
- if (r)
- _TIFFfree(r);
- _TIFFfree(buf);
- return (1);
-bad:
- if (r)
- _TIFFfree(r);
- _TIFFfree(buf);
- return (0);
-}
-
-static int
-cpSeparate(IMAGE* in, TIFF* out)
-{
- tdata_t buf = _TIFFmalloc(TIFFScanlineSize(out));
- short *r = (short *)_TIFFmalloc(in->xsize * sizeof (short));
- uint8* pp = (uint8*) buf;
- int x, y, z;
-
- for (z = 0; z < in->zsize; z++) {
- for (y = in->ysize-1; y >= 0; y--) {
- getrow(in, r, y, z);
- for (x = 0; x < in->xsize; x++)
- pp[x] = r[x];
- if (TIFFWriteScanline(out, buf, in->ysize-y-1, z) < 0)
- goto bad;
- }
- }
- _TIFFfree(r);
- _TIFFfree(buf);
- return (1);
-bad:
- _TIFFfree(r);
- _TIFFfree(buf);
- return (0);
-}
-
-char* stuff[] = {
-"usage: sgi2tiff [options] input.rgb output.tif",
-"where options are:",
-" -r # make each strip have no more than # rows",
-"",
-" -p contig pack samples contiguously (e.g. RGBRGB...)",
-" -p separate store samples separately (e.g. RRR...GGG...BBB...)",
-"",
-" -f lsb2msb force lsb-to-msb FillOrder for output",
-" -f msb2lsb force msb-to-lsb FillOrder for output",
-"",
-" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding",
-" -c zip[:opts] compress output with deflate encoding",
-" -c jpeg[:opts]compress output with JPEG encoding",
-" -c packbits compress output with packbits encoding",
-" -c none use no compression algorithm on output",
-"",
-"JPEG options:",
-" # set compression quality level (0-100, default 75)",
-" r output color image as RGB rather than YCbCr",
-"",
-"LZW and deflate options:",
-" # set predictor value",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-NULL
-};
-
-static void
-usage(void)
-{
- char buf[BUFSIZ];
- int i;
-
- setbuf(stderr, buf);
- for (i = 0; stuff[i] != NULL; i++)
- fprintf(stderr, "%s\n", stuff[i]);
- exit(-1);
-}
-/*
- * Local Variables:
- * mode: c
- * c-basic-offset: 8
- * fill-column: 78
- * End:
- */
diff --git a/tiff/tools/sgisv.c b/tiff/tools/sgisv.c
deleted file mode 100644
index e0d91e06f..000000000
--- a/tiff/tools/sgisv.c
+++ /dev/null
@@ -1,316 +0,0 @@
-/* $Id: sgisv.c,v 1.6 2010-03-10 18:56:49 bfriesen Exp $ */
-
-/*
- * Copyright (c) 1990-1997 Sam Leffler
- * Copyright (c) 1991-1997 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.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <gl.h>
-#include <ctype.h>
-
-#include "tiffio.h"
-
-typedef unsigned char unsigned char;
-typedef unsigned long uint32;
-
-#define streq(a,b) (strcmp(a,b) == 0)
-#define strneq(a,b,n) (strncmp(a,b,n) == 0)
-
-uint32 rowsperstrip = (uint32) -1;
-uint16 compression = COMPRESSION_PACKBITS;
-uint16 config = PLANARCONFIG_CONTIG;
-uint16 predictor = 0;
-int xmaxscreen;
-int ymaxscreen;
-uint16 photometric = PHOTOMETRIC_RGB;
-int jpegcolormode = JPEGCOLORMODE_RGB;
-int quality = 75; /* JPEG quality */
-
-static void usage(void);
-static void tiffsv(char*, int, int, int, int);
-
-int
-main(int argc, char* argv[])
-{
- int c;
- extern int optind;
- extern char* optarg;
-
- while ((c = getopt(argc, argv, "c:p:r:")) != -1)
- switch (c) {
- case 'b': /* save as b&w */
- photometric = PHOTOMETRIC_MINISBLACK;
- break;
- case 'c': /* compression scheme */
- if (streq(optarg, "none"))
- compression = COMPRESSION_NONE;
- else if (streq(optarg, "packbits"))
- compression = COMPRESSION_PACKBITS;
- else if (strneq(optarg, "jpeg", 4)) {
- char* cp = strchr(optarg, ':');
- if (cp && isdigit(cp[1]))
- quality = atoi(cp+1);
- if (cp && strchr(cp, 'r'))
- jpegcolormode = JPEGCOLORMODE_RAW;
- compression = COMPRESSION_JPEG;
- } else if (strneq(optarg, "lzw", 3)) {
- char* cp = strchr(optarg, ':');
- if (cp)
- predictor = atoi(cp+1);
- compression = COMPRESSION_LZW;
- } else
- usage();
- break;
- case 'p': /* planar configuration */
- if (streq(optarg, "separate"))
- config = PLANARCONFIG_SEPARATE;
- else if (streq(optarg, "contig"))
- config = PLANARCONFIG_CONTIG;
- else
- usage();
- break;
- case 'r': /* rows/strip */
- rowsperstrip = atoi(optarg);
- break;
- case '?':
- usage();
- /*NOTREACHED*/
- }
- if (argc - optind != 1 && argc - optind != 5)
- usage();
- xmaxscreen = getgdesc(GD_XPMAX)-1;
- ymaxscreen = getgdesc(GD_YPMAX)-1;
- foreground();
- noport();
- winopen("tiffsv");
- if (argc - optind == 5)
- tiffsv(argv[optind],
- atoi(argv[optind+1]), atoi(argv[optind+2]),
- atoi(argv[optind+3]), atoi(argv[optind+4]));
- else
- tiffsv(argv[optind], 0, xmaxscreen, 0, ymaxscreen);
- return (0);
-}
-
-char* stuff[] = {
-"usage: tiffsv [options] outimage.tif [x1 x2 y1 y2] [-b]",
-"where options are:",
-" -p contig pack samples contiguously (e.g. RGBRGB...)",
-" -p separate store samples separately (e.g. RRR...GGG...BBB...)",
-"",
-" -r # make each strip have no more than # rows",
-"",
-" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding",
-" -c jpeg[:opts]compress output with JPEG encoding",
-" -c packbits compress output with packbits encoding",
-" -c none use no compression algorithm on output",
-"",
-"JPEG options:",
-" # set compression quality level (0-100, default 75)",
-" r output color image as RGB rather than YCbCr",
-"",
-"LZW options:",
-" # set predictor value for Lempel-Ziv & Welch encoding",
-"For example, -c lzw:2 to get LZW-encoded data with horizontal differencing",
-NULL
-};
-
-static void
-usage(void)
-{
- char buf[BUFSIZ];
- int i;
-
- setbuf(stderr, buf);
- for (i = 0; stuff[i] != NULL; i++)
- fprintf(stderr, "%s\n", stuff[i]);
- exit(-1);
-}
-
-static void
-svRGBSeparate(TIFF* tif, uint32* ss, int xsize, int ysize)
-{
- tsize_t stripsize = TIFFStripSize(tif);
- unsigned char *rbuf = (unsigned char *)_TIFFmalloc(3*stripsize);
- unsigned char *gbuf = rbuf + stripsize;
- unsigned char *bbuf = gbuf + stripsize;
- register int y;
-
- for (y = 0; y <= ysize; y += rowsperstrip) {
- unsigned char *rp, *gp, *bp;
- register int x;
- register uint32 n;
-
- n = rowsperstrip;
- if (n > ysize-y+1)
- n = ysize-y+1;
- rp = rbuf; gp = gbuf; bp = bbuf;
- do {
- for (x = 0; x <= xsize; x++) {
- uint32 v = ss[x];
- rp[x] = v;
- gp[x] = v >> 8;
- bp[x] = v >> 16;
- }
- rp += xsize+1, gp += xsize+1, bp += xsize+1;
- ss += xsize+1;
- } while (--n);
- if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,0),
- rbuf, stripsize) < 0)
- break;
- if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,1),
- gbuf, stripsize) < 0)
- break;
- if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,2),
- bbuf, stripsize) < 0)
- break;
- }
- _TIFFfree(rbuf);
-}
-
-static void
-svRGBContig(TIFF* tif, uint32* ss, int xsize, int ysize)
-{
- register int x, y;
- tsize_t stripsize = TIFFStripSize(tif);
- unsigned char *strip = (unsigned char *)_TIFFmalloc(stripsize);
-
- for (y = 0; y <= ysize; y += rowsperstrip) {
- register unsigned char *pp = strip;
- register uint32 n;
-
- n = rowsperstrip;
- if (n > ysize-y+1)
- n = ysize-y+1;
- do {
- for (x = 0; x <= xsize; x++) {
- uint32 v = ss[x];
- pp[0] = v;
- pp[1] = v >> 8;
- pp[2] = v >> 16;
- pp += 3;
- }
- ss += xsize+1;
- } while (--n);
- if (TIFFWriteEncodedStrip(tif, TIFFComputeStrip(tif,y,0),
- strip, stripsize) < 0)
- break;
- }
- _TIFFfree(strip);
-}
-
-#undef RED
-#undef GREEN
-#undef BLUE
-#define CVT(x) (((x)*255)/100)
-#define RED CVT(28) /* 28% */
-#define GREEN CVT(59) /* 59% */
-#define BLUE CVT(11) /* 11% */
-
-static void
-svGrey(TIFF* tif, uint32* ss, int xsize, int ysize)
-{
- register int x, y;
- unsigned char *buf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(tif));
-
- for (y = 0; y <= ysize; y++) {
- for (x = 0; x <= xsize; x++) {
- unsigned char *cp = (unsigned char *)&ss[x];
- buf[x] = (RED*cp[3] + GREEN*cp[2] + BLUE*cp[1]) >> 8;
- }
- if (TIFFWriteScanline(tif, buf, (uint32) y, 0) < 0)
- break;
- ss += xsize+1;
- }
- _TIFFfree(buf);
-}
-
-#define MIN(a,b) ((a)<(b)?(a):(b))
-#define ABS(x) ((x)<0?-(x):(x))
-
-static void
-tiffsv(char* name, int x1, int x2, int y1, int y2)
-{
- TIFF *tif;
- int xsize, ysize;
- int xorg, yorg;
- uint32 *scrbuf;
-
- xorg = MIN(x1,x2);
- yorg = MIN(y1,y2);
- if (xorg<0)
- xorg = 0;
- if (yorg<0)
- yorg = 0;
- xsize = ABS(x2-x1);
- ysize = ABS(y2-y1);
- if (xorg+xsize > xmaxscreen)
- xsize = xmaxscreen-xorg;
- if (yorg+ysize > ymaxscreen)
- ysize = ymaxscreen-yorg;
- tif = TIFFOpen(name, "w");
- TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, (uint32) (xsize+1));
- TIFFSetField(tif, TIFFTAG_IMAGELENGTH, (uint32) (ysize+1));
- TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, 8);
- TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL,
- photometric == PHOTOMETRIC_RGB ? 3 : 1);
- TIFFSetField(tif, TIFFTAG_PLANARCONFIG, config);
- TIFFSetField(tif, TIFFTAG_COMPRESSION, compression);
- switch (compression) {
- case COMPRESSION_JPEG:
- if (photometric == PHOTOMETRIC_RGB && jpegcolormode == JPEGCOLORMODE_RGB)
- photometric = PHOTOMETRIC_YCBCR;
- TIFFSetField(tif, TIFFTAG_JPEGQUALITY, quality);
- TIFFSetField(tif, TIFFTAG_JPEGCOLORMODE, jpegcolormode);
- break;
- case COMPRESSION_LZW:
- if (predictor != 0)
- TIFFSetField(tif, TIFFTAG_PREDICTOR, predictor);
- break;
- }
- TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, photometric);
- TIFFSetField(tif, TIFFTAG_ORIENTATION, ORIENTATION_BOTLEFT);
- rowsperstrip = TIFFDefaultStripSize(tif, rowsperstrip);
- TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, rowsperstrip);
- scrbuf = (uint32 *)_TIFFmalloc((xsize+1)*(ysize+1)*sizeof (uint32));
- readdisplay(xorg, yorg, xorg+xsize, yorg+ysize, scrbuf, RD_FREEZE);
- if (photometric == PHOTOMETRIC_RGB) {
- if (config == PLANARCONFIG_SEPARATE)
- svRGBSeparate(tif, scrbuf, xsize, ysize);
- else
- svRGBContig(tif, scrbuf, xsize, ysize);
- } else
- svGrey(tif, scrbuf, xsize, ysize);
- (void) TIFFClose(tif);
- _TIFFfree((char *)scrbuf);
-}
-/*
- * Local Variables:
- * mode: c
- * c-basic-offset: 8
- * fill-column: 78
- * End:
- */
diff --git a/tiff/tools/thumbnail.c b/tiff/tools/thumbnail.c
index fd1cba575..ab6a1d28d 100644
--- a/tiff/tools/thumbnail.c
+++ b/tiff/tools/thumbnail.c
@@ -1,4 +1,4 @@
-/* $Id: thumbnail.c,v 1.16 2010-07-02 12:02:56 dron Exp $ */
+/* $Id: thumbnail.c,v 1.21 2015-06-21 01:09:10 bfriesen Exp $ */
/*
* Copyright (c) 1994-1997 Sam Leffler
@@ -71,8 +71,10 @@ static int generateThumbnail(TIFF*, TIFF*);
static void initScale();
static void usage(void);
+#if !HAVE_DECL_OPTARG
extern char* optarg;
extern int optind;
+#endif
int
main(int argc, char* argv[])
@@ -257,7 +259,7 @@ static struct cpTag {
{ TIFFTAG_CLEANFAXDATA, 1, TIFF_SHORT },
{ TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG },
{ TIFFTAG_INKSET, 1, TIFF_SHORT },
- { TIFFTAG_INKNAMES, 1, TIFF_ASCII },
+ /*{ TIFFTAG_INKNAMES, 1, TIFF_ASCII },*/ /* Needs much more complicated logic. See tiffcp */
{ TIFFTAG_DOTRANGE, 2, TIFF_SHORT },
{ TIFFTAG_TARGETPRINTER, 1, TIFF_ASCII },
{ TIFFTAG_SAMPLEFORMAT, 1, TIFF_SHORT },
@@ -274,7 +276,26 @@ cpTags(TIFF* in, TIFF* out)
{
struct cpTag *p;
for (p = tags; p < &tags[NTAGS]; p++)
- cpTag(in, out, p->tag, p->count, p->type);
+ {
+ /* Horrible: but TIFFGetField() expects 2 arguments to be passed */
+ /* if we request a tag that is defined in a codec, but that codec */
+ /* isn't used */
+ if( p->tag == TIFFTAG_GROUP3OPTIONS )
+ {
+ uint16 compression;
+ if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) ||
+ compression != COMPRESSION_CCITTFAX3 )
+ continue;
+ }
+ if( p->tag == TIFFTAG_GROUP4OPTIONS )
+ {
+ uint16 compression;
+ if( !TIFFGetField(in, TIFFTAG_COMPRESSION, &compression) ||
+ compression != COMPRESSION_CCITTFAX4 )
+ continue;
+ }
+ cpTag(in, out, p->tag, p->count, p->type);
+ }
}
#undef NTAGS
@@ -549,7 +570,13 @@ setImage1(const uint8* br, uint32 rw, uint32 rh)
err -= limit;
sy++;
if (err >= limit)
- rows[nrows++] = br + bpr*sy;
+ {
+ /* We should perhaps error loudly, but I can't make sense of that */
+ /* code... */
+ if( nrows == 256 )
+ break;
+ rows[nrows++] = br + bpr*sy;
+ }
}
setrow(row, nrows, rows);
row += tnw;
@@ -585,12 +612,17 @@ generateThumbnail(TIFF* in, TIFF* out)
rowsize = TIFFScanlineSize(in);
rastersize = sh * rowsize;
fprintf(stderr, "rastersize=%u\n", (unsigned int)rastersize);
- raster = (unsigned char*)_TIFFmalloc(rastersize);
+ /* +3 : add a few guard bytes since setrow() can read a bit */
+ /* outside buffer */
+ raster = (unsigned char*)_TIFFmalloc(rastersize+3);
if (!raster) {
TIFFError(TIFFFileName(in),
"Can't allocate space for raster buffer.");
return 0;
}
+ raster[rastersize] = 0;
+ raster[rastersize+1] = 0;
+ raster[rastersize+2] = 0;
rp = raster;
for (s = 0; s < ns; s++) {
(void) TIFFReadEncodedStrip(in, s, rp, -1);
diff --git a/tiff/tools/tiff2bw.c b/tiff/tools/tiff2bw.c
index bda754a0a..743f455c2 100644
--- a/tiff/tools/tiff2bw.c
+++ b/tiff/tools/tiff2bw.c
@@ -1,4 +1,4 @@
-/* $Id: tiff2bw.c,v 1.15 2010-07-02 12:02:56 dron Exp $ */
+/* $Id: tiff2bw.c,v 1.19 2016-08-15 22:01:31 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -45,7 +45,7 @@
#define strneq(a,b,n) (strncmp(a,b,n) == 0)
/* x% weighting -> fraction of full color */
-#define PCT(x) (((x)*255+127)/100)
+#define PCT(x) (((x)*256+50)/100)
int RED = PCT(30); /* 30% */
int GREEN = PCT(59); /* 59% */
int BLUE = PCT(11); /* 11% */
@@ -127,8 +127,10 @@ main(int argc, char* argv[])
unsigned char *inbuf, *outbuf;
char thing[1024];
int c;
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char *optarg;
+#endif
while ((c = getopt(argc, argv, "c:r:R:G:B:")) != -1)
switch (c) {
@@ -171,6 +173,11 @@ main(int argc, char* argv[])
argv[optind], samplesperpixel);
return (-1);
}
+ if( photometric == PHOTOMETRIC_RGB && samplesperpixel != 3) {
+ fprintf(stderr, "%s: Bad samples/pixel %u for PHOTOMETRIC_RGB.\n",
+ argv[optind], samplesperpixel);
+ return (-1);
+ }
TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bitspersample);
if (bitspersample != 8) {
fprintf(stderr,
@@ -205,7 +212,7 @@ main(int argc, char* argv[])
}
}
TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
- sprintf(thing, "B&W version of %s", argv[optind]);
+ snprintf(thing, sizeof(thing), "B&W version of %s", argv[optind]);
TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing);
TIFFSetField(out, TIFFTAG_SOFTWARE, "tiff2bw");
outbuf = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(out));
diff --git a/tiff/tools/tiff2pdf.c b/tiff/tools/tiff2pdf.c
index 48272d931..fe8a6ea7e 100644
--- a/tiff/tools/tiff2pdf.c
+++ b/tiff/tools/tiff2pdf.c
@@ -1,4 +1,4 @@
-/* $Id: tiff2pdf.c,v 1.65 2011-05-31 17:00:03 bfriesen Exp $
+/* $Id: tiff2pdf.c,v 1.97 2016-11-11 21:28:24 erouault Exp $
*
* tiff2pdf - converts a TIFF image to a PDF document
*
@@ -32,6 +32,7 @@
#include <ctype.h>
#include <time.h>
#include <errno.h>
+#include <limits.h>
#if HAVE_UNISTD_H
# include <unistd.h>
@@ -285,7 +286,7 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P*, TIFF*, TIFF*, ttile_t);
int t2p_process_ojpeg_tables(T2P*, TIFF*);
#endif
#ifdef JPEG_SUPPORT
-int t2p_process_jpeg_strip(unsigned char*, tsize_t*, unsigned char*, tsize_t*, tstrip_t, uint32);
+int t2p_process_jpeg_strip(unsigned char*, tsize_t*, unsigned char*, tsize_t, tsize_t*, tstrip_t, uint32);
#endif
void t2p_tile_collapse_left(tdata_t, tsize_t, uint32, uint32, uint32);
void t2p_write_advance_directory(T2P*, TIFF*);
@@ -332,6 +333,13 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t, T2P*, TIFF*);
tsize_t t2p_write_pdf_xreftable(T2P*, TIFF*);
tsize_t t2p_write_pdf_trailer(T2P*, TIFF*);
+#define check_snprintf_ret(t2p, rv, buf) do { \
+ if ((rv) < 0) rv = 0; \
+ else if((rv) >= (int)sizeof(buf)) (rv) = sizeof(buf) - 1; \
+ else break; \
+ if ((t2p) != NULL) (t2p)->t2p_error = T2P_ERR_ERROR; \
+} while(0)
+
static void
t2p_disable(TIFF *tif)
{
@@ -350,6 +358,7 @@ t2p_enable(TIFF *tif)
* Procs for TIFFClientOpen
*/
+#ifdef OJPEG_SUPPORT
static tmsize_t
t2pReadFile(TIFF *tif, tdata_t data, tmsize_t size)
{
@@ -359,6 +368,7 @@ t2pReadFile(TIFF *tif, tdata_t data, tmsize_t size)
return proc(client, data, size);
return -1;
}
+#endif /* OJPEG_SUPPORT */
static tmsize_t
t2pWriteFile(TIFF *tif, tdata_t data, tmsize_t size)
@@ -404,15 +414,15 @@ t2p_seekproc(thandle_t handle, uint64 offset, int whence)
{
T2P *t2p = (T2P*) handle;
if (t2p->outputdisable <= 0 && t2p->outputfile)
- return fseek(t2p->outputfile, (long) offset, whence);
+ return _TIFF_fseek_f(t2p->outputfile, (_TIFF_off_t) offset, whence);
return offset;
}
static int
t2p_closeproc(thandle_t handle)
{
- (void) handle;
- return 0;
+ T2P *t2p = (T2P*) handle;
+ return fclose(t2p->outputfile);
}
static uint64
@@ -435,6 +445,36 @@ t2p_unmapproc(thandle_t handle, void *data, toff_t offset)
(void) handle, (void) data, (void) offset;
}
+#if defined(OJPEG_SUPPORT) || defined(JPEG_SUPPORT)
+static uint64
+checkAdd64(uint64 summand1, uint64 summand2, T2P* t2p)
+{
+ uint64 bytes = summand1 + summand2;
+
+ if (bytes < summand1) {
+ TIFFError(TIFF2PDF_MODULE, "Integer overflow");
+ t2p->t2p_error = T2P_ERR_ERROR;
+ bytes = 0;
+ }
+
+ return bytes;
+}
+#endif /* defined(OJPEG_SUPPORT) || defined(JPEG_SUPPORT) */
+
+static uint64
+checkMultiply64(uint64 first, uint64 second, T2P* t2p)
+{
+ uint64 bytes = first * second;
+
+ if (second && bytes / second != first) {
+ TIFFError(TIFF2PDF_MODULE, "Integer overflow");
+ t2p->t2p_error = T2P_ERR_ERROR;
+ bytes = 0;
+ }
+
+ return bytes;
+}
+
/*
This is the main function.
@@ -557,9 +597,10 @@ t2p_unmapproc(thandle_t handle, void *data, toff_t offset)
*/
int main(int argc, char** argv){
-
+#if !HAVE_DECL_OPTARG
extern char *optarg;
extern int optind;
+#endif
const char *outfilename = NULL;
T2P *t2p = NULL;
TIFF *input = NULL, *output = NULL;
@@ -730,7 +771,7 @@ int main(int argc, char** argv){
/*
* Output
*/
- t2p->outputdisable = 0;
+ t2p->outputdisable = 1;
if (outfilename) {
t2p->outputfile = fopen(outfilename, "wb");
if (t2p->outputfile == NULL) {
@@ -748,6 +789,7 @@ int main(int argc, char** argv){
t2p_readproc, t2p_writeproc, t2p_seekproc,
t2p_closeproc, t2p_sizeproc,
t2p_mapproc, t2p_unmapproc);
+ t2p->outputdisable = 0;
if (output == NULL) {
TIFFError(TIFF2PDF_MODULE,
"Can't initialize output descriptor");
@@ -875,7 +917,7 @@ int tiff2pdf_match_paper_size(float* width, float* length, char* papersize){
len=strlen(papersize);
for(i=0;i<len;i++){
- papersize[i]=toupper(papersize[i]);
+ papersize[i]=toupper((int) papersize[i]);
}
for(i=0;sizes[i]!=NULL; i++){
if (strcmp( (const char*)papersize, sizes[i])==0){
@@ -1007,23 +1049,23 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
uint16 xuint16=0;
directorycount=TIFFNumberOfDirectories(input);
- t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(directorycount * sizeof(T2P_PAGE));
+ t2p->tiff_pages = (T2P_PAGE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_PAGE)));
if(t2p->tiff_pages==NULL){
TIFFError(
TIFF2PDF_MODULE,
- "Can't allocate %lu bytes of memory for tiff_pages array, %s",
- (unsigned long) directorycount * sizeof(T2P_PAGE),
+ "Can't allocate " TIFF_SIZE_FORMAT " bytes of memory for tiff_pages array, %s",
+ (TIFF_SIZE_T) directorycount * sizeof(T2P_PAGE),
TIFFFileName(input));
t2p->t2p_error = T2P_ERR_ERROR;
return;
}
_TIFFmemset( t2p->tiff_pages, 0x00, directorycount * sizeof(T2P_PAGE));
- t2p->tiff_tiles = (T2P_TILES*) _TIFFmalloc(directorycount * sizeof(T2P_TILES));
+ t2p->tiff_tiles = (T2P_TILES*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,directorycount,sizeof(T2P_TILES)));
if(t2p->tiff_tiles==NULL){
TIFFError(
TIFF2PDF_MODULE,
- "Can't allocate %lu bytes of memory for tiff_tiles array, %s",
- (unsigned long) directorycount * sizeof(T2P_TILES),
+ "Can't allocate " TIFF_SIZE_FORMAT " bytes of memory for tiff_tiles array, %s",
+ (TIFF_SIZE_T) directorycount * sizeof(T2P_TILES),
TIFFFileName(input));
t2p->t2p_error = T2P_ERR_ERROR;
return;
@@ -1038,6 +1080,7 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
"Can't set directory %u of input file %s",
i,
TIFFFileName(input));
+ t2p->t2p_error = T2P_ERR_ERROR;
return;
}
if(TIFFGetField(input, TIFFTAG_PAGENUMBER, &pagen, &paged)){
@@ -1107,8 +1150,10 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
&(t2p->tiff_transferfunction[0]),
&(t2p->tiff_transferfunction[1]),
&(t2p->tiff_transferfunction[2]))) {
- if(t2p->tiff_transferfunction[1] !=
- t2p->tiff_transferfunction[0]) {
+ if((t2p->tiff_transferfunction[1] != (float*) NULL) &&
+ (t2p->tiff_transferfunction[2] != (float*) NULL) &&
+ (t2p->tiff_transferfunction[1] !=
+ t2p->tiff_transferfunction[0])) {
t2p->tiff_transferfunctioncount = 3;
t2p->tiff_pages[i].page_extra += 4;
t2p->pdf_xrefcount += 4;
@@ -1135,7 +1180,24 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
t2p->tiff_pages[i].page_tilecount;
if( (TIFFGetField(input, TIFFTAG_PLANARCONFIG, &xuint16) != 0)
&& (xuint16 == PLANARCONFIG_SEPARATE ) ){
- TIFFGetField(input, TIFFTAG_SAMPLESPERPIXEL, &xuint16);
+ if( !TIFFGetField(input, TIFFTAG_SAMPLESPERPIXEL, &xuint16) )
+ {
+ TIFFError(
+ TIFF2PDF_MODULE,
+ "Missing SamplesPerPixel, %s",
+ TIFFFileName(input));
+ t2p->t2p_error = T2P_ERR_ERROR;
+ return;
+ }
+ if( (t2p->tiff_tiles[i].tiles_tilecount % xuint16) != 0 )
+ {
+ TIFFError(
+ TIFF2PDF_MODULE,
+ "Invalid tile count, %s",
+ TIFFFileName(input));
+ t2p->t2p_error = T2P_ERR_ERROR;
+ return;
+ }
t2p->tiff_tiles[i].tiles_tilecount/= xuint16;
}
if( t2p->tiff_tiles[i].tiles_tilecount > 0){
@@ -1148,14 +1210,13 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
TIFFTAG_TILELENGTH,
&( t2p->tiff_tiles[i].tiles_tilelength) );
t2p->tiff_tiles[i].tiles_tiles =
- (T2P_TILE*) _TIFFmalloc(
- t2p->tiff_tiles[i].tiles_tilecount
- * sizeof(T2P_TILE) );
+ (T2P_TILE*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,t2p->tiff_tiles[i].tiles_tilecount,
+ sizeof(T2P_TILE)) );
if( t2p->tiff_tiles[i].tiles_tiles == NULL){
TIFFError(
TIFF2PDF_MODULE,
- "Can't allocate %lu bytes of memory for t2p_read_tiff_init, %s",
- (unsigned long) t2p->tiff_tiles[i].tiles_tilecount * sizeof(T2P_TILE),
+ "Can't allocate " TIFF_SIZE_FORMAT " bytes of memory for t2p_read_tiff_init, %s",
+ (TIFF_SIZE_T) t2p->tiff_tiles[i].tiles_tilecount * sizeof(T2P_TILE),
TIFFFileName(input));
t2p->t2p_error = T2P_ERR_ERROR;
return;
@@ -1168,12 +1229,18 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
/*
* This function is used by qsort to sort a T2P_PAGE* array of page structures
- * by page number.
+ * by page number. If the page numbers are the same, we fall back to comparing
+ * directory numbers to preserve the order of the input file.
*/
int t2p_cmp_t2p_page(const void* e1, const void* e2){
- return( ((T2P_PAGE*)e1)->page_number - ((T2P_PAGE*)e2)->page_number );
+ int d;
+ d = (int32)(((T2P_PAGE*)e1)->page_number) - (int32)(((T2P_PAGE*)e2)->page_number);
+ if(d == 0){
+ d = (int32)(((T2P_PAGE*)e1)->page_directory) - (int32)(((T2P_PAGE*)e2)->page_directory);
+ }
+ return d;
}
/*
@@ -1351,10 +1418,28 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){
&xuint16, &xuint16p)
&& xuint16 == 1) {
if(xuint16p[0] == EXTRASAMPLE_ASSOCALPHA){
+ if( t2p->tiff_bitspersample != 8 )
+ {
+ TIFFError(
+ TIFF2PDF_MODULE,
+ "No support for BitsPerSample=%d for RGBA",
+ t2p->tiff_bitspersample);
+ t2p->t2p_error = T2P_ERR_ERROR;
+ return;
+ }
t2p->pdf_sample=T2P_SAMPLE_RGBAA_TO_RGB;
break;
}
if(xuint16p[0] == EXTRASAMPLE_UNASSALPHA){
+ if( t2p->tiff_bitspersample != 8 )
+ {
+ TIFFError(
+ TIFF2PDF_MODULE,
+ "No support for BitsPerSample=%d for RGBA",
+ t2p->tiff_bitspersample);
+ t2p->t2p_error = T2P_ERR_ERROR;
+ return;
+ }
t2p->pdf_sample=T2P_SAMPLE_RGBA_TO_RGB;
break;
}
@@ -1414,7 +1499,7 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){
t2p->pdf_palette=NULL;
}
t2p->pdf_palette = (unsigned char*)
- _TIFFmalloc(t2p->pdf_palettesize*3);
+ _TIFFmalloc(TIFFSafeMultiply(tmsize_t,t2p->pdf_palettesize,3));
if(t2p->pdf_palette==NULL){
TIFFError(
TIFF2PDF_MODULE,
@@ -1483,7 +1568,7 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){
t2p->pdf_palette=NULL;
}
t2p->pdf_palette = (unsigned char*)
- _TIFFmalloc(t2p->pdf_palettesize*4);
+ _TIFFmalloc(TIFFSafeMultiply(tmsize_t,t2p->pdf_palettesize,4));
if(t2p->pdf_palette==NULL){
TIFFError(
TIFF2PDF_MODULE,
@@ -1516,6 +1601,22 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){
#endif
break;
case PHOTOMETRIC_CIELAB:
+ if( t2p->tiff_samplesperpixel != 3){
+ TIFFError(
+ TIFF2PDF_MODULE,
+ "Unsupported samplesperpixel = %d for CIELAB",
+ t2p->tiff_samplesperpixel);
+ t2p->t2p_error = T2P_ERR_ERROR;
+ return;
+ }
+ if( t2p->tiff_bitspersample != 8){
+ TIFFError(
+ TIFF2PDF_MODULE,
+ "Invalid bitspersample = %d for CIELAB",
+ t2p->tiff_bitspersample);
+ t2p->t2p_error = T2P_ERR_ERROR;
+ return;
+ }
t2p->pdf_labrange[0]= -127;
t2p->pdf_labrange[1]= 127;
t2p->pdf_labrange[2]= -127;
@@ -1531,6 +1632,22 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){
t2p->pdf_colorspace=T2P_CS_LAB;
break;
case PHOTOMETRIC_ITULAB:
+ if( t2p->tiff_samplesperpixel != 3){
+ TIFFError(
+ TIFF2PDF_MODULE,
+ "Unsupported samplesperpixel = %d for ITULAB",
+ t2p->tiff_samplesperpixel);
+ t2p->t2p_error = T2P_ERR_ERROR;
+ return;
+ }
+ if( t2p->tiff_bitspersample != 8){
+ TIFFError(
+ TIFF2PDF_MODULE,
+ "Invalid bitspersample = %d for ITULAB",
+ t2p->tiff_bitspersample);
+ t2p->t2p_error = T2P_ERR_ERROR;
+ return;
+ }
t2p->pdf_labrange[0]=-85;
t2p->pdf_labrange[1]=85;
t2p->pdf_labrange[2]=-75;
@@ -1616,6 +1733,8 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){
}
t2p_compose_pdf_page(t2p);
+ if( t2p->t2p_error == T2P_ERR_ERROR )
+ return;
t2p->pdf_transcode = T2P_TRANSCODE_ENCODE;
if(t2p->pdf_nopassthrough==0){
@@ -1703,8 +1822,10 @@ void t2p_read_tiff_data(T2P* t2p, TIFF* input){
&(t2p->tiff_transferfunction[0]),
&(t2p->tiff_transferfunction[1]),
&(t2p->tiff_transferfunction[2]))) {
- if(t2p->tiff_transferfunction[1] !=
- t2p->tiff_transferfunction[0]) {
+ if((t2p->tiff_transferfunction[1] != (float*) NULL) &&
+ (t2p->tiff_transferfunction[2] != (float*) NULL) &&
+ (t2p->tiff_transferfunction[1] !=
+ t2p->tiff_transferfunction[0])) {
t2p->tiff_transferfunctioncount=3;
} else {
t2p->tiff_transferfunctioncount=1;
@@ -1776,14 +1897,16 @@ void t2p_read_tiff_size(T2P* t2p, TIFF* input){
tstrip_t i=0;
tstrip_t stripcount=0;
#endif
-#ifdef OJPEG_SUPPORT
- tsize_t k = 0;
-#endif
+ uint64 k = 0;
if(t2p->pdf_transcode == T2P_TRANSCODE_RAW){
#ifdef CCITT_SUPPORT
if(t2p->pdf_compression == T2P_COMPRESS_G4 ){
TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc);
+ if (sbc[0] != (uint64)(tmsize_t)sbc[0]) {
+ TIFFError(TIFF2PDF_MODULE, "Integer overflow");
+ t2p->t2p_error = T2P_ERR_ERROR;
+ }
t2p->tiff_datasize=(tmsize_t)sbc[0];
return;
}
@@ -1791,6 +1914,10 @@ void t2p_read_tiff_size(T2P* t2p, TIFF* input){
#ifdef ZIP_SUPPORT
if(t2p->pdf_compression == T2P_COMPRESS_ZIP){
TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc);
+ if (sbc[0] != (uint64)(tmsize_t)sbc[0]) {
+ TIFFError(TIFF2PDF_MODULE, "Integer overflow");
+ t2p->t2p_error = T2P_ERR_ERROR;
+ }
t2p->tiff_datasize=(tmsize_t)sbc[0];
return;
}
@@ -1806,19 +1933,25 @@ void t2p_read_tiff_size(T2P* t2p, TIFF* input){
}
stripcount=TIFFNumberOfStrips(input);
for(i=0;i<stripcount;i++){
- k += sbc[i];
+ k = checkAdd64(k, sbc[i], t2p);
}
if(TIFFGetField(input, TIFFTAG_JPEGIFOFFSET, &(t2p->tiff_dataoffset))){
if(t2p->tiff_dataoffset != 0){
if(TIFFGetField(input, TIFFTAG_JPEGIFBYTECOUNT, &(t2p->tiff_datasize))!=0){
- if(t2p->tiff_datasize < k) {
- t2p->pdf_ojpegiflength=t2p->tiff_datasize;
- t2p->tiff_datasize+=k;
- t2p->tiff_datasize+=6;
- t2p->tiff_datasize+=2*stripcount;
+ if((uint64)t2p->tiff_datasize < k) {
TIFFWarning(TIFF2PDF_MODULE,
"Input file %s has short JPEG interchange file byte count",
TIFFFileName(input));
+ t2p->pdf_ojpegiflength=t2p->tiff_datasize;
+ k = checkAdd64(k, t2p->tiff_datasize, t2p);
+ k = checkAdd64(k, 6, t2p);
+ k = checkAdd64(k, stripcount, t2p);
+ k = checkAdd64(k, stripcount, t2p);
+ t2p->tiff_datasize = (tsize_t) k;
+ if ((uint64) t2p->tiff_datasize != k) {
+ TIFFError(TIFF2PDF_MODULE, "Integer overflow");
+ t2p->t2p_error = T2P_ERR_ERROR;
+ }
return;
}
return;
@@ -1831,9 +1964,14 @@ void t2p_read_tiff_size(T2P* t2p, TIFF* input){
}
}
}
- t2p->tiff_datasize+=k;
- t2p->tiff_datasize+=2*stripcount;
- t2p->tiff_datasize+=2048;
+ k = checkAdd64(k, stripcount, t2p);
+ k = checkAdd64(k, stripcount, t2p);
+ k = checkAdd64(k, 2048, t2p);
+ t2p->tiff_datasize = (tsize_t) k;
+ if ((uint64) t2p->tiff_datasize != k) {
+ TIFFError(TIFF2PDF_MODULE, "Integer overflow");
+ t2p->t2p_error = T2P_ERR_ERROR;
+ }
return;
}
#endif
@@ -1842,11 +1980,11 @@ void t2p_read_tiff_size(T2P* t2p, TIFF* input){
uint32 count = 0;
if(TIFFGetField(input, TIFFTAG_JPEGTABLES, &count, &jpt) != 0 ){
if(count > 4){
- t2p->tiff_datasize += count;
- t2p->tiff_datasize -= 2; /* don't use EOI of header */
+ k += count;
+ k -= 2; /* don't use EOI of header */
}
} else {
- t2p->tiff_datasize = 2; /* SOI for first strip */
+ k = 2; /* SOI for first strip */
}
stripcount=TIFFNumberOfStrips(input);
if(!TIFFGetField(input, TIFFTAG_STRIPBYTECOUNTS, &sbc)){
@@ -1857,18 +1995,35 @@ void t2p_read_tiff_size(T2P* t2p, TIFF* input){
return;
}
for(i=0;i<stripcount;i++){
- t2p->tiff_datasize += sbc[i];
- t2p->tiff_datasize -=4; /* don't use SOI or EOI of strip */
+ k = checkAdd64(k, sbc[i], t2p);
+ k -=2; /* don't use EOI of strip */
+ k +=2; /* add space for restart marker */
+ }
+ k = checkAdd64(k, 2, t2p); /* use EOI of last strip */
+ k = checkAdd64(k, 6, t2p); /* for DRI marker of first strip */
+ t2p->tiff_datasize = (tsize_t) k;
+ if ((uint64) t2p->tiff_datasize != k) {
+ TIFFError(TIFF2PDF_MODULE, "Integer overflow");
+ t2p->t2p_error = T2P_ERR_ERROR;
}
- t2p->tiff_datasize +=2; /* use EOI of last strip */
return;
}
#endif
(void) 0;
}
- t2p->tiff_datasize=TIFFScanlineSize(input) * t2p->tiff_length;
+ k = checkMultiply64(TIFFScanlineSize(input), t2p->tiff_length, t2p);
if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){
- t2p->tiff_datasize*= t2p->tiff_samplesperpixel;
+ k = checkMultiply64(k, t2p->tiff_samplesperpixel, t2p);
+ }
+ if (k == 0) {
+ /* Assume we had overflow inside TIFFScanlineSize */
+ t2p->t2p_error = T2P_ERR_ERROR;
+ }
+
+ t2p->tiff_datasize = (tsize_t) k;
+ if ((uint64) t2p->tiff_datasize != k) {
+ TIFFError(TIFF2PDF_MODULE, "Integer overflow");
+ t2p->t2p_error = T2P_ERR_ERROR;
}
return;
@@ -1886,6 +2041,7 @@ void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
#ifdef JPEG_SUPPORT
unsigned char* jpt;
#endif
+ uint64 k;
edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
@@ -1897,14 +2053,17 @@ void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
#endif
){
t2p->tiff_datasize=TIFFTileSize(input);
+ if (t2p->tiff_datasize == 0) {
+ /* Assume we had overflow inside TIFFTileSize */
+ t2p->t2p_error = T2P_ERR_ERROR;
+ }
return;
} else {
TIFFGetField(input, TIFFTAG_TILEBYTECOUNTS, &tbc);
- t2p->tiff_datasize=(tmsize_t)tbc[tile];
+ k=tbc[tile];
#ifdef OJPEG_SUPPORT
if(t2p->tiff_compression==COMPRESSION_OJPEG){
- t2p->tiff_datasize+=2048;
- return;
+ k = checkAdd64(k, 2048, t2p);
}
#endif
#ifdef JPEG_SUPPORT
@@ -1912,18 +2071,33 @@ void t2p_read_tiff_size_tile(T2P* t2p, TIFF* input, ttile_t tile){
uint32 count = 0;
if(TIFFGetField(input, TIFFTAG_JPEGTABLES, &count, &jpt)!=0){
if(count > 4){
- t2p->tiff_datasize += count;
- t2p->tiff_datasize -= 2; /* don't use EOI of header or SOI of tile */
+ k = checkAdd64(k, count, t2p);
+ k -= 2; /* don't use EOI of header or SOI of tile */
}
}
}
#endif
+ t2p->tiff_datasize = (tsize_t) k;
+ if ((uint64) t2p->tiff_datasize != k) {
+ TIFFError(TIFF2PDF_MODULE, "Integer overflow");
+ t2p->t2p_error = T2P_ERR_ERROR;
+ }
return;
}
}
- t2p->tiff_datasize=TIFFTileSize(input);
+ k = TIFFTileSize(input);
if(t2p->tiff_planar==PLANARCONFIG_SEPARATE){
- t2p->tiff_datasize*= t2p->tiff_samplesperpixel;
+ k = checkMultiply64(k, t2p->tiff_samplesperpixel, t2p);
+ }
+ if (k == 0) {
+ /* Assume we had overflow inside TIFFTileSize */
+ t2p->t2p_error = T2P_ERR_ERROR;
+ }
+
+ t2p->tiff_datasize = (tsize_t) k;
+ if ((uint64) t2p->tiff_datasize != k) {
+ TIFFError(TIFF2PDF_MODULE, "Integer overflow");
+ t2p->t2p_error = T2P_ERR_ERROR;
}
return;
@@ -2006,7 +2180,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
uint16 v_samp=1;
uint16 ri=1;
uint32 rows=0;
-#endif
+#endif /* ifdef OJPEG_SUPPORT */
#ifdef JPEG_SUPPORT
unsigned char* jpt;
float* xfloatp;
@@ -2014,7 +2188,11 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
unsigned char* stripbuffer;
tsize_t striplength=0;
uint32 max_striplength=0;
-#endif
+#endif /* ifdef JPEG_SUPPORT */
+
+ /* Fail if prior error (in particular, can't trust tiff_datasize) */
+ if (t2p->t2p_error != T2P_ERR_OK)
+ return(0);
if(t2p->pdf_transcode == T2P_TRANSCODE_RAW){
#ifdef CCITT_SUPPORT
@@ -2023,7 +2201,8 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
_TIFFmalloc(t2p->tiff_datasize);
if (buffer == NULL) {
TIFFError(TIFF2PDF_MODULE,
- "Can't allocate %lu bytes of memory for t2p_readwrite_pdf_image, %s",
+ "Can't allocate %lu bytes of memory for "
+ "t2p_readwrite_pdf_image, %s",
(unsigned long) t2p->tiff_datasize,
TIFFFileName(input));
t2p->t2p_error = T2P_ERR_ERROR;
@@ -2044,7 +2223,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
_TIFFfree(buffer);
return(t2p->tiff_datasize);
}
-#endif
+#endif /* ifdef CCITT_SUPPORT */
#ifdef ZIP_SUPPORT
if (t2p->pdf_compression == T2P_COMPRESS_ZIP) {
buffer = (unsigned char*)
@@ -2069,7 +2248,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
_TIFFfree(buffer);
return(t2p->tiff_datasize);
}
-#endif
+#endif /* ifdef ZIP_SUPPORT */
#ifdef OJPEG_SUPPORT
if(t2p->tiff_compression == COMPRESSION_OJPEG) {
@@ -2181,15 +2360,21 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
t2pWriteFile(output, (tdata_t) buffer, bufferoffset);
_TIFFfree(buffer);
return(bufferoffset);
+#if 0
+ /*
+ This hunk of code removed code is clearly
+ mis-placed and we are not sure where it
+ should be (if anywhere)
+ */
TIFFError(TIFF2PDF_MODULE,
"No support for OJPEG image %s with no JPEG File Interchange offset",
TIFFFileName(input));
t2p->t2p_error = T2P_ERR_ERROR;
return(0);
+#endif
}
- return(t2p->tiff_datasize);
}
-#endif
+#endif /* ifdef OJPEG_SUPPORT */
#ifdef JPEG_SUPPORT
if(t2p->tiff_compression == COMPRESSION_JPEG) {
uint32 count = 0;
@@ -2231,7 +2416,8 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
if(!t2p_process_jpeg_strip(
stripbuffer,
&striplength,
- buffer,
+ buffer,
+ t2p->tiff_datasize,
&bufferoffset,
i,
t2p->tiff_length)){
@@ -2251,7 +2437,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
_TIFFfree(buffer);
return(bufferoffset);
}
-#endif
+#endif /* ifdef JPEG_SUPPORT */
(void)0;
}
@@ -2273,7 +2459,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
TIFFReadEncodedStrip(input,
i,
(tdata_t) &buffer[bufferoffset],
- stripsize);
+ TIFFmin(stripsize, t2p->tiff_datasize - bufferoffset));
if(read==-1){
TIFFError(TIFF2PDF_MODULE,
"Error on decoding strip %u of %s",
@@ -2311,6 +2497,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
(unsigned long) t2p->tiff_datasize,
TIFFFileName(input));
t2p->t2p_error = T2P_ERR_ERROR;
+ _TIFFfree(buffer);
return(0);
}
for(i=0;i<stripcount;i++){
@@ -2320,7 +2507,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
TIFFReadEncodedStrip(input,
i + j*stripcount,
(tdata_t) &(samplebuffer[samplebufferoffset]),
- sepstripsize);
+ TIFFmin(sepstripsize, stripsize - samplebufferoffset));
if(read==-1){
TIFFError(TIFF2PDF_MODULE,
"Error on decoding strip %u of %s",
@@ -2360,7 +2547,7 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
TIFFReadEncodedStrip(input,
i,
(tdata_t) &buffer[bufferoffset],
- stripsize);
+ TIFFmin(stripsize, t2p->tiff_datasize - bufferoffset));
if(read==-1){
TIFFError(TIFF2PDF_MODULE,
"Error on decoding strip %u of %s",
@@ -2385,7 +2572,8 @@ tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){
(unsigned long) t2p->tiff_datasize,
TIFFFileName(input));
t2p->t2p_error = T2P_ERR_ERROR;
- _TIFFfree(buffer);
+ _TIFFfree(buffer);
+ return(0);
} else {
buffer=samplebuffer;
t2p->tiff_datasize *= t2p->tiff_samplesperpixel;
@@ -2466,7 +2654,7 @@ dataready:
case T2P_COMPRESS_G4:
TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_CCITTFAX4);
break;
-#endif
+#endif /* ifdef CCITT_SUPPORT */
#ifdef JPEG_SUPPORT
case T2P_COMPRESS_JPEG:
if(t2p->tiff_photometric==PHOTOMETRIC_YCBCR) {
@@ -2512,7 +2700,7 @@ dataready:
}
break;
-#endif
+#endif /* ifdef JPEG_SUPPORT */
#ifdef ZIP_SUPPORT
case T2P_COMPRESS_ZIP:
TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE);
@@ -2527,7 +2715,7 @@ dataready:
(t2p->pdf_defaultcompressionquality / 100));
}
break;
-#endif
+#endif /* ifdef ZIP_SUPPORT */
default:
break;
}
@@ -2541,7 +2729,7 @@ dataready:
buffer,
stripsize * stripcount);
} else
-#endif
+#endif /* ifdef JPEG_SUPPORT */
{
bufferoffset = TIFFWriteEncodedStrip(output, (tstrip_t)0,
buffer,
@@ -2581,7 +2769,7 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_
tsize_t read=0;
uint16 i=0;
ttile_t tilecount=0;
- tsize_t tilesize=0;
+ /* tsize_t tilesize=0; */
ttile_t septilecount=0;
tsize_t septilesize=0;
#ifdef JPEG_SUPPORT
@@ -2590,6 +2778,10 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_
uint32 xuint32=0;
#endif
+ /* Fail if prior error (in particular, can't trust tiff_datasize) */
+ if (t2p->t2p_error != T2P_ERR_OK)
+ return(0);
+
edge |= t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
edge |= t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile);
@@ -2695,29 +2887,32 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_
buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
if(buffer==NULL){
TIFFError(TIFF2PDF_MODULE,
- "Can't allocate %lu bytes of memory "
+ "Can't allocate " TIFF_SIZE_FORMAT " bytes of memory "
"for t2p_readwrite_pdf_image_tile, %s",
- t2p->tiff_datasize,
+ (TIFF_SIZE_T) t2p->tiff_datasize,
TIFFFileName(input));
t2p->t2p_error = T2P_ERR_ERROR;
return(0);
}
if(TIFFGetField(input, TIFFTAG_JPEGTABLES, &count, &jpt) != 0) {
- if (count > 0) {
- _TIFFmemcpy(buffer, jpt, count);
+ if (count >= 4) {
+ /* Ignore EOI marker of JpegTables */
+ _TIFFmemcpy(buffer, jpt, count - 2);
bufferoffset += count - 2;
+ /* Store last 2 bytes of the JpegTables */
table_end[0] = buffer[bufferoffset-2];
table_end[1] = buffer[bufferoffset-1];
- }
- if (count > 0) {
xuint32 = bufferoffset;
+ bufferoffset -= 2;
bufferoffset += TIFFReadRawTile(
input,
tile,
- (tdata_t) &(((unsigned char*)buffer)[bufferoffset-2]),
+ (tdata_t) &(((unsigned char*)buffer)[bufferoffset]),
-1);
- buffer[xuint32-2]=table_end[0];
- buffer[xuint32-1]=table_end[1];
+ /* Overwrite SOI marker of image scan with previously */
+ /* saved end of JpegTables */
+ buffer[xuint32-2]=table_end[0];
+ buffer[xuint32-1]=table_end[1];
} else {
bufferoffset += TIFFReadRawTile(
input,
@@ -2766,7 +2961,7 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_
if(t2p->pdf_sample == T2P_SAMPLE_PLANAR_SEPARATE_TO_CONTIG){
septilesize=TIFFTileSize(input);
septilecount=TIFFNumberOfTiles(input);
- tilesize=septilesize*t2p->tiff_samplesperpixel;
+ /* tilesize=septilesize*t2p->tiff_samplesperpixel; */
tilecount=septilecount/t2p->tiff_samplesperpixel;
buffer = (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
if(buffer==NULL){
@@ -3102,6 +3297,7 @@ int t2p_process_ojpeg_tables(T2P* t2p, TIFF* input){
"Can't allocate %u bytes of memory for t2p_process_ojpeg_tables, %s",
2048,
TIFFFileName(input));
+ t2p->t2p_error = T2P_ERR_ERROR;
return(0);
}
_TIFFmemset(t2p->pdf_ojpegdata, 0x00, 2048);
@@ -3255,38 +3451,70 @@ int t2p_process_jpeg_strip(
unsigned char* strip,
tsize_t* striplength,
unsigned char* buffer,
+ tsize_t buffersize,
tsize_t* bufferoffset,
tstrip_t no,
uint32 height){
tsize_t i=0;
- uint16 ri =0;
- uint16 v_samp=1;
- uint16 h_samp=1;
- int j=0;
-
- i++;
-
- while(i<(*striplength)){
+
+ while (i < *striplength) {
+ tsize_t datalen;
+ uint16 ri;
+ uint16 v_samp;
+ uint16 h_samp;
+ int j;
+ int ncomp;
+
+ /* marker header: one or more FFs */
+ if (strip[i] != 0xff)
+ return(0);
+ i++;
+ while (i < *striplength && strip[i] == 0xff)
+ i++;
+ if (i >= *striplength)
+ return(0);
+ /* SOI is the only pre-SOS marker without a length word */
+ if (strip[i] == 0xd8)
+ datalen = 0;
+ else {
+ if ((*striplength - i) <= 2)
+ return(0);
+ datalen = (strip[i+1] << 8) | strip[i+2];
+ if (datalen < 2 || datalen >= (*striplength - i))
+ return(0);
+ }
switch( strip[i] ){
- case 0xd8:
- /* SOI - start of image */
+ case 0xd8: /* SOI - start of image */
+ if( *bufferoffset + 2 > buffersize )
+ return(0);
_TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), 2);
*bufferoffset+=2;
- i+=2;
break;
- case 0xc0:
- case 0xc1:
- case 0xc3:
- case 0xc9:
- case 0xca:
+ case 0xc0: /* SOF0 */
+ case 0xc1: /* SOF1 */
+ case 0xc3: /* SOF3 */
+ case 0xc9: /* SOF9 */
+ case 0xca: /* SOF10 */
if(no==0){
- _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2);
- for(j=0;j<buffer[*bufferoffset+9];j++){
- if( (buffer[*bufferoffset+11+(2*j)]>>4) > h_samp)
- h_samp = (buffer[*bufferoffset+11+(2*j)]>>4);
- if( (buffer[*bufferoffset+11+(2*j)] & 0x0f) > v_samp)
- v_samp = (buffer[*bufferoffset+11+(2*j)] & 0x0f);
+ if( *bufferoffset + datalen + 2 + 6 > buffersize )
+ return(0);
+ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2);
+ if( *bufferoffset + 9 >= buffersize )
+ return(0);
+ ncomp = buffer[*bufferoffset+9];
+ if (ncomp < 1 || ncomp > 4)
+ return(0);
+ v_samp=1;
+ h_samp=1;
+ if( *bufferoffset + 11 + 3*(ncomp-1) >= buffersize )
+ return(0);
+ for(j=0;j<ncomp;j++){
+ uint16 samp = buffer[*bufferoffset+11+(3*j)];
+ if( (samp>>4) > h_samp)
+ h_samp = (samp>>4);
+ if( (samp & 0x0f) > v_samp)
+ v_samp = (samp & 0x0f);
}
v_samp*=8;
h_samp*=8;
@@ -3300,45 +3528,51 @@ int t2p_process_jpeg_strip(
(unsigned char) ((height>>8) & 0xff);
buffer[*bufferoffset+6]=
(unsigned char) (height & 0xff);
- *bufferoffset+=strip[i+2]+2;
- i+=strip[i+2]+2;
-
+ *bufferoffset+=datalen+2;
+ /* insert a DRI marker */
buffer[(*bufferoffset)++]=0xff;
buffer[(*bufferoffset)++]=0xdd;
buffer[(*bufferoffset)++]=0x00;
buffer[(*bufferoffset)++]=0x04;
buffer[(*bufferoffset)++]=(ri >> 8) & 0xff;
buffer[(*bufferoffset)++]= ri & 0xff;
- } else {
- i+=strip[i+2]+2;
}
break;
- case 0xc4:
- case 0xdb:
- _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2);
- *bufferoffset+=strip[i+2]+2;
- i+=strip[i+2]+2;
+ case 0xc4: /* DHT */
+ case 0xdb: /* DQT */
+ if( *bufferoffset + datalen + 2 > buffersize )
+ return(0);
+ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2);
+ *bufferoffset+=datalen+2;
break;
- case 0xda:
+ case 0xda: /* SOS */
if(no==0){
- _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), strip[i+2]+2);
- *bufferoffset+=strip[i+2]+2;
- i+=strip[i+2]+2;
+ if( *bufferoffset + datalen + 2 > buffersize )
+ return(0);
+ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), datalen+2);
+ *bufferoffset+=datalen+2;
} else {
+ if( *bufferoffset + 2 > buffersize )
+ return(0);
buffer[(*bufferoffset)++]=0xff;
buffer[(*bufferoffset)++]=
(unsigned char)(0xd0 | ((no-1)%8));
- i+=strip[i+2]+2;
}
- _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i-1]), (*striplength)-i-1);
- *bufferoffset+=(*striplength)-i-1;
+ i += datalen + 1;
+ /* copy remainder of strip */
+ if( *bufferoffset + *striplength - i > buffersize )
+ return(0);
+ _TIFFmemcpy(&(buffer[*bufferoffset]), &(strip[i]), *striplength - i);
+ *bufferoffset+= *striplength - i;
return(1);
default:
- i+=strip[i+2]+2;
+ /* ignore any other marker */
+ break;
}
+ i += datalen + 1;
}
-
+ /* failed to find SOS marker */
return(0);
}
#endif
@@ -3354,11 +3588,11 @@ void t2p_tile_collapse_left(
uint32 edgetilewidth,
uint32 tilelength){
- uint32 i=0;
+ uint32 i;
tsize_t edgescanwidth=0;
edgescanwidth = (scanwidth * edgetilewidth + (tilewidth - 1))/ tilewidth;
- for(i=i;i<tilelength;i++){
+ for(i=0;i<tilelength;i++){
_TIFFmemcpy(
&(((char*)buffer)[edgescanwidth*i]),
&(((char*)buffer)[scanwidth*i]),
@@ -3462,7 +3696,12 @@ t2p_sample_rgbaa_to_rgb(tdata_t data, uint32 samplecount)
{
uint32 i;
- for(i = 0; i < samplecount; i++)
+ /* For the 3 first samples, there is overlapping between souce and
+ destination, so use memmove().
+ See http://bugzilla.maptools.org/show_bug.cgi?id=2577 */
+ for(i = 0; i < 3 && i < samplecount; i++)
+ memmove((uint8*)data + i * 3, (uint8*)data + i * 4, 3);
+ for(; i < samplecount; i++)
memcpy((uint8*)data + i * 3, (uint8*)data + i * 4, 3);
return(i * 3);
@@ -3479,7 +3718,7 @@ t2p_sample_rgba_to_rgb(tdata_t data, uint32 samplecount)
uint32 i = 0;
uint32 sample = 0;
uint8 alpha = 0;
-
+
for (i = 0; i < samplecount; i++) {
sample=((uint32*)data)[i];
alpha=(uint8)((255 - ((sample >> 24) & 0xff)));
@@ -3528,7 +3767,10 @@ tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){
char buffer[16];
int buflen=0;
- buflen=sprintf(buffer, "%%PDF-%u.%u ", t2p->pdf_majorversion&0xff, t2p->pdf_minorversion&0xff);
+ buflen = snprintf(buffer, sizeof(buffer), "%%PDF-%u.%u ",
+ t2p->pdf_majorversion&0xff,
+ t2p->pdf_minorversion&0xff);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t)"\n%\342\343\317\323\n", 7);
@@ -3542,10 +3784,11 @@ tsize_t t2p_write_pdf_header(T2P* t2p, TIFF* output){
tsize_t t2p_write_pdf_obj_start(uint32 number, TIFF* output){
tsize_t written=0;
- char buffer[16];
+ char buffer[32];
int buflen=0;
- buflen=sprintf(buffer, "%lu", (unsigned long)number);
+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number);
+ check_snprintf_ret((T2P*)NULL, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen );
written += t2pWriteFile(output, (tdata_t) " 0 obj\n", 7);
@@ -3584,13 +3827,13 @@ tsize_t t2p_write_pdf_name(unsigned char* name, TIFF* output){
written += t2pWriteFile(output, (tdata_t) "/", 1);
for (i=0;i<namelen;i++){
if ( ((unsigned char)name[i]) < 0x21){
- sprintf(buffer, "#%.2X", name[i]);
+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
buffer[sizeof(buffer) - 1] = '\0';
written += t2pWriteFile(output, (tdata_t) buffer, 3);
nextchar=1;
}
if ( ((unsigned char)name[i]) > 0x7E){
- sprintf(buffer, "#%.2X", name[i]);
+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
buffer[sizeof(buffer) - 1] = '\0';
written += t2pWriteFile(output, (tdata_t) buffer, 3);
nextchar=1;
@@ -3598,57 +3841,57 @@ tsize_t t2p_write_pdf_name(unsigned char* name, TIFF* output){
if (nextchar==0){
switch (name[i]){
case 0x23:
- sprintf(buffer, "#%.2X", name[i]);
+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
buffer[sizeof(buffer) - 1] = '\0';
written += t2pWriteFile(output, (tdata_t) buffer, 3);
break;
case 0x25:
- sprintf(buffer, "#%.2X", name[i]);
+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
buffer[sizeof(buffer) - 1] = '\0';
written += t2pWriteFile(output, (tdata_t) buffer, 3);
break;
case 0x28:
- sprintf(buffer, "#%.2X", name[i]);
+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
buffer[sizeof(buffer) - 1] = '\0';
written += t2pWriteFile(output, (tdata_t) buffer, 3);
break;
case 0x29:
- sprintf(buffer, "#%.2X", name[i]);
+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
buffer[sizeof(buffer) - 1] = '\0';
written += t2pWriteFile(output, (tdata_t) buffer, 3);
break;
case 0x2F:
- sprintf(buffer, "#%.2X", name[i]);
+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
buffer[sizeof(buffer) - 1] = '\0';
written += t2pWriteFile(output, (tdata_t) buffer, 3);
break;
case 0x3C:
- sprintf(buffer, "#%.2X", name[i]);
+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
buffer[sizeof(buffer) - 1] = '\0';
written += t2pWriteFile(output, (tdata_t) buffer, 3);
break;
case 0x3E:
- sprintf(buffer, "#%.2X", name[i]);
+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
buffer[sizeof(buffer) - 1] = '\0';
written += t2pWriteFile(output, (tdata_t) buffer, 3);
break;
case 0x5B:
- sprintf(buffer, "#%.2X", name[i]);
+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
buffer[sizeof(buffer) - 1] = '\0';
written += t2pWriteFile(output, (tdata_t) buffer, 3);
break;
case 0x5D:
- sprintf(buffer, "#%.2X", name[i]);
+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
buffer[sizeof(buffer) - 1] = '\0';
written += t2pWriteFile(output, (tdata_t) buffer, 3);
break;
case 0x7B:
- sprintf(buffer, "#%.2X", name[i]);
+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
buffer[sizeof(buffer) - 1] = '\0';
written += t2pWriteFile(output, (tdata_t) buffer, 3);
break;
case 0x7D:
- sprintf(buffer, "#%.2X", name[i]);
+ snprintf(buffer, sizeof(buffer), "#%.2X", name[i]);
buffer[sizeof(buffer) - 1] = '\0';
written += t2pWriteFile(output, (tdata_t) buffer, 3);
break;
@@ -3763,14 +4006,15 @@ tsize_t t2p_write_pdf_stream_end(TIFF* output){
tsize_t t2p_write_pdf_stream_dict(tsize_t len, uint32 number, TIFF* output){
tsize_t written=0;
- char buffer[16];
+ char buffer[32];
int buflen=0;
written += t2pWriteFile(output, (tdata_t) "/Length ", 8);
if(len!=0){
written += t2p_write_pdf_stream_length(len, output);
} else {
- buflen=sprintf(buffer, "%lu", (unsigned long)number);
+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)number);
+ check_snprintf_ret((T2P*)NULL, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
}
@@ -3811,10 +4055,11 @@ tsize_t t2p_write_pdf_stream_dict_end(TIFF* output){
tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){
tsize_t written=0;
- char buffer[16];
+ char buffer[32];
int buflen=0;
- buflen=sprintf(buffer, "%lu", (unsigned long)len);
+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)len);
+ check_snprintf_ret((T2P*)NULL, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) "\n", 1);
@@ -3828,13 +4073,14 @@ tsize_t t2p_write_pdf_stream_length(tsize_t len, TIFF* output){
tsize_t t2p_write_pdf_catalog(T2P* t2p, TIFF* output)
{
tsize_t written = 0;
- char buffer[16];
+ char buffer[32];
int buflen = 0;
written += t2pWriteFile(output,
(tdata_t)"<< \n/Type /Catalog \n/Pages ",
27);
buflen = snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_pages);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer,
TIFFmin((size_t)buflen, sizeof(buffer) - 1));
written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
@@ -3867,7 +4113,6 @@ tsize_t t2p_write_pdf_info(T2P* t2p, TIFF* input, TIFF* output)
written += t2p_write_pdf_string(t2p->pdf_datetime, output);
}
written += t2pWriteFile(output, (tdata_t) "\n/Producer ", 11);
- _TIFFmemset((tdata_t)buffer, 0x00, sizeof(buffer));
snprintf(buffer, sizeof(buffer), "libtiff / tiff2pdf - %d", TIFFLIB_VERSION);
written += t2p_write_pdf_string(buffer, output);
written += t2pWriteFile(output, (tdata_t) "\n", 1);
@@ -4008,7 +4253,7 @@ tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output)
{
tsize_t written=0;
tdir_t i=0;
- char buffer[16];
+ char buffer[32];
int buflen=0;
int page=0;
@@ -4016,7 +4261,8 @@ tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output)
(tdata_t) "<< \n/Type /Pages \n/Kids [ ", 26);
page = t2p->pdf_pages+1;
for (i=0;i<t2p->tiff_pagecount;i++){
- buflen=sprintf(buffer, "%d", page);
+ buflen=snprintf(buffer, sizeof(buffer), "%d", page);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
if ( ((i+1)%8)==0 ) {
@@ -4031,8 +4277,8 @@ tsize_t t2p_write_pdf_pages(T2P* t2p, TIFF* output)
}
}
written += t2pWriteFile(output, (tdata_t) "] \n/Count ", 10);
- _TIFFmemset(buffer, 0x00, 16);
- buflen=sprintf(buffer, "%d", t2p->tiff_pagecount);
+ buflen=snprintf(buffer, sizeof(buffer), "%d", t2p->tiff_pagecount);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " \n>> \n", 6);
@@ -4047,28 +4293,34 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){
unsigned int i=0;
tsize_t written=0;
- char buffer[16];
+ char buffer[256];
int buflen=0;
written += t2pWriteFile(output, (tdata_t) "<<\n/Type /Page \n/Parent ", 24);
- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_pages);
+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_pages);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
written += t2pWriteFile(output, (tdata_t) "/MediaBox [", 11);
- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x1);
+ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x1);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " ", 1);
- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y1);
+ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y1);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " ", 1);
- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.x2);
+ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.x2);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " ", 1);
- buflen=sprintf(buffer, "%.4f",t2p->pdf_mediabox.y2);
+ buflen=snprintf(buffer, sizeof(buffer), "%.4f",t2p->pdf_mediabox.y2);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) "] \n", 3);
written += t2pWriteFile(output, (tdata_t) "/Contents ", 10);
- buflen=sprintf(buffer, "%lu", (unsigned long)(object + 1));
+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(object + 1));
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " 0 R \n", 6);
written += t2pWriteFile(output, (tdata_t) "/Resources << \n", 15);
@@ -4076,16 +4328,17 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){
written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12);
for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount;i++){
written += t2pWriteFile(output, (tdata_t) "/Im", 3);
- buflen = sprintf(buffer, "%u", t2p->pdf_page+1);
+ buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) "_", 1);
- buflen = sprintf(buffer, "%u", i+1);
+ buflen = snprintf(buffer, sizeof(buffer), "%u", i+1);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " ", 1);
- buflen = sprintf(
- buffer,
- "%lu",
+ buflen = snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra));
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
if(i%4==3){
@@ -4096,13 +4349,13 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){
} else {
written += t2pWriteFile(output, (tdata_t) "/XObject <<\n", 12);
written += t2pWriteFile(output, (tdata_t) "/Im", 3);
- buflen = sprintf(buffer, "%u", t2p->pdf_page+1);
+ buflen = snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " ", 1);
- buflen = sprintf(
- buffer,
- "%lu",
+ buflen = snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)(object+3+(2*i)+t2p->tiff_pages[t2p->pdf_page].page_extra));
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
written += t2pWriteFile(output, (tdata_t) ">>\n", 3);
@@ -4110,17 +4363,16 @@ tsize_t t2p_write_pdf_page(uint32 object, T2P* t2p, TIFF* output){
if(t2p->tiff_transferfunctioncount != 0) {
written += t2pWriteFile(output, (tdata_t) "/ExtGState <<", 13);
t2pWriteFile(output, (tdata_t) "/GS1 ", 5);
- buflen = sprintf(
- buffer,
- "%lu",
+ buflen = snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)(object + 3));
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
written += t2pWriteFile(output, (tdata_t) ">> \n", 4);
}
written += t2pWriteFile(output, (tdata_t) "/ProcSet [ ", 11);
- if(t2p->pdf_colorspace == T2P_CS_BILEVEL
- || t2p->pdf_colorspace == T2P_CS_GRAY
+ if(t2p->pdf_colorspace & T2P_CS_BILEVEL
+ || t2p->pdf_colorspace & T2P_CS_GRAY
){
written += t2pWriteFile(output, (tdata_t) "/ImageB ", 8);
} else {
@@ -4216,6 +4468,15 @@ void t2p_compose_pdf_page(T2P* t2p){
} else {
tilewidth=(t2p->tiff_tiles[t2p->pdf_page]).tiles_tilewidth;
tilelength=(t2p->tiff_tiles[t2p->pdf_page]).tiles_tilelength;
+ if( tilewidth > INT_MAX ||
+ tilelength > INT_MAX ||
+ t2p->tiff_width > INT_MAX - tilewidth ||
+ t2p->tiff_length > INT_MAX - tilelength )
+ {
+ TIFFError(TIFF2PDF_MODULE, "Integer overflow");
+ t2p->t2p_error = T2P_ERR_ERROR;
+ return;
+ }
tilecountx=(t2p->tiff_width +
tilewidth -1)/
tilewidth;
@@ -4485,7 +4746,7 @@ tsize_t t2p_write_pdf_page_content_stream(T2P* t2p, TIFF* output){
if(t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount>0){
for(i=0;i<t2p->tiff_tiles[t2p->pdf_page].tiles_tilecount; i++){
box=t2p->tiff_tiles[t2p->pdf_page].tiles_tiles[i].tile_box;
- buflen=sprintf(buffer,
+ buflen=snprintf(buffer, sizeof(buffer),
"q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d_%ld Do Q\n",
t2p->tiff_transferfunctioncount?"/GS1 gs ":"",
box.mat[0],
@@ -4496,11 +4757,12 @@ tsize_t t2p_write_pdf_page_content_stream(T2P* t2p, TIFF* output){
box.mat[7],
t2p->pdf_page + 1,
(long)(i + 1));
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2p_write_pdf_stream(buffer, buflen, output);
}
} else {
box=t2p->pdf_imagebox;
- buflen=sprintf(buffer,
+ buflen=snprintf(buffer, sizeof(buffer),
"q %s %.4f %.4f %.4f %.4f %.4f %.4f cm /Im%d Do Q\n",
t2p->tiff_transferfunctioncount?"/GS1 gs ":"",
box.mat[0],
@@ -4510,6 +4772,7 @@ tsize_t t2p_write_pdf_page_content_stream(T2P* t2p, TIFF* output){
box.mat[6],
box.mat[7],
t2p->pdf_page+1);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2p_write_pdf_stream(buffer, buflen, output);
}
@@ -4525,59 +4788,53 @@ tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t tile,
TIFF* output){
tsize_t written=0;
- char buffer[16];
+ char buffer[32];
int buflen=0;
written += t2p_write_pdf_stream_dict(0, t2p->pdf_xrefcount+1, output);
written += t2pWriteFile(output,
(tdata_t) "/Type /XObject \n/Subtype /Image \n/Name /Im",
42);
- buflen=sprintf(buffer, "%u", t2p->pdf_page+1);
+ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_page+1);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
if(tile != 0){
written += t2pWriteFile(output, (tdata_t) "_", 1);
- buflen=sprintf(buffer, "%lu", (unsigned long)tile);
+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)tile);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
}
written += t2pWriteFile(output, (tdata_t) "\n/Width ", 8);
- _TIFFmemset((tdata_t)buffer, 0x00, 16);
if(tile==0){
- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_width);
+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_width);
} else {
if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){
- buflen=sprintf(
- buffer,
- "%lu",
+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth);
} else {
- buflen=sprintf(
- buffer,
- "%lu",
+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth);
}
}
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) "\n/Height ", 9);
- _TIFFmemset((tdata_t)buffer, 0x00, 16);
if(tile==0){
- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->tiff_length);
+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->tiff_length);
} else {
if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)!=0){
- buflen=sprintf(
- buffer,
- "%lu",
+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
} else {
- buflen=sprintf(
- buffer,
- "%lu",
+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
}
}
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) "\n/BitsPerComponent ", 19);
- _TIFFmemset((tdata_t)buffer, 0x00, 16);
- buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample);
+ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) "\n/ColorSpace ", 13);
written += t2p_write_pdf_xobject_cs(t2p, output);
@@ -4586,7 +4843,7 @@ tsize_t t2p_write_pdf_xobject_stream_dict(ttile_t tile,
(tdata_t) "\n/Interpolate true", 18);
if( (t2p->pdf_switchdecode != 0)
#ifdef CCITT_SUPPORT
- && ! (t2p->pdf_colorspace == T2P_CS_BILEVEL
+ && ! (t2p->pdf_colorspace & T2P_CS_BILEVEL
&& t2p->pdf_compression == T2P_COMPRESS_G4)
#endif
){
@@ -4621,11 +4878,12 @@ tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){
t2p->pdf_colorspace ^= T2P_CS_PALETTE;
written += t2p_write_pdf_xobject_cs(t2p, output);
t2p->pdf_colorspace |= T2P_CS_PALETTE;
- buflen=sprintf(buffer, "%u", (0x0001 << t2p->tiff_bitspersample)-1 );
+ buflen=snprintf(buffer, sizeof(buffer), "%u", (0x0001 << t2p->tiff_bitspersample)-1 );
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " ", 1);
- _TIFFmemset(buffer, 0x00, 16);
- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_palettecs );
+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_palettecs );
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " 0 R ]\n", 7);
return(written);
@@ -4659,14 +4917,16 @@ tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){
X_W /= Y_W;
Z_W /= Y_W;
Y_W = 1.0F;
- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
+ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) "/Range ", 7);
- buflen=sprintf(buffer, "[%d %d %d %d] \n",
+ buflen=snprintf(buffer, sizeof(buffer), "[%d %d %d %d] \n",
t2p->pdf_labrange[0],
t2p->pdf_labrange[1],
t2p->pdf_labrange[2],
t2p->pdf_labrange[3]);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) ">>] \n", 5);
@@ -4678,27 +4938,31 @@ tsize_t t2p_write_pdf_xobject_cs(T2P* t2p, TIFF* output){
tsize_t t2p_write_pdf_transfer(T2P* t2p, TIFF* output){
tsize_t written=0;
- char buffer[16];
+ char buffer[32];
int buflen=0;
written += t2pWriteFile(output, (tdata_t) "<< /Type /ExtGState \n/TR ", 25);
if(t2p->tiff_transferfunctioncount == 1){
- buflen=sprintf(buffer, "%lu",
+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)(t2p->pdf_xrefcount + 1));
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
} else {
written += t2pWriteFile(output, (tdata_t) "[ ", 2);
- buflen=sprintf(buffer, "%lu",
+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)(t2p->pdf_xrefcount + 1));
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
- buflen=sprintf(buffer, "%lu",
+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)(t2p->pdf_xrefcount + 2));
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
- buflen=sprintf(buffer, "%lu",
+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)(t2p->pdf_xrefcount + 3));
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " 0 R ", 5);
written += t2pWriteFile(output, (tdata_t) "/Identity ] ", 12);
@@ -4719,7 +4983,8 @@ tsize_t t2p_write_pdf_transfer_dict(T2P* t2p, TIFF* output, uint16 i){
written += t2pWriteFile(output, (tdata_t) "/FunctionType 0 \n", 17);
written += t2pWriteFile(output, (tdata_t) "/Domain [0.0 1.0] \n", 19);
written += t2pWriteFile(output, (tdata_t) "/Range [0.0 1.0] \n", 18);
- buflen=sprintf(buffer, "/Size [%u] \n", (1<<t2p->tiff_bitspersample));
+ buflen=snprintf(buffer, sizeof(buffer), "/Size [%u] \n", (1<<t2p->tiff_bitspersample));
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) "/BitsPerSample 16 \n", 19);
written += t2p_write_pdf_stream_dict(((tsize_t)1)<<(t2p->tiff_bitspersample+1), 0, output);
@@ -4746,7 +5011,7 @@ tsize_t t2p_write_pdf_transfer_stream(T2P* t2p, TIFF* output, uint16 i){
tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){
tsize_t written=0;
- char buffer[128];
+ char buffer[256];
int buflen=0;
float X_W=0.0;
@@ -4814,19 +5079,22 @@ tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){
written += t2pWriteFile(output, (tdata_t) "<< \n", 4);
if(t2p->pdf_colorspace & T2P_CS_CALGRAY){
written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12);
- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
+ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) "/Gamma 2.2 \n", 12);
}
if(t2p->pdf_colorspace & T2P_CS_CALRGB){
written += t2pWriteFile(output, (tdata_t) "/WhitePoint ", 12);
- buflen=sprintf(buffer, "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
+ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f] \n", X_W, Y_W, Z_W);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) "/Matrix ", 8);
- buflen=sprintf(buffer, "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n",
+ buflen=snprintf(buffer, sizeof(buffer), "[%.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f %.4f] \n",
X_R, Y_R, Z_R,
X_G, Y_G, Z_G,
X_B, Y_B, Z_B);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) "/Gamma [2.2 2.2 2.2] \n", 22);
}
@@ -4842,11 +5110,12 @@ tsize_t t2p_write_pdf_xobject_calcs(T2P* t2p, TIFF* output){
tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){
tsize_t written=0;
- char buffer[16];
+ char buffer[32];
int buflen=0;
written += t2pWriteFile(output, (tdata_t) "[/ICCBased ", 11);
- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_icccs);
+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_icccs);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " 0 R] \n", 7);
@@ -4856,11 +5125,12 @@ tsize_t t2p_write_pdf_xobject_icccs(T2P* t2p, TIFF* output){
tsize_t t2p_write_pdf_xobject_icccs_dict(T2P* t2p, TIFF* output){
tsize_t written=0;
- char buffer[16];
+ char buffer[32];
int buflen=0;
written += t2pWriteFile(output, (tdata_t) "/N ", 3);
- buflen=sprintf(buffer, "%u \n", t2p->tiff_samplesperpixel);
+ buflen=snprintf(buffer, sizeof(buffer), "%u \n", t2p->tiff_samplesperpixel);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) "/Alternate ", 11);
t2p->pdf_colorspace ^= T2P_CS_ICCBASED;
@@ -4925,7 +5195,7 @@ tsize_t t2p_write_pdf_xobject_decode(T2P* t2p, TIFF* output){
tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output){
tsize_t written=0;
- char buffer[16];
+ char buffer[32];
int buflen=0;
if(t2p->pdf_compression==T2P_COMPRESS_NONE){
@@ -4940,42 +5210,40 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output
written += t2pWriteFile(output, (tdata_t) "<< /K -1 ", 9);
if(tile==0){
written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
- buflen=sprintf(buffer, "%lu",
+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)t2p->tiff_width);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
- buflen=sprintf(buffer, "%lu",
+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)t2p->tiff_length);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
} else {
if(t2p_tile_is_right_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){
written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
- buflen=sprintf(
- buffer,
- "%lu",
+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilewidth);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
} else {
written += t2pWriteFile(output, (tdata_t) "/Columns ", 9);
- buflen=sprintf(
- buffer,
- "%lu",
+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilewidth);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
}
if(t2p_tile_is_bottom_edge(t2p->tiff_tiles[t2p->pdf_page], tile-1)==0){
written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
- buflen=sprintf(
- buffer,
- "%lu",
+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_tilelength);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
} else {
written += t2pWriteFile(output, (tdata_t) " /Rows ", 7);
- buflen=sprintf(
- buffer,
- "%lu",
+ buflen=snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)t2p->tiff_tiles[t2p->pdf_page].tiles_edgetilelength);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
}
}
@@ -4991,7 +5259,7 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output
if(t2p->tiff_photometric != PHOTOMETRIC_YCBCR) {
written += t2pWriteFile(output, (tdata_t) "/DecodeParms ", 13);
- written += t2pWriteFile(output, (tdata_t) "<< /ColorTransform 0 >>\n", 24);
+ written += t2pWriteFile(output, (tdata_t) "<< /ColorTransform 1 >>\n", 24);
}
break;
#endif
@@ -5001,21 +5269,21 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output
if(t2p->pdf_compressionquality%100){
written += t2pWriteFile(output, (tdata_t) "/DecodeParms ", 13);
written += t2pWriteFile(output, (tdata_t) "<< /Predictor ", 14);
- _TIFFmemset(buffer, 0x00, 16);
- buflen=sprintf(buffer, "%u", t2p->pdf_compressionquality%100);
+ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->pdf_compressionquality%100);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " /Columns ", 10);
- _TIFFmemset(buffer, 0x00, 16);
- buflen = sprintf(buffer, "%lu",
+ buflen = snprintf(buffer, sizeof(buffer), "%lu",
(unsigned long)t2p->tiff_width);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " /Colors ", 9);
- _TIFFmemset(buffer, 0x00, 16);
- buflen=sprintf(buffer, "%u", t2p->tiff_samplesperpixel);
+ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_samplesperpixel);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " /BitsPerComponent ", 19);
- _TIFFmemset(buffer, 0x00, 16);
- buflen=sprintf(buffer, "%u", t2p->tiff_bitspersample);
+ buflen=snprintf(buffer, sizeof(buffer), "%u", t2p->tiff_bitspersample);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) ">>\n", 3);
}
@@ -5035,16 +5303,17 @@ tsize_t t2p_write_pdf_xobject_stream_filter(ttile_t tile, T2P* t2p, TIFF* output
tsize_t t2p_write_pdf_xreftable(T2P* t2p, TIFF* output){
tsize_t written=0;
- char buffer[21];
+ char buffer[64];
int buflen=0;
uint32 i=0;
written += t2pWriteFile(output, (tdata_t) "xref\n0 ", 7);
- buflen=sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount + 1));
+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount + 1));
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
written += t2pWriteFile(output, (tdata_t) " \n0000000000 65535 f \n", 22);
for (i=0;i<t2p->pdf_xrefcount;i++){
- sprintf(buffer, "%.10lu 00000 n \n",
+ snprintf(buffer, sizeof(buffer), "%.10lu 00000 n \n",
(unsigned long)t2p->pdf_xrefoffsets[i]);
written += t2pWriteFile(output, (tdata_t) buffer, 20);
}
@@ -5068,17 +5337,17 @@ tsize_t t2p_write_pdf_trailer(T2P* t2p, TIFF* output)
snprintf(t2p->pdf_fileid + i, 9, "%.8X", rand());
written += t2pWriteFile(output, (tdata_t) "trailer\n<<\n/Size ", 17);
- buflen = sprintf(buffer, "%lu", (unsigned long)(t2p->pdf_xrefcount+1));
+ buflen = snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)(t2p->pdf_xrefcount+1));
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- _TIFFmemset(buffer, 0x00, 32);
written += t2pWriteFile(output, (tdata_t) "\n/Root ", 7);
- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_catalog);
+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_catalog);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- _TIFFmemset(buffer, 0x00, 32);
written += t2pWriteFile(output, (tdata_t) " 0 R \n/Info ", 12);
- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_info);
+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_info);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- _TIFFmemset(buffer, 0x00, 32);
written += t2pWriteFile(output, (tdata_t) " 0 R \n/ID[<", 11);
written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid,
sizeof(t2p->pdf_fileid) - 1);
@@ -5086,9 +5355,9 @@ tsize_t t2p_write_pdf_trailer(T2P* t2p, TIFF* output)
written += t2pWriteFile(output, (tdata_t) t2p->pdf_fileid,
sizeof(t2p->pdf_fileid) - 1);
written += t2pWriteFile(output, (tdata_t) ">]\n>>\nstartxref\n", 16);
- buflen=sprintf(buffer, "%lu", (unsigned long)t2p->pdf_startxref);
+ buflen=snprintf(buffer, sizeof(buffer), "%lu", (unsigned long)t2p->pdf_startxref);
+ check_snprintf_ret(t2p, buflen, buffer);
written += t2pWriteFile(output, (tdata_t) buffer, buflen);
- _TIFFmemset(buffer, 0x00, 32);
written += t2pWriteFile(output, (tdata_t) "\n%%EOF\n", 7);
return(written);
@@ -5143,12 +5412,13 @@ tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){
t2p_read_tiff_init(t2p, input);
if(t2p->t2p_error!=T2P_ERR_OK){return(0);}
- t2p->pdf_xrefoffsets= (uint32*) _TIFFmalloc(t2p->pdf_xrefcount * sizeof(uint32) );
+ t2p->pdf_xrefoffsets= (uint32*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,t2p->pdf_xrefcount,sizeof(uint32)) );
if(t2p->pdf_xrefoffsets==NULL){
TIFFError(
TIFF2PDF_MODULE,
"Can't allocate %u bytes of memory for t2p_write_pdf",
(unsigned int) (t2p->pdf_xrefcount * sizeof(uint32)) );
+ t2p->t2p_error = T2P_ERR_ERROR;
return(written);
}
t2p->pdf_xrefcount=0;
@@ -5205,9 +5475,9 @@ tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){
written += t2p_write_pdf_transfer_dict(t2p, output, i);
written += t2p_write_pdf_stream_dict_end(output);
written += t2p_write_pdf_stream_start(output);
- streamlen=written;
+ /* streamlen=written; */ /* value not used */
written += t2p_write_pdf_transfer_stream(t2p, output, i);
- streamlen=written-streamlen;
+ /* streamlen=written-streamlen; */ /* value not used */
written += t2p_write_pdf_stream_end(output);
written += t2p_write_pdf_obj_end(output);
}
@@ -5220,9 +5490,9 @@ tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){
written += t2p_write_pdf_stream_dict(t2p->pdf_palettesize, 0, output);
written += t2p_write_pdf_stream_dict_end(output);
written += t2p_write_pdf_stream_start(output);
- streamlen=written;
+ /* streamlen=written; */ /* value not used */
written += t2p_write_pdf_xobject_palettecs_stream(t2p, output);
- streamlen=written-streamlen;
+ /* streamlen=written-streamlen; */ /* value not used */
written += t2p_write_pdf_stream_end(output);
written += t2p_write_pdf_obj_end(output);
}
@@ -5234,9 +5504,9 @@ tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){
written += t2p_write_pdf_xobject_icccs_dict(t2p, output);
written += t2p_write_pdf_stream_dict_end(output);
written += t2p_write_pdf_stream_start(output);
- streamlen=written;
+ /* streamlen=written; */ /* value not used */
written += t2p_write_pdf_xobject_icccs_stream(t2p, output);
- streamlen=written-streamlen;
+ /* streamlen=written-streamlen; */ /* value not used */
written += t2p_write_pdf_stream_end(output);
written += t2p_write_pdf_obj_end(output);
}
diff --git a/tiff/tools/tiff2ps.c b/tiff/tools/tiff2ps.c
index 372230a9a..82a5d84b4 100644
--- a/tiff/tools/tiff2ps.c
+++ b/tiff/tools/tiff2ps.c
@@ -1,4 +1,4 @@
-/* $Id: tiff2ps.c,v 1.49 2011-05-31 17:10:18 bfriesen Exp $ */
+/* $Id: tiff2ps.c,v 1.54 2015-06-21 01:09:10 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -44,6 +44,11 @@
/*
* Revision history
+ * 2013-Jan-21
+ * Richard Nolde: Fix bug in auto rotate option code. Once a
+ * rotation angle was set by the auto rotate check, it was
+ * retained for all pages that followed instead of being
+ * retested for each page.
*
* 2010-Sep-17
* Richard Nolde: Reinstate code from Feb 2009 that never got
@@ -241,8 +246,10 @@ main(int argc, char* argv[])
double pageWidth = 0;
double pageHeight = 0;
uint32 diroff = 0;
+#if !HAVE_DECL_OPTARG
extern char *optarg;
extern int optind;
+#endif
FILE* output = stdout;
pageOrientation[0] = '\0';
@@ -255,9 +262,9 @@ main(int argc, char* argv[])
case 'c':
centered = 1;
break;
- case 'C':
- creator = optarg;
- break;
+ case 'C':
+ creator = optarg;
+ break;
case 'd': /* without -a, this only processes one image at this IFD */
dirnum = atoi(optarg);
break;
@@ -414,18 +421,13 @@ main(int argc, char* argv[])
exit (1);
}
- if (pageHeight && (maxPageHeight > pageHeight))
- {
- TIFFError ("-H", "Max viewport height cannot exceed page height");
- exit (1);
- }
-
/* auto rotate requires a specified page width and height */
if (auto_rotate == TRUE)
{
+ /*
if ((pageWidth == 0) || (pageHeight == 0))
TIFFWarning ("-r auto", " requires page height and width specified with -h and -w");
-
+ */
if ((maxPageWidth > 0) || (maxPageHeight > 0))
{
TIFFError ("-r auto", " is incompatible with maximum page width/height specified by -H or -W");
@@ -858,6 +860,9 @@ int exportMaskedImage(FILE *fp, double pagewidth, double pageheight,
{
if (splitheight < imageheight) /* More than one vertical image segments */
{
+ /* Intra2net: Keep correct apspect ratio */
+ xscale = (imagewidth + overlap) * (pageheight / splitheight) * scale;
+
xtran = -1.0 * column * (pagewidth - overlap);
subimage_height = imageheight - ((splitheight - overlap) * row);
ytran = pageheight - subimage_height * (pageheight / splitheight);
@@ -889,6 +894,14 @@ int exportMaskedImage(FILE *fp, double pagewidth, double pageheight,
xtran = 0;
}
}
+
+ if (imagewidth <= pagewidth) {
+ /* Intra2net: Crop page at the bottom instead of the top (-> output starts at the top).
+ Only do this in non-page-split mode */
+ if (imageheight <= splitheight) {
+ ytran = pageheight - imageheight; /* Note: Will be negative for images longer than page size */
+ }
+ }
bott_offset += ytran / (center ? 2 : 1);
left_offset += xtran / (center ? 2 : 1);
break;
@@ -1393,7 +1406,10 @@ int get_viewport (double pgwidth, double pgheight, double pswidth, double psheig
/* Only one of maxPageHeight or maxPageWidth can be specified */
if (maxPageHeight != 0) /* Clip the viewport to maxPageHeight on each page */
{
- *view_height = maxPageHeight * PS_UNIT_SIZE;
+ if (pgheight != 0 && pgheight < maxPageHeight)
+ *view_height = pgheight * PS_UNIT_SIZE;
+ else
+ *view_height = maxPageHeight * PS_UNIT_SIZE;
/*
* if (res_unit == RESUNIT_CENTIMETER)
* *view_height /= 2.54F;
@@ -1423,7 +1439,10 @@ int get_viewport (double pgwidth, double pgheight, double pswidth, double psheig
if (maxPageWidth != 0) /* Clip the viewport to maxPageWidth on each page */
{
- *view_width = maxPageWidth * PS_UNIT_SIZE;
+ if (pgwidth != 0 && pgwidth < maxPageWidth)
+ *view_width = pgwidth * PS_UNIT_SIZE;
+ else
+ *view_width = maxPageWidth * PS_UNIT_SIZE;
/* if (res_unit == RESUNIT_CENTIMETER)
* *view_width /= 2.54F;
*/
@@ -1592,6 +1611,8 @@ int TIFF2PS(FILE* fd, TIFF* tif, double pgwidth, double pgheight, double lm, dou
}
if (generateEPSF)
break;
+ if (auto_rotate)
+ rotation = 0.0;
TIFFGetFieldDefaulted(tif, TIFFTAG_SUBFILETYPE, &subfiletype);
} while (((subfiletype & FILETYPE_PAGE) || printAll) && TIFFReadDirectory(tif));
@@ -1781,8 +1802,8 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h)
imageOp = "imagemask";
(void)strcpy(im_x, "0");
- (void)sprintf(im_y, "%lu", (long) h);
- (void)sprintf(im_h, "%lu", (long) h);
+ (void)snprintf(im_y, sizeof(im_y), "%lu", (long) h);
+ (void)snprintf(im_h, sizeof(im_h), "%lu", (long) h);
tile_width = w;
tile_height = h;
if (TIFFIsTiled(tif)) {
@@ -1803,7 +1824,7 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h)
}
if (tile_height < h) {
fputs("/im_y 0 def\n", fd);
- (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h);
+ (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h);
}
} else {
repeat_count = tf_numberstrips;
@@ -1815,7 +1836,7 @@ PS_Lvl2ImageDict(FILE* fd, TIFF* tif, uint32 w, uint32 h)
fprintf(fd, "/im_h %lu def\n",
(unsigned long) tile_height);
(void)strcpy(im_h, "im_h");
- (void)sprintf(im_y, "%lu im_y sub", (unsigned long) h);
+ (void)snprintf(im_y, sizeof(im_y), "%lu im_y sub", (unsigned long) h);
}
}
@@ -3033,13 +3054,13 @@ char* stuff[] = {
" -a convert all directories in file (default is first), Not EPS",
" -b # set the bottom margin to # inches",
" -c center image (-b and -l still add to this)",
+" -C name set postscript document creator name",
" -d # set initial directory to # counting from zero",
" -D enable duplex printing (two pages per sheet of paper)",
" -e generate Encapsulated PostScript (EPS) (implies -z)",
" -h # set printed page height to # inches (no default)",
" -w # set printed page width to # inches (no default)",
" -H # split image if height is more than # inches",
-" -P L or P set optional PageOrientation DSC comment to Landscape or Portrait",
" -W # split image if width is more than # inches",
" -L # overLap split images by # inches",
" -i # enable/disable (Nz/0) pixel interpolation (default: enable)",
@@ -3047,7 +3068,8 @@ char* stuff[] = {
" -m use \"imagemask\" operator instead of \"image\"",
" -o # convert directory at file offset # bytes",
" -O file write PostScript to file instead of standard output",
-" -p generate regular PostScript",
+" -p generate regular (non-encapsulated) PostScript",
+" -P L or P set optional PageOrientation DSC comment to Landscape or Portrait",
" -r # or auto rotate by 90, 180, 270 degrees or auto",
" -s generate PostScript for a single image",
" -t name set postscript document title. Otherwise the filename is used",
diff --git a/tiff/tools/tiff2rgba.c b/tiff/tools/tiff2rgba.c
index 737167c7a..4de96aeca 100644
--- a/tiff/tools/tiff2rgba.c
+++ b/tiff/tools/tiff2rgba.c
@@ -1,4 +1,4 @@
-/* $Id: tiff2rgba.c,v 1.19 2011-02-23 21:46:09 fwarmerdam Exp $ */
+/* $Id: tiff2rgba.c,v 1.22 2016-08-15 20:06:41 erouault Exp $ */
/*
* Copyright (c) 1991-1997 Sam Leffler
@@ -65,8 +65,10 @@ main(int argc, char* argv[])
{
TIFF *in, *out;
int c;
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char *optarg;
+#endif
while ((c = getopt(argc, argv, "c:r:t:bn8")) != -1)
switch (c) {
@@ -145,6 +147,7 @@ cvt_by_tile( TIFF *in, TIFF *out )
uint32 row, col;
uint32 *wrk_line;
int ok = 1;
+ uint32 rastersize, wrk_linesize;
TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width);
TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height);
@@ -161,7 +164,13 @@ cvt_by_tile( TIFF *in, TIFF *out )
/*
* Allocate tile buffer
*/
- raster = (uint32*)_TIFFmalloc(tile_width * tile_height * sizeof (uint32));
+ rastersize = tile_width * tile_height * sizeof (uint32);
+ if (tile_width != (rastersize / tile_height) / sizeof( uint32))
+ {
+ TIFFError(TIFFFileName(in), "Integer overflow when calculating raster buffer");
+ exit(-1);
+ }
+ raster = (uint32*)_TIFFmalloc(rastersize);
if (raster == 0) {
TIFFError(TIFFFileName(in), "No space for raster buffer");
return (0);
@@ -171,7 +180,13 @@ cvt_by_tile( TIFF *in, TIFF *out )
* Allocate a scanline buffer for swapping during the vertical
* mirroring pass.
*/
- wrk_line = (uint32*)_TIFFmalloc(tile_width * sizeof (uint32));
+ wrk_linesize = tile_width * sizeof (uint32);
+ if (tile_width != wrk_linesize / sizeof (uint32))
+ {
+ TIFFError(TIFFFileName(in), "Integer overflow when calculating wrk_line buffer");
+ exit(-1);
+ }
+ wrk_line = (uint32*)_TIFFmalloc(wrk_linesize);
if (!wrk_line) {
TIFFError(TIFFFileName(in), "No space for raster scanline buffer");
ok = 0;
@@ -247,6 +262,7 @@ cvt_by_strip( TIFF *in, TIFF *out )
uint32 row;
uint32 *wrk_line;
int ok = 1;
+ uint32 rastersize, wrk_linesize;
TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width);
TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height);
@@ -261,7 +277,13 @@ cvt_by_strip( TIFF *in, TIFF *out )
/*
* Allocate strip buffer
*/
- raster = (uint32*)_TIFFmalloc(width * rowsperstrip * sizeof (uint32));
+ rastersize = width * rowsperstrip * sizeof (uint32);
+ if (width != (rastersize / rowsperstrip) / sizeof( uint32))
+ {
+ TIFFError(TIFFFileName(in), "Integer overflow when calculating raster buffer");
+ exit(-1);
+ }
+ raster = (uint32*)_TIFFmalloc(rastersize);
if (raster == 0) {
TIFFError(TIFFFileName(in), "No space for raster buffer");
return (0);
@@ -271,7 +293,13 @@ cvt_by_strip( TIFF *in, TIFF *out )
* Allocate a scanline buffer for swapping during the vertical
* mirroring pass.
*/
- wrk_line = (uint32*)_TIFFmalloc(width * sizeof (uint32));
+ wrk_linesize = width * sizeof (uint32);
+ if (width != wrk_linesize / sizeof (uint32))
+ {
+ TIFFError(TIFFFileName(in), "Integer overflow when calculating wrk_line buffer");
+ exit(-1);
+ }
+ wrk_line = (uint32*)_TIFFmalloc(wrk_linesize);
if (!wrk_line) {
TIFFError(TIFFFileName(in), "No space for raster scanline buffer");
ok = 0;
@@ -506,7 +534,7 @@ static char* stuff[] = {
"usage: tiff2rgba [-c comp] [-r rows] [-b] [-n] [-8] input... output",
"where comp is one of the following compression algorithms:",
" jpeg\t\tJPEG encoding",
- " zip\t\tLempel-Ziv & Welch encoding",
+ " zip\t\tZip/Deflate encoding",
" lzw\t\tLempel-Ziv & Welch encoding",
" packbits\tPackBits encoding",
" none\t\tno compression",
diff --git a/tiff/tools/tiffcmp.c b/tiff/tools/tiffcmp.c
index bc7dac941..1a008a30c 100644
--- a/tiff/tools/tiffcmp.c
+++ b/tiff/tools/tiffcmp.c
@@ -1,4 +1,4 @@
-/* $Id: tiffcmp.c,v 1.16 2010-03-10 18:56:50 bfriesen Exp $ */
+/* $Id: tiffcmp.c,v 1.18 2015-06-21 01:09:10 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -68,8 +68,10 @@ main(int argc, char* argv[])
{
TIFF *tif1, *tif2;
int c, dirnum;
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char* optarg;
+#endif
while ((c = getopt(argc, argv, "ltz:")) != -1)
switch (c) {
@@ -260,6 +262,7 @@ bad1:
static int
cmptags(TIFF* tif1, TIFF* tif2)
{
+ uint16 compression1, compression2;
CmpLongField(TIFFTAG_SUBFILETYPE, "SubFileType");
CmpLongField(TIFFTAG_IMAGEWIDTH, "ImageWidth");
CmpLongField(TIFFTAG_IMAGELENGTH, "ImageLength");
@@ -276,8 +279,20 @@ cmptags(TIFF* tif1, TIFF* tif2)
CmpShortField(TIFFTAG_SAMPLEFORMAT, "SampleFormat");
CmpFloatField(TIFFTAG_XRESOLUTION, "XResolution");
CmpFloatField(TIFFTAG_YRESOLUTION, "YResolution");
- CmpLongField(TIFFTAG_GROUP3OPTIONS, "Group3Options");
- CmpLongField(TIFFTAG_GROUP4OPTIONS, "Group4Options");
+ if( TIFFGetField(tif1, TIFFTAG_COMPRESSION, &compression1) &&
+ compression1 == COMPRESSION_CCITTFAX3 &&
+ TIFFGetField(tif2, TIFFTAG_COMPRESSION, &compression2) &&
+ compression2 == COMPRESSION_CCITTFAX3 )
+ {
+ CmpLongField(TIFFTAG_GROUP3OPTIONS, "Group3Options");
+ }
+ if( TIFFGetField(tif1, TIFFTAG_COMPRESSION, &compression1) &&
+ compression1 == COMPRESSION_CCITTFAX4 &&
+ TIFFGetField(tif2, TIFFTAG_COMPRESSION, &compression2) &&
+ compression2 == COMPRESSION_CCITTFAX4 )
+ {
+ CmpLongField(TIFFTAG_GROUP4OPTIONS, "Group4Options");
+ }
CmpShortField(TIFFTAG_RESOLUTIONUNIT, "ResolutionUnit");
CmpShortField(TIFFTAG_PLANARCONFIG, "PlanarConfiguration");
CmpLongField(TIFFTAG_ROWSPERSTRIP, "RowsPerStrip");
diff --git a/tiff/tools/tiffcp.c b/tiff/tools/tiffcp.c
index 0f81b19d4..338a3d113 100644
--- a/tiff/tools/tiffcp.c
+++ b/tiff/tools/tiffcp.c
@@ -1,4 +1,4 @@
-/* $Id: tiffcp.c,v 1.49 2010-12-23 13:38:47 dron Exp $ */
+/* $Id: tiffcp.c,v 1.55 2016-10-08 15:54:57 erouault Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -168,12 +168,14 @@ main(int argc, char* argv[])
char mode[10];
char* mp = mode;
int c;
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char* optarg;
+#endif
*mp++ = 'w';
*mp = '\0';
- while ((c = getopt(argc, argv, ",:b:c:f:l:o:z:p:r:w:aistBLMC8x")) != -1)
+ while ((c = getopt(argc, argv, ",:b:c:f:l:o:p:r:w:aistBLMC8x")) != -1)
switch (c) {
case ',':
if (optarg[0] != '=') usage();
@@ -408,7 +410,12 @@ char* stuff[] = {
" -p separate store samples separately (e.g. RRR...GGG...BBB...)",
" -s write output in strips",
" -t write output in tiles",
+" -x force the merged tiff pages in sequence",
" -8 write BigTIFF instead of default ClassicTIFF",
+" -B write big-endian instead of native byte order",
+" -L write little-endian instead of native byte order",
+" -M disable use of memory-mapped files",
+" -C disable strip chopping",
" -i ignore read errors",
" -b file[,#] bias (dark) monochrome image to be subtracted from all others",
" -,=% use % rather than , to separate image #'s (per Note below)",
@@ -430,7 +437,6 @@ char* stuff[] = {
" -c g4 compress output with CCITT Group 4 encoding",
" -c sgilog compress output with SGILOG encoding",
" -c none use no compression algorithm on output",
-" -x force the merged tiff pages in sequence",
"",
"Group 3 options:",
" 1d use default CCITT Group 3 1D-encoding",
@@ -586,8 +592,8 @@ static copyFunc pickCopyFunc(TIFF*, TIFF*, uint16, uint16);
static int
tiffcp(TIFF* in, TIFF* out)
{
- uint16 bitspersample, samplesperpixel;
- uint16 input_compression, input_photometric;
+ uint16 bitspersample, samplesperpixel = 1;
+ uint16 input_compression, input_photometric = PHOTOMETRIC_MINISBLACK;
copyFunc cf;
uint32 width, length;
struct cpTag* p;
@@ -629,6 +635,12 @@ tiffcp(TIFF* in, TIFF* out)
TIFFSetField(out, TIFFTAG_PHOTOMETRIC,
samplesperpixel == 1 ?
PHOTOMETRIC_LOGL : PHOTOMETRIC_LOGLUV);
+ else if (input_compression == COMPRESSION_JPEG &&
+ samplesperpixel == 3 ) {
+ /* RGB conversion was forced above
+ hence the output will be of the same type */
+ TIFFSetField(out, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB);
+ }
else
CopyTag(TIFFTAG_PHOTOMETRIC, 1, TIFF_SHORT);
if (fillorder != 0)
@@ -1060,7 +1072,7 @@ DECLAREcpFunc(cpContig2SeparateByRow)
inbuf = _TIFFmalloc(scanlinesizein);
outbuf = _TIFFmalloc(scanlinesizeout);
if (!inbuf || !outbuf)
- return 0;
+ goto bad;
_TIFFmemset(inbuf, 0, scanlinesizein);
_TIFFmemset(outbuf, 0, scanlinesizeout);
/* unpack channels */
@@ -1113,7 +1125,7 @@ DECLAREcpFunc(cpSeparate2ContigByRow)
inbuf = _TIFFmalloc(scanlinesizein);
outbuf = _TIFFmalloc(scanlinesizeout);
if (!inbuf || !outbuf)
- return 0;
+ goto bad;
_TIFFmemset(inbuf, 0, scanlinesizein);
_TIFFmemset(outbuf, 0, scanlinesizeout);
for (row = 0; row < imagelength; row++) {
@@ -1326,7 +1338,7 @@ DECLAREreadFunc(readContigTilesIntoBuffer)
uint32 colb = 0;
uint32 col;
- for (col = 0; col < imagewidth; col += tw) {
+ for (col = 0; col < imagewidth && colb < imagew; col += tw) {
if (TIFFReadTile(in, tilebuf, col, row, 0, 0) < 0
&& !ignore) {
TIFFError(TIFFFileName(in),
@@ -1511,7 +1523,7 @@ DECLAREwriteFunc(writeBufferToContigTiles)
uint32 colb = 0;
uint32 col;
- for (col = 0; col < imagewidth; col += tw) {
+ for (col = 0; col < imagewidth && colb < imagew; col += tw) {
/*
* Tile is clipped horizontally. Calculate
* visible portion and skewing factors.
diff --git a/tiff/tools/tiffcrop.c b/tiff/tools/tiffcrop.c
index 9cd5d86fe..722b132ce 100644
--- a/tiff/tools/tiffcrop.c
+++ b/tiff/tools/tiffcrop.c
@@ -1,4 +1,4 @@
-/* $Id: tiffcrop.c,v 1.20 2010-12-14 02:03:24 faxguy Exp $ */
+/* $Id: tiffcrop.c,v 1.46 2016-11-18 14:58:46 erouault Exp $ */
/* tiffcrop.c -- a port of tiffcp.c extended to include manipulations of
* the image data through additional options listed below
@@ -131,7 +131,7 @@ static char tiffcrop_rev_date[] = "12-13-2010";
#endif
#ifndef HAVE_GETOPT
-extern int getopt(int, char**, char*);
+extern int getopt(int argc, char * const argv[], const char *optstring);
#endif
#ifdef NEED_LIBPORT
@@ -148,6 +148,8 @@ extern int getopt(int, char**, char*);
#define PATH_MAX 1024
#endif
+#define TIFF_UINT32_MAX 0xFFFFFFFFU
+
#ifndef streq
#define streq(a,b) (strcmp((a),(b)) == 0)
#endif
@@ -178,7 +180,7 @@ extern int getopt(int, char**, char*);
#define ROTATECW_90 8
#define ROTATECW_180 16
#define ROTATECW_270 32
-#define ROTATE_ANY ROTATECW_90 || ROTATECW_180 || ROTATECW_270
+#define ROTATE_ANY (ROTATECW_90 | ROTATECW_180 | ROTATECW_270)
#define CROP_NONE 0
#define CROP_MARGINS 1
@@ -798,6 +800,11 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8* buf,
}
tile_buffsize = tilesize;
+ if (tilesize == 0 || tile_rowsize == 0)
+ {
+ TIFFError("readContigTilesIntoBuffer", "Tile size or tile rowsize is zero");
+ exit(-1);
+ }
if (tilesize < (tsize_t)(tl * tile_rowsize))
{
@@ -807,11 +814,25 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8* buf,
tilesize, tl * tile_rowsize);
#endif
tile_buffsize = tl * tile_rowsize;
- }
+ if (tl != (tile_buffsize / tile_rowsize))
+ {
+ TIFFError("readContigTilesIntoBuffer", "Integer overflow when calculating buffer size.");
+ exit(-1);
+ }
+ }
- tilebuf = _TIFFmalloc(tile_buffsize);
+ /* Add 3 padding bytes for extractContigSamplesShifted32bits */
+ if( (size_t) tile_buffsize > 0xFFFFFFFFU - 3U )
+ {
+ TIFFError("readContigTilesIntoBuffer", "Integer overflow when calculating buffer size.");
+ exit(-1);
+ }
+ tilebuf = _TIFFmalloc(tile_buffsize + 3);
if (tilebuf == 0)
return 0;
+ tilebuf[tile_buffsize] = 0;
+ tilebuf[tile_buffsize+1] = 0;
+ tilebuf[tile_buffsize+2] = 0;
dst_rowsize = ((imagewidth * bps * spp) + 7) / 8;
for (row = 0; row < imagelength; row += tl)
@@ -938,8 +959,8 @@ static int readContigTilesIntoBuffer (TIFF* in, uint8* buf,
}
}
prev_trailing_bits += trailing_bits;
- if (prev_trailing_bits > 7)
- prev_trailing_bits-= 8;
+ /* if (prev_trailing_bits > 7) */
+ /* prev_trailing_bits-= 8; */
}
}
}
@@ -989,7 +1010,7 @@ static int readSeparateTilesIntoBuffer (TIFF* in, uint8 *obuf,
nrow = (row + tl > imagelength) ? imagelength - row : tl;
for (col = 0; col < imagewidth; col += tw)
{
- for (s = 0; s < spp; s++)
+ for (s = 0; s < spp && s < MAX_SAMPLES; s++)
{ /* Read each plane of a tile set into srcbuffs[s] */
tbytes = TIFFReadTile(in, srcbuffs[s], col, row, 0, s);
if (tbytes < 0 && !ignore)
@@ -1145,7 +1166,24 @@ writeBufferToSeparateStrips (TIFF* out, uint8* buf,
(void) TIFFGetFieldDefaulted(out, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
(void) TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps);
bytes_per_sample = (bps + 7) / 8;
- rowsize = ((bps * spp * width) + 7) / 8; /* source has interleaved samples */
+ if( width == 0 ||
+ (uint32)bps * (uint32)spp > TIFF_UINT32_MAX / width ||
+ bps * spp * width > TIFF_UINT32_MAX - 7U )
+ {
+ TIFFError(TIFFFileName(out),
+ "Error, uint32 overflow when computing (bps * spp * width) + 7");
+ return 1;
+ }
+ rowsize = ((bps * spp * width) + 7U) / 8; /* source has interleaved samples */
+ if( bytes_per_sample == 0 ||
+ rowsperstrip > TIFF_UINT32_MAX / bytes_per_sample ||
+ rowsperstrip * bytes_per_sample > TIFF_UINT32_MAX / (width + 1) )
+ {
+ TIFFError(TIFFFileName(out),
+ "Error, uint32 overflow when computing rowsperstrip * "
+ "bytes_per_sample * (width + 1)");
+ return 1;
+ }
rowstripsize = rowsperstrip * bytes_per_sample * (width + 1);
obuf = _TIFFmalloc (rowstripsize);
@@ -1205,10 +1243,17 @@ static int writeBufferToContigTiles (TIFF* out, uint8* buf, uint32 imagelength,
tsize_t tilesize = TIFFTileSize(out);
unsigned char *tilebuf = NULL;
- TIFFGetField(out, TIFFTAG_TILELENGTH, &tl);
- TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw);
- TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps);
+ if( !TIFFGetField(out, TIFFTAG_TILELENGTH, &tl) ||
+ !TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw) ||
+ !TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps) )
+ return 1;
+ if (tilesize == 0 || tile_rowsize == 0 || tl == 0 || tw == 0)
+ {
+ TIFFError("writeBufferToContigTiles", "Tile size, tile row size, tile width, or tile length is zero");
+ exit(-1);
+ }
+
tile_buffsize = tilesize;
if (tilesize < (tsize_t)(tl * tile_rowsize))
{
@@ -1218,13 +1263,26 @@ static int writeBufferToContigTiles (TIFF* out, uint8* buf, uint32 imagelength,
tilesize, tl * tile_rowsize);
#endif
tile_buffsize = tl * tile_rowsize;
+ if (tl != tile_buffsize / tile_rowsize)
+ {
+ TIFFError("writeBufferToContigTiles", "Integer overflow when calculating buffer size");
+ exit(-1);
}
+ }
+
+ if( imagewidth == 0 ||
+ (uint32)bps * (uint32)spp > TIFF_UINT32_MAX / imagewidth ||
+ bps * spp * imagewidth > TIFF_UINT32_MAX - 7U )
+ {
+ TIFFError(TIFFFileName(out),
+ "Error, uint32 overflow when computing (imagewidth * bps * spp) + 7");
+ return 1;
+ }
+ src_rowsize = ((imagewidth * spp * bps) + 7U) / 8;
tilebuf = _TIFFmalloc(tile_buffsize);
if (tilebuf == 0)
return 1;
-
- src_rowsize = ((imagewidth * spp * bps) + 7) / 8;
for (row = 0; row < imagelength; row += tl)
{
nrow = (row + tl > imagelength) ? imagelength - row : tl;
@@ -1284,7 +1342,17 @@ static int writeBufferToSeparateTiles (TIFF* out, uint8* buf, uint32 imagelength
TIFFGetField(out, TIFFTAG_TILELENGTH, &tl);
TIFFGetField(out, TIFFTAG_TILEWIDTH, &tw);
TIFFGetField(out, TIFFTAG_BITSPERSAMPLE, &bps);
- src_rowsize = ((imagewidth * spp * bps) + 7) / 8;
+
+ if( imagewidth == 0 ||
+ (uint32)bps * (uint32)spp > TIFF_UINT32_MAX / imagewidth ||
+ bps * spp * imagewidth > TIFF_UINT32_MAX - 7 )
+ {
+ TIFFError(TIFFFileName(out),
+ "Error, uint32 overflow when computing (imagewidth * bps * spp) + 7");
+ _TIFFfree(obuf);
+ return 1;
+ }
+ src_rowsize = ((imagewidth * spp * bps) + 7U) / 8;
for (row = 0; row < imagelength; row += tl)
{
@@ -1540,8 +1608,10 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32
char *opt_ptr = NULL; /* Pointer to next token in option set */
char *sep = NULL; /* Pointer to a token separator */
unsigned int i, j, start, end;
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char* optarg;
+#endif
*mp++ = 'w';
*mp = '\0';
@@ -1568,7 +1638,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32
}
*dirnum = start - 1;
break;
- case 'e': switch (tolower(optarg[0])) /* image export modes*/
+ case 'e': switch (tolower((int) optarg[0])) /* image export modes*/
{
case 'c': crop_data->exp_mode = ONE_FILE_COMPOSITE;
crop_data->img_mode = COMPOSITE_IMAGES;
@@ -1691,14 +1761,14 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32
/* convert option to lowercase */
end = strlen (opt_ptr);
for (i = 0; i < end; i++)
- *(opt_ptr + i) = tolower(*(opt_ptr + i));
+ *(opt_ptr + i) = tolower((int) *(opt_ptr + i));
/* Look for dump format specification */
if (strncmp(opt_ptr, "for", 3) == 0)
{
/* convert value to lowercase */
end = strlen (opt_offset + 1);
for (i = 1; i <= end; i++)
- *(opt_offset + i) = tolower(*(opt_offset + i));
+ *(opt_offset + i) = tolower((int) *(opt_offset + i));
/* check dump format value */
if (strncmp (opt_offset + 1, "txt", 3) == 0)
{
@@ -1765,7 +1835,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32
}
break;
case 'E': /* edge reference */
- switch (tolower(optarg[0]))
+ switch (tolower((int) optarg[0]))
{
case 't': crop_data->edge_ref = EDGE_TOP;
break;
@@ -1782,7 +1852,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32
break;
case 'F': /* flip eg mirror image or cropped segment, M was already used */
crop_data->crop_mode |= CROP_MIRROR;
- switch (tolower(optarg[0]))
+ switch (tolower((int) optarg[0]))
{
case 'h': crop_data->mirror = MIRROR_HORIZ;
break;
@@ -1888,7 +1958,7 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32
*image_count = i;
break;
case 'O': /* page orientation */
- switch (tolower(optarg[0]))
+ switch (tolower((int) optarg[0]))
{
case 'a': page->orient = ORIENTATION_AUTO;
break;
@@ -2012,6 +2082,10 @@ void process_command_opts (int argc, char *argv[], char *mp, char *mode, uint32
{
crop_data->zones++;
opt_offset = strchr(opt_ptr, ':');
+ if (!opt_offset) {
+ TIFFError("Wrong parameter syntax for -Z", "tiffcrop -h");
+ exit(-1);
+ }
*opt_offset = '\0';
crop_data->zonelist[i].position = atoi(opt_ptr);
crop_data->zonelist[i].total = atoi(opt_offset + 1);
@@ -2077,7 +2151,7 @@ update_output_file (TIFF **tiffout, char *mode, int autoindex,
return 1;
}
- sprintf (filenum, "-%03d%s", findex, export_ext);
+ snprintf(filenum, sizeof(filenum), "-%03d%s", findex, export_ext);
filenum[14] = '\0';
strncat (exportname, filenum, 15);
}
@@ -2103,7 +2177,10 @@ update_output_file (TIFF **tiffout, char *mode, int autoindex,
int
main(int argc, char* argv[])
{
+
+#if !HAVE_DECL_OPTARG
extern int optind;
+#endif
uint16 defconfig = (uint16) -1;
uint16 deffillorder = 0;
uint32 deftilewidth = (uint32) 0;
@@ -2230,8 +2307,8 @@ main(int argc, char* argv[])
/* dump.infilename is guaranteed to be NUL termimated and have 20 bytes
fewer than PATH_MAX */
- memset (temp_filename, '\0', PATH_MAX + 1);
- sprintf (temp_filename, "%s-read-%03d.%s", dump.infilename, dump_images,
+ snprintf(temp_filename, sizeof(temp_filename), "%s-read-%03d.%s",
+ dump.infilename, dump_images,
(dump.format == DUMP_TEXT) ? "txt" : "raw");
if ((dump.infile = fopen(temp_filename, dump.mode)) == NULL)
{
@@ -2249,8 +2326,8 @@ main(int argc, char* argv[])
/* dump.outfilename is guaranteed to be NUL termimated and have 20 bytes
fewer than PATH_MAX */
- memset (temp_filename, '\0', PATH_MAX + 1);
- sprintf (temp_filename, "%s-write-%03d.%s", dump.outfilename, dump_images,
+ snprintf(temp_filename, sizeof(temp_filename), "%s-write-%03d.%s",
+ dump.outfilename, dump_images,
(dump.format == DUMP_TEXT) ? "txt" : "raw");
if ((dump.outfile = fopen(temp_filename, dump.mode)) == NULL)
{
@@ -2595,6 +2672,7 @@ static void dump_info(FILE *dumpfile, int format, char *prefix, char *msg, ...)
fprintf(dumpfile, "%s ", prefix);
vfprintf(dumpfile, msg, ap);
fprintf(dumpfile, "\n");
+ va_end(ap);
}
}
@@ -2640,7 +2718,7 @@ extractContigSamplesBytes (uint8 *in, uint8 *out, uint32 cols,
{
int i, bytes_per_sample, sindex;
uint32 col, dst_rowsize, bit_offset;
- uint32 src_byte, src_bit;
+ uint32 src_byte /*, src_bit */;
uint8 *src = in;
uint8 *dst = out;
@@ -2682,12 +2760,12 @@ extractContigSamplesBytes (uint8 *in, uint8 *out, uint32 cols,
if (sindex == 0)
{
src_byte = bit_offset / 8;
- src_bit = bit_offset % 8;
+ /* src_bit = bit_offset % 8; */
}
else
{
src_byte = (bit_offset + (sindex * bps)) / 8;
- src_bit = (bit_offset + (sindex * bps)) % 8;
+ /* src_bit = (bit_offset + (sindex * bps)) % 8; */
}
src = in + src_byte;
for (i = 0; i < bytes_per_sample; i++)
@@ -2963,7 +3041,7 @@ extractContigSamples32bits (uint8 *in, uint8 *out, uint32 cols,
tsample_t sample, uint16 spp, uint16 bps,
tsample_t count, uint32 start, uint32 end)
{
- int ready_bits = 0, sindex = 0, shift_width = 0;
+ int ready_bits = 0, sindex = 0 /*, shift_width = 0 */;
uint32 col, src_byte, src_bit, bit_offset;
uint32 longbuff1 = 0, longbuff2 = 0;
uint64 maskbits = 0, matchbits = 0;
@@ -2992,7 +3070,7 @@ extractContigSamples32bits (uint8 *in, uint8 *out, uint32 cols,
end = cols;
}
- shift_width = ((bps + 7) / 8) + 1;
+ /* shift_width = ((bps + 7) / 8) + 1; */
ready_bits = 0;
maskbits = (uint64)-1 >> ( 64 - bps);
for (col = start; col < end; col++)
@@ -3337,7 +3415,7 @@ extractContigSamplesShifted32bits (uint8 *in, uint8 *out, uint32 cols,
tsample_t count, uint32 start, uint32 end,
int shift)
{
- int ready_bits = 0, sindex = 0, shift_width = 0;
+ int ready_bits = 0, sindex = 0 /*, shift_width = 0 */;
uint32 col, src_byte, src_bit, bit_offset;
uint32 longbuff1 = 0, longbuff2 = 0;
uint64 maskbits = 0, matchbits = 0;
@@ -3366,7 +3444,7 @@ extractContigSamplesShifted32bits (uint8 *in, uint8 *out, uint32 cols,
end = cols;
}
- shift_width = ((bps + 7) / 8) + 1;
+ /* shift_width = ((bps + 7) / 8) + 1; */
ready_bits = shift;
maskbits = (uint64)-1 >> ( 64 - bps);
for (col = start; col < end; col++)
@@ -3593,34 +3671,38 @@ extractContigSamplesToTileBuffer(uint8 *out, uint8 *in, uint32 rows, uint32 cols
} /* end extractContigSamplesToTileBuffer */
static int readContigStripsIntoBuffer (TIFF* in, uint8* buf)
- {
- uint8* bufp = buf;
- int32 bytes_read = 0;
- uint16 strip, nstrips = TIFFNumberOfStrips(in);
- uint32 stripsize = TIFFStripSize(in);
- uint32 rows = 0;
- uint32 rps = TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rps);
- tsize_t scanline_size = TIFFScanlineSize(in);
-
- for (strip = 0; strip < nstrips; strip++)
- {
- bytes_read = TIFFReadEncodedStrip (in, strip, bufp, -1);
- rows = bytes_read / scanline_size;
- if ((strip < (nstrips - 1)) && (bytes_read != (int32)stripsize))
- TIFFError("", "Strip %d: read %lu bytes, strip size %lu",
- (int)strip + 1, (unsigned long) bytes_read, (unsigned long)stripsize);
+{
+ uint8* bufp = buf;
+ int32 bytes_read = 0;
+ uint32 strip, nstrips = TIFFNumberOfStrips(in);
+ uint32 stripsize = TIFFStripSize(in);
+ uint32 rows = 0;
+ uint32 rps = TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rps);
+ tsize_t scanline_size = TIFFScanlineSize(in);
+
+ if (scanline_size == 0) {
+ TIFFError("", "TIFF scanline size is zero!");
+ return 0;
+ }
- if (bytes_read < 0 && !ignore)
- {
- TIFFError("", "Error reading strip %lu after %lu rows",
- (unsigned long) strip, (unsigned long)rows);
- return 0;
- }
- bufp += bytes_read;
- }
+ for (strip = 0; strip < nstrips; strip++) {
+ bytes_read = TIFFReadEncodedStrip (in, strip, bufp, -1);
+ rows = bytes_read / scanline_size;
+ if ((strip < (nstrips - 1)) && (bytes_read != (int32)stripsize))
+ TIFFError("", "Strip %d: read %lu bytes, strip size %lu",
+ (int)strip + 1, (unsigned long) bytes_read,
+ (unsigned long)stripsize);
+
+ if (bytes_read < 0 && !ignore) {
+ TIFFError("", "Error reading strip %lu after %lu rows",
+ (unsigned long) strip, (unsigned long)rows);
+ return 0;
+ }
+ bufp += bytes_read;
+ }
- return 1;
- } /* end readContigStripsIntoBuffer */
+ return 1;
+} /* end readContigStripsIntoBuffer */
static int
combineSeparateSamplesBytes (unsigned char *srcbuffs[], unsigned char *out,
@@ -3686,7 +3768,7 @@ combineSeparateSamples8bits (uint8 *in[], uint8 *out, uint32 cols,
FILE *dumpfile, int format, int level)
{
int ready_bits = 0;
- int bytes_per_sample = 0;
+ /* int bytes_per_sample = 0; */
uint32 src_rowsize, dst_rowsize, src_offset;
uint32 bit_offset;
uint32 row, col, src_byte = 0, src_bit = 0;
@@ -3703,7 +3785,7 @@ combineSeparateSamples8bits (uint8 *in[], uint8 *out, uint32 cols,
return (1);
}
- bytes_per_sample = (bps + 7) / 8;
+ /* bytes_per_sample = (bps + 7) / 8; */
src_rowsize = ((bps * cols) + 7) / 8;
dst_rowsize = ((bps * cols * spp) + 7) / 8;
maskbits = (uint8)-1 >> ( 8 - bps);
@@ -3723,7 +3805,7 @@ combineSeparateSamples8bits (uint8 *in[], uint8 *out, uint32 cols,
matchbits = maskbits << (8 - src_bit - bps);
/* load up next sample from each plane */
- for (s = 0; s < spp; s++)
+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
{
src = in[s] + src_offset + src_byte;
buff1 = ((*src) & matchbits) << (src_bit);
@@ -3785,7 +3867,7 @@ combineSeparateSamples16bits (uint8 *in[], uint8 *out, uint32 cols,
uint32 rows, uint16 spp, uint16 bps,
FILE *dumpfile, int format, int level)
{
- int ready_bits = 0, bytes_per_sample = 0;
+ int ready_bits = 0 /*, bytes_per_sample = 0 */;
uint32 src_rowsize, dst_rowsize;
uint32 bit_offset, src_offset;
uint32 row, col, src_byte = 0, src_bit = 0;
@@ -3803,7 +3885,7 @@ combineSeparateSamples16bits (uint8 *in[], uint8 *out, uint32 cols,
return (1);
}
- bytes_per_sample = (bps + 7) / 8;
+ /* bytes_per_sample = (bps + 7) / 8; */
src_rowsize = ((bps * cols) + 7) / 8;
dst_rowsize = ((bps * cols * spp) + 7) / 8;
maskbits = (uint16)-1 >> (16 - bps);
@@ -3822,7 +3904,7 @@ combineSeparateSamples16bits (uint8 *in[], uint8 *out, uint32 cols,
src_bit = bit_offset % 8;
matchbits = maskbits << (16 - src_bit - bps);
- for (s = 0; s < spp; s++)
+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
{
src = in[s] + src_offset + src_byte;
if (little_endian)
@@ -3895,7 +3977,7 @@ combineSeparateSamples24bits (uint8 *in[], uint8 *out, uint32 cols,
uint32 rows, uint16 spp, uint16 bps,
FILE *dumpfile, int format, int level)
{
- int ready_bits = 0, bytes_per_sample = 0;
+ int ready_bits = 0 /*, bytes_per_sample = 0 */;
uint32 src_rowsize, dst_rowsize;
uint32 bit_offset, src_offset;
uint32 row, col, src_byte = 0, src_bit = 0;
@@ -3913,7 +3995,7 @@ combineSeparateSamples24bits (uint8 *in[], uint8 *out, uint32 cols,
return (1);
}
- bytes_per_sample = (bps + 7) / 8;
+ /* bytes_per_sample = (bps + 7) / 8; */
src_rowsize = ((bps * cols) + 7) / 8;
dst_rowsize = ((bps * cols * spp) + 7) / 8;
maskbits = (uint32)-1 >> ( 32 - bps);
@@ -3932,7 +4014,7 @@ combineSeparateSamples24bits (uint8 *in[], uint8 *out, uint32 cols,
src_bit = bit_offset % 8;
matchbits = maskbits << (32 - src_bit - bps);
- for (s = 0; s < spp; s++)
+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
{
src = in[s] + src_offset + src_byte;
if (little_endian)
@@ -4019,7 +4101,7 @@ combineSeparateSamples32bits (uint8 *in[], uint8 *out, uint32 cols,
uint32 rows, uint16 spp, uint16 bps,
FILE *dumpfile, int format, int level)
{
- int ready_bits = 0, bytes_per_sample = 0, shift_width = 0;
+ int ready_bits = 0 /*, bytes_per_sample = 0, shift_width = 0 */;
uint32 src_rowsize, dst_rowsize, bit_offset, src_offset;
uint32 src_byte = 0, src_bit = 0;
uint32 row, col;
@@ -4038,11 +4120,11 @@ combineSeparateSamples32bits (uint8 *in[], uint8 *out, uint32 cols,
return (1);
}
- bytes_per_sample = (bps + 7) / 8;
+ /* bytes_per_sample = (bps + 7) / 8; */
src_rowsize = ((bps * cols) + 7) / 8;
dst_rowsize = ((bps * cols * spp) + 7) / 8;
maskbits = (uint64)-1 >> ( 64 - bps);
- shift_width = ((bps + 7) / 8) + 1;
+ /* shift_width = ((bps + 7) / 8) + 1; */
for (row = 0; row < rows; row++)
{
@@ -4058,7 +4140,7 @@ combineSeparateSamples32bits (uint8 *in[], uint8 *out, uint32 cols,
src_bit = bit_offset % 8;
matchbits = maskbits << (64 - src_bit - bps);
- for (s = 0; s < spp; s++)
+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
{
src = in[s] + src_offset + src_byte;
if (little_endian)
@@ -4248,7 +4330,7 @@ combineSeparateTileSamples8bits (uint8 *in[], uint8 *out, uint32 cols,
matchbits = maskbits << (8 - src_bit - bps);
/* load up next sample from each plane */
- for (s = 0; s < spp; s++)
+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
{
src = in[s] + src_offset + src_byte;
buff1 = ((*src) & matchbits) << (src_bit);
@@ -4347,7 +4429,7 @@ combineSeparateTileSamples16bits (uint8 *in[], uint8 *out, uint32 cols,
src_bit = bit_offset % 8;
matchbits = maskbits << (16 - src_bit - bps);
- for (s = 0; s < spp; s++)
+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
{
src = in[s] + src_offset + src_byte;
if (little_endian)
@@ -4456,7 +4538,7 @@ combineSeparateTileSamples24bits (uint8 *in[], uint8 *out, uint32 cols,
src_bit = bit_offset % 8;
matchbits = maskbits << (32 - src_bit - bps);
- for (s = 0; s < spp; s++)
+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
{
src = in[s] + src_offset + src_byte;
if (little_endian)
@@ -4544,7 +4626,7 @@ combineSeparateTileSamples32bits (uint8 *in[], uint8 *out, uint32 cols,
uint32 tw, uint16 spp, uint16 bps,
FILE *dumpfile, int format, int level)
{
- int ready_bits = 0, shift_width = 0;
+ int ready_bits = 0 /*, shift_width = 0 */;
uint32 src_rowsize, dst_rowsize, bit_offset, src_offset;
uint32 src_byte = 0, src_bit = 0;
uint32 row, col;
@@ -4566,7 +4648,7 @@ combineSeparateTileSamples32bits (uint8 *in[], uint8 *out, uint32 cols,
src_rowsize = ((bps * tw) + 7) / 8;
dst_rowsize = ((imagewidth * bps * spp) + 7) / 8;
maskbits = (uint64)-1 >> ( 64 - bps);
- shift_width = ((bps + 7) / 8) + 1;
+ /* shift_width = ((bps + 7) / 8) + 1; */
for (row = 0; row < rows; row++)
{
@@ -4582,7 +4664,7 @@ combineSeparateTileSamples32bits (uint8 *in[], uint8 *out, uint32 cols,
src_bit = bit_offset % 8;
matchbits = maskbits << (64 - src_bit - bps);
- for (s = 0; s < spp; s++)
+ for (s = 0; (s < spp) && (s < MAX_SAMPLES); s++)
{
src = in[s] + src_offset + src_byte;
if (little_endian)
@@ -4675,9 +4757,12 @@ static int readSeparateStripsIntoBuffer (TIFF *in, uint8 *obuf, uint32 length,
uint32 width, uint16 spp,
struct dump_opts *dump)
{
- int i, j, bytes_per_sample, bytes_per_pixel, shift_width, result = 1;
+ int i, bytes_per_sample, bytes_per_pixel, shift_width, result = 1;
+ uint32 j;
int32 bytes_read = 0;
- uint16 bps, nstrips, planar, strips_per_sample;
+ uint16 bps, planar;
+ uint32 nstrips;
+ uint32 strips_per_sample;
uint32 src_rowsize, dst_rowsize, rows_processed, rps;
uint32 rows_this_strip = 0;
tsample_t s;
@@ -5499,7 +5584,7 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image,
uint32 orows, ocols; /* rows and cols for output */
uint32 hmargin, vmargin; /* Horizontal and vertical margins */
uint32 x1, x2, y1, y2, line_bytes;
- unsigned int orientation;
+ /* unsigned int orientation; */
uint32 i, j, k;
scale = 1.0;
@@ -5636,7 +5721,7 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image,
case ORIENTATION_PORTRAIT:
ocols = TIFFhowmany(iwidth, owidth);
orows = TIFFhowmany(ilength, olength);
- orientation = ORIENTATION_PORTRAIT;
+ /* orientation = ORIENTATION_PORTRAIT; */
break;
case ORIENTATION_LANDSCAPE:
@@ -5645,7 +5730,7 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image,
x1 = olength;
olength = owidth;
owidth = x1;
- orientation = ORIENTATION_LANDSCAPE;
+ /* orientation = ORIENTATION_LANDSCAPE; */
break;
case ORIENTATION_AUTO:
@@ -5659,7 +5744,7 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image,
{ /* Portrait */
ocols = x1;
orows = x2;
- orientation = ORIENTATION_PORTRAIT;
+ /* orientation = ORIENTATION_PORTRAIT; */
}
else
{ /* Landscape */
@@ -5668,7 +5753,7 @@ computeOutputPixelOffsets (struct crop_mask *crop, struct image_data *image,
x1 = olength;
olength = owidth;
owidth = x1;
- orientation = ORIENTATION_LANDSCAPE;
+ /* orientation = ORIENTATION_LANDSCAPE; */
}
}
@@ -5722,7 +5807,8 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c
{
uint32 i;
float xres = 0.0, yres = 0.0;
- uint16 nstrips = 0, ntiles = 0, planar = 0;
+ uint32 nstrips = 0, ntiles = 0;
+ uint16 planar = 0;
uint16 bps = 0, spp = 0, res_unit = 0;
uint16 orientation = 0;
uint16 input_compression = 0, input_photometric = 0;
@@ -5930,12 +6016,27 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c
TIFFGetField(in, TIFFTAG_TILELENGTH, &tl);
tile_rowsize = TIFFTileRowSize(in);
+ if (ntiles == 0 || tlsize == 0 || tile_rowsize == 0)
+ {
+ TIFFError("loadImage", "File appears to be tiled, but the number of tiles, tile size, or tile rowsize is zero.");
+ exit(-1);
+ }
buffsize = tlsize * ntiles;
+ if (tlsize != (buffsize / ntiles))
+ {
+ TIFFError("loadImage", "Integer overflow when calculating buffer size");
+ exit(-1);
+ }
-
if (buffsize < (uint32)(ntiles * tl * tile_rowsize))
{
buffsize = ntiles * tl * tile_rowsize;
+ if (ntiles != (buffsize / tl / tile_rowsize))
+ {
+ TIFFError("loadImage", "Integer overflow when calculating buffer size");
+ exit(-1);
+ }
+
#ifdef DEBUG2
TIFFError("loadImage",
"Tilesize %u is too small, using ntiles * tilelength * tilerowsize %lu",
@@ -5950,12 +6051,29 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c
}
else
{
+ uint32 buffsize_check;
readunit = STRIP;
TIFFGetFieldDefaulted(in, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
stsize = TIFFStripSize(in);
nstrips = TIFFNumberOfStrips(in);
+ if (nstrips == 0 || stsize == 0)
+ {
+ TIFFError("loadImage", "File appears to be striped, but the number of stipes or stripe size is zero.");
+ exit(-1);
+ }
+
buffsize = stsize * nstrips;
-
+ if (stsize != (buffsize / nstrips))
+ {
+ TIFFError("loadImage", "Integer overflow when calculating buffer size");
+ exit(-1);
+ }
+ buffsize_check = ((length * width * spp * bps) + 7);
+ if (length != ((buffsize_check - 7) / width / spp / bps))
+ {
+ TIFFError("loadImage", "Integer overflow detected.");
+ exit(-1);
+ }
if (buffsize < (uint32) (((length * width * spp * bps) + 7) / 8))
{
buffsize = ((length * width * spp * bps) + 7) / 8;
@@ -5995,29 +6113,46 @@ loadImage(TIFF* in, struct image_data *image, struct dump_opts *dump, unsigned c
}
read_buff = *read_ptr;
+ /* +3 : add a few guard bytes since reverseSamples16bits() can read a bit */
+ /* outside buffer */
if (!read_buff)
- read_buff = (unsigned char *)_TIFFmalloc(buffsize);
+ {
+ if( buffsize > 0xFFFFFFFFU - 3 )
+ {
+ TIFFError("loadImage", "Unable to allocate/reallocate read buffer");
+ return (-1);
+ }
+ read_buff = (unsigned char *)_TIFFmalloc(buffsize+3);
+ }
else
{
if (prev_readsize < buffsize)
+ {
+ if( buffsize > 0xFFFFFFFFU - 3 )
{
- new_buff = _TIFFrealloc(read_buff, buffsize);
+ TIFFError("loadImage", "Unable to allocate/reallocate read buffer");
+ return (-1);
+ }
+ new_buff = _TIFFrealloc(read_buff, buffsize+3);
if (!new_buff)
{
free (read_buff);
- read_buff = (unsigned char *)_TIFFmalloc(buffsize);
+ read_buff = (unsigned char *)_TIFFmalloc(buffsize+3);
}
else
read_buff = new_buff;
}
}
-
if (!read_buff)
{
TIFFError("loadImage", "Unable to allocate/reallocate read buffer");
return (-1);
}
+ read_buff[buffsize] = 0;
+ read_buff[buffsize+1] = 0;
+ read_buff[buffsize+2] = 0;
+
prev_readsize = buffsize;
*read_ptr = read_buff;
@@ -6143,14 +6278,14 @@ extractCompositeRegions(struct image_data *image, struct crop_mask *crop,
uint32 i, trailing_bits, prev_trailing_bits;
uint32 row, first_row, last_row, first_col, last_col;
uint32 src_rowsize, dst_rowsize, src_offset, dst_offset;
- uint32 crop_width, crop_length, img_width, img_length;
+ uint32 crop_width, crop_length, img_width /*, img_length */;
uint32 prev_length, prev_width, composite_width;
uint16 bps, spp;
uint8 *src, *dst;
tsample_t count, sample = 0; /* Update to extract one or more samples */
img_width = image->width;
- img_length = image->length;
+ /* img_length = image->length; */
bps = image->bps;
spp = image->spp;
count = spp;
@@ -6393,13 +6528,13 @@ extractSeparateRegion(struct image_data *image, struct crop_mask *crop,
uint32 src_rowsize, dst_rowsize;
uint32 row, first_row, last_row, first_col, last_col;
uint32 src_offset, dst_offset;
- uint32 crop_width, crop_length, img_width, img_length;
+ uint32 crop_width, crop_length, img_width /*, img_length */;
uint16 bps, spp;
uint8 *src, *dst;
tsample_t count, sample = 0; /* Update to extract more or more samples */
img_width = image->width;
- img_length = image->length;
+ /* img_length = image->length; */
bps = image->bps;
spp = image->spp;
count = spp;
@@ -6511,14 +6646,22 @@ extractImageSection(struct image_data *image, struct pageseg *section,
unsigned char *src_buff, unsigned char *sect_buff)
{
unsigned char bytebuff1, bytebuff2;
- unsigned char *src, *dst;
+#ifdef DEVELMODE
+ /* unsigned char *src, *dst; */
+#endif
- uint32 img_width, img_length, img_rowsize;
+ uint32 img_width, img_rowsize;
+#ifdef DEVELMODE
+ uint32 img_length;
+#endif
uint32 j, shift1, shift2, trailing_bits;
uint32 row, first_row, last_row, first_col, last_col;
uint32 src_offset, dst_offset, row_offset, col_offset;
uint32 offset1, offset2, full_bytes;
- uint32 sect_width, sect_length;
+ uint32 sect_width;
+#ifdef DEVELMODE
+ uint32 sect_length;
+#endif
uint16 bps, spp;
#ifdef DEVELMODE
@@ -6528,12 +6671,16 @@ extractImageSection(struct image_data *image, struct pageseg *section,
#endif
img_width = image->width;
+#ifdef DEVELMODE
img_length = image->length;
+#endif
bps = image->bps;
spp = image->spp;
- src = src_buff;
- dst = sect_buff;
+#ifdef DEVELMODE
+ /* src = src_buff; */
+ /* dst = sect_buff; */
+#endif
src_offset = 0;
dst_offset = 0;
@@ -6555,7 +6702,9 @@ extractImageSection(struct image_data *image, struct pageseg *section,
last_col = section->x2;
sect_width = last_col - first_col + 1;
+#ifdef DEVELMODE
sect_length = last_row - first_row + 1;
+#endif
img_rowsize = ((img_width * bps + 7) / 8) * spp;
full_bytes = (sect_width * spp * bps) / 8; /* number of COMPLETE bytes per row in section */
trailing_bits = (sect_width * bps) % 8;
@@ -6934,7 +7083,7 @@ writeSingleSection(TIFF *in, TIFF *out, struct image_data *image,
TIFFSetField(out, TIFFTAG_COMPRESSION, COMPRESSION_JPEG);
}
else /* Use the compression from the input file */
- TIFFSetField(out, TIFFTAG_COMPRESSION, compression);
+ CopyField(TIFFTAG_COMPRESSION, compression);
}
if (compression == COMPRESSION_JPEG)
@@ -7081,14 +7230,15 @@ writeSingleSection(TIFF *in, TIFF *out, struct image_data *image,
TIFFSetField(out, TIFFTAG_GROUP3OPTIONS, g3opts);
else
CopyField(TIFFTAG_GROUP3OPTIONS, g3opts);
- } else
+ } else {
CopyTag(TIFFTAG_GROUP4OPTIONS, 1, TIFF_LONG);
- CopyTag(TIFFTAG_BADFAXLINES, 1, TIFF_LONG);
- CopyTag(TIFFTAG_CLEANFAXDATA, 1, TIFF_LONG);
- CopyTag(TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG);
- CopyTag(TIFFTAG_FAXRECVPARAMS, 1, TIFF_LONG);
- CopyTag(TIFFTAG_FAXRECVTIME, 1, TIFF_LONG);
- CopyTag(TIFFTAG_FAXSUBADDRESS, 1, TIFF_ASCII);
+ }
+ CopyTag(TIFFTAG_BADFAXLINES, 1, TIFF_LONG);
+ CopyTag(TIFFTAG_CLEANFAXDATA, 1, TIFF_LONG);
+ CopyTag(TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG);
+ CopyTag(TIFFTAG_FAXRECVPARAMS, 1, TIFF_LONG);
+ CopyTag(TIFFTAG_FAXRECVTIME, 1, TIFF_LONG);
+ CopyTag(TIFFTAG_FAXSUBADDRESS, 1, TIFF_ASCII);
break;
}
{ uint32 len32;
@@ -7757,15 +7907,16 @@ writeCroppedImage(TIFF *in, TIFF *out, struct image_data *image,
TIFFSetField(out, TIFFTAG_GROUP3OPTIONS, g3opts);
else
CopyField(TIFFTAG_GROUP3OPTIONS, g3opts);
- } else
+ } else {
CopyTag(TIFFTAG_GROUP4OPTIONS, 1, TIFF_LONG);
- CopyTag(TIFFTAG_BADFAXLINES, 1, TIFF_LONG);
- CopyTag(TIFFTAG_CLEANFAXDATA, 1, TIFF_LONG);
- CopyTag(TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG);
- CopyTag(TIFFTAG_FAXRECVPARAMS, 1, TIFF_LONG);
- CopyTag(TIFFTAG_FAXRECVTIME, 1, TIFF_LONG);
- CopyTag(TIFFTAG_FAXSUBADDRESS, 1, TIFF_ASCII);
- break;
+ }
+ CopyTag(TIFFTAG_BADFAXLINES, 1, TIFF_LONG);
+ CopyTag(TIFFTAG_CLEANFAXDATA, 1, TIFF_LONG);
+ CopyTag(TIFFTAG_CONSECUTIVEBADFAXLINES, 1, TIFF_LONG);
+ CopyTag(TIFFTAG_FAXRECVPARAMS, 1, TIFF_LONG);
+ CopyTag(TIFFTAG_FAXRECVTIME, 1, TIFF_LONG);
+ CopyTag(TIFFTAG_FAXSUBADDRESS, 1, TIFF_ASCII);
+ break;
case COMPRESSION_NONE:
break;
default: break;
@@ -8096,8 +8247,8 @@ static int
rotateContigSamples32bits(uint16 rotation, uint16 spp, uint16 bps, uint32 width,
uint32 length, uint32 col, uint8 *src, uint8 *dst)
{
- int ready_bits = 0, shift_width = 0;
- int bytes_per_sample, bytes_per_pixel;
+ int ready_bits = 0 /*, shift_width = 0 */;
+ /* int bytes_per_sample, bytes_per_pixel; */
uint32 row, rowsize, bit_offset;
uint32 src_byte, src_bit;
uint32 longbuff1 = 0, longbuff2 = 0;
@@ -8114,12 +8265,12 @@ rotateContigSamples32bits(uint16 rotation, uint16 spp, uint16 bps, uint32 width,
return (1);
}
- bytes_per_sample = (bps + 7) / 8;
- bytes_per_pixel = ((bps * spp) + 7) / 8;
- if (bytes_per_pixel < (bytes_per_sample + 1))
- shift_width = bytes_per_pixel;
- else
- shift_width = bytes_per_sample + 1;
+ /* bytes_per_sample = (bps + 7) / 8; */
+ /* bytes_per_pixel = ((bps * spp) + 7) / 8; */
+ /* if (bytes_per_pixel < (bytes_per_sample + 1)) */
+ /* shift_width = bytes_per_pixel; */
+ /* else */
+ /* shift_width = bytes_per_sample + 1; */
rowsize = ((bps * spp * width) + 7) / 8;
ready_bits = 0;
@@ -8711,8 +8862,8 @@ static int
reverseSamples32bits (uint16 spp, uint16 bps, uint32 width,
uint8 *ibuff, uint8 *obuff)
{
- int ready_bits = 0, shift_width = 0;
- int bytes_per_sample, bytes_per_pixel;
+ int ready_bits = 0 /*, shift_width = 0 */;
+ /* int bytes_per_sample, bytes_per_pixel; */
uint32 bit_offset;
uint32 src_byte = 0, high_bit = 0;
uint32 col;
@@ -8734,12 +8885,12 @@ reverseSamples32bits (uint16 spp, uint16 bps, uint32 width,
mask_bits = (uint64)-1 >> (64 - bps);
dst = obuff;
- bytes_per_sample = (bps + 7) / 8;
- bytes_per_pixel = ((bps * spp) + 7) / 8;
- if (bytes_per_pixel < (bytes_per_sample + 1))
- shift_width = bytes_per_pixel;
- else
- shift_width = bytes_per_sample + 1;
+ /* bytes_per_sample = (bps + 7) / 8; */
+ /* bytes_per_pixel = ((bps * spp) + 7) / 8; */
+ /* if (bytes_per_pixel < (bytes_per_sample + 1)) */
+ /* shift_width = bytes_per_pixel; */
+ /* else */
+ /* shift_width = bytes_per_sample + 1; */
for (col = width; col > 0; col--)
{
@@ -8823,6 +8974,11 @@ reverseSamplesBytes (uint16 spp, uint16 bps, uint32 width,
}
bytes_per_pixel = ((bps * spp) + 7) / 8;
+ if( bytes_per_pixel > sizeof(swapbuff) )
+ {
+ TIFFError("reverseSamplesBytes","bytes_per_pixel too large");
+ return (1);
+ }
switch (bps / 8)
{
case 8: /* Use memcpy for multiple bytes per sample data */
diff --git a/tiff/tools/tiffdither.c b/tiff/tools/tiffdither.c
index 3a377ac0a..247553cdf 100644
--- a/tiff/tools/tiffdither.c
+++ b/tiff/tools/tiffdither.c
@@ -1,4 +1,4 @@
-/* $Id: tiffdither.c,v 1.12 2010-03-10 18:56:50 bfriesen Exp $ */
+/* $Id: tiffdither.c,v 1.16 2015-06-21 01:09:11 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -39,6 +39,7 @@
#endif
#include "tiffio.h"
+#include "tiffiop.h"
#define streq(a,b) (strcmp(a,b) == 0)
#define strneq(a,b,n) (strncmp(a,b,n) == 0)
@@ -56,7 +57,7 @@ static void usage(void);
* Floyd-Steinberg error propragation with threshold.
* This code is stolen from tiffmedian.
*/
-static void
+static int
fsdither(TIFF* in, TIFF* out)
{
unsigned char *outline, *inputline, *inptr;
@@ -68,14 +69,19 @@ fsdither(TIFF* in, TIFF* out)
int lastline, lastpixel;
int bit;
tsize_t outlinesize;
+ int errcode = 0;
imax = imagelength - 1;
jmax = imagewidth - 1;
inputline = (unsigned char *)_TIFFmalloc(TIFFScanlineSize(in));
- thisline = (short *)_TIFFmalloc(imagewidth * sizeof (short));
- nextline = (short *)_TIFFmalloc(imagewidth * sizeof (short));
+ thisline = (short *)_TIFFmalloc(TIFFSafeMultiply(tmsize_t, imagewidth, sizeof (short)));
+ nextline = (short *)_TIFFmalloc(TIFFSafeMultiply(tmsize_t, imagewidth, sizeof (short)));
outlinesize = TIFFScanlineSize(out);
outline = (unsigned char *) _TIFFmalloc(outlinesize);
+ if (! (inputline && thisline && nextline && outline)) {
+ fprintf(stderr, "Out of memory.\n");
+ goto skip_on_error;
+ }
/*
* Get first line
@@ -93,7 +99,7 @@ fsdither(TIFF* in, TIFF* out)
nextline = tmpptr;
lastline = (i == imax);
if (TIFFReadScanline(in, inputline, i, 0) <= 0)
- break;
+ goto skip_on_error;
inptr = inputline;
nextptr = nextline;
for (j = 0; j < imagewidth; ++j)
@@ -131,13 +137,18 @@ fsdither(TIFF* in, TIFF* out)
}
}
if (TIFFWriteScanline(out, outline, i-1, 0) < 0)
- break;
+ goto skip_on_error;
}
+ goto exit_label;
+
skip_on_error:
+ errcode = 1;
+ exit_label:
_TIFFfree(inputline);
_TIFFfree(thisline);
_TIFFfree(nextline);
_TIFFfree(outline);
+ return errcode;
}
static uint16 compression = COMPRESSION_PACKBITS;
@@ -199,8 +210,10 @@ main(int argc, char* argv[])
uint32 rowsperstrip = (uint32) -1;
uint16 fillorder = 0;
int c;
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char *optarg;
+#endif
while ((c = getopt(argc, argv, "c:f:r:t:")) != -1)
switch (c) {
@@ -260,7 +273,7 @@ main(int argc, char* argv[])
TIFFSetField(out, TIFFTAG_FILLORDER, fillorder);
else
CopyField(TIFFTAG_FILLORDER, shortv);
- sprintf(thing, "Dithered B&W version of %s", argv[optind]);
+ snprintf(thing, sizeof(thing), "Dithered B&W version of %s", argv[optind]);
TIFFSetField(out, TIFFTAG_IMAGEDESCRIPTION, thing);
CopyField(TIFFTAG_PHOTOMETRIC, shortv);
CopyField(TIFFTAG_ORIENTATION, shortv);
@@ -289,6 +302,7 @@ char* stuff[] = {
"usage: tiffdither [options] input.tif output.tif",
"where options are:",
" -r # make each strip have no more than # rows",
+" -t # set the threshold value for dithering (default 128)",
" -f lsb2msb force lsb-to-msb FillOrder for output",
" -f msb2lsb force msb-to-lsb FillOrder for output",
" -c lzw[:opts] compress output with Lempel-Ziv & Welch encoding",
diff --git a/tiff/tools/tiffdump.c b/tiff/tools/tiffdump.c
index 86113bbc1..3de0062b9 100644
--- a/tiff/tools/tiffdump.c
+++ b/tiff/tools/tiffdump.c
@@ -1,4 +1,4 @@
-/* $Id: tiffdump.c,v 1.25 2011-04-02 20:54:09 bfriesen Exp $ */
+/* $Id: tiffdump.c,v 1.35 2016-11-19 15:42:46 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -34,6 +34,8 @@
# include <unistd.h>
#endif
+#include "tiffiop.h"
+
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#endif
@@ -95,8 +97,11 @@ const char* floatfmt = "%s%g"; /* FLOAT */
const char* doublefmt = "%s%g"; /* DOUBLE */
static void dump(int, uint64);
+
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char* optarg;
+#endif
void
usage()
@@ -162,9 +167,11 @@ static void Fatal(const char*, ...);
static void
dump(int fd, uint64 diroff)
{
- unsigned i;
+ unsigned i, j;
+ uint64* visited_diroff = NULL;
+ unsigned int count_visited_dir = 0;
- lseek(fd, (off_t) 0, 0);
+ _TIFF_lseek_f(fd, (_TIFF_off_t) 0, 0);
if (read(fd, (char*) &hdr, sizeof (TIFFHeaderCommon)) != sizeof (TIFFHeaderCommon))
ReadError("TIFF header");
if (hdr.common.tiff_magic != TIFF_BIGENDIAN
@@ -223,10 +230,40 @@ dump(int fd, uint64 diroff)
Fatal("Not a TIFF file, bad version number %u (%#x)",
hdr.common.tiff_version, hdr.common.tiff_version);
for (i = 0; diroff != 0; i++) {
+ for(j=0; j<count_visited_dir; j++)
+ {
+ if( visited_diroff[j] == diroff )
+ {
+ free(visited_diroff);
+ Fatal("Cycle detected in chaining of TIFF directories!");
+ }
+ }
+ {
+ size_t alloc_size;
+ alloc_size=TIFFSafeMultiply(tmsize_t,(count_visited_dir + 1),
+ sizeof(uint64));
+ if (alloc_size == 0)
+ {
+ if (visited_diroff)
+ free(visited_diroff);
+ visited_diroff = 0;
+ }
+ else
+ {
+ visited_diroff = (uint64*) realloc(visited_diroff,alloc_size);
+ }
+ }
+ if( !visited_diroff )
+ Fatal("Out of memory");
+ visited_diroff[count_visited_dir] = diroff;
+ count_visited_dir ++;
+
if (i > 0)
putchar('\n');
diroff = ReadDirectory(fd, i, diroff);
}
+ if( visited_diroff )
+ free(visited_diroff);
}
static const int datawidth[] = {
@@ -266,17 +303,13 @@ ReadDirectory(int fd, unsigned int ix, uint64 off)
uint16 dircount;
uint32 direntrysize;
void* dirmem = NULL;
- uint64 nextdiroff;
+ uint64 nextdiroff = 0;
uint32 n;
uint8* dp;
if (off == 0) /* no more directories */
goto done;
-#if defined(__WIN32__) && defined(_MSC_VER)
- if (_lseeki64(fd, (__int64)off, SEEK_SET) != (__int64)off) {
-#else
- if (lseek(fd, (off_t)off, SEEK_SET) != (off_t)off) {
-#endif
+ if (_TIFF_lseek_f(fd, (_TIFF_off_t)off, SEEK_SET) != (_TIFF_off_t)off) {
Fatal("Seek error accessing TIFF directory");
goto done;
}
@@ -289,7 +322,7 @@ ReadDirectory(int fd, unsigned int ix, uint64 off)
TIFFSwabShort(&dircount);
direntrysize = 12;
} else {
- uint64 dircount64;
+ uint64 dircount64 = 0;
if (read(fd, (char*) &dircount64, sizeof (uint64)) != sizeof (uint64)) {
ReadError("directory count");
goto done;
@@ -303,7 +336,7 @@ ReadDirectory(int fd, unsigned int ix, uint64 off)
dircount = (uint16)dircount64;
direntrysize = 20;
}
- dirmem = _TIFFmalloc(dircount * direntrysize);
+ dirmem = _TIFFmalloc(TIFFSafeMultiply(tmsize_t,dircount,direntrysize));
if (dirmem == NULL) {
Fatal("No space for TIFF directory");
goto done;
@@ -355,6 +388,8 @@ ReadDirectory(int fd, unsigned int ix, uint64 off)
void* datamem;
uint64 dataoffset;
int datatruncated;
+ int datasizeoverflow;
+
tag = *(uint16*)dp;
if (swabflag)
TIFFSwabShort(&tag);
@@ -378,7 +413,7 @@ ReadDirectory(int fd, unsigned int ix, uint64 off)
}
else
{
- count = *(uint64*)dp;
+ memcpy(&count, dp, sizeof(uint64));
if (swabflag)
TIFFSwabLong8(&count);
dp += sizeof(uint64);
@@ -392,14 +427,15 @@ ReadDirectory(int fd, unsigned int ix, uint64 off)
typewidth = 0;
else
typewidth = datawidth[type];
- datasize = count*typewidth;
+ datasize = TIFFSafeMultiply(tmsize_t,count,typewidth);
+ datasizeoverflow = (typewidth > 0 && datasize / typewidth != count);
datafits = 1;
datamem = dp;
dataoffset = 0;
datatruncated = 0;
if (!bigtiff)
{
- if (datasize>4)
+ if (datasizeoverflow || datasize>4)
{
uint32 dataoffset32;
datafits = 0;
@@ -413,7 +449,7 @@ ReadDirectory(int fd, unsigned int ix, uint64 off)
}
else
{
- if (datasize>8)
+ if (datasizeoverflow || datasize>8)
{
datafits = 0;
datamem = NULL;
@@ -423,36 +459,31 @@ ReadDirectory(int fd, unsigned int ix, uint64 off)
}
dp += sizeof(uint64);
}
- if (datasize>0x10000)
+ if (datasizeoverflow || datasize>0x10000)
{
datatruncated = 1;
count = 0x10000/typewidth;
- datasize = count*typewidth;
+ datasize = TIFFSafeMultiply(tmsize_t,count,typewidth);
}
if (count>maxitems)
{
datatruncated = 1;
count = maxitems;
- datasize = count*typewidth;
+ datasize = TIFFSafeMultiply(tmsize_t,count,typewidth);
}
if (!datafits)
{
- datamem = _TIFFmalloc((uint32)datasize);
+ datamem = _TIFFmalloc(datasize);
if (datamem) {
-#if defined(__WIN32__) && defined(_MSC_VER)
- if (_lseeki64(fd, (__int64)dataoffset, SEEK_SET)
- != (__int64)dataoffset)
-#else
- if (lseek(fd, (off_t)dataoffset, 0) !=
- (off_t)dataoffset)
-#endif
+ if (_TIFF_lseek_f(fd, (_TIFF_off_t)dataoffset, 0) !=
+ (_TIFF_off_t)dataoffset)
{
Error(
"Seek error accessing tag %u value", tag);
_TIFFfree(datamem);
datamem = NULL;
}
- if (read(fd, datamem, (size_t)datasize) != (TIFF_SSIZE_T)datasize)
+ else if (read(fd, datamem, (size_t)datasize) != (TIFF_SSIZE_T)datasize)
{
Error(
"Read error accessing tag %u value", tag);
@@ -499,7 +530,10 @@ ReadDirectory(int fd, unsigned int ix, uint64 off)
if (datatruncated)
printf(" ...");
if (!datafits)
- _TIFFfree(datamem);
+ {
+ _TIFFfree(datamem);
+ datamem = NULL;
+ }
}
printf(">\n");
}
@@ -727,23 +761,23 @@ PrintData(FILE* fd, uint16 type, uint32 count, unsigned char* data)
case TIFF_LONG8: {
uint64 *llp = (uint64*)data;
while (count-- > 0) {
-#if defined(__WIN32__) && defined(_MSC_VER)
- fprintf(fd, long8fmt, sep, (unsigned __int64) *llp++);
-#else
- fprintf(fd, long8fmt, sep, (unsigned long long) *llp++);
-#endif
+ uint64 val;
+ memcpy(&val, llp, sizeof(uint64));
+ llp ++;
+ fprintf(fd, long8fmt, sep, val);
sep = " ";
}
break;
}
case TIFF_SLONG8: {
int64 *llp = (int64*)data;
- while (count-- > 0)
-#if defined(__WIN32__) && defined(_MSC_VER)
- fprintf(fd, slong8fmt, sep, (__int64) *llp++), sep = " ";
-#else
- fprintf(fd, slong8fmt, sep, (long long) *llp++), sep = " ";
-#endif
+ while (count-- > 0) {
+ int64 val;
+ memcpy(&val, llp, sizeof(int64));
+ llp ++;
+ fprintf(fd, slong8fmt, sep, val);
+ sep = " ";
+ }
break;
}
case TIFF_RATIONAL: {
diff --git a/tiff/tools/tiffgt.c b/tiff/tools/tiffgt.c
index de420396c..35a23ccf6 100644
--- a/tiff/tools/tiffgt.c
+++ b/tiff/tools/tiffgt.c
@@ -1,4 +1,4 @@
-/* $Id: tiffgt.c,v 1.10 2010-07-01 15:56:56 dron Exp $ */
+/* $Id: tiffgt.c,v 1.15 2015-09-06 20:42:20 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -31,11 +31,14 @@
#include <string.h>
#include <unistd.h>
-#if HAVE_APPLE_OPENGL_FRAMEWORK
+#ifdef HAVE_OPENGL_GL_H
# include <OpenGL/gl.h>
-# include <GLUT/glut.h>
#else
# include <GL/gl.h>
+#endif
+#ifdef HAVE_GLUT_GLUT_H
+# include <GLUT/glut.h>
+#else
# include <GL/glut.h>
#endif
@@ -74,8 +77,17 @@ static void raster_reshape(int, int);
static void raster_keys(unsigned char, int, int);
static void raster_special(int, int, int);
+#if !HAVE_DECL_OPTARG
extern char* optarg;
extern int optind;
+#endif
+
+/* GLUT framework on MacOS X produces deprecation warnings */
+# if defined(__GNUC__) && defined(__APPLE__)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+# endif
+
static TIFF* tif = NULL;
int
@@ -287,6 +299,7 @@ static void
raster_draw(void)
{
glDrawPixels(img.width, img.height, GL_RGBA, GL_UNSIGNED_BYTE, (const GLvoid *) raster);
+ glFlush();
}
static void
@@ -306,6 +319,8 @@ raster_reshape(int win_w, int win_h)
static void
raster_keys(unsigned char key, int x, int y)
{
+ (void) x;
+ (void) y;
switch (key) {
case 'b': /* photometric MinIsBlack */
photo = PHOTOMETRIC_MINISBLACK;
@@ -351,6 +366,8 @@ raster_keys(unsigned char key, int x, int y)
static void
raster_special(int key, int x, int y)
{
+ (void) x;
+ (void) y;
switch (key) {
case GLUT_KEY_PAGE_UP: /* previous logical image */
if (TIFFCurrentDirectory(tif) > 0) {
@@ -397,7 +414,10 @@ raster_special(int key, int x, int y)
glutPostRedisplay();
}
-
+/* GLUT framework on MacOS X produces deprecation warnings */
+# if defined(__GNUC__) && defined(__APPLE__)
+# pragma GCC diagnostic pop
+# endif
char* stuff[] = {
"usage: tiffgt [options] file.tif",
diff --git a/tiff/tools/tiffinfo.c b/tiff/tools/tiffinfo.c
index 75a00d312..b02c7d46b 100644
--- a/tiff/tools/tiffinfo.c
+++ b/tiff/tools/tiffinfo.c
@@ -1,4 +1,4 @@
-/* $Id: tiffinfo.c,v 1.18 2010-10-21 19:07:32 fwarmerdam Exp $ */
+/* $Id: tiffinfo.c,v 1.25 2016-11-12 20:06:05 bfriesen Exp $ */
/*
* Copyright (c) 1988-1997 Sam Leffler
@@ -53,7 +53,7 @@ static int readdata = 0; /* read data in file */
static int stoponerr = 1; /* stop on first read error */
static void usage(void);
-static void tiffinfo(TIFF*, uint16, long);
+static void tiffinfo(TIFF*, uint16, long, int);
static void
PrivateErrorHandler(const char* module, const char* fmt, va_list ap)
@@ -69,8 +69,10 @@ main(int argc, char* argv[])
int dirnum = -1, multiplefiles, c;
uint16 order = 0;
TIFF* tif;
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char* optarg;
+#endif
long flags = 0;
uint64 diroff = 0;
int chopstrips = 0; /* disable strip chopping */
@@ -139,19 +141,20 @@ main(int argc, char* argv[])
if (tif != NULL) {
if (dirnum != -1) {
if (TIFFSetDirectory(tif, (tdir_t) dirnum))
- tiffinfo(tif, order, flags);
+ tiffinfo(tif, order, flags, 1);
} else if (diroff != 0) {
if (TIFFSetSubDirectory(tif, diroff))
- tiffinfo(tif, order, flags);
+ tiffinfo(tif, order, flags, 1);
} else {
do {
- toff_t offset;
+ toff_t offset=0;
- tiffinfo(tif, order, flags);
+ tiffinfo(tif, order, flags, 1);
if (TIFFGetField(tif, TIFFTAG_EXIFIFD,
&offset)) {
- if (TIFFReadEXIFDirectory(tif, offset))
- tiffinfo(tif, order, flags);
+ if (TIFFReadEXIFDirectory(tif, offset)) {
+ tiffinfo(tif, order, flags, 0);
+ }
}
} while (TIFFReadDirectory(tif));
}
@@ -217,7 +220,7 @@ TIFFReadContigStripData(TIFF* tif)
buf = (unsigned char *)_TIFFmalloc(TIFFStripSize(tif));
if (buf) {
- uint32 row, h;
+ uint32 row, h=0;
uint32 rowsperstrip = (uint32)-1;
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
@@ -244,9 +247,9 @@ TIFFReadSeparateStripData(TIFF* tif)
buf = (unsigned char *)_TIFFmalloc(TIFFStripSize(tif));
if (buf) {
- uint32 row, h;
+ uint32 row, h=0;
uint32 rowsperstrip = (uint32)-1;
- tsample_t s, samplesperpixel;
+ tsample_t s, samplesperpixel=0;
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
TIFFGetField(tif, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
@@ -291,17 +294,24 @@ void
TIFFReadContigTileData(TIFF* tif)
{
unsigned char *buf;
- tsize_t rowsize = TIFFTileRowSize(tif);
+ tmsize_t rowsize = TIFFTileRowSize(tif);
+ tmsize_t tilesize = TIFFTileSize(tif);
- buf = (unsigned char *)_TIFFmalloc(TIFFTileSize(tif));
+ buf = (unsigned char *)_TIFFmalloc(tilesize);
if (buf) {
- uint32 tw, th, w, h;
+ uint32 tw=0, th=0, w=0, h=0;
uint32 row, col;
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w);
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
+ if ( rowsize == 0 || th > (size_t) (tilesize / rowsize) )
+ {
+ fprintf(stderr, "Cannot display data: th * rowsize > tilesize\n");
+ _TIFFfree(buf);
+ return;
+ }
for (row = 0; row < h; row += th) {
for (col = 0; col < w; col += tw) {
if (TIFFReadTile(tif, buf, col, row, 0, 0) < 0) {
@@ -319,19 +329,26 @@ void
TIFFReadSeparateTileData(TIFF* tif)
{
unsigned char *buf;
- tsize_t rowsize = TIFFTileRowSize(tif);
+ tmsize_t rowsize = TIFFTileRowSize(tif);
+ tmsize_t tilesize = TIFFTileSize(tif);
- buf = (unsigned char *)_TIFFmalloc(TIFFTileSize(tif));
+ buf = (unsigned char *)_TIFFmalloc(tilesize);
if (buf) {
- uint32 tw, th, w, h;
+ uint32 tw=0, th=0, w=0, h=0;
uint32 row, col;
- tsample_t s, samplesperpixel;
+ tsample_t s, samplesperpixel=0;
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w);
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h);
TIFFGetField(tif, TIFFTAG_TILEWIDTH, &tw);
TIFFGetField(tif, TIFFTAG_TILELENGTH, &th);
TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &samplesperpixel);
+ if ( rowsize == 0 || th > (size_t) (tilesize / rowsize) )
+ {
+ fprintf(stderr, "Cannot display data: th * rowsize > tilesize\n");
+ _TIFFfree(buf);
+ return;
+ }
for (row = 0; row < h; row += th) {
for (col = 0; col < w; col += tw) {
for (s = 0; s < samplesperpixel; s++) {
@@ -350,7 +367,7 @@ TIFFReadSeparateTileData(TIFF* tif)
void
TIFFReadData(TIFF* tif)
{
- uint16 config;
+ uint16 config = PLANARCONFIG_CONTIG;
TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &config);
if (TIFFIsTiled(tif)) {
@@ -397,7 +414,7 @@ TIFFReadRawData(TIFF* tif, int bitrev)
{
tstrip_t nstrips = TIFFNumberOfStrips(tif);
const char* what = TIFFIsTiled(tif) ? "Tile" : "Strip";
- uint64* stripbc;
+ uint64* stripbc=NULL;
TIFFGetField(tif, TIFFTAG_STRIPBYTECOUNTS, &stripbc);
if (nstrips > 0) {
@@ -441,10 +458,10 @@ TIFFReadRawData(TIFF* tif, int bitrev)
}
static void
-tiffinfo(TIFF* tif, uint16 order, long flags)
+tiffinfo(TIFF* tif, uint16 order, long flags, int is_image)
{
TIFFPrintDirectory(tif, stdout, flags);
- if (!readdata)
+ if (!readdata || !is_image)
return;
if (rawdata) {
if (order) {
diff --git a/tiff/tools/tiffmedian.c b/tiff/tools/tiffmedian.c
index 6501494b8..f0c892e41 100644
--- a/tiff/tools/tiffmedian.c
+++ b/tiff/tools/tiffmedian.c
@@ -1,4 +1,4 @@
-/* $Id: tiffmedian.c,v 1.10 2010-03-10 18:56:50 bfriesen Exp $ */
+/* $Id: tiffmedian.c,v 1.13 2015-06-21 01:09:11 bfriesen Exp $ */
/*
* Apply median cut on an image.
@@ -123,8 +123,10 @@ main(int argc, char* argv[])
float floatv;
uint32 longv;
int c;
+#if !HAVE_DECL_OPTARG
extern int optind;
extern char* optarg;
+#endif
num_colors = MAX_CMAP_SIZE;
while ((c = getopt(argc, argv, "c:C:r:f")) != -1)
@@ -371,9 +373,15 @@ get_histogram(TIFF* in, Colorbox* box)
break;
inptr = inputline;
for (j = imagewidth; j-- > 0;) {
- red = *inptr++ >> COLOR_SHIFT;
- green = *inptr++ >> COLOR_SHIFT;
- blue = *inptr++ >> COLOR_SHIFT;
+ red = (*inptr++) & 0xff >> COLOR_SHIFT;
+ green = (*inptr++) & 0xff >> COLOR_SHIFT;
+ blue = (*inptr++) & 0xff >> COLOR_SHIFT;
+ if ((red | green | blue) >= B_LEN) {
+ fprintf(stderr,
+ "Logic error. "
+ "Histogram array overflow!\n");
+ exit(-6);
+ }
if (red < box->rmin)
box->rmin = red;
if (red > box->rmax)
@@ -779,24 +787,28 @@ quant(TIFF* in, TIFF* out)
#define SWAP(type,a,b) { type p; p = a; a = b; b = p; }
-#define GetInputLine(tif, row, bad) \
- if (TIFFReadScanline(tif, inputline, row, 0) <= 0) \
- bad; \
- inptr = inputline; \
- nextptr = nextline; \
- for (j = 0; j < imagewidth; ++j) { \
- *nextptr++ = *inptr++; \
- *nextptr++ = *inptr++; \
- *nextptr++ = *inptr++; \
- }
+#define GetInputLine(tif, row, bad) \
+ do { \
+ if (TIFFReadScanline(tif, inputline, row, 0) <= 0) \
+ bad; \
+ inptr = inputline; \
+ nextptr = nextline; \
+ for (j = 0; j < imagewidth; ++j) { \
+ *nextptr++ = *inptr++; \
+ *nextptr++ = *inptr++; \
+ *nextptr++ = *inptr++; \
+ } \
+ } while (0);
#define GetComponent(raw, cshift, c) \
- cshift = raw; \
- if (cshift < 0) \
- cshift = 0; \
- else if (cshift >= MAX_COLOR) \
- cshift = MAX_COLOR-1; \
- c = cshift; \
- cshift >>= COLOR_SHIFT;
+ do { \
+ cshift = raw; \
+ if (cshift < 0) \
+ cshift = 0; \
+ else if (cshift >= MAX_COLOR) \
+ cshift = MAX_COLOR-1; \
+ c = cshift; \
+ cshift >>= COLOR_SHIFT; \
+ } while (0);
static void
quant_fsdither(TIFF* in, TIFF* out)
diff --git a/tiff/tools/tiffset.c b/tiff/tools/tiffset.c
index b9e58364f..7044d2ba7 100644
--- a/tiff/tools/tiffset.c
+++ b/tiff/tools/tiffset.c
@@ -1,5 +1,5 @@
/******************************************************************************
- * $Id: tiffset.c,v 1.16 2011-03-26 12:07:20 fwarmerdam Exp $
+ * $Id: tiffset.c,v 1.18 2012-12-04 03:02:37 bfriesen Exp $
*
* Project: libtiff tools
* Purpose: Mainline for setting metadata in existing TIFF files.
@@ -35,12 +35,12 @@
#include <stdlib.h>
#include "tiffio.h"
-#include "tif_dir.h"
static char* usageMsg[] = {
"usage: tiffset [options] filename",
"where options are:",
" -s <tagname> [count] <value>... set the tag value",
+" -u <tagname> to unset the tag",
" -d <dirno> set the directory",
" -sd <diroff> set the subdirectory",
" -sf <tagname> <filename> read the tag value from file (for ASCII tags only)",
@@ -106,7 +106,22 @@ main(int argc, char* argv[])
}
arg_index++;
}
- if (strcmp(argv[arg_index],"-s") == 0 && arg_index < argc-3) {
+ /* Add unset option to tiffset -- Zach Baker (niquil@niquil.net) 11/14/2012 */
+ if (strcmp(argv[arg_index],"-u") == 0 && arg_index < argc-2) {
+ const TIFFField *fip;
+ const char *tagname;
+ arg_index++;
+ tagname = argv[arg_index];
+ fip = GetField(tiff, tagname);
+ if (!fip)
+ return 3;
+
+ if (TIFFUnsetField(tiff, TIFFFieldTag(fip)) != 1)
+ {
+ fprintf(stderr, "Failed to unset %s\n", TIFFFieldName(fip));
+ }
+ arg_index++;
+ } else if (strcmp(argv[arg_index],"-s") == 0 && arg_index < argc-3) {
const TIFFField *fip;
const char *tagname;
@@ -118,25 +133,25 @@ main(int argc, char* argv[])
return 3;
arg_index++;
- if (fip->field_type == TIFF_ASCII) {
- if (TIFFSetField(tiff, fip->field_tag, argv[arg_index]) != 1)
+ if (TIFFFieldDataType(fip) == TIFF_ASCII) {
+ if (TIFFSetField(tiff, TIFFFieldTag(fip), argv[arg_index]) != 1)
fprintf( stderr, "Failed to set %s=%s\n",
- fip->field_name, argv[arg_index] );
- } else if (fip->field_writecount > 0
- || fip->field_writecount == TIFF_VARIABLE) {
+ TIFFFieldName(fip), argv[arg_index] );
+ } else if (TIFFFieldWriteCount(fip) > 0
+ || TIFFFieldWriteCount(fip) == TIFF_VARIABLE) {
int ret = 1;
short wc;
- if (fip->field_writecount == TIFF_VARIABLE)
+ if (TIFFFieldWriteCount(fip) == TIFF_VARIABLE)
wc = atoi(argv[arg_index++]);
else
- wc = fip->field_writecount;
+ wc = TIFFFieldWriteCount(fip);
if (argc - arg_index < wc) {
fprintf( stderr,
"Number of tag values is not enough. "
"Expected %d values for %s tag, got %d\n",
- wc, fip->field_name, argc - arg_index);
+ wc, TIFFFieldName(fip), argc - arg_index);
return 4;
}
@@ -144,7 +159,7 @@ main(int argc, char* argv[])
int i, size;
void *array;
- switch (fip->field_type) {
+ switch (TIFFFieldDataType(fip)) {
/*
* XXX: We can't use TIFFDataWidth()
* to determine the space needed to store
@@ -186,7 +201,7 @@ main(int argc, char* argv[])
return 4;
}
- switch (fip->field_type) {
+ switch (TIFFFieldDataType(fip)) {
case TIFF_BYTE:
for (i = 0; i < wc; i++)
((uint8 *)array)[i] = atoi(argv[arg_index+i]);
@@ -226,49 +241,49 @@ main(int argc, char* argv[])
break;
}
- if (fip->field_passcount) {
- ret = TIFFSetField(tiff, fip->field_tag,
+ if (TIFFFieldPassCount(fip)) {
+ ret = TIFFSetField(tiff, TIFFFieldTag(fip),
wc, array);
- } else if (fip->field_tag == TIFFTAG_PAGENUMBER
- || fip->field_tag == TIFFTAG_HALFTONEHINTS
- || fip->field_tag == TIFFTAG_YCBCRSUBSAMPLING
- || fip->field_tag == TIFFTAG_DOTRANGE) {
- if (fip->field_type == TIFF_BYTE) {
- ret = TIFFSetField(tiff, fip->field_tag,
+ } else if (TIFFFieldTag(fip) == TIFFTAG_PAGENUMBER
+ || TIFFFieldTag(fip) == TIFFTAG_HALFTONEHINTS
+ || TIFFFieldTag(fip) == TIFFTAG_YCBCRSUBSAMPLING
+ || TIFFFieldTag(fip) == TIFFTAG_DOTRANGE) {
+ if (TIFFFieldDataType(fip) == TIFF_BYTE) {
+ ret = TIFFSetField(tiff, TIFFFieldTag(fip),
((uint8 *)array)[0], ((uint8 *)array)[1]);
- } else if (fip->field_type == TIFF_SHORT) {
- ret = TIFFSetField(tiff, fip->field_tag,
+ } else if (TIFFFieldDataType(fip) == TIFF_SHORT) {
+ ret = TIFFSetField(tiff, TIFFFieldTag(fip),
((uint16 *)array)[0], ((uint16 *)array)[1]);
}
} else {
- ret = TIFFSetField(tiff, fip->field_tag,
+ ret = TIFFSetField(tiff, TIFFFieldTag(fip),
array);
}
_TIFFfree(array);
} else {
- switch (fip->field_type) {
+ switch (TIFFFieldDataType(fip)) {
case TIFF_BYTE:
case TIFF_SHORT:
case TIFF_SBYTE:
case TIFF_SSHORT:
- ret = TIFFSetField(tiff, fip->field_tag,
+ ret = TIFFSetField(tiff, TIFFFieldTag(fip),
atoi(argv[arg_index++]));
break;
case TIFF_LONG:
case TIFF_SLONG:
case TIFF_IFD:
- ret = TIFFSetField(tiff, fip->field_tag,
+ ret = TIFFSetField(tiff, TIFFFieldTag(fip),
atol(argv[arg_index++]));
break;
case TIFF_DOUBLE:
- ret = TIFFSetField(tiff, fip->field_tag,
+ ret = TIFFSetField(tiff, TIFFFieldTag(fip),
atof(argv[arg_index++]));
break;
case TIFF_RATIONAL:
case TIFF_SRATIONAL:
case TIFF_FLOAT:
- ret = TIFFSetField(tiff, fip->field_tag,
+ ret = TIFFSetField(tiff, TIFFFieldTag(fip),
(float)atof(argv[arg_index++]));
break;
default:
@@ -277,7 +292,7 @@ main(int argc, char* argv[])
}
if (ret != 1)
- fprintf(stderr, "Failed to set %s\n", fip->field_name);
+ fprintf(stderr, "Failed to set %s\n", TIFFFieldName(fip));
arg_index += wc;
}
} else if (strcmp(argv[arg_index],"-sf") == 0 && arg_index < argc-3) {
@@ -292,10 +307,10 @@ main(int argc, char* argv[])
if (!fip)
return 3;
- if (fip->field_type != TIFF_ASCII) {
+ if (TIFFFieldDataType(fip) != TIFF_ASCII) {
fprintf( stderr,
"Only ASCII tags can be set from file. "
- "%s is not ASCII tag.\n", fip->field_name );
+ "%s is not ASCII tag.\n", TIFFFieldName(fip) );
return 5;
}
@@ -312,9 +327,9 @@ main(int argc, char* argv[])
fclose( fp );
- if(TIFFSetField( tiff, fip->field_tag, text ) != 1) {
+ if(TIFFSetField( tiff, TIFFFieldTag(fip), text ) != 1) {
fprintf(stderr, "Failed to set %s from file %s\n",
- fip->field_name, argv[arg_index]);
+ TIFFFieldName(fip), argv[arg_index]);
}
_TIFFfree( text );
diff --git a/tiff/tools/tiffsplit.c b/tiff/tools/tiffsplit.c
index fa43d63fa..c4fa2478a 100644
--- a/tiff/tools/tiffsplit.c
+++ b/tiff/tools/tiffsplit.c
@@ -1,4 +1,4 @@
-/* $Id: tiffsplit.c,v 1.22 2011-10-22 17:03:01 bfriesen Exp $ */
+/* $Id: tiffsplit.c,v 1.23 2015-05-28 13:10:26 bfriesen Exp $ */
/*
* Copyright (c) 1992-1997 Sam Leffler
@@ -239,6 +239,7 @@ cpStrips(TIFF* in, TIFF* out)
if (!TIFFGetField(in, TIFFTAG_STRIPBYTECOUNTS, &bytecounts)) {
fprintf(stderr, "tiffsplit: strip byte counts are missing\n");
+ _TIFFfree(buf);
return (0);
}
for (s = 0; s < ns; s++) {
@@ -272,6 +273,7 @@ cpTiles(TIFF* in, TIFF* out)
if (!TIFFGetField(in, TIFFTAG_TILEBYTECOUNTS, &bytecounts)) {
fprintf(stderr, "tiffsplit: tile byte counts are missing\n");
+ _TIFFfree(buf);
return (0);
}
for (t = 0; t < nt; t++) {
diff --git a/tiff/tools/ycbcr.c b/tiff/tools/ycbcr.c
deleted file mode 100644
index 8f72447d0..000000000
--- a/tiff/tools/ycbcr.c
+++ /dev/null
@@ -1,168 +0,0 @@
-float ycbcrCoeffs[3] = { .299, .587, .114 };
-/* default coding range is CCIR Rec 601-1 with no headroom/footroom */
-unsigned long refBlackWhite[6] = { 0, 255, 128, 255, 128, 255 };
-
-#define LumaRed ycbcrCoeffs[0]
-#define LumaGreen ycbcrCoeffs[1]
-#define LumaBlue ycbcrCoeffs[2]
-
-long eRtotal = 0;
-long eGtotal = 0;
-long eBtotal = 0;
-long preveRtotal = 0;
-long preveGtotal = 0;
-long preveBtotal = 0;
-unsigned long AbseRtotal = 0;
-unsigned long AbseGtotal = 0;
-unsigned long AbseBtotal = 0;
-unsigned long eCodes = 0;
-unsigned long preveCodes = 0;
-unsigned long eBits = 0;
-unsigned long preveBits = 0;
-
-static void setupLumaTables();
-static int abs(int v) { return (v < 0 ? -v : v); }
-static double pct(int v,double range) { return (v*100. / range); }
-static void check(int R, int G, int B);
-
-float D1, D2;
-float D3, D4;
-float D5, D6;
-
-int
-main(int argc, char** argv)
-{
- int R, G, B;
-
- if (argc > 1) {
- refBlackWhite[0] = 16;
- refBlackWhite[1] = 235;
- refBlackWhite[2] = 128;
- refBlackWhite[3] = 240;
- refBlackWhite[4] = 128;
- refBlackWhite[5] = 240;
- }
- D3 = 2 - 2*LumaRed;
- D4 = 2 - 2*LumaBlue;
- D1 = 1. / D3;
- D2 = 1. / D4;
- D5 = D3*LumaRed / LumaGreen;
- D6 = D4*LumaBlue / LumaGreen;
- setupLumaTables();
- for (R = 0; R < 256; R++) {
- for (G = 0; G < 256; G++)
- for (B = 0; B < 256; B++)
- check(R, G, B);
- printf("[%3u] c %u/%u b %u/%u (R %u/%d/%u G %u/%d/%u B %u/%d/%u)\n"
- , R
- , eCodes - preveCodes, eCodes
- , eBits - preveBits, eBits
- , abs(AbseRtotal - preveRtotal), eRtotal , AbseRtotal
- , abs(AbseGtotal - preveGtotal), eGtotal , AbseGtotal
- , abs(AbseBtotal - preveBtotal), eBtotal , AbseBtotal
- );
- preveRtotal = AbseRtotal;
- preveGtotal = AbseGtotal;
- preveBtotal = AbseBtotal;
- preveCodes = eCodes;
- preveBits = eBits;
- }
- printf("%u total codes\n", 256*256*256);
- printf("total error: %u codes %u bits (R %d/%u G %d/%u B %d/%u)\n"
- , eCodes
- , eBits
- , eRtotal , AbseRtotal
- , eGtotal , AbseGtotal
- , eBtotal , AbseBtotal
- );
- return (0);
-}
-
-float *lumaRed;
-float *lumaGreen;
-float *lumaBlue;
-
-static float*
-setupLuma(float c)
-{
- float *v = (float *)_TIFFmalloc(256 * sizeof (float));
- int i;
- for (i = 0; i < 256; i++)
- v[i] = c * i;
- return (v);
-}
-
-static void
-setupLumaTables(void)
-{
- lumaRed = setupLuma(LumaRed);
- lumaGreen = setupLuma(LumaGreen);
- lumaBlue = setupLuma(LumaBlue);
-}
-
-static unsigned
-V2Code(float f, unsigned long RB, unsigned long RW, int CR)
-{
- unsigned int c = (unsigned int)((((f)*(RW-RB)/CR)+RB)+.5);
- return (c > 255 ? 255 : c);
-}
-
-#define Code2V(c, RB, RW, CR) ((((c)-(int)RB)*(float)CR)/(float)(RW-RB))
-
-#define CLAMP(f,min,max) \
- (int)((f)+.5 < (min) ? (min) : (f)+.5 > (max) ? (max) : (f)+.5)
-
-static
-void
-check(int R, int G, int B)
-{
- float Y, Cb, Cr;
- int iY, iCb, iCr;
- float rY, rCb, rCr;
- float rR, rG, rB;
- int eR, eG, eB;
-
- Y = lumaRed[R] + lumaGreen[G] + lumaBlue[B];
- Cb = (B - Y)*D2;
- Cr = (R - Y)*D1;
- iY = V2Code(Y, refBlackWhite[0], refBlackWhite[1], 255);
- iCb = V2Code(Cb, refBlackWhite[2], refBlackWhite[3], 127);
- iCr = V2Code(Cr, refBlackWhite[4], refBlackWhite[5], 127);
- rCb = Code2V(iCb, refBlackWhite[2], refBlackWhite[3], 127);
- rCr = Code2V(iCr, refBlackWhite[4], refBlackWhite[5], 127);
- rY = Code2V(iY, refBlackWhite[0], refBlackWhite[1], 255);
- rR = rY + rCr*D3;
- rB = rY + rCb*D4;
- rG = rY - rCb*D6 - rCr*D5;
- eR = R - CLAMP(rR,0,255);
- eG = G - CLAMP(rG,0,255);
- eB = B - CLAMP(rB,0,255);
- if (abs(eR) > 1 || abs(eG) > 1 || abs(eB) > 1) {
- printf("R %u G %u B %u", R, G, B);
- printf(" Y %g Cb %g Cr %g", Y, Cb, Cr);
- printf(" iY %u iCb %u iCr %u", iY, iCb, iCr);
- printf("\n -> Y %g Cb %g Cr %g", rY, rCb, rCr);
- printf(" R %g (%u) G %g (%u) B %g (%u) E=[%d %d %d])\n"
- , rR, CLAMP(rR,0,255)
- , rG, CLAMP(rG,0,255)
- , rB, CLAMP(rB,0,255)
- , eR, eG, eB
- );
- }
- eRtotal += eR;
- eGtotal += eG;
- eBtotal += eB;
- AbseRtotal += abs(eR);
- AbseGtotal += abs(eG);
- AbseBtotal += abs(eB);
- if (eR | eG | eB)
- eCodes++;
- eBits += abs(eR) + abs(eG) + abs(eB);
-}
-/*
- * Local Variables:
- * mode: c
- * c-basic-offset: 8
- * fill-column: 78
- * End:
- */