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