17a2631fcSmrgInstallation Instructions
27a2631fcSmrg*************************
37a2631fcSmrg
49cd34f4bSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
59cd34f4bSmrgInc.
67a2631fcSmrg
79cd34f4bSmrg   Copying and distribution of this file, with or without modification,
89cd34f4bSmrgare permitted in any medium without royalty provided the copyright
99cd34f4bSmrgnotice and this notice are preserved.  This file is offered as-is,
109cd34f4bSmrgwithout warranty of any kind.
117a2631fcSmrg
127a2631fcSmrgBasic Installation
137a2631fcSmrg==================
147a2631fcSmrg
157a2631fcSmrg   Briefly, the shell commands `./configure; make; make install' should
167a2631fcSmrgconfigure, build, and install this package.  The following
177a2631fcSmrgmore-detailed instructions are generic; see the `README' file for
189cd34f4bSmrginstructions specific to this package.  Some packages provide this
199cd34f4bSmrg`INSTALL' file but do not implement all of the features documented
209cd34f4bSmrgbelow.  The lack of an optional feature in a given package is not
219cd34f4bSmrgnecessarily a bug.  More recommendations for GNU packages can be found
229cd34f4bSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
237a2631fcSmrg
247a2631fcSmrg   The `configure' shell script attempts to guess correct values for
257a2631fcSmrgvarious system-dependent variables used during compilation.  It uses
267a2631fcSmrgthose values to create a `Makefile' in each directory of the package.
277a2631fcSmrgIt may also create one or more `.h' files containing system-dependent
287a2631fcSmrgdefinitions.  Finally, it creates a shell script `config.status' that
297a2631fcSmrgyou can run in the future to recreate the current configuration, and a
307a2631fcSmrgfile `config.log' containing compiler output (useful mainly for
317a2631fcSmrgdebugging `configure').
327a2631fcSmrg
337a2631fcSmrg   It can also use an optional file (typically called `config.cache'
347a2631fcSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
357a2631fcSmrgthe results of its tests to speed up reconfiguring.  Caching is
367a2631fcSmrgdisabled by default to prevent problems with accidental use of stale
377a2631fcSmrgcache files.
387a2631fcSmrg
397a2631fcSmrg   If you need to do unusual things to compile the package, please try
407a2631fcSmrgto figure out how `configure' could check whether to do them, and mail
417a2631fcSmrgdiffs or instructions to the address given in the `README' so they can
427a2631fcSmrgbe considered for the next release.  If you are using the cache, and at
437a2631fcSmrgsome point `config.cache' contains results you don't want to keep, you
447a2631fcSmrgmay remove or edit it.
457a2631fcSmrg
467a2631fcSmrg   The file `configure.ac' (or `configure.in') is used to create
477a2631fcSmrg`configure' by a program called `autoconf'.  You need `configure.ac' if
487a2631fcSmrgyou want to change it or regenerate `configure' using a newer version
497a2631fcSmrgof `autoconf'.
507a2631fcSmrg
519cd34f4bSmrg   The simplest way to compile this package is:
527a2631fcSmrg
537a2631fcSmrg  1. `cd' to the directory containing the package's source code and type
547a2631fcSmrg     `./configure' to configure the package for your system.
557a2631fcSmrg
567a2631fcSmrg     Running `configure' might take a while.  While running, it prints
577a2631fcSmrg     some messages telling which features it is checking for.
587a2631fcSmrg
597a2631fcSmrg  2. Type `make' to compile the package.
607a2631fcSmrg
617a2631fcSmrg  3. Optionally, type `make check' to run any self-tests that come with
629cd34f4bSmrg     the package, generally using the just-built uninstalled binaries.
637a2631fcSmrg
647a2631fcSmrg  4. Type `make install' to install the programs and any data files and
659cd34f4bSmrg     documentation.  When installing into a prefix owned by root, it is
669cd34f4bSmrg     recommended that the package be configured and built as a regular
679cd34f4bSmrg     user, and only the `make install' phase executed with root
689cd34f4bSmrg     privileges.
699cd34f4bSmrg
709cd34f4bSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
719cd34f4bSmrg     this time using the binaries in their final installed location.
729cd34f4bSmrg     This target does not install anything.  Running this target as a
739cd34f4bSmrg     regular user, particularly if the prior `make install' required
749cd34f4bSmrg     root privileges, verifies that the installation completed
759cd34f4bSmrg     correctly.
769cd34f4bSmrg
779cd34f4bSmrg  6. You can remove the program binaries and object files from the
787a2631fcSmrg     source code directory by typing `make clean'.  To also remove the
797a2631fcSmrg     files that `configure' created (so you can compile the package for
807a2631fcSmrg     a different kind of computer), type `make distclean'.  There is
817a2631fcSmrg     also a `make maintainer-clean' target, but that is intended mainly
827a2631fcSmrg     for the package's developers.  If you use it, you may have to get
837a2631fcSmrg     all sorts of other programs in order to regenerate files that came
847a2631fcSmrg     with the distribution.
857a2631fcSmrg
869cd34f4bSmrg  7. Often, you can also type `make uninstall' to remove the installed
879cd34f4bSmrg     files again.  In practice, not all packages have tested that
889cd34f4bSmrg     uninstallation works correctly, even though it is required by the
899cd34f4bSmrg     GNU Coding Standards.
909cd34f4bSmrg
919cd34f4bSmrg  8. Some packages, particularly those that use Automake, provide `make
929cd34f4bSmrg     distcheck', which can by used by developers to test that all other
939cd34f4bSmrg     targets like `make install' and `make uninstall' work correctly.
949cd34f4bSmrg     This target is generally not run by end users.
957a2631fcSmrg
967a2631fcSmrgCompilers and Options
977a2631fcSmrg=====================
987a2631fcSmrg
997a2631fcSmrg   Some systems require unusual options for compilation or linking that
1007a2631fcSmrgthe `configure' script does not know about.  Run `./configure --help'
1017a2631fcSmrgfor details on some of the pertinent environment variables.
1027a2631fcSmrg
1037a2631fcSmrg   You can give `configure' initial values for configuration parameters
1047a2631fcSmrgby setting variables in the command line or in the environment.  Here
1057a2631fcSmrgis an example:
1067a2631fcSmrg
1077a2631fcSmrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
1087a2631fcSmrg
1097a2631fcSmrg   *Note Defining Variables::, for more details.
1107a2631fcSmrg
1117a2631fcSmrgCompiling For Multiple Architectures
1127a2631fcSmrg====================================
1137a2631fcSmrg
1147a2631fcSmrg   You can compile the package for more than one kind of computer at the
1157a2631fcSmrgsame time, by placing the object files for each architecture in their
1167a2631fcSmrgown directory.  To do this, you can use GNU `make'.  `cd' to the
1177a2631fcSmrgdirectory where you want the object files and executables to go and run
1187a2631fcSmrgthe `configure' script.  `configure' automatically checks for the
1199cd34f4bSmrgsource code in the directory that `configure' is in and in `..'.  This
1209cd34f4bSmrgis known as a "VPATH" build.
1217a2631fcSmrg
1227a2631fcSmrg   With a non-GNU `make', it is safer to compile the package for one
1237a2631fcSmrgarchitecture at a time in the source code directory.  After you have
1247a2631fcSmrginstalled the package for one architecture, use `make distclean' before
1257a2631fcSmrgreconfiguring for another architecture.
1267a2631fcSmrg
1277a2631fcSmrg   On MacOS X 10.5 and later systems, you can create libraries and
1287a2631fcSmrgexecutables that work on multiple system types--known as "fat" or
1297a2631fcSmrg"universal" binaries--by specifying multiple `-arch' options to the
1307a2631fcSmrgcompiler but only a single `-arch' option to the preprocessor.  Like
1317a2631fcSmrgthis:
1327a2631fcSmrg
1337a2631fcSmrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1347a2631fcSmrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1357a2631fcSmrg                 CPP="gcc -E" CXXCPP="g++ -E"
1367a2631fcSmrg
1377a2631fcSmrg   This is not guaranteed to produce working output in all cases, you
1387a2631fcSmrgmay have to build one architecture at a time and combine the results
1397a2631fcSmrgusing the `lipo' tool if you have problems.
1407a2631fcSmrg
1417a2631fcSmrgInstallation Names
1427a2631fcSmrg==================
1437a2631fcSmrg
1447a2631fcSmrg   By default, `make install' installs the package's commands under
1457a2631fcSmrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
1467a2631fcSmrgcan specify an installation prefix other than `/usr/local' by giving
1479cd34f4bSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1489cd34f4bSmrgabsolute file name.
1497a2631fcSmrg
1507a2631fcSmrg   You can specify separate installation prefixes for
1517a2631fcSmrgarchitecture-specific files and architecture-independent files.  If you
1527a2631fcSmrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
1537a2631fcSmrgPREFIX as the prefix for installing programs and libraries.
1547a2631fcSmrgDocumentation and other data files still use the regular prefix.
1557a2631fcSmrg
1567a2631fcSmrg   In addition, if you use an unusual directory layout you can give
1577a2631fcSmrgoptions like `--bindir=DIR' to specify different values for particular
1587a2631fcSmrgkinds of files.  Run `configure --help' for a list of the directories
1599cd34f4bSmrgyou can set and what kinds of files go in them.  In general, the
1609cd34f4bSmrgdefault for these options is expressed in terms of `${prefix}', so that
1619cd34f4bSmrgspecifying just `--prefix' will affect all of the other directory
1629cd34f4bSmrgspecifications that were not explicitly provided.
1639cd34f4bSmrg
1649cd34f4bSmrg   The most portable way to affect installation locations is to pass the
1659cd34f4bSmrgcorrect locations to `configure'; however, many packages provide one or
1669cd34f4bSmrgboth of the following shortcuts of passing variable assignments to the
1679cd34f4bSmrg`make install' command line to change installation locations without
1689cd34f4bSmrghaving to reconfigure or recompile.
1699cd34f4bSmrg
1709cd34f4bSmrg   The first method involves providing an override variable for each
1719cd34f4bSmrgaffected directory.  For example, `make install
1729cd34f4bSmrgprefix=/alternate/directory' will choose an alternate location for all
1739cd34f4bSmrgdirectory configuration variables that were expressed in terms of
1749cd34f4bSmrg`${prefix}'.  Any directories that were specified during `configure',
1759cd34f4bSmrgbut not in terms of `${prefix}', must each be overridden at install
1769cd34f4bSmrgtime for the entire installation to be relocated.  The approach of
1779cd34f4bSmrgmakefile variable overrides for each directory variable is required by
1789cd34f4bSmrgthe GNU Coding Standards, and ideally causes no recompilation.
1799cd34f4bSmrgHowever, some platforms have known limitations with the semantics of
1809cd34f4bSmrgshared libraries that end up requiring recompilation when using this
1819cd34f4bSmrgmethod, particularly noticeable in packages that use GNU Libtool.
1829cd34f4bSmrg
1839cd34f4bSmrg   The second method involves providing the `DESTDIR' variable.  For
1849cd34f4bSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
1859cd34f4bSmrg`/alternate/directory' before all installation names.  The approach of
1869cd34f4bSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1879cd34f4bSmrgdoes not work on platforms that have drive letters.  On the other hand,
1889cd34f4bSmrgit does better at avoiding recompilation issues, and works well even
1899cd34f4bSmrgwhen some directory options were not specified in terms of `${prefix}'
1909cd34f4bSmrgat `configure' time.
1919cd34f4bSmrg
1929cd34f4bSmrgOptional Features
1939cd34f4bSmrg=================
1947a2631fcSmrg
1957a2631fcSmrg   If the package supports it, you can cause programs to be installed
1967a2631fcSmrgwith an extra prefix or suffix on their names by giving `configure' the
1977a2631fcSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1987a2631fcSmrg
1997a2631fcSmrg   Some packages pay attention to `--enable-FEATURE' options to
2007a2631fcSmrg`configure', where FEATURE indicates an optional part of the package.
2017a2631fcSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
2027a2631fcSmrgis something like `gnu-as' or `x' (for the X Window System).  The
2037a2631fcSmrg`README' should mention any `--enable-' and `--with-' options that the
2047a2631fcSmrgpackage recognizes.
2057a2631fcSmrg
2067a2631fcSmrg   For packages that use the X Window System, `configure' can usually
2077a2631fcSmrgfind the X include and library files automatically, but if it doesn't,
2087a2631fcSmrgyou can use the `configure' options `--x-includes=DIR' and
2097a2631fcSmrg`--x-libraries=DIR' to specify their locations.
2107a2631fcSmrg
2119cd34f4bSmrg   Some packages offer the ability to configure how verbose the
2129cd34f4bSmrgexecution of `make' will be.  For these packages, running `./configure
2139cd34f4bSmrg--enable-silent-rules' sets the default to minimal output, which can be
2149cd34f4bSmrgoverridden with `make V=1'; while running `./configure
2159cd34f4bSmrg--disable-silent-rules' sets the default to verbose, which can be
2169cd34f4bSmrgoverridden with `make V=0'.
2179cd34f4bSmrg
2187a2631fcSmrgParticular systems
2197a2631fcSmrg==================
2207a2631fcSmrg
2217a2631fcSmrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
2227a2631fcSmrgCC is not installed, it is recommended to use the following options in
2237a2631fcSmrgorder to use an ANSI C compiler:
2247a2631fcSmrg
2259cd34f4bSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
2267a2631fcSmrg
2277a2631fcSmrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
2287a2631fcSmrg
2299cd34f4bSmrg   HP-UX `make' updates targets which have the same time stamps as
2309cd34f4bSmrgtheir prerequisites, which makes it generally unusable when shipped
2319cd34f4bSmrggenerated files such as `configure' are involved.  Use GNU `make'
2329cd34f4bSmrginstead.
2339cd34f4bSmrg
2347a2631fcSmrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
2357a2631fcSmrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
2367a2631fcSmrga workaround.  If GNU CC is not installed, it is therefore recommended
2377a2631fcSmrgto try
2387a2631fcSmrg
2397a2631fcSmrg     ./configure CC="cc"
2407a2631fcSmrg
2417a2631fcSmrgand if that doesn't work, try
2427a2631fcSmrg
2437a2631fcSmrg     ./configure CC="cc -nodtk"
2447a2631fcSmrg
2459cd34f4bSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2469cd34f4bSmrgdirectory contains several dysfunctional programs; working variants of
2479cd34f4bSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2489cd34f4bSmrgin your `PATH', put it _after_ `/usr/bin'.
2499cd34f4bSmrg
2509cd34f4bSmrg   On Haiku, software installed for all users goes in `/boot/common',
2519cd34f4bSmrgnot `/usr/local'.  It is recommended to use the following options:
2529cd34f4bSmrg
2539cd34f4bSmrg     ./configure --prefix=/boot/common
2549cd34f4bSmrg
2557a2631fcSmrgSpecifying the System Type
2567a2631fcSmrg==========================
2577a2631fcSmrg
2587a2631fcSmrg   There may be some features `configure' cannot figure out
2597a2631fcSmrgautomatically, but needs to determine by the type of machine the package
2607a2631fcSmrgwill run on.  Usually, assuming the package is built to be run on the
2617a2631fcSmrg_same_ architectures, `configure' can figure that out, but if it prints
2627a2631fcSmrga message saying it cannot guess the machine type, give it the
2637a2631fcSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
2647a2631fcSmrgtype, such as `sun4', or a canonical name which has the form:
2657a2631fcSmrg
2667a2631fcSmrg     CPU-COMPANY-SYSTEM
2677a2631fcSmrg
2687a2631fcSmrgwhere SYSTEM can have one of these forms:
2697a2631fcSmrg
2709cd34f4bSmrg     OS
2719cd34f4bSmrg     KERNEL-OS
2727a2631fcSmrg
2737a2631fcSmrg   See the file `config.sub' for the possible values of each field.  If
2747a2631fcSmrg`config.sub' isn't included in this package, then this package doesn't
2757a2631fcSmrgneed to know the machine type.
2767a2631fcSmrg
2777a2631fcSmrg   If you are _building_ compiler tools for cross-compiling, you should
2787a2631fcSmrguse the option `--target=TYPE' to select the type of system they will
2797a2631fcSmrgproduce code for.
2807a2631fcSmrg
2817a2631fcSmrg   If you want to _use_ a cross compiler, that generates code for a
2827a2631fcSmrgplatform different from the build platform, you should specify the
2837a2631fcSmrg"host" platform (i.e., that on which the generated programs will
2847a2631fcSmrgeventually be run) with `--host=TYPE'.
2857a2631fcSmrg
2867a2631fcSmrgSharing Defaults
2877a2631fcSmrg================
2887a2631fcSmrg
2897a2631fcSmrg   If you want to set default values for `configure' scripts to share,
2907a2631fcSmrgyou can create a site shell script called `config.site' that gives
2917a2631fcSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
2927a2631fcSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2937a2631fcSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2947a2631fcSmrg`CONFIG_SITE' environment variable to the location of the site script.
2957a2631fcSmrgA warning: not all `configure' scripts look for a site script.
2967a2631fcSmrg
2977a2631fcSmrgDefining Variables
2987a2631fcSmrg==================
2997a2631fcSmrg
3007a2631fcSmrg   Variables not defined in a site shell script can be set in the
3017a2631fcSmrgenvironment passed to `configure'.  However, some packages may run
3027a2631fcSmrgconfigure again during the build, and the customized values of these
3037a2631fcSmrgvariables may be lost.  In order to avoid this problem, you should set
3047a2631fcSmrgthem in the `configure' command line, using `VAR=value'.  For example:
3057a2631fcSmrg
3067a2631fcSmrg     ./configure CC=/usr/local2/bin/gcc
3077a2631fcSmrg
3087a2631fcSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
3097a2631fcSmrgoverridden in the site shell script).
3107a2631fcSmrg
3117a2631fcSmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
3127a2631fcSmrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
3137a2631fcSmrg
3147a2631fcSmrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
3157a2631fcSmrg
3167a2631fcSmrg`configure' Invocation
3177a2631fcSmrg======================
3187a2631fcSmrg
3197a2631fcSmrg   `configure' recognizes the following options to control how it
3207a2631fcSmrgoperates.
3217a2631fcSmrg
3227a2631fcSmrg`--help'
3237a2631fcSmrg`-h'
3247a2631fcSmrg     Print a summary of all of the options to `configure', and exit.
3257a2631fcSmrg
3267a2631fcSmrg`--help=short'
3277a2631fcSmrg`--help=recursive'
3287a2631fcSmrg     Print a summary of the options unique to this package's
3297a2631fcSmrg     `configure', and exit.  The `short' variant lists options used
3307a2631fcSmrg     only in the top level, while the `recursive' variant lists options
3317a2631fcSmrg     also present in any nested packages.
3327a2631fcSmrg
3337a2631fcSmrg`--version'
3347a2631fcSmrg`-V'
3357a2631fcSmrg     Print the version of Autoconf used to generate the `configure'
3367a2631fcSmrg     script, and exit.
3377a2631fcSmrg
3387a2631fcSmrg`--cache-file=FILE'
3397a2631fcSmrg     Enable the cache: use and save the results of the tests in FILE,
3407a2631fcSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
3417a2631fcSmrg     disable caching.
3427a2631fcSmrg
3437a2631fcSmrg`--config-cache'
3447a2631fcSmrg`-C'
3457a2631fcSmrg     Alias for `--cache-file=config.cache'.
3467a2631fcSmrg
3477a2631fcSmrg`--quiet'
3487a2631fcSmrg`--silent'
3497a2631fcSmrg`-q'
3507a2631fcSmrg     Do not print messages saying which checks are being made.  To
3517a2631fcSmrg     suppress all normal output, redirect it to `/dev/null' (any error
3527a2631fcSmrg     messages will still be shown).
3537a2631fcSmrg
3547a2631fcSmrg`--srcdir=DIR'
3557a2631fcSmrg     Look for the package's source code in directory DIR.  Usually
3567a2631fcSmrg     `configure' can determine that directory automatically.
3577a2631fcSmrg
3587a2631fcSmrg`--prefix=DIR'
3599cd34f4bSmrg     Use DIR as the installation prefix.  *note Installation Names::
3607a2631fcSmrg     for more details, including other options available for fine-tuning
3617a2631fcSmrg     the installation locations.
3627a2631fcSmrg
3637a2631fcSmrg`--no-create'
3647a2631fcSmrg`-n'
3657a2631fcSmrg     Run the configure checks, but stop before creating any output
3667a2631fcSmrg     files.
3677a2631fcSmrg
3687a2631fcSmrg`configure' also accepts some other, not widely useful, options.  Run
3697a2631fcSmrg`configure --help' for more details.
3707a2631fcSmrg
371