1576bae58SmrgInstallation Instructions
2576bae58Smrg*************************
3576bae58Smrg
424047306SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
524047306SmrgInc.
6576bae58Smrg
724047306Smrg   Copying and distribution of this file, with or without modification,
824047306Smrgare permitted in any medium without royalty provided the copyright
924047306Smrgnotice and this notice are preserved.  This file is offered as-is,
1024047306Smrgwithout warranty of any kind.
11576bae58Smrg
12576bae58SmrgBasic Installation
13576bae58Smrg==================
14576bae58Smrg
15576bae58Smrg   Briefly, the shell commands `./configure; make; make install' should
16576bae58Smrgconfigure, build, and install this package.  The following
17576bae58Smrgmore-detailed instructions are generic; see the `README' file for
1824047306Smrginstructions specific to this package.  Some packages provide this
1924047306Smrg`INSTALL' file but do not implement all of the features documented
2024047306Smrgbelow.  The lack of an optional feature in a given package is not
2124047306Smrgnecessarily a bug.  More recommendations for GNU packages can be found
2224047306Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23576bae58Smrg
24576bae58Smrg   The `configure' shell script attempts to guess correct values for
25576bae58Smrgvarious system-dependent variables used during compilation.  It uses
26576bae58Smrgthose values to create a `Makefile' in each directory of the package.
27576bae58SmrgIt may also create one or more `.h' files containing system-dependent
28576bae58Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29576bae58Smrgyou can run in the future to recreate the current configuration, and a
30576bae58Smrgfile `config.log' containing compiler output (useful mainly for
31576bae58Smrgdebugging `configure').
32576bae58Smrg
33576bae58Smrg   It can also use an optional file (typically called `config.cache'
34576bae58Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35576bae58Smrgthe results of its tests to speed up reconfiguring.  Caching is
36576bae58Smrgdisabled by default to prevent problems with accidental use of stale
37576bae58Smrgcache files.
38576bae58Smrg
39576bae58Smrg   If you need to do unusual things to compile the package, please try
40576bae58Smrgto figure out how `configure' could check whether to do them, and mail
41576bae58Smrgdiffs or instructions to the address given in the `README' so they can
42576bae58Smrgbe considered for the next release.  If you are using the cache, and at
43576bae58Smrgsome point `config.cache' contains results you don't want to keep, you
44576bae58Smrgmay remove or edit it.
45576bae58Smrg
46576bae58Smrg   The file `configure.ac' (or `configure.in') is used to create
47576bae58Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48576bae58Smrgyou want to change it or regenerate `configure' using a newer version
49576bae58Smrgof `autoconf'.
50576bae58Smrg
5124047306Smrg   The simplest way to compile this package is:
52576bae58Smrg
53576bae58Smrg  1. `cd' to the directory containing the package's source code and type
54576bae58Smrg     `./configure' to configure the package for your system.
55576bae58Smrg
56576bae58Smrg     Running `configure' might take a while.  While running, it prints
57576bae58Smrg     some messages telling which features it is checking for.
58576bae58Smrg
59576bae58Smrg  2. Type `make' to compile the package.
60576bae58Smrg
61576bae58Smrg  3. Optionally, type `make check' to run any self-tests that come with
6224047306Smrg     the package, generally using the just-built uninstalled binaries.
63576bae58Smrg
64576bae58Smrg  4. Type `make install' to install the programs and any data files and
6524047306Smrg     documentation.  When installing into a prefix owned by root, it is
6624047306Smrg     recommended that the package be configured and built as a regular
6724047306Smrg     user, and only the `make install' phase executed with root
6824047306Smrg     privileges.
6924047306Smrg
7024047306Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7124047306Smrg     this time using the binaries in their final installed location.
7224047306Smrg     This target does not install anything.  Running this target as a
7324047306Smrg     regular user, particularly if the prior `make install' required
7424047306Smrg     root privileges, verifies that the installation completed
7524047306Smrg     correctly.
7624047306Smrg
7724047306Smrg  6. You can remove the program binaries and object files from the
78576bae58Smrg     source code directory by typing `make clean'.  To also remove the
79576bae58Smrg     files that `configure' created (so you can compile the package for
80576bae58Smrg     a different kind of computer), type `make distclean'.  There is
81576bae58Smrg     also a `make maintainer-clean' target, but that is intended mainly
82576bae58Smrg     for the package's developers.  If you use it, you may have to get
83576bae58Smrg     all sorts of other programs in order to regenerate files that came
84576bae58Smrg     with the distribution.
85576bae58Smrg
8624047306Smrg  7. Often, you can also type `make uninstall' to remove the installed
8724047306Smrg     files again.  In practice, not all packages have tested that
8824047306Smrg     uninstallation works correctly, even though it is required by the
8924047306Smrg     GNU Coding Standards.
9024047306Smrg
9124047306Smrg  8. Some packages, particularly those that use Automake, provide `make
9224047306Smrg     distcheck', which can by used by developers to test that all other
9324047306Smrg     targets like `make install' and `make uninstall' work correctly.
9424047306Smrg     This target is generally not run by end users.
95576bae58Smrg
96576bae58SmrgCompilers and Options
97576bae58Smrg=====================
98576bae58Smrg
99576bae58Smrg   Some systems require unusual options for compilation or linking that
100576bae58Smrgthe `configure' script does not know about.  Run `./configure --help'
101576bae58Smrgfor details on some of the pertinent environment variables.
102576bae58Smrg
103576bae58Smrg   You can give `configure' initial values for configuration parameters
104576bae58Smrgby setting variables in the command line or in the environment.  Here
105576bae58Smrgis an example:
106576bae58Smrg
107576bae58Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108576bae58Smrg
109576bae58Smrg   *Note Defining Variables::, for more details.
110576bae58Smrg
111576bae58SmrgCompiling For Multiple Architectures
112576bae58Smrg====================================
113576bae58Smrg
114576bae58Smrg   You can compile the package for more than one kind of computer at the
115576bae58Smrgsame time, by placing the object files for each architecture in their
116576bae58Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117576bae58Smrgdirectory where you want the object files and executables to go and run
118576bae58Smrgthe `configure' script.  `configure' automatically checks for the
11924047306Smrgsource code in the directory that `configure' is in and in `..'.  This
12024047306Smrgis known as a "VPATH" build.
121576bae58Smrg
122576bae58Smrg   With a non-GNU `make', it is safer to compile the package for one
123576bae58Smrgarchitecture at a time in the source code directory.  After you have
124576bae58Smrginstalled the package for one architecture, use `make distclean' before
125576bae58Smrgreconfiguring for another architecture.
126576bae58Smrg
127576bae58Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128576bae58Smrgexecutables that work on multiple system types--known as "fat" or
129576bae58Smrg"universal" binaries--by specifying multiple `-arch' options to the
130576bae58Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131576bae58Smrgthis:
132576bae58Smrg
133576bae58Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134576bae58Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135576bae58Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136576bae58Smrg
137576bae58Smrg   This is not guaranteed to produce working output in all cases, you
138576bae58Smrgmay have to build one architecture at a time and combine the results
139576bae58Smrgusing the `lipo' tool if you have problems.
140576bae58Smrg
141576bae58SmrgInstallation Names
142576bae58Smrg==================
143576bae58Smrg
144576bae58Smrg   By default, `make install' installs the package's commands under
145576bae58Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146576bae58Smrgcan specify an installation prefix other than `/usr/local' by giving
14724047306Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14824047306Smrgabsolute file name.
149576bae58Smrg
150576bae58Smrg   You can specify separate installation prefixes for
151576bae58Smrgarchitecture-specific files and architecture-independent files.  If you
152576bae58Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153576bae58SmrgPREFIX as the prefix for installing programs and libraries.
154576bae58SmrgDocumentation and other data files still use the regular prefix.
155576bae58Smrg
156576bae58Smrg   In addition, if you use an unusual directory layout you can give
157576bae58Smrgoptions like `--bindir=DIR' to specify different values for particular
158576bae58Smrgkinds of files.  Run `configure --help' for a list of the directories
15924047306Smrgyou can set and what kinds of files go in them.  In general, the
16024047306Smrgdefault for these options is expressed in terms of `${prefix}', so that
16124047306Smrgspecifying just `--prefix' will affect all of the other directory
16224047306Smrgspecifications that were not explicitly provided.
16324047306Smrg
16424047306Smrg   The most portable way to affect installation locations is to pass the
16524047306Smrgcorrect locations to `configure'; however, many packages provide one or
16624047306Smrgboth of the following shortcuts of passing variable assignments to the
16724047306Smrg`make install' command line to change installation locations without
16824047306Smrghaving to reconfigure or recompile.
16924047306Smrg
17024047306Smrg   The first method involves providing an override variable for each
17124047306Smrgaffected directory.  For example, `make install
17224047306Smrgprefix=/alternate/directory' will choose an alternate location for all
17324047306Smrgdirectory configuration variables that were expressed in terms of
17424047306Smrg`${prefix}'.  Any directories that were specified during `configure',
17524047306Smrgbut not in terms of `${prefix}', must each be overridden at install
17624047306Smrgtime for the entire installation to be relocated.  The approach of
17724047306Smrgmakefile variable overrides for each directory variable is required by
17824047306Smrgthe GNU Coding Standards, and ideally causes no recompilation.
17924047306SmrgHowever, some platforms have known limitations with the semantics of
18024047306Smrgshared libraries that end up requiring recompilation when using this
18124047306Smrgmethod, particularly noticeable in packages that use GNU Libtool.
18224047306Smrg
18324047306Smrg   The second method involves providing the `DESTDIR' variable.  For
18424047306Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
18524047306Smrg`/alternate/directory' before all installation names.  The approach of
18624047306Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18724047306Smrgdoes not work on platforms that have drive letters.  On the other hand,
18824047306Smrgit does better at avoiding recompilation issues, and works well even
18924047306Smrgwhen some directory options were not specified in terms of `${prefix}'
19024047306Smrgat `configure' time.
19124047306Smrg
19224047306SmrgOptional Features
19324047306Smrg=================
194576bae58Smrg
195576bae58Smrg   If the package supports it, you can cause programs to be installed
196576bae58Smrgwith an extra prefix or suffix on their names by giving `configure' the
197576bae58Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198576bae58Smrg
199576bae58Smrg   Some packages pay attention to `--enable-FEATURE' options to
200576bae58Smrg`configure', where FEATURE indicates an optional part of the package.
201576bae58SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202576bae58Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203576bae58Smrg`README' should mention any `--enable-' and `--with-' options that the
204576bae58Smrgpackage recognizes.
205576bae58Smrg
206576bae58Smrg   For packages that use the X Window System, `configure' can usually
207576bae58Smrgfind the X include and library files automatically, but if it doesn't,
208576bae58Smrgyou can use the `configure' options `--x-includes=DIR' and
209576bae58Smrg`--x-libraries=DIR' to specify their locations.
210576bae58Smrg
21124047306Smrg   Some packages offer the ability to configure how verbose the
21224047306Smrgexecution of `make' will be.  For these packages, running `./configure
21324047306Smrg--enable-silent-rules' sets the default to minimal output, which can be
21424047306Smrgoverridden with `make V=1'; while running `./configure
21524047306Smrg--disable-silent-rules' sets the default to verbose, which can be
21624047306Smrgoverridden with `make V=0'.
21724047306Smrg
218576bae58SmrgParticular systems
219576bae58Smrg==================
220576bae58Smrg
221576bae58Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222576bae58SmrgCC is not installed, it is recommended to use the following options in
223576bae58Smrgorder to use an ANSI C compiler:
224576bae58Smrg
22524047306Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226576bae58Smrg
227576bae58Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228576bae58Smrg
22924047306Smrg   HP-UX `make' updates targets which have the same time stamps as
23024047306Smrgtheir prerequisites, which makes it generally unusable when shipped
23124047306Smrggenerated files such as `configure' are involved.  Use GNU `make'
23224047306Smrginstead.
23324047306Smrg
234576bae58Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235576bae58Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236576bae58Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237576bae58Smrgto try
238576bae58Smrg
239576bae58Smrg     ./configure CC="cc"
240576bae58Smrg
241576bae58Smrgand if that doesn't work, try
242576bae58Smrg
243576bae58Smrg     ./configure CC="cc -nodtk"
244576bae58Smrg
24524047306Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24624047306Smrgdirectory contains several dysfunctional programs; working variants of
24724047306Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24824047306Smrgin your `PATH', put it _after_ `/usr/bin'.
24924047306Smrg
25024047306Smrg   On Haiku, software installed for all users goes in `/boot/common',
25124047306Smrgnot `/usr/local'.  It is recommended to use the following options:
25224047306Smrg
25324047306Smrg     ./configure --prefix=/boot/common
25424047306Smrg
255576bae58SmrgSpecifying the System Type
256576bae58Smrg==========================
257576bae58Smrg
258576bae58Smrg   There may be some features `configure' cannot figure out
259576bae58Smrgautomatically, but needs to determine by the type of machine the package
260576bae58Smrgwill run on.  Usually, assuming the package is built to be run on the
261576bae58Smrg_same_ architectures, `configure' can figure that out, but if it prints
262576bae58Smrga message saying it cannot guess the machine type, give it the
263576bae58Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264576bae58Smrgtype, such as `sun4', or a canonical name which has the form:
265576bae58Smrg
266576bae58Smrg     CPU-COMPANY-SYSTEM
267576bae58Smrg
268576bae58Smrgwhere SYSTEM can have one of these forms:
269576bae58Smrg
27024047306Smrg     OS
27124047306Smrg     KERNEL-OS
272576bae58Smrg
273576bae58Smrg   See the file `config.sub' for the possible values of each field.  If
274576bae58Smrg`config.sub' isn't included in this package, then this package doesn't
275576bae58Smrgneed to know the machine type.
276576bae58Smrg
277576bae58Smrg   If you are _building_ compiler tools for cross-compiling, you should
278576bae58Smrguse the option `--target=TYPE' to select the type of system they will
279576bae58Smrgproduce code for.
280576bae58Smrg
281576bae58Smrg   If you want to _use_ a cross compiler, that generates code for a
282576bae58Smrgplatform different from the build platform, you should specify the
283576bae58Smrg"host" platform (i.e., that on which the generated programs will
284576bae58Smrgeventually be run) with `--host=TYPE'.
285576bae58Smrg
286576bae58SmrgSharing Defaults
287576bae58Smrg================
288576bae58Smrg
289576bae58Smrg   If you want to set default values for `configure' scripts to share,
290576bae58Smrgyou can create a site shell script called `config.site' that gives
291576bae58Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292576bae58Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293576bae58Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294576bae58Smrg`CONFIG_SITE' environment variable to the location of the site script.
295576bae58SmrgA warning: not all `configure' scripts look for a site script.
296576bae58Smrg
297576bae58SmrgDefining Variables
298576bae58Smrg==================
299576bae58Smrg
300576bae58Smrg   Variables not defined in a site shell script can be set in the
301576bae58Smrgenvironment passed to `configure'.  However, some packages may run
302576bae58Smrgconfigure again during the build, and the customized values of these
303576bae58Smrgvariables may be lost.  In order to avoid this problem, you should set
304576bae58Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305576bae58Smrg
306576bae58Smrg     ./configure CC=/usr/local2/bin/gcc
307576bae58Smrg
308576bae58Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309576bae58Smrgoverridden in the site shell script).
310576bae58Smrg
311576bae58SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312576bae58Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313576bae58Smrg
314576bae58Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315576bae58Smrg
316576bae58Smrg`configure' Invocation
317576bae58Smrg======================
318576bae58Smrg
319576bae58Smrg   `configure' recognizes the following options to control how it
320576bae58Smrgoperates.
321576bae58Smrg
322576bae58Smrg`--help'
323576bae58Smrg`-h'
324576bae58Smrg     Print a summary of all of the options to `configure', and exit.
325576bae58Smrg
326576bae58Smrg`--help=short'
327576bae58Smrg`--help=recursive'
328576bae58Smrg     Print a summary of the options unique to this package's
329576bae58Smrg     `configure', and exit.  The `short' variant lists options used
330576bae58Smrg     only in the top level, while the `recursive' variant lists options
331576bae58Smrg     also present in any nested packages.
332576bae58Smrg
333576bae58Smrg`--version'
334576bae58Smrg`-V'
335576bae58Smrg     Print the version of Autoconf used to generate the `configure'
336576bae58Smrg     script, and exit.
337576bae58Smrg
338576bae58Smrg`--cache-file=FILE'
339576bae58Smrg     Enable the cache: use and save the results of the tests in FILE,
340576bae58Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341576bae58Smrg     disable caching.
342576bae58Smrg
343576bae58Smrg`--config-cache'
344576bae58Smrg`-C'
345576bae58Smrg     Alias for `--cache-file=config.cache'.
346576bae58Smrg
347576bae58Smrg`--quiet'
348576bae58Smrg`--silent'
349576bae58Smrg`-q'
350576bae58Smrg     Do not print messages saying which checks are being made.  To
351576bae58Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352576bae58Smrg     messages will still be shown).
353576bae58Smrg
354576bae58Smrg`--srcdir=DIR'
355576bae58Smrg     Look for the package's source code in directory DIR.  Usually
356576bae58Smrg     `configure' can determine that directory automatically.
357576bae58Smrg
358576bae58Smrg`--prefix=DIR'
35924047306Smrg     Use DIR as the installation prefix.  *note Installation Names::
360576bae58Smrg     for more details, including other options available for fine-tuning
361576bae58Smrg     the installation locations.
362576bae58Smrg
363576bae58Smrg`--no-create'
364576bae58Smrg`-n'
365576bae58Smrg     Run the configure checks, but stop before creating any output
366576bae58Smrg     files.
367576bae58Smrg
368576bae58Smrg`configure' also accepts some other, not widely useful, options.  Run
369576bae58Smrg`configure --help' for more details.
370576bae58Smrg
371