1023b3b36SmrgInstallation Instructions
2023b3b36Smrg*************************
3023b3b36Smrg
4023b3b36SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5023b3b36SmrgInc.
6023b3b36Smrg
7023b3b36Smrg   Copying and distribution of this file, with or without modification,
8023b3b36Smrgare permitted in any medium without royalty provided the copyright
9023b3b36Smrgnotice and this notice are preserved.  This file is offered as-is,
10023b3b36Smrgwithout warranty of any kind.
11023b3b36Smrg
12023b3b36SmrgBasic Installation
13023b3b36Smrg==================
14023b3b36Smrg
15023b3b36Smrg   Briefly, the shell commands `./configure; make; make install' should
16023b3b36Smrgconfigure, build, and install this package.  The following
17023b3b36Smrgmore-detailed instructions are generic; see the `README' file for
18023b3b36Smrginstructions specific to this package.  Some packages provide this
19023b3b36Smrg`INSTALL' file but do not implement all of the features documented
20023b3b36Smrgbelow.  The lack of an optional feature in a given package is not
21023b3b36Smrgnecessarily a bug.  More recommendations for GNU packages can be found
22023b3b36Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23023b3b36Smrg
24023b3b36Smrg   The `configure' shell script attempts to guess correct values for
25023b3b36Smrgvarious system-dependent variables used during compilation.  It uses
26023b3b36Smrgthose values to create a `Makefile' in each directory of the package.
27023b3b36SmrgIt may also create one or more `.h' files containing system-dependent
28023b3b36Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29023b3b36Smrgyou can run in the future to recreate the current configuration, and a
30023b3b36Smrgfile `config.log' containing compiler output (useful mainly for
31023b3b36Smrgdebugging `configure').
32023b3b36Smrg
33023b3b36Smrg   It can also use an optional file (typically called `config.cache'
34023b3b36Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35023b3b36Smrgthe results of its tests to speed up reconfiguring.  Caching is
36023b3b36Smrgdisabled by default to prevent problems with accidental use of stale
37023b3b36Smrgcache files.
38023b3b36Smrg
39023b3b36Smrg   If you need to do unusual things to compile the package, please try
40023b3b36Smrgto figure out how `configure' could check whether to do them, and mail
41023b3b36Smrgdiffs or instructions to the address given in the `README' so they can
42023b3b36Smrgbe considered for the next release.  If you are using the cache, and at
43023b3b36Smrgsome point `config.cache' contains results you don't want to keep, you
44023b3b36Smrgmay remove or edit it.
45023b3b36Smrg
46023b3b36Smrg   The file `configure.ac' (or `configure.in') is used to create
47023b3b36Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48023b3b36Smrgyou want to change it or regenerate `configure' using a newer version
49023b3b36Smrgof `autoconf'.
50023b3b36Smrg
51023b3b36Smrg   The simplest way to compile this package is:
52023b3b36Smrg
53023b3b36Smrg  1. `cd' to the directory containing the package's source code and type
54023b3b36Smrg     `./configure' to configure the package for your system.
55023b3b36Smrg
56023b3b36Smrg     Running `configure' might take a while.  While running, it prints
57023b3b36Smrg     some messages telling which features it is checking for.
58023b3b36Smrg
59023b3b36Smrg  2. Type `make' to compile the package.
60023b3b36Smrg
61023b3b36Smrg  3. Optionally, type `make check' to run any self-tests that come with
62023b3b36Smrg     the package, generally using the just-built uninstalled binaries.
63023b3b36Smrg
64023b3b36Smrg  4. Type `make install' to install the programs and any data files and
65023b3b36Smrg     documentation.  When installing into a prefix owned by root, it is
66023b3b36Smrg     recommended that the package be configured and built as a regular
67023b3b36Smrg     user, and only the `make install' phase executed with root
68023b3b36Smrg     privileges.
69023b3b36Smrg
70023b3b36Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71023b3b36Smrg     this time using the binaries in their final installed location.
72023b3b36Smrg     This target does not install anything.  Running this target as a
73023b3b36Smrg     regular user, particularly if the prior `make install' required
74023b3b36Smrg     root privileges, verifies that the installation completed
75023b3b36Smrg     correctly.
76023b3b36Smrg
77023b3b36Smrg  6. You can remove the program binaries and object files from the
78023b3b36Smrg     source code directory by typing `make clean'.  To also remove the
79023b3b36Smrg     files that `configure' created (so you can compile the package for
80023b3b36Smrg     a different kind of computer), type `make distclean'.  There is
81023b3b36Smrg     also a `make maintainer-clean' target, but that is intended mainly
82023b3b36Smrg     for the package's developers.  If you use it, you may have to get
83023b3b36Smrg     all sorts of other programs in order to regenerate files that came
84023b3b36Smrg     with the distribution.
85023b3b36Smrg
86023b3b36Smrg  7. Often, you can also type `make uninstall' to remove the installed
87023b3b36Smrg     files again.  In practice, not all packages have tested that
88023b3b36Smrg     uninstallation works correctly, even though it is required by the
89023b3b36Smrg     GNU Coding Standards.
90023b3b36Smrg
91023b3b36Smrg  8. Some packages, particularly those that use Automake, provide `make
92023b3b36Smrg     distcheck', which can by used by developers to test that all other
93023b3b36Smrg     targets like `make install' and `make uninstall' work correctly.
94023b3b36Smrg     This target is generally not run by end users.
95023b3b36Smrg
96023b3b36SmrgCompilers and Options
97023b3b36Smrg=====================
98023b3b36Smrg
99023b3b36Smrg   Some systems require unusual options for compilation or linking that
100023b3b36Smrgthe `configure' script does not know about.  Run `./configure --help'
101023b3b36Smrgfor details on some of the pertinent environment variables.
102023b3b36Smrg
103023b3b36Smrg   You can give `configure' initial values for configuration parameters
104023b3b36Smrgby setting variables in the command line or in the environment.  Here
105023b3b36Smrgis an example:
106023b3b36Smrg
107023b3b36Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108023b3b36Smrg
109023b3b36Smrg   *Note Defining Variables::, for more details.
110023b3b36Smrg
111023b3b36SmrgCompiling For Multiple Architectures
112023b3b36Smrg====================================
113023b3b36Smrg
114023b3b36Smrg   You can compile the package for more than one kind of computer at the
115023b3b36Smrgsame time, by placing the object files for each architecture in their
116023b3b36Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117023b3b36Smrgdirectory where you want the object files and executables to go and run
118023b3b36Smrgthe `configure' script.  `configure' automatically checks for the
119023b3b36Smrgsource code in the directory that `configure' is in and in `..'.  This
120023b3b36Smrgis known as a "VPATH" build.
121023b3b36Smrg
122023b3b36Smrg   With a non-GNU `make', it is safer to compile the package for one
123023b3b36Smrgarchitecture at a time in the source code directory.  After you have
124023b3b36Smrginstalled the package for one architecture, use `make distclean' before
125023b3b36Smrgreconfiguring for another architecture.
126023b3b36Smrg
127023b3b36Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128023b3b36Smrgexecutables that work on multiple system types--known as "fat" or
129023b3b36Smrg"universal" binaries--by specifying multiple `-arch' options to the
130023b3b36Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131023b3b36Smrgthis:
132023b3b36Smrg
133023b3b36Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134023b3b36Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135023b3b36Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136023b3b36Smrg
137023b3b36Smrg   This is not guaranteed to produce working output in all cases, you
138023b3b36Smrgmay have to build one architecture at a time and combine the results
139023b3b36Smrgusing the `lipo' tool if you have problems.
140023b3b36Smrg
141023b3b36SmrgInstallation Names
142023b3b36Smrg==================
143023b3b36Smrg
144023b3b36Smrg   By default, `make install' installs the package's commands under
145023b3b36Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146023b3b36Smrgcan specify an installation prefix other than `/usr/local' by giving
147023b3b36Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148023b3b36Smrgabsolute file name.
149023b3b36Smrg
150023b3b36Smrg   You can specify separate installation prefixes for
151023b3b36Smrgarchitecture-specific files and architecture-independent files.  If you
152023b3b36Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153023b3b36SmrgPREFIX as the prefix for installing programs and libraries.
154023b3b36SmrgDocumentation and other data files still use the regular prefix.
155023b3b36Smrg
156023b3b36Smrg   In addition, if you use an unusual directory layout you can give
157023b3b36Smrgoptions like `--bindir=DIR' to specify different values for particular
158023b3b36Smrgkinds of files.  Run `configure --help' for a list of the directories
159023b3b36Smrgyou can set and what kinds of files go in them.  In general, the
160023b3b36Smrgdefault for these options is expressed in terms of `${prefix}', so that
161023b3b36Smrgspecifying just `--prefix' will affect all of the other directory
162023b3b36Smrgspecifications that were not explicitly provided.
163023b3b36Smrg
164023b3b36Smrg   The most portable way to affect installation locations is to pass the
165023b3b36Smrgcorrect locations to `configure'; however, many packages provide one or
166023b3b36Smrgboth of the following shortcuts of passing variable assignments to the
167023b3b36Smrg`make install' command line to change installation locations without
168023b3b36Smrghaving to reconfigure or recompile.
169023b3b36Smrg
170023b3b36Smrg   The first method involves providing an override variable for each
171023b3b36Smrgaffected directory.  For example, `make install
172023b3b36Smrgprefix=/alternate/directory' will choose an alternate location for all
173023b3b36Smrgdirectory configuration variables that were expressed in terms of
174023b3b36Smrg`${prefix}'.  Any directories that were specified during `configure',
175023b3b36Smrgbut not in terms of `${prefix}', must each be overridden at install
176023b3b36Smrgtime for the entire installation to be relocated.  The approach of
177023b3b36Smrgmakefile variable overrides for each directory variable is required by
178023b3b36Smrgthe GNU Coding Standards, and ideally causes no recompilation.
179023b3b36SmrgHowever, some platforms have known limitations with the semantics of
180023b3b36Smrgshared libraries that end up requiring recompilation when using this
181023b3b36Smrgmethod, particularly noticeable in packages that use GNU Libtool.
182023b3b36Smrg
183023b3b36Smrg   The second method involves providing the `DESTDIR' variable.  For
184023b3b36Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
185023b3b36Smrg`/alternate/directory' before all installation names.  The approach of
186023b3b36Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187023b3b36Smrgdoes not work on platforms that have drive letters.  On the other hand,
188023b3b36Smrgit does better at avoiding recompilation issues, and works well even
189023b3b36Smrgwhen some directory options were not specified in terms of `${prefix}'
190023b3b36Smrgat `configure' time.
191023b3b36Smrg
192023b3b36SmrgOptional Features
193023b3b36Smrg=================
194023b3b36Smrg
195023b3b36Smrg   If the package supports it, you can cause programs to be installed
196023b3b36Smrgwith an extra prefix or suffix on their names by giving `configure' the
197023b3b36Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198023b3b36Smrg
199023b3b36Smrg   Some packages pay attention to `--enable-FEATURE' options to
200023b3b36Smrg`configure', where FEATURE indicates an optional part of the package.
201023b3b36SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202023b3b36Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203023b3b36Smrg`README' should mention any `--enable-' and `--with-' options that the
204023b3b36Smrgpackage recognizes.
205023b3b36Smrg
206023b3b36Smrg   For packages that use the X Window System, `configure' can usually
207023b3b36Smrgfind the X include and library files automatically, but if it doesn't,
208023b3b36Smrgyou can use the `configure' options `--x-includes=DIR' and
209023b3b36Smrg`--x-libraries=DIR' to specify their locations.
210023b3b36Smrg
211023b3b36Smrg   Some packages offer the ability to configure how verbose the
212023b3b36Smrgexecution of `make' will be.  For these packages, running `./configure
213023b3b36Smrg--enable-silent-rules' sets the default to minimal output, which can be
214023b3b36Smrgoverridden with `make V=1'; while running `./configure
215023b3b36Smrg--disable-silent-rules' sets the default to verbose, which can be
216023b3b36Smrgoverridden with `make V=0'.
217023b3b36Smrg
218023b3b36SmrgParticular systems
219023b3b36Smrg==================
220023b3b36Smrg
221023b3b36Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222023b3b36SmrgCC is not installed, it is recommended to use the following options in
223023b3b36Smrgorder to use an ANSI C compiler:
224023b3b36Smrg
225023b3b36Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226023b3b36Smrg
227023b3b36Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228023b3b36Smrg
229023b3b36Smrg   HP-UX `make' updates targets which have the same time stamps as
230023b3b36Smrgtheir prerequisites, which makes it generally unusable when shipped
231023b3b36Smrggenerated files such as `configure' are involved.  Use GNU `make'
232023b3b36Smrginstead.
233023b3b36Smrg
234023b3b36Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235023b3b36Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236023b3b36Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237023b3b36Smrgto try
238023b3b36Smrg
239023b3b36Smrg     ./configure CC="cc"
240023b3b36Smrg
241023b3b36Smrgand if that doesn't work, try
242023b3b36Smrg
243023b3b36Smrg     ./configure CC="cc -nodtk"
244023b3b36Smrg
245023b3b36Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246023b3b36Smrgdirectory contains several dysfunctional programs; working variants of
247023b3b36Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248023b3b36Smrgin your `PATH', put it _after_ `/usr/bin'.
249023b3b36Smrg
250023b3b36Smrg   On Haiku, software installed for all users goes in `/boot/common',
251023b3b36Smrgnot `/usr/local'.  It is recommended to use the following options:
252023b3b36Smrg
253023b3b36Smrg     ./configure --prefix=/boot/common
254023b3b36Smrg
255023b3b36SmrgSpecifying the System Type
256023b3b36Smrg==========================
257023b3b36Smrg
258023b3b36Smrg   There may be some features `configure' cannot figure out
259023b3b36Smrgautomatically, but needs to determine by the type of machine the package
260023b3b36Smrgwill run on.  Usually, assuming the package is built to be run on the
261023b3b36Smrg_same_ architectures, `configure' can figure that out, but if it prints
262023b3b36Smrga message saying it cannot guess the machine type, give it the
263023b3b36Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264023b3b36Smrgtype, such as `sun4', or a canonical name which has the form:
265023b3b36Smrg
266023b3b36Smrg     CPU-COMPANY-SYSTEM
267023b3b36Smrg
268023b3b36Smrgwhere SYSTEM can have one of these forms:
269023b3b36Smrg
270023b3b36Smrg     OS
271023b3b36Smrg     KERNEL-OS
272023b3b36Smrg
273023b3b36Smrg   See the file `config.sub' for the possible values of each field.  If
274023b3b36Smrg`config.sub' isn't included in this package, then this package doesn't
275023b3b36Smrgneed to know the machine type.
276023b3b36Smrg
277023b3b36Smrg   If you are _building_ compiler tools for cross-compiling, you should
278023b3b36Smrguse the option `--target=TYPE' to select the type of system they will
279023b3b36Smrgproduce code for.
280023b3b36Smrg
281023b3b36Smrg   If you want to _use_ a cross compiler, that generates code for a
282023b3b36Smrgplatform different from the build platform, you should specify the
283023b3b36Smrg"host" platform (i.e., that on which the generated programs will
284023b3b36Smrgeventually be run) with `--host=TYPE'.
285023b3b36Smrg
286023b3b36SmrgSharing Defaults
287023b3b36Smrg================
288023b3b36Smrg
289023b3b36Smrg   If you want to set default values for `configure' scripts to share,
290023b3b36Smrgyou can create a site shell script called `config.site' that gives
291023b3b36Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292023b3b36Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293023b3b36Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294023b3b36Smrg`CONFIG_SITE' environment variable to the location of the site script.
295023b3b36SmrgA warning: not all `configure' scripts look for a site script.
296023b3b36Smrg
297023b3b36SmrgDefining Variables
298023b3b36Smrg==================
299023b3b36Smrg
300023b3b36Smrg   Variables not defined in a site shell script can be set in the
301023b3b36Smrgenvironment passed to `configure'.  However, some packages may run
302023b3b36Smrgconfigure again during the build, and the customized values of these
303023b3b36Smrgvariables may be lost.  In order to avoid this problem, you should set
304023b3b36Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305023b3b36Smrg
306023b3b36Smrg     ./configure CC=/usr/local2/bin/gcc
307023b3b36Smrg
308023b3b36Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309023b3b36Smrgoverridden in the site shell script).
310023b3b36Smrg
311023b3b36SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312023b3b36Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313023b3b36Smrg
314023b3b36Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315023b3b36Smrg
316023b3b36Smrg`configure' Invocation
317023b3b36Smrg======================
318023b3b36Smrg
319023b3b36Smrg   `configure' recognizes the following options to control how it
320023b3b36Smrgoperates.
321023b3b36Smrg
322023b3b36Smrg`--help'
323023b3b36Smrg`-h'
324023b3b36Smrg     Print a summary of all of the options to `configure', and exit.
325023b3b36Smrg
326023b3b36Smrg`--help=short'
327023b3b36Smrg`--help=recursive'
328023b3b36Smrg     Print a summary of the options unique to this package's
329023b3b36Smrg     `configure', and exit.  The `short' variant lists options used
330023b3b36Smrg     only in the top level, while the `recursive' variant lists options
331023b3b36Smrg     also present in any nested packages.
332023b3b36Smrg
333023b3b36Smrg`--version'
334023b3b36Smrg`-V'
335023b3b36Smrg     Print the version of Autoconf used to generate the `configure'
336023b3b36Smrg     script, and exit.
337023b3b36Smrg
338023b3b36Smrg`--cache-file=FILE'
339023b3b36Smrg     Enable the cache: use and save the results of the tests in FILE,
340023b3b36Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341023b3b36Smrg     disable caching.
342023b3b36Smrg
343023b3b36Smrg`--config-cache'
344023b3b36Smrg`-C'
345023b3b36Smrg     Alias for `--cache-file=config.cache'.
346023b3b36Smrg
347023b3b36Smrg`--quiet'
348023b3b36Smrg`--silent'
349023b3b36Smrg`-q'
350023b3b36Smrg     Do not print messages saying which checks are being made.  To
351023b3b36Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352023b3b36Smrg     messages will still be shown).
353023b3b36Smrg
354023b3b36Smrg`--srcdir=DIR'
355023b3b36Smrg     Look for the package's source code in directory DIR.  Usually
356023b3b36Smrg     `configure' can determine that directory automatically.
357023b3b36Smrg
358023b3b36Smrg`--prefix=DIR'
359023b3b36Smrg     Use DIR as the installation prefix.  *note Installation Names::
360023b3b36Smrg     for more details, including other options available for fine-tuning
361023b3b36Smrg     the installation locations.
362023b3b36Smrg
363023b3b36Smrg`--no-create'
364023b3b36Smrg`-n'
365023b3b36Smrg     Run the configure checks, but stop before creating any output
366023b3b36Smrg     files.
367023b3b36Smrg
368023b3b36Smrg`configure' also accepts some other, not widely useful, options.  Run
369023b3b36Smrg`configure --help' for more details.
370023b3b36Smrg
371