1549e21daSmrgInstallation Instructions
2549e21daSmrg*************************
3ba6a1819Smrg
4298453a4SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5298453a4SmrgInc.
6ba6a1819Smrg
7298453a4Smrg   Copying and distribution of this file, with or without modification,
8298453a4Smrgare permitted in any medium without royalty provided the copyright
9298453a4Smrgnotice and this notice are preserved.  This file is offered as-is,
10298453a4Smrgwithout warranty of any kind.
11549e21daSmrg
12549e21daSmrgBasic Installation
13549e21daSmrg==================
14549e21daSmrg
15549e21daSmrg   Briefly, the shell commands `./configure; make; make install' should
16549e21daSmrgconfigure, build, and install this package.  The following
17549e21daSmrgmore-detailed instructions are generic; see the `README' file for
18298453a4Smrginstructions specific to this package.  Some packages provide this
19298453a4Smrg`INSTALL' file but do not implement all of the features documented
20298453a4Smrgbelow.  The lack of an optional feature in a given package is not
21298453a4Smrgnecessarily a bug.  More recommendations for GNU packages can be found
22298453a4Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23549e21daSmrg
24549e21daSmrg   The `configure' shell script attempts to guess correct values for
25549e21daSmrgvarious system-dependent variables used during compilation.  It uses
26549e21daSmrgthose values to create a `Makefile' in each directory of the package.
27549e21daSmrgIt may also create one or more `.h' files containing system-dependent
28549e21daSmrgdefinitions.  Finally, it creates a shell script `config.status' that
29549e21daSmrgyou can run in the future to recreate the current configuration, and a
30549e21daSmrgfile `config.log' containing compiler output (useful mainly for
31549e21daSmrgdebugging `configure').
32549e21daSmrg
33549e21daSmrg   It can also use an optional file (typically called `config.cache'
34549e21daSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35549e21daSmrgthe results of its tests to speed up reconfiguring.  Caching is
36549e21daSmrgdisabled by default to prevent problems with accidental use of stale
37549e21daSmrgcache files.
38549e21daSmrg
39549e21daSmrg   If you need to do unusual things to compile the package, please try
40549e21daSmrgto figure out how `configure' could check whether to do them, and mail
41549e21daSmrgdiffs or instructions to the address given in the `README' so they can
42549e21daSmrgbe considered for the next release.  If you are using the cache, and at
43549e21daSmrgsome point `config.cache' contains results you don't want to keep, you
44549e21daSmrgmay remove or edit it.
45549e21daSmrg
46549e21daSmrg   The file `configure.ac' (or `configure.in') is used to create
47549e21daSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48549e21daSmrgyou want to change it or regenerate `configure' using a newer version
49549e21daSmrgof `autoconf'.
50549e21daSmrg
51298453a4Smrg   The simplest way to compile this package is:
52549e21daSmrg
53549e21daSmrg  1. `cd' to the directory containing the package's source code and type
54549e21daSmrg     `./configure' to configure the package for your system.
55549e21daSmrg
56549e21daSmrg     Running `configure' might take a while.  While running, it prints
57549e21daSmrg     some messages telling which features it is checking for.
58549e21daSmrg
59549e21daSmrg  2. Type `make' to compile the package.
60549e21daSmrg
61549e21daSmrg  3. Optionally, type `make check' to run any self-tests that come with
62298453a4Smrg     the package, generally using the just-built uninstalled binaries.
63549e21daSmrg
64549e21daSmrg  4. Type `make install' to install the programs and any data files and
65298453a4Smrg     documentation.  When installing into a prefix owned by root, it is
66298453a4Smrg     recommended that the package be configured and built as a regular
67298453a4Smrg     user, and only the `make install' phase executed with root
68298453a4Smrg     privileges.
69298453a4Smrg
70298453a4Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71298453a4Smrg     this time using the binaries in their final installed location.
72298453a4Smrg     This target does not install anything.  Running this target as a
73298453a4Smrg     regular user, particularly if the prior `make install' required
74298453a4Smrg     root privileges, verifies that the installation completed
75298453a4Smrg     correctly.
76298453a4Smrg
77298453a4Smrg  6. You can remove the program binaries and object files from the
78549e21daSmrg     source code directory by typing `make clean'.  To also remove the
79549e21daSmrg     files that `configure' created (so you can compile the package for
80549e21daSmrg     a different kind of computer), type `make distclean'.  There is
81549e21daSmrg     also a `make maintainer-clean' target, but that is intended mainly
82549e21daSmrg     for the package's developers.  If you use it, you may have to get
83549e21daSmrg     all sorts of other programs in order to regenerate files that came
84549e21daSmrg     with the distribution.
85549e21daSmrg
86298453a4Smrg  7. Often, you can also type `make uninstall' to remove the installed
87298453a4Smrg     files again.  In practice, not all packages have tested that
88298453a4Smrg     uninstallation works correctly, even though it is required by the
89298453a4Smrg     GNU Coding Standards.
90298453a4Smrg
91298453a4Smrg  8. Some packages, particularly those that use Automake, provide `make
92298453a4Smrg     distcheck', which can by used by developers to test that all other
93298453a4Smrg     targets like `make install' and `make uninstall' work correctly.
94298453a4Smrg     This target is generally not run by end users.
95549e21daSmrg
96549e21daSmrgCompilers and Options
97549e21daSmrg=====================
98549e21daSmrg
99549e21daSmrg   Some systems require unusual options for compilation or linking that
100549e21daSmrgthe `configure' script does not know about.  Run `./configure --help'
101549e21daSmrgfor details on some of the pertinent environment variables.
102549e21daSmrg
103549e21daSmrg   You can give `configure' initial values for configuration parameters
104549e21daSmrgby setting variables in the command line or in the environment.  Here
105549e21daSmrgis an example:
106549e21daSmrg
107549e21daSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108549e21daSmrg
109549e21daSmrg   *Note Defining Variables::, for more details.
110549e21daSmrg
111549e21daSmrgCompiling For Multiple Architectures
112549e21daSmrg====================================
113549e21daSmrg
114549e21daSmrg   You can compile the package for more than one kind of computer at the
115549e21daSmrgsame time, by placing the object files for each architecture in their
116549e21daSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117549e21daSmrgdirectory where you want the object files and executables to go and run
118549e21daSmrgthe `configure' script.  `configure' automatically checks for the
119298453a4Smrgsource code in the directory that `configure' is in and in `..'.  This
120298453a4Smrgis known as a "VPATH" build.
121549e21daSmrg
122549e21daSmrg   With a non-GNU `make', it is safer to compile the package for one
123549e21daSmrgarchitecture at a time in the source code directory.  After you have
124549e21daSmrginstalled the package for one architecture, use `make distclean' before
125549e21daSmrgreconfiguring for another architecture.
126549e21daSmrg
127549e21daSmrg   On MacOS X 10.5 and later systems, you can create libraries and
128549e21daSmrgexecutables that work on multiple system types--known as "fat" or
129549e21daSmrg"universal" binaries--by specifying multiple `-arch' options to the
130549e21daSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
131549e21daSmrgthis:
132549e21daSmrg
133549e21daSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134549e21daSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135549e21daSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
136549e21daSmrg
137549e21daSmrg   This is not guaranteed to produce working output in all cases, you
138549e21daSmrgmay have to build one architecture at a time and combine the results
139549e21daSmrgusing the `lipo' tool if you have problems.
140549e21daSmrg
141549e21daSmrgInstallation Names
142549e21daSmrg==================
143549e21daSmrg
144549e21daSmrg   By default, `make install' installs the package's commands under
145549e21daSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146549e21daSmrgcan specify an installation prefix other than `/usr/local' by giving
147298453a4Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148298453a4Smrgabsolute file name.
149549e21daSmrg
150549e21daSmrg   You can specify separate installation prefixes for
151549e21daSmrgarchitecture-specific files and architecture-independent files.  If you
152549e21daSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153549e21daSmrgPREFIX as the prefix for installing programs and libraries.
154549e21daSmrgDocumentation and other data files still use the regular prefix.
155549e21daSmrg
156549e21daSmrg   In addition, if you use an unusual directory layout you can give
157549e21daSmrgoptions like `--bindir=DIR' to specify different values for particular
158549e21daSmrgkinds of files.  Run `configure --help' for a list of the directories
159298453a4Smrgyou can set and what kinds of files go in them.  In general, the
160298453a4Smrgdefault for these options is expressed in terms of `${prefix}', so that
161298453a4Smrgspecifying just `--prefix' will affect all of the other directory
162298453a4Smrgspecifications that were not explicitly provided.
163298453a4Smrg
164298453a4Smrg   The most portable way to affect installation locations is to pass the
165298453a4Smrgcorrect locations to `configure'; however, many packages provide one or
166298453a4Smrgboth of the following shortcuts of passing variable assignments to the
167298453a4Smrg`make install' command line to change installation locations without
168298453a4Smrghaving to reconfigure or recompile.
169298453a4Smrg
170298453a4Smrg   The first method involves providing an override variable for each
171298453a4Smrgaffected directory.  For example, `make install
172298453a4Smrgprefix=/alternate/directory' will choose an alternate location for all
173298453a4Smrgdirectory configuration variables that were expressed in terms of
174298453a4Smrg`${prefix}'.  Any directories that were specified during `configure',
175298453a4Smrgbut not in terms of `${prefix}', must each be overridden at install
176298453a4Smrgtime for the entire installation to be relocated.  The approach of
177298453a4Smrgmakefile variable overrides for each directory variable is required by
178298453a4Smrgthe GNU Coding Standards, and ideally causes no recompilation.
179298453a4SmrgHowever, some platforms have known limitations with the semantics of
180298453a4Smrgshared libraries that end up requiring recompilation when using this
181298453a4Smrgmethod, particularly noticeable in packages that use GNU Libtool.
182298453a4Smrg
183298453a4Smrg   The second method involves providing the `DESTDIR' variable.  For
184298453a4Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
185298453a4Smrg`/alternate/directory' before all installation names.  The approach of
186298453a4Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187298453a4Smrgdoes not work on platforms that have drive letters.  On the other hand,
188298453a4Smrgit does better at avoiding recompilation issues, and works well even
189298453a4Smrgwhen some directory options were not specified in terms of `${prefix}'
190298453a4Smrgat `configure' time.
191298453a4Smrg
192298453a4SmrgOptional Features
193298453a4Smrg=================
194549e21daSmrg
195549e21daSmrg   If the package supports it, you can cause programs to be installed
196549e21daSmrgwith an extra prefix or suffix on their names by giving `configure' the
197549e21daSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198549e21daSmrg
199549e21daSmrg   Some packages pay attention to `--enable-FEATURE' options to
200549e21daSmrg`configure', where FEATURE indicates an optional part of the package.
201549e21daSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202549e21daSmrgis something like `gnu-as' or `x' (for the X Window System).  The
203549e21daSmrg`README' should mention any `--enable-' and `--with-' options that the
204549e21daSmrgpackage recognizes.
205549e21daSmrg
206549e21daSmrg   For packages that use the X Window System, `configure' can usually
207549e21daSmrgfind the X include and library files automatically, but if it doesn't,
208549e21daSmrgyou can use the `configure' options `--x-includes=DIR' and
209549e21daSmrg`--x-libraries=DIR' to specify their locations.
210549e21daSmrg
211298453a4Smrg   Some packages offer the ability to configure how verbose the
212298453a4Smrgexecution of `make' will be.  For these packages, running `./configure
213298453a4Smrg--enable-silent-rules' sets the default to minimal output, which can be
214298453a4Smrgoverridden with `make V=1'; while running `./configure
215298453a4Smrg--disable-silent-rules' sets the default to verbose, which can be
216298453a4Smrgoverridden with `make V=0'.
217298453a4Smrg
218549e21daSmrgParticular systems
219549e21daSmrg==================
220549e21daSmrg
221549e21daSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222549e21daSmrgCC is not installed, it is recommended to use the following options in
223549e21daSmrgorder to use an ANSI C compiler:
224549e21daSmrg
225298453a4Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226549e21daSmrg
227549e21daSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228549e21daSmrg
229298453a4Smrg   HP-UX `make' updates targets which have the same time stamps as
230298453a4Smrgtheir prerequisites, which makes it generally unusable when shipped
231298453a4Smrggenerated files such as `configure' are involved.  Use GNU `make'
232298453a4Smrginstead.
233298453a4Smrg
234549e21daSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235549e21daSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236549e21daSmrga workaround.  If GNU CC is not installed, it is therefore recommended
237549e21daSmrgto try
238549e21daSmrg
239549e21daSmrg     ./configure CC="cc"
240549e21daSmrg
241549e21daSmrgand if that doesn't work, try
242549e21daSmrg
243549e21daSmrg     ./configure CC="cc -nodtk"
244549e21daSmrg
245298453a4Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246298453a4Smrgdirectory contains several dysfunctional programs; working variants of
247298453a4Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248298453a4Smrgin your `PATH', put it _after_ `/usr/bin'.
249298453a4Smrg
250298453a4Smrg   On Haiku, software installed for all users goes in `/boot/common',
251298453a4Smrgnot `/usr/local'.  It is recommended to use the following options:
252298453a4Smrg
253298453a4Smrg     ./configure --prefix=/boot/common
254298453a4Smrg
255549e21daSmrgSpecifying the System Type
256549e21daSmrg==========================
257549e21daSmrg
258549e21daSmrg   There may be some features `configure' cannot figure out
259549e21daSmrgautomatically, but needs to determine by the type of machine the package
260549e21daSmrgwill run on.  Usually, assuming the package is built to be run on the
261549e21daSmrg_same_ architectures, `configure' can figure that out, but if it prints
262549e21daSmrga message saying it cannot guess the machine type, give it the
263549e21daSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
264549e21daSmrgtype, such as `sun4', or a canonical name which has the form:
265549e21daSmrg
266549e21daSmrg     CPU-COMPANY-SYSTEM
267549e21daSmrg
268549e21daSmrgwhere SYSTEM can have one of these forms:
269549e21daSmrg
270298453a4Smrg     OS
271298453a4Smrg     KERNEL-OS
272549e21daSmrg
273549e21daSmrg   See the file `config.sub' for the possible values of each field.  If
274549e21daSmrg`config.sub' isn't included in this package, then this package doesn't
275549e21daSmrgneed to know the machine type.
276549e21daSmrg
277549e21daSmrg   If you are _building_ compiler tools for cross-compiling, you should
278549e21daSmrguse the option `--target=TYPE' to select the type of system they will
279549e21daSmrgproduce code for.
280549e21daSmrg
281549e21daSmrg   If you want to _use_ a cross compiler, that generates code for a
282549e21daSmrgplatform different from the build platform, you should specify the
283549e21daSmrg"host" platform (i.e., that on which the generated programs will
284549e21daSmrgeventually be run) with `--host=TYPE'.
285549e21daSmrg
286549e21daSmrgSharing Defaults
287549e21daSmrg================
288549e21daSmrg
289549e21daSmrg   If you want to set default values for `configure' scripts to share,
290549e21daSmrgyou can create a site shell script called `config.site' that gives
291549e21daSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
292549e21daSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293549e21daSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294549e21daSmrg`CONFIG_SITE' environment variable to the location of the site script.
295549e21daSmrgA warning: not all `configure' scripts look for a site script.
296549e21daSmrg
297549e21daSmrgDefining Variables
298549e21daSmrg==================
299549e21daSmrg
300549e21daSmrg   Variables not defined in a site shell script can be set in the
301549e21daSmrgenvironment passed to `configure'.  However, some packages may run
302549e21daSmrgconfigure again during the build, and the customized values of these
303549e21daSmrgvariables may be lost.  In order to avoid this problem, you should set
304549e21daSmrgthem in the `configure' command line, using `VAR=value'.  For example:
305549e21daSmrg
306549e21daSmrg     ./configure CC=/usr/local2/bin/gcc
307549e21daSmrg
308549e21daSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
309549e21daSmrgoverridden in the site shell script).
310549e21daSmrg
311549e21daSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312549e21daSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313549e21daSmrg
314549e21daSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315549e21daSmrg
316549e21daSmrg`configure' Invocation
317549e21daSmrg======================
318549e21daSmrg
319549e21daSmrg   `configure' recognizes the following options to control how it
320549e21daSmrgoperates.
321549e21daSmrg
322549e21daSmrg`--help'
323549e21daSmrg`-h'
324549e21daSmrg     Print a summary of all of the options to `configure', and exit.
325549e21daSmrg
326549e21daSmrg`--help=short'
327549e21daSmrg`--help=recursive'
328549e21daSmrg     Print a summary of the options unique to this package's
329549e21daSmrg     `configure', and exit.  The `short' variant lists options used
330549e21daSmrg     only in the top level, while the `recursive' variant lists options
331549e21daSmrg     also present in any nested packages.
332549e21daSmrg
333549e21daSmrg`--version'
334549e21daSmrg`-V'
335549e21daSmrg     Print the version of Autoconf used to generate the `configure'
336549e21daSmrg     script, and exit.
337549e21daSmrg
338549e21daSmrg`--cache-file=FILE'
339549e21daSmrg     Enable the cache: use and save the results of the tests in FILE,
340549e21daSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341549e21daSmrg     disable caching.
342549e21daSmrg
343549e21daSmrg`--config-cache'
344549e21daSmrg`-C'
345549e21daSmrg     Alias for `--cache-file=config.cache'.
346549e21daSmrg
347549e21daSmrg`--quiet'
348549e21daSmrg`--silent'
349549e21daSmrg`-q'
350549e21daSmrg     Do not print messages saying which checks are being made.  To
351549e21daSmrg     suppress all normal output, redirect it to `/dev/null' (any error
352549e21daSmrg     messages will still be shown).
353549e21daSmrg
354549e21daSmrg`--srcdir=DIR'
355549e21daSmrg     Look for the package's source code in directory DIR.  Usually
356549e21daSmrg     `configure' can determine that directory automatically.
357549e21daSmrg
358549e21daSmrg`--prefix=DIR'
359298453a4Smrg     Use DIR as the installation prefix.  *note Installation Names::
360549e21daSmrg     for more details, including other options available for fine-tuning
361549e21daSmrg     the installation locations.
362549e21daSmrg
363549e21daSmrg`--no-create'
364549e21daSmrg`-n'
365549e21daSmrg     Run the configure checks, but stop before creating any output
366549e21daSmrg     files.
367549e21daSmrg
368549e21daSmrg`configure' also accepts some other, not widely useful, options.  Run
369549e21daSmrg`configure --help' for more details.
370ba6a1819Smrg
371