1310490ScyInstallation Instructions
2310490Scy*************************
338494Sobrien
4310490ScyCopyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
5310490ScyInc.
638494Sobrien
7310490Scy   Copying and distribution of this file, with or without modification,
8310490Scyare permitted in any medium without royalty provided the copyright
9310490Scynotice and this notice are preserved.  This file is offered as-is,
10310490Scywithout warranty of any kind.
1138494Sobrien
12310490ScyBasic Installation
13310490Scy==================
14174294Sobrien
15310490Scy   Briefly, the shell command `./configure && make && make install'
16310490Scyshould configure, build, and install this package.  The following
17310490Scymore-detailed instructions are generic; see the `README' file for
18310490Scyinstructions specific to this package.  Some packages provide this
19310490Scy`INSTALL' file but do not implement all of the features documented
20310490Scybelow.  The lack of an optional feature in a given package is not
21310490Scynecessarily a bug.  More recommendations for GNU packages can be found
22310490Scyin *note Makefile Conventions: (standards)Makefile Conventions.
2338494Sobrien
24310490Scy   The `configure' shell script attempts to guess correct values for
25310490Scyvarious system-dependent variables used during compilation.  It uses
26310490Scythose values to create a `Makefile' in each directory of the package.
27310490ScyIt may also create one or more `.h' files containing system-dependent
28310490Scydefinitions.  Finally, it creates a shell script `config.status' that
29310490Scyyou can run in the future to recreate the current configuration, and a
30310490Scyfile `config.log' containing compiler output (useful mainly for
31310490Scydebugging `configure').
3238494Sobrien
33310490Scy   It can also use an optional file (typically called `config.cache'
34310490Scyand enabled with `--cache-file=config.cache' or simply `-C') that saves
35310490Scythe results of its tests to speed up reconfiguring.  Caching is
36310490Scydisabled by default to prevent problems with accidental use of stale
37310490Scycache files.
3838494Sobrien
39310490Scy   If you need to do unusual things to compile the package, please try
40310490Scyto figure out how `configure' could check whether to do them, and mail
41310490Scydiffs or instructions to the address given in the `README' so they can
42310490Scybe considered for the next release.  If you are using the cache, and at
43310490Scysome point `config.cache' contains results you don't want to keep, you
44310490Scymay remove or edit it.
4538494Sobrien
46310490Scy   The file `configure.ac' (or `configure.in') is used to create
47310490Scy`configure' by a program called `autoconf'.  You need `configure.ac' if
48310490Scyyou want to change it or regenerate `configure' using a newer version
49310490Scyof `autoconf'.
50119679Smbr
51310490Scy   The simplest way to compile this package is:
5238494Sobrien
53310490Scy  1. `cd' to the directory containing the package's source code and type
54310490Scy     `./configure' to configure the package for your system.
5538494Sobrien
56310490Scy     Running `configure' might take a while.  While running, it prints
57310490Scy     some messages telling which features it is checking for.
58310490Scy
59310490Scy  2. Type `make' to compile the package.
60310490Scy
61310490Scy  3. Optionally, type `make check' to run any self-tests that come with
62310490Scy     the package, generally using the just-built uninstalled binaries.
63310490Scy
64310490Scy  4. Type `make install' to install the programs and any data files and
65310490Scy     documentation.  When installing into a prefix owned by root, it is
66310490Scy     recommended that the package be configured and built as a regular
67310490Scy     user, and only the `make install' phase executed with root
68310490Scy     privileges.
69310490Scy
70310490Scy  5. Optionally, type `make installcheck' to repeat any self-tests, but
71310490Scy     this time using the binaries in their final installed location.
72310490Scy     This target does not install anything.  Running this target as a
73310490Scy     regular user, particularly if the prior `make install' required
74310490Scy     root privileges, verifies that the installation completed
75310490Scy     correctly.
76310490Scy
77310490Scy  6. You can remove the program binaries and object files from the
78310490Scy     source code directory by typing `make clean'.  To also remove the
79310490Scy     files that `configure' created (so you can compile the package for
80310490Scy     a different kind of computer), type `make distclean'.  There is
81310490Scy     also a `make maintainer-clean' target, but that is intended mainly
82310490Scy     for the package's developers.  If you use it, you may have to get
83310490Scy     all sorts of other programs in order to regenerate files that came
84310490Scy     with the distribution.
85310490Scy
86310490Scy  7. Often, you can also type `make uninstall' to remove the installed
87310490Scy     files again.  In practice, not all packages have tested that
88310490Scy     uninstallation works correctly, even though it is required by the
89310490Scy     GNU Coding Standards.
90310490Scy
91310490Scy  8. Some packages, particularly those that use Automake, provide `make
92310490Scy     distcheck', which can by used by developers to test that all other
93310490Scy     targets like `make install' and `make uninstall' work correctly.
94310490Scy     This target is generally not run by end users.
95310490Scy
96310490ScyCompilers and Options
97310490Scy=====================
98310490Scy
99310490Scy   Some systems require unusual options for compilation or linking that
100310490Scythe `configure' script does not know about.  Run `./configure --help'
101310490Scyfor details on some of the pertinent environment variables.
102310490Scy
103310490Scy   You can give `configure' initial values for configuration parameters
104310490Scyby setting variables in the command line or in the environment.  Here
105310490Scyis an example:
106310490Scy
107310490Scy     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108310490Scy
109310490Scy   *Note Defining Variables::, for more details.
110310490Scy
111310490ScyCompiling For Multiple Architectures
112310490Scy====================================
113310490Scy
114310490Scy   You can compile the package for more than one kind of computer at the
115310490Scysame time, by placing the object files for each architecture in their
116310490Scyown directory.  To do this, you can use GNU `make'.  `cd' to the
117310490Scydirectory where you want the object files and executables to go and run
118310490Scythe `configure' script.  `configure' automatically checks for the
119310490Scysource code in the directory that `configure' is in and in `..'.  This
120310490Scyis known as a "VPATH" build.
121310490Scy
122310490Scy   With a non-GNU `make', it is safer to compile the package for one
123310490Scyarchitecture at a time in the source code directory.  After you have
124310490Scyinstalled the package for one architecture, use `make distclean' before
125310490Scyreconfiguring for another architecture.
126310490Scy
127310490Scy   On MacOS X 10.5 and later systems, you can create libraries and
128310490Scyexecutables that work on multiple system types--known as "fat" or
129310490Scy"universal" binaries--by specifying multiple `-arch' options to the
130310490Scycompiler but only a single `-arch' option to the preprocessor.  Like
131310490Scythis:
132310490Scy
133310490Scy     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134310490Scy                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135310490Scy                 CPP="gcc -E" CXXCPP="g++ -E"
136310490Scy
137310490Scy   This is not guaranteed to produce working output in all cases, you
138310490Scymay have to build one architecture at a time and combine the results
139310490Scyusing the `lipo' tool if you have problems.
140310490Scy
141310490ScyInstallation Names
142310490Scy==================
143310490Scy
144310490Scy   By default, `make install' installs the package's commands under
145310490Scy`/usr/local/bin', include files under `/usr/local/include', etc.  You
146310490Scycan specify an installation prefix other than `/usr/local' by giving
147310490Scy`configure' the option `--prefix=PREFIX', where PREFIX must be an
148310490Scyabsolute file name.
149310490Scy
150310490Scy   You can specify separate installation prefixes for
151310490Scyarchitecture-specific files and architecture-independent files.  If you
152310490Scypass the option `--exec-prefix=PREFIX' to `configure', the package uses
153310490ScyPREFIX as the prefix for installing programs and libraries.
154310490ScyDocumentation and other data files still use the regular prefix.
155310490Scy
156310490Scy   In addition, if you use an unusual directory layout you can give
157310490Scyoptions like `--bindir=DIR' to specify different values for particular
158310490Scykinds of files.  Run `configure --help' for a list of the directories
159310490Scyyou can set and what kinds of files go in them.  In general, the
160310490Scydefault for these options is expressed in terms of `${prefix}', so that
161310490Scyspecifying just `--prefix' will affect all of the other directory
162310490Scyspecifications that were not explicitly provided.
163310490Scy
164310490Scy   The most portable way to affect installation locations is to pass the
165310490Scycorrect locations to `configure'; however, many packages provide one or
166310490Scyboth of the following shortcuts of passing variable assignments to the
167310490Scy`make install' command line to change installation locations without
168310490Scyhaving to reconfigure or recompile.
169310490Scy
170310490Scy   The first method involves providing an override variable for each
171310490Scyaffected directory.  For example, `make install
172310490Scyprefix=/alternate/directory' will choose an alternate location for all
173310490Scydirectory configuration variables that were expressed in terms of
174310490Scy`${prefix}'.  Any directories that were specified during `configure',
175310490Scybut not in terms of `${prefix}', must each be overridden at install
176310490Scytime for the entire installation to be relocated.  The approach of
177310490Scymakefile variable overrides for each directory variable is required by
178310490Scythe GNU Coding Standards, and ideally causes no recompilation.
179310490ScyHowever, some platforms have known limitations with the semantics of
180310490Scyshared libraries that end up requiring recompilation when using this
181310490Scymethod, particularly noticeable in packages that use GNU Libtool.
182310490Scy
183310490Scy   The second method involves providing the `DESTDIR' variable.  For
184310490Scyexample, `make install DESTDIR=/alternate/directory' will prepend
185310490Scy`/alternate/directory' before all installation names.  The approach of
186310490Scy`DESTDIR' overrides is not required by the GNU Coding Standards, and
187310490Scydoes not work on platforms that have drive letters.  On the other hand,
188310490Scyit does better at avoiding recompilation issues, and works well even
189310490Scywhen some directory options were not specified in terms of `${prefix}'
190310490Scyat `configure' time.
191310490Scy
192310490ScyOptional Features
193310490Scy=================
194310490Scy
195310490Scy   If the package supports it, you can cause programs to be installed
196310490Scywith an extra prefix or suffix on their names by giving `configure' the
197310490Scyoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198310490Scy
199310490Scy   Some packages pay attention to `--enable-FEATURE' options to
200310490Scy`configure', where FEATURE indicates an optional part of the package.
201310490ScyThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202310490Scyis something like `gnu-as' or `x' (for the X Window System).  The
203310490Scy`README' should mention any `--enable-' and `--with-' options that the
204310490Scypackage recognizes.
205310490Scy
206310490Scy   For packages that use the X Window System, `configure' can usually
207310490Scyfind the X include and library files automatically, but if it doesn't,
208310490Scyyou can use the `configure' options `--x-includes=DIR' and
209310490Scy`--x-libraries=DIR' to specify their locations.
210310490Scy
211310490Scy   Some packages offer the ability to configure how verbose the
212310490Scyexecution of `make' will be.  For these packages, running `./configure
213310490Scy--enable-silent-rules' sets the default to minimal output, which can be
214310490Scyoverridden with `make V=1'; while running `./configure
215310490Scy--disable-silent-rules' sets the default to verbose, which can be
216310490Scyoverridden with `make V=0'.
217310490Scy
218310490ScyParticular systems
219310490Scy==================
220310490Scy
221310490Scy   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222310490ScyCC is not installed, it is recommended to use the following options in
223310490Scyorder to use an ANSI C compiler:
224310490Scy
225310490Scy     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226310490Scy
227310490Scyand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228310490Scy
229310490Scy   HP-UX `make' updates targets which have the same time stamps as
230310490Scytheir prerequisites, which makes it generally unusable when shipped
231310490Scygenerated files such as `configure' are involved.  Use GNU `make'
232310490Scyinstead.
233310490Scy
234310490Scy   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235310490Scyparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236310490Scya workaround.  If GNU CC is not installed, it is therefore recommended
237310490Scyto try
238310490Scy
239310490Scy     ./configure CC="cc"
240310490Scy
241310490Scyand if that doesn't work, try
242310490Scy
243310490Scy     ./configure CC="cc -nodtk"
244310490Scy
245310490Scy   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246310490Scydirectory contains several dysfunctional programs; working variants of
247310490Scythese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248310490Scyin your `PATH', put it _after_ `/usr/bin'.
249310490Scy
250310490Scy   On Haiku, software installed for all users goes in `/boot/common',
251310490Scynot `/usr/local'.  It is recommended to use the following options:
252310490Scy
253310490Scy     ./configure --prefix=/boot/common
254310490Scy
255310490ScySpecifying the System Type
256310490Scy==========================
257310490Scy
258310490Scy   There may be some features `configure' cannot figure out
259310490Scyautomatically, but needs to determine by the type of machine the package
260310490Scywill run on.  Usually, assuming the package is built to be run on the
261310490Scy_same_ architectures, `configure' can figure that out, but if it prints
262310490Scya message saying it cannot guess the machine type, give it the
263310490Scy`--build=TYPE' option.  TYPE can either be a short name for the system
264310490Scytype, such as `sun4', or a canonical name which has the form:
265310490Scy
266310490Scy     CPU-COMPANY-SYSTEM
267310490Scy
268310490Scywhere SYSTEM can have one of these forms:
269310490Scy
270310490Scy     OS
271310490Scy     KERNEL-OS
272310490Scy
273310490Scy   See the file `config.sub' for the possible values of each field.  If
274310490Scy`config.sub' isn't included in this package, then this package doesn't
275310490Scyneed to know the machine type.
276310490Scy
277310490Scy   If you are _building_ compiler tools for cross-compiling, you should
278310490Scyuse the option `--target=TYPE' to select the type of system they will
279310490Scyproduce code for.
280310490Scy
281310490Scy   If you want to _use_ a cross compiler, that generates code for a
282310490Scyplatform different from the build platform, you should specify the
283310490Scy"host" platform (i.e., that on which the generated programs will
284310490Scyeventually be run) with `--host=TYPE'.
285310490Scy
286310490ScySharing Defaults
287310490Scy================
288310490Scy
289310490Scy   If you want to set default values for `configure' scripts to share,
290310490Scyyou can create a site shell script called `config.site' that gives
291310490Scydefault values for variables like `CC', `cache_file', and `prefix'.
292310490Scy`configure' looks for `PREFIX/share/config.site' if it exists, then
293310490Scy`PREFIX/etc/config.site' if it exists.  Or, you can set the
294310490Scy`CONFIG_SITE' environment variable to the location of the site script.
295310490ScyA warning: not all `configure' scripts look for a site script.
296310490Scy
297310490ScyDefining Variables
298310490Scy==================
299310490Scy
300310490Scy   Variables not defined in a site shell script can be set in the
301310490Scyenvironment passed to `configure'.  However, some packages may run
302310490Scyconfigure again during the build, and the customized values of these
303310490Scyvariables may be lost.  In order to avoid this problem, you should set
304310490Scythem in the `configure' command line, using `VAR=value'.  For example:
305310490Scy
306310490Scy     ./configure CC=/usr/local2/bin/gcc
307310490Scy
308310490Scycauses the specified `gcc' to be used as the C compiler (unless it is
309310490Scyoverridden in the site shell script).
310310490Scy
311310490ScyUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312310490Scyan Autoconf limitation.  Until the limitation is lifted, you can use
313310490Scythis workaround:
314310490Scy
315310490Scy     CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
316310490Scy
317310490Scy`configure' Invocation
318310490Scy======================
319310490Scy
320310490Scy   `configure' recognizes the following options to control how it
321310490Scyoperates.
322310490Scy
323310490Scy`--help'
324310490Scy`-h'
325310490Scy     Print a summary of all of the options to `configure', and exit.
326310490Scy
327310490Scy`--help=short'
328310490Scy`--help=recursive'
329310490Scy     Print a summary of the options unique to this package's
330310490Scy     `configure', and exit.  The `short' variant lists options used
331310490Scy     only in the top level, while the `recursive' variant lists options
332310490Scy     also present in any nested packages.
333310490Scy
334310490Scy`--version'
335310490Scy`-V'
336310490Scy     Print the version of Autoconf used to generate the `configure'
337310490Scy     script, and exit.
338310490Scy
339310490Scy`--cache-file=FILE'
340310490Scy     Enable the cache: use and save the results of the tests in FILE,
341310490Scy     traditionally `config.cache'.  FILE defaults to `/dev/null' to
342310490Scy     disable caching.
343310490Scy
344310490Scy`--config-cache'
345310490Scy`-C'
346310490Scy     Alias for `--cache-file=config.cache'.
347310490Scy
348310490Scy`--quiet'
349310490Scy`--silent'
350310490Scy`-q'
351310490Scy     Do not print messages saying which checks are being made.  To
352310490Scy     suppress all normal output, redirect it to `/dev/null' (any error
353310490Scy     messages will still be shown).
354310490Scy
355310490Scy`--srcdir=DIR'
356310490Scy     Look for the package's source code in directory DIR.  Usually
357310490Scy     `configure' can determine that directory automatically.
358310490Scy
359310490Scy`--prefix=DIR'
360310490Scy     Use DIR as the installation prefix.  *note Installation Names::
361310490Scy     for more details, including other options available for fine-tuning
362310490Scy     the installation locations.
363310490Scy
364310490Scy`--no-create'
365310490Scy`-n'
366310490Scy     Run the configure checks, but stop before creating any output
367310490Scy     files.
368310490Scy
369310490Scy`configure' also accepts some other, not widely useful, options.  Run
370310490Scy`configure --help' for more details.
371