1765486e8SmrgInstallation Instructions
2765486e8Smrg*************************
3765486e8Smrg
4b8414663SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5b8414663SmrgInc.
6765486e8Smrg
7b8414663Smrg   Copying and distribution of this file, with or without modification,
8b8414663Smrgare permitted in any medium without royalty provided the copyright
9b8414663Smrgnotice and this notice are preserved.  This file is offered as-is,
10b8414663Smrgwithout warranty of any kind.
11765486e8Smrg
12765486e8SmrgBasic Installation
13765486e8Smrg==================
14765486e8Smrg
15765486e8Smrg   Briefly, the shell commands `./configure; make; make install' should
16765486e8Smrgconfigure, build, and install this package.  The following
17765486e8Smrgmore-detailed instructions are generic; see the `README' file for
18b8414663Smrginstructions specific to this package.  Some packages provide this
19b8414663Smrg`INSTALL' file but do not implement all of the features documented
20b8414663Smrgbelow.  The lack of an optional feature in a given package is not
21b8414663Smrgnecessarily a bug.  More recommendations for GNU packages can be found
22b8414663Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23765486e8Smrg
24765486e8Smrg   The `configure' shell script attempts to guess correct values for
25765486e8Smrgvarious system-dependent variables used during compilation.  It uses
26765486e8Smrgthose values to create a `Makefile' in each directory of the package.
27765486e8SmrgIt may also create one or more `.h' files containing system-dependent
28765486e8Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29765486e8Smrgyou can run in the future to recreate the current configuration, and a
30765486e8Smrgfile `config.log' containing compiler output (useful mainly for
31765486e8Smrgdebugging `configure').
32765486e8Smrg
33765486e8Smrg   It can also use an optional file (typically called `config.cache'
34765486e8Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35765486e8Smrgthe results of its tests to speed up reconfiguring.  Caching is
36765486e8Smrgdisabled by default to prevent problems with accidental use of stale
37765486e8Smrgcache files.
38765486e8Smrg
39765486e8Smrg   If you need to do unusual things to compile the package, please try
40765486e8Smrgto figure out how `configure' could check whether to do them, and mail
41765486e8Smrgdiffs or instructions to the address given in the `README' so they can
42765486e8Smrgbe considered for the next release.  If you are using the cache, and at
43765486e8Smrgsome point `config.cache' contains results you don't want to keep, you
44765486e8Smrgmay remove or edit it.
45765486e8Smrg
46765486e8Smrg   The file `configure.ac' (or `configure.in') is used to create
47765486e8Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48765486e8Smrgyou want to change it or regenerate `configure' using a newer version
49765486e8Smrgof `autoconf'.
50765486e8Smrg
51b8414663Smrg   The simplest way to compile this package is:
52765486e8Smrg
53765486e8Smrg  1. `cd' to the directory containing the package's source code and type
54765486e8Smrg     `./configure' to configure the package for your system.
55765486e8Smrg
56765486e8Smrg     Running `configure' might take a while.  While running, it prints
57765486e8Smrg     some messages telling which features it is checking for.
58765486e8Smrg
59765486e8Smrg  2. Type `make' to compile the package.
60765486e8Smrg
61765486e8Smrg  3. Optionally, type `make check' to run any self-tests that come with
62b8414663Smrg     the package, generally using the just-built uninstalled binaries.
63765486e8Smrg
64765486e8Smrg  4. Type `make install' to install the programs and any data files and
65b8414663Smrg     documentation.  When installing into a prefix owned by root, it is
66b8414663Smrg     recommended that the package be configured and built as a regular
67b8414663Smrg     user, and only the `make install' phase executed with root
68b8414663Smrg     privileges.
69b8414663Smrg
70b8414663Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71b8414663Smrg     this time using the binaries in their final installed location.
72b8414663Smrg     This target does not install anything.  Running this target as a
73b8414663Smrg     regular user, particularly if the prior `make install' required
74b8414663Smrg     root privileges, verifies that the installation completed
75b8414663Smrg     correctly.
76b8414663Smrg
77b8414663Smrg  6. You can remove the program binaries and object files from the
78765486e8Smrg     source code directory by typing `make clean'.  To also remove the
79765486e8Smrg     files that `configure' created (so you can compile the package for
80765486e8Smrg     a different kind of computer), type `make distclean'.  There is
81765486e8Smrg     also a `make maintainer-clean' target, but that is intended mainly
82765486e8Smrg     for the package's developers.  If you use it, you may have to get
83765486e8Smrg     all sorts of other programs in order to regenerate files that came
84765486e8Smrg     with the distribution.
85765486e8Smrg
86b8414663Smrg  7. Often, you can also type `make uninstall' to remove the installed
87b8414663Smrg     files again.  In practice, not all packages have tested that
88b8414663Smrg     uninstallation works correctly, even though it is required by the
89b8414663Smrg     GNU Coding Standards.
90b8414663Smrg
91b8414663Smrg  8. Some packages, particularly those that use Automake, provide `make
92b8414663Smrg     distcheck', which can by used by developers to test that all other
93b8414663Smrg     targets like `make install' and `make uninstall' work correctly.
94b8414663Smrg     This target is generally not run by end users.
95765486e8Smrg
96765486e8SmrgCompilers and Options
97765486e8Smrg=====================
98765486e8Smrg
99765486e8Smrg   Some systems require unusual options for compilation or linking that
100765486e8Smrgthe `configure' script does not know about.  Run `./configure --help'
101765486e8Smrgfor details on some of the pertinent environment variables.
102765486e8Smrg
103765486e8Smrg   You can give `configure' initial values for configuration parameters
104765486e8Smrgby setting variables in the command line or in the environment.  Here
105765486e8Smrgis an example:
106765486e8Smrg
107765486e8Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108765486e8Smrg
109765486e8Smrg   *Note Defining Variables::, for more details.
110765486e8Smrg
111765486e8SmrgCompiling For Multiple Architectures
112765486e8Smrg====================================
113765486e8Smrg
114765486e8Smrg   You can compile the package for more than one kind of computer at the
115765486e8Smrgsame time, by placing the object files for each architecture in their
116765486e8Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117765486e8Smrgdirectory where you want the object files and executables to go and run
118765486e8Smrgthe `configure' script.  `configure' automatically checks for the
119b8414663Smrgsource code in the directory that `configure' is in and in `..'.  This
120b8414663Smrgis known as a "VPATH" build.
121765486e8Smrg
122765486e8Smrg   With a non-GNU `make', it is safer to compile the package for one
123765486e8Smrgarchitecture at a time in the source code directory.  After you have
124765486e8Smrginstalled the package for one architecture, use `make distclean' before
125765486e8Smrgreconfiguring for another architecture.
126765486e8Smrg
127765486e8Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128765486e8Smrgexecutables that work on multiple system types--known as "fat" or
129765486e8Smrg"universal" binaries--by specifying multiple `-arch' options to the
130765486e8Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131765486e8Smrgthis:
132765486e8Smrg
133765486e8Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134765486e8Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135765486e8Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136765486e8Smrg
137765486e8Smrg   This is not guaranteed to produce working output in all cases, you
138765486e8Smrgmay have to build one architecture at a time and combine the results
139765486e8Smrgusing the `lipo' tool if you have problems.
140765486e8Smrg
141765486e8SmrgInstallation Names
142765486e8Smrg==================
143765486e8Smrg
144765486e8Smrg   By default, `make install' installs the package's commands under
145765486e8Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146765486e8Smrgcan specify an installation prefix other than `/usr/local' by giving
147b8414663Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148b8414663Smrgabsolute file name.
149765486e8Smrg
150765486e8Smrg   You can specify separate installation prefixes for
151765486e8Smrgarchitecture-specific files and architecture-independent files.  If you
152765486e8Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153765486e8SmrgPREFIX as the prefix for installing programs and libraries.
154765486e8SmrgDocumentation and other data files still use the regular prefix.
155765486e8Smrg
156765486e8Smrg   In addition, if you use an unusual directory layout you can give
157765486e8Smrgoptions like `--bindir=DIR' to specify different values for particular
158765486e8Smrgkinds of files.  Run `configure --help' for a list of the directories
159b8414663Smrgyou can set and what kinds of files go in them.  In general, the
160b8414663Smrgdefault for these options is expressed in terms of `${prefix}', so that
161b8414663Smrgspecifying just `--prefix' will affect all of the other directory
162b8414663Smrgspecifications that were not explicitly provided.
163b8414663Smrg
164b8414663Smrg   The most portable way to affect installation locations is to pass the
165b8414663Smrgcorrect locations to `configure'; however, many packages provide one or
166b8414663Smrgboth of the following shortcuts of passing variable assignments to the
167b8414663Smrg`make install' command line to change installation locations without
168b8414663Smrghaving to reconfigure or recompile.
169b8414663Smrg
170b8414663Smrg   The first method involves providing an override variable for each
171b8414663Smrgaffected directory.  For example, `make install
172b8414663Smrgprefix=/alternate/directory' will choose an alternate location for all
173b8414663Smrgdirectory configuration variables that were expressed in terms of
174b8414663Smrg`${prefix}'.  Any directories that were specified during `configure',
175b8414663Smrgbut not in terms of `${prefix}', must each be overridden at install
176b8414663Smrgtime for the entire installation to be relocated.  The approach of
177b8414663Smrgmakefile variable overrides for each directory variable is required by
178b8414663Smrgthe GNU Coding Standards, and ideally causes no recompilation.
179b8414663SmrgHowever, some platforms have known limitations with the semantics of
180b8414663Smrgshared libraries that end up requiring recompilation when using this
181b8414663Smrgmethod, particularly noticeable in packages that use GNU Libtool.
182b8414663Smrg
183b8414663Smrg   The second method involves providing the `DESTDIR' variable.  For
184b8414663Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
185b8414663Smrg`/alternate/directory' before all installation names.  The approach of
186b8414663Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187b8414663Smrgdoes not work on platforms that have drive letters.  On the other hand,
188b8414663Smrgit does better at avoiding recompilation issues, and works well even
189b8414663Smrgwhen some directory options were not specified in terms of `${prefix}'
190b8414663Smrgat `configure' time.
191b8414663Smrg
192b8414663SmrgOptional Features
193b8414663Smrg=================
194765486e8Smrg
195765486e8Smrg   If the package supports it, you can cause programs to be installed
196765486e8Smrgwith an extra prefix or suffix on their names by giving `configure' the
197765486e8Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198765486e8Smrg
199765486e8Smrg   Some packages pay attention to `--enable-FEATURE' options to
200765486e8Smrg`configure', where FEATURE indicates an optional part of the package.
201765486e8SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202765486e8Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203765486e8Smrg`README' should mention any `--enable-' and `--with-' options that the
204765486e8Smrgpackage recognizes.
205765486e8Smrg
206765486e8Smrg   For packages that use the X Window System, `configure' can usually
207765486e8Smrgfind the X include and library files automatically, but if it doesn't,
208765486e8Smrgyou can use the `configure' options `--x-includes=DIR' and
209765486e8Smrg`--x-libraries=DIR' to specify their locations.
210765486e8Smrg
211b8414663Smrg   Some packages offer the ability to configure how verbose the
212b8414663Smrgexecution of `make' will be.  For these packages, running `./configure
213b8414663Smrg--enable-silent-rules' sets the default to minimal output, which can be
214b8414663Smrgoverridden with `make V=1'; while running `./configure
215b8414663Smrg--disable-silent-rules' sets the default to verbose, which can be
216b8414663Smrgoverridden with `make V=0'.
217b8414663Smrg
218765486e8SmrgParticular systems
219765486e8Smrg==================
220765486e8Smrg
221765486e8Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222765486e8SmrgCC is not installed, it is recommended to use the following options in
223765486e8Smrgorder to use an ANSI C compiler:
224765486e8Smrg
225b8414663Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226765486e8Smrg
227765486e8Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228765486e8Smrg
229b8414663Smrg   HP-UX `make' updates targets which have the same time stamps as
230b8414663Smrgtheir prerequisites, which makes it generally unusable when shipped
231b8414663Smrggenerated files such as `configure' are involved.  Use GNU `make'
232b8414663Smrginstead.
233b8414663Smrg
234765486e8Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235765486e8Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236765486e8Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237765486e8Smrgto try
238765486e8Smrg
239765486e8Smrg     ./configure CC="cc"
240765486e8Smrg
241765486e8Smrgand if that doesn't work, try
242765486e8Smrg
243765486e8Smrg     ./configure CC="cc -nodtk"
244765486e8Smrg
245b8414663Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246b8414663Smrgdirectory contains several dysfunctional programs; working variants of
247b8414663Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248b8414663Smrgin your `PATH', put it _after_ `/usr/bin'.
249b8414663Smrg
250b8414663Smrg   On Haiku, software installed for all users goes in `/boot/common',
251b8414663Smrgnot `/usr/local'.  It is recommended to use the following options:
252b8414663Smrg
253b8414663Smrg     ./configure --prefix=/boot/common
254b8414663Smrg
255765486e8SmrgSpecifying the System Type
256765486e8Smrg==========================
257765486e8Smrg
258765486e8Smrg   There may be some features `configure' cannot figure out
259765486e8Smrgautomatically, but needs to determine by the type of machine the package
260765486e8Smrgwill run on.  Usually, assuming the package is built to be run on the
261765486e8Smrg_same_ architectures, `configure' can figure that out, but if it prints
262765486e8Smrga message saying it cannot guess the machine type, give it the
263765486e8Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264765486e8Smrgtype, such as `sun4', or a canonical name which has the form:
265765486e8Smrg
266765486e8Smrg     CPU-COMPANY-SYSTEM
267765486e8Smrg
268765486e8Smrgwhere SYSTEM can have one of these forms:
269765486e8Smrg
270b8414663Smrg     OS
271b8414663Smrg     KERNEL-OS
272765486e8Smrg
273765486e8Smrg   See the file `config.sub' for the possible values of each field.  If
274765486e8Smrg`config.sub' isn't included in this package, then this package doesn't
275765486e8Smrgneed to know the machine type.
276765486e8Smrg
277765486e8Smrg   If you are _building_ compiler tools for cross-compiling, you should
278765486e8Smrguse the option `--target=TYPE' to select the type of system they will
279765486e8Smrgproduce code for.
280765486e8Smrg
281765486e8Smrg   If you want to _use_ a cross compiler, that generates code for a
282765486e8Smrgplatform different from the build platform, you should specify the
283765486e8Smrg"host" platform (i.e., that on which the generated programs will
284765486e8Smrgeventually be run) with `--host=TYPE'.
285765486e8Smrg
286765486e8SmrgSharing Defaults
287765486e8Smrg================
288765486e8Smrg
289765486e8Smrg   If you want to set default values for `configure' scripts to share,
290765486e8Smrgyou can create a site shell script called `config.site' that gives
291765486e8Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292765486e8Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293765486e8Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294765486e8Smrg`CONFIG_SITE' environment variable to the location of the site script.
295765486e8SmrgA warning: not all `configure' scripts look for a site script.
296765486e8Smrg
297765486e8SmrgDefining Variables
298765486e8Smrg==================
299765486e8Smrg
300765486e8Smrg   Variables not defined in a site shell script can be set in the
301765486e8Smrgenvironment passed to `configure'.  However, some packages may run
302765486e8Smrgconfigure again during the build, and the customized values of these
303765486e8Smrgvariables may be lost.  In order to avoid this problem, you should set
304765486e8Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305765486e8Smrg
306765486e8Smrg     ./configure CC=/usr/local2/bin/gcc
307765486e8Smrg
308765486e8Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309765486e8Smrgoverridden in the site shell script).
310765486e8Smrg
311765486e8SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312765486e8Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313765486e8Smrg
314765486e8Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315765486e8Smrg
316765486e8Smrg`configure' Invocation
317765486e8Smrg======================
318765486e8Smrg
319765486e8Smrg   `configure' recognizes the following options to control how it
320765486e8Smrgoperates.
321765486e8Smrg
322765486e8Smrg`--help'
323765486e8Smrg`-h'
324765486e8Smrg     Print a summary of all of the options to `configure', and exit.
325765486e8Smrg
326765486e8Smrg`--help=short'
327765486e8Smrg`--help=recursive'
328765486e8Smrg     Print a summary of the options unique to this package's
329765486e8Smrg     `configure', and exit.  The `short' variant lists options used
330765486e8Smrg     only in the top level, while the `recursive' variant lists options
331765486e8Smrg     also present in any nested packages.
332765486e8Smrg
333765486e8Smrg`--version'
334765486e8Smrg`-V'
335765486e8Smrg     Print the version of Autoconf used to generate the `configure'
336765486e8Smrg     script, and exit.
337765486e8Smrg
338765486e8Smrg`--cache-file=FILE'
339765486e8Smrg     Enable the cache: use and save the results of the tests in FILE,
340765486e8Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341765486e8Smrg     disable caching.
342765486e8Smrg
343765486e8Smrg`--config-cache'
344765486e8Smrg`-C'
345765486e8Smrg     Alias for `--cache-file=config.cache'.
346765486e8Smrg
347765486e8Smrg`--quiet'
348765486e8Smrg`--silent'
349765486e8Smrg`-q'
350765486e8Smrg     Do not print messages saying which checks are being made.  To
351765486e8Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352765486e8Smrg     messages will still be shown).
353765486e8Smrg
354765486e8Smrg`--srcdir=DIR'
355765486e8Smrg     Look for the package's source code in directory DIR.  Usually
356765486e8Smrg     `configure' can determine that directory automatically.
357765486e8Smrg
358765486e8Smrg`--prefix=DIR'
359b8414663Smrg     Use DIR as the installation prefix.  *note Installation Names::
360765486e8Smrg     for more details, including other options available for fine-tuning
361765486e8Smrg     the installation locations.
362765486e8Smrg
363765486e8Smrg`--no-create'
364765486e8Smrg`-n'
365765486e8Smrg     Run the configure checks, but stop before creating any output
366765486e8Smrg     files.
367765486e8Smrg
368765486e8Smrg`configure' also accepts some other, not widely useful, options.  Run
369765486e8Smrg`configure --help' for more details.
370765486e8Smrg
371