INSTALL revision 7b5fefc8
12227fc13SmrgInstallation Instructions
22227fc13Smrg*************************
32227fc13Smrg
47b5fefc8SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
57b5fefc8SmrgInc.
62227fc13Smrg
77b5fefc8Smrg   Copying and distribution of this file, with or without modification,
87b5fefc8Smrgare permitted in any medium without royalty provided the copyright
97b5fefc8Smrgnotice and this notice are preserved.  This file is offered as-is,
107b5fefc8Smrgwithout warranty of any kind.
112227fc13Smrg
122227fc13SmrgBasic Installation
132227fc13Smrg==================
142227fc13Smrg
152227fc13Smrg   Briefly, the shell commands `./configure; make; make install' should
162227fc13Smrgconfigure, build, and install this package.  The following
172227fc13Smrgmore-detailed instructions are generic; see the `README' file for
187b5fefc8Smrginstructions specific to this package.  Some packages provide this
197b5fefc8Smrg`INSTALL' file but do not implement all of the features documented
207b5fefc8Smrgbelow.  The lack of an optional feature in a given package is not
217b5fefc8Smrgnecessarily a bug.  More recommendations for GNU packages can be found
227b5fefc8Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
232227fc13Smrg
242227fc13Smrg   The `configure' shell script attempts to guess correct values for
252227fc13Smrgvarious system-dependent variables used during compilation.  It uses
262227fc13Smrgthose values to create a `Makefile' in each directory of the package.
272227fc13SmrgIt may also create one or more `.h' files containing system-dependent
282227fc13Smrgdefinitions.  Finally, it creates a shell script `config.status' that
292227fc13Smrgyou can run in the future to recreate the current configuration, and a
302227fc13Smrgfile `config.log' containing compiler output (useful mainly for
312227fc13Smrgdebugging `configure').
322227fc13Smrg
332227fc13Smrg   It can also use an optional file (typically called `config.cache'
342227fc13Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
352227fc13Smrgthe results of its tests to speed up reconfiguring.  Caching is
362227fc13Smrgdisabled by default to prevent problems with accidental use of stale
372227fc13Smrgcache files.
382227fc13Smrg
392227fc13Smrg   If you need to do unusual things to compile the package, please try
402227fc13Smrgto figure out how `configure' could check whether to do them, and mail
412227fc13Smrgdiffs or instructions to the address given in the `README' so they can
422227fc13Smrgbe considered for the next release.  If you are using the cache, and at
432227fc13Smrgsome point `config.cache' contains results you don't want to keep, you
442227fc13Smrgmay remove or edit it.
452227fc13Smrg
462227fc13Smrg   The file `configure.ac' (or `configure.in') is used to create
472227fc13Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
482227fc13Smrgyou want to change it or regenerate `configure' using a newer version
492227fc13Smrgof `autoconf'.
502227fc13Smrg
517b5fefc8Smrg   The simplest way to compile this package is:
522227fc13Smrg
532227fc13Smrg  1. `cd' to the directory containing the package's source code and type
542227fc13Smrg     `./configure' to configure the package for your system.
552227fc13Smrg
562227fc13Smrg     Running `configure' might take a while.  While running, it prints
572227fc13Smrg     some messages telling which features it is checking for.
582227fc13Smrg
592227fc13Smrg  2. Type `make' to compile the package.
602227fc13Smrg
612227fc13Smrg  3. Optionally, type `make check' to run any self-tests that come with
627b5fefc8Smrg     the package, generally using the just-built uninstalled binaries.
632227fc13Smrg
642227fc13Smrg  4. Type `make install' to install the programs and any data files and
657b5fefc8Smrg     documentation.  When installing into a prefix owned by root, it is
667b5fefc8Smrg     recommended that the package be configured and built as a regular
677b5fefc8Smrg     user, and only the `make install' phase executed with root
687b5fefc8Smrg     privileges.
697b5fefc8Smrg
707b5fefc8Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
717b5fefc8Smrg     this time using the binaries in their final installed location.
727b5fefc8Smrg     This target does not install anything.  Running this target as a
737b5fefc8Smrg     regular user, particularly if the prior `make install' required
747b5fefc8Smrg     root privileges, verifies that the installation completed
757b5fefc8Smrg     correctly.
767b5fefc8Smrg
777b5fefc8Smrg  6. You can remove the program binaries and object files from the
782227fc13Smrg     source code directory by typing `make clean'.  To also remove the
792227fc13Smrg     files that `configure' created (so you can compile the package for
802227fc13Smrg     a different kind of computer), type `make distclean'.  There is
812227fc13Smrg     also a `make maintainer-clean' target, but that is intended mainly
822227fc13Smrg     for the package's developers.  If you use it, you may have to get
832227fc13Smrg     all sorts of other programs in order to regenerate files that came
842227fc13Smrg     with the distribution.
852227fc13Smrg
867b5fefc8Smrg  7. Often, you can also type `make uninstall' to remove the installed
877b5fefc8Smrg     files again.  In practice, not all packages have tested that
887b5fefc8Smrg     uninstallation works correctly, even though it is required by the
897b5fefc8Smrg     GNU Coding Standards.
907b5fefc8Smrg
917b5fefc8Smrg  8. Some packages, particularly those that use Automake, provide `make
927b5fefc8Smrg     distcheck', which can by used by developers to test that all other
937b5fefc8Smrg     targets like `make install' and `make uninstall' work correctly.
947b5fefc8Smrg     This target is generally not run by end users.
952227fc13Smrg
962227fc13SmrgCompilers and Options
972227fc13Smrg=====================
982227fc13Smrg
992227fc13Smrg   Some systems require unusual options for compilation or linking that
1002227fc13Smrgthe `configure' script does not know about.  Run `./configure --help'
1012227fc13Smrgfor details on some of the pertinent environment variables.
1022227fc13Smrg
1032227fc13Smrg   You can give `configure' initial values for configuration parameters
1042227fc13Smrgby setting variables in the command line or in the environment.  Here
1052227fc13Smrgis an example:
1062227fc13Smrg
1072227fc13Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
1082227fc13Smrg
1092227fc13Smrg   *Note Defining Variables::, for more details.
1102227fc13Smrg
1112227fc13SmrgCompiling For Multiple Architectures
1122227fc13Smrg====================================
1132227fc13Smrg
1142227fc13Smrg   You can compile the package for more than one kind of computer at the
1152227fc13Smrgsame time, by placing the object files for each architecture in their
1162227fc13Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
1172227fc13Smrgdirectory where you want the object files and executables to go and run
1182227fc13Smrgthe `configure' script.  `configure' automatically checks for the
1197b5fefc8Smrgsource code in the directory that `configure' is in and in `..'.  This
1207b5fefc8Smrgis known as a "VPATH" build.
1212227fc13Smrg
1222227fc13Smrg   With a non-GNU `make', it is safer to compile the package for one
1232227fc13Smrgarchitecture at a time in the source code directory.  After you have
1242227fc13Smrginstalled the package for one architecture, use `make distclean' before
1252227fc13Smrgreconfiguring for another architecture.
1262227fc13Smrg
1272227fc13Smrg   On MacOS X 10.5 and later systems, you can create libraries and
1282227fc13Smrgexecutables that work on multiple system types--known as "fat" or
1292227fc13Smrg"universal" binaries--by specifying multiple `-arch' options to the
1302227fc13Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
1312227fc13Smrgthis:
1322227fc13Smrg
1332227fc13Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1342227fc13Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1352227fc13Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
1362227fc13Smrg
1372227fc13Smrg   This is not guaranteed to produce working output in all cases, you
1382227fc13Smrgmay have to build one architecture at a time and combine the results
1392227fc13Smrgusing the `lipo' tool if you have problems.
1402227fc13Smrg
1412227fc13SmrgInstallation Names
1422227fc13Smrg==================
1432227fc13Smrg
1442227fc13Smrg   By default, `make install' installs the package's commands under
1452227fc13Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
1462227fc13Smrgcan specify an installation prefix other than `/usr/local' by giving
1477b5fefc8Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1487b5fefc8Smrgabsolute file name.
1492227fc13Smrg
1502227fc13Smrg   You can specify separate installation prefixes for
1512227fc13Smrgarchitecture-specific files and architecture-independent files.  If you
1522227fc13Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
1532227fc13SmrgPREFIX as the prefix for installing programs and libraries.
1542227fc13SmrgDocumentation and other data files still use the regular prefix.
1552227fc13Smrg
1562227fc13Smrg   In addition, if you use an unusual directory layout you can give
1572227fc13Smrgoptions like `--bindir=DIR' to specify different values for particular
1582227fc13Smrgkinds of files.  Run `configure --help' for a list of the directories
1597b5fefc8Smrgyou can set and what kinds of files go in them.  In general, the
1607b5fefc8Smrgdefault for these options is expressed in terms of `${prefix}', so that
1617b5fefc8Smrgspecifying just `--prefix' will affect all of the other directory
1627b5fefc8Smrgspecifications that were not explicitly provided.
1637b5fefc8Smrg
1647b5fefc8Smrg   The most portable way to affect installation locations is to pass the
1657b5fefc8Smrgcorrect locations to `configure'; however, many packages provide one or
1667b5fefc8Smrgboth of the following shortcuts of passing variable assignments to the
1677b5fefc8Smrg`make install' command line to change installation locations without
1687b5fefc8Smrghaving to reconfigure or recompile.
1697b5fefc8Smrg
1707b5fefc8Smrg   The first method involves providing an override variable for each
1717b5fefc8Smrgaffected directory.  For example, `make install
1727b5fefc8Smrgprefix=/alternate/directory' will choose an alternate location for all
1737b5fefc8Smrgdirectory configuration variables that were expressed in terms of
1747b5fefc8Smrg`${prefix}'.  Any directories that were specified during `configure',
1757b5fefc8Smrgbut not in terms of `${prefix}', must each be overridden at install
1767b5fefc8Smrgtime for the entire installation to be relocated.  The approach of
1777b5fefc8Smrgmakefile variable overrides for each directory variable is required by
1787b5fefc8Smrgthe GNU Coding Standards, and ideally causes no recompilation.
1797b5fefc8SmrgHowever, some platforms have known limitations with the semantics of
1807b5fefc8Smrgshared libraries that end up requiring recompilation when using this
1817b5fefc8Smrgmethod, particularly noticeable in packages that use GNU Libtool.
1827b5fefc8Smrg
1837b5fefc8Smrg   The second method involves providing the `DESTDIR' variable.  For
1847b5fefc8Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
1857b5fefc8Smrg`/alternate/directory' before all installation names.  The approach of
1867b5fefc8Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1877b5fefc8Smrgdoes not work on platforms that have drive letters.  On the other hand,
1887b5fefc8Smrgit does better at avoiding recompilation issues, and works well even
1897b5fefc8Smrgwhen some directory options were not specified in terms of `${prefix}'
1907b5fefc8Smrgat `configure' time.
1917b5fefc8Smrg
1927b5fefc8SmrgOptional Features
1937b5fefc8Smrg=================
1942227fc13Smrg
1952227fc13Smrg   If the package supports it, you can cause programs to be installed
1962227fc13Smrgwith an extra prefix or suffix on their names by giving `configure' the
1972227fc13Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1982227fc13Smrg
1992227fc13Smrg   Some packages pay attention to `--enable-FEATURE' options to
2002227fc13Smrg`configure', where FEATURE indicates an optional part of the package.
2012227fc13SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
2022227fc13Smrgis something like `gnu-as' or `x' (for the X Window System).  The
2032227fc13Smrg`README' should mention any `--enable-' and `--with-' options that the
2042227fc13Smrgpackage recognizes.
2052227fc13Smrg
2062227fc13Smrg   For packages that use the X Window System, `configure' can usually
2072227fc13Smrgfind the X include and library files automatically, but if it doesn't,
2082227fc13Smrgyou can use the `configure' options `--x-includes=DIR' and
2092227fc13Smrg`--x-libraries=DIR' to specify their locations.
2102227fc13Smrg
2117b5fefc8Smrg   Some packages offer the ability to configure how verbose the
2127b5fefc8Smrgexecution of `make' will be.  For these packages, running `./configure
2137b5fefc8Smrg--enable-silent-rules' sets the default to minimal output, which can be
2147b5fefc8Smrgoverridden with `make V=1'; while running `./configure
2157b5fefc8Smrg--disable-silent-rules' sets the default to verbose, which can be
2167b5fefc8Smrgoverridden with `make V=0'.
2177b5fefc8Smrg
2182227fc13SmrgParticular systems
2192227fc13Smrg==================
2202227fc13Smrg
2212227fc13Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
2222227fc13SmrgCC is not installed, it is recommended to use the following options in
2232227fc13Smrgorder to use an ANSI C compiler:
2242227fc13Smrg
2257b5fefc8Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
2262227fc13Smrg
2272227fc13Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
2282227fc13Smrg
2297b5fefc8Smrg   HP-UX `make' updates targets which have the same time stamps as
2307b5fefc8Smrgtheir prerequisites, which makes it generally unusable when shipped
2317b5fefc8Smrggenerated files such as `configure' are involved.  Use GNU `make'
2327b5fefc8Smrginstead.
2337b5fefc8Smrg
2342227fc13Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
2352227fc13Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
2362227fc13Smrga workaround.  If GNU CC is not installed, it is therefore recommended
2372227fc13Smrgto try
2382227fc13Smrg
2392227fc13Smrg     ./configure CC="cc"
2402227fc13Smrg
2412227fc13Smrgand if that doesn't work, try
2422227fc13Smrg
2432227fc13Smrg     ./configure CC="cc -nodtk"
2442227fc13Smrg
2457b5fefc8Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2467b5fefc8Smrgdirectory contains several dysfunctional programs; working variants of
2477b5fefc8Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2487b5fefc8Smrgin your `PATH', put it _after_ `/usr/bin'.
2497b5fefc8Smrg
2507b5fefc8Smrg   On Haiku, software installed for all users goes in `/boot/common',
2517b5fefc8Smrgnot `/usr/local'.  It is recommended to use the following options:
2527b5fefc8Smrg
2537b5fefc8Smrg     ./configure --prefix=/boot/common
2547b5fefc8Smrg
2552227fc13SmrgSpecifying the System Type
2562227fc13Smrg==========================
2572227fc13Smrg
2582227fc13Smrg   There may be some features `configure' cannot figure out
2592227fc13Smrgautomatically, but needs to determine by the type of machine the package
2602227fc13Smrgwill run on.  Usually, assuming the package is built to be run on the
2612227fc13Smrg_same_ architectures, `configure' can figure that out, but if it prints
2622227fc13Smrga message saying it cannot guess the machine type, give it the
2632227fc13Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
2642227fc13Smrgtype, such as `sun4', or a canonical name which has the form:
2652227fc13Smrg
2662227fc13Smrg     CPU-COMPANY-SYSTEM
2672227fc13Smrg
2682227fc13Smrgwhere SYSTEM can have one of these forms:
2692227fc13Smrg
2707b5fefc8Smrg     OS
2717b5fefc8Smrg     KERNEL-OS
2722227fc13Smrg
2732227fc13Smrg   See the file `config.sub' for the possible values of each field.  If
2742227fc13Smrg`config.sub' isn't included in this package, then this package doesn't
2752227fc13Smrgneed to know the machine type.
2762227fc13Smrg
2772227fc13Smrg   If you are _building_ compiler tools for cross-compiling, you should
2782227fc13Smrguse the option `--target=TYPE' to select the type of system they will
2792227fc13Smrgproduce code for.
2802227fc13Smrg
2812227fc13Smrg   If you want to _use_ a cross compiler, that generates code for a
2822227fc13Smrgplatform different from the build platform, you should specify the
2832227fc13Smrg"host" platform (i.e., that on which the generated programs will
2842227fc13Smrgeventually be run) with `--host=TYPE'.
2852227fc13Smrg
2862227fc13SmrgSharing Defaults
2872227fc13Smrg================
2882227fc13Smrg
2892227fc13Smrg   If you want to set default values for `configure' scripts to share,
2902227fc13Smrgyou can create a site shell script called `config.site' that gives
2912227fc13Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
2922227fc13Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2932227fc13Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2942227fc13Smrg`CONFIG_SITE' environment variable to the location of the site script.
2952227fc13SmrgA warning: not all `configure' scripts look for a site script.
2962227fc13Smrg
2972227fc13SmrgDefining Variables
2982227fc13Smrg==================
2992227fc13Smrg
3002227fc13Smrg   Variables not defined in a site shell script can be set in the
3012227fc13Smrgenvironment passed to `configure'.  However, some packages may run
3022227fc13Smrgconfigure again during the build, and the customized values of these
3032227fc13Smrgvariables may be lost.  In order to avoid this problem, you should set
3042227fc13Smrgthem in the `configure' command line, using `VAR=value'.  For example:
3052227fc13Smrg
3062227fc13Smrg     ./configure CC=/usr/local2/bin/gcc
3072227fc13Smrg
3082227fc13Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
3092227fc13Smrgoverridden in the site shell script).
3102227fc13Smrg
3112227fc13SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
3122227fc13Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
3132227fc13Smrg
3142227fc13Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
3152227fc13Smrg
3162227fc13Smrg`configure' Invocation
3172227fc13Smrg======================
3182227fc13Smrg
3192227fc13Smrg   `configure' recognizes the following options to control how it
3202227fc13Smrgoperates.
3212227fc13Smrg
3222227fc13Smrg`--help'
3232227fc13Smrg`-h'
3242227fc13Smrg     Print a summary of all of the options to `configure', and exit.
3252227fc13Smrg
3262227fc13Smrg`--help=short'
3272227fc13Smrg`--help=recursive'
3282227fc13Smrg     Print a summary of the options unique to this package's
3292227fc13Smrg     `configure', and exit.  The `short' variant lists options used
3302227fc13Smrg     only in the top level, while the `recursive' variant lists options
3312227fc13Smrg     also present in any nested packages.
3322227fc13Smrg
3332227fc13Smrg`--version'
3342227fc13Smrg`-V'
3352227fc13Smrg     Print the version of Autoconf used to generate the `configure'
3362227fc13Smrg     script, and exit.
3372227fc13Smrg
3382227fc13Smrg`--cache-file=FILE'
3392227fc13Smrg     Enable the cache: use and save the results of the tests in FILE,
3402227fc13Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
3412227fc13Smrg     disable caching.
3422227fc13Smrg
3432227fc13Smrg`--config-cache'
3442227fc13Smrg`-C'
3452227fc13Smrg     Alias for `--cache-file=config.cache'.
3462227fc13Smrg
3472227fc13Smrg`--quiet'
3482227fc13Smrg`--silent'
3492227fc13Smrg`-q'
3502227fc13Smrg     Do not print messages saying which checks are being made.  To
3512227fc13Smrg     suppress all normal output, redirect it to `/dev/null' (any error
3522227fc13Smrg     messages will still be shown).
3532227fc13Smrg
3542227fc13Smrg`--srcdir=DIR'
3552227fc13Smrg     Look for the package's source code in directory DIR.  Usually
3562227fc13Smrg     `configure' can determine that directory automatically.
3572227fc13Smrg
3582227fc13Smrg`--prefix=DIR'
3597b5fefc8Smrg     Use DIR as the installation prefix.  *note Installation Names::
3602227fc13Smrg     for more details, including other options available for fine-tuning
3612227fc13Smrg     the installation locations.
3622227fc13Smrg
3632227fc13Smrg`--no-create'
3642227fc13Smrg`-n'
3652227fc13Smrg     Run the configure checks, but stop before creating any output
3662227fc13Smrg     files.
3672227fc13Smrg
3682227fc13Smrg`configure' also accepts some other, not widely useful, options.  Run
3692227fc13Smrg`configure --help' for more details.
3702227fc13Smrg
371