1bb068e1dSmrgInstallation Instructions
2bb068e1dSmrg*************************
3bb068e1dSmrg
4bb068e1dSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5bb068e1dSmrgInc.
6bb068e1dSmrg
7bb068e1dSmrg   Copying and distribution of this file, with or without modification,
8bb068e1dSmrgare permitted in any medium without royalty provided the copyright
9bb068e1dSmrgnotice and this notice are preserved.  This file is offered as-is,
10bb068e1dSmrgwithout warranty of any kind.
11bb068e1dSmrg
12bb068e1dSmrgBasic Installation
13bb068e1dSmrg==================
14bb068e1dSmrg
15bb068e1dSmrg   Briefly, the shell commands `./configure; make; make install' should
16bb068e1dSmrgconfigure, build, and install this package.  The following
17bb068e1dSmrgmore-detailed instructions are generic; see the `README' file for
18bb068e1dSmrginstructions specific to this package.  Some packages provide this
19bb068e1dSmrg`INSTALL' file but do not implement all of the features documented
20bb068e1dSmrgbelow.  The lack of an optional feature in a given package is not
21bb068e1dSmrgnecessarily a bug.  More recommendations for GNU packages can be found
22bb068e1dSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
23bb068e1dSmrg
24bb068e1dSmrg   The `configure' shell script attempts to guess correct values for
25bb068e1dSmrgvarious system-dependent variables used during compilation.  It uses
26bb068e1dSmrgthose values to create a `Makefile' in each directory of the package.
27bb068e1dSmrgIt may also create one or more `.h' files containing system-dependent
28bb068e1dSmrgdefinitions.  Finally, it creates a shell script `config.status' that
29bb068e1dSmrgyou can run in the future to recreate the current configuration, and a
30bb068e1dSmrgfile `config.log' containing compiler output (useful mainly for
31bb068e1dSmrgdebugging `configure').
32bb068e1dSmrg
33bb068e1dSmrg   It can also use an optional file (typically called `config.cache'
34bb068e1dSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35bb068e1dSmrgthe results of its tests to speed up reconfiguring.  Caching is
36bb068e1dSmrgdisabled by default to prevent problems with accidental use of stale
37bb068e1dSmrgcache files.
38bb068e1dSmrg
39bb068e1dSmrg   If you need to do unusual things to compile the package, please try
40bb068e1dSmrgto figure out how `configure' could check whether to do them, and mail
41bb068e1dSmrgdiffs or instructions to the address given in the `README' so they can
42bb068e1dSmrgbe considered for the next release.  If you are using the cache, and at
43bb068e1dSmrgsome point `config.cache' contains results you don't want to keep, you
44bb068e1dSmrgmay remove or edit it.
45bb068e1dSmrg
46bb068e1dSmrg   The file `configure.ac' (or `configure.in') is used to create
47bb068e1dSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48bb068e1dSmrgyou want to change it or regenerate `configure' using a newer version
49bb068e1dSmrgof `autoconf'.
50bb068e1dSmrg
51bb068e1dSmrg   The simplest way to compile this package is:
52bb068e1dSmrg
53bb068e1dSmrg  1. `cd' to the directory containing the package's source code and type
54bb068e1dSmrg     `./configure' to configure the package for your system.
55bb068e1dSmrg
56bb068e1dSmrg     Running `configure' might take a while.  While running, it prints
57bb068e1dSmrg     some messages telling which features it is checking for.
58bb068e1dSmrg
59bb068e1dSmrg  2. Type `make' to compile the package.
60bb068e1dSmrg
61bb068e1dSmrg  3. Optionally, type `make check' to run any self-tests that come with
62bb068e1dSmrg     the package, generally using the just-built uninstalled binaries.
63bb068e1dSmrg
64bb068e1dSmrg  4. Type `make install' to install the programs and any data files and
65bb068e1dSmrg     documentation.  When installing into a prefix owned by root, it is
66bb068e1dSmrg     recommended that the package be configured and built as a regular
67bb068e1dSmrg     user, and only the `make install' phase executed with root
68bb068e1dSmrg     privileges.
69bb068e1dSmrg
70bb068e1dSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71bb068e1dSmrg     this time using the binaries in their final installed location.
72bb068e1dSmrg     This target does not install anything.  Running this target as a
73bb068e1dSmrg     regular user, particularly if the prior `make install' required
74bb068e1dSmrg     root privileges, verifies that the installation completed
75bb068e1dSmrg     correctly.
76bb068e1dSmrg
77bb068e1dSmrg  6. You can remove the program binaries and object files from the
78bb068e1dSmrg     source code directory by typing `make clean'.  To also remove the
79bb068e1dSmrg     files that `configure' created (so you can compile the package for
80bb068e1dSmrg     a different kind of computer), type `make distclean'.  There is
81bb068e1dSmrg     also a `make maintainer-clean' target, but that is intended mainly
82bb068e1dSmrg     for the package's developers.  If you use it, you may have to get
83bb068e1dSmrg     all sorts of other programs in order to regenerate files that came
84bb068e1dSmrg     with the distribution.
85bb068e1dSmrg
86bb068e1dSmrg  7. Often, you can also type `make uninstall' to remove the installed
87bb068e1dSmrg     files again.  In practice, not all packages have tested that
88bb068e1dSmrg     uninstallation works correctly, even though it is required by the
89bb068e1dSmrg     GNU Coding Standards.
90bb068e1dSmrg
91bb068e1dSmrg  8. Some packages, particularly those that use Automake, provide `make
92bb068e1dSmrg     distcheck', which can by used by developers to test that all other
93bb068e1dSmrg     targets like `make install' and `make uninstall' work correctly.
94bb068e1dSmrg     This target is generally not run by end users.
95bb068e1dSmrg
96bb068e1dSmrgCompilers and Options
97bb068e1dSmrg=====================
98bb068e1dSmrg
99bb068e1dSmrg   Some systems require unusual options for compilation or linking that
100bb068e1dSmrgthe `configure' script does not know about.  Run `./configure --help'
101bb068e1dSmrgfor details on some of the pertinent environment variables.
102bb068e1dSmrg
103bb068e1dSmrg   You can give `configure' initial values for configuration parameters
104bb068e1dSmrgby setting variables in the command line or in the environment.  Here
105bb068e1dSmrgis an example:
106bb068e1dSmrg
107bb068e1dSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108bb068e1dSmrg
109bb068e1dSmrg   *Note Defining Variables::, for more details.
110bb068e1dSmrg
111bb068e1dSmrgCompiling For Multiple Architectures
112bb068e1dSmrg====================================
113bb068e1dSmrg
114bb068e1dSmrg   You can compile the package for more than one kind of computer at the
115bb068e1dSmrgsame time, by placing the object files for each architecture in their
116bb068e1dSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117bb068e1dSmrgdirectory where you want the object files and executables to go and run
118bb068e1dSmrgthe `configure' script.  `configure' automatically checks for the
119bb068e1dSmrgsource code in the directory that `configure' is in and in `..'.  This
120bb068e1dSmrgis known as a "VPATH" build.
121bb068e1dSmrg
122bb068e1dSmrg   With a non-GNU `make', it is safer to compile the package for one
123bb068e1dSmrgarchitecture at a time in the source code directory.  After you have
124bb068e1dSmrginstalled the package for one architecture, use `make distclean' before
125bb068e1dSmrgreconfiguring for another architecture.
126bb068e1dSmrg
127bb068e1dSmrg   On MacOS X 10.5 and later systems, you can create libraries and
128bb068e1dSmrgexecutables that work on multiple system types--known as "fat" or
129bb068e1dSmrg"universal" binaries--by specifying multiple `-arch' options to the
130bb068e1dSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
131bb068e1dSmrgthis:
132bb068e1dSmrg
133bb068e1dSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134bb068e1dSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135bb068e1dSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
136bb068e1dSmrg
137bb068e1dSmrg   This is not guaranteed to produce working output in all cases, you
138bb068e1dSmrgmay have to build one architecture at a time and combine the results
139bb068e1dSmrgusing the `lipo' tool if you have problems.
140bb068e1dSmrg
141bb068e1dSmrgInstallation Names
142bb068e1dSmrg==================
143bb068e1dSmrg
144bb068e1dSmrg   By default, `make install' installs the package's commands under
145bb068e1dSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146bb068e1dSmrgcan specify an installation prefix other than `/usr/local' by giving
147bb068e1dSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148bb068e1dSmrgabsolute file name.
149bb068e1dSmrg
150bb068e1dSmrg   You can specify separate installation prefixes for
151bb068e1dSmrgarchitecture-specific files and architecture-independent files.  If you
152bb068e1dSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153bb068e1dSmrgPREFIX as the prefix for installing programs and libraries.
154bb068e1dSmrgDocumentation and other data files still use the regular prefix.
155bb068e1dSmrg
156bb068e1dSmrg   In addition, if you use an unusual directory layout you can give
157bb068e1dSmrgoptions like `--bindir=DIR' to specify different values for particular
158bb068e1dSmrgkinds of files.  Run `configure --help' for a list of the directories
159bb068e1dSmrgyou can set and what kinds of files go in them.  In general, the
160bb068e1dSmrgdefault for these options is expressed in terms of `${prefix}', so that
161bb068e1dSmrgspecifying just `--prefix' will affect all of the other directory
162bb068e1dSmrgspecifications that were not explicitly provided.
163bb068e1dSmrg
164bb068e1dSmrg   The most portable way to affect installation locations is to pass the
165bb068e1dSmrgcorrect locations to `configure'; however, many packages provide one or
166bb068e1dSmrgboth of the following shortcuts of passing variable assignments to the
167bb068e1dSmrg`make install' command line to change installation locations without
168bb068e1dSmrghaving to reconfigure or recompile.
169bb068e1dSmrg
170bb068e1dSmrg   The first method involves providing an override variable for each
171bb068e1dSmrgaffected directory.  For example, `make install
172bb068e1dSmrgprefix=/alternate/directory' will choose an alternate location for all
173bb068e1dSmrgdirectory configuration variables that were expressed in terms of
174bb068e1dSmrg`${prefix}'.  Any directories that were specified during `configure',
175bb068e1dSmrgbut not in terms of `${prefix}', must each be overridden at install
176bb068e1dSmrgtime for the entire installation to be relocated.  The approach of
177bb068e1dSmrgmakefile variable overrides for each directory variable is required by
178bb068e1dSmrgthe GNU Coding Standards, and ideally causes no recompilation.
179bb068e1dSmrgHowever, some platforms have known limitations with the semantics of
180bb068e1dSmrgshared libraries that end up requiring recompilation when using this
181bb068e1dSmrgmethod, particularly noticeable in packages that use GNU Libtool.
182bb068e1dSmrg
183bb068e1dSmrg   The second method involves providing the `DESTDIR' variable.  For
184bb068e1dSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
185bb068e1dSmrg`/alternate/directory' before all installation names.  The approach of
186bb068e1dSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187bb068e1dSmrgdoes not work on platforms that have drive letters.  On the other hand,
188bb068e1dSmrgit does better at avoiding recompilation issues, and works well even
189bb068e1dSmrgwhen some directory options were not specified in terms of `${prefix}'
190bb068e1dSmrgat `configure' time.
191bb068e1dSmrg
192bb068e1dSmrgOptional Features
193bb068e1dSmrg=================
194bb068e1dSmrg
195bb068e1dSmrg   If the package supports it, you can cause programs to be installed
196bb068e1dSmrgwith an extra prefix or suffix on their names by giving `configure' the
197bb068e1dSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198bb068e1dSmrg
199bb068e1dSmrg   Some packages pay attention to `--enable-FEATURE' options to
200bb068e1dSmrg`configure', where FEATURE indicates an optional part of the package.
201bb068e1dSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202bb068e1dSmrgis something like `gnu-as' or `x' (for the X Window System).  The
203bb068e1dSmrg`README' should mention any `--enable-' and `--with-' options that the
204bb068e1dSmrgpackage recognizes.
205bb068e1dSmrg
206bb068e1dSmrg   For packages that use the X Window System, `configure' can usually
207bb068e1dSmrgfind the X include and library files automatically, but if it doesn't,
208bb068e1dSmrgyou can use the `configure' options `--x-includes=DIR' and
209bb068e1dSmrg`--x-libraries=DIR' to specify their locations.
210bb068e1dSmrg
211bb068e1dSmrg   Some packages offer the ability to configure how verbose the
212bb068e1dSmrgexecution of `make' will be.  For these packages, running `./configure
213bb068e1dSmrg--enable-silent-rules' sets the default to minimal output, which can be
214bb068e1dSmrgoverridden with `make V=1'; while running `./configure
215bb068e1dSmrg--disable-silent-rules' sets the default to verbose, which can be
216bb068e1dSmrgoverridden with `make V=0'.
217bb068e1dSmrg
218bb068e1dSmrgParticular systems
219bb068e1dSmrg==================
220bb068e1dSmrg
221bb068e1dSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222bb068e1dSmrgCC is not installed, it is recommended to use the following options in
223bb068e1dSmrgorder to use an ANSI C compiler:
224bb068e1dSmrg
225bb068e1dSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226bb068e1dSmrg
227bb068e1dSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228bb068e1dSmrg
229bb068e1dSmrg   HP-UX `make' updates targets which have the same time stamps as
230bb068e1dSmrgtheir prerequisites, which makes it generally unusable when shipped
231bb068e1dSmrggenerated files such as `configure' are involved.  Use GNU `make'
232bb068e1dSmrginstead.
233bb068e1dSmrg
234bb068e1dSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235bb068e1dSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236bb068e1dSmrga workaround.  If GNU CC is not installed, it is therefore recommended
237bb068e1dSmrgto try
238bb068e1dSmrg
239bb068e1dSmrg     ./configure CC="cc"
240bb068e1dSmrg
241bb068e1dSmrgand if that doesn't work, try
242bb068e1dSmrg
243bb068e1dSmrg     ./configure CC="cc -nodtk"
244bb068e1dSmrg
245bb068e1dSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246bb068e1dSmrgdirectory contains several dysfunctional programs; working variants of
247bb068e1dSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248bb068e1dSmrgin your `PATH', put it _after_ `/usr/bin'.
249bb068e1dSmrg
250bb068e1dSmrg   On Haiku, software installed for all users goes in `/boot/common',
251bb068e1dSmrgnot `/usr/local'.  It is recommended to use the following options:
252bb068e1dSmrg
253bb068e1dSmrg     ./configure --prefix=/boot/common
254bb068e1dSmrg
255bb068e1dSmrgSpecifying the System Type
256bb068e1dSmrg==========================
257bb068e1dSmrg
258bb068e1dSmrg   There may be some features `configure' cannot figure out
259bb068e1dSmrgautomatically, but needs to determine by the type of machine the package
260bb068e1dSmrgwill run on.  Usually, assuming the package is built to be run on the
261bb068e1dSmrg_same_ architectures, `configure' can figure that out, but if it prints
262bb068e1dSmrga message saying it cannot guess the machine type, give it the
263bb068e1dSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
264bb068e1dSmrgtype, such as `sun4', or a canonical name which has the form:
265bb068e1dSmrg
266bb068e1dSmrg     CPU-COMPANY-SYSTEM
267bb068e1dSmrg
268bb068e1dSmrgwhere SYSTEM can have one of these forms:
269bb068e1dSmrg
270bb068e1dSmrg     OS
271bb068e1dSmrg     KERNEL-OS
272bb068e1dSmrg
273bb068e1dSmrg   See the file `config.sub' for the possible values of each field.  If
274bb068e1dSmrg`config.sub' isn't included in this package, then this package doesn't
275bb068e1dSmrgneed to know the machine type.
276bb068e1dSmrg
277bb068e1dSmrg   If you are _building_ compiler tools for cross-compiling, you should
278bb068e1dSmrguse the option `--target=TYPE' to select the type of system they will
279bb068e1dSmrgproduce code for.
280bb068e1dSmrg
281bb068e1dSmrg   If you want to _use_ a cross compiler, that generates code for a
282bb068e1dSmrgplatform different from the build platform, you should specify the
283bb068e1dSmrg"host" platform (i.e., that on which the generated programs will
284bb068e1dSmrgeventually be run) with `--host=TYPE'.
285bb068e1dSmrg
286bb068e1dSmrgSharing Defaults
287bb068e1dSmrg================
288bb068e1dSmrg
289bb068e1dSmrg   If you want to set default values for `configure' scripts to share,
290bb068e1dSmrgyou can create a site shell script called `config.site' that gives
291bb068e1dSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
292bb068e1dSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293bb068e1dSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294bb068e1dSmrg`CONFIG_SITE' environment variable to the location of the site script.
295bb068e1dSmrgA warning: not all `configure' scripts look for a site script.
296bb068e1dSmrg
297bb068e1dSmrgDefining Variables
298bb068e1dSmrg==================
299bb068e1dSmrg
300bb068e1dSmrg   Variables not defined in a site shell script can be set in the
301bb068e1dSmrgenvironment passed to `configure'.  However, some packages may run
302bb068e1dSmrgconfigure again during the build, and the customized values of these
303bb068e1dSmrgvariables may be lost.  In order to avoid this problem, you should set
304bb068e1dSmrgthem in the `configure' command line, using `VAR=value'.  For example:
305bb068e1dSmrg
306bb068e1dSmrg     ./configure CC=/usr/local2/bin/gcc
307bb068e1dSmrg
308bb068e1dSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
309bb068e1dSmrgoverridden in the site shell script).
310bb068e1dSmrg
311bb068e1dSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312bb068e1dSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313bb068e1dSmrg
314bb068e1dSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315bb068e1dSmrg
316bb068e1dSmrg`configure' Invocation
317bb068e1dSmrg======================
318bb068e1dSmrg
319bb068e1dSmrg   `configure' recognizes the following options to control how it
320bb068e1dSmrgoperates.
321bb068e1dSmrg
322bb068e1dSmrg`--help'
323bb068e1dSmrg`-h'
324bb068e1dSmrg     Print a summary of all of the options to `configure', and exit.
325bb068e1dSmrg
326bb068e1dSmrg`--help=short'
327bb068e1dSmrg`--help=recursive'
328bb068e1dSmrg     Print a summary of the options unique to this package's
329bb068e1dSmrg     `configure', and exit.  The `short' variant lists options used
330bb068e1dSmrg     only in the top level, while the `recursive' variant lists options
331bb068e1dSmrg     also present in any nested packages.
332bb068e1dSmrg
333bb068e1dSmrg`--version'
334bb068e1dSmrg`-V'
335bb068e1dSmrg     Print the version of Autoconf used to generate the `configure'
336bb068e1dSmrg     script, and exit.
337bb068e1dSmrg
338bb068e1dSmrg`--cache-file=FILE'
339bb068e1dSmrg     Enable the cache: use and save the results of the tests in FILE,
340bb068e1dSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341bb068e1dSmrg     disable caching.
342bb068e1dSmrg
343bb068e1dSmrg`--config-cache'
344bb068e1dSmrg`-C'
345bb068e1dSmrg     Alias for `--cache-file=config.cache'.
346bb068e1dSmrg
347bb068e1dSmrg`--quiet'
348bb068e1dSmrg`--silent'
349bb068e1dSmrg`-q'
350bb068e1dSmrg     Do not print messages saying which checks are being made.  To
351bb068e1dSmrg     suppress all normal output, redirect it to `/dev/null' (any error
352bb068e1dSmrg     messages will still be shown).
353bb068e1dSmrg
354bb068e1dSmrg`--srcdir=DIR'
355bb068e1dSmrg     Look for the package's source code in directory DIR.  Usually
356bb068e1dSmrg     `configure' can determine that directory automatically.
357bb068e1dSmrg
358bb068e1dSmrg`--prefix=DIR'
359bb068e1dSmrg     Use DIR as the installation prefix.  *note Installation Names::
360bb068e1dSmrg     for more details, including other options available for fine-tuning
361bb068e1dSmrg     the installation locations.
362bb068e1dSmrg
363bb068e1dSmrg`--no-create'
364bb068e1dSmrg`-n'
365bb068e1dSmrg     Run the configure checks, but stop before creating any output
366bb068e1dSmrg     files.
367bb068e1dSmrg
368bb068e1dSmrg`configure' also accepts some other, not widely useful, options.  Run
369bb068e1dSmrg`configure --help' for more details.
370bb068e1dSmrg
371