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