Blame INSTALL

Packit 5b56b6
These are generic installation instructions.
Packit 5b56b6
Packit 5b56b6
Prerequisites
Packit 5b56b6
=============
Packit 5b56b6
Packit 5b56b6
   This package depends on a few other packages.  They are listed in
Packit 5b56b6
the file ‘DEPENDENCIES’.  It is recommended to install the listed
Packit 5b56b6
packages before installing this package.
Packit 5b56b6
Packit 5b56b6
Basic Installation
Packit 5b56b6
==================
Packit 5b56b6
Packit 5b56b6
   The ‘configure’ shell script attempts to guess correct values for
Packit 5b56b6
various system-dependent variables used during compilation.  It uses
Packit 5b56b6
those values to create a ‘Makefile’ in each directory of the package.
Packit 5b56b6
It may also create one or more ‘.h’ files containing system-dependent
Packit 5b56b6
definitions.  Finally, it creates a shell script ‘config.status’ that
Packit 5b56b6
you can run in the future to recreate the current configuration, a file
Packit 5b56b6
‘config.cache’ that saves the results of its tests to speed up
Packit 5b56b6
reconfiguring, and a file ‘config.log’ containing compiler output
Packit 5b56b6
(useful mainly for debugging ‘configure’).
Packit 5b56b6
Packit 5b56b6
   If you need to do unusual things to compile the package, please try
Packit 5b56b6
to figure out how ‘configure’ could check whether to do them, and mail
Packit 5b56b6
diffs or instructions to the address given in the ‘README’ so they can
Packit 5b56b6
be considered for the next release.  If at some point ‘config.cache’
Packit 5b56b6
contains results you don't want to keep, you may remove or edit it.
Packit 5b56b6
Packit 5b56b6
   The file ‘configure.ac’ is used to create ‘configure’ by a program
Packit 5b56b6
called ‘autoconf’.  You only need ‘configure.ac’ if you want to change
Packit 5b56b6
it or regenerate ‘configure’ using a newer version of ‘autoconf’.
Packit 5b56b6
Packit 5b56b6
The simplest way to compile this package is:
Packit 5b56b6
Packit 5b56b6
  1. ‘cd’ to the directory containing the package's source code and type
Packit 5b56b6
     ‘./configure’ to configure the package for your system.  If you're
Packit 5b56b6
     using ‘csh’ on an old version of System V, you might need to type
Packit 5b56b6
     ‘sh ./configure’ instead to prevent ‘csh’ from trying to execute
Packit 5b56b6
     ‘configure’ itself.
Packit 5b56b6
Packit 5b56b6
     Running ‘configure’ takes awhile.  While running, it prints some
Packit 5b56b6
     messages telling which features it is checking for.
Packit 5b56b6
Packit 5b56b6
  2. Type ‘make’ to compile the package.
Packit 5b56b6
Packit 5b56b6
  3. Optionally, type ‘make check’ to run any self-tests that come with
Packit 5b56b6
     the package.
Packit 5b56b6
Packit 5b56b6
  4. Type ‘make install’ to install the programs and any data files and
Packit 5b56b6
     documentation.
Packit 5b56b6
Packit 5b56b6
  5. You can remove the program binaries and object files from the
Packit 5b56b6
     source code directory by typing ‘make clean’.  To also remove the
Packit 5b56b6
     files that ‘configure’ created (so you can compile the package for
Packit 5b56b6
     a different kind of computer), type ‘make distclean’.  There is
Packit 5b56b6
     also a ‘make maintainer-clean’ target, but that is intended mainly
Packit 5b56b6
     for the package's developers.  If you use it, you may have to get
Packit 5b56b6
     all sorts of other programs in order to regenerate files that came
Packit 5b56b6
     with the distribution.
Packit 5b56b6
Packit 5b56b6
Compilers and Options
Packit 5b56b6
=====================
Packit 5b56b6
Packit 5b56b6
   Some systems require unusual options for compilation or linking that
Packit 5b56b6
the ‘configure’ script does not know about.  You can give ‘configure’
Packit 5b56b6
initial values for variables as arguments.  You can do it like this:
Packit 5b56b6
     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
Packit 5b56b6
Packit 5b56b6
Compiling For Multiple Architectures
Packit 5b56b6
====================================
Packit 5b56b6
Packit 5b56b6
   You can compile the package for more than one kind of computer at the
Packit 5b56b6
same time, by placing the object files for each architecture in their
Packit 5b56b6
own directory.  To do this, you must use a version of ‘make’ that
Packit 5b56b6
supports the ‘VPATH’ variable, such as GNU ‘make’.  ‘cd’ to the
Packit 5b56b6
directory where you want the object files and executables to go and run
Packit 5b56b6
the ‘configure’ script.  ‘configure’ automatically checks for the
Packit 5b56b6
source code in the directory that ‘configure’ is in and in ‘..’.
Packit 5b56b6
Packit 5b56b6
   If you have to use a ‘make’ that does not supports the ‘VPATH’
