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