1b73be646SmrgInstallation Instructions
2b73be646Smrg*************************
3b73be646Smrg
484bf8334SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
584bf8334SmrgInc.
6b73be646Smrg
784bf8334Smrg   Copying and distribution of this file, with or without modification,
884bf8334Smrgare permitted in any medium without royalty provided the copyright
984bf8334Smrgnotice and this notice are preserved.  This file is offered as-is,
1084bf8334Smrgwithout warranty of any kind.
11b73be646Smrg
12b73be646SmrgBasic Installation
13b73be646Smrg==================
14b73be646Smrg
15b73be646Smrg   Briefly, the shell commands `./configure; make; make install' should
16b73be646Smrgconfigure, build, and install this package.  The following
17b73be646Smrgmore-detailed instructions are generic; see the `README' file for
1884bf8334Smrginstructions specific to this package.  Some packages provide this
1984bf8334Smrg`INSTALL' file but do not implement all of the features documented
2084bf8334Smrgbelow.  The lack of an optional feature in a given package is not
2184bf8334Smrgnecessarily a bug.  More recommendations for GNU packages can be found
2284bf8334Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23b73be646Smrg
24b73be646Smrg   The `configure' shell script attempts to guess correct values for
25b73be646Smrgvarious system-dependent variables used during compilation.  It uses
26b73be646Smrgthose values to create a `Makefile' in each directory of the package.
27b73be646SmrgIt may also create one or more `.h' files containing system-dependent
28b73be646Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29b73be646Smrgyou can run in the future to recreate the current configuration, and a
30b73be646Smrgfile `config.log' containing compiler output (useful mainly for
31b73be646Smrgdebugging `configure').
32b73be646Smrg
33b73be646Smrg   It can also use an optional file (typically called `config.cache'
34b73be646Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35b73be646Smrgthe results of its tests to speed up reconfiguring.  Caching is
36b73be646Smrgdisabled by default to prevent problems with accidental use of stale
37b73be646Smrgcache files.
38b73be646Smrg
39b73be646Smrg   If you need to do unusual things to compile the package, please try
40b73be646Smrgto figure out how `configure' could check whether to do them, and mail
41b73be646Smrgdiffs or instructions to the address given in the `README' so they can
42b73be646Smrgbe considered for the next release.  If you are using the cache, and at
43b73be646Smrgsome point `config.cache' contains results you don't want to keep, you
44b73be646Smrgmay remove or edit it.
45b73be646Smrg
46b73be646Smrg   The file `configure.ac' (or `configure.in') is used to create
47b73be646Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48b73be646Smrgyou want to change it or regenerate `configure' using a newer version
49b73be646Smrgof `autoconf'.
50b73be646Smrg
5184bf8334Smrg   The simplest way to compile this package is:
52b73be646Smrg
53b73be646Smrg  1. `cd' to the directory containing the package's source code and type
54b73be646Smrg     `./configure' to configure the package for your system.
55b73be646Smrg
56b73be646Smrg     Running `configure' might take a while.  While running, it prints
57b73be646Smrg     some messages telling which features it is checking for.
58b73be646Smrg
59b73be646Smrg  2. Type `make' to compile the package.
60b73be646Smrg
61b73be646Smrg  3. Optionally, type `make check' to run any self-tests that come with
6284bf8334Smrg     the package, generally using the just-built uninstalled binaries.
63b73be646Smrg
64b73be646Smrg  4. Type `make install' to install the programs and any data files and
6584bf8334Smrg     documentation.  When installing into a prefix owned by root, it is
6684bf8334Smrg     recommended that the package be configured and built as a regular
6784bf8334Smrg     user, and only the `make install' phase executed with root
6884bf8334Smrg     privileges.
6984bf8334Smrg
7084bf8334Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7184bf8334Smrg     this time using the binaries in their final installed location.
7284bf8334Smrg     This target does not install anything.  Running this target as a
7384bf8334Smrg     regular user, particularly if the prior `make install' required
7484bf8334Smrg     root privileges, verifies that the installation completed
7584bf8334Smrg     correctly.
7684bf8334Smrg
7784bf8334Smrg  6. You can remove the program binaries and object files from the
78b73be646Smrg     source code directory by typing `make clean'.  To also remove the
79b73be646Smrg     files that `configure' created (so you can compile the package for
80b73be646Smrg     a different kind of computer), type `make distclean'.  There is
81b73be646Smrg     also a `make maintainer-clean' target, but that is intended mainly
82b73be646Smrg     for the package's developers.  If you use it, you may have to get
83b73be646Smrg     all sorts of other programs in order to regenerate files that came
84b73be646Smrg     with the distribution.
85b73be646Smrg
8684bf8334Smrg  7. Often, you can also type `make uninstall' to remove the installed
8784bf8334Smrg     files again.  In practice, not all packages have tested that
8884bf8334Smrg     uninstallation works correctly, even though it is required by the
8984bf8334Smrg     GNU Coding Standards.
9084bf8334Smrg
9184bf8334Smrg  8. Some packages, particularly those that use Automake, provide `make
9284bf8334Smrg     distcheck', which can by used by developers to test that all other
9384bf8334Smrg     targets like `make install' and `make uninstall' work correctly.
9484bf8334Smrg     This target is generally not run by end users.
95b73be646Smrg
96b73be646SmrgCompilers and Options
97b73be646Smrg=====================
98b73be646Smrg
99b73be646Smrg   Some systems require unusual options for compilation or linking that
100b73be646Smrgthe `configure' script does not know about.  Run `./configure --help'
101b73be646Smrgfor details on some of the pertinent environment variables.
102b73be646Smrg
103b73be646Smrg   You can give `configure' initial values for configuration parameters
104b73be646Smrgby setting variables in the command line or in the environment.  Here
105b73be646Smrgis an example:
106b73be646Smrg
107b73be646Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108b73be646Smrg
109b73be646Smrg   *Note Defining Variables::, for more details.
110b73be646Smrg
111b73be646SmrgCompiling For Multiple Architectures
112b73be646Smrg====================================
113b73be646Smrg
114b73be646Smrg   You can compile the package for more than one kind of computer at the
115b73be646Smrgsame time, by placing the object files for each architecture in their
116b73be646Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117b73be646Smrgdirectory where you want the object files and executables to go and run
118b73be646Smrgthe `configure' script.  `configure' automatically checks for the
11984bf8334Smrgsource code in the directory that `configure' is in and in `..'.  This
12084bf8334Smrgis known as a "VPATH" build.
121b73be646Smrg
122b73be646Smrg   With a non-GNU `make', it is safer to compile the package for one
123b73be646Smrgarchitecture at a time in the source code directory.  After you have
124b73be646Smrginstalled the package for one architecture, use `make distclean' before
125b73be646Smrgreconfiguring for another architecture.
126b73be646Smrg
127b73be646Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128b73be646Smrgexecutables that work on multiple system types--known as "fat" or
129b73be646Smrg"universal" binaries--by specifying multiple `-arch' options to the
130b73be646Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131b73be646Smrgthis:
132b73be646Smrg
133b73be646Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134b73be646Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135b73be646Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136b73be646Smrg
137b73be646Smrg   This is not guaranteed to produce working output in all cases, you
138b73be646Smrgmay have to build one architecture at a time and combine the results
139b73be646Smrgusing the `lipo' tool if you have problems.
140b73be646Smrg
141b73be646SmrgInstallation Names
142b73be646Smrg==================
143b73be646Smrg
144b73be646Smrg   By default, `make install' installs the package's commands under
145b73be646Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146b73be646Smrgcan specify an installation prefix other than `/usr/local' by giving
14784bf8334Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14884bf8334Smrgabsolute file name.
149b73be646Smrg
150b73be646Smrg   You can specify separate installation prefixes for
151b73be646Smrgarchitecture-specific files and architecture-independent files.  If you
152b73be646Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153b73be646SmrgPREFIX as the prefix for installing programs and libraries.
154b73be646SmrgDocumentation and other data files still use the regular prefix.
155b73be646Smrg
156b73be646Smrg   In addition, if you use an unusual directory layout you can give
157b73be646Smrgoptions like `--bindir=DIR' to specify different values for particular
158b73be646Smrgkinds of files.  Run `configure --help' for a list of the directories
15984bf8334Smrgyou can set and what kinds of files go in them.  In general, the
16084bf8334Smrgdefault for these options is expressed in terms of `${prefix}', so that
16184bf8334Smrgspecifying just `--prefix' will affect all of the other directory
16284bf8334Smrgspecifications that were not explicitly provided.
16384bf8334Smrg
16484bf8334Smrg   The most portable way to affect installation locations is to pass the
16584bf8334Smrgcorrect locations to `configure'; however, many packages provide one or
16684bf8334Smrgboth of the following shortcuts of passing variable assignments to the
16784bf8334Smrg`make install' command line to change installation locations without
16884bf8334Smrghaving to reconfigure or recompile.
16984bf8334Smrg
17084bf8334Smrg   The first method involves providing an override variable for each
17184bf8334Smrgaffected directory.  For example, `make install
17284bf8334Smrgprefix=/alternate/directory' will choose an alternate location for all
17384bf8334Smrgdirectory configuration variables that were expressed in terms of
17484bf8334Smrg`${prefix}'.  Any directories that were specified during `configure',
17584bf8334Smrgbut not in terms of `${prefix}', must each be overridden at install
17684bf8334Smrgtime for the entire installation to be relocated.  The approach of
17784bf8334Smrgmakefile variable overrides for each directory variable is required by
17884bf8334Smrgthe GNU Coding Standards, and ideally causes no recompilation.
17984bf8334SmrgHowever, some platforms have known limitations with the semantics of
18084bf8334Smrgshared libraries that end up requiring recompilation when using this
18184bf8334Smrgmethod, particularly noticeable in packages that use GNU Libtool.
18284bf8334Smrg
18384bf8334Smrg   The second method involves providing the `DESTDIR' variable.  For
18484bf8334Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
18584bf8334Smrg`/alternate/directory' before all installation names.  The approach of
18684bf8334Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18784bf8334Smrgdoes not work on platforms that have drive letters.  On the other hand,
18884bf8334Smrgit does better at avoiding recompilation issues, and works well even
18984bf8334Smrgwhen some directory options were not specified in terms of `${prefix}'
19084bf8334Smrgat `configure' time.
19184bf8334Smrg
19284bf8334SmrgOptional Features
19384bf8334Smrg=================
194b73be646Smrg
195b73be646Smrg   If the package supports it, you can cause programs to be installed
196b73be646Smrgwith an extra prefix or suffix on their names by giving `configure' the
197b73be646Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198b73be646Smrg
199b73be646Smrg   Some packages pay attention to `--enable-FEATURE' options to
200b73be646Smrg`configure', where FEATURE indicates an optional part of the package.
201b73be646SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202b73be646Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203b73be646Smrg`README' should mention any `--enable-' and `--with-' options that the
204b73be646Smrgpackage recognizes.
205b73be646Smrg
206b73be646Smrg   For packages that use the X Window System, `configure' can usually
207b73be646Smrgfind the X include and library files automatically, but if it doesn't,
208b73be646Smrgyou can use the `configure' options `--x-includes=DIR' and
209b73be646Smrg`--x-libraries=DIR' to specify their locations.
210b73be646Smrg
21184bf8334Smrg   Some packages offer the ability to configure how verbose the
21284bf8334Smrgexecution of `make' will be.  For these packages, running `./configure
21384bf8334Smrg--enable-silent-rules' sets the default to minimal output, which can be
21484bf8334Smrgoverridden with `make V=1'; while running `./configure
21584bf8334Smrg--disable-silent-rules' sets the default to verbose, which can be
21684bf8334Smrgoverridden with `make V=0'.
21784bf8334Smrg
218b73be646SmrgParticular systems
219b73be646Smrg==================
220b73be646Smrg
221b73be646Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222b73be646SmrgCC is not installed, it is recommended to use the following options in
223b73be646Smrgorder to use an ANSI C compiler:
224b73be646Smrg
22584bf8334Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226b73be646Smrg
227b73be646Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228b73be646Smrg
22984bf8334Smrg   HP-UX `make' updates targets which have the same time stamps as
23084bf8334Smrgtheir prerequisites, which makes it generally unusable when shipped
23184bf8334Smrggenerated files such as `configure' are involved.  Use GNU `make'
23284bf8334Smrginstead.
23384bf8334Smrg
234b73be646Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235b73be646Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236b73be646Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237b73be646Smrgto try
238b73be646Smrg
239b73be646Smrg     ./configure CC="cc"
240b73be646Smrg
241b73be646Smrgand if that doesn't work, try
242b73be646Smrg
243b73be646Smrg     ./configure CC="cc -nodtk"
244b73be646Smrg
24584bf8334Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24684bf8334Smrgdirectory contains several dysfunctional programs; working variants of
24784bf8334Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24884bf8334Smrgin your `PATH', put it _after_ `/usr/bin'.
24984bf8334Smrg
25084bf8334Smrg   On Haiku, software installed for all users goes in `/boot/common',
25184bf8334Smrgnot `/usr/local'.  It is recommended to use the following options:
25284bf8334Smrg
25384bf8334Smrg     ./configure --prefix=/boot/common
25484bf8334Smrg
255b73be646SmrgSpecifying the System Type
256b73be646Smrg==========================
257b73be646Smrg
258b73be646Smrg   There may be some features `configure' cannot figure out
259b73be646Smrgautomatically, but needs to determine by the type of machine the package
260b73be646Smrgwill run on.  Usually, assuming the package is built to be run on the
261b73be646Smrg_same_ architectures, `configure' can figure that out, but if it prints
262b73be646Smrga message saying it cannot guess the machine type, give it the
263b73be646Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264b73be646Smrgtype, such as `sun4', or a canonical name which has the form:
265b73be646Smrg
266b73be646Smrg     CPU-COMPANY-SYSTEM
267b73be646Smrg
268b73be646Smrgwhere SYSTEM can have one of these forms:
269b73be646Smrg
27084bf8334Smrg     OS
27184bf8334Smrg     KERNEL-OS
272b73be646Smrg
273b73be646Smrg   See the file `config.sub' for the possible values of each field.  If
274b73be646Smrg`config.sub' isn't included in this package, then this package doesn't
275b73be646Smrgneed to know the machine type.
276b73be646Smrg
277b73be646Smrg   If you are _building_ compiler tools for cross-compiling, you should
278b73be646Smrguse the option `--target=TYPE' to select the type of system they will
279b73be646Smrgproduce code for.
280b73be646Smrg
281b73be646Smrg   If you want to _use_ a cross compiler, that generates code for a
282b73be646Smrgplatform different from the build platform, you should specify the
283b73be646Smrg"host" platform (i.e., that on which the generated programs will
284b73be646Smrgeventually be run) with `--host=TYPE'.
285b73be646Smrg
286b73be646SmrgSharing Defaults
287b73be646Smrg================
288b73be646Smrg
289b73be646Smrg   If you want to set default values for `configure' scripts to share,
290b73be646Smrgyou can create a site shell script called `config.site' that gives
291b73be646Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292b73be646Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293b73be646Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294b73be646Smrg`CONFIG_SITE' environment variable to the location of the site script.
295b73be646SmrgA warning: not all `configure' scripts look for a site script.
296b73be646Smrg
297b73be646SmrgDefining Variables
298b73be646Smrg==================
299b73be646Smrg
300b73be646Smrg   Variables not defined in a site shell script can be set in the
301b73be646Smrgenvironment passed to `configure'.  However, some packages may run
302b73be646Smrgconfigure again during the build, and the customized values of these
303b73be646Smrgvariables may be lost.  In order to avoid this problem, you should set
304b73be646Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305b73be646Smrg
306b73be646Smrg     ./configure CC=/usr/local2/bin/gcc
307b73be646Smrg
308b73be646Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309b73be646Smrgoverridden in the site shell script).
310b73be646Smrg
311b73be646SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312b73be646Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313b73be646Smrg
314b73be646Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315b73be646Smrg
316b73be646Smrg`configure' Invocation
317b73be646Smrg======================
318b73be646Smrg
319b73be646Smrg   `configure' recognizes the following options to control how it
320b73be646Smrgoperates.
321b73be646Smrg
322b73be646Smrg`--help'
323b73be646Smrg`-h'
324b73be646Smrg     Print a summary of all of the options to `configure', and exit.
325b73be646Smrg
326b73be646Smrg`--help=short'
327b73be646Smrg`--help=recursive'
328b73be646Smrg     Print a summary of the options unique to this package's
329b73be646Smrg     `configure', and exit.  The `short' variant lists options used
330b73be646Smrg     only in the top level, while the `recursive' variant lists options
331b73be646Smrg     also present in any nested packages.
332b73be646Smrg
333b73be646Smrg`--version'
334b73be646Smrg`-V'
335b73be646Smrg     Print the version of Autoconf used to generate the `configure'
336b73be646Smrg     script, and exit.
337b73be646Smrg
338b73be646Smrg`--cache-file=FILE'
339b73be646Smrg     Enable the cache: use and save the results of the tests in FILE,
340b73be646Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341b73be646Smrg     disable caching.
342b73be646Smrg
343b73be646Smrg`--config-cache'
344b73be646Smrg`-C'
345b73be646Smrg     Alias for `--cache-file=config.cache'.
346b73be646Smrg
347b73be646Smrg`--quiet'
348b73be646Smrg`--silent'
349b73be646Smrg`-q'
350b73be646Smrg     Do not print messages saying which checks are being made.  To
351b73be646Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352b73be646Smrg     messages will still be shown).
353b73be646Smrg
354b73be646Smrg`--srcdir=DIR'
355b73be646Smrg     Look for the package's source code in directory DIR.  Usually
356b73be646Smrg     `configure' can determine that directory automatically.
357b73be646Smrg
358b73be646Smrg`--prefix=DIR'
35984bf8334Smrg     Use DIR as the installation prefix.  *note Installation Names::
360b73be646Smrg     for more details, including other options available for fine-tuning
361b73be646Smrg     the installation locations.
362b73be646Smrg
363b73be646Smrg`--no-create'
364b73be646Smrg`-n'
365b73be646Smrg     Run the configure checks, but stop before creating any output
366b73be646Smrg     files.
367b73be646Smrg
368b73be646Smrg`configure' also accepts some other, not widely useful, options.  Run
369b73be646Smrg`configure --help' for more details.
370b73be646Smrg
371