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