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