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