build.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <title>Building the TIFF Software Distribution</title>
  5. <style type="text/css">
  6. body {
  7. font-family: Arial, Helvetica, Sans;
  8. }
  9. </style>
  10. </head>
  11. <body>
  12. <h1><img src="images/cramps.gif" width="159" height="203" align="left" border="1" hspace="6" alt="cramps">
  13. Building the Software Distribution</h1>
  14. <ul>
  15. <li><a href="#CMAKE">Building on all systems with CMake</a>.</li>
  16. <li><a href="#UNIX">Building on a UNIX system with Autoconf</a>.</li>
  17. <li><a href="#Other">Building the Software on Other
  18. Systems.</a></li>
  19. </ul>
  20. <br clear="left">
  21. This chapter contains step-by-step instructions on how to configure
  22. and build the TIFF software distribution. The software is most
  23. easily built on a UNIX system, but with a little bit of work it can
  24. easily be built and used on other non-UNIX platforms.
  25. <hr>
  26. <a name="CMake" id="CMAKE"></a>
  27. <h2>Building on all systems with CMake</h2> CMake may be used to
  28. generate build files for most common build systems and IDEs, and
  29. supports all UNIX-like systems as well as Windows. See
  30. the <a href="http://www.cmake.org/">CMake website</a> for further
  31. details. To build the software on you need to first run
  32. <tt>cmake</tt> to configure the build and generate the system-specific
  33. build files. This reads the top-level <tt>CMakeLists.txt</tt> file,
  34. which probes the target system for necessary tools and functions,
  35. checks any options you specified to configure the build, and then
  36. outputs build files configured for your system. If using <tt>Unix
  37. Makefiles</tt>, once configuration is done, you simply
  38. run <tt>make</tt> (or <tt>gmake</tt>) to build the software and
  39. then <tt>make install</tt> to do the installation. For other build
  40. systems, you do the equivalent steps with the tool for that system.
  41. For example, on any UNIX system:
  42. <div style="margin-left: 2em">
  43. <pre>
  44. % <b>cd ./tiff-4.0.5</b>
  45. % <b>cmake</b>
  46. <i>...lots of messages...</i>
  47. % <b>make</b>
  48. <i>...lots of messages...</i>
  49. % <b>make test</b>
  50. <i>...lots of messages...</i>
  51. # <b>make install</b>
  52. </pre></div>
  53. Building is dependent on a <tt>make</tt> utility and a C
  54. (and optionally a C++ compiler), so you will need these tools.
  55. <p>In general, the software is designed such that the following
  56. targets will always be available</p>
  57. <div style="margin-left: 2em">
  58. <pre>
  59. make [all] build stuff
  60. make test run the test suite
  61. make install build and install stuff
  62. make clean remove object files, executables and cruft
  63. </pre></div>
  64. <a name="CMakeBuildTrees" id= "CMakeBuildTrees"></a>
  65. <hr width="65%" align="right">
  66. <h3>Build Trees</h3>
  67. There are two schemes for configuring and building the software. If
  68. you intend to build the software for only one target system, you
  69. can configure the software so that it is built in the same
  70. directories as the source code.
  71. <div style="margin-left: 2em">
  72. <pre>
  73. % <b>gzip -dc tiff-4.0.5.tar.gz | tar -xf -</b>
  74. % <b>cd ./tiff-4.0.5</b>
  75. % <b>cmake</b>
  76. % <b>make</b>
  77. % <b>make test</b>
  78. % <b>make install</b>
  79. </pre></div>
  80. <p>Otherwise, you can configure a build tree that is parallel to
  81. the source tree hierarchy (or in some completely different place)
  82. but which contains only configured files and files created during
  83. the build procedure.</p>
  84. <div style="margin-left: 2em">
  85. <pre>
  86. % <b>gzip -dc tiff-4.0.5.tar.gz | tar -xf -</b>
  87. % <b>mkdir tiff-4.0.5-build</b>
  88. % <b>cd ./tiff-4.0.5-build</b>
  89. % <b>cmake ../tiff-4.0.5</b>
  90. % <b>make</b>
  91. % <b>make test</b>
  92. % <b>make install</b>
  93. </pre></div>
  94. This second scheme is useful for:
  95. <ul>
  96. <li>building multiple targets from a single source tree</li>
  97. <li>building from a read-only source tree (e.g. if you receive the
  98. distribution on CD-ROM)</li>
  99. <li>sharing the source files via a network, but building on
  100. multiple systems</li>
  101. <li>keeping the source tree clean
  102. (unlike <tt>autoconf</tt>, <tt>cmake</tt> does not provide
  103. a <tt>distclean</tt> target, so out of source builds are
  104. recommended)</li>
  105. </ul>
  106. <a name="CMakeGenerators" id= "CMakeGenerators"></a>
  107. <hr width="65%" align="right">
  108. <h3>Generators</h3> The default generator for UNIX is <tt>Unix
  109. Makefiles</tt>, and on Windows is <tt>NMake Makefiles</tt> or MSBuild
  110. depending upon the setup. Run <b>cmake --help</b> to list all the
  111. generators available for your platform. For example, to use the Ninja
  112. <a href="https://martine.github.io/ninja/">build system</a> on UNIX or
  113. Windows:
  114. <pre>
  115. <b>cmake -G Ninja</b>
  116. <b>cmake --build .</b>
  117. <b>ctest -V</b>
  118. <b>cmake --build . --target install</b>
  119. </pre>
  120. <p>Note that <b>cmake --build .</b> is a build-system-independent way
  121. of building a target; you can always use the build system directly.</p>
  122. <p>Alternatively, using the MSBuild system on Windows (64-bit Release
  123. build with VS2013):
  124. </p>
  125. <pre>
  126. <b>cmake -G "Visual Studio 12 2013 Win64"</b>
  127. <b>cmake --build . --config Release</b>
  128. <b>ctest -V -C Release</b>
  129. <b>cmake --build . --config Release --target install</b>
  130. </pre>
  131. With the above configuration, it's also possible to open the generated
  132. solution file with the Visual Studio IDE as well as building on the
  133. command-line.
  134. <a name="CMakeConfigOptions" id="CMakeConfigOptions"></a>
  135. <hr width="65%" align="right">
  136. <h3>Configuration Options</h3>
  137. The configuration process is critical to the proper compilation,
  138. installation, and operation of the
  139. software. The <tt>CMakeLists.txt</tt> script runs a series of tests to
  140. decide whether or not the target system supports required
  141. functionality and, if it does not, whether it can emulate or
  142. workaround the missing functions. After running <tt>cmake</tt>, check
  143. the <tt>CMakeCache.txt</tt> file; this contains all the results of the
  144. checks performed and the options set by the user. If <tt>cmake</tt>
  145. failed to run, check <tt>CMakeFiles/CMakeOutput.log</tt>
  146. and <tt>CMakeFiles/CMakeError.log</tt>; these should record the error
  147. which caused the failure.
  148. <p>A second function of the configure script is to set the default
  149. configuration parameters for the software. Of particular note are the
  150. directories where the software is to be installed. By default the
  151. software is installed in the <b>/usr/local</b> hierarchy. To change
  152. this behaviour the appropriate parameters can be specified on the
  153. command line. Run <b>cmake --help</b> to get a full list of possible
  154. options, and <b>cmake -LH</b> to list all the configurable options for
  155. this software package, or <b>cmake -LAH</b> to show all advanced
  156. options in addition. Standard installation related options are shown
  157. below.</p>
  158. <pre>
  159. <tt>
  160. Installation directories:
  161. CMAKE_INSTALL_PREFIX
  162. Fine tuning of the installation directories:
  163. CMAKE_INSTALL_BINDIR user executables [PREFIX/bin]
  164. CMAKE_INSTALL_SBINDIR system admin executables [PREFIX/sbin]
  165. CMAKE_INSTALL_LIBEXECDIR program executables [PREFIX/libexec]
  166. CMAKE_INSTALL_SYSCONFDIR read-only single-machine data [PREFIX/etc]
  167. CMAKE_INSTALL_SHAREDSTATEDIR modifiable architecture-independent data [PREFIX/com]
  168. CMAKE_INSTALL_LOCALSTATEDIR modifiable single-machine data [PREFIX/var]
  169. CMAKE_INSTALL_LIBDIR object code libraries [PREFIX/lib]
  170. CMAKE_INSTALL_INCLUDEDIR C header files [PREFIX/include]
  171. CMAKE_INSTALL_OLDINCLUDEDIR C header files for non-gcc [/usr/include]
  172. CMAKE_INSTALL_DATAROOTDIR read-only arch.-independent data root [PREFIX/share]
  173. CMAKE_INSTALL_DATADIR read-only architecture-independent data [DATAROOTDIR]
  174. CMAKE_INSTALL_LOCALEDIR locale-dependent data [DATAROOTDIR/locale]
  175. CMAKE_INSTALL_MANDIR man documentation [DATAROOTDIR/man]
  176. CMAKE_INSTALL_DOCDIR documentation root [DATAROOTDIR/doc/tiff]
  177. </tt>
  178. </pre>
  179. Also see the
  180. CMake <a href="http://www.cmake.org/cmake/help/v3.3/">documentation</a>
  181. for <a href="http://www.cmake.org/cmake/help/v3.3/manual/cmake-variables.7.html"
  182. >additional variables</a> which may be set.
  183. <a name="CMakePackages" id="CMakePackages"></a>
  184. <hr width="65%" align="right">
  185. <h3>Configuring Optional Packages/Support</h3>
  186. The TIFF software comes with several packages that are installed
  187. only as needed, or only if specifically configured at the time the
  188. configure script is run. Packages can be configured via the
  189. <b>cmake</b> commandline parameters.
  190. <dl>
  191. <dt><i>Static/Shared Objects Support</i></dt>
  192. <dd><tt>BUILD_SHARED_LIBS[=ON|OFF]&nbsp;&nbsp;&nbsp;&nbsp;build shared
  193. libraries [default=ON]</tt><br>
  194. <p>This option controls whether or not to configure the software
  195. to build a shared and static binaries for the TIFF library. Use of
  196. shared libraries can significantly reduce the disk space needed for
  197. users of the TIFF software. If shared libraries are not used then
  198. the code is statically linked into each application that uses it.
  199. </p>
  200. <p><tt>ld-version-script[=ON|OFF]&nbsp;&nbsp;Enable linker version
  201. script (default is ON)</tt></p>
  202. <p>Add shared library symbol versioning on ELF-based systems (e.g.
  203. Linux and FreeBSD) which use the GNU linker. This is needed if
  204. several major versions of libtiff might be loaded at once into the
  205. same program.</p>
  206. </dd>
  207. <dt><i>JPEG Support</i></dt>
  208. <dd><tt>jpeg[=ON|OFF]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;enable IJG JPEG
  209. library usage (required for JPEG compression, enabled by default)<br>
  210. JPEG_INCLUDE_DIR=DIR&nbsp;location of IJG
  211. JPEG library headers<br>
  212. JPEG_LIBRARY=DIR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;location of IJG JPEG
  213. library binary)</tt></dd>
  214. <dd>The <tt>JPEG</tt> package enables support for the handling of
  215. TIFF images with JPEG-encoded data. Support for JPEG-encoded data
  216. requires the Independent JPEG Group (IJG) <tt>libjpeg</tt>
  217. distribution; this software is available at <a href=
  218. "http://www.ijg.org/">http://www.ijg.org/</a>. <b>cmake</b>
  219. script automatically tries to search for a working IJG JPEG
  220. installation. If it fails to find library, JPEG support will be
  221. automatically disabled. If you want specify the exact paths to
  222. library binary and headers, use above options for that.</dd>
  223. <dt><i>ZIP Support</i></dt>
  224. <dd>The <tt>ZIP</tt> support enables support for the handling of TIFF
  225. images with deflate-encoded data (enabled by default if
  226. available). Support for deflate-encoded data requires the freely
  227. available <tt>zlib</tt> distribution written by Jean-loup Gailly and
  228. Mark Adler; this software is available at <a href=
  229. "http://www.zlib.org/">http://www.zlib.org/</a>.</dd>
  230. </dl>
  231. <hr width="65%" align="right">
  232. <a name="UNIX" id="UNIX"></a>
  233. <h2>Building on a UNIX System with Autoconf</h2>
  234. To build the software on a UNIX system you need to first run the
  235. configure shell script that is located in the top level of the
  236. source directory. This script probes the target system for
  237. necessary tools and functions and constructs a build environment in
  238. which the software may be compiled. Once configuration is done, you
  239. simply run <tt>make</tt> (or <tt>gmake</tt>) to build the software
  240. and then <tt>make install</tt> to do the installation; for example:
  241. <div style="margin-left: 2em">
  242. <pre>
  243. % <b>cd ./tiff-4.0.5</b>
  244. % <b>./configure</b>
  245. <i>...lots of messages...</i>
  246. % <b>make</b>
  247. <i>...lots of messages...</i>
  248. % <b>make check</b>
  249. <i>...lots of messages...</i>
  250. # <b>make install</b>
  251. </pre></div>
  252. Supplied makefiles are dependent on a <tt>make</tt> utility and a C
  253. (and optionally a C++ compiler), so you will need these tools.
  254. <p>In general, the software is designed such that the following
  255. should be ``<i>make-able</i>'' in each directory:</p>
  256. <div style="margin-left: 2em">
  257. <pre>
  258. make [all] build stuff
  259. make check run the test suite
  260. make install build and install stuff
  261. make clean remove object files, executables and cruft
  262. make distclean remove everything, that can be recreated
  263. </pre></div>
  264. Note that after running "<tt>make distclean</tt>" the
  265. <tt>configure</tt> script must be run again to create the Makefiles
  266. and other make-related files. <a name="BuildTrees" id=
  267. "BuildTrees"></a>
  268. <hr width="65%" align="right">
  269. <h3>Build Trees</h3>
  270. There are two schemes for configuring and building the software. If
  271. you intend to build the software for only one target system, you
  272. can configure the software so that it is built in the same
  273. directories as the source code.
  274. <div style="margin-left: 2em">
  275. <pre>
  276. % <b>gzip -dc tiff-4.0.5.tar.gz | tar -xf -</b>
  277. % <b>cd ./tiff-4.0.5</b>
  278. % <b>./configure</b>
  279. % <b>make</b>
  280. % <b>make check</b>
  281. % <b>make install</b>
  282. </pre></div>
  283. <p>Otherwise, you can configure a build tree that is parallel to
  284. the source tree hierarchy (or in some completely different place)
  285. but which contains only configured files and files created during
  286. the build procedure.</p>
  287. <div style="margin-left: 2em">
  288. <pre>
  289. % <b>gzip -dc tiff-4.0.5.tar.gz | tar -xf -</b>
  290. % <b>mkdir tiff-4.0.5-build</b>
  291. % <b>cd ./tiff-4.0.5-build</b>
  292. % <b>../tiff-4.0.5/configure</b>
  293. % <b>make</b>
  294. % <b>make check</b>
  295. % <b>make install</b>
  296. </pre></div>
  297. This second scheme is useful for:
  298. <ul>
  299. <li>building multiple targets from a single source tree</li>
  300. <li>building from a read-only source tree (e.g. if you receive the
  301. distribution on CD-ROM)</li>
  302. <li>sharing the source files via a network, but building on
  303. multiple systems</li>
  304. </ul>
  305. <a name="ConfigOptions" id="ConfigOptions"></a>
  306. <hr width="65%" align="right">
  307. <h3>Configuration Options</h3>
  308. The configuration process is critical to the proper compilation,
  309. installation, and operation of the software. The configure script
  310. runs a series of tests to decide whether or not the target system
  311. supports required functionality and, if it does not, whether it can
  312. emulate or workaround the missing functions. This procedure is
  313. fairly complicated and, due to the nonstandard nature of most UNIX
  314. systems, prone to error. The first time that you configure the
  315. software for use you should check the output from the configure
  316. script and look for anything that does not make sense for your
  317. system.
  318. <p>A second function of the configure script is to set the default
  319. configuration parameters for the software. Of particular note are
  320. the directories where the software is to be installed. By default
  321. the software is installed in the <b>/usr/local</b> hierarchy. To
  322. change this behaviour the appropriate parameters can be specified
  323. on the command line to configure. Run <b>./configure --help</b> to
  324. get a full list of possible options. Standard installation related
  325. options are shown below.</p>
  326. <pre>
  327. <tt>
  328. Installation directories:
  329. --prefix=PREFIX install architecture-independent files in PREFIX
  330. [/usr/local]
  331. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  332. [PREFIX]
  333. By default, `make install' will install all the files in
  334. `/usr/local/bin', `/usr/local/lib' etc. You can specify
  335. an installation prefix other than `/usr/local' using `--prefix',
  336. for instance `--prefix=$HOME'.
  337. For better control, use the options below.
  338. Fine tuning of the installation directories:
  339. --bindir=DIR user executables [EPREFIX/bin]
  340. --sbindir=DIR system admin executables [EPREFIX/sbin]
  341. --libexecdir=DIR program executables [EPREFIX/libexec]
  342. --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
  343. --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
  344. --localstatedir=DIR modifiable single-machine data [PREFIX/var]
  345. --libdir=DIR object code libraries [EPREFIX/lib]
  346. --includedir=DIR C header files [PREFIX/include]
  347. --oldincludedir=DIR C header files for non-gcc [/usr/include]
  348. --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
  349. --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
  350. --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
  351. --mandir=DIR man documentation [DATAROOTDIR/man]
  352. --docdir=DIR documentation root [DATAROOTDIR/doc/tiff]
  353. --htmldir=DIR html documentation [DOCDIR]
  354. Program names:
  355. --program-prefix=PREFIX prepend PREFIX to installed program names
  356. --program-suffix=SUFFIX append SUFFIX to installed program names
  357. --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  358. </tt>
  359. </pre>
  360. <a name="Packages" id="Packages"></a>
  361. <hr width="65%" align="right">
  362. <h3>Configuring Optional Packages/Support</h3>
  363. The TIFF software comes with several packages that are installed
  364. only as needed, or only if specifically configured at the time the
  365. configure script is run. Packages can be configured via the
  366. <b>configure</b> script commandline parameters.
  367. <dl>
  368. <dt><i>Static/Shared Objects Support</i></dt>
  369. <dd><tt>--enable-shared[=PKGS]&nbsp;&nbsp;&nbsp;&nbsp;build shared
  370. libraries [default=yes]<br>
  371. --enable-static[=PKGS]&nbsp;&nbsp;&nbsp;&nbsp;build static
  372. libraries [default=yes]</tt>
  373. <p>These options control whether or not to configure the software
  374. to build a shared and static binaries for the TIFF library. Use of
  375. shared libraries can significantly reduce the disk space needed for
  376. users of the TIFF software. If shared libraries are not used then
  377. the code is statically linked into each application that uses it.
  378. By default both types of binaries is configured.</p>
  379. <p>
  380. <tt>--enable-rpath&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enable
  381. runtime linker paths (-R libtool option)</tt></p>
  382. <p>Add library directories (see other options below) to the TIFF
  383. library run-time linker path.</p>
  384. <p><tt>--enable-ld-version-script&nbsp;&nbsp;Enable linker version
  385. script (default is disabled)</tt></p>
  386. <p>Add shared library symbol versioning on ELF-based systems (e.g.
  387. Linux and FreeBSD) which use the GNU linker. This is needed if
  388. several major versions of libtiff might be loaded at once into the
  389. same program.</p>
  390. </dd>
  391. <dt><i>JPEG Support</i></dt>
  392. <dd><tt>--disable-jpeg&nbsp;&nbsp;&nbsp;&nbsp;disable IJG JPEG
  393. library usage (required for JPEG compression, enabled by default)
  394. --with-jpeg-include-dir=DIR&nbsp;&nbsp;&nbsp;&nbsp;location of IJG
  395. JPEG library headers
  396. --with-jpeg-lib-dir=DIR&nbsp;&nbsp;&nbsp;&nbsp;location of IJG JPEG
  397. library binary)</tt></dd>
  398. <dd>The <tt>JPEG</tt> package enables support for the handling of
  399. TIFF images with JPEG-encoded data. Support for JPEG-encoded data
  400. requires the Independent JPEG Group (IJG) <tt>libjpeg</tt>
  401. distribution; this software is available at <a href=
  402. "http://www.ijg.org/">http://www.ijg.org/</a>. <b>configure</b>
  403. script automatically tries to search for a working IJG JPEG
  404. installation. If it fails to find library, JPEG support will be
  405. automatically disabled. If you want specify the exact paths to
  406. library binary and headers, use above switches for that.</dd>
  407. <dt><i>ZIP Support</i></dt>
  408. <dd>The <tt>ZIP</tt> support enables support for the handling of
  409. TIFF images with deflate-encoded data. Support for deflate-encoded
  410. data requires the freely available <tt>zlib</tt> distribution
  411. written by Jean-loup Gailly and Mark Adler; this software is
  412. available at <a href=
  413. "http://www.zlib.org/">http://www.zlib.org/</a>. If ZIP support is
  414. enabled the <tt>DIRS_LIBINC</tt> and <tt>DIR_GZLIB</tt> parameters
  415. should also be set (see below). By default this package is not
  416. configured.</dd>
  417. </dl>
  418. <hr width="65%" align="right">
  419. <a name="PC" id="PC"></a>
  420. <a name="Other" id="Other"></a>
  421. <h2>Building the Software on Other Systems</h2>
  422. This section contains information that might be useful if you are
  423. working on a non-UNIX system that is not directly supported. All
  424. library-related files described below are located in the
  425. <b>libtiff</b> directory.
  426. <p>The library requires two files that are generated
  427. <i>on-the-fly</i>. The file <b>tif_fax3sm.c</b> has the state
  428. tables for the Group 3 and Group 4 decoders. This file is generated
  429. by the <tt>mkg3states</tt> program on a UNIX system; for
  430. example,</p>
  431. <div style="margin-left: 2em">
  432. <pre>
  433. <tt>
  434. cd libtiff
  435. cc -o mkg3states mkg3states.c
  436. rm -f tif_fax3sm.c
  437. ./mkg3states -c const tif_fax3sm.c
  438. </tt>
  439. </pre></div>
  440. The <tt>-c</tt> option can be used to control whether or not the
  441. resutling tables are generated with a <tt>const</tt> declaration.
  442. The <tt>-s</tt> option can be used to specify a C storage class for
  443. the table declarations. The <tt>-b</tt> option can be used to force
  444. data values to be explicitly bracketed with ``{}'' (apparently
  445. needed for some MS-Windows compilers); otherwise the structures are
  446. emitted in as compact a format as possible. Consult the source code
  447. for this program if you have questions.
  448. <p>The second file required to build the library, <b>version.h</b>,
  449. contains the version information returned by the
  450. <tt>TIFFGetVersion</tt> routine. This file is built on most systems
  451. using the <tt>mkversion</tt> program and the contents of the
  452. <tt>VERSION</tt> and <tt>tiff.alpha</tt> files; for example,</p>
  453. <div style="margin-left: 2em">
  454. <pre>
  455. cd libtiff
  456. cc -o mkversion mkversion.c
  457. rm -f version.h
  458. ./mkversion -v ../VERSION -a ../dist/tiff.alpha version.h
  459. </pre></div>
  460. <p>Otherwise, when building the library on a non-UNIX system be
  461. sure to consult the files <b>tiffcomp.h</b> and <b>tiffconf.h</b>.
  462. The former contains system compatibility definitions while the
  463. latter is provided so that the software configuration can be
  464. controlled on systems that do not support the make facility for
  465. building the software.</p>
  466. <p>Systems without a 32-bit compiler may not be able to handle some
  467. of the codecs in the library; especially the Group 3 and 4 decoder.
  468. If you encounter problems try disabling support for a particular
  469. codec; consult the <a href=
  470. "internals.html#Config">documentation</a>.</p>
  471. <p>Programs in the tools directory are written to assume an ANSI C
  472. compilation environment. There may be a few POSIX'isms as well. The
  473. code in the <b>port</b> directory is provided to emulate routines
  474. that may be missing on some systems. On UNIX systems the
  475. <tt>configure</tt> script automatically figures out which routines
  476. are not present on a system and enables the use of the equivalent
  477. emulation routines from the <b>port</b> directory. It may be
  478. necessary to manually do this work on a non-UNIX system. <a name=
  479. "Testing" id="Testing"></a></p>
  480. <hr>
  481. <h2>Checking out the Software</h2>
  482. <p>Assuming you have working versions of <tt>tiffgt</tt> and
  483. <tt>tiffsv</tt>, you can just use them to view any of the sample
  484. images available for testing (see the <a href="images.html">section
  485. on obtaining the test images</a>). Otherwise, you can do a cursory
  486. check of the library with the <tt>tiffcp</tt> and <tt>tiffcmp</tt>
  487. programs. For example,</p>
  488. <div style="margin-left: 2em">
  489. <pre>
  490. tiffcp -lzw cramps.tif x.tif
  491. tiffcmp cramps.tif x.tif
  492. </pre></div>
  493. <p>(<tt>tiffcmp</tt> should be silent if the files compare
  494. correctly). <a name="TOC" id="TOC"></a></p>
  495. <hr>
  496. <h2>Table of Contents</h2>
  497. The following files makup the core library:
  498. <pre>
  499. libtiff/tiff.h TIFF spec definitions
  500. libtiff/tiffcomp.h non-UNIX OS-compatibility definitions
  501. libtiff/tiffconf.h non-UNIX configuration definitions
  502. libtiff/tiffio.h public TIFF library definitions
  503. libtiff/tiffiop.h private TIFF library definitions
  504. libtiff/t4.h CCITT Group 3/4 code tables+definitions
  505. libtiff/tif_dir.h private defs for TIFF directory handling
  506. libtiff/tif_fax3.h CCITT Group 3/4-related definitions
  507. libtiff/tif_predict.h private defs for Predictor tag support
  508. libtiff/uvcode.h LogL/LogLuv codec-specific definitions
  509. libtiff/version.h version string (generated by Makefile)
  510. libtiff/tif_apple.c Apple-related OS support
  511. libtiff/tif_atari.c Atari-related OS support
  512. libtiff/tif_aux.c auxiliary directory-related functions
  513. libtiff/tif_close.c close an open TIFF file
  514. libtiff/tif_codec.c configuration table of builtin codecs
  515. libtiff/tif_compress.c compression scheme support
  516. libtiff/tif_dir.c directory tag interface code
  517. libtiff/tif_dirinfo.c directory known tag support code
  518. libtiff/tif_dirread.c directory reading code
  519. libtiff/tif_dirwrite.c directory writing code
  520. libtiff/tif_dumpmode.c "no" compression codec
  521. libtiff/tif_error.c library error handler
  522. libtiff/tif_fax3.c CCITT Group 3 and 4 codec
  523. libtiff/tif_fax3sm.c G3/G4 state tables (generated by mkg3states)
  524. libtiff/tif_flush.c i/o and directory state flushing
  525. libtiff/tif_getimage.c TIFFRGBAImage support
  526. libtiff/tif_jpeg.c JPEG codec (interface to the IJG distribution)
  527. libtiff/tif_luv.c SGI LogL/LogLuv codec
  528. libtiff/tif_lzw.c LZW codec
  529. libtiff/tif_msdos.c MSDOS-related OS support
  530. libtiff/tif_next.c NeXT 2-bit scheme codec (decoding only)
  531. libtiff/tif_open.c open and simply query code
  532. libtiff/tif_packbits.c Packbits codec
  533. libtiff/tif_pixarlog.c Pixar codec
  534. libtiff/tif_predict.c Predictor tag support
  535. libtiff/tif_print.c directory printing support
  536. libtiff/tif_read.c image data reading support
  537. libtiff/tif_strip.c some strip-related code
  538. libtiff/tif_swab.c byte and bit swapping support
  539. libtiff/tif_thunder.c Thunderscan codec (decoding only)
  540. libtiff/tif_tile.c some tile-related code
  541. libtiff/tif_unix.c UNIX-related OS support
  542. libtiff/tif_version.c library version support
  543. libtiff/tif_warning.c library warning handler
  544. libtiff/tif_win3.c Windows-3.1-related OS support
  545. libtiff/tif_win32.c Win32 (95/98/NT) related OS support
  546. libtiff/tif_write.c image data writing support
  547. libtiff/tif_zip.c Deflate codec
  548. libtiff/mkg3states.c program to generate G3/G4 decoder state tables
  549. libtiff/mkspans.c program to generate black-white span tables
  550. libtiff/mkversion.c program to generate libtiff/version.h.
  551. </pre>
  552. <hr>
  553. Last updated: $Date: 2015-08-29 15:30:11 $
  554. </body>
  555. </html>