11b12faf6SmrgInstallation Instructions
21b12faf6Smrg*************************
31b12faf6Smrg
45a81ca49SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
55a81ca49SmrgInc.
61b12faf6Smrg
75a81ca49Smrg   Copying and distribution of this file, with or without modification,
85a81ca49Smrgare permitted in any medium without royalty provided the copyright
95a81ca49Smrgnotice and this notice are preserved.  This file is offered as-is,
105a81ca49Smrgwithout warranty of any kind.
111b12faf6Smrg
121b12faf6SmrgBasic Installation
131b12faf6Smrg==================
141b12faf6Smrg
151b12faf6Smrg   Briefly, the shell commands `./configure; make; make install' should
161b12faf6Smrgconfigure, build, and install this package.  The following
171b12faf6Smrgmore-detailed instructions are generic; see the `README' file for
185a81ca49Smrginstructions specific to this package.  Some packages provide this
195a81ca49Smrg`INSTALL' file but do not implement all of the features documented
205a81ca49Smrgbelow.  The lack of an optional feature in a given package is not
215a81ca49Smrgnecessarily a bug.  More recommendations for GNU packages can be found
225a81ca49Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
231b12faf6Smrg
241b12faf6Smrg   The `configure' shell script attempts to guess correct values for
251b12faf6Smrgvarious system-dependent variables used during compilation.  It uses
261b12faf6Smrgthose values to create a `Makefile' in each directory of the package.
271b12faf6SmrgIt may also create one or more `.h' files containing system-dependent
281b12faf6Smrgdefinitions.  Finally, it creates a shell script `config.status' that
291b12faf6Smrgyou can run in the future to recreate the current configuration, and a
301b12faf6Smrgfile `config.log' containing compiler output (useful mainly for
311b12faf6Smrgdebugging `configure').
321b12faf6Smrg
331b12faf6Smrg   It can also use an optional file (typically called `config.cache'
341b12faf6Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
351b12faf6Smrgthe results of its tests to speed up reconfiguring.  Caching is
361b12faf6Smrgdisabled by default to prevent problems with accidental use of stale
371b12faf6Smrgcache files.
381b12faf6Smrg
391b12faf6Smrg   If you need to do unusual things to compile the package, please try
401b12faf6Smrgto figure out how `configure' could check whether to do them, and mail
411b12faf6Smrgdiffs or instructions to the address given in the `README' so they can
421b12faf6Smrgbe considered for the next release.  If you are using the cache, and at
431b12faf6Smrgsome point `config.cache' contains results you don't want to keep, you
441b12faf6Smrgmay remove or edit it.
451b12faf6Smrg
461b12faf6Smrg   The file `configure.ac' (or `configure.in') is used to create
471b12faf6Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
481b12faf6Smrgyou want to change it or regenerate `configure' using a newer version
491b12faf6Smrgof `autoconf'.
501b12faf6Smrg
515a81ca49Smrg   The simplest way to compile this package is:
521b12faf6Smrg
531b12faf6Smrg  1. `cd' to the directory containing the package's source code and type
541b12faf6Smrg     `./configure' to configure the package for your system.
551b12faf6Smrg
561b12faf6Smrg     Running `configure' might take a while.  While running, it prints
571b12faf6Smrg     some messages telling which features it is checking for.
581b12faf6Smrg
591b12faf6Smrg  2. Type `make' to compile the package.
601b12faf6Smrg
611b12faf6Smrg  3. Optionally, type `make check' to run any self-tests that come with
625a81ca49Smrg     the package, generally using the just-built uninstalled binaries.
631b12faf6Smrg
641b12faf6Smrg  4. Type `make install' to install the programs and any data files and
655a81ca49Smrg     documentation.  When installing into a prefix owned by root, it is
665a81ca49Smrg     recommended that the package be configured and built as a regular
675a81ca49Smrg     user, and only the `make install' phase executed with root
685a81ca49Smrg     privileges.
695a81ca49Smrg
705a81ca49Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
715a81ca49Smrg     this time using the binaries in their final installed location.
725a81ca49Smrg     This target does not install anything.  Running this target as a
735a81ca49Smrg     regular user, particularly if the prior `make install' required
745a81ca49Smrg     root privileges, verifies that the installation completed
755a81ca49Smrg     correctly.
765a81ca49Smrg
775a81ca49Smrg  6. You can remove the program binaries and object files from the
781b12faf6Smrg     source code directory by typing `make clean'.  To also remove the
791b12faf6Smrg     files that `configure' created (so you can compile the package for
801b12faf6Smrg     a different kind of computer), type `make distclean'.  There is
811b12faf6Smrg     also a `make maintainer-clean' target, but that is intended mainly
821b12faf6Smrg     for the package's developers.  If you use it, you may have to get
831b12faf6Smrg     all sorts of other programs in order to regenerate files that came
841b12faf6Smrg     with the distribution.
851b12faf6Smrg
865a81ca49Smrg  7. Often, you can also type `make uninstall' to remove the installed
875a81ca49Smrg     files again.  In practice, not all packages have tested that
885a81ca49Smrg     uninstallation works correctly, even though it is required by the
895a81ca49Smrg     GNU Coding Standards.
905a81ca49Smrg
915a81ca49Smrg  8. Some packages, particularly those that use Automake, provide `make
925a81ca49Smrg     distcheck', which can by used by developers to test that all other
935a81ca49Smrg     targets like `make install' and `make uninstall' work correctly.
945a81ca49Smrg     This target is generally not run by end users.
951b12faf6Smrg
961b12faf6SmrgCompilers and Options
971b12faf6Smrg=====================
981b12faf6Smrg
991b12faf6Smrg   Some systems require unusual options for compilation or linking that
1001b12faf6Smrgthe `configure' script does not know about.  Run `./configure --help'
1011b12faf6Smrgfor details on some of the pertinent environment variables.
1021b12faf6Smrg
1031b12faf6Smrg   You can give `configure' initial values for configuration parameters
1041b12faf6Smrgby setting variables in the command line or in the environment.  Here
1051b12faf6Smrgis an example:
1061b12faf6Smrg
1071b12faf6Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
1081b12faf6Smrg
1091b12faf6Smrg   *Note Defining Variables::, for more details.
1101b12faf6Smrg
1111b12faf6SmrgCompiling For Multiple Architectures
1121b12faf6Smrg====================================
1131b12faf6Smrg
1141b12faf6Smrg   You can compile the package for more than one kind of computer at the
1151b12faf6Smrgsame time, by placing the object files for each architecture in their
1161b12faf6Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
1171b12faf6Smrgdirectory where you want the object files and executables to go and run
1181b12faf6Smrgthe `configure' script.  `configure' automatically checks for the
1195a81ca49Smrgsource code in the directory that `configure' is in and in `..'.  This
1205a81ca49Smrgis known as a "VPATH" build.
1211b12faf6Smrg
1221b12faf6Smrg   With a non-GNU `make', it is safer to compile the package for one
1231b12faf6Smrgarchitecture at a time in the source code directory.  After you have
1241b12faf6Smrginstalled the package for one architecture, use `make distclean' before
1251b12faf6Smrgreconfiguring for another architecture.
1261b12faf6Smrg
1271b12faf6Smrg   On MacOS X 10.5 and later systems, you can create libraries and
1281b12faf6Smrgexecutables that work on multiple system types--known as "fat" or
1291b12faf6Smrg"universal" binaries--by specifying multiple `-arch' options to the
1301b12faf6Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
1311b12faf6Smrgthis:
1321b12faf6Smrg
1331b12faf6Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1341b12faf6Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1351b12faf6Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
1361b12faf6Smrg
1371b12faf6Smrg   This is not guaranteed to produce working output in all cases, you
1381b12faf6Smrgmay have to build one architecture at a time and combine the results
1391b12faf6Smrgusing the `lipo' tool if you have problems.
1401b12faf6Smrg
1411b12faf6SmrgInstallation Names
1421b12faf6Smrg==================
1431b12faf6Smrg
1441b12faf6Smrg   By default, `make install' installs the package's commands under
1451b12faf6Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
1461b12faf6Smrgcan specify an installation prefix other than `/usr/local' by giving
1475a81ca49Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1485a81ca49Smrgabsolute file name.
1491b12faf6Smrg
1501b12faf6Smrg   You can specify separate installation prefixes for
1511b12faf6Smrgarchitecture-specific files and architecture-independent files.  If you
1521b12faf6Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
1531b12faf6SmrgPREFIX as the prefix for installing programs and libraries.
1541b12faf6SmrgDocumentation and other data files still use the regular prefix.
1551b12faf6Smrg
1561b12faf6Smrg   In addition, if you use an unusual directory layout you can give
1571b12faf6Smrgoptions like `--bindir=DIR' to specify different values for particular
1581b12faf6Smrgkinds of files.  Run `configure --help' for a list of the directories
1595a81ca49Smrgyou can set and what kinds of files go in them.  In general, the
1605a81ca49Smrgdefault for these options is expressed in terms of `${prefix}', so that
1615a81ca49Smrgspecifying just `--prefix' will affect all of the other directory
1625a81ca49Smrgspecifications that were not explicitly provided.
1635a81ca49Smrg
1645a81ca49Smrg   The most portable way to affect installation locations is to pass the
1655a81ca49Smrgcorrect locations to `configure'; however, many packages provide one or
1665a81ca49Smrgboth of the following shortcuts of passing variable assignments to the
1675a81ca49Smrg`make install' command line to change installation locations without
1685a81ca49Smrghaving to reconfigure or recompile.
1695a81ca49Smrg
1705a81ca49Smrg   The first method involves providing an override variable for each
1715a81ca49Smrgaffected directory.  For example, `make install
1725a81ca49Smrgprefix=/alternate/directory' will choose an alternate location for all
1735a81ca49Smrgdirectory configuration variables that were expressed in terms of
1745a81ca49Smrg`${prefix}'.  Any directories that were specified during `configure',
1755a81ca49Smrgbut not in terms of `${prefix}', must each be overridden at install
1765a81ca49Smrgtime for the entire installation to be relocated.  The approach of
1775a81ca49Smrgmakefile variable overrides for each directory variable is required by
1785a81ca49Smrgthe GNU Coding Standards, and ideally causes no recompilation.
1795a81ca49SmrgHowever, some platforms have known limitations with the semantics of
1805a81ca49Smrgshared libraries that end up requiring recompilation when using this
1815a81ca49Smrgmethod, particularly noticeable in packages that use GNU Libtool.
1825a81ca49Smrg
1835a81ca49Smrg   The second method involves providing the `DESTDIR' variable.  For
1845a81ca49Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
1855a81ca49Smrg`/alternate/directory' before all installation names.  The approach of
1865a81ca49Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1875a81ca49Smrgdoes not work on platforms that have drive letters.  On the other hand,
1885a81ca49Smrgit does better at avoiding recompilation issues, and works well even
1895a81ca49Smrgwhen some directory options were not specified in terms of `${prefix}'
1905a81ca49Smrgat `configure' time.
1915a81ca49Smrg
1925a81ca49SmrgOptional Features
1935a81ca49Smrg=================
1941b12faf6Smrg
1951b12faf6Smrg   If the package supports it, you can cause programs to be installed
1961b12faf6Smrgwith an extra prefix or suffix on their names by giving `configure' the
1971b12faf6Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1981b12faf6Smrg
1991b12faf6Smrg   Some packages pay attention to `--enable-FEATURE' options to
2001b12faf6Smrg`configure', where FEATURE indicates an optional part of the package.
2011b12faf6SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
2021b12faf6Smrgis something like `gnu-as' or `x' (for the X Window System).  The
2031b12faf6Smrg`README' should mention any `--enable-' and `--with-' options that the
2041b12faf6Smrgpackage recognizes.
2051b12faf6Smrg
2061b12faf6Smrg   For packages that use the X Window System, `configure' can usually
2071b12faf6Smrgfind the X include and library files automatically, but if it doesn't,
2081b12faf6Smrgyou can use the `configure' options `--x-includes=DIR' and
2091b12faf6Smrg`--x-libraries=DIR' to specify their locations.
2101b12faf6Smrg
2115a81ca49Smrg   Some packages offer the ability to configure how verbose the
2125a81ca49Smrgexecution of `make' will be.  For these packages, running `./configure
2135a81ca49Smrg--enable-silent-rules' sets the default to minimal output, which can be
2145a81ca49Smrgoverridden with `make V=1'; while running `./configure
2155a81ca49Smrg--disable-silent-rules' sets the default to verbose, which can be
2165a81ca49Smrgoverridden with `make V=0'.
2175a81ca49Smrg
2181b12faf6SmrgParticular systems
2191b12faf6Smrg==================
2201b12faf6Smrg
2211b12faf6Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
2221b12faf6SmrgCC is not installed, it is recommended to use the following options in
2231b12faf6Smrgorder to use an ANSI C compiler:
2241b12faf6Smrg
2255a81ca49Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
2261b12faf6Smrg
2271b12faf6Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
2281b12faf6Smrg
2295a81ca49Smrg   HP-UX `make' updates targets which have the same time stamps as
2305a81ca49Smrgtheir prerequisites, which makes it generally unusable when shipped
2315a81ca49Smrggenerated files such as `configure' are involved.  Use GNU `make'
2325a81ca49Smrginstead.
2335a81ca49Smrg
2341b12faf6Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
2351b12faf6Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
2361b12faf6Smrga workaround.  If GNU CC is not installed, it is therefore recommended
2371b12faf6Smrgto try
2381b12faf6Smrg
2391b12faf6Smrg     ./configure CC="cc"
2401b12faf6Smrg
2411b12faf6Smrgand if that doesn't work, try
2421b12faf6Smrg
2431b12faf6Smrg     ./configure CC="cc -nodtk"
2441b12faf6Smrg
2455a81ca49Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2465a81ca49Smrgdirectory contains several dysfunctional programs; working variants of
2475a81ca49Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2485a81ca49Smrgin your `PATH', put it _after_ `/usr/bin'.
2495a81ca49Smrg
2505a81ca49Smrg   On Haiku, software installed for all users goes in `/boot/common',
2515a81ca49Smrgnot `/usr/local'.  It is recommended to use the following options:
2525a81ca49Smrg
2535a81ca49Smrg     ./configure --prefix=/boot/common
2545a81ca49Smrg
2551b12faf6SmrgSpecifying the System Type
2561b12faf6Smrg==========================
2571b12faf6Smrg
2581b12faf6Smrg   There may be some features `configure' cannot figure out
2591b12faf6Smrgautomatically, but needs to determine by the type of machine the package
2601b12faf6Smrgwill run on.  Usually, assuming the package is built to be run on the
2611b12faf6Smrg_same_ architectures, `configure' can figure that out, but if it prints
2621b12faf6Smrga message saying it cannot guess the machine type, give it the
2631b12faf6Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
2641b12faf6Smrgtype, such as `sun4', or a canonical name which has the form:
2651b12faf6Smrg
2661b12faf6Smrg     CPU-COMPANY-SYSTEM
2671b12faf6Smrg
2681b12faf6Smrgwhere SYSTEM can have one of these forms:
2691b12faf6Smrg
2705a81ca49Smrg     OS
2715a81ca49Smrg     KERNEL-OS
2721b12faf6Smrg
2731b12faf6Smrg   See the file `config.sub' for the possible values of each field.  If
2741b12faf6Smrg`config.sub' isn't included in this package, then this package doesn't
2751b12faf6Smrgneed to know the machine type.
2761b12faf6Smrg
2771b12faf6Smrg   If you are _building_ compiler tools for cross-compiling, you should
2781b12faf6Smrguse the option `--target=TYPE' to select the type of system they will
2791b12faf6Smrgproduce code for.
2801b12faf6Smrg
2811b12faf6Smrg   If you want to _use_ a cross compiler, that generates code for a
2821b12faf6Smrgplatform different from the build platform, you should specify the
2831b12faf6Smrg"host" platform (i.e., that on which the generated programs will
2841b12faf6Smrgeventually be run) with `--host=TYPE'.
2851b12faf6Smrg
2861b12faf6SmrgSharing Defaults
2871b12faf6Smrg================
2881b12faf6Smrg
2891b12faf6Smrg   If you want to set default values for `configure' scripts to share,
2901b12faf6Smrgyou can create a site shell script called `config.site' that gives
2911b12faf6Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
2921b12faf6Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2931b12faf6Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2941b12faf6Smrg`CONFIG_SITE' environment variable to the location of the site script.
2951b12faf6SmrgA warning: not all `configure' scripts look for a site script.
2961b12faf6Smrg
2971b12faf6SmrgDefining Variables
2981b12faf6Smrg==================
2991b12faf6Smrg
3001b12faf6Smrg   Variables not defined in a site shell script can be set in the
3011b12faf6Smrgenvironment passed to `configure'.  However, some packages may run
3021b12faf6Smrgconfigure again during the build, and the customized values of these
3031b12faf6Smrgvariables may be lost.  In order to avoid this problem, you should set
3041b12faf6Smrgthem in the `configure' command line, using `VAR=value'.  For example:
3051b12faf6Smrg
3061b12faf6Smrg     ./configure CC=/usr/local2/bin/gcc
3071b12faf6Smrg
3081b12faf6Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
3091b12faf6Smrgoverridden in the site shell script).
3101b12faf6Smrg
3111b12faf6SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
3121b12faf6Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
3131b12faf6Smrg
3141b12faf6Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
3151b12faf6Smrg
3161b12faf6Smrg`configure' Invocation
3171b12faf6Smrg======================
3181b12faf6Smrg
3191b12faf6Smrg   `configure' recognizes the following options to control how it
3201b12faf6Smrgoperates.
3211b12faf6Smrg
3221b12faf6Smrg`--help'
3231b12faf6Smrg`-h'
3241b12faf6Smrg     Print a summary of all of the options to `configure', and exit.
3251b12faf6Smrg
3261b12faf6Smrg`--help=short'
3271b12faf6Smrg`--help=recursive'
3281b12faf6Smrg     Print a summary of the options unique to this package's
3291b12faf6Smrg     `configure', and exit.  The `short' variant lists options used
3301b12faf6Smrg     only in the top level, while the `recursive' variant lists options
3311b12faf6Smrg     also present in any nested packages.
3321b12faf6Smrg
3331b12faf6Smrg`--version'
3341b12faf6Smrg`-V'
3351b12faf6Smrg     Print the version of Autoconf used to generate the `configure'
3361b12faf6Smrg     script, and exit.
3371b12faf6Smrg
3381b12faf6Smrg`--cache-file=FILE'
3391b12faf6Smrg     Enable the cache: use and save the results of the tests in FILE,
3401b12faf6Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
3411b12faf6Smrg     disable caching.
3421b12faf6Smrg
3431b12faf6Smrg`--config-cache'
3441b12faf6Smrg`-C'
3451b12faf6Smrg     Alias for `--cache-file=config.cache'.
3461b12faf6Smrg
3471b12faf6Smrg`--quiet'
3481b12faf6Smrg`--silent'
3491b12faf6Smrg`-q'
3501b12faf6Smrg     Do not print messages saying which checks are being made.  To
3511b12faf6Smrg     suppress all normal output, redirect it to `/dev/null' (any error
3521b12faf6Smrg     messages will still be shown).
3531b12faf6Smrg
3541b12faf6Smrg`--srcdir=DIR'
3551b12faf6Smrg     Look for the package's source code in directory DIR.  Usually
3561b12faf6Smrg     `configure' can determine that directory automatically.
3571b12faf6Smrg
3581b12faf6Smrg`--prefix=DIR'
3595a81ca49Smrg     Use DIR as the installation prefix.  *note Installation Names::
3601b12faf6Smrg     for more details, including other options available for fine-tuning
3611b12faf6Smrg     the installation locations.
3621b12faf6Smrg
3631b12faf6Smrg`--no-create'
3641b12faf6Smrg`-n'
3651b12faf6Smrg     Run the configure checks, but stop before creating any output
3661b12faf6Smrg     files.
3671b12faf6Smrg
3681b12faf6Smrg`configure' also accepts some other, not widely useful, options.  Run
3691b12faf6Smrg`configure --help' for more details.
3701b12faf6Smrg
371