Packit 5b56b6
variable, you have to compile the package for one architecture at a time
Packit 5b56b6
in the source code directory.  After you have installed the package for
Packit 5b56b6
one architecture, use ‘make distclean’ before reconfiguring for another
Packit 5b56b6
architecture.
Packit 5b56b6
Packit 5b56b6
   On MacOS X 10.5 and later systems, you can create libraries and
Packit 5b56b6
executables that work on multiple system types--known as "fat" or
Packit 5b56b6
"universal" binaries--by specifying multiple '-arch' options to the
Packit 5b56b6
compiler but only a single '-arch' option to the preprocessor.  Like
Packit 5b56b6
this:
Packit 5b56b6
Packit 5b56b6
     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
Packit 5b56b6
                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
Packit 5b56b6
                 CPP="gcc -E" CXXCPP="g++ -E"
Packit 5b56b6
Packit 5b56b6
   This is not guaranteed to produce working output in all cases.  You
Packit 5b56b6
may have to build one architecture at a time and combine the results
Packit 5b56b6
using the 'lipo' tool if you have problems.
Packit 5b56b6
Packit 5b56b6
Installation Names
Packit 5b56b6
==================
Packit 5b56b6
Packit 5b56b6
   By default, ‘make install’ will install the package's files in
Packit 5b56b6
‘/usr/local/bin’, ‘/usr/local/man’, etc.  You can specify an
Packit 5b56b6
installation prefix other than ‘/usr/local’ by giving ‘configure’ the
Packit 5b56b6
option ‘--prefix=PATH’.
Packit 5b56b6
Packit 5b56b6
   You can specify separate installation prefixes for
Packit 5b56b6
architecture-specific files and architecture-independent files.  If you
Packit 5b56b6
give ‘configure’ the option ‘--exec-prefix=PATH’, the package will use
Packit 5b56b6
PATH as the prefix for installing programs and libraries.
Packit 5b56b6
Documentation and other data files will still use the regular prefix.
Packit 5b56b6
Packit 5b56b6
   In addition, if you use an unusual directory layout you can give
Packit 5b56b6
options like ‘--bindir=PATH’ to specify different values for particular
Packit 5b56b6
kinds of files.  Run ‘configure --help’ for a list of the directories
Packit 5b56b6
you can set and what kinds of files go in them.
Packit 5b56b6
Packit 5b56b6
   If the package supports it, you can cause programs to be installed
Packit 5b56b6
with an extra prefix or suffix on their names by giving ‘configure’ the
Packit 5b56b6
option ‘--program-prefix=PREFIX’ or ‘--program-suffix=SUFFIX’.
Packit 5b56b6
Packit 5b56b6
Enabling Relocatability
Packit 5b56b6
=======================
Packit 5b56b6
Packit 5b56b6
   It has been a pain for many users of GNU packages for a long time
Packit 5b56b6
that packages are not relocatable.  It means a user cannot copy a
Packit 5b56b6
program, installed by another user on the same machine, to his home
Packit 5b56b6
directory, and have it work correctly (including i18n).  So many users
Packit 5b56b6
need to go through ‘configure; make; make install’ with all its
Packit 5b56b6
dependencies, options, and hurdles.
Packit 5b56b6
Packit 5b56b6
   Red Hat, Debian, and similar package systems solve the "ease of
Packit 5b56b6
installation" problem, but they hardwire path names, usually to ‘/usr’
Packit 5b56b6
or ‘/usr/local’.  This means that users need root privileges to install
Packit 5b56b6
a binary package, and prevents installing two different versions of the
Packit 5b56b6
same binary package.
Packit 5b56b6
Packit 5b56b6
   A relocatable program can be moved or copied to a different location
Packit 5b56b6
on the filesystem.  It is possible to make symlinks to the installed
Packit 5b56b6
and moved programs, and invoke them through the symlink. It is possible
Packit 5b56b6
to do the same thing with a hard link _only_ if the hard link file is
Packit 5b56b6
in the same directory as the real program.
Packit 5b56b6
Packit 5b56b6
   To configure a program to be relocatable, add ‘--enable-relocatable’
Packit 5b56b6
to the ‘configure’ command line.
Packit 5b56b6
Packit 5b56b6
   On some OSes the executables remember the location of shared
