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