19acbb460SmrgInstallation Instructions
29acbb460Smrg*************************
39acbb460Smrg
4ef516338SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5ef516338SmrgInc.
69acbb460Smrg
7ef516338Smrg   Copying and distribution of this file, with or without modification,
8ef516338Smrgare permitted in any medium without royalty provided the copyright
9ef516338Smrgnotice and this notice are preserved.  This file is offered as-is,
10ef516338Smrgwithout warranty of any kind.
119acbb460Smrg
129acbb460SmrgBasic Installation
139acbb460Smrg==================
149acbb460Smrg
159acbb460Smrg   Briefly, the shell commands `./configure; make; make install' should
169acbb460Smrgconfigure, build, and install this package.  The following
179acbb460Smrgmore-detailed instructions are generic; see the `README' file for
18ef516338Smrginstructions specific to this package.  Some packages provide this
19ef516338Smrg`INSTALL' file but do not implement all of the features documented
20ef516338Smrgbelow.  The lack of an optional feature in a given package is not
21ef516338Smrgnecessarily a bug.  More recommendations for GNU packages can be found
22ef516338Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
239acbb460Smrg
249acbb460Smrg   The `configure' shell script attempts to guess correct values for
259acbb460Smrgvarious system-dependent variables used during compilation.  It uses
269acbb460Smrgthose values to create a `Makefile' in each directory of the package.
279acbb460SmrgIt may also create one or more `.h' files containing system-dependent
289acbb460Smrgdefinitions.  Finally, it creates a shell script `config.status' that
299acbb460Smrgyou can run in the future to recreate the current configuration, and a
309acbb460Smrgfile `config.log' containing compiler output (useful mainly for
319acbb460Smrgdebugging `configure').
329acbb460Smrg
339acbb460Smrg   It can also use an optional file (typically called `config.cache'
349acbb460Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
359acbb460Smrgthe results of its tests to speed up reconfiguring.  Caching is
369acbb460Smrgdisabled by default to prevent problems with accidental use of stale
379acbb460Smrgcache files.
389acbb460Smrg
399acbb460Smrg   If you need to do unusual things to compile the package, please try
409acbb460Smrgto figure out how `configure' could check whether to do them, and mail
419acbb460Smrgdiffs or instructions to the address given in the `README' so they can
429acbb460Smrgbe considered for the next release.  If you are using the cache, and at
439acbb460Smrgsome point `config.cache' contains results you don't want to keep, you
449acbb460Smrgmay remove or edit it.
459acbb460Smrg
469acbb460Smrg   The file `configure.ac' (or `configure.in') is used to create
479acbb460Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
489acbb460Smrgyou want to change it or regenerate `configure' using a newer version
499acbb460Smrgof `autoconf'.
509acbb460Smrg
51ef516338Smrg   The simplest way to compile this package is:
529acbb460Smrg
539acbb460Smrg  1. `cd' to the directory containing the package's source code and type
549acbb460Smrg     `./configure' to configure the package for your system.
559acbb460Smrg
569acbb460Smrg     Running `configure' might take a while.  While running, it prints
579acbb460Smrg     some messages telling which features it is checking for.
589acbb460Smrg
599acbb460Smrg  2. Type `make' to compile the package.
609acbb460Smrg
619acbb460Smrg  3. Optionally, type `make check' to run any self-tests that come with
62ef516338Smrg     the package, generally using the just-built uninstalled binaries.
639acbb460Smrg
649acbb460Smrg  4. Type `make install' to install the programs and any data files and
65ef516338Smrg     documentation.  When installing into a prefix owned by root, it is
66ef516338Smrg     recommended that the package be configured and built as a regular
67ef516338Smrg     user, and only the `make install' phase executed with root
68ef516338Smrg     privileges.
69ef516338Smrg
70ef516338Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71ef516338Smrg     this time using the binaries in their final installed location.
72ef516338Smrg     This target does not install anything.  Running this target as a
73ef516338Smrg     regular user, particularly if the prior `make install' required
74ef516338Smrg     root privileges, verifies that the installation completed
75ef516338Smrg     correctly.
76ef516338Smrg
77ef516338Smrg  6. You can remove the program binaries and object files from the
789acbb460Smrg     source code directory by typing `make clean'.  To also remove the
799acbb460Smrg     files that `configure' created (so you can compile the package for
809acbb460Smrg     a different kind of computer), type `make distclean'.  There is
819acbb460Smrg     also a `make maintainer-clean' target, but that is intended mainly
829acbb460Smrg     for the package's developers.  If you use it, you may have to get
839acbb460Smrg     all sorts of other programs in order to regenerate files that came
849acbb460Smrg     with the distribution.
859acbb460Smrg
86ef516338Smrg  7. Often, you can also type `make uninstall' to remove the installed
87ef516338Smrg     files again.  In practice, not all packages have tested that
88ef516338Smrg     uninstallation works correctly, even though it is required by the
89ef516338Smrg     GNU Coding Standards.
90ef516338Smrg
91ef516338Smrg  8. Some packages, particularly those that use Automake, provide `make
92ef516338Smrg     distcheck', which can by used by developers to test that all other
93ef516338Smrg     targets like `make install' and `make uninstall' work correctly.
94ef516338Smrg     This target is generally not run by end users.
959acbb460Smrg
969acbb460SmrgCompilers and Options
979acbb460Smrg=====================
989acbb460Smrg
999acbb460Smrg   Some systems require unusual options for compilation or linking that
1009acbb460Smrgthe `configure' script does not know about.  Run `./configure --help'
1019acbb460Smrgfor details on some of the pertinent environment variables.
1029acbb460Smrg
1039acbb460Smrg   You can give `configure' initial values for configuration parameters
1049acbb460Smrgby setting variables in the command line or in the environment.  Here
1059acbb460Smrgis an example:
1069acbb460Smrg
1079acbb460Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
1089acbb460Smrg
1099acbb460Smrg   *Note Defining Variables::, for more details.
1109acbb460Smrg
1119acbb460SmrgCompiling For Multiple Architectures
1129acbb460Smrg====================================
1139acbb460Smrg
1149acbb460Smrg   You can compile the package for more than one kind of computer at the
1159acbb460Smrgsame time, by placing the object files for each architecture in their
1169acbb460Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
1179acbb460Smrgdirectory where you want the object files and executables to go and run
1189acbb460Smrgthe `configure' script.  `configure' automatically checks for the
119ef516338Smrgsource code in the directory that `configure' is in and in `..'.  This
120ef516338Smrgis known as a "VPATH" build.
1219acbb460Smrg
1229acbb460Smrg   With a non-GNU `make', it is safer to compile the package for one
1239acbb460Smrgarchitecture at a time in the source code directory.  After you have
1249acbb460Smrginstalled the package for one architecture, use `make distclean' before
1259acbb460Smrgreconfiguring for another architecture.
1269acbb460Smrg
1279acbb460Smrg   On MacOS X 10.5 and later systems, you can create libraries and
1289acbb460Smrgexecutables that work on multiple system types--known as "fat" or
1299acbb460Smrg"universal" binaries--by specifying multiple `-arch' options to the
1309acbb460Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
1319acbb460Smrgthis:
1329acbb460Smrg
1339acbb460Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1349acbb460Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1359acbb460Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
1369acbb460Smrg
1379acbb460Smrg   This is not guaranteed to produce working output in all cases, you
1389acbb460Smrgmay have to build one architecture at a time and combine the results
1399acbb460Smrgusing the `lipo' tool if you have problems.
1409acbb460Smrg
1419acbb460SmrgInstallation Names
1429acbb460Smrg==================
1439acbb460Smrg
1449acbb460Smrg   By default, `make install' installs the package's commands under
1459acbb460Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
1469acbb460Smrgcan specify an installation prefix other than `/usr/local' by giving
147ef516338Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148ef516338Smrgabsolute file name.
1499acbb460Smrg
1509acbb460Smrg   You can specify separate installation prefixes for
1519acbb460Smrgarchitecture-specific files and architecture-independent files.  If you
1529acbb460Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
1539acbb460SmrgPREFIX as the prefix for installing programs and libraries.
1549acbb460SmrgDocumentation and other data files still use the regular prefix.
1559acbb460Smrg
1569acbb460Smrg   In addition, if you use an unusual directory layout you can give
1579acbb460Smrgoptions like `--bindir=DIR' to specify different values for particular
1589acbb460Smrgkinds of files.  Run `configure --help' for a list of the directories
159ef516338Smrgyou can set and what kinds of files go in them.  In general, the
160ef516338Smrgdefault for these options is expressed in terms of `${prefix}', so that
161ef516338Smrgspecifying just `--prefix' will affect all of the other directory
162ef516338Smrgspecifications that were not explicitly provided.
163ef516338Smrg
164ef516338Smrg   The most portable way to affect installation locations is to pass the
165ef516338Smrgcorrect locations to `configure'; however, many packages provide one or
166ef516338Smrgboth of the following shortcuts of passing variable assignments to the
167ef516338Smrg`make install' command line to change installation locations without
168ef516338Smrghaving to reconfigure or recompile.
169ef516338Smrg
170ef516338Smrg   The first method involves providing an override variable for each
171ef516338Smrgaffected directory.  For example, `make install
172ef516338Smrgprefix=/alternate/directory' will choose an alternate location for all
173ef516338Smrgdirectory configuration variables that were expressed in terms of
174ef516338Smrg`${prefix}'.  Any directories that were specified during `configure',
175ef516338Smrgbut not in terms of `${prefix}', must each be overridden at install
176ef516338Smrgtime for the entire installation to be relocated.  The approach of
177ef516338Smrgmakefile variable overrides for each directory variable is required by
178ef516338Smrgthe GNU Coding Standards, and ideally causes no recompilation.
179ef516338SmrgHowever, some platforms have known limitations with the semantics of
180ef516338Smrgshared libraries that end up requiring recompilation when using this
181ef516338Smrgmethod, particularly noticeable in packages that use GNU Libtool.
182ef516338Smrg
183ef516338Smrg   The second method involves providing the `DESTDIR' variable.  For
184ef516338Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
185ef516338Smrg`/alternate/directory' before all installation names.  The approach of
186ef516338Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187ef516338Smrgdoes not work on platforms that have drive letters.  On the other hand,
188ef516338Smrgit does better at avoiding recompilation issues, and works well even
189ef516338Smrgwhen some directory options were not specified in terms of `${prefix}'
190ef516338Smrgat `configure' time.
191ef516338Smrg
192ef516338SmrgOptional Features
193ef516338Smrg=================
1949acbb460Smrg
1959acbb460Smrg   If the package supports it, you can cause programs to be installed
1969acbb460Smrgwith an extra prefix or suffix on their names by giving `configure' the
1979acbb460Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1989acbb460Smrg
1999acbb460Smrg   Some packages pay attention to `--enable-FEATURE' options to
2009acbb460Smrg`configure', where FEATURE indicates an optional part of the package.
2019acbb460SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
2029acbb460Smrgis something like `gnu-as' or `x' (for the X Window System).  The
2039acbb460Smrg`README' should mention any `--enable-' and `--with-' options that the
2049acbb460Smrgpackage recognizes.
2059acbb460Smrg
2069acbb460Smrg   For packages that use the X Window System, `configure' can usually
2079acbb460Smrgfind the X include and library files automatically, but if it doesn't,
2089acbb460Smrgyou can use the `configure' options `--x-includes=DIR' and
2099acbb460Smrg`--x-libraries=DIR' to specify their locations.
2109acbb460Smrg
211ef516338Smrg   Some packages offer the ability to configure how verbose the
212ef516338Smrgexecution of `make' will be.  For these packages, running `./configure
213ef516338Smrg--enable-silent-rules' sets the default to minimal output, which can be
214ef516338Smrgoverridden with `make V=1'; while running `./configure
215ef516338Smrg--disable-silent-rules' sets the default to verbose, which can be
216ef516338Smrgoverridden with `make V=0'.
217ef516338Smrg
2189acbb460SmrgParticular systems
2199acbb460Smrg==================
2209acbb460Smrg
2219acbb460Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
2229acbb460SmrgCC is not installed, it is recommended to use the following options in
2239acbb460Smrgorder to use an ANSI C compiler:
2249acbb460Smrg
225ef516338Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
2269acbb460Smrg
2279acbb460Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
2289acbb460Smrg
229ef516338Smrg   HP-UX `make' updates targets which have the same time stamps as
230ef516338Smrgtheir prerequisites, which makes it generally unusable when shipped
231ef516338Smrggenerated files such as `configure' are involved.  Use GNU `make'
232ef516338Smrginstead.
233ef516338Smrg
2349acbb460Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
2359acbb460Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
2369acbb460Smrga workaround.  If GNU CC is not installed, it is therefore recommended
2379acbb460Smrgto try
2389acbb460Smrg
2399acbb460Smrg     ./configure CC="cc"
2409acbb460Smrg
2419acbb460Smrgand if that doesn't work, try
2429acbb460Smrg
2439acbb460Smrg     ./configure CC="cc -nodtk"
2449acbb460Smrg
245ef516338Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246ef516338Smrgdirectory contains several dysfunctional programs; working variants of
247ef516338Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248ef516338Smrgin your `PATH', put it _after_ `/usr/bin'.
249ef516338Smrg
250ef516338Smrg   On Haiku, software installed for all users goes in `/boot/common',
251ef516338Smrgnot `/usr/local'.  It is recommended to use the following options:
252ef516338Smrg
253ef516338Smrg     ./configure --prefix=/boot/common
254ef516338Smrg
2559acbb460SmrgSpecifying the System Type
2569acbb460Smrg==========================
2579acbb460Smrg
2589acbb460Smrg   There may be some features `configure' cannot figure out
2599acbb460Smrgautomatically, but needs to determine by the type of machine the package
2609acbb460Smrgwill run on.  Usually, assuming the package is built to be run on the
2619acbb460Smrg_same_ architectures, `configure' can figure that out, but if it prints
2629acbb460Smrga message saying it cannot guess the machine type, give it the
2639acbb460Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
2649acbb460Smrgtype, such as `sun4', or a canonical name which has the form:
2659acbb460Smrg
2669acbb460Smrg     CPU-COMPANY-SYSTEM
2679acbb460Smrg
2689acbb460Smrgwhere SYSTEM can have one of these forms:
2699acbb460Smrg
270ef516338Smrg     OS
271ef516338Smrg     KERNEL-OS
2729acbb460Smrg
2739acbb460Smrg   See the file `config.sub' for the possible values of each field.  If
2749acbb460Smrg`config.sub' isn't included in this package, then this package doesn't
2759acbb460Smrgneed to know the machine type.
2769acbb460Smrg
2779acbb460Smrg   If you are _building_ compiler tools for cross-compiling, you should
2789acbb460Smrguse the option `--target=TYPE' to select the type of system they will
2799acbb460Smrgproduce code for.
2809acbb460Smrg
2819acbb460Smrg   If you want to _use_ a cross compiler, that generates code for a
2829acbb460Smrgplatform different from the build platform, you should specify the
2839acbb460Smrg"host" platform (i.e., that on which the generated programs will
2849acbb460Smrgeventually be run) with `--host=TYPE'.
2859acbb460Smrg
2869acbb460SmrgSharing Defaults
2879acbb460Smrg================
2889acbb460Smrg
2899acbb460Smrg   If you want to set default values for `configure' scripts to share,
2909acbb460Smrgyou can create a site shell script called `config.site' that gives
2919acbb460Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
2929acbb460Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2939acbb460Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2949acbb460Smrg`CONFIG_SITE' environment variable to the location of the site script.
2959acbb460SmrgA warning: not all `configure' scripts look for a site script.
2969acbb460Smrg
2979acbb460SmrgDefining Variables
2989acbb460Smrg==================
2999acbb460Smrg
3009acbb460Smrg   Variables not defined in a site shell script can be set in the
3019acbb460Smrgenvironment passed to `configure'.  However, some packages may run
3029acbb460Smrgconfigure again during the build, and the customized values of these
3039acbb460Smrgvariables may be lost.  In order to avoid this problem, you should set
3049acbb460Smrgthem in the `configure' command line, using `VAR=value'.  For example:
3059acbb460Smrg
3069acbb460Smrg     ./configure CC=/usr/local2/bin/gcc
3079acbb460Smrg
3089acbb460Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
3099acbb460Smrgoverridden in the site shell script).
3109acbb460Smrg
3119acbb460SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
3129acbb460Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
3139acbb460Smrg
3149acbb460Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
3159acbb460Smrg
3169acbb460Smrg`configure' Invocation
3179acbb460Smrg======================
3189acbb460Smrg
3199acbb460Smrg   `configure' recognizes the following options to control how it
3209acbb460Smrgoperates.
3219acbb460Smrg
3229acbb460Smrg`--help'
3239acbb460Smrg`-h'
3249acbb460Smrg     Print a summary of all of the options to `configure', and exit.
3259acbb460Smrg
3269acbb460Smrg`--help=short'
3279acbb460Smrg`--help=recursive'
3289acbb460Smrg     Print a summary of the options unique to this package's
3299acbb460Smrg     `configure', and exit.  The `short' variant lists options used
3309acbb460Smrg     only in the top level, while the `recursive' variant lists options
3319acbb460Smrg     also present in any nested packages.
3329acbb460Smrg
3339acbb460Smrg`--version'
3349acbb460Smrg`-V'
3359acbb460Smrg     Print the version of Autoconf used to generate the `configure'
3369acbb460Smrg     script, and exit.
3379acbb460Smrg
3389acbb460Smrg`--cache-file=FILE'
3399acbb460Smrg     Enable the cache: use and save the results of the tests in FILE,
3409acbb460Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
3419acbb460Smrg     disable caching.
3429acbb460Smrg
3439acbb460Smrg`--config-cache'
3449acbb460Smrg`-C'
3459acbb460Smrg     Alias for `--cache-file=config.cache'.
3469acbb460Smrg
3479acbb460Smrg`--quiet'
3489acbb460Smrg`--silent'
3499acbb460Smrg`-q'
3509acbb460Smrg     Do not print messages saying which checks are being made.  To
3519acbb460Smrg     suppress all normal output, redirect it to `/dev/null' (any error
3529acbb460Smrg     messages will still be shown).
3539acbb460Smrg
3549acbb460Smrg`--srcdir=DIR'
3559acbb460Smrg     Look for the package's source code in directory DIR.  Usually
3569acbb460Smrg     `configure' can determine that directory automatically.
3579acbb460Smrg
3589acbb460Smrg`--prefix=DIR'
359ef516338Smrg     Use DIR as the installation prefix.  *note Installation Names::
3609acbb460Smrg     for more details, including other options available for fine-tuning
3619acbb460Smrg     the installation locations.
3629acbb460Smrg
3639acbb460Smrg`--no-create'
3649acbb460Smrg`-n'
3659acbb460Smrg     Run the configure checks, but stop before creating any output
3669acbb460Smrg     files.
3679acbb460Smrg
3689acbb460Smrg`configure' also accepts some other, not widely useful, options.  Run
3699acbb460Smrg`configure --help' for more details.
3709acbb460Smrg
371