Packit 5b56b6
libraries and prefer them over any other search path.  Therefore, such
Packit 5b56b6
an executable will look for its shared libraries first in the original
Packit 5b56b6
installation directory and only then in the current installation
Packit 5b56b6
directory.  Thus, for reliability, it is best to also give a ‘--prefix’
Packit 5b56b6
option pointing to a directory that does not exist now and which never
Packit 5b56b6
will be created, e.g.  ‘--prefix=/nonexistent’.  You may use
Packit 5b56b6
‘DESTDIR=DEST-DIR’ on the ‘make’ command line to avoid installing into
Packit 5b56b6
that directory.
Packit 5b56b6
Packit 5b56b6
   We do not recommend using a prefix writable by unprivileged users
Packit 5b56b6
(e.g. ‘/tmp/inst$$’) because such a directory can be recreated by an
Packit 5b56b6
unprivileged user after the original directory has been removed.  We
Packit 5b56b6
also do not recommend prefixes that might be behind an automounter
Packit 5b56b6
(e.g. ‘$HOME/inst$$’) because of the performance impact of directory
Packit 5b56b6
searching.
Packit 5b56b6
Packit 5b56b6
   Here's a sample installation run that takes into account all these
Packit 5b56b6
recommendations:
Packit 5b56b6
Packit 5b56b6
     ./configure --enable-relocatable --prefix=/nonexistent
Packit 5b56b6
     make
Packit 5b56b6
     make install DESTDIR=/tmp/inst$$
Packit 5b56b6
Packit 5b56b6
   Installation with ‘--enable-relocatable’ will not work for setuid or
Packit 5b56b6
setgid executables, because such executables search only system library
Packit 5b56b6
paths for security reasons.  Also, installation with
Packit 5b56b6
‘--enable-relocatable’ might not work on OpenBSD, when the package
Packit 5b56b6
contains shared libraries and libtool versions 1.5.xx are used.
Packit 5b56b6
Packit 5b56b6
   The runtime penalty and size penalty are negligible on GNU/Linux
Packit 5b56b6
(just one system call more when an executable is launched), and small on
Packit 5b56b6
other systems (the wrapper program just sets an environment variable
Packit 5b56b6
and executes the real program).
Packit 5b56b6
Packit 5b56b6
Optional Features
Packit 5b56b6
=================
Packit 5b56b6
Packit 5b56b6
   Some packages pay attention to ‘--enable-FEATURE’ options to
Packit 5b56b6
‘configure’, where FEATURE indicates an optional part of the package.
Packit 5b56b6
They may also pay attention to ‘--with-PACKAGE’ options, where PACKAGE
Packit 5b56b6
is something like ‘gnu-as’ or ‘x’ (for the X Window System).  The
Packit 5b56b6
‘README’ should mention any ‘--enable-’ and ‘--with-’ options that the
Packit 5b56b6
package recognizes.
Packit 5b56b6
Packit 5b56b6
   For packages that use the X Window System, ‘configure’ can usually
Packit 5b56b6
find the X include and library files automatically, but if it doesn't,
Packit 5b56b6
you can use the ‘configure’ options ‘--x-includes=DIR’ and
Packit 5b56b6
‘--x-libraries=DIR’ to specify their locations.
Packit 5b56b6
Packit 5b56b6
   For packages that use the GNU libiconv library, you can use the
Packit 5b56b6
‘configure’ option ‘--with-libiconv-prefix’ to specify the prefix you
Packit 5b56b6
used while installing GNU libiconv.  This option is not necessary if
Packit 5b56b6
that other prefix is the same as the one now specified through --prefix.
Packit 5b56b6
Packit 5b56b6
   For packages that use the GNU libintl library, you can use the
Packit 5b56b6
‘configure’ option ‘--with-libintl-prefix’ to specify the prefix you
Packit 5b56b6
used while installing GNU gettext-runtime.  This option is not necessary if
Packit 5b56b6
that other prefix is the same as the one now specified through --prefix.
Packit 5b56b6
Packit 5b56b6
Particular Systems
Packit 5b56b6
==================
Packit 5b56b6
Packit 5b56b6
   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU CC
Packit 5b56b6
is not installed, it is recommended to use the following options in order
Packit 5b56b6
to use an ANSI C compiler:
Packit 5b56b6
Packit 5b56b6
     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
Packit 5b56b6
Packit 5b56b6
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
Packit 5b56b6
Packit 5b56b6
   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
Packit 5b56b6
parse its ‘<wchar.h>’ header file.  The option ‘-nodtk’ can be used as
Packit 5b56b6
a workaround.  If GNU CC is not installed, it is therefore recommended
Packit 5b56b6
to try
Packit 5b56b6
Packit 5b56b6
     ./configure CC="cc"
