1*0ef31e1fSMike Welles<HTML> 2*0ef31e1fSMike Welles<HEAD> 3*0ef31e1fSMike Welles<TITLE> 4*0ef31e1fSMike WellesBuilding the TIFF Software Distribution 5*0ef31e1fSMike Welles</TITLE> 6*0ef31e1fSMike Welles</HEAD> 7*0ef31e1fSMike Welles 8*0ef31e1fSMike Welles<H1> 9*0ef31e1fSMike Welles<IMG SRC=images/cramps.gif WIDTH=159 HEIGHT=203 ALIGN=left BORDER=1 HSPACE=6> 10*0ef31e1fSMike WellesBuilding the Software Distribution 11*0ef31e1fSMike Welles</H1> 12*0ef31e1fSMike Welles 13*0ef31e1fSMike Welles<UL> 14*0ef31e1fSMike Welles<LI><A HREF=#UNIX>Building on a UNIX system</A>. 15*0ef31e1fSMike Welles<LI><A HREf=#MacMPW>Building on a Macintosh system with MPW</A>. 16*0ef31e1fSMike Welles<LI><A HREf=#MacCW>Building on a Macintosh system with CodeWarrior</A>. 17*0ef31e1fSMike Welles<LI><A HREF=#PC>Building on an MS-DOS or Windows system</A>. 18*0ef31e1fSMike Welles<LI><A HREF=#DJGPP>Building on MS-DOS with the DJGPP v2 compiler</A>. 19*0ef31e1fSMike Welles<LI><A HREF=#VMS>Building on a VMS system</A>. 20*0ef31e1fSMike Welles<LI><A HREF=#Acorn>Building on an Acorn RISC OS system</A>. 21*0ef31e1fSMike Welles<LI><A HREF=#Other>Building the Software on Other Systems</A> 22*0ef31e1fSMike Welles</UL> 23*0ef31e1fSMike Welles 24*0ef31e1fSMike Welles<BR CLEAR=left> 25*0ef31e1fSMike Welles 26*0ef31e1fSMike WellesThis chapter contains step-by-step instructions on how to configure 27*0ef31e1fSMike Wellesand build the TIFF software distribution. 28*0ef31e1fSMike WellesThe software is most easily built on a UNIX system, but with a little 29*0ef31e1fSMike Wellesbit of work it can easily be built and used on other non-UNIX platforms. 30*0ef31e1fSMike Welles 31*0ef31e1fSMike Welles<A NAME=UNIX><HR><H2>Building on a UNIX System</H2></A> 32*0ef31e1fSMike Welles 33*0ef31e1fSMike WellesTo build the software on a UNIX system 34*0ef31e1fSMike Wellesyou need to first run the configure shell script 35*0ef31e1fSMike Wellesthat is located in the top level of the source directory. 36*0ef31e1fSMike WellesThis script probes the target system for necessary tools and functions 37*0ef31e1fSMike Wellesand constructs a build environment in which the software may be 38*0ef31e1fSMike Wellescompiled. 39*0ef31e1fSMike WellesOnce configuration is done, you simply run <TT>make</TT> 40*0ef31e1fSMike Welles to build the software 41*0ef31e1fSMike Wellesand then <TT>make install</TT> to do the installation; for example: 42*0ef31e1fSMike Welles 43*0ef31e1fSMike Welles<UL><PRE> 44*0ef31e1fSMike Welleshyla% <B>cd tiff-v3.4beta099</B> 45*0ef31e1fSMike Welleshyla% <B>./configure</B> 46*0ef31e1fSMike Welles <I>...lots of messages...</I> 47*0ef31e1fSMike Welleshyla% <B>make</B> 48*0ef31e1fSMike Welles <I>...lots of messages...</I> 49*0ef31e1fSMike Welleshyla# <B>make install</B> 50*0ef31e1fSMike Welles</PRE></UL> 51*0ef31e1fSMike Welles 52*0ef31e1fSMike WellesIn general, the software is designed such that the following should 53*0ef31e1fSMike Wellesbe ``<I>make-able</I>'' in each directory: 54*0ef31e1fSMike Welles 55*0ef31e1fSMike Welles<UL><PRE> 56*0ef31e1fSMike Wellesmake [all] build stuff 57*0ef31e1fSMike Wellesmake install build&install stuff 58*0ef31e1fSMike Wellesmake clean remove .o files and cruft, but not executables 59*0ef31e1fSMike Wellesmake clobber remove everything that can be recreated 60*0ef31e1fSMike Wellesmake distclean remove <EM>absolutely everything</EM> that can be recreated 61*0ef31e1fSMike Welles</PRE></UL> 62*0ef31e1fSMike Welles 63*0ef31e1fSMike WellesNote that after running "<TT>make clobber</TT>" or 64*0ef31e1fSMike Welles"<TT>make distclean</TT>" the <TT>configure</TT> script must 65*0ef31e1fSMike Wellesbe run again to create the Makefiles and other make-related files. 66*0ef31e1fSMike Welles 67*0ef31e1fSMike Welles<A NAME="BuildTrees"><P><HR WIDTH=65% ALIGN=right><H3>Build Trees</H3></A> 68*0ef31e1fSMike Welles 69*0ef31e1fSMike WellesThere are two schemes for configuring and building the software. 70*0ef31e1fSMike WellesIf you intend to build the software for only one target system, you 71*0ef31e1fSMike Wellescan configure the software so that it is built in the same directories 72*0ef31e1fSMike Wellesas the source code. 73*0ef31e1fSMike Welles 74*0ef31e1fSMike Welles<UL><PRE> 75*0ef31e1fSMike Welleshyla% <B>cd tiff-v3.4beta099</B> 76*0ef31e1fSMike Welleshyla% <B>ls</B> 77*0ef31e1fSMike WellesCOPYRIGHT VERSION config.sub dist man 78*0ef31e1fSMike WellesMakefile.in config.guess configure html port 79*0ef31e1fSMike WellesREADME config.site contrib libtiff tools 80*0ef31e1fSMike Welleshyla% <B>./configure</B> 81*0ef31e1fSMike Welles</PRE></UL> 82*0ef31e1fSMike Welles 83*0ef31e1fSMike Welles<P> 84*0ef31e1fSMike WellesOtherwise, you can configure a build tree that 85*0ef31e1fSMike Wellesis parallel to the source tree hierarchy but which contains only 86*0ef31e1fSMike Wellesconfigured files and files created during the build procedure. 87*0ef31e1fSMike Welles 88*0ef31e1fSMike Welles<UL><PRE> 89*0ef31e1fSMike Welleshyla% <B>cd tiff-v3.4beta099</B> 90*0ef31e1fSMike Welleshyla% <B>mkdir obj obj/mycpu</B> 91*0ef31e1fSMike Welleshyla% <B>cd obj/mycpu</B> 92*0ef31e1fSMike Welleshyla% <B>../../configure</B> 93*0ef31e1fSMike Welles</PRE></UL> 94*0ef31e1fSMike Welles 95*0ef31e1fSMike WellesThis second scheme is useful for: 96*0ef31e1fSMike Welles 97*0ef31e1fSMike Welles<UL> 98*0ef31e1fSMike Welles<LI>building multiple targets from a single source tree 99*0ef31e1fSMike Welles<LI>building from a read-only source tree (e.g. if you receive 100*0ef31e1fSMike Welles the distribution on CD-ROM) 101*0ef31e1fSMike Welles</UL> 102*0ef31e1fSMike Welles 103*0ef31e1fSMike Welles<A NAME="ConfigFiles"><P><HR WIDTH=65% ALIGN=right><H3>Configuration Files</H3></A> 104*0ef31e1fSMike Welles 105*0ef31e1fSMike WellesThe configuration process is critical to the proper compilation, 106*0ef31e1fSMike Wellesinstallation, and operation of the software. 107*0ef31e1fSMike WellesThe configure script runs a series of tests to 108*0ef31e1fSMike Wellesdecide whether or not the target system 109*0ef31e1fSMike Wellessupports required functionality and, if it does not, whether it 110*0ef31e1fSMike Wellescan emulate or workaround the missing functions. 111*0ef31e1fSMike WellesThis procedure is fairly complicated and, due to the nonstandard 112*0ef31e1fSMike Wellesnature of most UNIX systems, prone to error. 113*0ef31e1fSMike WellesThe first time that you configure the software for use you should 114*0ef31e1fSMike Wellescheck the output from the configure script and look for anything 115*0ef31e1fSMike Wellesthat does not make sense for your system. 116*0ef31e1fSMike WellesA sample configure run is shown below together with an explanation 117*0ef31e1fSMike Wellesof some of the work that is done. 118*0ef31e1fSMike Welles 119*0ef31e1fSMike Welles<P> 120*0ef31e1fSMike WellesA second function of the configure script is to set the default 121*0ef31e1fSMike Wellesconfiguration parameters for the software. 122*0ef31e1fSMike WellesOf particular note are the directories where the software is to be 123*0ef31e1fSMike Wellesinstalled. 124*0ef31e1fSMike WellesBy default the software is installed in the <B>/usr/local</B> hierarchy. 125*0ef31e1fSMike WellesTo change this behaviour the appropriate parameters can be 126*0ef31e1fSMike Wellesspecified either: 127*0ef31e1fSMike Welles<UL> 128*0ef31e1fSMike Welles<LI>on the command line to configure, 129*0ef31e1fSMike Welles<LI>in a site-wide configuration file, or 130*0ef31e1fSMike Welles<LI>in a target-specific configuration file. 131*0ef31e1fSMike Welles</UL> 132*0ef31e1fSMike Wellesconfigure reads any site-wide configure file first, and 133*0ef31e1fSMike Wellesthen any target-specific configuration file. 134*0ef31e1fSMike WellesThis permits target-specific definitions to override 135*0ef31e1fSMike Wellessite-wide definitions. 136*0ef31e1fSMike Welles 137*0ef31e1fSMike Welles<P> 138*0ef31e1fSMike WellesSite-wide configuration files are named 139*0ef31e1fSMike Welles<B>config.site</B> and are automatically searched for first 140*0ef31e1fSMike Wellesin any directory specified on the command line to configure 141*0ef31e1fSMike Welles(using the <TT>-site</TT> option), or if that fails, in 142*0ef31e1fSMike Wellesthe directory in in which the configure script is located. 143*0ef31e1fSMike Welles 144*0ef31e1fSMike Welles<P> 145*0ef31e1fSMike WellesTarget-specific configuration files are named <B>config.local</B> 146*0ef31e1fSMike Wellesand are looked for first in the top-level configuration directory, 147*0ef31e1fSMike Wellesor, if that fails, in the directory in which the configure script 148*0ef31e1fSMike Wellesis located. 149*0ef31e1fSMike Welles 150*0ef31e1fSMike Welles<P> 151*0ef31e1fSMike WellesConfiguration files are just shell scripts that define 152*0ef31e1fSMike Wellesshell variables that control the configuration process. 153*0ef31e1fSMike WellesFor example, the following file might be used on a BSDI system to 154*0ef31e1fSMike Wellesconfigure the software for installation in the <B>/usr/contrib</B> area. 155*0ef31e1fSMike Welles 156*0ef31e1fSMike Welles<PRE> 157*0ef31e1fSMike Welles# 158*0ef31e1fSMike Welles# Parameters suitable for BSDI 1.1 159*0ef31e1fSMike Welles# 160*0ef31e1fSMike WellesDIR_BIN="/usr/contrib/bin" # directory for client apps 161*0ef31e1fSMike WellesDIR_LIB="/usr/contrib/lib" # directory for libraries 162*0ef31e1fSMike WellesDIR_MAN="/usr/contrib/man" # directory for manual pages 163*0ef31e1fSMike Welles</PRE> 164*0ef31e1fSMike Welles 165*0ef31e1fSMike Welles<P> 166*0ef31e1fSMike WellesFor a complete list of the possible configuration parameters look 167*0ef31e1fSMike Wellesat the sample <B>config.site</B> file provided in the distribution; the 168*0ef31e1fSMike Wellessection below describes some of the more important parameters. 169*0ef31e1fSMike Welles 170*0ef31e1fSMike Welles<A NAME="Packages"><P><HR WIDTH=65% ALIGN=right><H3>Configuring Optional Packages/Support</H3></A> 171*0ef31e1fSMike Welles 172*0ef31e1fSMike WellesThe TIFF software comes with several packages that are installed only 173*0ef31e1fSMike Wellesas needed, or only if specifically configured at the time 174*0ef31e1fSMike Wellesthe configure script is run. Packages can be configured in a 175*0ef31e1fSMike Welles<B>config.site</B> or <B>config.local</B> file, or by using a 176*0ef31e1fSMike Welles<TT>-with-<PACKAGE></TT> option when invoking configure; 177*0ef31e1fSMike Wellese.g. <TT>configure -with-AFM</TT>. 178*0ef31e1fSMike Welles 179*0ef31e1fSMike Welles<DL> 180*0ef31e1fSMike Welles<DT><I>DSO Support</I> 181*0ef31e1fSMike Welles<DD>The <TT>DSO</TT> support controls whether or not to 182*0ef31e1fSMike Wellesconfigure the software 183*0ef31e1fSMike Wellesto build a Dynamic Shared Object for the TIFF library. 184*0ef31e1fSMike WellesUse of DSOs can significantly reduce the disk space needed for 185*0ef31e1fSMike Wellesusers of the TIFF software. 186*0ef31e1fSMike WellesIf DSOs are not used then the code is statically linked into 187*0ef31e1fSMike Welleseach application that uses it. 188*0ef31e1fSMike WellesBy default this support is configured only if the system appears 189*0ef31e1fSMike Wellesto suport DSOs in a way that fits into the normal build scheme 190*0ef31e1fSMike Welles(<TT>auto</TT>). 191*0ef31e1fSMike WellesIf DSO support is <EM>explicitly enabled</EM> and there is no 192*0ef31e1fSMike Wellessupport for using DSOs in the expected way then DSOs are not used. 193*0ef31e1fSMike Welles 194*0ef31e1fSMike Welles<P> 195*0ef31e1fSMike Welles<DT><I>JPEG Support</I> 196*0ef31e1fSMike Welles<DD>The <TT>JPEG</TT> package enables support for the handling 197*0ef31e1fSMike Wellesof TIFF images with JPEG-encoded data. 198*0ef31e1fSMike WellesSupport for JPEG-encoded data requires the Independent JPEG Group (IJG) 199*0ef31e1fSMike Welles<TT>libjpeg</TT> distribution; this software is available at 200*0ef31e1fSMike Welles<A HREF=ftp://ftp.uu.net/graphics/jpeg/>ftp.uu.net:/graphics/jpeg/</A>. 201*0ef31e1fSMike WellesIf JPEG support is enabled the <TT>DIRS_LIBINC</TT> and <TT>DIR_JPEGLIB</TT> 202*0ef31e1fSMike Wellesparameters should also be set (see below). 203*0ef31e1fSMike WellesBy default JPEG support is not configured. 204*0ef31e1fSMike Welles 205*0ef31e1fSMike Welles<P> 206*0ef31e1fSMike Welles<DT><I>ZIP Support</I> 207*0ef31e1fSMike Welles<DD>The <TT>ZIP</TT> support enables support for the handling 208*0ef31e1fSMike Wellesof TIFF images with deflate-encoded data. 209*0ef31e1fSMike WellesSupport for deflate-encoded data requires the freely available 210*0ef31e1fSMike Welles<TT>zlib</TT> distribution written by Jean-loup Gailly and Mark Adler; 211*0ef31e1fSMike Wellesthis software is available at 212*0ef31e1fSMike Welles<A HREF=ftp://ftp.uu.net/pub/archiving/zip/zlib/>ftp.uu.net:/pub/archiving/zip/zlib/</A> 213*0ef31e1fSMike Welles(or try <A HREF=ftp://quest.jpl.nasa.gov/beta/zlib/>quest.jpl.nasa.gov:/beta/zlib/</A>). 214*0ef31e1fSMike WellesIf ZIP support is enabled the <TT>DIRS_LIBINC</TT> and <TT>DIR_GZLIB</TT> 215*0ef31e1fSMike Wellesparameters should also be set (see below). 216*0ef31e1fSMike WellesBy default this package is not configured. 217*0ef31e1fSMike Welles 218*0ef31e1fSMike Welles</DL> 219*0ef31e1fSMike Welles 220*0ef31e1fSMike Welles<A NAME="Sample"><P><HR WIDTH=65% ALIGN=right><H3>A Sample Configuration Session</H3></A> 221*0ef31e1fSMike Welles 222*0ef31e1fSMike WellesThis section shows a sample configuration session and describes 223*0ef31e1fSMike Wellesthe work done. The session is shown indented in a <TT>fixed width 224*0ef31e1fSMike Wellesfont</TT> with user-supplied input in a <TT><B>bold font</B></TT>. 225*0ef31e1fSMike WellesComments are shown in a normal or <I>italic</I> font. 226*0ef31e1fSMike WellesThis session was collected on a 486 machine running BSDI 1.1. 227*0ef31e1fSMike Welles 228*0ef31e1fSMike Welles<UL><PRE><TT> 229*0ef31e1fSMike Welleswullbrandt% <B>mkdir tiff</B> 230*0ef31e1fSMike Welleswullbrandt% <B>cd tiff</B> 231*0ef31e1fSMike Welleswullbrandt% <B>ln -s /hosts/oxford/usr/people/sam/tiff src</B> 232*0ef31e1fSMike Welles</TT></PRE></UL> 233*0ef31e1fSMike Welles 234*0ef31e1fSMike WellesA build tree separate from the source tree is used here. 235*0ef31e1fSMike WellesIn fact, in this case the distribution is accessed from 236*0ef31e1fSMike Wellesa read-only NFS-mounted filesystem. 237*0ef31e1fSMike Welles 238*0ef31e1fSMike Welles<UL><PRE><TT> 239*0ef31e1fSMike Welleswullbrandt% <B>src/configure</B> 240*0ef31e1fSMike WellesConfiguring TIFF Software v3.4beta015. 241*0ef31e1fSMike Welles 242*0ef31e1fSMike WellesReading site-wide parameters from ../tiff-v3.4beta015/config.site. 243*0ef31e1fSMike WellesReading local parameters from config.local. 244*0ef31e1fSMike WellesGosh, aren't you lucky to have a i386-unknown-bsdi1.1 system! 245*0ef31e1fSMike Welles</TT></PRE></UL> 246*0ef31e1fSMike Welles 247*0ef31e1fSMike WellesNote that configure announces the distribution version and the 248*0ef31e1fSMike Wellesdeduced target configuration (<TT>i386-unknown-bsdi1.1</TT> here). 249*0ef31e1fSMike Welles 250*0ef31e1fSMike Welles<UL><PRE><TT> 251*0ef31e1fSMike WellesUsing /usr/local/bin/gcc for a C compiler (set CC to override). 252*0ef31e1fSMike WellesLooks like /usr/local/bin/gcc supports the -g option. 253*0ef31e1fSMike WellesUsing " -g" for C compiler options. 254*0ef31e1fSMike Welles</TT></PRE></UL> 255*0ef31e1fSMike Welles 256*0ef31e1fSMike Wellesconfigure checked the normal shell search path for potential 257*0ef31e1fSMike WellesANSI C compilers. The compiler is selected according to it properly 258*0ef31e1fSMike Wellescompiling a small ANSI C test program. A specific compiler may be requested 259*0ef31e1fSMike Wellesby setting the <TT>CC</TT> environment variable to the appropriate 260*0ef31e1fSMike Wellespathname, by supplying the parameter on the command line, e.g. 261*0ef31e1fSMike Welles<TT>-with-CC=gcc</TT>, or by setting <TT>CC</TT> in a configuration 262*0ef31e1fSMike Wellesfile. 263*0ef31e1fSMike Welles 264*0ef31e1fSMike Welles<P> 265*0ef31e1fSMike Welles<IMG SRC="images/info.gif" ALIGN=left HSPACE=10> 266*0ef31e1fSMike Welles<EM>Note that an ANSI C compiler is required to build the software. 267*0ef31e1fSMike WellesIf a C compiler requires options to enable ANSI C compilation, they 268*0ef31e1fSMike Wellescan be specified with the <TT>ENVOPTS</TT> parameter.</EM> 269*0ef31e1fSMike Welles 270*0ef31e1fSMike Welles<P> 271*0ef31e1fSMike WellesOnce a compiler is selected configure checks to see 272*0ef31e1fSMike Wellesif the compiler accepts a -g option to enable the generation 273*0ef31e1fSMike Welles of debugging symbols, and 274*0ef31e1fSMike Wellesif the compiler includes an ANSI C preprocessor. 275*0ef31e1fSMike Welles 276*0ef31e1fSMike Welles<UL><PRE><TT> 277*0ef31e1fSMike WellesUsing /usr/ucb/make to configure the software. 278*0ef31e1fSMike Welles</TT></PRE></UL> 279*0ef31e1fSMike Welles 280*0ef31e1fSMike WellesNext various system-specific libraries that may or may not be needed 281*0ef31e1fSMike Wellesare checked for (none are needed in this case). 282*0ef31e1fSMike WellesIf your system requires a library that is not 283*0ef31e1fSMike Wellesautomatically included it can be specified by setting the 284*0ef31e1fSMike Welles<TT>MACHDEPLIBS</TT> parameter. 285*0ef31e1fSMike Welles 286*0ef31e1fSMike Welles<P><I>Creating port.h.</I> 287*0ef31e1fSMike WellesThe <B>port.h</B> file is included by all the C code 288*0ef31e1fSMike Wellesin the library (but not the tools). 289*0ef31e1fSMike WellesIt includes definitions for functions and type 290*0ef31e1fSMike Wellesdefinitions that are missing from system include files, <TT>#defines</TT> 291*0ef31e1fSMike Wellesto enable or disable system-specific functionality, and other 292*0ef31e1fSMike Wellesodds and ends. 293*0ef31e1fSMike Welles 294*0ef31e1fSMike Welles<UL><PRE><TT> 295*0ef31e1fSMike WellesCreating libtiff/port.h with necessary definitions. 296*0ef31e1fSMike Welles... using LSB2MSB bit order for your i386 cpu 297*0ef31e1fSMike Welles... using big-endian byte order for your i386 cpu 298*0ef31e1fSMike Welles... configure use of mmap for memory-mapped files 299*0ef31e1fSMike Welles... O_RDONLY is in <fcntl.h> 300*0ef31e1fSMike Welles... using double for promoted floating point parameters 301*0ef31e1fSMike Welles... enabling use of inline functions 302*0ef31e1fSMike WellesDone creating libtiff/port.h. 303*0ef31e1fSMike Welles</TT></PRE></UL> 304*0ef31e1fSMike Welles 305*0ef31e1fSMike WellesThis file can take a long time to create so configure 306*0ef31e1fSMike Wellesgenerates the file only when it is needed, either because the 307*0ef31e1fSMike Wellesfile does not exist or because a different target or compiler 308*0ef31e1fSMike Wellesis to be used. 309*0ef31e1fSMike WellesNote that running "<TT>make distclean</TT>" in the top-level directory 310*0ef31e1fSMike Wellesof the build tree will remove the <B>port.h</B> file (along 311*0ef31e1fSMike Welleswith all the other files generated by configure). 312*0ef31e1fSMike Welles 313*0ef31e1fSMike Welles<P><I>Selecting emulated library functions.</I> 314*0ef31e1fSMike WellesCertain library functions used by the tools are not present on all systems 315*0ef31e1fSMike Wellesand can be emulated using other system functionality. 316*0ef31e1fSMike Wellesconfigure checks for the presence of such functions and if they are 317*0ef31e1fSMike Wellesmissing, will configure emulation code from the <B>port</B> directory 318*0ef31e1fSMike Wellesto use instead. Building the TIFF 319*0ef31e1fSMike Wellessoftware on unsupported systems may require 320*0ef31e1fSMike Wellesadding to the code to the <B>port</B> directory. 321*0ef31e1fSMike Welles 322*0ef31e1fSMike Welles<UL><PRE><TT> 323*0ef31e1fSMike WellesChecking system libraries for functionality to emulate. 324*0ef31e1fSMike WellesDone checking system libraries. 325*0ef31e1fSMike Welles</TT></PRE></UL> 326*0ef31e1fSMike Welles 327*0ef31e1fSMike WellesIf a routine must be emulated and configure does not automatically 328*0ef31e1fSMike Wellescheck for it, the routine name can be specified using the <TT>PORTFUNCS</TT> 329*0ef31e1fSMike Wellesparameter. To add emulation support for a new function <TT>foo</TT>, 330*0ef31e1fSMike Wellescreate a file <B>port/foo.c</B> that contains the emulation code 331*0ef31e1fSMike Wellesand then set <TT>PORTFUNCS=foo</TT> in a configuration file or modify 332*0ef31e1fSMike Wellesthe configure script to automatically check for the missing function. 333*0ef31e1fSMike Welles 334*0ef31e1fSMike Welles<UL><PRE><TT> 335*0ef31e1fSMike WellesChecking for Dynamic Shared Object (DSO) support. 336*0ef31e1fSMike WellesDone checking for DSO support. 337*0ef31e1fSMike Welles</TT></PRE></UL> 338*0ef31e1fSMike Welles 339*0ef31e1fSMike WellesIf the <TT>DSO</TT> package is enabled (<TT>DSO=auto</TT> or 340*0ef31e1fSMike Welles<TT>DSO=yes</TT>), then 341*0ef31e1fSMike Wellesconfigure will verify the system and compiler are capable of 342*0ef31e1fSMike Wellesconstructing SVR4-style DSO's in the expected way. Note that 343*0ef31e1fSMike Welleswhile a system may support DSO's the compiler may not be 344*0ef31e1fSMike Wellescapable of generating the required position-independent 345*0ef31e1fSMike Wellescode and/or the compiler may not pass the needed options 346*0ef31e1fSMike Wellesthrough to the loader. 347*0ef31e1fSMike Welles 348*0ef31e1fSMike Welles<P><I>Selecting utility programs.</I> 349*0ef31e1fSMike Wellesconfigure locates various system utility programs that are 350*0ef31e1fSMike Wellesused during installation of the software. 351*0ef31e1fSMike Welles 352*0ef31e1fSMike Welles<UL><PRE><TT> 353*0ef31e1fSMike WellesSelecting programs used during installation. 354*0ef31e1fSMike WellesLooks like mv supports the -f option to force a move. 355*0ef31e1fSMike WellesLooks like /bin/ln supports the -s option to create a symbolic link. 356*0ef31e1fSMike WellesDone selecting programs. 357*0ef31e1fSMike Welles</TT></PRE></UL> 358*0ef31e1fSMike Welles 359*0ef31e1fSMike Welles<P><I>Selecting default configuration parameters.</I> 360*0ef31e1fSMike WellesThe remainder of the work done by configure involves setting up 361*0ef31e1fSMike Wellesconfiguration parameters that control the placement and 362*0ef31e1fSMike Wellessetup of files during the installation procedure. 363*0ef31e1fSMike Welles 364*0ef31e1fSMike Welles<UL><PRE><TT> 365*0ef31e1fSMike WellesSelecting default TIFF configuration parameters. 366*0ef31e1fSMike Welles 367*0ef31e1fSMike WellesLooks like manual pages go in /usr/contrib/man. 368*0ef31e1fSMike WellesLooks like manual pages should be installed with bsd-nroff-gzip-0.gz. 369*0ef31e1fSMike Welles 370*0ef31e1fSMike WellesTIFF configuration parameters are: 371*0ef31e1fSMike Welles 372*0ef31e1fSMike Welles[ 1] Directory for tools: /usr/contrib/bin 373*0ef31e1fSMike Welles[ 2] Directory for libraries: /usr/contrib/lib 374*0ef31e1fSMike Welles[ 3] Directory for include files: /usr/contrib/include 375*0ef31e1fSMike Welles[ 4] Directory for manual pages: /usr/contrib/man 376*0ef31e1fSMike Welles[ 5] Manual page installation scheme: bsd-nroff-gzip-0.gz 377*0ef31e1fSMike Welles 378*0ef31e1fSMike WellesAre these ok [yes]? 379*0ef31e1fSMike Welles</TT></PRE></UL> 380*0ef31e1fSMike Welles 381*0ef31e1fSMike Welles 382*0ef31e1fSMike Welles 383*0ef31e1fSMike WellesAt this point you can interactively modify any of the 384*0ef31e1fSMike Wellesdisplayed parameters. Hitting a carriage return or typing 385*0ef31e1fSMike Welles<TT>yes</TT> will accept the current parameters. Typing one 386*0ef31e1fSMike Wellesof the number displayed along the left hand side causes 387*0ef31e1fSMike Wellesconfigure to prompt for a new value of the specified parameter. 388*0ef31e1fSMike WellesTyping anything else causes configure to prompt for a new 389*0ef31e1fSMike Wellesvalue <EM>for each parameter</EM>. 390*0ef31e1fSMike WellesIn general hitting carriage return will accept the current 391*0ef31e1fSMike Wellesvalue and typing anything that is unacceptable will cause a 392*0ef31e1fSMike Welleshelp message to be displayed. 393*0ef31e1fSMike WellesA description of each of the configuration parameters is given below. 394*0ef31e1fSMike Welles 395*0ef31e1fSMike Welles<P> 396*0ef31e1fSMike WellesOnce acceptable parameters are setup configure will generate 397*0ef31e1fSMike Wellesall the files that depend on these parameters. Note that certain 398*0ef31e1fSMike Wellesfiles may or may not be created based on the configuration of 399*0ef31e1fSMike Wellesoptional packages and/or the functions supported by target system. 400*0ef31e1fSMike Welles 401*0ef31e1fSMike Welles<UL><PRE><TT> 402*0ef31e1fSMike WellesCreating Makefile from ../tiff-v3.4beta015/Makefile.in 403*0ef31e1fSMike WellesCreating libtiff/Makefile from ../tiff-v3.4beta015/libtiff/Makefile.in 404*0ef31e1fSMike WellesCreating man/Makefile from ../tiff-v3.4beta015/man/Makefile.in 405*0ef31e1fSMike WellesCreating tools/Makefile from ../tiff-v3.4beta015/tools/Makefile.in 406*0ef31e1fSMike WellesCreating port/install.sh from ../tiff-v3.4beta015/port/install.sh.in 407*0ef31e1fSMike WellesDone. 408*0ef31e1fSMike Welles</TT></PRE></UL> 409*0ef31e1fSMike Welles 410*0ef31e1fSMike Welles<A NAME=DSOSupport><P><HR><H3>Shared Library Support</H3></A> 411*0ef31e1fSMike Welles 412*0ef31e1fSMike WellesIt is desirable to make the TIFF library be a shared object 413*0ef31e1fSMike Welleson systems that have support for shared libraries. 414*0ef31e1fSMike WellesUnfortunately the rules to use to build a shared library 415*0ef31e1fSMike Wellesvary between operating systems and even compilers. 416*0ef31e1fSMike WellesThe distributed software includes support for building a shared 417*0ef31e1fSMike Wellesversion of the library on a number of different systems. 418*0ef31e1fSMike WellesThis support is split between rules in the file 419*0ef31e1fSMike Welles<B>libtiff/Makefile.in</B> that construct the shared library 420*0ef31e1fSMike Wellesand checks done by the <TT>configure</TT> script to verify that 421*0ef31e1fSMike Wellesthe expected rules are supported by compilation tools for 422*0ef31e1fSMike Wellesthe target system. 423*0ef31e1fSMike Welles 424*0ef31e1fSMike Welles<P> 425*0ef31e1fSMike WellesTo add new support for building a shared library both these files 426*0ef31e1fSMike Wellesmust be updated. 427*0ef31e1fSMike WellesIn the configure script search for the section where the autoconfiguration 428*0ef31e1fSMike Wellessetting of the <TT>DSO</TT> parameter is handled and 429*0ef31e1fSMike Wellesadd a new case for the target system that sets the 430*0ef31e1fSMike Welles<TT>DSOSUF</TT>, 431*0ef31e1fSMike Welles<TT>DSOLD</TT>, 432*0ef31e1fSMike Welles<TT>DSOOPTS</TT>, 433*0ef31e1fSMike Wellesand 434*0ef31e1fSMike Welles<TT>LIBCOPTS</TT> 435*0ef31e1fSMike Wellesoptions as appropriate for the system. 436*0ef31e1fSMike Welles<TT>DSOSUF</TT> specifies the filename suffix used for the shared 437*0ef31e1fSMike Welleslibrary (e.g. ``.so'' for Dynamic Shared Objects on most SVR4-based 438*0ef31e1fSMike Wellessystems). 439*0ef31e1fSMike Welles<TT>DSOLD</TT> specifies the program to use to build the shared library 440*0ef31e1fSMike Wellesfrom a compiled object file; typically ``${LD}'' though on some systems 441*0ef31e1fSMike Wellesit is better to use the C compiler directly so system-dependent options and 442*0ef31e1fSMike Welleslibraries are automatically supplied. 443*0ef31e1fSMike Welles<TT>DSOOPTS</TT> are options that must be specified to <TT>DSOLD</TT> 444*0ef31e1fSMike Welleswhen building the shared library. 445*0ef31e1fSMike Welles<TT>LIBCOPTS</TT> are options to pass to the C compiler when constructing 446*0ef31e1fSMike Wellesa relocatable object file to include in a shared library; e.g. ``-K PIC'' 447*0ef31e1fSMike Welleson a Sun system. 448*0ef31e1fSMike WellesThe <TT>DSO</TT> parameter must also be set to a unique label that identifies 449*0ef31e1fSMike Wellesthe target system and compilation tools. 450*0ef31e1fSMike WellesThis label is used to select 451*0ef31e1fSMike Wellesa target in <B>libtiff/Makefile.in</B> to do the actual work in building 452*0ef31e1fSMike Wellesthe shared library. 453*0ef31e1fSMike WellesFinally, to complete support for the shared library added the appropriate 454*0ef31e1fSMike Wellesrules to <B>libtiff/Makefile.in</B> under the target specified in the 455*0ef31e1fSMike Welles<TT>configure</TT> script. 456*0ef31e1fSMike Welles 457*0ef31e1fSMike Welles 458*0ef31e1fSMike Welles 459*0ef31e1fSMike Welles 460*0ef31e1fSMike Welles<A NAME="Parameters"><P><HR WIDTH=65% ALIGN=right><H3>Configuration Parameters</H3></A> 461*0ef31e1fSMike Welles 462*0ef31e1fSMike WellesThis section gives a brief description of the less obvious 463*0ef31e1fSMike Wellesconfiguration parameters. Consult the distributed <B>config.site</B> 464*0ef31e1fSMike Wellesfor a <EM>complete list of parameters</EM>. 465*0ef31e1fSMike WellesThe list here is sorted alphabetically. 466*0ef31e1fSMike Welles 467*0ef31e1fSMike Welles<P> 468*0ef31e1fSMike Welles<TABLE BORDER CELLPADDING=3> 469*0ef31e1fSMike Welles 470*0ef31e1fSMike Welles<TR> 471*0ef31e1fSMike Welles<TD VALIGN=top><TT>AROPTS</TT></TD> 472*0ef31e1fSMike Welles<TD>The options passed to ar when creating an archive. 473*0ef31e1fSMike WellesNote that configure will automatically check to see if ar 474*0ef31e1fSMike Wellessupports an <TT>s</TT> to create a symbol table instead of 475*0ef31e1fSMike Wellesusing ranlib.</TD> 476*0ef31e1fSMike Welles</TR> 477*0ef31e1fSMike Welles 478*0ef31e1fSMike Welles<TR> 479*0ef31e1fSMike Welles<TD VALIGN=top><TT>DIR_BIN</TT></TD> 480*0ef31e1fSMike Welles<TD>The directory where client applications should be installed; by 481*0ef31e1fSMike Wellesdefault this is <B>/usr/local/bin</B>.</TD> 482*0ef31e1fSMike Welles</TR> 483*0ef31e1fSMike Welles 484*0ef31e1fSMike Welles<TR> 485*0ef31e1fSMike Welles<TD VALIGN=top><TT>DIR_GZLIB</TT></TD> 486*0ef31e1fSMike Welles<TD>The pathname of the directory containing the zlib library 487*0ef31e1fSMike Welles(when ZIP or PixarLog compression support is enabled); 488*0ef31e1fSMike Wellese.g. ``<TT>../src/zlib</TT>''.</TD> 489*0ef31e1fSMike Welles</TR> 490*0ef31e1fSMike Welles 491*0ef31e1fSMike Welles<TR> 492*0ef31e1fSMike Welles<TD VALIGN=top><TT>DIR_JPEGLIB</TT></TD> 493*0ef31e1fSMike Welles<TD>The pathname of the directory containing the JPEG library 494*0ef31e1fSMike Welles(when JPEG support is enabled); e.g. ``<TT>/usr/local/lib</TT>''.</TD> 495*0ef31e1fSMike Welles</TR> 496*0ef31e1fSMike Welles 497*0ef31e1fSMike Welles<TR> 498*0ef31e1fSMike Welles<TD VALIGN=top><TT>DIR_LIB</TT></TD> 499*0ef31e1fSMike Welles<TD>The directory to install libraries and DSO's; by default 500*0ef31e1fSMike Wellesthis is <B>/usr/local/lib</B>.</TD> 501*0ef31e1fSMike Welles</TR> 502*0ef31e1fSMike Welles 503*0ef31e1fSMike Welles<TR> 504*0ef31e1fSMike Welles<TD VALIGN=top><TT>DIR_MAN</TT></TD> 505*0ef31e1fSMike Welles<TD>The top-most directory of the manual area where manual 506*0ef31e1fSMike Wellespages should be installed.</TD> 507*0ef31e1fSMike Welles</TR> 508*0ef31e1fSMike Welles 509*0ef31e1fSMike Welles<TR> 510*0ef31e1fSMike Welles<TD VALIGN=top><TT>DIRS_LIBINC</TT></TD> 511*0ef31e1fSMike Welles<TD>A space-separated list of directories in which to search for 512*0ef31e1fSMike Wellesinclude files when building the library and tools. 513*0ef31e1fSMike WellesIf JPEG or ZIP support is configured this parameter should include 514*0ef31e1fSMike Wellesthe directories where the associated include files are located.</TD> 515*0ef31e1fSMike Welles</TR> 516*0ef31e1fSMike Welles 517*0ef31e1fSMike Welles<TR> 518*0ef31e1fSMike Welles<TD VALIGN=top><TT>DIST_ALPHA</TT></TD> 519*0ef31e1fSMike Welles<TD>The alpha version number for the distribution; e.g. if this 520*0ef31e1fSMike Wellesis version 3.4beta031 then the the major number is 31.</TD> 521*0ef31e1fSMike Welles</TR> 522*0ef31e1fSMike Welles 523*0ef31e1fSMike Welles<TR> 524*0ef31e1fSMike Welles<TD VALIGN=top><TT>DIST_MAJOR</TT></TD> 525*0ef31e1fSMike Welles<TD>The major version number for the distribution; e.g. if this 526*0ef31e1fSMike Wellesis version 3.4beta031 then the the major number is 3.</TD> 527*0ef31e1fSMike Welles</TR> 528*0ef31e1fSMike Welles 529*0ef31e1fSMike Welles<TR> 530*0ef31e1fSMike Welles<TD VALIGN=top><TT>DIST_MINOR</TT></TD> 531*0ef31e1fSMike Welles<TD>The minor version number for the distribution; e.g. if this 532*0ef31e1fSMike Wellesis version 3.4beta031 then the the major number is 4.</TD> 533*0ef31e1fSMike Welles</TR> 534*0ef31e1fSMike Welles 535*0ef31e1fSMike Welles<TR> 536*0ef31e1fSMike Welles<TD VALIGN=top><TT>DSOSUF</TT></TD> 537*0ef31e1fSMike Welles<TD>When DSO's are built, the filename suffix for a DSO. 538*0ef31e1fSMike WellesIf this is set to <TT>"a"</TT> then statically linked archives are used.</TD> 539*0ef31e1fSMike Welles</TR> 540*0ef31e1fSMike Welles 541*0ef31e1fSMike Welles<TR> 542*0ef31e1fSMike Welles<TD VALIGN=top><TT>DSOSUF_VERSION</TT></TD> 543*0ef31e1fSMike Welles<TD>When DSO's are built, a version-specific filename suffix for a DSO. 544*0ef31e1fSMike WellesIf this is set to something other than the value of <TT>DSO</TT> then 545*0ef31e1fSMike Wellesthe file <B>libtiff.<TT>DSOSUF_VERSION</TT></B> will be installed and 546*0ef31e1fSMike Wellesa link to it named <B>libtiff.<TT>DSOSUF</TT></B> will automatically 547*0ef31e1fSMike Wellesbe created. (Note that this means that rule for building the target 548*0ef31e1fSMike WellesDSO must generate a file named <B>libtiff.<TT>DSOSUF_VERSION</TT></B>.)</TD> 549*0ef31e1fSMike Welles</TR> 550*0ef31e1fSMike Welles 551*0ef31e1fSMike Welles<TR> 552*0ef31e1fSMike Welles<TD VALIGN=top><TT>ENVOPTS</TT></TD> 553*0ef31e1fSMike Welles<TD>Options to pass to <TT>CC</TT> to force ANSI C compilation.</TD> 554*0ef31e1fSMike Welles</TR> 555*0ef31e1fSMike Welles 556*0ef31e1fSMike Welles<TR> 557*0ef31e1fSMike Welles<TD VALIGN=top><TT>FILLORDER</TT></TD> 558*0ef31e1fSMike Welles<TD>The order of bits in a byte on the server machine; 559*0ef31e1fSMike Welleseither LSB2MSB or MSB2LSB. 560*0ef31e1fSMike WellesThis is normally selected according to the target system.</TD> 561*0ef31e1fSMike Welles</TR> 562*0ef31e1fSMike Welles 563*0ef31e1fSMike Welles<TR> 564*0ef31e1fSMike Welles<TD VALIGN=top><TT>GCOPTS</TT></TD> 565*0ef31e1fSMike Welles<TD>Special options to pass the C compiler. If this parameter 566*0ef31e1fSMike Wellesis set, then configure may append other options to this list.</TD> 567*0ef31e1fSMike Welles</TR> 568*0ef31e1fSMike Welles 569*0ef31e1fSMike Welles<TR> 570*0ef31e1fSMike Welles<TD VALIGN=top><TT>INSTALL</TT></TD> 571*0ef31e1fSMike Welles<TD>The pathname of the install program to use. Note that this program 572*0ef31e1fSMike Wellesmust emulate the command line interface used by the IRIX install program.</TD> 573*0ef31e1fSMike Welles</TR> 574*0ef31e1fSMike Welles 575*0ef31e1fSMike Welles<TR> 576*0ef31e1fSMike Welles<TD VALIGN=top><TT>LIBPORT</TT></TD> 577*0ef31e1fSMike Welles<TD>The pathname of the library that holds code to emulate missing 578*0ef31e1fSMike Wellessystem functionality. 579*0ef31e1fSMike WellesNormally this parameter is set by configure based on whether or 580*0ef31e1fSMike Wellesnot emulation code is required for the target. 581*0ef31e1fSMike Welles</TR> 582*0ef31e1fSMike Welles 583*0ef31e1fSMike Welles<TR> 584*0ef31e1fSMike Welles<TD VALIGN=top><TT>LLDOPTS</TT> 585*0ef31e1fSMike Welles<TD>Extra command line options passed to <TT>CC</TT> 586*0ef31e1fSMike Welleswhen linking an executable. 587*0ef31e1fSMike WellesThis option is usually set only when DSO support is enabled 588*0ef31e1fSMike Welles(to force the executable to search for the TIFF DSO 589*0ef31e1fSMike Wellesin non-standard locations in the filesystem.)</TD> 590*0ef31e1fSMike Welles</TR> 591*0ef31e1fSMike Welles 592*0ef31e1fSMike Welles<TR> 593*0ef31e1fSMike Welles<TD VALIGN=top><TT>MACHDEPLIBS</TT></TD> 594*0ef31e1fSMike Welles<TD>Target-dependent libraries that should be used when linking 595*0ef31e1fSMike Wellestools. 596*0ef31e1fSMike WellesNote that if this parameter is specified configure will append to 597*0ef31e1fSMike Wellesthe list of libraries.</TD> 598*0ef31e1fSMike Welles</TR> 599*0ef31e1fSMike Welles 600*0ef31e1fSMike Welles<TR> 601*0ef31e1fSMike Welles<TD VALIGN=top><TT>MANSCHEME</TT></TD> 602*0ef31e1fSMike Welles<TD>The scheme to use when preparing and installing manual pages. 603*0ef31e1fSMike WellesSchemes are constructed according to: 604*0ef31e1fSMike Welles<UL> 605*0ef31e1fSMike Welles<<I>organization</I>>-<<I>formatting</I>>-<<I>compression</I>>[-<<I>suffix</I>>] 606*0ef31e1fSMike Welles</UL> 607*0ef31e1fSMike Welleswhere: 608*0ef31e1fSMike Welles<<I>organization</I>> is either <TT>bsd</TT> 609*0ef31e1fSMike Wellesfor BSD-style section organization (e.g. file formats in 610*0ef31e1fSMike Wellessection 5) or <TT>sysv</TT> for System V-style 611*0ef31e1fSMike Wellesorganization (e.g. file formats in section 4). 612*0ef31e1fSMike Welles<<I>formatting</I>> is either <TT>nroff</TT> to force 613*0ef31e1fSMike Wellesinstallation of formatted materials (using nroff) or 614*0ef31e1fSMike Welles<TT>source</TT> to get the nroff source installed. 615*0ef31e1fSMike Welles<<I>compression</I>> is either the name of a program 616*0ef31e1fSMike Wellesto compress the manual pages (gipz, compress, pack) or 617*0ef31e1fSMike Welles<TT>cat</TT> for uncompressed data. 618*0ef31e1fSMike Welles<<I>suffix</I>> is either the file suffix to convert 619*0ef31e1fSMike Wellesinstalled pages to (e.g. 0.gz for gzip-compressed pages under BSD) 620*0ef31e1fSMike Wellesor <TT>strip</TT> to force the normal ".4f" suffix to be converted to ".4" 621*0ef31e1fSMike Welles(or ".5" if using the BSD organization). If no -<suffix> 622*0ef31e1fSMike Wellesis specified then filenames are not converted when they are installed.</TD> 623*0ef31e1fSMike Welles</TR> 624*0ef31e1fSMike Welles 625*0ef31e1fSMike Welles<TR> 626*0ef31e1fSMike Welles<TD VALIGN=top><TT>PORTFUNCS</TT></TD> 627*0ef31e1fSMike Welles<TD>A list of non-standard functions that should be emulated. 628*0ef31e1fSMike WellesNormally this list is constructed by configure based on checks it does. 629*0ef31e1fSMike WellesIf this parameter is set, configure will append to the specified list.</TD> 630*0ef31e1fSMike Welles</TR> 631*0ef31e1fSMike Welles 632*0ef31e1fSMike Welles<TR> 633*0ef31e1fSMike Welles<TD VALIGN=top><TT>SETMAKE</TT></TD> 634*0ef31e1fSMike Welles<TD>If make does not automatically set <TT>$MAKE</TT> to 635*0ef31e1fSMike Wellesthe name of the make program to invoke for subdirectories, then 636*0ef31e1fSMike Wellesconfigure will create an explicit definition. 637*0ef31e1fSMike WellesIf this parameter is set, then it will be used instead. 638*0ef31e1fSMike Wellesby default <TT>bin</TT> is used.</TD> 639*0ef31e1fSMike Welles</TR> 640*0ef31e1fSMike Welles 641*0ef31e1fSMike Welles</TABLE> 642*0ef31e1fSMike Welles 643*0ef31e1fSMike Welles 644*0ef31e1fSMike Welles<A NAME=PC><P><HR><H2>Building the Software under MS/DOS or Windows</H2></A> 645*0ef31e1fSMike Welles 646*0ef31e1fSMike Welles<I> 647*0ef31e1fSMike WellesThere is a Makefile for Microsoft C. 648*0ef31e1fSMike WellesThere is OS support for MS-DOS and for Windows. 649*0ef31e1fSMike WellesSomeone needs to fill this in, but no DOS-weenies seem to 650*0ef31e1fSMike Wellesgive a damn so this section is blank for now .... 651*0ef31e1fSMike Welles</I> 652*0ef31e1fSMike Welles 653*0ef31e1fSMike Welles 654*0ef31e1fSMike Welles 655*0ef31e1fSMike Welles<A NAME=DJGPP><P><HR><H2>Building the Software under MS/DOS with the DJGPP v2 compiler</H2></A> 656*0ef31e1fSMike Welles 657*0ef31e1fSMike Welles[<I>From the file <B>contrib/dosdjgpp/README</B>.</I>] 658*0ef31e1fSMike Welles 659*0ef31e1fSMike Welles<P> 660*0ef31e1fSMike WellesThe directory <B>contrib/dosdjgpp</B> 661*0ef31e1fSMike Wellescontains the files necessary to build the library and tools 662*0ef31e1fSMike Welleswith the DJGPP v2 compiler under MSDOS. 663*0ef31e1fSMike Welles 664*0ef31e1fSMike Welles<P> 665*0ef31e1fSMike WellesAll you have to do is copy the files in the directory 666*0ef31e1fSMike Wellesinto the respective directories and run 667*0ef31e1fSMike Wellesmake. If you want, you can use the <B>conf.bat</B> script 668*0ef31e1fSMike Wellesto do that for you, make sure that 669*0ef31e1fSMike Wellesthe file is stored with MSDOS text EOL-convention (CR/LF), otherwise the 670*0ef31e1fSMike Welles<B>command.com</B> will not do anything. 671*0ef31e1fSMike Welles 672*0ef31e1fSMike Welles<P> 673*0ef31e1fSMike WellesNote that you probably will not be able to build the library with the v1.x 674*0ef31e1fSMike Wellesversions of djgpp, due to two problems. First, the top makefile calls a 675*0ef31e1fSMike Wellessub-make for each directory and you are likely to run out of memory, since 676*0ef31e1fSMike Welleseach recursive invocation of a djgpp v1.x program requires about 130k, to 677*0ef31e1fSMike Wellesavoid that, you can enter the directories manually and call make (well, there 678*0ef31e1fSMike Wellesare only two dirs). The 2nd problem is that djgpp 1.x doesn't call the 679*0ef31e1fSMike Wellescoff2exe (stubify) program when creating an executable. This means that all 680*0ef31e1fSMike Wellesprograms compiled are not converted to exe and consequently are not available 681*0ef31e1fSMike Wellesfor calling directly. For the tools directory, you can just call coff2exe for 682*0ef31e1fSMike Welleseach program after make finishes, but in the libtiff directory, a few programs 683*0ef31e1fSMike Wellesare created during the make process that have to be called for make to 684*0ef31e1fSMike Wellescontinue (e.g. mkg3states). Make will probably report an error at each 685*0ef31e1fSMike Wellessuch stage. To fix that, either add a coff2exe call before each program is 686*0ef31e1fSMike Wellescalled or call coff2exe manually and rerun make (there 2-3 such programs). 687*0ef31e1fSMike Welles 688*0ef31e1fSMike Welles 689*0ef31e1fSMike Welles<A NAME=MacMPW><P><HR><H2>Building the Software on a Macintosh with MPW</H2></A> 690*0ef31e1fSMike Welles 691*0ef31e1fSMike WellesThe directory <B>contrib/mac-mpw</B> contains support for 692*0ef31e1fSMike Wellescompiling the library and tools under the MPW Shell on a 693*0ef31e1fSMike WellesMacintosh system. 694*0ef31e1fSMike WellesThis support was contributed by Niles Ritter 695*0ef31e1fSMike Welles(<A HREF=mailto:[email protected]>[email protected]</A>). 696*0ef31e1fSMike Welles 697*0ef31e1fSMike Welles<P> 698*0ef31e1fSMike Welles[<I>From the file <B>contrib/mac-mpw/README</B>.</I>] 699*0ef31e1fSMike Welles 700*0ef31e1fSMike Welles<P> 701*0ef31e1fSMike WellesThis directory contains all of the utilities and makefile source 702*0ef31e1fSMike Wellesto build the LIBTIFF library and tools from the MPW Shell. The 703*0ef31e1fSMike Wellesfile BUILD.mpw in this directory is an executable script 704*0ef31e1fSMike Welleswhich uses all of these files to create the MPW makefiles and 705*0ef31e1fSMike Wellesrun them. 706*0ef31e1fSMike Welles 707*0ef31e1fSMike Welles<P> 708*0ef31e1fSMike WellesThe <file>.make files are not MPW makefiles as such, 709*0ef31e1fSMike Wellesbut are when run through the "mactrans" program, which turns 710*0ef31e1fSMike Wellesthe ascii "%nn" metacharacters into the standard weird MPW 711*0ef31e1fSMike Wellesmake characters. 712*0ef31e1fSMike Welles 713*0ef31e1fSMike Welles<P> 714*0ef31e1fSMike WellesThis translation trick is necessary to protect the files when 715*0ef31e1fSMike Wellesthey are put into unix tarfiles, which tend to mangle the 716*0ef31e1fSMike Wellesspecial characters. 717*0ef31e1fSMike Welles 718*0ef31e1fSMike Welles 719*0ef31e1fSMike Welles 720*0ef31e1fSMike Welles<A NAME=MacCW><P><HR><H2>Building the Software on a Macintosh with CodeWarrior</H2></A> 721*0ef31e1fSMike Welles 722*0ef31e1fSMike WellesThe directory <B>contrib/mac-cw</B> contains support for 723*0ef31e1fSMike Wellescompiling the library and tools with MetroWerks CodeWarrior 6.1 724*0ef31e1fSMike Welleson a Macintosh system. 725*0ef31e1fSMike WellesThis support was contributed by Niles Ritter 726*0ef31e1fSMike Welles(<A HREF=mailto:[email protected]>[email protected]</A>). 727*0ef31e1fSMike Welles 728*0ef31e1fSMike Welles<P> 729*0ef31e1fSMike Welles[<I>From the file <B>contrib/mac-cw/README</B>.</I>] 730*0ef31e1fSMike Welles 731*0ef31e1fSMike WellesIn this directory you will find a Makefile.script Applescript 732*0ef31e1fSMike Wellesfile, which should be run in order to build the libtiff code 733*0ef31e1fSMike Wellesusing MetroWerks CodeWarrior. 734*0ef31e1fSMike Welles 735*0ef31e1fSMike WellesRefer to the "metrowerks.note" instructions on building the 736*0ef31e1fSMike Welleslibrary for 68k and PowerPC native code, as well as building 737*0ef31e1fSMike Wellessome of the libtiff tools, which are rather unix-like, but 738*0ef31e1fSMike Wellesat least give an example of how to link everything together. 739*0ef31e1fSMike Welles 740*0ef31e1fSMike Welles 741*0ef31e1fSMike Welles 742*0ef31e1fSMike Welles<A NAME=VMS><P><HR><H2>Building the Software on a VMS System</H2></A> 743*0ef31e1fSMike Welles 744*0ef31e1fSMike WellesThe VMS port was done by Karsten Spang 745*0ef31e1fSMike Welles(<A HREF="mailto:[email protected]">[email protected]</a>), who also 746*0ef31e1fSMike Welles"sort of" maintains it. 747*0ef31e1fSMike WellesThe VMS specific files are not in the main directories. Instead they 748*0ef31e1fSMike Wellesare placed under <TT>[.CONTRIB.VMS...]</TT> in the distribution tree. 749*0ef31e1fSMike Welles 750*0ef31e1fSMike WellesInstallation: 751*0ef31e1fSMike Welles 752*0ef31e1fSMike WellesIt is assumed that you have unpacked the tar file into a VMS directory 753*0ef31e1fSMike Wellestree, in this text called DISK:[TIFF]. 754*0ef31e1fSMike Welles 755*0ef31e1fSMike Welles<OL> 756*0ef31e1fSMike Welles<LI>Move the VMS specific files to their proper directories. 757*0ef31e1fSMike Welles<PRE> 758*0ef31e1fSMike Welles$ SET DEFAULT DISK:[TIFF.CONTRIB.VMS] 759*0ef31e1fSMike Welles$ RENAME [.LIBTIFF]*.* [-.-.LIBTIFF] 760*0ef31e1fSMike Welles$ RENAME [.TOOLS]*.* [-.-.TOOLS] 761*0ef31e1fSMike Welles</PRE> 762*0ef31e1fSMike Welles<LI>Compile the library. 763*0ef31e1fSMike Welles<PRE> 764*0ef31e1fSMike Welles$ SET DEFAULT DISK:[TIFF.LIBTIFF] 765*0ef31e1fSMike Welles$ @MAKEVMS 766*0ef31e1fSMike Welles</PRE> 767*0ef31e1fSMike Welles<LI>Compile the tools. 768*0ef31e1fSMike Welles<PRE> 769*0ef31e1fSMike Welles$ SET DEFAULT DISK:[TIFF.TOOLS] 770*0ef31e1fSMike Welles$ @MAKEVMS 771*0ef31e1fSMike Welles</PRE> 772*0ef31e1fSMike Welles<LI>Define the programs. 773*0ef31e1fSMike Welles<PRE> 774*0ef31e1fSMike Welles$ DEFINE TIFFSHR DISK:[TIFF.LIBTIFF]TIFFSHR 775*0ef31e1fSMike Welles$ FAX2PS :==$DISK:[TIFF.TOOLS]FAX2PS 776*0ef31e1fSMike Welles$ FAX2TIFF :==$DISK:[TIFF.TOOLS]FAX2TIFF 777*0ef31e1fSMike Welles$ GIF2TIFF :==$DISK:[TIFF.TOOLS]GIF2TIFF 778*0ef31e1fSMike Welles$ PAL2RGB :==$DISK:[TIFF.TOOLS]PAL2RGB 779*0ef31e1fSMike Welles$ PPM2TIFF :==$DISK:[TIFF.TOOLS]PPM2TIFF 780*0ef31e1fSMike Welles$ RAS2TIFF :==$DISK:[TIFF.TOOLS]RAS2TIFF 781*0ef31e1fSMike Welles$ RGB2YCBCR :==$DISK:[TIFF.TOOLS]RGB2YCBCR 782*0ef31e1fSMike Welles$ THUMBNAIL :==$DISK:[TIFF.TOOLS]THUMBNAIL 783*0ef31e1fSMike Welles$ TIFF2BW :==$DISK:[TIFF.TOOLS]TIFF2BW 784*0ef31e1fSMike Welles$ TIFF2PS :==$DISK:[TIFF.TOOLS]TIFF2PS 785*0ef31e1fSMike Welles$ TIFFCMP :==$DISK:[TIFF.TOOLS]TIFFCMP 786*0ef31e1fSMike Welles$ TIFFCP :==$DISK:[TIFF.TOOLS]TIFFCP 787*0ef31e1fSMike Welles$ TIFFDITHER:==$DISK:[TIFF.TOOLS]TIFFDITHER 788*0ef31e1fSMike Welles$ TIFFDUMP :==$DISK:[TIFF.TOOLS]TIFFDUMP 789*0ef31e1fSMike Welles$ TIFFINFO :==$DISK:[TIFF.TOOLS]TIFFINFO 790*0ef31e1fSMike Welles$ TIFFMEDIAN:==$DISK:[TIFF.TOOLS]TIFFMEDIAN 791*0ef31e1fSMike Welles$ TIFFSPLIT :==$DISK:[TIFF.TOOLS]TIFFSPLIT 792*0ef31e1fSMike Welles$ YCBCR :==$DISK:[TIFF.TOOLS]YCBCR 793*0ef31e1fSMike Welles</PRE> 794*0ef31e1fSMike Welles</OL> 795*0ef31e1fSMike Welles 796*0ef31e1fSMike WellesYou will want to add these lines to your <TT>LOGIN.COM</TT> 797*0ef31e1fSMike Wellesfile, after changing 798*0ef31e1fSMike Wellesthe name of the directory that you have used on your machine. 799*0ef31e1fSMike Welles 800*0ef31e1fSMike Welles<P> 801*0ef31e1fSMike WellesThis release has been tested on OpenVMS/VAX 5.5-2, using VAX C 3.2. 802*0ef31e1fSMike WellesA previous release was tested under OpenVMS/AXP ?.? using DEC C ?.?, it is 803*0ef31e1fSMike Wellesbelieved that this release as well works on AXP. 804*0ef31e1fSMike WellesThe code contains some GNU C specific things. This does *not* imply, 805*0ef31e1fSMike Welleshowever, that the VAX/GCC configuration has been tested, *it has not*. 806*0ef31e1fSMike Welles 807*0ef31e1fSMike Welles<P> 808*0ef31e1fSMike WellesThe command procedures (<TT>MAKEVMS.COM</TT>) for building the 809*0ef31e1fSMike Welleslibrary and tools, 810*0ef31e1fSMike Wellesis believed to choose the correct options for the VAX and AXP cases 811*0ef31e1fSMike Wellesautomatically. 812*0ef31e1fSMike Welles 813*0ef31e1fSMike Welles<P> 814*0ef31e1fSMike WellesOn the AXP, IEEE floating point is used by default. If you want VAX 815*0ef31e1fSMike Wellesfloating point, remove the <TT>/FLOAT=IEEE_FLOAT</TT> qualifier, and change 816*0ef31e1fSMike Welles<TT>HAVE_IEEEFP=1</TT> to <TT>HAVE_IEEEFP=0</TT> in the <TT>MAKEVMS.COM</TT> 817*0ef31e1fSMike Wellesfiles in both the <B>libtiff</B> and <B>tools</B> directories. 818*0ef31e1fSMike Welles 819*0ef31e1fSMike Welles 820*0ef31e1fSMike Welles<H3>Compiling your own program on a VMS system:</H3> 821*0ef31e1fSMike Welles 822*0ef31e1fSMike WellesWhen compiling a source file in which you 823*0ef31e1fSMike Welles<TT>"#include <tiffio.h>"</TT>, use the 824*0ef31e1fSMike Wellesfollowing command 825*0ef31e1fSMike Welles<PRE> 826*0ef31e1fSMike Welles $ CC/INCLUDE=DISK:[TIFF.LIBTIFF] 827*0ef31e1fSMike Welles</PRE> 828*0ef31e1fSMike WellesThis ensures that the header file is found. 829*0ef31e1fSMike WellesOn the AXP, also add <TT>/FLOAT=IEEE_FLOAT</TT> 830*0ef31e1fSMike Welles(if used when building the library). 831*0ef31e1fSMike Welles 832*0ef31e1fSMike Welles 833*0ef31e1fSMike Welles<H3>Linking your own program to the TIFF library on a VMS system:</H3> 834*0ef31e1fSMike Welles 835*0ef31e1fSMike WellesYou can link to the library in two ways: Either using the shareable 836*0ef31e1fSMike Welleslibrary, or using the object library. 837*0ef31e1fSMike WellesOn the VAX these possibilities are: 838*0ef31e1fSMike Welles 839*0ef31e1fSMike Welles<OL> 840*0ef31e1fSMike Welles<LI>Using the shareable TIFF library. 841*0ef31e1fSMike Welles<PRE> 842*0ef31e1fSMike Welles$ LINK MY_PROGRAM,DISK:[TIFF.LIBTIFF]TIFF/OPTIONS,SYS$INPUT:/OPTIONS 843*0ef31e1fSMike Welles SYS$SHARE:VAXCRTL/SHAREABLE 844*0ef31e1fSMike Welles</PRE> 845*0ef31e1fSMike Welles<LI>Using the TIFF object library. 846*0ef31e1fSMike Welles<PRE> 847*0ef31e1fSMike Welles$ LINK MY_PROGRAM, - 848*0ef31e1fSMike Welles DISK:[TIFF.LIBTIFF]TIFF/LIBRARY/INCLUDE=(TIF_FAX3SM,TIF_CODEC), - 849*0ef31e1fSMike Welles SYS$INPUT:/OPTIONS 850*0ef31e1fSMike Welles SYS$SHARE:VAXCRTL/SHAREABLE 851*0ef31e1fSMike Welles</PRE> 852*0ef31e1fSMike Welles</OL> 853*0ef31e1fSMike Welles 854*0ef31e1fSMike WellesOn AXP (and possibly also using DEC C on VAX) the corresponding commands are 855*0ef31e1fSMike Welles<OL> 856*0ef31e1fSMike Welles<LI>Using the shareable TIFF library. 857*0ef31e1fSMike Welles<PRE> 858*0ef31e1fSMike Welles$ LINK MY_PROGRAM,DISK:[TIFF.LIBTIFF]TIFF/OPTIONS 859*0ef31e1fSMike Welles</PRE> 860*0ef31e1fSMike Welles<LI>Using the TIFF object library. 861*0ef31e1fSMike Welles<PRE> 862*0ef31e1fSMike Welles$ LINK MY_PROGRAM,DISK:[TIFF.LIBTIFF]TIFF/LIBRARY 863*0ef31e1fSMike Welles</PRE> 864*0ef31e1fSMike Welles</OL> 865*0ef31e1fSMike Welles 866*0ef31e1fSMike WellesMethod 1 uses the shortest link time and smallest <TT>.EXE</TT> 867*0ef31e1fSMike Wellesfiles, but it 868*0ef31e1fSMike Wellesrequires that <TT>TIFFSHR</TT> is defined as above at link time and 869*0ef31e1fSMike Welles<STRONG>at run time</STRONG>. 870*0ef31e1fSMike WellesUsing the compilation procedure above, the tools are linked in this way. 871*0ef31e1fSMike Welles 872*0ef31e1fSMike Welles<P> 873*0ef31e1fSMike WellesMethod 2 gives somewhat longer link time and larger <TT>.EXE</TT> 874*0ef31e1fSMike Wellesfiles, but does 875*0ef31e1fSMike Wellesnot require <TT>TIFFSHR</TT> to be defined. This method is recommended if you 876*0ef31e1fSMike Welleswant to run your program on another machine, and for some reason don't 877*0ef31e1fSMike Welleswant to have the library on that machine. If you plan to have more than 878*0ef31e1fSMike Wellesone program (including the tools) on the machine, it is recommended that 879*0ef31e1fSMike Wellesyou copy the library to the other machine and use method 1. 880*0ef31e1fSMike Welles 881*0ef31e1fSMike Welles 882*0ef31e1fSMike Welles 883*0ef31e1fSMike Welles<A NAME=Acorn><P><HR><H2>Building the Software on an Acorn RISC OS system</H2></A> 884*0ef31e1fSMike Welles 885*0ef31e1fSMike WellesThe directory <B>contrib/acorn</B> contains support for compiling the library 886*0ef31e1fSMike Wellesunder Acorn C/C++ under Acorn's RISC OS 3.10 or above. Subsequent pathnames 887*0ef31e1fSMike Welleswill use the Acorn format: The full-stop or period character is a pathname 888*0ef31e1fSMike Wellesdelimeter, and the slash character is not interpreted; the reverse position 889*0ef31e1fSMike Wellesfrom Unix. Thus "libtiff/tif_acorn.c" becomes "libtiff.tif_acorn/c". 890*0ef31e1fSMike Welles 891*0ef31e1fSMike Welles<P> 892*0ef31e1fSMike WellesThis support was contributed by Peter Greenham. (<A HREF=mailto:[email protected]>[email protected]</A>). 893*0ef31e1fSMike Welles 894*0ef31e1fSMike Welles<P> 895*0ef31e1fSMike Welles<H3>Installing LibTIFF:</H3> 896*0ef31e1fSMike Welles 897*0ef31e1fSMike Welles<P> 898*0ef31e1fSMike WellesLIBTIFF uses several files which have names longer than the normal RISC OS 899*0ef31e1fSMike Wellesmaximum of ten characters. This complicates matters. Maybe one day Acorn will 900*0ef31e1fSMike Wellesaddress the problem and implement long filenames properly. Until then this 901*0ef31e1fSMike Wellesgets messy, especially as I'm trying to do this with obeyfiles and not have 902*0ef31e1fSMike Wellesto include binaries in this distribution. 903*0ef31e1fSMike Welles 904*0ef31e1fSMike Welles<P> 905*0ef31e1fSMike WellesFirst of all, ensure you have Truncate configured on (type <TT>*Configure 906*0ef31e1fSMike WellesTruncate On</TT>) 907*0ef31e1fSMike Welles 908*0ef31e1fSMike Welles<P> 909*0ef31e1fSMike WellesAlthough it is, of course, preferable to have long filenames, LIBTIFF can be 910*0ef31e1fSMike Wellesinstalled with short filenames, and it will compile and link without 911*0ef31e1fSMike Wellesproblems. However, <I>getting</I> it there is more problematic. 912*0ef31e1fSMike Welles<B>contrib.acorn.install</B> is an installation obeyfile which will create a normal 913*0ef31e1fSMike WellesAcorn-style library from the source (ie: with c, h and o folders etc.), but 914*0ef31e1fSMike Wellesneeds the distribution library to have been unpacked into a location which is 915*0ef31e1fSMike Wellescapable of supporting long filenames, even if only temporarily. 916*0ef31e1fSMike Welles 917*0ef31e1fSMike Welles<P> 918*0ef31e1fSMike WellesMy recommendation, until Acorn address this problem properly, is to use Jason 919*0ef31e1fSMike WellesTribbeck's <A 920*0ef31e1fSMike WellesHREF=ftp://ftp.demon.co.uk/pub/mirrors/hensa/micros/arch/riscos/c/c020/longfiles.arc>LongFilenames</A>, or any other 921*0ef31e1fSMike Wellesworking system that gives you long filenames, like a nearby NFS server for 922*0ef31e1fSMike Wellesinstance. 923*0ef31e1fSMike Welles 924*0ef31e1fSMike Welles<P> 925*0ef31e1fSMike WellesIf you are using Longfilenames, even if only temporarily to install LIBTIFF, 926*0ef31e1fSMike Wellesunpack the TAR into a RAMDisc which has been longfilenamed (ie: <TT>*addlongfs 927*0ef31e1fSMike Wellesram</TT>) and then install from there to the hard disk. Unfortunately 928*0ef31e1fSMike WellesLongfilenames seems a bit unhappy about copying a bunch of long-named files 929*0ef31e1fSMike Wellesacross the same filing system, but is happy going between systems. You'll 930*0ef31e1fSMike Wellesneed to create a ramdisk of about 2Mb. 931*0ef31e1fSMike Welles 932*0ef31e1fSMike Welles<P> 933*0ef31e1fSMike WellesNow you can run the installation script I've supplied (in contrib.acorn), 934*0ef31e1fSMike Welleswhich will automate the process of installing LIBTIFF as an Acorn-style 935*0ef31e1fSMike Welleslibrary. The syntax is as follows: 936*0ef31e1fSMike Welles 937*0ef31e1fSMike Welles<P><TT> 938*0ef31e1fSMike Wellesinstall <source_dir> <dest_dir> 939*0ef31e1fSMike Welles 940*0ef31e1fSMike Welles</TT><P> 941*0ef31e1fSMike WellesInstall will then create <dest_dir> and put the library in there. For 942*0ef31e1fSMike Wellesexample, having used LongFilenames on the RAMDisk and unpacked the library 943*0ef31e1fSMike Wellesinto there, you can then type: 944*0ef31e1fSMike Welles 945*0ef31e1fSMike Welles<P><TT> 946*0ef31e1fSMike WellesObey RAM::RamDisc0.$.contrib.acorn.install RAM::RamDisc0.$ ADFS::4.$.LIBTIFF 947*0ef31e1fSMike Welles</TT><P> 948*0ef31e1fSMike Welles 949*0ef31e1fSMike WellesIt doesn't matter if the destination location can cope with long filenames or 950*0ef31e1fSMike Wellesnot. The filenames will be truncated if necessary (*Configure Truncate On if 951*0ef31e1fSMike Wellesyou get errors) and all will be well. 952*0ef31e1fSMike Welles 953*0ef31e1fSMike Welles<P> 954*0ef31e1fSMike Welles<H3>Compiling LibTIFF:</H3> 955*0ef31e1fSMike Welles 956*0ef31e1fSMike Welles<P> 957*0ef31e1fSMike WellesOnce the LibTIFF folder has been created and the files put inside, making the 958*0ef31e1fSMike Welleslibrary should be just a matter of running '<B>SetVars</B>' to set the 959*0ef31e1fSMike Wellesappropriate system variables, then running '<B>Makefile</B>'. 960*0ef31e1fSMike Welles 961*0ef31e1fSMike Welles<P> 962*0ef31e1fSMike Welles<B>OSLib</B> 963*0ef31e1fSMike Welles 964*0ef31e1fSMike Welles<P> 965*0ef31e1fSMike Welles<A HREF=ftp://ftp.acorn.co.uk/pub/riscos/releases/oslib/oslib.arc>OSLib</A> 966*0ef31e1fSMike Wellesis a comprehensive API for RISC OS machines, written by Jonathan Coxhead of 967*0ef31e1fSMike WellesAcorn Computers (although OSLib is not an official Acorn product). Using the 968*0ef31e1fSMike WellesOSLib SWI veneers produces code which is more compact and more efficient than 969*0ef31e1fSMike Wellescode written using _kernel_swi or _swi. The Acorn port of LibTIFF can take 970*0ef31e1fSMike Wellesadvantage of this if present. Edit the Makefile and go to the Static 971*0ef31e1fSMike Wellesdependencies section. The first entry is: 972*0ef31e1fSMike Welles 973*0ef31e1fSMike Welles<PRE> 974*0ef31e1fSMike Welles# Static dependencies: 975*0ef31e1fSMike Welles@.o.tif_acorn: @.c.tif_acorn 976*0ef31e1fSMike Welles cc $(ccflags) -o @.o.tif_acorn @.c.tif_acorn 977*0ef31e1fSMike Welles</PRE> 978*0ef31e1fSMike Welles<P> 979*0ef31e1fSMike WellesChange the cc line to: 980*0ef31e1fSMike Welles<PRE> 981*0ef31e1fSMike Welles cc $(ccflags) -DINCLUDE_OSLIB -o @.o.tif_acorn @.c.tif_acorn 982*0ef31e1fSMike Welles</PRE> 983*0ef31e1fSMike Welles<P> 984*0ef31e1fSMike WellesRemember, however, that OSLib is only <I>recommended</I> for efficiency's 985*0ef31e1fSMike Wellessake. It is not required. 986*0ef31e1fSMike Welles 987*0ef31e1fSMike Welles 988*0ef31e1fSMike Welles 989*0ef31e1fSMike Welles<A NAME=Other><P><HR><H2>Building the Software on Other Systems</H2></A> 990*0ef31e1fSMike Welles 991*0ef31e1fSMike WellesThis section contains information that might be useful 992*0ef31e1fSMike Wellesif you are working on a non-UNIX system that is not directly supported. 993*0ef31e1fSMike WellesAll library-related files described below are located in the <B>libtiff</B> 994*0ef31e1fSMike Wellesdirectory. 995*0ef31e1fSMike Welles 996*0ef31e1fSMike Welles<P> 997*0ef31e1fSMike WellesThe library requires two files that are generated <I>on-the-fly</I>. 998*0ef31e1fSMike WellesThe file <B>tif_fax3sm.c</B> has the state tables for the 999*0ef31e1fSMike WellesGroup 3 and Group 4 decoders. 1000*0ef31e1fSMike WellesThis file is generated by the <TT>mkg3states</TT> program 1001*0ef31e1fSMike Welleson a UNIX system; for example, 1002*0ef31e1fSMike Welles 1003*0ef31e1fSMike Welles<UL><PRE><TT> 1004*0ef31e1fSMike Wellescd libtiff 1005*0ef31e1fSMike Wellescc -o mkg3states mkg3states.c 1006*0ef31e1fSMike Wellesrm -f tif_fax3sm.c 1007*0ef31e1fSMike Welles./mkg3states -c const tif_fax3sm.c 1008*0ef31e1fSMike Welles</TT></PRE></UL> 1009*0ef31e1fSMike Welles 1010*0ef31e1fSMike WellesThe <TT>-c</TT> option can be used to control whether or not the 1011*0ef31e1fSMike Wellesresutling tables are generated with a <TT>const</TT> declaration. 1012*0ef31e1fSMike WellesThe <TT>-s</TT> option can be used to specify a C storage class 1013*0ef31e1fSMike Wellesfor the table declarations. 1014*0ef31e1fSMike WellesThe <TT>-b</TT> option can be used to force data values to be 1015*0ef31e1fSMike Wellesexplicitly bracketed with ``{}'' (apparently needed for some 1016*0ef31e1fSMike WellesMS-Windows compilers); otherwise the structures are emitted in 1017*0ef31e1fSMike Wellesas compact a format as possible. 1018*0ef31e1fSMike WellesConsult the source code for this program if you have questions. 1019*0ef31e1fSMike Welles 1020*0ef31e1fSMike Welles<P> 1021*0ef31e1fSMike WellesThe second file required to build the library, <B>version.h</B>, 1022*0ef31e1fSMike Wellescontains the version 1023*0ef31e1fSMike Wellesinformation returned by the <TT>TIFFGetVersion</TT> routine. 1024*0ef31e1fSMike WellesThis file is built on most systems using the 1025*0ef31e1fSMike Welles<TT>mkversion</TT> program and the contents of the 1026*0ef31e1fSMike Welles<TT>VERSION</TT> and <TT>tiff.alpha</TT> files; for example, 1027*0ef31e1fSMike Welles 1028*0ef31e1fSMike Welles<UL><PRE> 1029*0ef31e1fSMike Wellescd libtiff 1030*0ef31e1fSMike Wellescc -o mkversion mkversion.c 1031*0ef31e1fSMike Wellesrm -f version.h 1032*0ef31e1fSMike Welles./mkversion -v ../VERSION -a ../dist/tiff.alpha version.h 1033*0ef31e1fSMike Welles</PRE></UL> 1034*0ef31e1fSMike Welles 1035*0ef31e1fSMike Welles<P> 1036*0ef31e1fSMike WellesOtherwise, when building the library on a non-UNIX system be sure to 1037*0ef31e1fSMike Wellesconsult the files <B>tiffcomp.h</B> and <B>tiffconf.h</B>. 1038*0ef31e1fSMike WellesThe former contains system compatibility definitions while the latter 1039*0ef31e1fSMike Wellesis provided so that the software configuration can be controlled 1040*0ef31e1fSMike Welleson systems that do not support the make facility for building 1041*0ef31e1fSMike Wellesthe software. 1042*0ef31e1fSMike Welles 1043*0ef31e1fSMike Welles<P> 1044*0ef31e1fSMike WellesSystems without a 32-bit compiler may not be able to handle some 1045*0ef31e1fSMike Wellesof the codecs in the library; especially the Group 3 and 4 decoder. 1046*0ef31e1fSMike WellesIf you encounter problems try disabling support for a particular 1047*0ef31e1fSMike Wellescodec; consult the <A HREF=internals.html#Config>documentation</A>. 1048*0ef31e1fSMike Welles 1049*0ef31e1fSMike Welles<P> 1050*0ef31e1fSMike WellesPrograms in the tools directory are written to assume an ANSI C 1051*0ef31e1fSMike Wellescompilation environment. 1052*0ef31e1fSMike WellesThere may be a few POSIX'isms as well. 1053*0ef31e1fSMike WellesThe code in the <B>port</B> directory is provided to emulate routines 1054*0ef31e1fSMike Wellesthat may be missing on some systems. 1055*0ef31e1fSMike WellesOn UNIX systems the <TT>configure</TT> script automatically figures 1056*0ef31e1fSMike Wellesout which routines are not present on a system and enables the use 1057*0ef31e1fSMike Wellesof the equivalent emulation routines from the <B>port</B> directory. 1058*0ef31e1fSMike WellesIt may be necessary to manually do this work on a non-UNIX system. 1059*0ef31e1fSMike Welles 1060*0ef31e1fSMike Welles 1061*0ef31e1fSMike Welles<A NAME=Testing><P><HR><H2>Checking out the Software</H2></A> 1062*0ef31e1fSMike Welles 1063*0ef31e1fSMike Welles<P> 1064*0ef31e1fSMike WellesAssuming you have working versions of <TT>tiffgt</TT> and <TT>tiffsv</TT>, 1065*0ef31e1fSMike Wellesyou can just 1066*0ef31e1fSMike Wellesuse them to view any of the sample images available for testing 1067*0ef31e1fSMike Welles(see the <A HREF=images.html>section on obtaining the test images</A>). 1068*0ef31e1fSMike WellesOtherwise, you can do a cursory check of the library with 1069*0ef31e1fSMike Wellesthe <TT>tiffcp</TT> and <TT>tiffcmp</TT> programs. For example, 1070*0ef31e1fSMike Welles 1071*0ef31e1fSMike Welles<UL><PRE> 1072*0ef31e1fSMike Wellestiffcp -lzw cramps.tif x.tif 1073*0ef31e1fSMike Wellestiffcmp cramps.tif x.tif 1074*0ef31e1fSMike Welles</PRE></UL> 1075*0ef31e1fSMike Welles 1076*0ef31e1fSMike Welles<P> 1077*0ef31e1fSMike Welles(<TT>tiffcmp</TT> should be silent if the files compare correctly). 1078*0ef31e1fSMike Welles 1079*0ef31e1fSMike Welles 1080*0ef31e1fSMike Welles 1081*0ef31e1fSMike Welles<A NAME=TOC><P><HR><H2>Table of Contents</H2></A> 1082*0ef31e1fSMike Welles 1083*0ef31e1fSMike WellesThe following files makup the core library: 1084*0ef31e1fSMike Welles 1085*0ef31e1fSMike Welles<PRE> 1086*0ef31e1fSMike Welleslibtiff/tiff.h TIFF spec definitions 1087*0ef31e1fSMike Welleslibtiff/tiffcomp.h non-UNIX OS-compatibility definitions 1088*0ef31e1fSMike Welleslibtiff/tiffconf.h non-UNIX configuration definitions 1089*0ef31e1fSMike Welleslibtiff/tiffio.h public TIFF library definitions 1090*0ef31e1fSMike Welleslibtiff/tiffiop.h private TIFF library definitions 1091*0ef31e1fSMike Welleslibtiff/t4.h CCITT Group 3/4 code tables+definitions 1092*0ef31e1fSMike Welleslibtiff/tif_dir.h private defs for TIFF directory handling 1093*0ef31e1fSMike Welleslibtiff/tif_fax3.h CCITT Group 3/4-related definitions 1094*0ef31e1fSMike Welleslibtiff/tif_predict.h private defs for Predictor tag support 1095*0ef31e1fSMike Welleslibtiff/uvcode.h LogL/LogLuv codec-specific definitions 1096*0ef31e1fSMike Welleslibtiff/version.h version string (generated by Makefile) 1097*0ef31e1fSMike Welles 1098*0ef31e1fSMike Welleslibtiff/tif_acorn.c Acorn-related OS support 1099*0ef31e1fSMike Welleslibtiff/tif_apple.c Apple-related OS support 1100*0ef31e1fSMike Welleslibtiff/tif_atari.c Atari-related OS support 1101*0ef31e1fSMike Welleslibtiff/tif_aux.c auxilary directory-related functions 1102*0ef31e1fSMike Welleslibtiff/tif_close.c close an open TIFF file 1103*0ef31e1fSMike Welleslibtiff/tif_codec.c configuration table of builtin codecs 1104*0ef31e1fSMike Welleslibtiff/tif_compress.c compression scheme support 1105*0ef31e1fSMike Welleslibtiff/tif_dir.c directory tag interface code 1106*0ef31e1fSMike Welleslibtiff/tif_dirinfo.c directory known tag support code 1107*0ef31e1fSMike Welleslibtiff/tif_dirread.c directory reading code 1108*0ef31e1fSMike Welleslibtiff/tif_dirwrite.c directory writing code 1109*0ef31e1fSMike Welleslibtiff/tif_dumpmode.c "no" compression codec 1110*0ef31e1fSMike Welleslibtiff/tif_error.c library error handler 1111*0ef31e1fSMike Welleslibtiff/tif_fax3.c CCITT Group 3 and 4 codec 1112*0ef31e1fSMike Welleslibtiff/tif_fax3sm.c G3/G4 state tables (generated by mkg3states) 1113*0ef31e1fSMike Welleslibtiff/tif_flush.c i/o and directory state flushing 1114*0ef31e1fSMike Welleslibtiff/tif_getimage.c TIFFRGBAImage support 1115*0ef31e1fSMike Welleslibtiff/tif_jpeg.c JPEG codec (interface to the IJG distribution) 1116*0ef31e1fSMike Welleslibtiff/tif_luv.c SGI LogL/LogLuv codec 1117*0ef31e1fSMike Welleslibtiff/tif_lzw.c LZW codec 1118*0ef31e1fSMike Welleslibtiff/tif_msdos.c MSDOS-related OS support 1119*0ef31e1fSMike Welleslibtiff/tif_next.c NeXT 2-bit scheme codec (decoding only) 1120*0ef31e1fSMike Welleslibtiff/tif_open.c open and simply query code 1121*0ef31e1fSMike Welleslibtiff/tif_packbits.c Packbits codec 1122*0ef31e1fSMike Welleslibtiff/tif_pixarlog.c Pixar codec 1123*0ef31e1fSMike Welleslibtiff/tif_predict.c Predictor tag support 1124*0ef31e1fSMike Welleslibtiff/tif_print.c directory printing support 1125*0ef31e1fSMike Welleslibtiff/tif_read.c image data reading support 1126*0ef31e1fSMike Welleslibtiff/tif_strip.c some strip-related code 1127*0ef31e1fSMike Welleslibtiff/tif_swab.c byte and bit swapping support 1128*0ef31e1fSMike Welleslibtiff/tif_thunder.c Thunderscan codec (decoding only) 1129*0ef31e1fSMike Welleslibtiff/tif_tile.c some tile-related code 1130*0ef31e1fSMike Welleslibtiff/tif_unix.c UNIX-related OS support 1131*0ef31e1fSMike Welleslibtiff/tif_version.c library version support 1132*0ef31e1fSMike Welleslibtiff/tif_vms.c VMS-related OS support 1133*0ef31e1fSMike Welleslibtiff/tif_warning.c library warning handler 1134*0ef31e1fSMike Welleslibtiff/tif_win3.c Windows-3.1-related OS support 1135*0ef31e1fSMike Welleslibtiff/tif_win32.c Windows-3.2-related OS support 1136*0ef31e1fSMike Welleslibtiff/tif_write.c image data writing support 1137*0ef31e1fSMike Welleslibtiff/tif_zip.c Deflate codec 1138*0ef31e1fSMike Welles 1139*0ef31e1fSMike Welleslibtiff/mkg3states.c program to generate G3/G4 decoder state tables 1140*0ef31e1fSMike Welleslibtiff/mkspans.c program to generate black-white span tables 1141*0ef31e1fSMike Welleslibtiff/mkversion.c program to generate libtiff/version.h. 1142*0ef31e1fSMike Welles</PRE> 1143*0ef31e1fSMike Welles 1144*0ef31e1fSMike Welles<P> 1145*0ef31e1fSMike Welles<HR> 1146*0ef31e1fSMike Welles 1147*0ef31e1fSMike Welles<ADDRESS> 1148*0ef31e1fSMike Welles<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:[email protected]">[email protected]</A>. 1149*0ef31e1fSMike WellesLast updated: $Date: 1999-07-27 21:50:27 $ 1150*0ef31e1fSMike Welles</ADDRESS> 1151*0ef31e1fSMike Welles 1152*0ef31e1fSMike Welles</BODY> 1153*0ef31e1fSMike Welles</HTML> 1154