1df58931aSmrgInstallation Instructions
2df58931aSmrg*************************
3df58931aSmrg
44929c8f8SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
54929c8f8SmrgInc.
6df58931aSmrg
74929c8f8Smrg   Copying and distribution of this file, with or without modification,
84929c8f8Smrgare permitted in any medium without royalty provided the copyright
94929c8f8Smrgnotice and this notice are preserved.  This file is offered as-is,
104929c8f8Smrgwithout warranty of any kind.
11df58931aSmrg
12df58931aSmrgBasic Installation
13df58931aSmrg==================
14df58931aSmrg
15df58931aSmrg   Briefly, the shell commands `./configure; make; make install' should
16df58931aSmrgconfigure, build, and install this package.  The following
17df58931aSmrgmore-detailed instructions are generic; see the `README' file for
184929c8f8Smrginstructions specific to this package.  Some packages provide this
194929c8f8Smrg`INSTALL' file but do not implement all of the features documented
204929c8f8Smrgbelow.  The lack of an optional feature in a given package is not
214929c8f8Smrgnecessarily a bug.  More recommendations for GNU packages can be found
224929c8f8Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23df58931aSmrg
24df58931aSmrg   The `configure' shell script attempts to guess correct values for
25df58931aSmrgvarious system-dependent variables used during compilation.  It uses
26df58931aSmrgthose values to create a `Makefile' in each directory of the package.
27df58931aSmrgIt may also create one or more `.h' files containing system-dependent
28df58931aSmrgdefinitions.  Finally, it creates a shell script `config.status' that
29df58931aSmrgyou can run in the future to recreate the current configuration, and a
30df58931aSmrgfile `config.log' containing compiler output (useful mainly for
31df58931aSmrgdebugging `configure').
32df58931aSmrg
33df58931aSmrg   It can also use an optional file (typically called `config.cache'
34df58931aSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35df58931aSmrgthe results of its tests to speed up reconfiguring.  Caching is
36df58931aSmrgdisabled by default to prevent problems with accidental use of stale
37df58931aSmrgcache files.
38df58931aSmrg
39df58931aSmrg   If you need to do unusual things to compile the package, please try
40df58931aSmrgto figure out how `configure' could check whether to do them, and mail
41df58931aSmrgdiffs or instructions to the address given in the `README' so they can
42df58931aSmrgbe considered for the next release.  If you are using the cache, and at
43df58931aSmrgsome point `config.cache' contains results you don't want to keep, you
44df58931aSmrgmay remove or edit it.
45df58931aSmrg
46df58931aSmrg   The file `configure.ac' (or `configure.in') is used to create
47df58931aSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48df58931aSmrgyou want to change it or regenerate `configure' using a newer version
49df58931aSmrgof `autoconf'.
50df58931aSmrg
514929c8f8Smrg   The simplest way to compile this package is:
52df58931aSmrg
53df58931aSmrg  1. `cd' to the directory containing the package's source code and type
54df58931aSmrg     `./configure' to configure the package for your system.
55df58931aSmrg
56df58931aSmrg     Running `configure' might take a while.  While running, it prints
57df58931aSmrg     some messages telling which features it is checking for.
58df58931aSmrg
59df58931aSmrg  2. Type `make' to compile the package.
60df58931aSmrg
61df58931aSmrg  3. Optionally, type `make check' to run any self-tests that come with
624929c8f8Smrg     the package, generally using the just-built uninstalled binaries.
63df58931aSmrg
64df58931aSmrg  4. Type `make install' to install the programs and any data files and
654929c8f8Smrg     documentation.  When installing into a prefix owned by root, it is
664929c8f8Smrg     recommended that the package be configured and built as a regular
674929c8f8Smrg     user, and only the `make install' phase executed with root
684929c8f8Smrg     privileges.
694929c8f8Smrg
704929c8f8Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
714929c8f8Smrg     this time using the binaries in their final installed location.
724929c8f8Smrg     This target does not install anything.  Running this target as a
734929c8f8Smrg     regular user, particularly if the prior `make install' required
744929c8f8Smrg     root privileges, verifies that the installation completed
754929c8f8Smrg     correctly.
764929c8f8Smrg
774929c8f8Smrg  6. You can remove the program binaries and object files from the
78df58931aSmrg     source code directory by typing `make clean'.  To also remove the
79df58931aSmrg     files that `configure' created (so you can compile the package for
80df58931aSmrg     a different kind of computer), type `make distclean'.  There is
81df58931aSmrg     also a `make maintainer-clean' target, but that is intended mainly
82df58931aSmrg     for the package's developers.  If you use it, you may have to get
83df58931aSmrg     all sorts of other programs in order to regenerate files that came
84df58931aSmrg     with the distribution.
85df58931aSmrg
864929c8f8Smrg  7. Often, you can also type `make uninstall' to remove the installed
874929c8f8Smrg     files again.  In practice, not all packages have tested that
884929c8f8Smrg     uninstallation works correctly, even though it is required by the
894929c8f8Smrg     GNU Coding Standards.
904929c8f8Smrg
914929c8f8Smrg  8. Some packages, particularly those that use Automake, provide `make
924929c8f8Smrg     distcheck', which can by used by developers to test that all other
934929c8f8Smrg     targets like `make install' and `make uninstall' work correctly.
944929c8f8Smrg     This target is generally not run by end users.
95df58931aSmrg
96df58931aSmrgCompilers and Options
97df58931aSmrg=====================
98df58931aSmrg
99df58931aSmrg   Some systems require unusual options for compilation or linking that
100df58931aSmrgthe `configure' script does not know about.  Run `./configure --help'
101df58931aSmrgfor details on some of the pertinent environment variables.
102df58931aSmrg
103df58931aSmrg   You can give `configure' initial values for configuration parameters
104df58931aSmrgby setting variables in the command line or in the environment.  Here
105df58931aSmrgis an example:
106df58931aSmrg
107df58931aSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108df58931aSmrg
109df58931aSmrg   *Note Defining Variables::, for more details.
110df58931aSmrg
111df58931aSmrgCompiling For Multiple Architectures
112df58931aSmrg====================================
113df58931aSmrg
114df58931aSmrg   You can compile the package for more than one kind of computer at the
115df58931aSmrgsame time, by placing the object files for each architecture in their
116df58931aSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117df58931aSmrgdirectory where you want the object files and executables to go and run
118df58931aSmrgthe `configure' script.  `configure' automatically checks for the
1194929c8f8Smrgsource code in the directory that `configure' is in and in `..'.  This
1204929c8f8Smrgis known as a "VPATH" build.
121df58931aSmrg
122df58931aSmrg   With a non-GNU `make', it is safer to compile the package for one
123df58931aSmrgarchitecture at a time in the source code directory.  After you have
124df58931aSmrginstalled the package for one architecture, use `make distclean' before
125df58931aSmrgreconfiguring for another architecture.
126df58931aSmrg
127df58931aSmrg   On MacOS X 10.5 and later systems, you can create libraries and
128df58931aSmrgexecutables that work on multiple system types--known as "fat" or
129df58931aSmrg"universal" binaries--by specifying multiple `-arch' options to the
130df58931aSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
131df58931aSmrgthis:
132df58931aSmrg
133df58931aSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134df58931aSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135df58931aSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
136df58931aSmrg
137df58931aSmrg   This is not guaranteed to produce working output in all cases, you
138df58931aSmrgmay have to build one architecture at a time and combine the results
139df58931aSmrgusing the `lipo' tool if you have problems.
140df58931aSmrg
141df58931aSmrgInstallation Names
142df58931aSmrg==================
143df58931aSmrg
144df58931aSmrg   By default, `make install' installs the package's commands under
145df58931aSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146df58931aSmrgcan specify an installation prefix other than `/usr/local' by giving
1474929c8f8Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1484929c8f8Smrgabsolute file name.
149df58931aSmrg
150df58931aSmrg   You can specify separate installation prefixes for
151df58931aSmrgarchitecture-specific files and architecture-independent files.  If you
152df58931aSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153df58931aSmrgPREFIX as the prefix for installing programs and libraries.
154df58931aSmrgDocumentation and other data files still use the regular prefix.
155df58931aSmrg
156df58931aSmrg   In addition, if you use an unusual directory layout you can give
157df58931aSmrgoptions like `--bindir=DIR' to specify different values for particular
158df58931aSmrgkinds of files.  Run `configure --help' for a list of the directories
1594929c8f8Smrgyou can set and what kinds of files go in them.  In general, the
1604929c8f8Smrgdefault for these options is expressed in terms of `${prefix}', so that
1614929c8f8Smrgspecifying just `--prefix' will affect all of the other directory
1624929c8f8Smrgspecifications that were not explicitly provided.
1634929c8f8Smrg
1644929c8f8Smrg   The most portable way to affect installation locations is to pass the
1654929c8f8Smrgcorrect locations to `configure'; however, many packages provide one or
1664929c8f8Smrgboth of the following shortcuts of passing variable assignments to the
1674929c8f8Smrg`make install' command line to change installation locations without
1684929c8f8Smrghaving to reconfigure or recompile.
1694929c8f8Smrg
1704929c8f8Smrg   The first method involves providing an override variable for each
1714929c8f8Smrgaffected directory.  For example, `make install
1724929c8f8Smrgprefix=/alternate/directory' will choose an alternate location for all
1734929c8f8Smrgdirectory configuration variables that were expressed in terms of
1744929c8f8Smrg`${prefix}'.  Any directories that were specified during `configure',
1754929c8f8Smrgbut not in terms of `${prefix}', must each be overridden at install
1764929c8f8Smrgtime for the entire installation to be relocated.  The approach of
1774929c8f8Smrgmakefile variable overrides for each directory variable is required by
1784929c8f8Smrgthe GNU Coding Standards, and ideally causes no recompilation.
1794929c8f8SmrgHowever, some platforms have known limitations with the semantics of
1804929c8f8Smrgshared libraries that end up requiring recompilation when using this
1814929c8f8Smrgmethod, particularly noticeable in packages that use GNU Libtool.
1824929c8f8Smrg
1834929c8f8Smrg   The second method involves providing the `DESTDIR' variable.  For
1844929c8f8Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
1854929c8f8Smrg`/alternate/directory' before all installation names.  The approach of
1864929c8f8Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1874929c8f8Smrgdoes not work on platforms that have drive letters.  On the other hand,
1884929c8f8Smrgit does better at avoiding recompilation issues, and works well even
1894929c8f8Smrgwhen some directory options were not specified in terms of `${prefix}'
1904929c8f8Smrgat `configure' time.
1914929c8f8Smrg
1924929c8f8SmrgOptional Features
1934929c8f8Smrg=================
194df58931aSmrg
195df58931aSmrg   If the package supports it, you can cause programs to be installed
196df58931aSmrgwith an extra prefix or suffix on their names by giving `configure' the
197df58931aSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198df58931aSmrg
199df58931aSmrg   Some packages pay attention to `--enable-FEATURE' options to
200df58931aSmrg`configure', where FEATURE indicates an optional part of the package.
201df58931aSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202df58931aSmrgis something like `gnu-as' or `x' (for the X Window System).  The
203df58931aSmrg`README' should mention any `--enable-' and `--with-' options that the
204df58931aSmrgpackage recognizes.
205df58931aSmrg
206df58931aSmrg   For packages that use the X Window System, `configure' can usually
207df58931aSmrgfind the X include and library files automatically, but if it doesn't,
208df58931aSmrgyou can use the `configure' options `--x-includes=DIR' and
209df58931aSmrg`--x-libraries=DIR' to specify their locations.
210df58931aSmrg
2114929c8f8Smrg   Some packages offer the ability to configure how verbose the
2124929c8f8Smrgexecution of `make' will be.  For these packages, running `./configure
2134929c8f8Smrg--enable-silent-rules' sets the default to minimal output, which can be
2144929c8f8Smrgoverridden with `make V=1'; while running `./configure
2154929c8f8Smrg--disable-silent-rules' sets the default to verbose, which can be
2164929c8f8Smrgoverridden with `make V=0'.
2174929c8f8Smrg
218df58931aSmrgParticular systems
219df58931aSmrg==================
220df58931aSmrg
221df58931aSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222df58931aSmrgCC is not installed, it is recommended to use the following options in
223df58931aSmrgorder to use an ANSI C compiler:
224df58931aSmrg
2254929c8f8Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226df58931aSmrg
227df58931aSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228df58931aSmrg
2294929c8f8Smrg   HP-UX `make' updates targets which have the same time stamps as
2304929c8f8Smrgtheir prerequisites, which makes it generally unusable when shipped
2314929c8f8Smrggenerated files such as `configure' are involved.  Use GNU `make'
2324929c8f8Smrginstead.
2334929c8f8Smrg
234df58931aSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235df58931aSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236df58931aSmrga workaround.  If GNU CC is not installed, it is therefore recommended
237df58931aSmrgto try
238df58931aSmrg
239df58931aSmrg     ./configure CC="cc"
240df58931aSmrg
241df58931aSmrgand if that doesn't work, try
242df58931aSmrg
243df58931aSmrg     ./configure CC="cc -nodtk"
244df58931aSmrg
2454929c8f8Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2464929c8f8Smrgdirectory contains several dysfunctional programs; working variants of
2474929c8f8Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2484929c8f8Smrgin your `PATH', put it _after_ `/usr/bin'.
2494929c8f8Smrg
2504929c8f8Smrg   On Haiku, software installed for all users goes in `/boot/common',
2514929c8f8Smrgnot `/usr/local'.  It is recommended to use the following options:
2524929c8f8Smrg
2534929c8f8Smrg     ./configure --prefix=/boot/common
2544929c8f8Smrg
255df58931aSmrgSpecifying the System Type
256df58931aSmrg==========================
257df58931aSmrg
258df58931aSmrg   There may be some features `configure' cannot figure out
259df58931aSmrgautomatically, but needs to determine by the type of machine the package
260df58931aSmrgwill run on.  Usually, assuming the package is built to be run on the
261df58931aSmrg_same_ architectures, `configure' can figure that out, but if it prints
262df58931aSmrga message saying it cannot guess the machine type, give it the
263df58931aSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
264df58931aSmrgtype, such as `sun4', or a canonical name which has the form:
265df58931aSmrg
266df58931aSmrg     CPU-COMPANY-SYSTEM
267df58931aSmrg
268df58931aSmrgwhere SYSTEM can have one of these forms:
269df58931aSmrg
2704929c8f8Smrg     OS
2714929c8f8Smrg     KERNEL-OS
272df58931aSmrg
273df58931aSmrg   See the file `config.sub' for the possible values of each field.  If
274df58931aSmrg`config.sub' isn't included in this package, then this package doesn't
275df58931aSmrgneed to know the machine type.
276df58931aSmrg
277df58931aSmrg   If you are _building_ compiler tools for cross-compiling, you should
278df58931aSmrguse the option `--target=TYPE' to select the type of system they will
279df58931aSmrgproduce code for.
280df58931aSmrg
281df58931aSmrg   If you want to _use_ a cross compiler, that generates code for a
282df58931aSmrgplatform different from the build platform, you should specify the
283df58931aSmrg"host" platform (i.e., that on which the generated programs will
284df58931aSmrgeventually be run) with `--host=TYPE'.
285df58931aSmrg
286df58931aSmrgSharing Defaults
287df58931aSmrg================
288df58931aSmrg
289df58931aSmrg   If you want to set default values for `configure' scripts to share,
290df58931aSmrgyou can create a site shell script called `config.site' that gives
291df58931aSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
292df58931aSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293df58931aSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294df58931aSmrg`CONFIG_SITE' environment variable to the location of the site script.
295df58931aSmrgA warning: not all `configure' scripts look for a site script.
296df58931aSmrg
297df58931aSmrgDefining Variables
298df58931aSmrg==================
299df58931aSmrg
300df58931aSmrg   Variables not defined in a site shell script can be set in the
301df58931aSmrgenvironment passed to `configure'.  However, some packages may run
302df58931aSmrgconfigure again during the build, and the customized values of these
303df58931aSmrgvariables may be lost.  In order to avoid this problem, you should set
304df58931aSmrgthem in the `configure' command line, using `VAR=value'.  For example:
305df58931aSmrg
306df58931aSmrg     ./configure CC=/usr/local2/bin/gcc
307df58931aSmrg
308df58931aSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
309df58931aSmrgoverridden in the site shell script).
310df58931aSmrg
311df58931aSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312df58931aSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313df58931aSmrg
314df58931aSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315df58931aSmrg
316df58931aSmrg`configure' Invocation
317df58931aSmrg======================
318df58931aSmrg
319df58931aSmrg   `configure' recognizes the following options to control how it
320df58931aSmrgoperates.
321df58931aSmrg
322df58931aSmrg`--help'
323df58931aSmrg`-h'
324df58931aSmrg     Print a summary of all of the options to `configure', and exit.
325df58931aSmrg
326df58931aSmrg`--help=short'
327df58931aSmrg`--help=recursive'
328df58931aSmrg     Print a summary of the options unique to this package's
329df58931aSmrg     `configure', and exit.  The `short' variant lists options used
330df58931aSmrg     only in the top level, while the `recursive' variant lists options
331df58931aSmrg     also present in any nested packages.
332df58931aSmrg
333df58931aSmrg`--version'
334df58931aSmrg`-V'
335df58931aSmrg     Print the version of Autoconf used to generate the `configure'
336df58931aSmrg     script, and exit.
337df58931aSmrg
338df58931aSmrg`--cache-file=FILE'
339df58931aSmrg     Enable the cache: use and save the results of the tests in FILE,
340df58931aSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341df58931aSmrg     disable caching.
342df58931aSmrg
343df58931aSmrg`--config-cache'
344df58931aSmrg`-C'
345df58931aSmrg     Alias for `--cache-file=config.cache'.
346df58931aSmrg
347df58931aSmrg`--quiet'
348df58931aSmrg`--silent'
349df58931aSmrg`-q'
350df58931aSmrg     Do not print messages saying which checks are being made.  To
351df58931aSmrg     suppress all normal output, redirect it to `/dev/null' (any error
352df58931aSmrg     messages will still be shown).
353df58931aSmrg
354df58931aSmrg`--srcdir=DIR'
355df58931aSmrg     Look for the package's source code in directory DIR.  Usually
356df58931aSmrg     `configure' can determine that directory automatically.
357df58931aSmrg
358df58931aSmrg`--prefix=DIR'
3594929c8f8Smrg     Use DIR as the installation prefix.  *note Installation Names::
360df58931aSmrg     for more details, including other options available for fine-tuning
361df58931aSmrg     the installation locations.
362df58931aSmrg
363df58931aSmrg`--no-create'
364df58931aSmrg`-n'
365df58931aSmrg     Run the configure checks, but stop before creating any output
366df58931aSmrg     files.
367df58931aSmrg
368df58931aSmrg`configure' also accepts some other, not widely useful, options.  Run
369df58931aSmrg`configure --help' for more details.
370df58931aSmrg
371