11fb744b4SmrgInstallation Instructions
21fb744b4Smrg*************************
31fb744b4Smrg
414210e8eSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
514210e8eSmrgInc.
61fb744b4Smrg
714210e8eSmrg   Copying and distribution of this file, with or without modification,
814210e8eSmrgare permitted in any medium without royalty provided the copyright
914210e8eSmrgnotice and this notice are preserved.  This file is offered as-is,
1014210e8eSmrgwithout warranty of any kind.
111fb744b4Smrg
121fb744b4SmrgBasic Installation
131fb744b4Smrg==================
141fb744b4Smrg
151fb744b4Smrg   Briefly, the shell commands `./configure; make; make install' should
161fb744b4Smrgconfigure, build, and install this package.  The following
171fb744b4Smrgmore-detailed instructions are generic; see the `README' file for
1814210e8eSmrginstructions specific to this package.  Some packages provide this
1914210e8eSmrg`INSTALL' file but do not implement all of the features documented
2014210e8eSmrgbelow.  The lack of an optional feature in a given package is not
2114210e8eSmrgnecessarily a bug.  More recommendations for GNU packages can be found
2214210e8eSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
231fb744b4Smrg
241fb744b4Smrg   The `configure' shell script attempts to guess correct values for
251fb744b4Smrgvarious system-dependent variables used during compilation.  It uses
261fb744b4Smrgthose values to create a `Makefile' in each directory of the package.
271fb744b4SmrgIt may also create one or more `.h' files containing system-dependent
281fb744b4Smrgdefinitions.  Finally, it creates a shell script `config.status' that
291fb744b4Smrgyou can run in the future to recreate the current configuration, and a
301fb744b4Smrgfile `config.log' containing compiler output (useful mainly for
311fb744b4Smrgdebugging `configure').
321fb744b4Smrg
331fb744b4Smrg   It can also use an optional file (typically called `config.cache'
341fb744b4Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
351fb744b4Smrgthe results of its tests to speed up reconfiguring.  Caching is
361fb744b4Smrgdisabled by default to prevent problems with accidental use of stale
371fb744b4Smrgcache files.
381fb744b4Smrg
391fb744b4Smrg   If you need to do unusual things to compile the package, please try
401fb744b4Smrgto figure out how `configure' could check whether to do them, and mail
411fb744b4Smrgdiffs or instructions to the address given in the `README' so they can
421fb744b4Smrgbe considered for the next release.  If you are using the cache, and at
431fb744b4Smrgsome point `config.cache' contains results you don't want to keep, you
441fb744b4Smrgmay remove or edit it.
451fb744b4Smrg
461fb744b4Smrg   The file `configure.ac' (or `configure.in') is used to create
471fb744b4Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
481fb744b4Smrgyou want to change it or regenerate `configure' using a newer version
491fb744b4Smrgof `autoconf'.
501fb744b4Smrg
5114210e8eSmrg   The simplest way to compile this package is:
521fb744b4Smrg
531fb744b4Smrg  1. `cd' to the directory containing the package's source code and type
541fb744b4Smrg     `./configure' to configure the package for your system.
551fb744b4Smrg
561fb744b4Smrg     Running `configure' might take a while.  While running, it prints
571fb744b4Smrg     some messages telling which features it is checking for.
581fb744b4Smrg
591fb744b4Smrg  2. Type `make' to compile the package.
601fb744b4Smrg
611fb744b4Smrg  3. Optionally, type `make check' to run any self-tests that come with
6214210e8eSmrg     the package, generally using the just-built uninstalled binaries.
631fb744b4Smrg
641fb744b4Smrg  4. Type `make install' to install the programs and any data files and
6514210e8eSmrg     documentation.  When installing into a prefix owned by root, it is
6614210e8eSmrg     recommended that the package be configured and built as a regular
6714210e8eSmrg     user, and only the `make install' phase executed with root
6814210e8eSmrg     privileges.
6914210e8eSmrg
7014210e8eSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7114210e8eSmrg     this time using the binaries in their final installed location.
7214210e8eSmrg     This target does not install anything.  Running this target as a
7314210e8eSmrg     regular user, particularly if the prior `make install' required
7414210e8eSmrg     root privileges, verifies that the installation completed
7514210e8eSmrg     correctly.
7614210e8eSmrg
7714210e8eSmrg  6. You can remove the program binaries and object files from the
781fb744b4Smrg     source code directory by typing `make clean'.  To also remove the
791fb744b4Smrg     files that `configure' created (so you can compile the package for
801fb744b4Smrg     a different kind of computer), type `make distclean'.  There is
811fb744b4Smrg     also a `make maintainer-clean' target, but that is intended mainly
821fb744b4Smrg     for the package's developers.  If you use it, you may have to get
831fb744b4Smrg     all sorts of other programs in order to regenerate files that came
841fb744b4Smrg     with the distribution.
851fb744b4Smrg
8614210e8eSmrg  7. Often, you can also type `make uninstall' to remove the installed
8714210e8eSmrg     files again.  In practice, not all packages have tested that
8814210e8eSmrg     uninstallation works correctly, even though it is required by the
8914210e8eSmrg     GNU Coding Standards.
9014210e8eSmrg
9114210e8eSmrg  8. Some packages, particularly those that use Automake, provide `make
9214210e8eSmrg     distcheck', which can by used by developers to test that all other
9314210e8eSmrg     targets like `make install' and `make uninstall' work correctly.
9414210e8eSmrg     This target is generally not run by end users.
951fb744b4Smrg
961fb744b4SmrgCompilers and Options
971fb744b4Smrg=====================
981fb744b4Smrg
991fb744b4Smrg   Some systems require unusual options for compilation or linking that
1001fb744b4Smrgthe `configure' script does not know about.  Run `./configure --help'
1011fb744b4Smrgfor details on some of the pertinent environment variables.
1021fb744b4Smrg
1031fb744b4Smrg   You can give `configure' initial values for configuration parameters
1041fb744b4Smrgby setting variables in the command line or in the environment.  Here
1051fb744b4Smrgis an example:
1061fb744b4Smrg
1071fb744b4Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
1081fb744b4Smrg
1091fb744b4Smrg   *Note Defining Variables::, for more details.
1101fb744b4Smrg
1111fb744b4SmrgCompiling For Multiple Architectures
1121fb744b4Smrg====================================
1131fb744b4Smrg
1141fb744b4Smrg   You can compile the package for more than one kind of computer at the
1151fb744b4Smrgsame time, by placing the object files for each architecture in their
1161fb744b4Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
1171fb744b4Smrgdirectory where you want the object files and executables to go and run
1181fb744b4Smrgthe `configure' script.  `configure' automatically checks for the
11914210e8eSmrgsource code in the directory that `configure' is in and in `..'.  This
12014210e8eSmrgis known as a "VPATH" build.
1211fb744b4Smrg
1221fb744b4Smrg   With a non-GNU `make', it is safer to compile the package for one
1231fb744b4Smrgarchitecture at a time in the source code directory.  After you have
1241fb744b4Smrginstalled the package for one architecture, use `make distclean' before
1251fb744b4Smrgreconfiguring for another architecture.
1261fb744b4Smrg
1271fb744b4Smrg   On MacOS X 10.5 and later systems, you can create libraries and
1281fb744b4Smrgexecutables that work on multiple system types--known as "fat" or
1291fb744b4Smrg"universal" binaries--by specifying multiple `-arch' options to the
1301fb744b4Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
1311fb744b4Smrgthis:
1321fb744b4Smrg
1331fb744b4Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1341fb744b4Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1351fb744b4Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
1361fb744b4Smrg
1371fb744b4Smrg   This is not guaranteed to produce working output in all cases, you
1381fb744b4Smrgmay have to build one architecture at a time and combine the results
1391fb744b4Smrgusing the `lipo' tool if you have problems.
1401fb744b4Smrg
1411fb744b4SmrgInstallation Names
1421fb744b4Smrg==================
1431fb744b4Smrg
1441fb744b4Smrg   By default, `make install' installs the package's commands under
1451fb744b4Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
1461fb744b4Smrgcan specify an installation prefix other than `/usr/local' by giving
14714210e8eSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14814210e8eSmrgabsolute file name.
1491fb744b4Smrg
1501fb744b4Smrg   You can specify separate installation prefixes for
1511fb744b4Smrgarchitecture-specific files and architecture-independent files.  If you
1521fb744b4Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
1531fb744b4SmrgPREFIX as the prefix for installing programs and libraries.
1541fb744b4SmrgDocumentation and other data files still use the regular prefix.
1551fb744b4Smrg
1561fb744b4Smrg   In addition, if you use an unusual directory layout you can give
1571fb744b4Smrgoptions like `--bindir=DIR' to specify different values for particular
1581fb744b4Smrgkinds of files.  Run `configure --help' for a list of the directories
15914210e8eSmrgyou can set and what kinds of files go in them.  In general, the
16014210e8eSmrgdefault for these options is expressed in terms of `${prefix}', so that
16114210e8eSmrgspecifying just `--prefix' will affect all of the other directory
16214210e8eSmrgspecifications that were not explicitly provided.
16314210e8eSmrg
16414210e8eSmrg   The most portable way to affect installation locations is to pass the
16514210e8eSmrgcorrect locations to `configure'; however, many packages provide one or
16614210e8eSmrgboth of the following shortcuts of passing variable assignments to the
16714210e8eSmrg`make install' command line to change installation locations without
16814210e8eSmrghaving to reconfigure or recompile.
16914210e8eSmrg
17014210e8eSmrg   The first method involves providing an override variable for each
17114210e8eSmrgaffected directory.  For example, `make install
17214210e8eSmrgprefix=/alternate/directory' will choose an alternate location for all
17314210e8eSmrgdirectory configuration variables that were expressed in terms of
17414210e8eSmrg`${prefix}'.  Any directories that were specified during `configure',
17514210e8eSmrgbut not in terms of `${prefix}', must each be overridden at install
17614210e8eSmrgtime for the entire installation to be relocated.  The approach of
17714210e8eSmrgmakefile variable overrides for each directory variable is required by
17814210e8eSmrgthe GNU Coding Standards, and ideally causes no recompilation.
17914210e8eSmrgHowever, some platforms have known limitations with the semantics of
18014210e8eSmrgshared libraries that end up requiring recompilation when using this
18114210e8eSmrgmethod, particularly noticeable in packages that use GNU Libtool.
18214210e8eSmrg
18314210e8eSmrg   The second method involves providing the `DESTDIR' variable.  For
18414210e8eSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
18514210e8eSmrg`/alternate/directory' before all installation names.  The approach of
18614210e8eSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18714210e8eSmrgdoes not work on platforms that have drive letters.  On the other hand,
18814210e8eSmrgit does better at avoiding recompilation issues, and works well even
18914210e8eSmrgwhen some directory options were not specified in terms of `${prefix}'
19014210e8eSmrgat `configure' time.
19114210e8eSmrg
19214210e8eSmrgOptional Features
19314210e8eSmrg=================
1941fb744b4Smrg
1951fb744b4Smrg   If the package supports it, you can cause programs to be installed
1961fb744b4Smrgwith an extra prefix or suffix on their names by giving `configure' the
1971fb744b4Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1981fb744b4Smrg
1991fb744b4Smrg   Some packages pay attention to `--enable-FEATURE' options to
2001fb744b4Smrg`configure', where FEATURE indicates an optional part of the package.
2011fb744b4SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
2021fb744b4Smrgis something like `gnu-as' or `x' (for the X Window System).  The
2031fb744b4Smrg`README' should mention any `--enable-' and `--with-' options that the
2041fb744b4Smrgpackage recognizes.
2051fb744b4Smrg
2061fb744b4Smrg   For packages that use the X Window System, `configure' can usually
2071fb744b4Smrgfind the X include and library files automatically, but if it doesn't,
2081fb744b4Smrgyou can use the `configure' options `--x-includes=DIR' and
2091fb744b4Smrg`--x-libraries=DIR' to specify their locations.
2101fb744b4Smrg
21114210e8eSmrg   Some packages offer the ability to configure how verbose the
21214210e8eSmrgexecution of `make' will be.  For these packages, running `./configure
21314210e8eSmrg--enable-silent-rules' sets the default to minimal output, which can be
21414210e8eSmrgoverridden with `make V=1'; while running `./configure
21514210e8eSmrg--disable-silent-rules' sets the default to verbose, which can be
21614210e8eSmrgoverridden with `make V=0'.
21714210e8eSmrg
2181fb744b4SmrgParticular systems
2191fb744b4Smrg==================
2201fb744b4Smrg
2211fb744b4Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
2221fb744b4SmrgCC is not installed, it is recommended to use the following options in
2231fb744b4Smrgorder to use an ANSI C compiler:
2241fb744b4Smrg
22514210e8eSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
2261fb744b4Smrg
2271fb744b4Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
2281fb744b4Smrg
22914210e8eSmrg   HP-UX `make' updates targets which have the same time stamps as
23014210e8eSmrgtheir prerequisites, which makes it generally unusable when shipped
23114210e8eSmrggenerated files such as `configure' are involved.  Use GNU `make'
23214210e8eSmrginstead.
23314210e8eSmrg
2341fb744b4Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
2351fb744b4Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
2361fb744b4Smrga workaround.  If GNU CC is not installed, it is therefore recommended
2371fb744b4Smrgto try
2381fb744b4Smrg
2391fb744b4Smrg     ./configure CC="cc"
2401fb744b4Smrg
2411fb744b4Smrgand if that doesn't work, try
2421fb744b4Smrg
2431fb744b4Smrg     ./configure CC="cc -nodtk"
2441fb744b4Smrg
24514210e8eSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24614210e8eSmrgdirectory contains several dysfunctional programs; working variants of
24714210e8eSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24814210e8eSmrgin your `PATH', put it _after_ `/usr/bin'.
24914210e8eSmrg
25014210e8eSmrg   On Haiku, software installed for all users goes in `/boot/common',
25114210e8eSmrgnot `/usr/local'.  It is recommended to use the following options:
25214210e8eSmrg
25314210e8eSmrg     ./configure --prefix=/boot/common
25414210e8eSmrg
2551fb744b4SmrgSpecifying the System Type
2561fb744b4Smrg==========================
2571fb744b4Smrg
2581fb744b4Smrg   There may be some features `configure' cannot figure out
2591fb744b4Smrgautomatically, but needs to determine by the type of machine the package
2601fb744b4Smrgwill run on.  Usually, assuming the package is built to be run on the
2611fb744b4Smrg_same_ architectures, `configure' can figure that out, but if it prints
2621fb744b4Smrga message saying it cannot guess the machine type, give it the
2631fb744b4Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
2641fb744b4Smrgtype, such as `sun4', or a canonical name which has the form:
2651fb744b4Smrg
2661fb744b4Smrg     CPU-COMPANY-SYSTEM
2671fb744b4Smrg
2681fb744b4Smrgwhere SYSTEM can have one of these forms:
2691fb744b4Smrg
27014210e8eSmrg     OS
27114210e8eSmrg     KERNEL-OS
2721fb744b4Smrg
2731fb744b4Smrg   See the file `config.sub' for the possible values of each field.  If
2741fb744b4Smrg`config.sub' isn't included in this package, then this package doesn't
2751fb744b4Smrgneed to know the machine type.
2761fb744b4Smrg
2771fb744b4Smrg   If you are _building_ compiler tools for cross-compiling, you should
2781fb744b4Smrguse the option `--target=TYPE' to select the type of system they will
2791fb744b4Smrgproduce code for.
2801fb744b4Smrg
2811fb744b4Smrg   If you want to _use_ a cross compiler, that generates code for a
2821fb744b4Smrgplatform different from the build platform, you should specify the
2831fb744b4Smrg"host" platform (i.e., that on which the generated programs will
2841fb744b4Smrgeventually be run) with `--host=TYPE'.
2851fb744b4Smrg
2861fb744b4SmrgSharing Defaults
2871fb744b4Smrg================
2881fb744b4Smrg
2891fb744b4Smrg   If you want to set default values for `configure' scripts to share,
2901fb744b4Smrgyou can create a site shell script called `config.site' that gives
2911fb744b4Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
2921fb744b4Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2931fb744b4Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2941fb744b4Smrg`CONFIG_SITE' environment variable to the location of the site script.
2951fb744b4SmrgA warning: not all `configure' scripts look for a site script.
2961fb744b4Smrg
2971fb744b4SmrgDefining Variables
2981fb744b4Smrg==================
2991fb744b4Smrg
3001fb744b4Smrg   Variables not defined in a site shell script can be set in the
3011fb744b4Smrgenvironment passed to `configure'.  However, some packages may run
3021fb744b4Smrgconfigure again during the build, and the customized values of these
3031fb744b4Smrgvariables may be lost.  In order to avoid this problem, you should set
3041fb744b4Smrgthem in the `configure' command line, using `VAR=value'.  For example:
3051fb744b4Smrg
3061fb744b4Smrg     ./configure CC=/usr/local2/bin/gcc
3071fb744b4Smrg
3081fb744b4Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
3091fb744b4Smrgoverridden in the site shell script).
3101fb744b4Smrg
3111fb744b4SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
3121fb744b4Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
3131fb744b4Smrg
3141fb744b4Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
3151fb744b4Smrg
3161fb744b4Smrg`configure' Invocation
3171fb744b4Smrg======================
3181fb744b4Smrg
3191fb744b4Smrg   `configure' recognizes the following options to control how it
3201fb744b4Smrgoperates.
3211fb744b4Smrg
3221fb744b4Smrg`--help'
3231fb744b4Smrg`-h'
3241fb744b4Smrg     Print a summary of all of the options to `configure', and exit.
3251fb744b4Smrg
3261fb744b4Smrg`--help=short'
3271fb744b4Smrg`--help=recursive'
3281fb744b4Smrg     Print a summary of the options unique to this package's
3291fb744b4Smrg     `configure', and exit.  The `short' variant lists options used
3301fb744b4Smrg     only in the top level, while the `recursive' variant lists options
3311fb744b4Smrg     also present in any nested packages.
3321fb744b4Smrg
3331fb744b4Smrg`--version'
3341fb744b4Smrg`-V'
3351fb744b4Smrg     Print the version of Autoconf used to generate the `configure'
3361fb744b4Smrg     script, and exit.
3371fb744b4Smrg
3381fb744b4Smrg`--cache-file=FILE'
3391fb744b4Smrg     Enable the cache: use and save the results of the tests in FILE,
3401fb744b4Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
3411fb744b4Smrg     disable caching.
3421fb744b4Smrg
3431fb744b4Smrg`--config-cache'
3441fb744b4Smrg`-C'
3451fb744b4Smrg     Alias for `--cache-file=config.cache'.
3461fb744b4Smrg
3471fb744b4Smrg`--quiet'
3481fb744b4Smrg`--silent'
3491fb744b4Smrg`-q'
3501fb744b4Smrg     Do not print messages saying which checks are being made.  To
3511fb744b4Smrg     suppress all normal output, redirect it to `/dev/null' (any error
3521fb744b4Smrg     messages will still be shown).
3531fb744b4Smrg
3541fb744b4Smrg`--srcdir=DIR'
3551fb744b4Smrg     Look for the package's source code in directory DIR.  Usually
3561fb744b4Smrg     `configure' can determine that directory automatically.
3571fb744b4Smrg
3581fb744b4Smrg`--prefix=DIR'
35914210e8eSmrg     Use DIR as the installation prefix.  *note Installation Names::
3601fb744b4Smrg     for more details, including other options available for fine-tuning
3611fb744b4Smrg     the installation locations.
3621fb744b4Smrg
3631fb744b4Smrg`--no-create'
3641fb744b4Smrg`-n'
3651fb744b4Smrg     Run the configure checks, but stop before creating any output
3661fb744b4Smrg     files.
3671fb744b4Smrg
3681fb744b4Smrg`configure' also accepts some other, not widely useful, options.  Run
3691fb744b4Smrg`configure --help' for more details.
3701fb744b4Smrg
371