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