|
kusano |
7d535a |
Introduction
|
|
kusano |
7d535a |
============
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
This installation guide is for POSIX (Autoconf) systems.
|
|
kusano |
7d535a |
For Win32, Win64, DOS and OS/2 please read the file B/00README.TXT.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Quick start
|
|
kusano |
7d535a |
-----------
|
|
kusano |
7d535a |
./configure
|
|
kusano |
7d535a |
make
|
|
kusano |
7d535a |
make check
|
|
kusano |
7d535a |
make test (run a full test)
|
|
kusano |
7d535a |
make install (when logged in as root)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Exotic machines
|
|
kusano |
7d535a |
---------------
|
|
kusano |
7d535a |
Instead of using Autoconf you may want to adapt the simple build
|
|
kusano |
7d535a |
script in B/generic/build.sh.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Shared libraries
|
|
kusano |
7d535a |
----------------
|
|
kusano |
7d535a |
LZO uses Libtool so that shared libraries are supported on many
|
|
kusano |
7d535a |
systems. If want to build shared libraries type you have to type
|
|
kusano |
7d535a |
`./configure --enable-shared' - building shared libraries is not
|
|
kusano |
7d535a |
enabled by default.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Assembler versions
|
|
kusano |
7d535a |
------------------
|
|
kusano |
7d535a |
On Intel i386 systems, the assembler versions of the decompressors are
|
|
kusano |
7d535a |
built and used by default. You can use `./configure --disable-asm' if
|
|
kusano |
7d535a |
for some reason they cause compilation problems on your system.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
[ The standard Autoconf installation instructions follow below. ]
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
|
|
kusano |
7d535a |
Foundation, Inc.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
This file is free documentation; the Free Software Foundation gives
|
|
kusano |
7d535a |
unlimited permission to copy, distribute and modify it.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Basic Installation
|
|
kusano |
7d535a |
==================
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
These are generic installation instructions.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
The `configure' shell script attempts to guess correct values for
|
|
kusano |
7d535a |
various system-dependent variables used during compilation. It uses
|
|
kusano |
7d535a |
those values to create a `Makefile' in each directory of the package.
|
|
kusano |
7d535a |
It may also create one or more `.h' files containing system-dependent
|
|
kusano |
7d535a |
definitions. Finally, it creates a shell script `config.status' that
|
|
kusano |
7d535a |
you can run in the future to recreate the current configuration, and a
|
|
kusano |
7d535a |
file `config.log' containing compiler output (useful mainly for
|
|
kusano |
7d535a |
debugging `configure').
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
It can also use an optional file (typically called `config.cache'
|
|
kusano |
7d535a |
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
|
kusano |
7d535a |
the results of its tests to speed up reconfiguring. (Caching is
|
|
kusano |
7d535a |
disabled by default to prevent problems with accidental use of stale
|
|
kusano |
7d535a |
cache files.)
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
If you need to do unusual things to compile the package, please try
|
|
kusano |
7d535a |
to figure out how `configure' could check whether to do them, and mail
|
|
kusano |
7d535a |
diffs or instructions to the address given in the `README' so they can
|
|
kusano |
7d535a |
be considered for the next release. If you are using the cache, and at
|
|
kusano |
7d535a |
some point `config.cache' contains results you don't want to keep, you
|
|
kusano |
7d535a |
may remove or edit it.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
The file `configure.ac' (or `configure.in') is used to create
|
|
kusano |
7d535a |
`configure' by a program called `autoconf'. You only need
|
|
kusano |
7d535a |
`configure.ac' if you want to change it or regenerate `configure' using
|
|
kusano |
7d535a |
a newer version of `autoconf'.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
The simplest way to compile this package is:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
1. `cd' to the directory containing the package's source code and type
|
|
kusano |
7d535a |
`./configure' to configure the package for your system. If you're
|
|
kusano |
7d535a |
using `csh' on an old version of System V, you might need to type
|
|
kusano |
7d535a |
`sh ./configure' instead to prevent `csh' from trying to execute
|
|
kusano |
7d535a |
`configure' itself.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Running `configure' takes awhile. While running, it prints some
|
|
kusano |
7d535a |
messages telling which features it is checking for.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
2. Type `make' to compile the package.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
3. Optionally, type `make check' to run any self-tests that come with
|
|
kusano |
7d535a |
the package.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
4. Type `make install' to install the programs and any data files and
|
|
kusano |
7d535a |
documentation.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
5. You can remove the program binaries and object files from the
|
|
kusano |
7d535a |
source code directory by typing `make clean'. To also remove the
|
|
kusano |
7d535a |
files that `configure' created (so you can compile the package for
|
|
kusano |
7d535a |
a different kind of computer), type `make distclean'. There is
|
|
kusano |
7d535a |
also a `make maintainer-clean' target, but that is intended mainly
|
|
kusano |
7d535a |
for the package's developers. If you use it, you may have to get
|
|
kusano |
7d535a |
all sorts of other programs in order to regenerate files that came
|
|
kusano |
7d535a |
with the distribution.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Compilers and Options
|
|
kusano |
7d535a |
=====================
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Some systems require unusual options for compilation or linking that
|
|
kusano |
7d535a |
the `configure' script does not know about. Run `./configure --help'
|
|
kusano |
7d535a |
for details on some of the pertinent environment variables.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
You can give `configure' initial values for configuration parameters
|
|
kusano |
7d535a |
by setting variables in the command line or in the environment. Here
|
|
kusano |
7d535a |
is an example:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Compiling For Multiple Architectures
|
|
kusano |
7d535a |
====================================
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
You can compile the package for more than one kind of computer at the
|
|
kusano |
7d535a |
same time, by placing the object files for each architecture in their
|
|
kusano |
7d535a |
own directory. To do this, you must use a version of `make' that
|
|
kusano |
7d535a |
supports the `VPATH' variable, such as GNU `make'. `cd' to the
|
|
kusano |
7d535a |
directory where you want the object files and executables to go and run
|
|
kusano |
7d535a |
the `configure' script. `configure' automatically checks for the
|
|
kusano |
7d535a |
source code in the directory that `configure' is in and in `..'.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
If you have to use a `make' that does not support the `VPATH'
|
|
kusano |
7d535a |
variable, you have to compile the package for one architecture at a
|
|
kusano |
7d535a |
time in the source code directory. After you have installed the
|
|
kusano |
7d535a |
package for one architecture, use `make distclean' before reconfiguring
|
|
kusano |
7d535a |
for another architecture.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Installation Names
|
|
kusano |
7d535a |
==================
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
By default, `make install' will install the package's files in
|
|
kusano |
7d535a |
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
|
kusano |
7d535a |
installation prefix other than `/usr/local' by giving `configure' the
|
|
kusano |
7d535a |
option `--prefix=PATH'.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
You can specify separate installation prefixes for
|
|
kusano |
7d535a |
architecture-specific files and architecture-independent files. If you
|
|
kusano |
7d535a |
give `configure' the option `--exec-prefix=PATH', the package will use
|
|
kusano |
7d535a |
PATH as the prefix for installing programs and libraries.
|
|
kusano |
7d535a |
Documentation and other data files will still use the regular prefix.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
In addition, if you use an unusual directory layout you can give
|
|
kusano |
7d535a |
options like `--bindir=PATH' to specify different values for particular
|
|
kusano |
7d535a |
kinds of files. Run `configure --help' for a list of the directories
|
|
kusano |
7d535a |
you can set and what kinds of files go in them.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
If the package supports it, you can cause programs to be installed
|
|
kusano |
7d535a |
with an extra prefix or suffix on their names by giving `configure' the
|
|
kusano |
7d535a |
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Optional Features
|
|
kusano |
7d535a |
=================
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Some packages pay attention to `--enable-FEATURE' options to
|
|
kusano |
7d535a |
`configure', where FEATURE indicates an optional part of the package.
|
|
kusano |
7d535a |
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
|
kusano |
7d535a |
is something like `gnu-as' or `x' (for the X Window System). The
|
|
kusano |
7d535a |
`README' should mention any `--enable-' and `--with-' options that the
|
|
kusano |
7d535a |
package recognizes.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
For packages that use the X Window System, `configure' can usually
|
|
kusano |
7d535a |
find the X include and library files automatically, but if it doesn't,
|
|
kusano |
7d535a |
you can use the `configure' options `--x-includes=DIR' and
|
|
kusano |
7d535a |
`--x-libraries=DIR' to specify their locations.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Specifying the System Type
|
|
kusano |
7d535a |
==========================
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
There may be some features `configure' cannot figure out
|
|
kusano |
7d535a |
automatically, but needs to determine by the type of machine the package
|
|
kusano |
7d535a |
will run on. Usually, assuming the package is built to be run on the
|
|
kusano |
7d535a |
_same_ architectures, `configure' can figure that out, but if it prints
|
|
kusano |
7d535a |
a message saying it cannot guess the machine type, give it the
|
|
kusano |
7d535a |
`--build=TYPE' option. TYPE can either be a short name for the system
|
|
kusano |
7d535a |
type, such as `sun4', or a canonical name which has the form:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
CPU-COMPANY-SYSTEM
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
where SYSTEM can have one of these forms:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
OS KERNEL-OS
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
See the file `config.sub' for the possible values of each field. If
|
|
kusano |
7d535a |
`config.sub' isn't included in this package, then this package doesn't
|
|
kusano |
7d535a |
need to know the machine type.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
If you are _building_ compiler tools for cross-compiling, you should
|
|
kusano |
7d535a |
use the `--target=TYPE' option to select the type of system they will
|
|
kusano |
7d535a |
produce code for.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
If you want to _use_ a cross compiler, that generates code for a
|
|
kusano |
7d535a |
platform different from the build platform, you should specify the
|
|
kusano |
7d535a |
"host" platform (i.e., that on which the generated programs will
|
|
kusano |
7d535a |
eventually be run) with `--host=TYPE'.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Sharing Defaults
|
|
kusano |
7d535a |
================
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
If you want to set default values for `configure' scripts to share,
|
|
kusano |
7d535a |
you can create a site shell script called `config.site' that gives
|
|
kusano |
7d535a |
default values for variables like `CC', `cache_file', and `prefix'.
|
|
kusano |
7d535a |
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
|
kusano |
7d535a |
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
|
kusano |
7d535a |
`CONFIG_SITE' environment variable to the location of the site script.
|
|
kusano |
7d535a |
A warning: not all `configure' scripts look for a site script.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Defining Variables
|
|
kusano |
7d535a |
==================
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Variables not defined in a site shell script can be set in the
|
|
kusano |
7d535a |
environment passed to `configure'. However, some packages may run
|
|
kusano |
7d535a |
configure again during the build, and the customized values of these
|
|
kusano |
7d535a |
variables may be lost. In order to avoid this problem, you should set
|
|
kusano |
7d535a |
them in the `configure' command line, using `VAR=value'. For example:
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
./configure CC=/usr/local2/bin/gcc
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
will cause the specified gcc to be used as the C compiler (unless it is
|
|
kusano |
7d535a |
overridden in the site shell script).
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
`configure' Invocation
|
|
kusano |
7d535a |
======================
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
`configure' recognizes the following options to control how it
|
|
kusano |
7d535a |
operates.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
`--help'
|
|
kusano |
7d535a |
`-h'
|
|
kusano |
7d535a |
Print a summary of the options to `configure', and exit.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
`--version'
|
|
kusano |
7d535a |
`-V'
|
|
kusano |
7d535a |
Print the version of Autoconf used to generate the `configure'
|
|
kusano |
7d535a |
script, and exit.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
`--cache-file=FILE'
|
|
kusano |
7d535a |
Enable the cache: use and save the results of the tests in FILE,
|
|
kusano |
7d535a |
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
|
kusano |
7d535a |
disable caching.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
`--config-cache'
|
|
kusano |
7d535a |
`-C'
|
|
kusano |
7d535a |
Alias for `--cache-file=config.cache'.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
`--quiet'
|
|
kusano |
7d535a |
`--silent'
|
|
kusano |
7d535a |
`-q'
|
|
kusano |
7d535a |
Do not print messages saying which checks are being made. To
|
|
kusano |
7d535a |
suppress all normal output, redirect it to `/dev/null' (any error
|
|
kusano |
7d535a |
messages will still be shown).
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
`--srcdir=DIR'
|
|
kusano |
7d535a |
Look for the package's source code in directory DIR. Usually
|
|
kusano |
7d535a |
`configure' can determine that directory automatically.
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
`configure' also accepts some other, not widely useful, options. Run
|
|
kusano |
7d535a |
`configure --help' for more details.
|
|
kusano |
7d535a |
|