1b27e1915SmrgInstallation Instructions
2b27e1915Smrg*************************
3b27e1915Smrg
41d3211a3SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
51d3211a3SmrgInc.
6b27e1915Smrg
71d3211a3Smrg   Copying and distribution of this file, with or without modification,
81d3211a3Smrgare permitted in any medium without royalty provided the copyright
91d3211a3Smrgnotice and this notice are preserved.  This file is offered as-is,
101d3211a3Smrgwithout warranty of any kind.
11b27e1915Smrg
12b27e1915SmrgBasic Installation
13b27e1915Smrg==================
14b27e1915Smrg
15b27e1915Smrg   Briefly, the shell commands `./configure; make; make install' should
16b27e1915Smrgconfigure, build, and install this package.  The following
17b27e1915Smrgmore-detailed instructions are generic; see the `README' file for
181d3211a3Smrginstructions specific to this package.  Some packages provide this
191d3211a3Smrg`INSTALL' file but do not implement all of the features documented
201d3211a3Smrgbelow.  The lack of an optional feature in a given package is not
211d3211a3Smrgnecessarily a bug.  More recommendations for GNU packages can be found
221d3211a3Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23b27e1915Smrg
24b27e1915Smrg   The `configure' shell script attempts to guess correct values for
25b27e1915Smrgvarious system-dependent variables used during compilation.  It uses
26b27e1915Smrgthose values to create a `Makefile' in each directory of the package.
27b27e1915SmrgIt may also create one or more `.h' files containing system-dependent
28b27e1915Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29b27e1915Smrgyou can run in the future to recreate the current configuration, and a
30b27e1915Smrgfile `config.log' containing compiler output (useful mainly for
31b27e1915Smrgdebugging `configure').
32b27e1915Smrg
33b27e1915Smrg   It can also use an optional file (typically called `config.cache'
34b27e1915Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35b27e1915Smrgthe results of its tests to speed up reconfiguring.  Caching is
36b27e1915Smrgdisabled by default to prevent problems with accidental use of stale
37b27e1915Smrgcache files.
38b27e1915Smrg
39b27e1915Smrg   If you need to do unusual things to compile the package, please try
40b27e1915Smrgto figure out how `configure' could check whether to do them, and mail
41b27e1915Smrgdiffs or instructions to the address given in the `README' so they can
42b27e1915Smrgbe considered for the next release.  If you are using the cache, and at
43b27e1915Smrgsome point `config.cache' contains results you don't want to keep, you
44b27e1915Smrgmay remove or edit it.
45b27e1915Smrg
46b27e1915Smrg   The file `configure.ac' (or `configure.in') is used to create
47b27e1915Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48b27e1915Smrgyou want to change it or regenerate `configure' using a newer version
49b27e1915Smrgof `autoconf'.
50b27e1915Smrg
511d3211a3Smrg   The simplest way to compile this package is:
52b27e1915Smrg
53b27e1915Smrg  1. `cd' to the directory containing the package's source code and type
54b27e1915Smrg     `./configure' to configure the package for your system.
55b27e1915Smrg
56b27e1915Smrg     Running `configure' might take a while.  While running, it prints
57b27e1915Smrg     some messages telling which features it is checking for.
58b27e1915Smrg
59b27e1915Smrg  2. Type `make' to compile the package.
60b27e1915Smrg
61b27e1915Smrg  3. Optionally, type `make check' to run any self-tests that come with
621d3211a3Smrg     the package, generally using the just-built uninstalled binaries.
63b27e1915Smrg
64b27e1915Smrg  4. Type `make install' to install the programs and any data files and
651d3211a3Smrg     documentation.  When installing into a prefix owned by root, it is
661d3211a3Smrg     recommended that the package be configured and built as a regular
671d3211a3Smrg     user, and only the `make install' phase executed with root
681d3211a3Smrg     privileges.
691d3211a3Smrg
701d3211a3Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
711d3211a3Smrg     this time using the binaries in their final installed location.
721d3211a3Smrg     This target does not install anything.  Running this target as a
731d3211a3Smrg     regular user, particularly if the prior `make install' required
741d3211a3Smrg     root privileges, verifies that the installation completed
751d3211a3Smrg     correctly.
761d3211a3Smrg
771d3211a3Smrg  6. You can remove the program binaries and object files from the
78b27e1915Smrg     source code directory by typing `make clean'.  To also remove the
79b27e1915Smrg     files that `configure' created (so you can compile the package for
80b27e1915Smrg     a different kind of computer), type `make distclean'.  There is
81b27e1915Smrg     also a `make maintainer-clean' target, but that is intended mainly
82b27e1915Smrg     for the package's developers.  If you use it, you may have to get
83b27e1915Smrg     all sorts of other programs in order to regenerate files that came
84b27e1915Smrg     with the distribution.
85b27e1915Smrg
861d3211a3Smrg  7. Often, you can also type `make uninstall' to remove the installed
871d3211a3Smrg     files again.  In practice, not all packages have tested that
881d3211a3Smrg     uninstallation works correctly, even though it is required by the
891d3211a3Smrg     GNU Coding Standards.
901d3211a3Smrg
911d3211a3Smrg  8. Some packages, particularly those that use Automake, provide `make
921d3211a3Smrg     distcheck', which can by used by developers to test that all other
931d3211a3Smrg     targets like `make install' and `make uninstall' work correctly.
941d3211a3Smrg     This target is generally not run by end users.
95b27e1915Smrg
96b27e1915SmrgCompilers and Options
97b27e1915Smrg=====================
98b27e1915Smrg
99b27e1915Smrg   Some systems require unusual options for compilation or linking that
100b27e1915Smrgthe `configure' script does not know about.  Run `./configure --help'
101b27e1915Smrgfor details on some of the pertinent environment variables.
102b27e1915Smrg
103b27e1915Smrg   You can give `configure' initial values for configuration parameters
104b27e1915Smrgby setting variables in the command line or in the environment.  Here
105b27e1915Smrgis an example:
106b27e1915Smrg
107b27e1915Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108b27e1915Smrg
109b27e1915Smrg   *Note Defining Variables::, for more details.
110b27e1915Smrg
111b27e1915SmrgCompiling For Multiple Architectures
112b27e1915Smrg====================================
113b27e1915Smrg
114b27e1915Smrg   You can compile the package for more than one kind of computer at the
115b27e1915Smrgsame time, by placing the object files for each architecture in their
116b27e1915Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117b27e1915Smrgdirectory where you want the object files and executables to go and run
118b27e1915Smrgthe `configure' script.  `configure' automatically checks for the
1191d3211a3Smrgsource code in the directory that `configure' is in and in `..'.  This
1201d3211a3Smrgis known as a "VPATH" build.
121b27e1915Smrg
122b27e1915Smrg   With a non-GNU `make', it is safer to compile the package for one
123b27e1915Smrgarchitecture at a time in the source code directory.  After you have
124b27e1915Smrginstalled the package for one architecture, use `make distclean' before
125b27e1915Smrgreconfiguring for another architecture.
126b27e1915Smrg
127b27e1915Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128b27e1915Smrgexecutables that work on multiple system types--known as "fat" or
129b27e1915Smrg"universal" binaries--by specifying multiple `-arch' options to the
130b27e1915Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131b27e1915Smrgthis:
132b27e1915Smrg
133b27e1915Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134b27e1915Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135b27e1915Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136b27e1915Smrg
137b27e1915Smrg   This is not guaranteed to produce working output in all cases, you
138b27e1915Smrgmay have to build one architecture at a time and combine the results
139b27e1915Smrgusing the `lipo' tool if you have problems.
140b27e1915Smrg
141b27e1915SmrgInstallation Names
142b27e1915Smrg==================
143b27e1915Smrg
144b27e1915Smrg   By default, `make install' installs the package's commands under
145b27e1915Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146b27e1915Smrgcan specify an installation prefix other than `/usr/local' by giving
1471d3211a3Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1481d3211a3Smrgabsolute file name.
149b27e1915Smrg
150b27e1915Smrg   You can specify separate installation prefixes for
151b27e1915Smrgarchitecture-specific files and architecture-independent files.  If you
152b27e1915Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153b27e1915SmrgPREFIX as the prefix for installing programs and libraries.
154b27e1915SmrgDocumentation and other data files still use the regular prefix.
155b27e1915Smrg
156b27e1915Smrg   In addition, if you use an unusual directory layout you can give
157b27e1915Smrgoptions like `--bindir=DIR' to specify different values for particular
158b27e1915Smrgkinds of files.  Run `configure --help' for a list of the directories
1591d3211a3Smrgyou can set and what kinds of files go in them.  In general, the
1601d3211a3Smrgdefault for these options is expressed in terms of `${prefix}', so that
1611d3211a3Smrgspecifying just `--prefix' will affect all of the other directory
1621d3211a3Smrgspecifications that were not explicitly provided.
1631d3211a3Smrg
1641d3211a3Smrg   The most portable way to affect installation locations is to pass the
1651d3211a3Smrgcorrect locations to `configure'; however, many packages provide one or
1661d3211a3Smrgboth of the following shortcuts of passing variable assignments to the
1671d3211a3Smrg`make install' command line to change installation locations without
1681d3211a3Smrghaving to reconfigure or recompile.
1691d3211a3Smrg
1701d3211a3Smrg   The first method involves providing an override variable for each
1711d3211a3Smrgaffected directory.  For example, `make install
1721d3211a3Smrgprefix=/alternate/directory' will choose an alternate location for all
1731d3211a3Smrgdirectory configuration variables that were expressed in terms of
1741d3211a3Smrg`${prefix}'.  Any directories that were specified during `configure',
1751d3211a3Smrgbut not in terms of `${prefix}', must each be overridden at install
1761d3211a3Smrgtime for the entire installation to be relocated.  The approach of
1771d3211a3Smrgmakefile variable overrides for each directory variable is required by
1781d3211a3Smrgthe GNU Coding Standards, and ideally causes no recompilation.
1791d3211a3SmrgHowever, some platforms have known limitations with the semantics of
1801d3211a3Smrgshared libraries that end up requiring recompilation when using this
1811d3211a3Smrgmethod, particularly noticeable in packages that use GNU Libtool.
1821d3211a3Smrg
1831d3211a3Smrg   The second method involves providing the `DESTDIR' variable.  For
1841d3211a3Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
1851d3211a3Smrg`/alternate/directory' before all installation names.  The approach of
1861d3211a3Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1871d3211a3Smrgdoes not work on platforms that have drive letters.  On the other hand,
1881d3211a3Smrgit does better at avoiding recompilation issues, and works well even
1891d3211a3Smrgwhen some directory options were not specified in terms of `${prefix}'
1901d3211a3Smrgat `configure' time.
1911d3211a3Smrg
1921d3211a3SmrgOptional Features
1931d3211a3Smrg=================
194b27e1915Smrg
195b27e1915Smrg   If the package supports it, you can cause programs to be installed
196b27e1915Smrgwith an extra prefix or suffix on their names by giving `configure' the
197b27e1915Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198b27e1915Smrg
199b27e1915Smrg   Some packages pay attention to `--enable-FEATURE' options to
200b27e1915Smrg`configure', where FEATURE indicates an optional part of the package.
201b27e1915SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202b27e1915Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203b27e1915Smrg`README' should mention any `--enable-' and `--with-' options that the
204b27e1915Smrgpackage recognizes.
205b27e1915Smrg
206b27e1915Smrg   For packages that use the X Window System, `configure' can usually
207b27e1915Smrgfind the X include and library files automatically, but if it doesn't,
208b27e1915Smrgyou can use the `configure' options `--x-includes=DIR' and
209b27e1915Smrg`--x-libraries=DIR' to specify their locations.
210b27e1915Smrg
2111d3211a3Smrg   Some packages offer the ability to configure how verbose the
2121d3211a3Smrgexecution of `make' will be.  For these packages, running `./configure
2131d3211a3Smrg--enable-silent-rules' sets the default to minimal output, which can be
2141d3211a3Smrgoverridden with `make V=1'; while running `./configure
2151d3211a3Smrg--disable-silent-rules' sets the default to verbose, which can be
2161d3211a3Smrgoverridden with `make V=0'.
2171d3211a3Smrg
218b27e1915SmrgParticular systems
219b27e1915Smrg==================
220b27e1915Smrg
221b27e1915Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222b27e1915SmrgCC is not installed, it is recommended to use the following options in
223b27e1915Smrgorder to use an ANSI C compiler:
224b27e1915Smrg
2251d3211a3Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226b27e1915Smrg
227b27e1915Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228b27e1915Smrg
2291d3211a3Smrg   HP-UX `make' updates targets which have the same time stamps as
2301d3211a3Smrgtheir prerequisites, which makes it generally unusable when shipped
2311d3211a3Smrggenerated files such as `configure' are involved.  Use GNU `make'
2321d3211a3Smrginstead.
2331d3211a3Smrg
234b27e1915Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235b27e1915Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236b27e1915Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237b27e1915Smrgto try
238b27e1915Smrg
239b27e1915Smrg     ./configure CC="cc"
240b27e1915Smrg
241b27e1915Smrgand if that doesn't work, try
242b27e1915Smrg
243b27e1915Smrg     ./configure CC="cc -nodtk"
244b27e1915Smrg
2451d3211a3Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2461d3211a3Smrgdirectory contains several dysfunctional programs; working variants of
2471d3211a3Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2481d3211a3Smrgin your `PATH', put it _after_ `/usr/bin'.
2491d3211a3Smrg
2501d3211a3Smrg   On Haiku, software installed for all users goes in `/boot/common',
2511d3211a3Smrgnot `/usr/local'.  It is recommended to use the following options:
2521d3211a3Smrg
2531d3211a3Smrg     ./configure --prefix=/boot/common
2541d3211a3Smrg
255b27e1915SmrgSpecifying the System Type
256b27e1915Smrg==========================
257b27e1915Smrg
258b27e1915Smrg   There may be some features `configure' cannot figure out
259b27e1915Smrgautomatically, but needs to determine by the type of machine the package
260b27e1915Smrgwill run on.  Usually, assuming the package is built to be run on the
261b27e1915Smrg_same_ architectures, `configure' can figure that out, but if it prints
262b27e1915Smrga message saying it cannot guess the machine type, give it the
263b27e1915Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264b27e1915Smrgtype, such as `sun4', or a canonical name which has the form:
265b27e1915Smrg
266b27e1915Smrg     CPU-COMPANY-SYSTEM
267b27e1915Smrg
268b27e1915Smrgwhere SYSTEM can have one of these forms:
269b27e1915Smrg
2701d3211a3Smrg     OS
2711d3211a3Smrg     KERNEL-OS
272b27e1915Smrg
273b27e1915Smrg   See the file `config.sub' for the possible values of each field.  If
274b27e1915Smrg`config.sub' isn't included in this package, then this package doesn't
275b27e1915Smrgneed to know the machine type.
276b27e1915Smrg
277b27e1915Smrg   If you are _building_ compiler tools for cross-compiling, you should
278b27e1915Smrguse the option `--target=TYPE' to select the type of system they will
279b27e1915Smrgproduce code for.
280b27e1915Smrg
281b27e1915Smrg   If you want to _use_ a cross compiler, that generates code for a
282b27e1915Smrgplatform different from the build platform, you should specify the
283b27e1915Smrg"host" platform (i.e., that on which the generated programs will
284b27e1915Smrgeventually be run) with `--host=TYPE'.
285b27e1915Smrg
286b27e1915SmrgSharing Defaults
287b27e1915Smrg================
288b27e1915Smrg
289b27e1915Smrg   If you want to set default values for `configure' scripts to share,
290b27e1915Smrgyou can create a site shell script called `config.site' that gives
291b27e1915Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292b27e1915Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293b27e1915Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294b27e1915Smrg`CONFIG_SITE' environment variable to the location of the site script.
295b27e1915SmrgA warning: not all `configure' scripts look for a site script.
296b27e1915Smrg
297b27e1915SmrgDefining Variables
298b27e1915Smrg==================
299b27e1915Smrg
300b27e1915Smrg   Variables not defined in a site shell script can be set in the
301b27e1915Smrgenvironment passed to `configure'.  However, some packages may run
302b27e1915Smrgconfigure again during the build, and the customized values of these
303b27e1915Smrgvariables may be lost.  In order to avoid this problem, you should set
304b27e1915Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305b27e1915Smrg
306b27e1915Smrg     ./configure CC=/usr/local2/bin/gcc
307b27e1915Smrg
308b27e1915Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309b27e1915Smrgoverridden in the site shell script).
310b27e1915Smrg
311b27e1915SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312b27e1915Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313b27e1915Smrg
314b27e1915Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315b27e1915Smrg
316b27e1915Smrg`configure' Invocation
317b27e1915Smrg======================
318b27e1915Smrg
319b27e1915Smrg   `configure' recognizes the following options to control how it
320b27e1915Smrgoperates.
321b27e1915Smrg
322b27e1915Smrg`--help'
323b27e1915Smrg`-h'
324b27e1915Smrg     Print a summary of all of the options to `configure', and exit.
325b27e1915Smrg
326b27e1915Smrg`--help=short'
327b27e1915Smrg`--help=recursive'
328b27e1915Smrg     Print a summary of the options unique to this package's
329b27e1915Smrg     `configure', and exit.  The `short' variant lists options used
330b27e1915Smrg     only in the top level, while the `recursive' variant lists options
331b27e1915Smrg     also present in any nested packages.
332b27e1915Smrg
333b27e1915Smrg`--version'
334b27e1915Smrg`-V'
335b27e1915Smrg     Print the version of Autoconf used to generate the `configure'
336b27e1915Smrg     script, and exit.
337b27e1915Smrg
338b27e1915Smrg`--cache-file=FILE'
339b27e1915Smrg     Enable the cache: use and save the results of the tests in FILE,
340b27e1915Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341b27e1915Smrg     disable caching.
342b27e1915Smrg
343b27e1915Smrg`--config-cache'
344b27e1915Smrg`-C'
345b27e1915Smrg     Alias for `--cache-file=config.cache'.
346b27e1915Smrg
347b27e1915Smrg`--quiet'
348b27e1915Smrg`--silent'
349b27e1915Smrg`-q'
350b27e1915Smrg     Do not print messages saying which checks are being made.  To
351b27e1915Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352b27e1915Smrg     messages will still be shown).
353b27e1915Smrg
354b27e1915Smrg`--srcdir=DIR'
355b27e1915Smrg     Look for the package's source code in directory DIR.  Usually
356b27e1915Smrg     `configure' can determine that directory automatically.
357b27e1915Smrg
358b27e1915Smrg`--prefix=DIR'
3591d3211a3Smrg     Use DIR as the installation prefix.  *note Installation Names::
360b27e1915Smrg     for more details, including other options available for fine-tuning
361b27e1915Smrg     the installation locations.
362b27e1915Smrg
363b27e1915Smrg`--no-create'
364b27e1915Smrg`-n'
365b27e1915Smrg     Run the configure checks, but stop before creating any output
366b27e1915Smrg     files.
367b27e1915Smrg
368b27e1915Smrg`configure' also accepts some other, not widely useful, options.  Run
369b27e1915Smrg`configure --help' for more details.
370b27e1915Smrg
371