1b425557eSmrgInstallation Instructions
2b425557eSmrg*************************
3b425557eSmrg
4414bd68fSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5414bd68fSmrgInc.
6b425557eSmrg
7414bd68fSmrg   Copying and distribution of this file, with or without modification,
8414bd68fSmrgare permitted in any medium without royalty provided the copyright
9414bd68fSmrgnotice and this notice are preserved.  This file is offered as-is,
10414bd68fSmrgwithout warranty of any kind.
11b425557eSmrg
12b425557eSmrgBasic Installation
13b425557eSmrg==================
14b425557eSmrg
15b425557eSmrg   Briefly, the shell commands `./configure; make; make install' should
16b425557eSmrgconfigure, build, and install this package.  The following
17b425557eSmrgmore-detailed instructions are generic; see the `README' file for
18414bd68fSmrginstructions specific to this package.  Some packages provide this
19414bd68fSmrg`INSTALL' file but do not implement all of the features documented
20414bd68fSmrgbelow.  The lack of an optional feature in a given package is not
21414bd68fSmrgnecessarily a bug.  More recommendations for GNU packages can be found
22414bd68fSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
23b425557eSmrg
24b425557eSmrg   The `configure' shell script attempts to guess correct values for
25b425557eSmrgvarious system-dependent variables used during compilation.  It uses
26b425557eSmrgthose values to create a `Makefile' in each directory of the package.
27b425557eSmrgIt may also create one or more `.h' files containing system-dependent
28b425557eSmrgdefinitions.  Finally, it creates a shell script `config.status' that
29b425557eSmrgyou can run in the future to recreate the current configuration, and a
30b425557eSmrgfile `config.log' containing compiler output (useful mainly for
31b425557eSmrgdebugging `configure').
32b425557eSmrg
33b425557eSmrg   It can also use an optional file (typically called `config.cache'
34b425557eSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35b425557eSmrgthe results of its tests to speed up reconfiguring.  Caching is
36b425557eSmrgdisabled by default to prevent problems with accidental use of stale
37b425557eSmrgcache files.
38b425557eSmrg
39b425557eSmrg   If you need to do unusual things to compile the package, please try
40b425557eSmrgto figure out how `configure' could check whether to do them, and mail
41b425557eSmrgdiffs or instructions to the address given in the `README' so they can
42b425557eSmrgbe considered for the next release.  If you are using the cache, and at
43b425557eSmrgsome point `config.cache' contains results you don't want to keep, you
44b425557eSmrgmay remove or edit it.
45b425557eSmrg
46b425557eSmrg   The file `configure.ac' (or `configure.in') is used to create
47b425557eSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48b425557eSmrgyou want to change it or regenerate `configure' using a newer version
49b425557eSmrgof `autoconf'.
50b425557eSmrg
51414bd68fSmrg   The simplest way to compile this package is:
52b425557eSmrg
53b425557eSmrg  1. `cd' to the directory containing the package's source code and type
54b425557eSmrg     `./configure' to configure the package for your system.
55b425557eSmrg
56b425557eSmrg     Running `configure' might take a while.  While running, it prints
57b425557eSmrg     some messages telling which features it is checking for.
58b425557eSmrg
59b425557eSmrg  2. Type `make' to compile the package.
60b425557eSmrg
61b425557eSmrg  3. Optionally, type `make check' to run any self-tests that come with
62414bd68fSmrg     the package, generally using the just-built uninstalled binaries.
63b425557eSmrg
64b425557eSmrg  4. Type `make install' to install the programs and any data files and
65414bd68fSmrg     documentation.  When installing into a prefix owned by root, it is
66414bd68fSmrg     recommended that the package be configured and built as a regular
67414bd68fSmrg     user, and only the `make install' phase executed with root
68414bd68fSmrg     privileges.
69414bd68fSmrg
70414bd68fSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71414bd68fSmrg     this time using the binaries in their final installed location.
72414bd68fSmrg     This target does not install anything.  Running this target as a
73414bd68fSmrg     regular user, particularly if the prior `make install' required
74414bd68fSmrg     root privileges, verifies that the installation completed
75414bd68fSmrg     correctly.
76414bd68fSmrg
77414bd68fSmrg  6. You can remove the program binaries and object files from the
78b425557eSmrg     source code directory by typing `make clean'.  To also remove the
79b425557eSmrg     files that `configure' created (so you can compile the package for
80b425557eSmrg     a different kind of computer), type `make distclean'.  There is
81b425557eSmrg     also a `make maintainer-clean' target, but that is intended mainly
82b425557eSmrg     for the package's developers.  If you use it, you may have to get
83b425557eSmrg     all sorts of other programs in order to regenerate files that came
84b425557eSmrg     with the distribution.
85b425557eSmrg
86414bd68fSmrg  7. Often, you can also type `make uninstall' to remove the installed
87414bd68fSmrg     files again.  In practice, not all packages have tested that
88414bd68fSmrg     uninstallation works correctly, even though it is required by the
89414bd68fSmrg     GNU Coding Standards.
90414bd68fSmrg
91414bd68fSmrg  8. Some packages, particularly those that use Automake, provide `make
92414bd68fSmrg     distcheck', which can by used by developers to test that all other
93414bd68fSmrg     targets like `make install' and `make uninstall' work correctly.
94414bd68fSmrg     This target is generally not run by end users.
95b425557eSmrg
96b425557eSmrgCompilers and Options
97b425557eSmrg=====================
98b425557eSmrg
99b425557eSmrg   Some systems require unusual options for compilation or linking that
100b425557eSmrgthe `configure' script does not know about.  Run `./configure --help'
101b425557eSmrgfor details on some of the pertinent environment variables.
102b425557eSmrg
103b425557eSmrg   You can give `configure' initial values for configuration parameters
104b425557eSmrgby setting variables in the command line or in the environment.  Here
105b425557eSmrgis an example:
106b425557eSmrg
107b425557eSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108b425557eSmrg
109b425557eSmrg   *Note Defining Variables::, for more details.
110b425557eSmrg
111b425557eSmrgCompiling For Multiple Architectures
112b425557eSmrg====================================
113b425557eSmrg
114b425557eSmrg   You can compile the package for more than one kind of computer at the
115b425557eSmrgsame time, by placing the object files for each architecture in their
116b425557eSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117b425557eSmrgdirectory where you want the object files and executables to go and run
118b425557eSmrgthe `configure' script.  `configure' automatically checks for the
119414bd68fSmrgsource code in the directory that `configure' is in and in `..'.  This
120414bd68fSmrgis known as a "VPATH" build.
121b425557eSmrg
122b425557eSmrg   With a non-GNU `make', it is safer to compile the package for one
123b425557eSmrgarchitecture at a time in the source code directory.  After you have
124b425557eSmrginstalled the package for one architecture, use `make distclean' before
125b425557eSmrgreconfiguring for another architecture.
126b425557eSmrg
127b425557eSmrg   On MacOS X 10.5 and later systems, you can create libraries and
128b425557eSmrgexecutables that work on multiple system types--known as "fat" or
129b425557eSmrg"universal" binaries--by specifying multiple `-arch' options to the
130b425557eSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
131b425557eSmrgthis:
132b425557eSmrg
133b425557eSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134b425557eSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135b425557eSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
136b425557eSmrg
137b425557eSmrg   This is not guaranteed to produce working output in all cases, you
138b425557eSmrgmay have to build one architecture at a time and combine the results
139b425557eSmrgusing the `lipo' tool if you have problems.
140b425557eSmrg
141b425557eSmrgInstallation Names
142b425557eSmrg==================
143b425557eSmrg
144b425557eSmrg   By default, `make install' installs the package's commands under
145b425557eSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146b425557eSmrgcan specify an installation prefix other than `/usr/local' by giving
147414bd68fSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148414bd68fSmrgabsolute file name.
149b425557eSmrg
150b425557eSmrg   You can specify separate installation prefixes for
151b425557eSmrgarchitecture-specific files and architecture-independent files.  If you
152b425557eSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153b425557eSmrgPREFIX as the prefix for installing programs and libraries.
154b425557eSmrgDocumentation and other data files still use the regular prefix.
155b425557eSmrg
156b425557eSmrg   In addition, if you use an unusual directory layout you can give
157b425557eSmrgoptions like `--bindir=DIR' to specify different values for particular
158b425557eSmrgkinds of files.  Run `configure --help' for a list of the directories
159414bd68fSmrgyou can set and what kinds of files go in them.  In general, the
160414bd68fSmrgdefault for these options is expressed in terms of `${prefix}', so that
161414bd68fSmrgspecifying just `--prefix' will affect all of the other directory
162414bd68fSmrgspecifications that were not explicitly provided.
163414bd68fSmrg
164414bd68fSmrg   The most portable way to affect installation locations is to pass the
165414bd68fSmrgcorrect locations to `configure'; however, many packages provide one or
166414bd68fSmrgboth of the following shortcuts of passing variable assignments to the
167414bd68fSmrg`make install' command line to change installation locations without
168414bd68fSmrghaving to reconfigure or recompile.
169414bd68fSmrg
170414bd68fSmrg   The first method involves providing an override variable for each
171414bd68fSmrgaffected directory.  For example, `make install
172414bd68fSmrgprefix=/alternate/directory' will choose an alternate location for all
173414bd68fSmrgdirectory configuration variables that were expressed in terms of
174414bd68fSmrg`${prefix}'.  Any directories that were specified during `configure',
175414bd68fSmrgbut not in terms of `${prefix}', must each be overridden at install
176414bd68fSmrgtime for the entire installation to be relocated.  The approach of
177414bd68fSmrgmakefile variable overrides for each directory variable is required by
178414bd68fSmrgthe GNU Coding Standards, and ideally causes no recompilation.
179414bd68fSmrgHowever, some platforms have known limitations with the semantics of
180414bd68fSmrgshared libraries that end up requiring recompilation when using this
181414bd68fSmrgmethod, particularly noticeable in packages that use GNU Libtool.
182414bd68fSmrg
183414bd68fSmrg   The second method involves providing the `DESTDIR' variable.  For
184414bd68fSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
185414bd68fSmrg`/alternate/directory' before all installation names.  The approach of
186414bd68fSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187414bd68fSmrgdoes not work on platforms that have drive letters.  On the other hand,
188414bd68fSmrgit does better at avoiding recompilation issues, and works well even
189414bd68fSmrgwhen some directory options were not specified in terms of `${prefix}'
190414bd68fSmrgat `configure' time.
191414bd68fSmrg
192414bd68fSmrgOptional Features
193414bd68fSmrg=================
194b425557eSmrg
195b425557eSmrg   If the package supports it, you can cause programs to be installed
196b425557eSmrgwith an extra prefix or suffix on their names by giving `configure' the
197b425557eSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198b425557eSmrg
199b425557eSmrg   Some packages pay attention to `--enable-FEATURE' options to
200b425557eSmrg`configure', where FEATURE indicates an optional part of the package.
201b425557eSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202b425557eSmrgis something like `gnu-as' or `x' (for the X Window System).  The
203b425557eSmrg`README' should mention any `--enable-' and `--with-' options that the
204b425557eSmrgpackage recognizes.
205b425557eSmrg
206b425557eSmrg   For packages that use the X Window System, `configure' can usually
207b425557eSmrgfind the X include and library files automatically, but if it doesn't,
208b425557eSmrgyou can use the `configure' options `--x-includes=DIR' and
209b425557eSmrg`--x-libraries=DIR' to specify their locations.
210b425557eSmrg
211414bd68fSmrg   Some packages offer the ability to configure how verbose the
212414bd68fSmrgexecution of `make' will be.  For these packages, running `./configure
213414bd68fSmrg--enable-silent-rules' sets the default to minimal output, which can be
214414bd68fSmrgoverridden with `make V=1'; while running `./configure
215414bd68fSmrg--disable-silent-rules' sets the default to verbose, which can be
216414bd68fSmrgoverridden with `make V=0'.
217414bd68fSmrg
218b425557eSmrgParticular systems
219b425557eSmrg==================
220b425557eSmrg
221b425557eSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222b425557eSmrgCC is not installed, it is recommended to use the following options in
223b425557eSmrgorder to use an ANSI C compiler:
224b425557eSmrg
225414bd68fSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226b425557eSmrg
227b425557eSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228b425557eSmrg
229414bd68fSmrg   HP-UX `make' updates targets which have the same time stamps as
230414bd68fSmrgtheir prerequisites, which makes it generally unusable when shipped
231414bd68fSmrggenerated files such as `configure' are involved.  Use GNU `make'
232414bd68fSmrginstead.
233414bd68fSmrg
234b425557eSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235b425557eSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236b425557eSmrga workaround.  If GNU CC is not installed, it is therefore recommended
237b425557eSmrgto try
238b425557eSmrg
239b425557eSmrg     ./configure CC="cc"
240b425557eSmrg
241b425557eSmrgand if that doesn't work, try
242b425557eSmrg
243b425557eSmrg     ./configure CC="cc -nodtk"
244b425557eSmrg
245414bd68fSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246414bd68fSmrgdirectory contains several dysfunctional programs; working variants of
247414bd68fSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248414bd68fSmrgin your `PATH', put it _after_ `/usr/bin'.
249414bd68fSmrg
250414bd68fSmrg   On Haiku, software installed for all users goes in `/boot/common',
251414bd68fSmrgnot `/usr/local'.  It is recommended to use the following options:
252414bd68fSmrg
253414bd68fSmrg     ./configure --prefix=/boot/common
254414bd68fSmrg
255b425557eSmrgSpecifying the System Type
256b425557eSmrg==========================
257b425557eSmrg
258b425557eSmrg   There may be some features `configure' cannot figure out
259b425557eSmrgautomatically, but needs to determine by the type of machine the package
260b425557eSmrgwill run on.  Usually, assuming the package is built to be run on the
261b425557eSmrg_same_ architectures, `configure' can figure that out, but if it prints
262b425557eSmrga message saying it cannot guess the machine type, give it the
263b425557eSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
264b425557eSmrgtype, such as `sun4', or a canonical name which has the form:
265b425557eSmrg
266b425557eSmrg     CPU-COMPANY-SYSTEM
267b425557eSmrg
268b425557eSmrgwhere SYSTEM can have one of these forms:
269b425557eSmrg
270414bd68fSmrg     OS
271414bd68fSmrg     KERNEL-OS
272b425557eSmrg
273b425557eSmrg   See the file `config.sub' for the possible values of each field.  If
274b425557eSmrg`config.sub' isn't included in this package, then this package doesn't
275b425557eSmrgneed to know the machine type.
276b425557eSmrg
277b425557eSmrg   If you are _building_ compiler tools for cross-compiling, you should
278b425557eSmrguse the option `--target=TYPE' to select the type of system they will
279b425557eSmrgproduce code for.
280b425557eSmrg
281b425557eSmrg   If you want to _use_ a cross compiler, that generates code for a
282b425557eSmrgplatform different from the build platform, you should specify the
283b425557eSmrg"host" platform (i.e., that on which the generated programs will
284b425557eSmrgeventually be run) with `--host=TYPE'.
285b425557eSmrg
286b425557eSmrgSharing Defaults
287b425557eSmrg================
288b425557eSmrg
289b425557eSmrg   If you want to set default values for `configure' scripts to share,
290b425557eSmrgyou can create a site shell script called `config.site' that gives
291b425557eSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
292b425557eSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293b425557eSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294b425557eSmrg`CONFIG_SITE' environment variable to the location of the site script.
295b425557eSmrgA warning: not all `configure' scripts look for a site script.
296b425557eSmrg
297b425557eSmrgDefining Variables
298b425557eSmrg==================
299b425557eSmrg
300b425557eSmrg   Variables not defined in a site shell script can be set in the
301b425557eSmrgenvironment passed to `configure'.  However, some packages may run
302b425557eSmrgconfigure again during the build, and the customized values of these
303b425557eSmrgvariables may be lost.  In order to avoid this problem, you should set
304b425557eSmrgthem in the `configure' command line, using `VAR=value'.  For example:
305b425557eSmrg
306b425557eSmrg     ./configure CC=/usr/local2/bin/gcc
307b425557eSmrg
308b425557eSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
309b425557eSmrgoverridden in the site shell script).
310b425557eSmrg
311b425557eSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312b425557eSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313b425557eSmrg
314b425557eSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315b425557eSmrg
316b425557eSmrg`configure' Invocation
317b425557eSmrg======================
318b425557eSmrg
319b425557eSmrg   `configure' recognizes the following options to control how it
320b425557eSmrgoperates.
321b425557eSmrg
322b425557eSmrg`--help'
323b425557eSmrg`-h'
324b425557eSmrg     Print a summary of all of the options to `configure', and exit.
325b425557eSmrg
326b425557eSmrg`--help=short'
327b425557eSmrg`--help=recursive'
328b425557eSmrg     Print a summary of the options unique to this package's
329b425557eSmrg     `configure', and exit.  The `short' variant lists options used
330b425557eSmrg     only in the top level, while the `recursive' variant lists options
331b425557eSmrg     also present in any nested packages.
332b425557eSmrg
333b425557eSmrg`--version'
334b425557eSmrg`-V'
335b425557eSmrg     Print the version of Autoconf used to generate the `configure'
336b425557eSmrg     script, and exit.
337b425557eSmrg
338b425557eSmrg`--cache-file=FILE'
339b425557eSmrg     Enable the cache: use and save the results of the tests in FILE,
340b425557eSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341b425557eSmrg     disable caching.
342b425557eSmrg
343b425557eSmrg`--config-cache'
344b425557eSmrg`-C'
345b425557eSmrg     Alias for `--cache-file=config.cache'.
346b425557eSmrg
347b425557eSmrg`--quiet'
348b425557eSmrg`--silent'
349b425557eSmrg`-q'
350b425557eSmrg     Do not print messages saying which checks are being made.  To
351b425557eSmrg     suppress all normal output, redirect it to `/dev/null' (any error
352b425557eSmrg     messages will still be shown).
353b425557eSmrg
354b425557eSmrg`--srcdir=DIR'
355b425557eSmrg     Look for the package's source code in directory DIR.  Usually
356b425557eSmrg     `configure' can determine that directory automatically.
357b425557eSmrg
358b425557eSmrg`--prefix=DIR'
359414bd68fSmrg     Use DIR as the installation prefix.  *note Installation Names::
360b425557eSmrg     for more details, including other options available for fine-tuning
361b425557eSmrg     the installation locations.
362b425557eSmrg
363b425557eSmrg`--no-create'
364b425557eSmrg`-n'
365b425557eSmrg     Run the configure checks, but stop before creating any output
366b425557eSmrg     files.
367b425557eSmrg
368b425557eSmrg`configure' also accepts some other, not widely useful, options.  Run
369b425557eSmrg`configure --help' for more details.
370b425557eSmrg
371