19c125d91SmrgInstallation Instructions
29c125d91Smrg*************************
39c125d91Smrg
476c9c3baSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
576c9c3baSmrgInc.
69c125d91Smrg
776c9c3baSmrg   Copying and distribution of this file, with or without modification,
876c9c3baSmrgare permitted in any medium without royalty provided the copyright
976c9c3baSmrgnotice and this notice are preserved.  This file is offered as-is,
1076c9c3baSmrgwithout warranty of any kind.
119c125d91Smrg
129c125d91SmrgBasic Installation
139c125d91Smrg==================
149c125d91Smrg
159c125d91Smrg   Briefly, the shell commands `./configure; make; make install' should
169c125d91Smrgconfigure, build, and install this package.  The following
179c125d91Smrgmore-detailed instructions are generic; see the `README' file for
1876c9c3baSmrginstructions specific to this package.  Some packages provide this
1976c9c3baSmrg`INSTALL' file but do not implement all of the features documented
2076c9c3baSmrgbelow.  The lack of an optional feature in a given package is not
2176c9c3baSmrgnecessarily a bug.  More recommendations for GNU packages can be found
2276c9c3baSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
239c125d91Smrg
249c125d91Smrg   The `configure' shell script attempts to guess correct values for
259c125d91Smrgvarious system-dependent variables used during compilation.  It uses
269c125d91Smrgthose values to create a `Makefile' in each directory of the package.
279c125d91SmrgIt may also create one or more `.h' files containing system-dependent
289c125d91Smrgdefinitions.  Finally, it creates a shell script `config.status' that
299c125d91Smrgyou can run in the future to recreate the current configuration, and a
309c125d91Smrgfile `config.log' containing compiler output (useful mainly for
319c125d91Smrgdebugging `configure').
329c125d91Smrg
339c125d91Smrg   It can also use an optional file (typically called `config.cache'
349c125d91Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
359c125d91Smrgthe results of its tests to speed up reconfiguring.  Caching is
369c125d91Smrgdisabled by default to prevent problems with accidental use of stale
379c125d91Smrgcache files.
389c125d91Smrg
399c125d91Smrg   If you need to do unusual things to compile the package, please try
409c125d91Smrgto figure out how `configure' could check whether to do them, and mail
419c125d91Smrgdiffs or instructions to the address given in the `README' so they can
429c125d91Smrgbe considered for the next release.  If you are using the cache, and at
439c125d91Smrgsome point `config.cache' contains results you don't want to keep, you
449c125d91Smrgmay remove or edit it.
459c125d91Smrg
469c125d91Smrg   The file `configure.ac' (or `configure.in') is used to create
479c125d91Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
489c125d91Smrgyou want to change it or regenerate `configure' using a newer version
499c125d91Smrgof `autoconf'.
509c125d91Smrg
5176c9c3baSmrg   The simplest way to compile this package is:
529c125d91Smrg
539c125d91Smrg  1. `cd' to the directory containing the package's source code and type
549c125d91Smrg     `./configure' to configure the package for your system.
559c125d91Smrg
569c125d91Smrg     Running `configure' might take a while.  While running, it prints
579c125d91Smrg     some messages telling which features it is checking for.
589c125d91Smrg
599c125d91Smrg  2. Type `make' to compile the package.
609c125d91Smrg
619c125d91Smrg  3. Optionally, type `make check' to run any self-tests that come with
6276c9c3baSmrg     the package, generally using the just-built uninstalled binaries.
639c125d91Smrg
649c125d91Smrg  4. Type `make install' to install the programs and any data files and
6576c9c3baSmrg     documentation.  When installing into a prefix owned by root, it is
6676c9c3baSmrg     recommended that the package be configured and built as a regular
6776c9c3baSmrg     user, and only the `make install' phase executed with root
6876c9c3baSmrg     privileges.
6976c9c3baSmrg
7076c9c3baSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7176c9c3baSmrg     this time using the binaries in their final installed location.
7276c9c3baSmrg     This target does not install anything.  Running this target as a
7376c9c3baSmrg     regular user, particularly if the prior `make install' required
7476c9c3baSmrg     root privileges, verifies that the installation completed
7576c9c3baSmrg     correctly.
7676c9c3baSmrg
7776c9c3baSmrg  6. You can remove the program binaries and object files from the
789c125d91Smrg     source code directory by typing `make clean'.  To also remove the
799c125d91Smrg     files that `configure' created (so you can compile the package for
809c125d91Smrg     a different kind of computer), type `make distclean'.  There is
819c125d91Smrg     also a `make maintainer-clean' target, but that is intended mainly
829c125d91Smrg     for the package's developers.  If you use it, you may have to get
839c125d91Smrg     all sorts of other programs in order to regenerate files that came
849c125d91Smrg     with the distribution.
859c125d91Smrg
8676c9c3baSmrg  7. Often, you can also type `make uninstall' to remove the installed
8776c9c3baSmrg     files again.  In practice, not all packages have tested that
8876c9c3baSmrg     uninstallation works correctly, even though it is required by the
8976c9c3baSmrg     GNU Coding Standards.
9076c9c3baSmrg
9176c9c3baSmrg  8. Some packages, particularly those that use Automake, provide `make
9276c9c3baSmrg     distcheck', which can by used by developers to test that all other
9376c9c3baSmrg     targets like `make install' and `make uninstall' work correctly.
9476c9c3baSmrg     This target is generally not run by end users.
959c125d91Smrg
969c125d91SmrgCompilers and Options
979c125d91Smrg=====================
989c125d91Smrg
999c125d91Smrg   Some systems require unusual options for compilation or linking that
1009c125d91Smrgthe `configure' script does not know about.  Run `./configure --help'
1019c125d91Smrgfor details on some of the pertinent environment variables.
1029c125d91Smrg
1039c125d91Smrg   You can give `configure' initial values for configuration parameters
1049c125d91Smrgby setting variables in the command line or in the environment.  Here
1059c125d91Smrgis an example:
1069c125d91Smrg
1079c125d91Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
1089c125d91Smrg
1099c125d91Smrg   *Note Defining Variables::, for more details.
1109c125d91Smrg
1119c125d91SmrgCompiling For Multiple Architectures
1129c125d91Smrg====================================
1139c125d91Smrg
1149c125d91Smrg   You can compile the package for more than one kind of computer at the
1159c125d91Smrgsame time, by placing the object files for each architecture in their
1169c125d91Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
1179c125d91Smrgdirectory where you want the object files and executables to go and run
1189c125d91Smrgthe `configure' script.  `configure' automatically checks for the
11976c9c3baSmrgsource code in the directory that `configure' is in and in `..'.  This
12076c9c3baSmrgis known as a "VPATH" build.
1219c125d91Smrg
1229c125d91Smrg   With a non-GNU `make', it is safer to compile the package for one
1239c125d91Smrgarchitecture at a time in the source code directory.  After you have
1249c125d91Smrginstalled the package for one architecture, use `make distclean' before
1259c125d91Smrgreconfiguring for another architecture.
1269c125d91Smrg
1279c125d91Smrg   On MacOS X 10.5 and later systems, you can create libraries and
1289c125d91Smrgexecutables that work on multiple system types--known as "fat" or
1299c125d91Smrg"universal" binaries--by specifying multiple `-arch' options to the
1309c125d91Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
1319c125d91Smrgthis:
1329c125d91Smrg
1339c125d91Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1349c125d91Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1359c125d91Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
1369c125d91Smrg
1379c125d91Smrg   This is not guaranteed to produce working output in all cases, you
1389c125d91Smrgmay have to build one architecture at a time and combine the results
1399c125d91Smrgusing the `lipo' tool if you have problems.
1409c125d91Smrg
1419c125d91SmrgInstallation Names
1429c125d91Smrg==================
1439c125d91Smrg
1449c125d91Smrg   By default, `make install' installs the package's commands under
1459c125d91Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
1469c125d91Smrgcan specify an installation prefix other than `/usr/local' by giving
14776c9c3baSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14876c9c3baSmrgabsolute file name.
1499c125d91Smrg
1509c125d91Smrg   You can specify separate installation prefixes for
1519c125d91Smrgarchitecture-specific files and architecture-independent files.  If you
1529c125d91Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
1539c125d91SmrgPREFIX as the prefix for installing programs and libraries.
1549c125d91SmrgDocumentation and other data files still use the regular prefix.
1559c125d91Smrg
1569c125d91Smrg   In addition, if you use an unusual directory layout you can give
1579c125d91Smrgoptions like `--bindir=DIR' to specify different values for particular
1589c125d91Smrgkinds of files.  Run `configure --help' for a list of the directories
15976c9c3baSmrgyou can set and what kinds of files go in them.  In general, the
16076c9c3baSmrgdefault for these options is expressed in terms of `${prefix}', so that
16176c9c3baSmrgspecifying just `--prefix' will affect all of the other directory
16276c9c3baSmrgspecifications that were not explicitly provided.
16376c9c3baSmrg
16476c9c3baSmrg   The most portable way to affect installation locations is to pass the
16576c9c3baSmrgcorrect locations to `configure'; however, many packages provide one or
16676c9c3baSmrgboth of the following shortcuts of passing variable assignments to the
16776c9c3baSmrg`make install' command line to change installation locations without
16876c9c3baSmrghaving to reconfigure or recompile.
16976c9c3baSmrg
17076c9c3baSmrg   The first method involves providing an override variable for each
17176c9c3baSmrgaffected directory.  For example, `make install
17276c9c3baSmrgprefix=/alternate/directory' will choose an alternate location for all
17376c9c3baSmrgdirectory configuration variables that were expressed in terms of
17476c9c3baSmrg`${prefix}'.  Any directories that were specified during `configure',
17576c9c3baSmrgbut not in terms of `${prefix}', must each be overridden at install
17676c9c3baSmrgtime for the entire installation to be relocated.  The approach of
17776c9c3baSmrgmakefile variable overrides for each directory variable is required by
17876c9c3baSmrgthe GNU Coding Standards, and ideally causes no recompilation.
17976c9c3baSmrgHowever, some platforms have known limitations with the semantics of
18076c9c3baSmrgshared libraries that end up requiring recompilation when using this
18176c9c3baSmrgmethod, particularly noticeable in packages that use GNU Libtool.
18276c9c3baSmrg
18376c9c3baSmrg   The second method involves providing the `DESTDIR' variable.  For
18476c9c3baSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
18576c9c3baSmrg`/alternate/directory' before all installation names.  The approach of
18676c9c3baSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18776c9c3baSmrgdoes not work on platforms that have drive letters.  On the other hand,
18876c9c3baSmrgit does better at avoiding recompilation issues, and works well even
18976c9c3baSmrgwhen some directory options were not specified in terms of `${prefix}'
19076c9c3baSmrgat `configure' time.
19176c9c3baSmrg
19276c9c3baSmrgOptional Features
19376c9c3baSmrg=================
1949c125d91Smrg
1959c125d91Smrg   If the package supports it, you can cause programs to be installed
1969c125d91Smrgwith an extra prefix or suffix on their names by giving `configure' the
1979c125d91Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1989c125d91Smrg
1999c125d91Smrg   Some packages pay attention to `--enable-FEATURE' options to
2009c125d91Smrg`configure', where FEATURE indicates an optional part of the package.
2019c125d91SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
2029c125d91Smrgis something like `gnu-as' or `x' (for the X Window System).  The
2039c125d91Smrg`README' should mention any `--enable-' and `--with-' options that the
2049c125d91Smrgpackage recognizes.
2059c125d91Smrg
2069c125d91Smrg   For packages that use the X Window System, `configure' can usually
2079c125d91Smrgfind the X include and library files automatically, but if it doesn't,
2089c125d91Smrgyou can use the `configure' options `--x-includes=DIR' and
2099c125d91Smrg`--x-libraries=DIR' to specify their locations.
2109c125d91Smrg
21176c9c3baSmrg   Some packages offer the ability to configure how verbose the
21276c9c3baSmrgexecution of `make' will be.  For these packages, running `./configure
21376c9c3baSmrg--enable-silent-rules' sets the default to minimal output, which can be
21476c9c3baSmrgoverridden with `make V=1'; while running `./configure
21576c9c3baSmrg--disable-silent-rules' sets the default to verbose, which can be
21676c9c3baSmrgoverridden with `make V=0'.
21776c9c3baSmrg
2189c125d91SmrgParticular systems
2199c125d91Smrg==================
2209c125d91Smrg
2219c125d91Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
2229c125d91SmrgCC is not installed, it is recommended to use the following options in
2239c125d91Smrgorder to use an ANSI C compiler:
2249c125d91Smrg
22576c9c3baSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
2269c125d91Smrg
2279c125d91Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
2289c125d91Smrg
22976c9c3baSmrg   HP-UX `make' updates targets which have the same time stamps as
23076c9c3baSmrgtheir prerequisites, which makes it generally unusable when shipped
23176c9c3baSmrggenerated files such as `configure' are involved.  Use GNU `make'
23276c9c3baSmrginstead.
23376c9c3baSmrg
2349c125d91Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
2359c125d91Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
2369c125d91Smrga workaround.  If GNU CC is not installed, it is therefore recommended
2379c125d91Smrgto try
2389c125d91Smrg
2399c125d91Smrg     ./configure CC="cc"
2409c125d91Smrg
2419c125d91Smrgand if that doesn't work, try
2429c125d91Smrg
2439c125d91Smrg     ./configure CC="cc -nodtk"
2449c125d91Smrg
24576c9c3baSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24676c9c3baSmrgdirectory contains several dysfunctional programs; working variants of
24776c9c3baSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24876c9c3baSmrgin your `PATH', put it _after_ `/usr/bin'.
24976c9c3baSmrg
25076c9c3baSmrg   On Haiku, software installed for all users goes in `/boot/common',
25176c9c3baSmrgnot `/usr/local'.  It is recommended to use the following options:
25276c9c3baSmrg
25376c9c3baSmrg     ./configure --prefix=/boot/common
25476c9c3baSmrg
2559c125d91SmrgSpecifying the System Type
2569c125d91Smrg==========================
2579c125d91Smrg
2589c125d91Smrg   There may be some features `configure' cannot figure out
2599c125d91Smrgautomatically, but needs to determine by the type of machine the package
2609c125d91Smrgwill run on.  Usually, assuming the package is built to be run on the
2619c125d91Smrg_same_ architectures, `configure' can figure that out, but if it prints
2629c125d91Smrga message saying it cannot guess the machine type, give it the
2639c125d91Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
2649c125d91Smrgtype, such as `sun4', or a canonical name which has the form:
2659c125d91Smrg
2669c125d91Smrg     CPU-COMPANY-SYSTEM
2679c125d91Smrg
2689c125d91Smrgwhere SYSTEM can have one of these forms:
2699c125d91Smrg
27076c9c3baSmrg     OS
27176c9c3baSmrg     KERNEL-OS
2729c125d91Smrg
2739c125d91Smrg   See the file `config.sub' for the possible values of each field.  If
2749c125d91Smrg`config.sub' isn't included in this package, then this package doesn't
2759c125d91Smrgneed to know the machine type.
2769c125d91Smrg
2779c125d91Smrg   If you are _building_ compiler tools for cross-compiling, you should
2789c125d91Smrguse the option `--target=TYPE' to select the type of system they will
2799c125d91Smrgproduce code for.
2809c125d91Smrg
2819c125d91Smrg   If you want to _use_ a cross compiler, that generates code for a
2829c125d91Smrgplatform different from the build platform, you should specify the
2839c125d91Smrg"host" platform (i.e., that on which the generated programs will
2849c125d91Smrgeventually be run) with `--host=TYPE'.
2859c125d91Smrg
2869c125d91SmrgSharing Defaults
2879c125d91Smrg================
2889c125d91Smrg
2899c125d91Smrg   If you want to set default values for `configure' scripts to share,
2909c125d91Smrgyou can create a site shell script called `config.site' that gives
2919c125d91Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
2929c125d91Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2939c125d91Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2949c125d91Smrg`CONFIG_SITE' environment variable to the location of the site script.
2959c125d91SmrgA warning: not all `configure' scripts look for a site script.
2969c125d91Smrg
2979c125d91SmrgDefining Variables
2989c125d91Smrg==================
2999c125d91Smrg
3009c125d91Smrg   Variables not defined in a site shell script can be set in the
3019c125d91Smrgenvironment passed to `configure'.  However, some packages may run
3029c125d91Smrgconfigure again during the build, and the customized values of these
3039c125d91Smrgvariables may be lost.  In order to avoid this problem, you should set
3049c125d91Smrgthem in the `configure' command line, using `VAR=value'.  For example:
3059c125d91Smrg
3069c125d91Smrg     ./configure CC=/usr/local2/bin/gcc
3079c125d91Smrg
3089c125d91Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
3099c125d91Smrgoverridden in the site shell script).
3109c125d91Smrg
3119c125d91SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
3129c125d91Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
3139c125d91Smrg
3149c125d91Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
3159c125d91Smrg
3169c125d91Smrg`configure' Invocation
3179c125d91Smrg======================
3189c125d91Smrg
3199c125d91Smrg   `configure' recognizes the following options to control how it
3209c125d91Smrgoperates.
3219c125d91Smrg
3229c125d91Smrg`--help'
3239c125d91Smrg`-h'
3249c125d91Smrg     Print a summary of all of the options to `configure', and exit.
3259c125d91Smrg
3269c125d91Smrg`--help=short'
3279c125d91Smrg`--help=recursive'
3289c125d91Smrg     Print a summary of the options unique to this package's
3299c125d91Smrg     `configure', and exit.  The `short' variant lists options used
3309c125d91Smrg     only in the top level, while the `recursive' variant lists options
3319c125d91Smrg     also present in any nested packages.
3329c125d91Smrg
3339c125d91Smrg`--version'
3349c125d91Smrg`-V'
3359c125d91Smrg     Print the version of Autoconf used to generate the `configure'
3369c125d91Smrg     script, and exit.
3379c125d91Smrg
3389c125d91Smrg`--cache-file=FILE'
3399c125d91Smrg     Enable the cache: use and save the results of the tests in FILE,
3409c125d91Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
3419c125d91Smrg     disable caching.
3429c125d91Smrg
3439c125d91Smrg`--config-cache'
3449c125d91Smrg`-C'
3459c125d91Smrg     Alias for `--cache-file=config.cache'.
3469c125d91Smrg
3479c125d91Smrg`--quiet'
3489c125d91Smrg`--silent'
3499c125d91Smrg`-q'
3509c125d91Smrg     Do not print messages saying which checks are being made.  To
3519c125d91Smrg     suppress all normal output, redirect it to `/dev/null' (any error
3529c125d91Smrg     messages will still be shown).
3539c125d91Smrg
3549c125d91Smrg`--srcdir=DIR'
3559c125d91Smrg     Look for the package's source code in directory DIR.  Usually
3569c125d91Smrg     `configure' can determine that directory automatically.
3579c125d91Smrg
3589c125d91Smrg`--prefix=DIR'
35976c9c3baSmrg     Use DIR as the installation prefix.  *note Installation Names::
3609c125d91Smrg     for more details, including other options available for fine-tuning
3619c125d91Smrg     the installation locations.
3629c125d91Smrg
3639c125d91Smrg`--no-create'
3649c125d91Smrg`-n'
3659c125d91Smrg     Run the configure checks, but stop before creating any output
3669c125d91Smrg     files.
3679c125d91Smrg
3689c125d91Smrg`configure' also accepts some other, not widely useful, options.  Run
3699c125d91Smrg`configure --help' for more details.
3709c125d91Smrg
371