INSTALL revision 7a5ec427
17d17d341SmrgInstallation Instructions
27d17d341Smrg*************************
37d17d341Smrg
47a5ec427SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
57a5ec427SmrgInc.
67d17d341Smrg
77a5ec427Smrg   Copying and distribution of this file, with or without modification,
87a5ec427Smrgare permitted in any medium without royalty provided the copyright
97a5ec427Smrgnotice and this notice are preserved.  This file is offered as-is,
107a5ec427Smrgwithout warranty of any kind.
117d17d341Smrg
127d17d341SmrgBasic Installation
137d17d341Smrg==================
147d17d341Smrg
157d17d341Smrg   Briefly, the shell commands `./configure; make; make install' should
167d17d341Smrgconfigure, build, and install this package.  The following
177d17d341Smrgmore-detailed instructions are generic; see the `README' file for
187a5ec427Smrginstructions specific to this package.  Some packages provide this
197a5ec427Smrg`INSTALL' file but do not implement all of the features documented
207a5ec427Smrgbelow.  The lack of an optional feature in a given package is not
217a5ec427Smrgnecessarily a bug.  More recommendations for GNU packages can be found
227a5ec427Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
237d17d341Smrg
247d17d341Smrg   The `configure' shell script attempts to guess correct values for
257d17d341Smrgvarious system-dependent variables used during compilation.  It uses
267d17d341Smrgthose values to create a `Makefile' in each directory of the package.
277d17d341SmrgIt may also create one or more `.h' files containing system-dependent
287d17d341Smrgdefinitions.  Finally, it creates a shell script `config.status' that
297d17d341Smrgyou can run in the future to recreate the current configuration, and a
307d17d341Smrgfile `config.log' containing compiler output (useful mainly for
317d17d341Smrgdebugging `configure').
327d17d341Smrg
337d17d341Smrg   It can also use an optional file (typically called `config.cache'
347d17d341Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
357d17d341Smrgthe results of its tests to speed up reconfiguring.  Caching is
367d17d341Smrgdisabled by default to prevent problems with accidental use of stale
377d17d341Smrgcache files.
387d17d341Smrg
397d17d341Smrg   If you need to do unusual things to compile the package, please try
407d17d341Smrgto figure out how `configure' could check whether to do them, and mail
417d17d341Smrgdiffs or instructions to the address given in the `README' so they can
427d17d341Smrgbe considered for the next release.  If you are using the cache, and at
437d17d341Smrgsome point `config.cache' contains results you don't want to keep, you
447d17d341Smrgmay remove or edit it.
457d17d341Smrg
467d17d341Smrg   The file `configure.ac' (or `configure.in') is used to create
477d17d341Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
487d17d341Smrgyou want to change it or regenerate `configure' using a newer version
497d17d341Smrgof `autoconf'.
507d17d341Smrg
517a5ec427Smrg   The simplest way to compile this package is:
527d17d341Smrg
537d17d341Smrg  1. `cd' to the directory containing the package's source code and type
547d17d341Smrg     `./configure' to configure the package for your system.
557d17d341Smrg
567d17d341Smrg     Running `configure' might take a while.  While running, it prints
577d17d341Smrg     some messages telling which features it is checking for.
587d17d341Smrg
597d17d341Smrg  2. Type `make' to compile the package.
607d17d341Smrg
617d17d341Smrg  3. Optionally, type `make check' to run any self-tests that come with
627a5ec427Smrg     the package, generally using the just-built uninstalled binaries.
637d17d341Smrg
647d17d341Smrg  4. Type `make install' to install the programs and any data files and
657a5ec427Smrg     documentation.  When installing into a prefix owned by root, it is
667a5ec427Smrg     recommended that the package be configured and built as a regular
677a5ec427Smrg     user, and only the `make install' phase executed with root
687a5ec427Smrg     privileges.
697a5ec427Smrg
707a5ec427Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
717a5ec427Smrg     this time using the binaries in their final installed location.
727a5ec427Smrg     This target does not install anything.  Running this target as a
737a5ec427Smrg     regular user, particularly if the prior `make install' required
747a5ec427Smrg     root privileges, verifies that the installation completed
757a5ec427Smrg     correctly.
767a5ec427Smrg
777a5ec427Smrg  6. You can remove the program binaries and object files from the
787d17d341Smrg     source code directory by typing `make clean'.  To also remove the
797d17d341Smrg     files that `configure' created (so you can compile the package for
807d17d341Smrg     a different kind of computer), type `make distclean'.  There is
817d17d341Smrg     also a `make maintainer-clean' target, but that is intended mainly
827d17d341Smrg     for the package's developers.  If you use it, you may have to get
837d17d341Smrg     all sorts of other programs in order to regenerate files that came
847d17d341Smrg     with the distribution.
857d17d341Smrg
867a5ec427Smrg  7. Often, you can also type `make uninstall' to remove the installed
877a5ec427Smrg     files again.  In practice, not all packages have tested that
887a5ec427Smrg     uninstallation works correctly, even though it is required by the
897a5ec427Smrg     GNU Coding Standards.
907a5ec427Smrg
917a5ec427Smrg  8. Some packages, particularly those that use Automake, provide `make
927a5ec427Smrg     distcheck', which can by used by developers to test that all other
937a5ec427Smrg     targets like `make install' and `make uninstall' work correctly.
947a5ec427Smrg     This target is generally not run by end users.
957d17d341Smrg
967d17d341SmrgCompilers and Options
977d17d341Smrg=====================
987d17d341Smrg
997d17d341Smrg   Some systems require unusual options for compilation or linking that
1007d17d341Smrgthe `configure' script does not know about.  Run `./configure --help'
1017d17d341Smrgfor details on some of the pertinent environment variables.
1027d17d341Smrg
1037d17d341Smrg   You can give `configure' initial values for configuration parameters
1047d17d341Smrgby setting variables in the command line or in the environment.  Here
1057d17d341Smrgis an example:
1067d17d341Smrg
1077d17d341Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
1087d17d341Smrg
1097d17d341Smrg   *Note Defining Variables::, for more details.
1107d17d341Smrg
1117d17d341SmrgCompiling For Multiple Architectures
1127d17d341Smrg====================================
1137d17d341Smrg
1147d17d341Smrg   You can compile the package for more than one kind of computer at the
1157d17d341Smrgsame time, by placing the object files for each architecture in their
1167d17d341Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
1177d17d341Smrgdirectory where you want the object files and executables to go and run
1187d17d341Smrgthe `configure' script.  `configure' automatically checks for the
1197a5ec427Smrgsource code in the directory that `configure' is in and in `..'.  This
1207a5ec427Smrgis known as a "VPATH" build.
1217d17d341Smrg
1227d17d341Smrg   With a non-GNU `make', it is safer to compile the package for one
1237d17d341Smrgarchitecture at a time in the source code directory.  After you have
1247d17d341Smrginstalled the package for one architecture, use `make distclean' before
1257d17d341Smrgreconfiguring for another architecture.
1267d17d341Smrg
1277d17d341Smrg   On MacOS X 10.5 and later systems, you can create libraries and
1287d17d341Smrgexecutables that work on multiple system types--known as "fat" or
1297d17d341Smrg"universal" binaries--by specifying multiple `-arch' options to the
1307d17d341Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
1317d17d341Smrgthis:
1327d17d341Smrg
1337d17d341Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1347d17d341Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1357d17d341Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
1367d17d341Smrg
1377d17d341Smrg   This is not guaranteed to produce working output in all cases, you
1387d17d341Smrgmay have to build one architecture at a time and combine the results
1397d17d341Smrgusing the `lipo' tool if you have problems.
1407d17d341Smrg
1417d17d341SmrgInstallation Names
1427d17d341Smrg==================
1437d17d341Smrg
1447d17d341Smrg   By default, `make install' installs the package's commands under
1457d17d341Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
1467d17d341Smrgcan specify an installation prefix other than `/usr/local' by giving
1477a5ec427Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
1487a5ec427Smrgabsolute file name.
1497d17d341Smrg
1507d17d341Smrg   You can specify separate installation prefixes for
1517d17d341Smrgarchitecture-specific files and architecture-independent files.  If you
1527d17d341Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
1537d17d341SmrgPREFIX as the prefix for installing programs and libraries.
1547d17d341SmrgDocumentation and other data files still use the regular prefix.
1557d17d341Smrg
1567d17d341Smrg   In addition, if you use an unusual directory layout you can give
1577d17d341Smrgoptions like `--bindir=DIR' to specify different values for particular
1587d17d341Smrgkinds of files.  Run `configure --help' for a list of the directories
1597a5ec427Smrgyou can set and what kinds of files go in them.  In general, the
1607a5ec427Smrgdefault for these options is expressed in terms of `${prefix}', so that
1617a5ec427Smrgspecifying just `--prefix' will affect all of the other directory
1627a5ec427Smrgspecifications that were not explicitly provided.
1637a5ec427Smrg
1647a5ec427Smrg   The most portable way to affect installation locations is to pass the
1657a5ec427Smrgcorrect locations to `configure'; however, many packages provide one or
1667a5ec427Smrgboth of the following shortcuts of passing variable assignments to the
1677a5ec427Smrg`make install' command line to change installation locations without
1687a5ec427Smrghaving to reconfigure or recompile.
1697a5ec427Smrg
1707a5ec427Smrg   The first method involves providing an override variable for each
1717a5ec427Smrgaffected directory.  For example, `make install
1727a5ec427Smrgprefix=/alternate/directory' will choose an alternate location for all
1737a5ec427Smrgdirectory configuration variables that were expressed in terms of
1747a5ec427Smrg`${prefix}'.  Any directories that were specified during `configure',
1757a5ec427Smrgbut not in terms of `${prefix}', must each be overridden at install
1767a5ec427Smrgtime for the entire installation to be relocated.  The approach of
1777a5ec427Smrgmakefile variable overrides for each directory variable is required by
1787a5ec427Smrgthe GNU Coding Standards, and ideally causes no recompilation.
1797a5ec427SmrgHowever, some platforms have known limitations with the semantics of
1807a5ec427Smrgshared libraries that end up requiring recompilation when using this
1817a5ec427Smrgmethod, particularly noticeable in packages that use GNU Libtool.
1827a5ec427Smrg
1837a5ec427Smrg   The second method involves providing the `DESTDIR' variable.  For
1847a5ec427Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
1857a5ec427Smrg`/alternate/directory' before all installation names.  The approach of
1867a5ec427Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
1877a5ec427Smrgdoes not work on platforms that have drive letters.  On the other hand,
1887a5ec427Smrgit does better at avoiding recompilation issues, and works well even
1897a5ec427Smrgwhen some directory options were not specified in terms of `${prefix}'
1907a5ec427Smrgat `configure' time.
1917a5ec427Smrg
1927a5ec427SmrgOptional Features
1937a5ec427Smrg=================
1947d17d341Smrg
1957d17d341Smrg   If the package supports it, you can cause programs to be installed
1967d17d341Smrgwith an extra prefix or suffix on their names by giving `configure' the
1977d17d341Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1987d17d341Smrg
1997d17d341Smrg   Some packages pay attention to `--enable-FEATURE' options to
2007d17d341Smrg`configure', where FEATURE indicates an optional part of the package.
2017d17d341SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
2027d17d341Smrgis something like `gnu-as' or `x' (for the X Window System).  The
2037d17d341Smrg`README' should mention any `--enable-' and `--with-' options that the
2047d17d341Smrgpackage recognizes.
2057d17d341Smrg
2067d17d341Smrg   For packages that use the X Window System, `configure' can usually
2077d17d341Smrgfind the X include and library files automatically, but if it doesn't,
2087d17d341Smrgyou can use the `configure' options `--x-includes=DIR' and
2097d17d341Smrg`--x-libraries=DIR' to specify their locations.
2107d17d341Smrg
2117a5ec427Smrg   Some packages offer the ability to configure how verbose the
2127a5ec427Smrgexecution of `make' will be.  For these packages, running `./configure
2137a5ec427Smrg--enable-silent-rules' sets the default to minimal output, which can be
2147a5ec427Smrgoverridden with `make V=1'; while running `./configure
2157a5ec427Smrg--disable-silent-rules' sets the default to verbose, which can be
2167a5ec427Smrgoverridden with `make V=0'.
2177a5ec427Smrg
2187d17d341SmrgParticular systems
2197d17d341Smrg==================
2207d17d341Smrg
2217d17d341Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
2227d17d341SmrgCC is not installed, it is recommended to use the following options in
2237d17d341Smrgorder to use an ANSI C compiler:
2247d17d341Smrg
2257a5ec427Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
2267d17d341Smrg
2277d17d341Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
2287d17d341Smrg
2297a5ec427Smrg   HP-UX `make' updates targets which have the same time stamps as
2307a5ec427Smrgtheir prerequisites, which makes it generally unusable when shipped
2317a5ec427Smrggenerated files such as `configure' are involved.  Use GNU `make'
2327a5ec427Smrginstead.
2337a5ec427Smrg
2347d17d341Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
2357d17d341Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
2367d17d341Smrga workaround.  If GNU CC is not installed, it is therefore recommended
2377d17d341Smrgto try
2387d17d341Smrg
2397d17d341Smrg     ./configure CC="cc"
2407d17d341Smrg
2417d17d341Smrgand if that doesn't work, try
2427d17d341Smrg
2437d17d341Smrg     ./configure CC="cc -nodtk"
2447d17d341Smrg
2457a5ec427Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
2467a5ec427Smrgdirectory contains several dysfunctional programs; working variants of
2477a5ec427Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
2487a5ec427Smrgin your `PATH', put it _after_ `/usr/bin'.
2497a5ec427Smrg
2507a5ec427Smrg   On Haiku, software installed for all users goes in `/boot/common',
2517a5ec427Smrgnot `/usr/local'.  It is recommended to use the following options:
2527a5ec427Smrg
2537a5ec427Smrg     ./configure --prefix=/boot/common
2547a5ec427Smrg
2557d17d341SmrgSpecifying the System Type
2567d17d341Smrg==========================
2577d17d341Smrg
2587d17d341Smrg   There may be some features `configure' cannot figure out
2597d17d341Smrgautomatically, but needs to determine by the type of machine the package
2607d17d341Smrgwill run on.  Usually, assuming the package is built to be run on the
2617d17d341Smrg_same_ architectures, `configure' can figure that out, but if it prints
2627d17d341Smrga message saying it cannot guess the machine type, give it the
2637d17d341Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
2647d17d341Smrgtype, such as `sun4', or a canonical name which has the form:
2657d17d341Smrg
2667d17d341Smrg     CPU-COMPANY-SYSTEM
2677d17d341Smrg
2687d17d341Smrgwhere SYSTEM can have one of these forms:
2697d17d341Smrg
2707a5ec427Smrg     OS
2717a5ec427Smrg     KERNEL-OS
2727d17d341Smrg
2737d17d341Smrg   See the file `config.sub' for the possible values of each field.  If
2747d17d341Smrg`config.sub' isn't included in this package, then this package doesn't
2757d17d341Smrgneed to know the machine type.
2767d17d341Smrg
2777d17d341Smrg   If you are _building_ compiler tools for cross-compiling, you should
2787d17d341Smrguse the option `--target=TYPE' to select the type of system they will
2797d17d341Smrgproduce code for.
2807d17d341Smrg
2817d17d341Smrg   If you want to _use_ a cross compiler, that generates code for a
2827d17d341Smrgplatform different from the build platform, you should specify the
2837d17d341Smrg"host" platform (i.e., that on which the generated programs will
2847d17d341Smrgeventually be run) with `--host=TYPE'.
2857d17d341Smrg
2867d17d341SmrgSharing Defaults
2877d17d341Smrg================
2887d17d341Smrg
2897d17d341Smrg   If you want to set default values for `configure' scripts to share,
2907d17d341Smrgyou can create a site shell script called `config.site' that gives
2917d17d341Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
2927d17d341Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2937d17d341Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2947d17d341Smrg`CONFIG_SITE' environment variable to the location of the site script.
2957d17d341SmrgA warning: not all `configure' scripts look for a site script.
2967d17d341Smrg
2977d17d341SmrgDefining Variables
2987d17d341Smrg==================
2997d17d341Smrg
3007d17d341Smrg   Variables not defined in a site shell script can be set in the
3017d17d341Smrgenvironment passed to `configure'.  However, some packages may run
3027d17d341Smrgconfigure again during the build, and the customized values of these
3037d17d341Smrgvariables may be lost.  In order to avoid this problem, you should set
3047d17d341Smrgthem in the `configure' command line, using `VAR=value'.  For example:
3057d17d341Smrg
3067d17d341Smrg     ./configure CC=/usr/local2/bin/gcc
3077d17d341Smrg
3087d17d341Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
3097d17d341Smrgoverridden in the site shell script).
3107d17d341Smrg
3117d17d341SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
3127d17d341Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
3137d17d341Smrg
3147d17d341Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
3157d17d341Smrg
3167d17d341Smrg`configure' Invocation
3177d17d341Smrg======================
3187d17d341Smrg
3197d17d341Smrg   `configure' recognizes the following options to control how it
3207d17d341Smrgoperates.
3217d17d341Smrg
3227d17d341Smrg`--help'
3237d17d341Smrg`-h'
3247d17d341Smrg     Print a summary of all of the options to `configure', and exit.
3257d17d341Smrg
3267d17d341Smrg`--help=short'
3277d17d341Smrg`--help=recursive'
3287d17d341Smrg     Print a summary of the options unique to this package's
3297d17d341Smrg     `configure', and exit.  The `short' variant lists options used
3307d17d341Smrg     only in the top level, while the `recursive' variant lists options
3317d17d341Smrg     also present in any nested packages.
3327d17d341Smrg
3337d17d341Smrg`--version'
3347d17d341Smrg`-V'
3357d17d341Smrg     Print the version of Autoconf used to generate the `configure'
3367d17d341Smrg     script, and exit.
3377d17d341Smrg
3387d17d341Smrg`--cache-file=FILE'
3397d17d341Smrg     Enable the cache: use and save the results of the tests in FILE,
3407d17d341Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
3417d17d341Smrg     disable caching.
3427d17d341Smrg
3437d17d341Smrg`--config-cache'
3447d17d341Smrg`-C'
3457d17d341Smrg     Alias for `--cache-file=config.cache'.
3467d17d341Smrg
3477d17d341Smrg`--quiet'
3487d17d341Smrg`--silent'
3497d17d341Smrg`-q'
3507d17d341Smrg     Do not print messages saying which checks are being made.  To
3517d17d341Smrg     suppress all normal output, redirect it to `/dev/null' (any error
3527d17d341Smrg     messages will still be shown).
3537d17d341Smrg
3547d17d341Smrg`--srcdir=DIR'
3557d17d341Smrg     Look for the package's source code in directory DIR.  Usually
3567d17d341Smrg     `configure' can determine that directory automatically.
3577d17d341Smrg
3587d17d341Smrg`--prefix=DIR'
3597a5ec427Smrg     Use DIR as the installation prefix.  *note Installation Names::
3607d17d341Smrg     for more details, including other options available for fine-tuning
3617d17d341Smrg     the installation locations.
3627d17d341Smrg
3637d17d341Smrg`--no-create'
3647d17d341Smrg`-n'
3657d17d341Smrg     Run the configure checks, but stop before creating any output
3667d17d341Smrg     files.
3677d17d341Smrg
3687d17d341Smrg`configure' also accepts some other, not widely useful, options.  Run
3697d17d341Smrg`configure --help' for more details.
3707d17d341Smrg
371