autoconf: Installation Names

1 
1 16.4 Installation Names
1 =======================
1 
1 By default, `make install' installs the package's commands under
1 `/usr/local/bin', include files under `/usr/local/include', etc.  You
1 can specify an installation prefix other than `/usr/local' by giving
1 `configure' the option `--prefix=PREFIX', where PREFIX must be an
1 absolute file name.
1 
1    You can specify separate installation prefixes for
1 architecture-specific files and architecture-independent files.  If you
1 pass the option `--exec-prefix=PREFIX' to `configure', the package uses
1 PREFIX as the prefix for installing programs and libraries.
1 Documentation and other data files still use the regular prefix.
1 
1    In addition, if you use an unusual directory layout you can give
1 options like `--bindir=DIR' to specify different values for particular
1 kinds of files.  Run `configure --help' for a list of the directories
1 you can set and what kinds of files go in them.  In general, the
1 default for these options is expressed in terms of `${prefix}', so that
1 specifying just `--prefix' will affect all of the other directory
1 specifications that were not explicitly provided.
1 
1    The most portable way to affect installation locations is to pass the
1 correct locations to `configure'; however, many packages provide one or
1 both of the following shortcuts of passing variable assignments to the
1 `make install' command line to change installation locations without
1 having to reconfigure or recompile.
1 
1    The first method involves providing an override variable for each
1 affected directory.  For example, `make install
1 prefix=/alternate/directory' will choose an alternate location for all
1 directory configuration variables that were expressed in terms of
1 `${prefix}'.  Any directories that were specified during `configure',
1 but not in terms of `${prefix}', must each be overridden at install
1 time for the entire installation to be relocated.  The approach of
1 makefile variable overrides for each directory variable is required by
1 the GNU Coding Standards, and ideally causes no recompilation.
1 However, some platforms have known limitations with the semantics of
1 shared libraries that end up requiring recompilation when using this
1 method, particularly noticeable in packages that use GNU Libtool.
1 
1    The second method involves providing the `DESTDIR' variable.  For
1 example, `make install DESTDIR=/alternate/directory' will prepend
1 `/alternate/directory' before all installation names.  The approach of
1 `DESTDIR' overrides is not required by the GNU Coding Standards, and
1 does not work on platforms that have drive letters.  On the other hand,
1 it does better at avoiding recompilation issues, and works well even
1 when some directory options were not specified in terms of `${prefix}'
1 at `configure' time.
1