Packit 5b56b6
Packit 5b56b6
and if that doesn't work, try
Packit 5b56b6
Packit 5b56b6
     ./configure CC="cc -nodtk"
Packit 5b56b6
Packit 5b56b6
   On AIX 3, the C include files by default don't define some necessary
Packit 5b56b6
prototype declarations.  If GNU CC is not installed, it is recommended to
Packit 5b56b6
use the following options:
Packit 5b56b6
Packit 5b56b6
     ./configure CC="xlc -D_ALL_SOURCE"
Packit 5b56b6
Packit 5b56b6
   On Haiku, software installed for all users goes in /boot/common, not
Packit 5b56b6
/usr/local.  It is recommended to use the following options:
Packit 5b56b6
Packit 5b56b6
     ./configure --prefix=/boot/common
Packit 5b56b6
Packit 5b56b6
   On BeOS, user installed software goes in /boot/home/config, not
Packit 5b56b6
/usr/local.  It is recommended to use the following options:
Packit 5b56b6
Packit 5b56b6
     ./configure --prefix=/boot/home/config
Packit 5b56b6
Packit 5b56b6
Specifying the System Type
Packit 5b56b6
==========================
Packit 5b56b6
Packit 5b56b6
   There may be some features ‘configure’ can not figure out
Packit 5b56b6
automatically, but needs to determine by the type of host the package
Packit 5b56b6
will run on.  Usually ‘configure’ can figure that out, but if it prints
Packit 5b56b6
a message saying it can not guess the host type, give it the
Packit 5b56b6
‘--host=TYPE’ option.  TYPE can either be a short name for the system
Packit 5b56b6
type, such as ‘sun4’, or a canonical name with three fields:
Packit 5b56b6
     CPU-COMPANY-SYSTEM
Packit 5b56b6
Packit 5b56b6
See the file ‘config.sub’ for the possible values of each field.  If
Packit 5b56b6
‘config.sub’ isn't included in this package, then this package doesn't
Packit 5b56b6
need to know the host type.
Packit 5b56b6
Packit 5b56b6
   If you are building compiler tools for cross-compiling, you can also
Packit 5b56b6
use the ‘--target=TYPE’ option to select the type of system they will
Packit 5b56b6
produce code for and the ‘--build=TYPE’ option to select the type of
Packit 5b56b6
system on which you are compiling the package.
Packit 5b56b6
Packit 5b56b6
Sharing Defaults
Packit 5b56b6
================
Packit 5b56b6
Packit 5b56b6
   If you want to set default values for ‘configure’ scripts to share,
Packit 5b56b6
you can create a site shell script called ‘config.site’ that gives
Packit 5b56b6
default values for variables like ‘CC’, ‘cache_file’, and ‘prefix’.
Packit 5b56b6
‘configure’ looks for ‘PREFIX/share/config.site’ if it exists, then
Packit 5b56b6
‘PREFIX/etc/config.site’ if it exists.  Or, you can set the
Packit 5b56b6
‘CONFIG_SITE’ environment variable to the location of the site script.
Packit 5b56b6
A warning: not all ‘configure’ scripts look for a site script.
Packit 5b56b6
Packit 5b56b6
Operation Controls
Packit 5b56b6
==================
Packit 5b56b6
Packit 5b56b6
   ‘configure’ recognizes the following options to control how it
Packit 5b56b6
operates.
Packit 5b56b6
Packit 5b56b6
‘--cache-file=FILE’
Packit 5b56b6
     Use and save the results of the tests in FILE instead of
Packit 5b56b6
     ‘./config.cache’.  Set FILE to ‘/dev/null’ to disable caching, for
Packit 5b56b6
     debugging ‘configure’.
Packit 5b56b6
Packit 5b56b6
‘--help’
Packit 5b56b6
     Print a summary of the options to ‘configure’, and exit.
Packit 5b56b6
Packit 5b56b6
‘--quiet’
Packit 5b56b6
‘--silent’
Packit 5b56b6
‘-q’
Packit 5b56b6
     Do not print messages saying which checks are being made.  To
Packit 5b56b6
     suppress all normal output, redirect it to ‘/dev/null’ (any error
Packit 5b56b6
     messages will still be shown).
Packit 5b56b6
Packit 5b56b6
‘--srcdir=DIR’
Packit 5b56b6
     Look for the package's source code in directory DIR.  Usually
Packit 5b56b6
     ‘configure’ can determine that directory automatically.
Packit 5b56b6
Packit 5b56b6
‘--version’
Packit 5b56b6
     Print the version of Autoconf used to generate the ‘configure’
Packit 5b56b6
     script, and exit.
Packit 5b56b6
Packit 5b56b6
‘configure’ also accepts some other, not widely useful, options.
Packit 5b56b6