INSTALL revision 376c9fa8
13a72f200SmrgInstallation Instructions
23a72f200Smrg*************************
33a72f200Smrg
4376c9fa8SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5376c9fa8SmrgInc.
63a72f200Smrg
7376c9fa8Smrg   Copying and distribution of this file, with or without modification,
8376c9fa8Smrgare permitted in any medium without royalty provided the copyright
9376c9fa8Smrgnotice and this notice are preserved.  This file is offered as-is,
10376c9fa8Smrgwithout warranty of any kind.
113a72f200Smrg
123a72f200SmrgBasic Installation
133a72f200Smrg==================
143a72f200Smrg
153a72f200Smrg   Briefly, the shell commands `./configure; make; make install' should
163a72f200Smrgconfigure, build, and install this package.  The following
173a72f200Smrgmore-detailed instructions are generic; see the `README' file for
18376c9fa8Smrginstructions specific to this package.  Some packages provide this
19376c9fa8Smrg`INSTALL' file but do not implement all of the features documented
20376c9fa8Smrgbelow.  The lack of an optional feature in a given package is not
21376c9fa8Smrgnecessarily a bug.  More recommendations for GNU packages can be found
22376c9fa8Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
233a72f200Smrg
243a72f200Smrg   The `configure' shell script attempts to guess correct values for
253a72f200Smrgvarious system-dependent variables used during compilation.  It uses
263a72f200Smrgthose values to create a `Makefile' in each directory of the package.
273a72f200SmrgIt may also create one or more `.h' files containing system-dependent
283a72f200Smrgdefinitions.  Finally, it creates a shell script `config.status' that
293a72f200Smrgyou can run in the future to recreate the current configuration, and a
303a72f200Smrgfile `config.log' containing compiler output (useful mainly for
313a72f200Smrgdebugging `configure').
323a72f200Smrg
333a72f200Smrg   It can also use an optional file (typically called `config.cache'
343a72f200Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
353a72f200Smrgthe results of its tests to speed up reconfiguring.  Caching is
363a72f200Smrgdisabled by default to prevent problems with accidental use of stale
373a72f200Smrgcache files.
383a72f200Smrg
393a72f200Smrg   If you need to do unusual things to compile the package, please try
403a72f200Smrgto figure out how `configure' could check whether to do them, and mail
413a72f200Smrgdiffs or instructions to the address given in the `README' so they can
423a72f200Smrgbe considered for the next release.  If you are using the cache, and at
433a72f200Smrgsome point `config.cache' contains results you don't want to keep, you
443a72f200Smrgmay remove or edit it.
453a72f200Smrg
463a72f200Smrg   The file `configure.ac' (or `configure.in') is used to create
473a72f200Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
483a72f200Smrgyou want to change it or regenerate `configure' using a newer version
493a72f200Smrgof `autoconf'.
503a72f200Smrg
51376c9fa8Smrg   The simplest way to compile this package is:
523a72f200Smrg
533a72f200Smrg  1. `cd' to the directory containing the package's source code and type
543a72f200Smrg     `./configure' to configure the package for your system.
553a72f200Smrg
563a72f200Smrg     Running `configure' might take a while.  While running, it prints
573a72f200Smrg     some messages telling which features it is checking for.
583a72f200Smrg
593a72f200Smrg  2. Type `make' to compile the package.
603a72f200Smrg
613a72f200Smrg  3. Optionally, type `make check' to run any self-tests that come with
62376c9fa8Smrg     the package, generally using the just-built uninstalled binaries.
633a72f200Smrg
643a72f200Smrg  4. Type `make install' to install the programs and any data files and
65376c9fa8Smrg     documentation.  When installing into a prefix owned by root, it is
66376c9fa8Smrg     recommended that the package be configured and built as a regular
67376c9fa8Smrg     user, and only the `make install' phase executed with root
68376c9fa8Smrg     privileges.
69376c9fa8Smrg
70376c9fa8Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71376c9fa8Smrg     this time using the binaries in their final installed location.
72376c9fa8Smrg     This target does not install anything.  Running this target as a
73376c9fa8Smrg     regular user, particularly if the prior `make install' required
74376c9fa8Smrg     root privileges, verifies that the installation completed
75376c9fa8Smrg     correctly.
76376c9fa8Smrg
77376c9fa8Smrg  6. You can remove the program binaries and object files from the
783a72f200Smrg     source code directory by typing `make clean'.  To also remove the
793a72f200Smrg     files that `configure' created (so you can compile the package for
803a72f200Smrg     a different kind of computer), type `make distclean'.  There is
813a72f200Smrg     also a `make maintainer-clean' target, but that is intended mainly
823a72f200Smrg     for the package's developers.  If you use it, you may have to get
833a72f200Smrg     all sorts of other programs in order to regenerate files that came
843a72f200Smrg     with the distribution.
853a72f200Smrg
86376c9fa8Smrg  7. Often, you can also type `make uninstall' to remove the installed
87376c9fa8Smrg     files again.  In practice, not all packages have tested that
88376c9fa8Smrg     uninstallation works correctly, even though it is required by the
89376c9fa8Smrg     GNU Coding Standards.
90376c9fa8Smrg
91376c9fa8Smrg  8. Some packages, particularly those that use Automake, provide `make
92376c9fa8Smrg     distcheck', which can by used by developers to test that all other
93376c9fa8Smrg     targets like `make install' and `make uninstall' work correctly.
94376c9fa8Smrg     This target is generally not run by end users.
953a72f200Smrg
963a72f200SmrgCompilers and Options
973a72f200Smrg=====================
983a72f200Smrg
993a72f200Smrg   Some systems require unusual options for compilation or linking that
1003a72f200Smrgthe `configure' script does not know about.  Run `./configure --help'
1013a72f200Smrgfor details on some of the pertinent environment variables.
1023a72f200Smrg
1033a72f200Smrg   You can give `configure' initial values for configuration parameters
1043a72f200Smrgby setting variables in the command line or in the environment.  Here
1053a72f200Smrgis an example:
1063a72f200Smrg
1073a72f200Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
1083a72f200Smrg
1093a72f200Smrg   *Note Defining Variables::, for more details.
1103a72f200Smrg
1113a72f200SmrgCompiling For Multiple Architectures
1123a72f200Smrg====================================
1133a72f200Smrg
1143a72f200Smrg   You can compile the package for more than one kind of computer at the
1153a72f200Smrgsame time, by placing the object files for each architecture in their
1163a72f200Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
1173a72f200Smrgdirectory where you want the object files and executables to go and run
1183a72f200Smrgthe `configure' script.  `configure' automatically checks for the
119376c9fa8Smrgsource code in the directory that `configure' is in and in `..'.  This
120376c9fa8Smrgis known as a "VPATH" build.
1213a72f200Smrg
1223a72f200Smrg   With a non-GNU `make', it is safer to compile the package for one
1233a72f200Smrgarchitecture at a time in the source code directory.  After you have
1243a72f200Smrginstalled the package for one architecture, use `make distclean' before
1253a72f200Smrgreconfiguring for another architecture.
1263a72f200Smrg
1273a72f200Smrg   On MacOS X 10.5 and later systems, you can create libraries and
1283a72f200Smrgexecutables that work on multiple system types--known as "fat" or
1293a72f200Smrg"universal" binaries--by specifying multiple `-arch' options to the
1303a72f200Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
1313a72f200Smrgthis:
1323a72f200Smrg
1333a72f200Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1343a72f200Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1353a72f200Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
1363a72f200Smrg
1373a72f200Smrg   This is not guaranteed to produce working output in all cases, you
1383a72f200Smrgmay have to build one architecture at a time and combine the results
1393a72f200Smrgusing the `lipo' tool if you have problems.
1403a72f200Smrg
1413a72f200SmrgInstallation Names
1423a72f200Smrg==================
1433a72f200Smrg
1443a72f200Smrg   By default, `make install' installs the package's commands under
1453a72f200Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
1463a72f200Smrgcan specify an installation prefix other than `/usr/local' by giving
147376c9fa8Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148376c9fa8Smrgabsolute file name.
1493a72f200Smrg
1503a72f200Smrg   You can specify separate installation prefixes for
1513a72f200Smrgarchitecture-specific files and architecture-independent files.  If you
1523a72f200Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
1533a72f200SmrgPREFIX as the prefix for installing programs and libraries.
1543a72f200SmrgDocumentation and other data files still use the regular prefix.
1553a72f200Smrg
1563a72f200Smrg   In addition, if you use an unusual directory layout you can give
1573a72f200Smrgoptions like `--bindir=DIR' to specify different values for particular
1583a72f200Smrgkinds of files.  Run `configure --help' for a list of the directories
159376c9fa8Smrgyou can set and what kinds of files go in them.  In general, the
160376c9fa8Smrgdefault for these options is expressed in terms of `${prefix}', so that
161376c9fa8Smrgspecifying just `--prefix' will affect all of the other directory
162376c9fa8Smrgspecifications that were not explicitly provided.
163376c9fa8Smrg
164376c9fa8Smrg   The most portable way to affect installation locations is to pass the
165376c9fa8Smrgcorrect locations to `configure'; however, many packages provide one or
166376c9fa8Smrgboth of the following shortcuts of passing variable assignments to the
167376c9fa8Smrg`make install' command line to change installation locations without
168376c9fa8Smrghaving to reconfigure or recompile.
169376c9fa8Smrg
170376c9fa8Smrg   The first method involves providing an override variable for each
171376c9fa8Smrgaffected directory.  For example, `make install
172376c9fa8Smrgprefix=/alternate/directory' will choose an alternate location for all
173376c9fa8Smrgdirectory configuration variables that were expressed in terms of
174376c9fa8Smrg`${prefix}'.  Any directories that were specified during `configure',
175376c9fa8Smrgbut not in terms of `${prefix}', must each be overridden at install
176376c9fa8Smrgtime for the entire installation to be relocated.  The approach of
177376c9fa8Smrgmakefile variable overrides for each directory variable is required by
178376c9fa8Smrgthe GNU Coding Standards, and ideally causes no recompilation.
179376c9fa8SmrgHowever, some platforms have known limitations with the semantics of
180376c9fa8Smrgshared libraries that end up requiring recompilation when using this
181376c9fa8Smrgmethod, particularly noticeable in packages that use GNU Libtool.
182376c9fa8Smrg
183376c9fa8Smrg   The second method involves providing the `DESTDIR' variable.  For
184376c9fa8Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
185376c9fa8Smrg`/alternate/directory' before all installation names.  The approach of
186376c9fa8Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187376c9fa8Smrgdoes not work on platforms that have drive letters.  On the other hand,
188376c9fa8Smrgit does better at avoiding recompilation issues, and works well even
189376c9fa8Smrgwhen some directory options were not specified in terms of `${prefix}'
190376c9fa8Smrgat `configure' time.
191376c9fa8Smrg
192376c9fa8SmrgOptional Features
193376c9fa8Smrg=================
1943a72f200Smrg
1953a72f200Smrg   If the package supports it, you can cause programs to be installed
1963a72f200Smrgwith an extra prefix or suffix on their names by giving `configure' the
1973a72f200Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1983a72f200Smrg
1993a72f200Smrg   Some packages pay attention to `--enable-FEATURE' options to
2003a72f200Smrg`configure', where FEATURE indicates an optional part of the package.
2013a72f200SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
2023a72f200Smrgis something like `gnu-as' or `x' (for the X Window System).  The
2033a72f200Smrg`README' should mention any `--enable-' and `--with-' options that the
2043a72f200Smrgpackage recognizes.
2053a72f200Smrg
2063a72f200Smrg   For packages that use the X Window System, `configure' can usually
2073a72f200Smrgfind the X include and library files automatically, but if it doesn't,
2083a72f200Smrgyou can use the `configure' options `--x-includes=DIR' and
2093a72f200Smrg`--x-libraries=DIR' to specify their locations.
2103a72f200Smrg
211376c9fa8Smrg   Some packages offer the ability to configure how verbose the
212376c9fa8Smrgexecution of `make' will be.  For these packages, running `./configure
213376c9fa8Smrg--enable-silent-rules' sets the default to minimal output, which can be
214376c9fa8Smrgoverridden with `make V=1'; while running `./configure
215376c9fa8Smrg--disable-silent-rules' sets the default to verbose, which can be
216376c9fa8Smrgoverridden with `make V=0'.
217376c9fa8Smrg
2183a72f200SmrgParticular systems
2193a72f200Smrg==================
2203a72f200Smrg
2213a72f200Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
2223a72f200SmrgCC is not installed, it is recommended to use the following options in
2233a72f200Smrgorder to use an ANSI C compiler:
2243a72f200Smrg
225376c9fa8Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
2263a72f200Smrg
2273a72f200Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
2283a72f200Smrg
229376c9fa8Smrg   HP-UX `make' updates targets which have the same time stamps as
230376c9fa8Smrgtheir prerequisites, which makes it generally unusable when shipped
231376c9fa8Smrggenerated files such as `configure' are involved.  Use GNU `make'
232376c9fa8Smrginstead.
233376c9fa8Smrg
2343a72f200Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
2353a72f200Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
2363a72f200Smrga workaround.  If GNU CC is not installed, it is therefore recommended
2373a72f200Smrgto try
2383a72f200Smrg
2393a72f200Smrg     ./configure CC="cc"
2403a72f200Smrg
2413a72f200Smrgand if that doesn't work, try
2423a72f200Smrg
2433a72f200Smrg     ./configure CC="cc -nodtk"
2443a72f200Smrg
245376c9fa8Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246376c9fa8Smrgdirectory contains several dysfunctional programs; working variants of
247376c9fa8Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248376c9fa8Smrgin your `PATH', put it _after_ `/usr/bin'.
249376c9fa8Smrg
250376c9fa8Smrg   On Haiku, software installed for all users goes in `/boot/common',
251376c9fa8Smrgnot `/usr/local'.  It is recommended to use the following options:
252376c9fa8Smrg
253376c9fa8Smrg     ./configure --prefix=/boot/common
254376c9fa8Smrg
2553a72f200SmrgSpecifying the System Type
2563a72f200Smrg==========================
2573a72f200Smrg
2583a72f200Smrg   There may be some features `configure' cannot figure out
2593a72f200Smrgautomatically, but needs to determine by the type of machine the package
2603a72f200Smrgwill run on.  Usually, assuming the package is built to be run on the
2613a72f200Smrg_same_ architectures, `configure' can figure that out, but if it prints
2623a72f200Smrga message saying it cannot guess the machine type, give it the
2633a72f200Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
2643a72f200Smrgtype, such as `sun4', or a canonical name which has the form:
2653a72f200Smrg
2663a72f200Smrg     CPU-COMPANY-SYSTEM
2673a72f200Smrg
2683a72f200Smrgwhere SYSTEM can have one of these forms:
2693a72f200Smrg
270376c9fa8Smrg     OS
271376c9fa8Smrg     KERNEL-OS
2723a72f200Smrg
2733a72f200Smrg   See the file `config.sub' for the possible values of each field.  If
2743a72f200Smrg`config.sub' isn't included in this package, then this package doesn't
2753a72f200Smrgneed to know the machine type.
2763a72f200Smrg
2773a72f200Smrg   If you are _building_ compiler tools for cross-compiling, you should
2783a72f200Smrguse the option `--target=TYPE' to select the type of system they will
2793a72f200Smrgproduce code for.
2803a72f200Smrg
2813a72f200Smrg   If you want to _use_ a cross compiler, that generates code for a
2823a72f200Smrgplatform different from the build platform, you should specify the
2833a72f200Smrg"host" platform (i.e., that on which the generated programs will
2843a72f200Smrgeventually be run) with `--host=TYPE'.
2853a72f200Smrg
2863a72f200SmrgSharing Defaults
2873a72f200Smrg================
2883a72f200Smrg
2893a72f200Smrg   If you want to set default values for `configure' scripts to share,
2903a72f200Smrgyou can create a site shell script called `config.site' that gives
2913a72f200Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
2923a72f200Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2933a72f200Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2943a72f200Smrg`CONFIG_SITE' environment variable to the location of the site script.
2953a72f200SmrgA warning: not all `configure' scripts look for a site script.
2963a72f200Smrg
2973a72f200SmrgDefining Variables
2983a72f200Smrg==================
2993a72f200Smrg
3003a72f200Smrg   Variables not defined in a site shell script can be set in the
3013a72f200Smrgenvironment passed to `configure'.  However, some packages may run
3023a72f200Smrgconfigure again during the build, and the customized values of these
3033a72f200Smrgvariables may be lost.  In order to avoid this problem, you should set
3043a72f200Smrgthem in the `configure' command line, using `VAR=value'.  For example:
3053a72f200Smrg
3063a72f200Smrg     ./configure CC=/usr/local2/bin/gcc
3073a72f200Smrg
3083a72f200Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
3093a72f200Smrgoverridden in the site shell script).
3103a72f200Smrg
3113a72f200SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
3123a72f200Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
3133a72f200Smrg
3143a72f200Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
3153a72f200Smrg
3163a72f200Smrg`configure' Invocation
3173a72f200Smrg======================
3183a72f200Smrg
3193a72f200Smrg   `configure' recognizes the following options to control how it
3203a72f200Smrgoperates.
3213a72f200Smrg
3223a72f200Smrg`--help'
3233a72f200Smrg`-h'
3243a72f200Smrg     Print a summary of all of the options to `configure', and exit.
3253a72f200Smrg
3263a72f200Smrg`--help=short'
3273a72f200Smrg`--help=recursive'
3283a72f200Smrg     Print a summary of the options unique to this package's
3293a72f200Smrg     `configure', and exit.  The `short' variant lists options used
3303a72f200Smrg     only in the top level, while the `recursive' variant lists options
3313a72f200Smrg     also present in any nested packages.
3323a72f200Smrg
3333a72f200Smrg`--version'
3343a72f200Smrg`-V'
3353a72f200Smrg     Print the version of Autoconf used to generate the `configure'
3363a72f200Smrg     script, and exit.
3373a72f200Smrg
3383a72f200Smrg`--cache-file=FILE'
3393a72f200Smrg     Enable the cache: use and save the results of the tests in FILE,
3403a72f200Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
3413a72f200Smrg     disable caching.
3423a72f200Smrg
3433a72f200Smrg`--config-cache'
3443a72f200Smrg`-C'
3453a72f200Smrg     Alias for `--cache-file=config.cache'.
3463a72f200Smrg
3473a72f200Smrg`--quiet'
3483a72f200Smrg`--silent'
3493a72f200Smrg`-q'
3503a72f200Smrg     Do not print messages saying which checks are being made.  To
3513a72f200Smrg     suppress all normal output, redirect it to `/dev/null' (any error
3523a72f200Smrg     messages will still be shown).
3533a72f200Smrg
3543a72f200Smrg`--srcdir=DIR'
3553a72f200Smrg     Look for the package's source code in directory DIR.  Usually
3563a72f200Smrg     `configure' can determine that directory automatically.
3573a72f200Smrg
3583a72f200Smrg`--prefix=DIR'
359376c9fa8Smrg     Use DIR as the installation prefix.  *note Installation Names::
3603a72f200Smrg     for more details, including other options available for fine-tuning
3613a72f200Smrg     the installation locations.
3623a72f200Smrg
3633a72f200Smrg`--no-create'
3643a72f200Smrg`-n'
3653a72f200Smrg     Run the configure checks, but stop before creating any output
3663a72f200Smrg     files.
3673a72f200Smrg
3683a72f200Smrg`configure' also accepts some other, not widely useful, options.  Run
3693a72f200Smrg`configure --help' for more details.
3703a72f200Smrg
371