1417cc7e8SmrgInstallation Instructions
2417cc7e8Smrg*************************
3af7c02bdSmrg
46c9573adSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
56c9573adSmrgInc.
6af7c02bdSmrg
76c9573adSmrg   Copying and distribution of this file, with or without modification,
86c9573adSmrgare permitted in any medium without royalty provided the copyright
96c9573adSmrgnotice and this notice are preserved.  This file is offered as-is,
106c9573adSmrgwithout warranty of any kind.
11417cc7e8Smrg
12417cc7e8SmrgBasic Installation
13417cc7e8Smrg==================
14417cc7e8Smrg
15417cc7e8Smrg   Briefly, the shell commands `./configure; make; make install' should
16417cc7e8Smrgconfigure, build, and install this package.  The following
17417cc7e8Smrgmore-detailed instructions are generic; see the `README' file for
186c9573adSmrginstructions specific to this package.  Some packages provide this
196c9573adSmrg`INSTALL' file but do not implement all of the features documented
206c9573adSmrgbelow.  The lack of an optional feature in a given package is not
216c9573adSmrgnecessarily a bug.  More recommendations for GNU packages can be found
226c9573adSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
23417cc7e8Smrg
24417cc7e8Smrg   The `configure' shell script attempts to guess correct values for
25417cc7e8Smrgvarious system-dependent variables used during compilation.  It uses
26417cc7e8Smrgthose values to create a `Makefile' in each directory of the package.
27417cc7e8SmrgIt may also create one or more `.h' files containing system-dependent
28417cc7e8Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29417cc7e8Smrgyou can run in the future to recreate the current configuration, and a
30417cc7e8Smrgfile `config.log' containing compiler output (useful mainly for
31417cc7e8Smrgdebugging `configure').
32417cc7e8Smrg
33417cc7e8Smrg   It can also use an optional file (typically called `config.cache'
34417cc7e8Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35417cc7e8Smrgthe results of its tests to speed up reconfiguring.  Caching is
36417cc7e8Smrgdisabled by default to prevent problems with accidental use of stale
37417cc7e8Smrgcache files.
38417cc7e8Smrg
39417cc7e8Smrg   If you need to do unusual things to compile the package, please try
40417cc7e8Smrgto figure out how `configure' could check whether to do them, and mail
41417cc7e8Smrgdiffs or instructions to the address given in the `README' so they can
42417cc7e8Smrgbe considered for the next release.  If you are using the cache, and at
43417cc7e8Smrgsome point `config.cache' contains results you don't want to keep, you
44417cc7e8Smrgmay remove or edit it.
45417cc7e8Smrg
46417cc7e8Smrg   The file `configure.ac' (or `configure.in') is used to create
47417cc7e8Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48417cc7e8Smrgyou want to change it or regenerate `configure' using a newer version
49417cc7e8Smrgof `autoconf'.
50417cc7e8Smrg
516c9573adSmrg   The simplest way to compile this package is:
52417cc7e8Smrg
53417cc7e8Smrg  1. `cd' to the directory containing the package's source code and type
54417cc7e8Smrg     `./configure' to configure the package for your system.
55417cc7e8Smrg
56417cc7e8Smrg     Running `configure' might take a while.  While running, it prints
57417cc7e8Smrg     some messages telling which features it is checking for.
58417cc7e8Smrg
59417cc7e8Smrg  2. Type `make' to compile the package.
60417cc7e8Smrg
61417cc7e8Smrg  3. Optionally, type `make check' to run any self-tests that come with
626c9573adSmrg     the package, generally using the just-built uninstalled binaries.
63417cc7e8Smrg
64417cc7e8Smrg  4. Type `make install' to install the programs and any data files and
656c9573adSmrg     documentation.  When installing into a prefix owned by root, it is
666c9573adSmrg     recommended that the package be configured and built as a regular
676c9573adSmrg     user, and only the `make install' phase executed with root
686c9573adSmrg     privileges.
696c9573adSmrg
706c9573adSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
716c9573adSmrg     this time using the binaries in their final installed location.
726c9573adSmrg     This target does not install anything.  Running this target as a
736c9573adSmrg     regular user, particularly if the prior `make install' required
746c9573adSmrg     root privileges, verifies that the installation completed
756c9573adSmrg     correctly.
766c9573adSmrg
776c9573adSmrg  6. You can remove the program binaries and object files from the
78417cc7e8Smrg     source code directory by typing `make clean'.  To also remove the
79417cc7e8Smrg     files that `configure' created (so you can compile the package for
80417cc7e8Smrg     a different kind of computer), type `make distclean'.  There is
81417cc7e8Smrg     also a `make maintainer-clean' target, but that is intended mainly
82417cc7e8Smrg     for the package's developers.  If you use it, you may have to get
83417cc7e8Smrg     all sorts of other programs in order to regenerate files that came
84417cc7e8Smrg     with the distribution.
85417cc7e8Smrg
866c9573adSmrg  7. Often, you can also type `make uninstall' to remove the installed
876c9573adSmrg     files again.  In practice, not all packages have tested that
886c9573adSmrg     uninstallation works correctly, even though it is required by the
896c9573adSmrg     GNU Coding Standards.
906c9573adSmrg
916c9573adSmrg  8. Some packages, particularly those that use Automake, provide `make
926c9573adSmrg     distcheck', which can by used by developers to test that all other
936c9573adSmrg     targets like `make install' and `make uninstall' work correctly.
946c9573adSmrg     This target is generally not run by end users.
95417cc7e8Smrg
96417cc7e8SmrgCompilers and Options
97417cc7e8Smrg=====================
98417cc7e8Smrg
99417cc7e8Smrg   Some systems require unusual options for compilation or linking that
100417cc7e8Smrgthe `configure' script does not know about.  Run `./configure --help'
101417cc7e8Smrgfor details on some of the pertinent environment variables.
102417cc7e8Smrg
103417cc7e8Smrg   You can give `configure' initial values for configuration parameters
104417cc7e8Smrgby setting variables in the command line or in the environment.  Here
105417cc7e8Smrgis an example:
106417cc7e8Smrg
107417cc7e8Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108417cc7e8Smrg
109417cc7e8Smrg   *Note Defining Variables::, for more details.
110417cc7e8Smrg
111417cc7e8SmrgCompiling For Multiple Architectures
112417cc7e8Smrg====================================
113417cc7e8Smrg
114417cc7e8Smrg   You can compile the package for more than one kind of computer at the
115417cc7e8Smrgsame time, by placing the object files for each architecture in their
116417cc7e8Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117417cc7e8Smrgdirectory where you want the object files and executables to go and run
118417cc7e8Smrgthe `configure' script.  `configure' automatically checks for the
1196c9573adSmrgsource code in the directory that `configure' is in and in `..'.  This
1206c9573adSmrgis known as a "VPATH" build.
121417cc7e8Smrg
122417cc7e8Smrg   With a non-GNU `make', it is safer to compile the package for one
123417cc7e8Smrgarchitecture at a time in the source code directory.  After you have
124417cc7e8Smrginstalled the package for one architecture, use `make distclean' before
125417cc7e8Smrgreconfiguring for another architecture.
126417cc7e8Smrg
127417cc7e8Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128417cc7e8Smrgexecutables that work on multiple system types--known as "fat" or
129417cc7e8Smrg"universal" binaries--by specifying multiple `-arch' options to the
130417cc7e8Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131417cc7e8Smrgthis:
132417cc7e8Smrg
133417cc7e8Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134417cc7e8Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135417cc7e8Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136417cc7e8Smrg
137417cc7e8Smrg   This is not guaranteed to produce working output in all cases, you
138417cc7e8Smrgmay have to build one architecture at a time and combine the results
139417cc7e8Smrgusing the `lipo' tool if you have problems.
140417cc7e8Smrg
141417cc7e8SmrgInstallation Names
142417cc7e8Smrg==================
143417cc7e8Smrg
144417cc7e8Smrg   By default, `make install' installs the package's commands under
145417cc7e8Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146417cc7e8Smrgcan specify an installation prefix other than `/usr/local' by giving
1476c9573adSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1486c9573adSmrgabsolute file name.
149417cc7e8Smrg
150417cc7e8Smrg   You can specify separate installation prefixes for
151417cc7e8Smrgarchitecture-specific files and architecture-independent files.  If you
152417cc7e8Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153417cc7e8SmrgPREFIX as the prefix for installing programs and libraries.
154417cc7e8SmrgDocumentation and other data files still use the regular prefix.
155417cc7e8Smrg
156417cc7e8Smrg   In addition, if you use an unusual directory layout you can give
157417cc7e8Smrgoptions like `--bindir=DIR' to specify different values for particular
158417cc7e8Smrgkinds of files.  Run `configure --help' for a list of the directories
1596c9573adSmrgyou can set and what kinds of files go in them.  In general, the
1606c9573adSmrgdefault for these options is expressed in terms of `${prefix}', so that
1616c9573adSmrgspecifying just `--prefix' will affect all of the other directory
1626c9573adSmrgspecifications that were not explicitly provided.
1636c9573adSmrg
1646c9573adSmrg   The most portable way to affect installation locations is to pass the
1656c9573adSmrgcorrect locations to `configure'; however, many packages provide one or
1666c9573adSmrgboth of the following shortcuts of passing variable assignments to the
1676c9573adSmrg`make install' command line to change installation locations without
1686c9573adSmrghaving to reconfigure or recompile.
1696c9573adSmrg
1706c9573adSmrg   The first method involves providing an override variable for each
1716c9573adSmrgaffected directory.  For example, `make install
1726c9573adSmrgprefix=/alternate/directory' will choose an alternate location for all
1736c9573adSmrgdirectory configuration variables that were expressed in terms of
1746c9573adSmrg`${prefix}'.  Any directories that were specified during `configure',
1756c9573adSmrgbut not in terms of `${prefix}', must each be overridden at install
1766c9573adSmrgtime for the entire installation to be relocated.  The approach of
1776c9573adSmrgmakefile variable overrides for each directory variable is required by
1786c9573adSmrgthe GNU Coding Standards, and ideally causes no recompilation.
1796c9573adSmrgHowever, some platforms have known limitations with the semantics of
1806c9573adSmrgshared libraries that end up requiring recompilation when using this
1816c9573adSmrgmethod, particularly noticeable in packages that use GNU Libtool.
1826c9573adSmrg
1836c9573adSmrg   The second method involves providing the `DESTDIR' variable.  For
1846c9573adSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
1856c9573adSmrg`/alternate/directory' before all installation names.  The approach of
1866c9573adSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1876c9573adSmrgdoes not work on platforms that have drive letters.  On the other hand,
1886c9573adSmrgit does better at avoiding recompilation issues, and works well even
1896c9573adSmrgwhen some directory options were not specified in terms of `${prefix}'
1906c9573adSmrgat `configure' time.
1916c9573adSmrg
1926c9573adSmrgOptional Features
1936c9573adSmrg=================
194417cc7e8Smrg
195417cc7e8Smrg   If the package supports it, you can cause programs to be installed
196417cc7e8Smrgwith an extra prefix or suffix on their names by giving `configure' the
197417cc7e8Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198417cc7e8Smrg
199417cc7e8Smrg   Some packages pay attention to `--enable-FEATURE' options to
200417cc7e8Smrg`configure', where FEATURE indicates an optional part of the package.
201417cc7e8SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202417cc7e8Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203417cc7e8Smrg`README' should mention any `--enable-' and `--with-' options that the
204417cc7e8Smrgpackage recognizes.
205417cc7e8Smrg
206417cc7e8Smrg   For packages that use the X Window System, `configure' can usually
207417cc7e8Smrgfind the X include and library files automatically, but if it doesn't,
208417cc7e8Smrgyou can use the `configure' options `--x-includes=DIR' and
209417cc7e8Smrg`--x-libraries=DIR' to specify their locations.
210417cc7e8Smrg
2116c9573adSmrg   Some packages offer the ability to configure how verbose the
2126c9573adSmrgexecution of `make' will be.  For these packages, running `./configure
2136c9573adSmrg--enable-silent-rules' sets the default to minimal output, which can be
2146c9573adSmrgoverridden with `make V=1'; while running `./configure
2156c9573adSmrg--disable-silent-rules' sets the default to verbose, which can be
2166c9573adSmrgoverridden with `make V=0'.
2176c9573adSmrg
218417cc7e8SmrgParticular systems
219417cc7e8Smrg==================
220417cc7e8Smrg
221417cc7e8Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222417cc7e8SmrgCC is not installed, it is recommended to use the following options in
223417cc7e8Smrgorder to use an ANSI C compiler:
224417cc7e8Smrg
2256c9573adSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226417cc7e8Smrg
227417cc7e8Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228417cc7e8Smrg
2296c9573adSmrg   HP-UX `make' updates targets which have the same time stamps as
2306c9573adSmrgtheir prerequisites, which makes it generally unusable when shipped
2316c9573adSmrggenerated files such as `configure' are involved.  Use GNU `make'
2326c9573adSmrginstead.
2336c9573adSmrg
234417cc7e8Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235417cc7e8Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236417cc7e8Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237417cc7e8Smrgto try
238417cc7e8Smrg
239417cc7e8Smrg     ./configure CC="cc"
240417cc7e8Smrg
241417cc7e8Smrgand if that doesn't work, try
242417cc7e8Smrg
243417cc7e8Smrg     ./configure CC="cc -nodtk"
244417cc7e8Smrg
2456c9573adSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2466c9573adSmrgdirectory contains several dysfunctional programs; working variants of
2476c9573adSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2486c9573adSmrgin your `PATH', put it _after_ `/usr/bin'.
2496c9573adSmrg
2506c9573adSmrg   On Haiku, software installed for all users goes in `/boot/common',
2516c9573adSmrgnot `/usr/local'.  It is recommended to use the following options:
2526c9573adSmrg
2536c9573adSmrg     ./configure --prefix=/boot/common
2546c9573adSmrg
255417cc7e8SmrgSpecifying the System Type
256417cc7e8Smrg==========================
257417cc7e8Smrg
258417cc7e8Smrg   There may be some features `configure' cannot figure out
259417cc7e8Smrgautomatically, but needs to determine by the type of machine the package
260417cc7e8Smrgwill run on.  Usually, assuming the package is built to be run on the
261417cc7e8Smrg_same_ architectures, `configure' can figure that out, but if it prints
262417cc7e8Smrga message saying it cannot guess the machine type, give it the
263417cc7e8Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264417cc7e8Smrgtype, such as `sun4', or a canonical name which has the form:
265417cc7e8Smrg
266417cc7e8Smrg     CPU-COMPANY-SYSTEM
267417cc7e8Smrg
268417cc7e8Smrgwhere SYSTEM can have one of these forms:
269417cc7e8Smrg
2706c9573adSmrg     OS
2716c9573adSmrg     KERNEL-OS
272417cc7e8Smrg
273417cc7e8Smrg   See the file `config.sub' for the possible values of each field.  If
274417cc7e8Smrg`config.sub' isn't included in this package, then this package doesn't
275417cc7e8Smrgneed to know the machine type.
276417cc7e8Smrg
277417cc7e8Smrg   If you are _building_ compiler tools for cross-compiling, you should
278417cc7e8Smrguse the option `--target=TYPE' to select the type of system they will
279417cc7e8Smrgproduce code for.
280417cc7e8Smrg
281417cc7e8Smrg   If you want to _use_ a cross compiler, that generates code for a
282417cc7e8Smrgplatform different from the build platform, you should specify the
283417cc7e8Smrg"host" platform (i.e., that on which the generated programs will
284417cc7e8Smrgeventually be run) with `--host=TYPE'.
285417cc7e8Smrg
286417cc7e8SmrgSharing Defaults
287417cc7e8Smrg================
288417cc7e8Smrg
289417cc7e8Smrg   If you want to set default values for `configure' scripts to share,
290417cc7e8Smrgyou can create a site shell script called `config.site' that gives
291417cc7e8Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292417cc7e8Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293417cc7e8Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294417cc7e8Smrg`CONFIG_SITE' environment variable to the location of the site script.
295417cc7e8SmrgA warning: not all `configure' scripts look for a site script.
296417cc7e8Smrg
297417cc7e8SmrgDefining Variables
298417cc7e8Smrg==================
299417cc7e8Smrg
300417cc7e8Smrg   Variables not defined in a site shell script can be set in the
301417cc7e8Smrgenvironment passed to `configure'.  However, some packages may run
302417cc7e8Smrgconfigure again during the build, and the customized values of these
303417cc7e8Smrgvariables may be lost.  In order to avoid this problem, you should set
304417cc7e8Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305417cc7e8Smrg
306417cc7e8Smrg     ./configure CC=/usr/local2/bin/gcc
307417cc7e8Smrg
308417cc7e8Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309417cc7e8Smrgoverridden in the site shell script).
310417cc7e8Smrg
311417cc7e8SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312417cc7e8Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313417cc7e8Smrg
314417cc7e8Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315417cc7e8Smrg
316417cc7e8Smrg`configure' Invocation
317417cc7e8Smrg======================
318417cc7e8Smrg
319417cc7e8Smrg   `configure' recognizes the following options to control how it
320417cc7e8Smrgoperates.
321417cc7e8Smrg
322417cc7e8Smrg`--help'
323417cc7e8Smrg`-h'
324417cc7e8Smrg     Print a summary of all of the options to `configure', and exit.
325417cc7e8Smrg
326417cc7e8Smrg`--help=short'
327417cc7e8Smrg`--help=recursive'
328417cc7e8Smrg     Print a summary of the options unique to this package's
329417cc7e8Smrg     `configure', and exit.  The `short' variant lists options used
330417cc7e8Smrg     only in the top level, while the `recursive' variant lists options
331417cc7e8Smrg     also present in any nested packages.
332417cc7e8Smrg
333417cc7e8Smrg`--version'
334417cc7e8Smrg`-V'
335417cc7e8Smrg     Print the version of Autoconf used to generate the `configure'
336417cc7e8Smrg     script, and exit.
337417cc7e8Smrg
338417cc7e8Smrg`--cache-file=FILE'
339417cc7e8Smrg     Enable the cache: use and save the results of the tests in FILE,
340417cc7e8Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341417cc7e8Smrg     disable caching.
342417cc7e8Smrg
343417cc7e8Smrg`--config-cache'
344417cc7e8Smrg`-C'
345417cc7e8Smrg     Alias for `--cache-file=config.cache'.
346417cc7e8Smrg
347417cc7e8Smrg`--quiet'
348417cc7e8Smrg`--silent'
349417cc7e8Smrg`-q'
350417cc7e8Smrg     Do not print messages saying which checks are being made.  To
351417cc7e8Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352417cc7e8Smrg     messages will still be shown).
353417cc7e8Smrg
354417cc7e8Smrg`--srcdir=DIR'
355417cc7e8Smrg     Look for the package's source code in directory DIR.  Usually
356417cc7e8Smrg     `configure' can determine that directory automatically.
357417cc7e8Smrg
358417cc7e8Smrg`--prefix=DIR'
3596c9573adSmrg     Use DIR as the installation prefix.  *note Installation Names::
360417cc7e8Smrg     for more details, including other options available for fine-tuning
361417cc7e8Smrg     the installation locations.
362417cc7e8Smrg
363417cc7e8Smrg`--no-create'
364417cc7e8Smrg`-n'
365417cc7e8Smrg     Run the configure checks, but stop before creating any output
366417cc7e8Smrg     files.
367417cc7e8Smrg
368417cc7e8Smrg`configure' also accepts some other, not widely useful, options.  Run
369417cc7e8Smrg`configure --help' for more details.
370af7c02bdSmrg
371