16d325d25SmrgInstallation Instructions
26d325d25Smrg*************************
36d325d25Smrg
418b08247SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
518b08247SmrgInc.
66d325d25Smrg
718b08247Smrg   Copying and distribution of this file, with or without modification,
818b08247Smrgare permitted in any medium without royalty provided the copyright
918b08247Smrgnotice and this notice are preserved.  This file is offered as-is,
1018b08247Smrgwithout warranty of any kind.
116d325d25Smrg
126d325d25SmrgBasic Installation
136d325d25Smrg==================
146d325d25Smrg
156d325d25Smrg   Briefly, the shell commands `./configure; make; make install' should
166d325d25Smrgconfigure, build, and install this package.  The following
176d325d25Smrgmore-detailed instructions are generic; see the `README' file for
1818b08247Smrginstructions specific to this package.  Some packages provide this
1918b08247Smrg`INSTALL' file but do not implement all of the features documented
2018b08247Smrgbelow.  The lack of an optional feature in a given package is not
2118b08247Smrgnecessarily a bug.  More recommendations for GNU packages can be found
2218b08247Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
236d325d25Smrg
246d325d25Smrg   The `configure' shell script attempts to guess correct values for
256d325d25Smrgvarious system-dependent variables used during compilation.  It uses
266d325d25Smrgthose values to create a `Makefile' in each directory of the package.
276d325d25SmrgIt may also create one or more `.h' files containing system-dependent
286d325d25Smrgdefinitions.  Finally, it creates a shell script `config.status' that
296d325d25Smrgyou can run in the future to recreate the current configuration, and a
306d325d25Smrgfile `config.log' containing compiler output (useful mainly for
316d325d25Smrgdebugging `configure').
326d325d25Smrg
336d325d25Smrg   It can also use an optional file (typically called `config.cache'
346d325d25Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
356d325d25Smrgthe results of its tests to speed up reconfiguring.  Caching is
366d325d25Smrgdisabled by default to prevent problems with accidental use of stale
376d325d25Smrgcache files.
386d325d25Smrg
396d325d25Smrg   If you need to do unusual things to compile the package, please try
406d325d25Smrgto figure out how `configure' could check whether to do them, and mail
416d325d25Smrgdiffs or instructions to the address given in the `README' so they can
426d325d25Smrgbe considered for the next release.  If you are using the cache, and at
436d325d25Smrgsome point `config.cache' contains results you don't want to keep, you
446d325d25Smrgmay remove or edit it.
456d325d25Smrg
466d325d25Smrg   The file `configure.ac' (or `configure.in') is used to create
476d325d25Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
486d325d25Smrgyou want to change it or regenerate `configure' using a newer version
496d325d25Smrgof `autoconf'.
506d325d25Smrg
5118b08247Smrg   The simplest way to compile this package is:
526d325d25Smrg
536d325d25Smrg  1. `cd' to the directory containing the package's source code and type
546d325d25Smrg     `./configure' to configure the package for your system.
556d325d25Smrg
566d325d25Smrg     Running `configure' might take a while.  While running, it prints
576d325d25Smrg     some messages telling which features it is checking for.
586d325d25Smrg
596d325d25Smrg  2. Type `make' to compile the package.
606d325d25Smrg
616d325d25Smrg  3. Optionally, type `make check' to run any self-tests that come with
6218b08247Smrg     the package, generally using the just-built uninstalled binaries.
636d325d25Smrg
646d325d25Smrg  4. Type `make install' to install the programs and any data files and
6518b08247Smrg     documentation.  When installing into a prefix owned by root, it is
6618b08247Smrg     recommended that the package be configured and built as a regular
6718b08247Smrg     user, and only the `make install' phase executed with root
6818b08247Smrg     privileges.
6918b08247Smrg
7018b08247Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7118b08247Smrg     this time using the binaries in their final installed location.
7218b08247Smrg     This target does not install anything.  Running this target as a
7318b08247Smrg     regular user, particularly if the prior `make install' required
7418b08247Smrg     root privileges, verifies that the installation completed
7518b08247Smrg     correctly.
7618b08247Smrg
7718b08247Smrg  6. You can remove the program binaries and object files from the
786d325d25Smrg     source code directory by typing `make clean'.  To also remove the
796d325d25Smrg     files that `configure' created (so you can compile the package for
806d325d25Smrg     a different kind of computer), type `make distclean'.  There is
816d325d25Smrg     also a `make maintainer-clean' target, but that is intended mainly
826d325d25Smrg     for the package's developers.  If you use it, you may have to get
836d325d25Smrg     all sorts of other programs in order to regenerate files that came
846d325d25Smrg     with the distribution.
856d325d25Smrg
8618b08247Smrg  7. Often, you can also type `make uninstall' to remove the installed
8718b08247Smrg     files again.  In practice, not all packages have tested that
8818b08247Smrg     uninstallation works correctly, even though it is required by the
8918b08247Smrg     GNU Coding Standards.
9018b08247Smrg
9118b08247Smrg  8. Some packages, particularly those that use Automake, provide `make
9218b08247Smrg     distcheck', which can by used by developers to test that all other
9318b08247Smrg     targets like `make install' and `make uninstall' work correctly.
9418b08247Smrg     This target is generally not run by end users.
956d325d25Smrg
966d325d25SmrgCompilers and Options
976d325d25Smrg=====================
986d325d25Smrg
996d325d25Smrg   Some systems require unusual options for compilation or linking that
1006d325d25Smrgthe `configure' script does not know about.  Run `./configure --help'
1016d325d25Smrgfor details on some of the pertinent environment variables.
1026d325d25Smrg
1036d325d25Smrg   You can give `configure' initial values for configuration parameters
1046d325d25Smrgby setting variables in the command line or in the environment.  Here
1056d325d25Smrgis an example:
1066d325d25Smrg
1076d325d25Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
1086d325d25Smrg
1096d325d25Smrg   *Note Defining Variables::, for more details.
1106d325d25Smrg
1116d325d25SmrgCompiling For Multiple Architectures
1126d325d25Smrg====================================
1136d325d25Smrg
1146d325d25Smrg   You can compile the package for more than one kind of computer at the
1156d325d25Smrgsame time, by placing the object files for each architecture in their
1166d325d25Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
1176d325d25Smrgdirectory where you want the object files and executables to go and run
1186d325d25Smrgthe `configure' script.  `configure' automatically checks for the
11918b08247Smrgsource code in the directory that `configure' is in and in `..'.  This
12018b08247Smrgis known as a "VPATH" build.
1216d325d25Smrg
1226d325d25Smrg   With a non-GNU `make', it is safer to compile the package for one
1236d325d25Smrgarchitecture at a time in the source code directory.  After you have
1246d325d25Smrginstalled the package for one architecture, use `make distclean' before
1256d325d25Smrgreconfiguring for another architecture.
1266d325d25Smrg
1276d325d25Smrg   On MacOS X 10.5 and later systems, you can create libraries and
1286d325d25Smrgexecutables that work on multiple system types--known as "fat" or
1296d325d25Smrg"universal" binaries--by specifying multiple `-arch' options to the
1306d325d25Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
1316d325d25Smrgthis:
1326d325d25Smrg
1336d325d25Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1346d325d25Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1356d325d25Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
1366d325d25Smrg
1376d325d25Smrg   This is not guaranteed to produce working output in all cases, you
1386d325d25Smrgmay have to build one architecture at a time and combine the results
1396d325d25Smrgusing the `lipo' tool if you have problems.
1406d325d25Smrg
1416d325d25SmrgInstallation Names
1426d325d25Smrg==================
1436d325d25Smrg
1446d325d25Smrg   By default, `make install' installs the package's commands under
1456d325d25Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
1466d325d25Smrgcan specify an installation prefix other than `/usr/local' by giving
14718b08247Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14818b08247Smrgabsolute file name.
1496d325d25Smrg
1506d325d25Smrg   You can specify separate installation prefixes for
1516d325d25Smrgarchitecture-specific files and architecture-independent files.  If you
1526d325d25Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
1536d325d25SmrgPREFIX as the prefix for installing programs and libraries.
1546d325d25SmrgDocumentation and other data files still use the regular prefix.
1556d325d25Smrg
1566d325d25Smrg   In addition, if you use an unusual directory layout you can give
1576d325d25Smrgoptions like `--bindir=DIR' to specify different values for particular
1586d325d25Smrgkinds of files.  Run `configure --help' for a list of the directories
15918b08247Smrgyou can set and what kinds of files go in them.  In general, the
16018b08247Smrgdefault for these options is expressed in terms of `${prefix}', so that
16118b08247Smrgspecifying just `--prefix' will affect all of the other directory
16218b08247Smrgspecifications that were not explicitly provided.
16318b08247Smrg
16418b08247Smrg   The most portable way to affect installation locations is to pass the
16518b08247Smrgcorrect locations to `configure'; however, many packages provide one or
16618b08247Smrgboth of the following shortcuts of passing variable assignments to the
16718b08247Smrg`make install' command line to change installation locations without
16818b08247Smrghaving to reconfigure or recompile.
16918b08247Smrg
17018b08247Smrg   The first method involves providing an override variable for each
17118b08247Smrgaffected directory.  For example, `make install
17218b08247Smrgprefix=/alternate/directory' will choose an alternate location for all
17318b08247Smrgdirectory configuration variables that were expressed in terms of
17418b08247Smrg`${prefix}'.  Any directories that were specified during `configure',
17518b08247Smrgbut not in terms of `${prefix}', must each be overridden at install
17618b08247Smrgtime for the entire installation to be relocated.  The approach of
17718b08247Smrgmakefile variable overrides for each directory variable is required by
17818b08247Smrgthe GNU Coding Standards, and ideally causes no recompilation.
17918b08247SmrgHowever, some platforms have known limitations with the semantics of
18018b08247Smrgshared libraries that end up requiring recompilation when using this
18118b08247Smrgmethod, particularly noticeable in packages that use GNU Libtool.
18218b08247Smrg
18318b08247Smrg   The second method involves providing the `DESTDIR' variable.  For
18418b08247Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
18518b08247Smrg`/alternate/directory' before all installation names.  The approach of
18618b08247Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18718b08247Smrgdoes not work on platforms that have drive letters.  On the other hand,
18818b08247Smrgit does better at avoiding recompilation issues, and works well even
18918b08247Smrgwhen some directory options were not specified in terms of `${prefix}'
19018b08247Smrgat `configure' time.
19118b08247Smrg
19218b08247SmrgOptional Features
19318b08247Smrg=================
1946d325d25Smrg
1956d325d25Smrg   If the package supports it, you can cause programs to be installed
1966d325d25Smrgwith an extra prefix or suffix on their names by giving `configure' the
1976d325d25Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1986d325d25Smrg
1996d325d25Smrg   Some packages pay attention to `--enable-FEATURE' options to
2006d325d25Smrg`configure', where FEATURE indicates an optional part of the package.
2016d325d25SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
2026d325d25Smrgis something like `gnu-as' or `x' (for the X Window System).  The
2036d325d25Smrg`README' should mention any `--enable-' and `--with-' options that the
2046d325d25Smrgpackage recognizes.
2056d325d25Smrg
2066d325d25Smrg   For packages that use the X Window System, `configure' can usually
2076d325d25Smrgfind the X include and library files automatically, but if it doesn't,
2086d325d25Smrgyou can use the `configure' options `--x-includes=DIR' and
2096d325d25Smrg`--x-libraries=DIR' to specify their locations.
2106d325d25Smrg
21118b08247Smrg   Some packages offer the ability to configure how verbose the
21218b08247Smrgexecution of `make' will be.  For these packages, running `./configure
21318b08247Smrg--enable-silent-rules' sets the default to minimal output, which can be
21418b08247Smrgoverridden with `make V=1'; while running `./configure
21518b08247Smrg--disable-silent-rules' sets the default to verbose, which can be
21618b08247Smrgoverridden with `make V=0'.
21718b08247Smrg
2186d325d25SmrgParticular systems
2196d325d25Smrg==================
2206d325d25Smrg
2216d325d25Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
2226d325d25SmrgCC is not installed, it is recommended to use the following options in
2236d325d25Smrgorder to use an ANSI C compiler:
2246d325d25Smrg
22518b08247Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
2266d325d25Smrg
2276d325d25Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
2286d325d25Smrg
22918b08247Smrg   HP-UX `make' updates targets which have the same time stamps as
23018b08247Smrgtheir prerequisites, which makes it generally unusable when shipped
23118b08247Smrggenerated files such as `configure' are involved.  Use GNU `make'
23218b08247Smrginstead.
23318b08247Smrg
2346d325d25Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
2356d325d25Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
2366d325d25Smrga workaround.  If GNU CC is not installed, it is therefore recommended
2376d325d25Smrgto try
2386d325d25Smrg
2396d325d25Smrg     ./configure CC="cc"
2406d325d25Smrg
2416d325d25Smrgand if that doesn't work, try
2426d325d25Smrg
2436d325d25Smrg     ./configure CC="cc -nodtk"
2446d325d25Smrg
24518b08247Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24618b08247Smrgdirectory contains several dysfunctional programs; working variants of
24718b08247Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24818b08247Smrgin your `PATH', put it _after_ `/usr/bin'.
24918b08247Smrg
25018b08247Smrg   On Haiku, software installed for all users goes in `/boot/common',
25118b08247Smrgnot `/usr/local'.  It is recommended to use the following options:
25218b08247Smrg
25318b08247Smrg     ./configure --prefix=/boot/common
25418b08247Smrg
2556d325d25SmrgSpecifying the System Type
2566d325d25Smrg==========================
2576d325d25Smrg
2586d325d25Smrg   There may be some features `configure' cannot figure out
2596d325d25Smrgautomatically, but needs to determine by the type of machine the package
2606d325d25Smrgwill run on.  Usually, assuming the package is built to be run on the
2616d325d25Smrg_same_ architectures, `configure' can figure that out, but if it prints
2626d325d25Smrga message saying it cannot guess the machine type, give it the
2636d325d25Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
2646d325d25Smrgtype, such as `sun4', or a canonical name which has the form:
2656d325d25Smrg
2666d325d25Smrg     CPU-COMPANY-SYSTEM
2676d325d25Smrg
2686d325d25Smrgwhere SYSTEM can have one of these forms:
2696d325d25Smrg
27018b08247Smrg     OS
27118b08247Smrg     KERNEL-OS
2726d325d25Smrg
2736d325d25Smrg   See the file `config.sub' for the possible values of each field.  If
2746d325d25Smrg`config.sub' isn't included in this package, then this package doesn't
2756d325d25Smrgneed to know the machine type.
2766d325d25Smrg
2776d325d25Smrg   If you are _building_ compiler tools for cross-compiling, you should
2786d325d25Smrguse the option `--target=TYPE' to select the type of system they will
2796d325d25Smrgproduce code for.
2806d325d25Smrg
2816d325d25Smrg   If you want to _use_ a cross compiler, that generates code for a
2826d325d25Smrgplatform different from the build platform, you should specify the
2836d325d25Smrg"host" platform (i.e., that on which the generated programs will
2846d325d25Smrgeventually be run) with `--host=TYPE'.
2856d325d25Smrg
2866d325d25SmrgSharing Defaults
2876d325d25Smrg================
2886d325d25Smrg
2896d325d25Smrg   If you want to set default values for `configure' scripts to share,
2906d325d25Smrgyou can create a site shell script called `config.site' that gives
2916d325d25Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
2926d325d25Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2936d325d25Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2946d325d25Smrg`CONFIG_SITE' environment variable to the location of the site script.
2956d325d25SmrgA warning: not all `configure' scripts look for a site script.
2966d325d25Smrg
2976d325d25SmrgDefining Variables
2986d325d25Smrg==================
2996d325d25Smrg
3006d325d25Smrg   Variables not defined in a site shell script can be set in the
3016d325d25Smrgenvironment passed to `configure'.  However, some packages may run
3026d325d25Smrgconfigure again during the build, and the customized values of these
3036d325d25Smrgvariables may be lost.  In order to avoid this problem, you should set
3046d325d25Smrgthem in the `configure' command line, using `VAR=value'.  For example:
3056d325d25Smrg
3066d325d25Smrg     ./configure CC=/usr/local2/bin/gcc
3076d325d25Smrg
3086d325d25Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
3096d325d25Smrgoverridden in the site shell script).
3106d325d25Smrg
3116d325d25SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
3126d325d25Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
3136d325d25Smrg
3146d325d25Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
3156d325d25Smrg
3166d325d25Smrg`configure' Invocation
3176d325d25Smrg======================
3186d325d25Smrg
3196d325d25Smrg   `configure' recognizes the following options to control how it
3206d325d25Smrgoperates.
3216d325d25Smrg
3226d325d25Smrg`--help'
3236d325d25Smrg`-h'
3246d325d25Smrg     Print a summary of all of the options to `configure', and exit.
3256d325d25Smrg
3266d325d25Smrg`--help=short'
3276d325d25Smrg`--help=recursive'
3286d325d25Smrg     Print a summary of the options unique to this package's
3296d325d25Smrg     `configure', and exit.  The `short' variant lists options used
3306d325d25Smrg     only in the top level, while the `recursive' variant lists options
3316d325d25Smrg     also present in any nested packages.
3326d325d25Smrg
3336d325d25Smrg`--version'
3346d325d25Smrg`-V'
3356d325d25Smrg     Print the version of Autoconf used to generate the `configure'
3366d325d25Smrg     script, and exit.
3376d325d25Smrg
3386d325d25Smrg`--cache-file=FILE'
3396d325d25Smrg     Enable the cache: use and save the results of the tests in FILE,
3406d325d25Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
3416d325d25Smrg     disable caching.
3426d325d25Smrg
3436d325d25Smrg`--config-cache'
3446d325d25Smrg`-C'
3456d325d25Smrg     Alias for `--cache-file=config.cache'.
3466d325d25Smrg
3476d325d25Smrg`--quiet'
3486d325d25Smrg`--silent'
3496d325d25Smrg`-q'
3506d325d25Smrg     Do not print messages saying which checks are being made.  To
3516d325d25Smrg     suppress all normal output, redirect it to `/dev/null' (any error
3526d325d25Smrg     messages will still be shown).
3536d325d25Smrg
3546d325d25Smrg`--srcdir=DIR'
3556d325d25Smrg     Look for the package's source code in directory DIR.  Usually
3566d325d25Smrg     `configure' can determine that directory automatically.
3576d325d25Smrg
3586d325d25Smrg`--prefix=DIR'
35918b08247Smrg     Use DIR as the installation prefix.  *note Installation Names::
3606d325d25Smrg     for more details, including other options available for fine-tuning
3616d325d25Smrg     the installation locations.
3626d325d25Smrg
3636d325d25Smrg`--no-create'
3646d325d25Smrg`-n'
3656d325d25Smrg     Run the configure checks, but stop before creating any output
3666d325d25Smrg     files.
3676d325d25Smrg
3686d325d25Smrg`configure' also accepts some other, not widely useful, options.  Run
3696d325d25Smrg`configure --help' for more details.
3706d325d25Smrg
371