hyla% cd tiff-v3.4beta099 hyla% ./configure ...lots of messages... hyla% make ...lots of messages... hyla# make installIn general, the software is designed such that the following should be ``make-able'' in each directory:
make [all] build stuff make install build&install stuff make clean remove .o files and cruft, but not executables make clobber remove everything that can be recreated make distclean remove absolutely everything that can be recreatedNote that after running "make clobber" or "make distclean" the configure script must be run again to create the Makefiles and other make-related files.
hyla% cd tiff-v3.4beta099 hyla% ls COPYRIGHT VERSION config.sub dist man Makefile.in config.guess configure html port README config.site contrib libtiff tools hyla% ./configure
Otherwise, you can configure a build tree that is parallel to the source tree hierarchy but which contains only configured files and files created during the build procedure.
hyla% cd tiff-v3.4beta099 hyla% mkdir obj obj/mycpu hyla% cd obj/mycpu hyla% ../../configureThis second scheme is useful for:
HPUX 9.05:
The standard make incorrectly processes VPATH; either use gmake
or configure builds in the source tree.
Configuration Files
The configuration process is critical to the proper compilation,
installation, and operation of the software.
The configure script runs a series of tests to
decide whether or not the target system
supports required functionality and, if it does not, whether it
can emulate or workaround the missing functions.
This procedure is fairly complicated and, due to the nonstandard
nature of most UNIX systems, prone to error.
The first time that you configure the software for use you should
check the output from the configure script and look for anything
that does not make sense for your system.
A sample configure run is shown below together with an explanation
of some of the work that is done.
A second function of the configure script is to set the default configuration parameters for the software. Of particular note are the directories where the software is to be installed. By default the software is installed in the /usr/local hierarchy. To change this behaviour the appropriate parameters can be specified either:
Site-wide configuration files are named config.site and are automatically searched for first in any directory specified on the command line to configure (using the -site option), or if that fails, in the directory in in which the configure script is located.
Target-specific configuration files are named config.local and are looked for first in the top-level configuration directory, or, if that fails, in the directory in which the configure script is located.
Configuration files are just shell scripts that define shell variables that control the configuration process. For example, the following file might be used on a BSDI system to configure the software for installation in the /usr/contrib area and to make use of the Adobe Font Metric files that are already distributed as part of the BSDI 1.1 distribution:
# # Parameters suitable for BSDI 1.1 # DIR_BIN="/usr/contrib/bin" # directory for client apps DIR_LIB="/usr/contrib/lib" # directory for libraries DIR_MAN="/usr/contrib/man" # directory for manual pages DIR_HTML="/usr/contrib/html/tiff" # directory for HTML documentation
For a complete list of the possible configuration parameters, look
at the sample config.site file provided in the distribution
or check the section below.
Configuring Optional Packages/Support
The TIFF software comes with several packages that are installed only
as needed, or only if specifically configured at the time
the configure script is run. Packages can be configured in a
config.site or config.local file, or by using a
-with-<PACKAGE> option when invoking configure;
e.g. configure -with-AFM.
wullbrandt% mkdir tiff wullbrandt% cd tiff wullbrandt% ln -s /hosts/oxford/usr/people/sam/tiff srcA build tree separate from the source tree is used here. In fact, in this case the distribution is accessed from a read-only NFS-mounted filesystem.
wullbrandt% src/configure Configuring TIFF Software v3.4beta015. Reading site-wide parameters from ../tiff-v3.4beta015/config.site. Reading local parameters from config.local. Gosh, aren't you lucky to have a i386-unknown-bsdi1.1 system!Note that configure announces the distribution version and the deduced target configuration (i386-unknown-bsdi1.1 here).
Using /usr/local/bin/gcc for a C compiler (set CC to override). Looks like /usr/local/bin/gcc supports the -g option. Using " -g" for C compiler options.configure checked the normal shell search path for potential ANSI C compilers. The compiler is selected according to it properly compiling a small ANSI C test program. A specific compiler may be requested by setting the CC environment variable to the appropriate pathname, by supplying the parameter on the command line, e.g. -with-CC=gcc, or by setting CC in a configuration file.
Note that an ANSI C compiler is required to build the software.
If a C compiler requires options to enable ANSI C compilation, they
can be specified with the ENVOPTS parameter.
Once a compiler is selected configure does several checks to see:
Using /usr/ucb/make to configure the software.Next various system-specific libraries that may or may not be needed are checked for (none are needed in this case). If your system requires a library that is not automatically included it can be specified by setting the MACHDEPLIBS parameter.
Creating port.h. The port.h file is included by all the C code in the system. It includes definitions for functions and type definitions that are missing from system include files, #defines to enable or disable system-specific functionality, and other odds and ends.
Creating port.h with necessary definitions. ... using LSB2MSB bit order for your i386 cpu ... using big-endian byte order for your i386 cpu ... configure use of mmap for memory-mapped files ... O_RDONLY is inThis file can take a long time to create so configure generates the file only when it is needed, either because the file does not exist or because a different target or compiler is to be used. Note that running "make distclean" in the top-level directory of the build tree will remove the port.h file (along with all the other files generated by configure).... using double for promoted floating point parameters ... enabling use of inline functions Done creating port.h.
Selecting emulated library functions. Certain functions used by the software are not present on all systems and can be emulated using other system functionality. configure checks for the presence of such functions and if they are missing, will configure emulation code from the port directory to use instead. Building the TIFF software on unsupported systems may require adding to the code to the port directory.
Checking system libraries for functionality to emulate. Done checking system libraries.If a routine must be emulated and configure does not automatically check for it, the routine name can be specified using the PORTFUNCS parameter. To add emulation support for a new function foo, create a file port/foo.c that contains the emulation code and then set PORTFUNCS=foo in a configuration file or modify the configure script to automatically check for the missing function.
Checking for Dynamic Shared Object (DSO) support. Done checking for DSO support.If the DSO package is enabled (DSO=auto or DSO=yes), then configure will verify the system and compiler are capable of constructing SVR4-style DSO's in the expected way. Note that while a system may support DSO's the compiler may not be capable of generating the required position-independent code and/or the compiler may not pass the needed options through to the loader.
Selecting utility programs. configure locates various system utility programs that are used during installation of the software.
Selecting programs used during installation. Looks like mv supports the -f option to force a move. Looks like /bin/ln supports the -s option to create a symbolic link. Done selecting programs.
Selecting default configuration parameters. The remainder of the work done by configure involves setting up configuration parameters that control the placement and setup of files during the installation procedure.
Selecting default TIFF configuration parameters. Looks like manual pages go in /usr/contrib/man. Looks like manual pages should be installed with bsd-nroff-gzip-0.gz. TIFF configuration parameters are: [ 1] Directory for tools: /usr/contrib/bin [ 2] Directory for libraries: /usr/contrib/lib [ 3] Directory for include files: /usr/contrib/include [ 4] Directory for manual pages: /usr/contrib/man [ 5] Directory for HTML documentation: /var/httpd/htdocs/tiff [ 6] Manual page installation scheme: bsd-nroff-gzip-0.gz Are these ok [yes]?At this point you can interactively modify any of the displayed parameters. Hitting a carriage return or typing yes will accept the current parameters. Typing one of the number displayed along the left hand side causes configure to prompt for a new value of the specified parameter. Typing anything else causes configure to prompt for a new value for each parameter. In general hitting carriage return will accept the current value and typing anything that is unacceptable will cause a help message to be displayed. A description of each of the configuration parameters is given below.
Once acceptable parameters are setup configure will generate all the files that depend on these parameters. Note that certain files may or may not be created based on the configuration of optional packages and/or the functions supported by target system.
Creating Makefile from ../tiff-v3.4beta015/Makefile.in Creating libtiff/Makefile from ../tiff-v3.4beta015/libtiff/Makefile.in Creating man/Makefile from ../tiff-v3.4beta015/man/Makefile.in Creating tools/Makefile from ../tiff-v3.4beta015/tools/Makefile.in Creating port/install.sh from ../tiff-v3.4beta015/port/install.sh.in Done.
AROPTS | The options passed to ar when creating an archive. Note that configure will automatically check to see if ar supports an s to create a symbol table instead of using ranlib. |
DIR_BIN | The directory where client applications should be installed; by default this is /usr/local/bin. |
DIR_HTML | The directory where HTML-based documentation should be installed; by default this is /var/httpd/htdocs/tiff (usually appropriate for the NCSA HTTP server). |
DIR_LIB | The directory to install libraries and DSO's; by default this is /usr/local/lib. |
DIR_MAN | The top-most directory of the manual area where manual pages should be installed. |
DSOOPTS | When DSO's are built, the options to specify to CC to create a DSO. |
DSOSUF | When DSO's are built, the filename suffix for a DSO. If this is set to "a" then statically linked archives are used. |
ENVOPTS | Options to pass to CC to force ANSI C compilation. |
FILLORDER | The order of bits in a byte on the server machine; either LSB2MSB or MSB2LSB. This is normally selected according to the target system. |
GCOPTS | Special options to pass the C compiler. If this parameter is set, then configure may append other options to this list. |
INSTALL | The pathname of the install program to use. Note that this program must emulate the command line interface used by the IRIX install program. |
LIBPORT | The pathname of the library that holds code to emulate missing system functionality. Normally this parameter is set by configure based on whether or not emulation code is required for the target. |
LLDOPTS | Extra command line options passed to CC when linking an executable. This option is usually set only when DSO support is enabled (to force the executable to search for the TIFF DSO in non-standard locations in the filesystem.) |
MACHDEPLIBS | Target-dependent libraries that should be used when linking tools. Note that if this parameter is specified configure will append to the list of libraries. |
MANSCHEME | The scheme to use when preparing and installing manual pages.
Schemes are constructed according to:
|
PORTFUNCS | A list of non-standard functions that should be emulated. Normally this list is constructed by configure based on checks it does. If this parameter is set, configure will append to the specified list. |
SETMAKE | If make does not automatically set $MAKE to the name of the make program to invoke for subdirectories, then configure will create an explicit definition. If this parameter is set, then it will be used instead. by default bin is used. |
[From the file contrib/mac-mpw/README.]
This directory contains all of the utilities and makefile source to build the LIBTIFF library and tools from the MPW Shell. The file BUILD.mpw in this directory is an executable script which uses all of these files to create the MPW makefiles and run them.
The
This translation trick is necessary to protect the files when
they are put into unix tarfiles, which tend to mangle the
special characters.
This release has been tested on OpenVMS/VAX 5.5-2, using VAX C 3.2.
A pre-release was tested under OpenVMS/AXP ?.? using DEC C ?.?, it is
believed that the release as well works on AXP.
The code contains some GNU C specific things. This does *not* imply,
however, that the VAX/GCC configuration has been tested, *it has not*.
The command procedures (MAKEVMS.COM) for building the
library and tools,
is believed to choose the correct options for the VAX and AXP cases
automatically.
On the AXP, IEEE floating point is used by default. If you want VAX
floating point, remove the /FLOAT=IEEE_FLOAT qualifier, and change
HAVE_IEEEFP=1 to HAVE_IEEEFP=0 in the MAKEVMS.COM
files in both the libtiff and tools directories.
Method 2 gives somewhat longer link time and larger .EXE
files, but does
not require TIFFSHR to be defined. This method is recommended if you
want to run your program on another machine, and for some reason don't
want to have the library on that machine. If you plan to have more than
one program (including the tools) on the machine, it is recommended that
you copy the library to the other machine and use method 1.
On the AXP, the C runtime library is linked automatically, this
means that
The library requires two files that are generated by on-the-fly.
The file tif_fax3sm.c has the state tables for the
Group 3 and Group 4 decoders.
This file is normally generated by the mkg3states program
on a UNIX system; for example,
The second file required to build the library, version.h,
contains the version
information returned by the TIFFGetVersion routine.
This file is built on a UNIX system using commands that can be found
in the file Makefile.in.
An example copy of version.h is:
Otherwise, when building the library on a non-UNIX system be sure to
consult the files tiffcomp.h and tiffconf.h.
The former contains system compatibility definitions while the latter
is provided so that the software configuration can be controlled
on systems that do not support the make facility for building
the software.
Systems without a 32-bit compiler may not be able to handle some
of the codecs in the library; especially the Group 3 and 4 decoder.
If you encounter problems try disabling support for a particular
codec; consult the documentation.
Programs in the tools directory are written to assume an ANSI C
compilation environment.
There may be a few POSIX'isms as well.
The code in the port directory is provided to emulate routines
that may be missing on some systems.
On UNIX systems the configure script automatically figures
out which routines are not present on a system and enables the use
of the equivalent emulation routines from the port directory.
It may be necessary to manually do this work on a non-UNIX system.
Assuming you have working versions of tiffgt and tiffsv,
you can just
use them to view any of the sample images available for testing
(see the section on obtaining the test images).
Otherwise, you can do a cursory check of the library with
the tiffcp and tiffcmp programs. For example,
(tiffcmp should be silent if the files compare correctly).
Building the Software on a VMS System
The VMS port was done by Karsten Spang
(krs@kampsax.dk), who also
"sort of" maintains it.
The VMS specific files are not in the main directories. Instead they
are placed under [.CONTRIB.VMS...] in the distribution tree.
Installation:
It is assumed that you have unpacked the tar file into a VMS directory
tree, in this text called DISK:[TIFF].
You will want to add these lines to your LOGIN.COM
file, after changing
the name of the directory that you have used on your machine.
$ SET DEFAULT DISK:[TIFF.CONTRIB.VMS]
$ RENAME [.LIBTIFF]*.* [-.-.LIBTIFF]
$ RENAME [.TOOLS]*.* [-.-.TOOLS]
$ SET DEFAULT DISK:[TIFF.LIBTIFF]
$ @MAKEVMS
$ SET DEFAULT DISK:[TIFF.TOOLS]
$ @MAKEVMS
$ DEFINE TIFFSHR DISK:[TIFF.LIBTIFF]TIFFSHR
$ TIFFCP :==$DISK:[TIFF.TOOLS]TIFFCP
$ TIFFCMP :==$DISK:[TIFF.TOOLS]TIFFCMP
$ TIFFINFO :==$DISK:[TIFF.TOOLS]TIFFINFO
$ TIFFDUMP :==$DISK:[TIFF.TOOLS]TIFFDUMP
$ TIFF2PS :==$DISK:[TIFF.TOOLS]TIFF2PS
$ TIFFDITHER:==$DISK:[TIFF.TOOLS]TIFFDITHER
$ TIFF2BW :==$DISK:[TIFF.TOOLS]TIFF2BW
$ TIFFMEDIAN:==$DISK:[TIFF.TOOLS]TIFFMEDIAN
$ TIFFSPLIT :==$DISK:[TIFF.TOOLS]TIFFSPLIT
$ FAX2TIFF :==$DISK:[TIFF.TOOLS]FAX2TIFF
$ GIF2TIFF :==$DISK:[TIFF.TOOLS]GIF2TIFF
$ PAL2RGB :==$DISK:[TIFF.TOOLS]PAL2RGB
$ PPM2TIFF :==$DISK:[TIFF.TOOLS]PPM2TIFF
$ RAS2TIFF :==$DISK:[TIFF.TOOLS]RAS2TIFF
Compiling your own program on a VMS system:
When compiling a source file in which you
"#include
$ CC/INCLUDE=DISK:[TIFF.LIBTIFF]
This ensures that the header file is found.
On the AXP, also add /FLOAT=IEEE_FLOAT
(if used when building the library).
Linking your own program to the TIFF library on a VMS system:
You can link to the library in two ways: Either using the shareable
library, or using the object library.
The possibilities are:
Method 1 uses the shortest link time and smallest .EXE
files, but it
requires that TIFFSHR is defined as above at link time and
at run time.
Using the compilation procedure above, the tools are linked in this way.
$ LINK MY_PROGRAM,DISK:[TIFF.LIBTIFF]TIFF/OPTIONS,SYS$INPUT:/OPTIONS
SYS$SHARE:VAXCRTL/SHAREABLE
$ LINK MY_PROGRAM,DISK:[TIFF.LIBTIFF]TIFF/LIBRARY,SYS$INPUT:/OPTIONS
SYS$SHARE:VAXCRTL/SHAREABLE
SYS$INPUT:/OPTIONS
SYS$SHARE:VAXCRTL/SHAREABLE
should not be used.
Building the Software on Other Systems
This section contains information that might be useful
if you are working on a non-UNIX system that is not directly supported.
All library-related files described below are located in the libtiff
directory.
cd libtiff
cc -o mkg3states mkg3states.c
rm -f tif_fax3sm.c
./mkg3states -c const tif_fax3sm.c
Consult the source code for this program if you have questions.
Checking out the Software
tiffcp -lzw cramps.tif x.tif
tiffcmp cramps.tif x.tif
Table of Contents
The following files makup the core library:
libtiff/tiff.h TIFF spec definitions
libtiff/tiffcomp.h non-UNIX OS-compatibility definitions
libtiff/tiffconf.h non-UNIX configuration definitions
libtiff/tiffio.h public TIFF library definitions
libtiff/tiffiop.h private TIFF library definitions
libtiff/t4.h CCITT Group 3/4 code tables+definitions
libtiff/tif_dir.h private defs for TIFF directory handling
libtiff/tif_fax3.h CCITT Group 3/4-related definitions
libtiff/tif_predict.h private defs for Predictor tag support
libtiff/version.h version string (generated by Makefile)
libtiff/tif_apple.c Apple-related OS support
libtiff/tif_atari.c Atari-related OS support
libtiff/tif_aux.c auxilary directory-related functions
libtiff/tif_close.c close an open TIFF file
libtiff/tif_codec.c configuration table of builtin codecs
libtiff/tif_compress.c compression scheme support
libtiff/tif_dir.c directory tag interface code
libtiff/tif_dirinfo.c directory known tag support code
libtiff/tif_dirread.c directory reading code
libtiff/tif_dirwrite.c directory writing code
libtiff/tif_dumpmode.c "no" compression codec
libtiff/tif_error.c library error handler
libtiff/tif_fax3.c CCITT Group 3 and 4 codec
libtiff/tif_fax3sm.c G3/G4 state tables (generated by mkg3states)
libtiff/tif_flush.c i/o and directory state flushing
libtiff/tif_getimage.c TIFFRGBAImage support
libtiff/tif_jpeg.c JPEG codec (interface to the IJG distribution)
libtiff/tif_lzw.c LZW codec
libtiff/tif_msdos.c MSDOS-related OS support
libtiff/tif_next.c NeXT 2-bit scheme codec (decoding only)
libtiff/tif_open.c open and simply query code
libtiff/tif_packbits.c Packbits codec
libtiff/tif_predict.c Predictor tag support
libtiff/tif_print.c directory printing support
libtiff/tif_read.c image data reading support
libtiff/tif_strip.c some strip-related code
libtiff/tif_swab.c byte and bit swapping support
libtiff/tif_thunder.c Thunderscan codec (decoding only)
libtiff/tif_tile.c some tile-related code
libtiff/tif_unix.c UNIX-related OS support
libtiff/tif_version.c library version support
libtiff/tif_vms.c VMS-related OS support
libtiff/tif_warning.c library warning handler
libtiff/tif_win3.c Windows-related OS support
libtiff/tif_write.c image data writing support
libtiff/tif_zip.c Deflate codec
libtiff/mkg3states.c program to generate G3/G4 decoder state tables
libtiff/mkspans.c program to generate black-white span tables
Sam Leffler / sam@engr.sgi.com.
Last updated: $Date: 1995/07/07 02:34:32 $