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