15ffd6003SmrgInstallation Instructions
25ffd6003Smrg*************************
35ffd6003Smrg
4b7d26471SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
5b7d26471SmrgInc.
65ffd6003Smrg
7b7d26471Smrg   Copying and distribution of this file, with or without modification,
8b7d26471Smrgare permitted in any medium without royalty provided the copyright
9b7d26471Smrgnotice and this notice are preserved.  This file is offered as-is,
10b7d26471Smrgwithout warranty of any kind.
115ffd6003Smrg
125ffd6003SmrgBasic Installation
135ffd6003Smrg==================
145ffd6003Smrg
155ffd6003Smrg   Briefly, the shell commands `./configure; make; make install' should
165ffd6003Smrgconfigure, build, and install this package.  The following
175ffd6003Smrgmore-detailed instructions are generic; see the `README' file for
18b7d26471Smrginstructions specific to this package.  Some packages provide this
19b7d26471Smrg`INSTALL' file but do not implement all of the features documented
20b7d26471Smrgbelow.  The lack of an optional feature in a given package is not
21b7d26471Smrgnecessarily a bug.  More recommendations for GNU packages can be found
22b7d26471Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
235ffd6003Smrg
245ffd6003Smrg   The `configure' shell script attempts to guess correct values for
255ffd6003Smrgvarious system-dependent variables used during compilation.  It uses
265ffd6003Smrgthose values to create a `Makefile' in each directory of the package.
275ffd6003SmrgIt may also create one or more `.h' files containing system-dependent
285ffd6003Smrgdefinitions.  Finally, it creates a shell script `config.status' that
295ffd6003Smrgyou can run in the future to recreate the current configuration, and a
305ffd6003Smrgfile `config.log' containing compiler output (useful mainly for
315ffd6003Smrgdebugging `configure').
325ffd6003Smrg
335ffd6003Smrg   It can also use an optional file (typically called `config.cache'
345ffd6003Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
355ffd6003Smrgthe results of its tests to speed up reconfiguring.  Caching is
365ffd6003Smrgdisabled by default to prevent problems with accidental use of stale
375ffd6003Smrgcache files.
385ffd6003Smrg
395ffd6003Smrg   If you need to do unusual things to compile the package, please try
405ffd6003Smrgto figure out how `configure' could check whether to do them, and mail
415ffd6003Smrgdiffs or instructions to the address given in the `README' so they can
425ffd6003Smrgbe considered for the next release.  If you are using the cache, and at
435ffd6003Smrgsome point `config.cache' contains results you don't want to keep, you
445ffd6003Smrgmay remove or edit it.
455ffd6003Smrg
465ffd6003Smrg   The file `configure.ac' (or `configure.in') is used to create
475ffd6003Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
485ffd6003Smrgyou want to change it or regenerate `configure' using a newer version
495ffd6003Smrgof `autoconf'.
505ffd6003Smrg
51b7d26471Smrg   The simplest way to compile this package is:
525ffd6003Smrg
535ffd6003Smrg  1. `cd' to the directory containing the package's source code and type
545ffd6003Smrg     `./configure' to configure the package for your system.
555ffd6003Smrg
565ffd6003Smrg     Running `configure' might take a while.  While running, it prints
575ffd6003Smrg     some messages telling which features it is checking for.
585ffd6003Smrg
595ffd6003Smrg  2. Type `make' to compile the package.
605ffd6003Smrg
615ffd6003Smrg  3. Optionally, type `make check' to run any self-tests that come with
62b7d26471Smrg     the package, generally using the just-built uninstalled binaries.
635ffd6003Smrg
645ffd6003Smrg  4. Type `make install' to install the programs and any data files and
65b7d26471Smrg     documentation.  When installing into a prefix owned by root, it is
66b7d26471Smrg     recommended that the package be configured and built as a regular
67b7d26471Smrg     user, and only the `make install' phase executed with root
68b7d26471Smrg     privileges.
69b7d26471Smrg
70b7d26471Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
71b7d26471Smrg     this time using the binaries in their final installed location.
72b7d26471Smrg     This target does not install anything.  Running this target as a
73b7d26471Smrg     regular user, particularly if the prior `make install' required
74b7d26471Smrg     root privileges, verifies that the installation completed
75b7d26471Smrg     correctly.
76b7d26471Smrg
77b7d26471Smrg  6. You can remove the program binaries and object files from the
785ffd6003Smrg     source code directory by typing `make clean'.  To also remove the
795ffd6003Smrg     files that `configure' created (so you can compile the package for
805ffd6003Smrg     a different kind of computer), type `make distclean'.  There is
815ffd6003Smrg     also a `make maintainer-clean' target, but that is intended mainly
825ffd6003Smrg     for the package's developers.  If you use it, you may have to get
835ffd6003Smrg     all sorts of other programs in order to regenerate files that came
845ffd6003Smrg     with the distribution.
855ffd6003Smrg
86b7d26471Smrg  7. Often, you can also type `make uninstall' to remove the installed
87b7d26471Smrg     files again.  In practice, not all packages have tested that
88b7d26471Smrg     uninstallation works correctly, even though it is required by the
89b7d26471Smrg     GNU Coding Standards.
90b7d26471Smrg
91b7d26471Smrg  8. Some packages, particularly those that use Automake, provide `make
92b7d26471Smrg     distcheck', which can by used by developers to test that all other
93b7d26471Smrg     targets like `make install' and `make uninstall' work correctly.
94b7d26471Smrg     This target is generally not run by end users.
955ffd6003Smrg
965ffd6003SmrgCompilers and Options
975ffd6003Smrg=====================
985ffd6003Smrg
995ffd6003Smrg   Some systems require unusual options for compilation or linking that
1005ffd6003Smrgthe `configure' script does not know about.  Run `./configure --help'
1015ffd6003Smrgfor details on some of the pertinent environment variables.
1025ffd6003Smrg
1035ffd6003Smrg   You can give `configure' initial values for configuration parameters
1045ffd6003Smrgby setting variables in the command line or in the environment.  Here
1055ffd6003Smrgis an example:
1065ffd6003Smrg
1075ffd6003Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
1085ffd6003Smrg
1095ffd6003Smrg   *Note Defining Variables::, for more details.
1105ffd6003Smrg
1115ffd6003SmrgCompiling For Multiple Architectures
1125ffd6003Smrg====================================
1135ffd6003Smrg
1145ffd6003Smrg   You can compile the package for more than one kind of computer at the
1155ffd6003Smrgsame time, by placing the object files for each architecture in their
1165ffd6003Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
1175ffd6003Smrgdirectory where you want the object files and executables to go and run
1185ffd6003Smrgthe `configure' script.  `configure' automatically checks for the
119b7d26471Smrgsource code in the directory that `configure' is in and in `..'.  This
120b7d26471Smrgis known as a "VPATH" build.
1215ffd6003Smrg
1225ffd6003Smrg   With a non-GNU `make', it is safer to compile the package for one
1235ffd6003Smrgarchitecture at a time in the source code directory.  After you have
1245ffd6003Smrginstalled the package for one architecture, use `make distclean' before
1255ffd6003Smrgreconfiguring for another architecture.
1265ffd6003Smrg
1275ffd6003Smrg   On MacOS X 10.5 and later systems, you can create libraries and
1285ffd6003Smrgexecutables that work on multiple system types--known as "fat" or
1295ffd6003Smrg"universal" binaries--by specifying multiple `-arch' options to the
1305ffd6003Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
1315ffd6003Smrgthis:
1325ffd6003Smrg
1335ffd6003Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1345ffd6003Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
1355ffd6003Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
1365ffd6003Smrg
1375ffd6003Smrg   This is not guaranteed to produce working output in all cases, you
1385ffd6003Smrgmay have to build one architecture at a time and combine the results
1395ffd6003Smrgusing the `lipo' tool if you have problems.
1405ffd6003Smrg
1415ffd6003SmrgInstallation Names
1425ffd6003Smrg==================
1435ffd6003Smrg
1445ffd6003Smrg   By default, `make install' installs the package's commands under
1455ffd6003Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
1465ffd6003Smrgcan specify an installation prefix other than `/usr/local' by giving
147b7d26471Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
148b7d26471Smrgabsolute file name.
1495ffd6003Smrg
1505ffd6003Smrg   You can specify separate installation prefixes for
1515ffd6003Smrgarchitecture-specific files and architecture-independent files.  If you
1525ffd6003Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
1535ffd6003SmrgPREFIX as the prefix for installing programs and libraries.
1545ffd6003SmrgDocumentation and other data files still use the regular prefix.
1555ffd6003Smrg
1565ffd6003Smrg   In addition, if you use an unusual directory layout you can give
1575ffd6003Smrgoptions like `--bindir=DIR' to specify different values for particular
1585ffd6003Smrgkinds of files.  Run `configure --help' for a list of the directories
159b7d26471Smrgyou can set and what kinds of files go in them.  In general, the
160b7d26471Smrgdefault for these options is expressed in terms of `${prefix}', so that
161b7d26471Smrgspecifying just `--prefix' will affect all of the other directory
162b7d26471Smrgspecifications that were not explicitly provided.
163b7d26471Smrg
164b7d26471Smrg   The most portable way to affect installation locations is to pass the
165b7d26471Smrgcorrect locations to `configure'; however, many packages provide one or
166b7d26471Smrgboth of the following shortcuts of passing variable assignments to the
167b7d26471Smrg`make install' command line to change installation locations without
168b7d26471Smrghaving to reconfigure or recompile.
169b7d26471Smrg
170b7d26471Smrg   The first method involves providing an override variable for each
171b7d26471Smrgaffected directory.  For example, `make install
172b7d26471Smrgprefix=/alternate/directory' will choose an alternate location for all
173b7d26471Smrgdirectory configuration variables that were expressed in terms of
174b7d26471Smrg`${prefix}'.  Any directories that were specified during `configure',
175b7d26471Smrgbut not in terms of `${prefix}', must each be overridden at install
176b7d26471Smrgtime for the entire installation to be relocated.  The approach of
177b7d26471Smrgmakefile variable overrides for each directory variable is required by
178b7d26471Smrgthe GNU Coding Standards, and ideally causes no recompilation.
179b7d26471SmrgHowever, some platforms have known limitations with the semantics of
180b7d26471Smrgshared libraries that end up requiring recompilation when using this
181b7d26471Smrgmethod, particularly noticeable in packages that use GNU Libtool.
182b7d26471Smrg
183b7d26471Smrg   The second method involves providing the `DESTDIR' variable.  For
184b7d26471Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
185b7d26471Smrg`/alternate/directory' before all installation names.  The approach of
186b7d26471Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
187b7d26471Smrgdoes not work on platforms that have drive letters.  On the other hand,
188b7d26471Smrgit does better at avoiding recompilation issues, and works well even
189b7d26471Smrgwhen some directory options were not specified in terms of `${prefix}'
190b7d26471Smrgat `configure' time.
191b7d26471Smrg
192b7d26471SmrgOptional Features
193b7d26471Smrg=================
1945ffd6003Smrg
1955ffd6003Smrg   If the package supports it, you can cause programs to be installed
1965ffd6003Smrgwith an extra prefix or suffix on their names by giving `configure' the
1975ffd6003Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1985ffd6003Smrg
1995ffd6003Smrg   Some packages pay attention to `--enable-FEATURE' options to
2005ffd6003Smrg`configure', where FEATURE indicates an optional part of the package.
2015ffd6003SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
2025ffd6003Smrgis something like `gnu-as' or `x' (for the X Window System).  The
2035ffd6003Smrg`README' should mention any `--enable-' and `--with-' options that the
2045ffd6003Smrgpackage recognizes.
2055ffd6003Smrg
2065ffd6003Smrg   For packages that use the X Window System, `configure' can usually
2075ffd6003Smrgfind the X include and library files automatically, but if it doesn't,
2085ffd6003Smrgyou can use the `configure' options `--x-includes=DIR' and
2095ffd6003Smrg`--x-libraries=DIR' to specify their locations.
2105ffd6003Smrg
211b7d26471Smrg   Some packages offer the ability to configure how verbose the
212b7d26471Smrgexecution of `make' will be.  For these packages, running `./configure
213b7d26471Smrg--enable-silent-rules' sets the default to minimal output, which can be
214b7d26471Smrgoverridden with `make V=1'; while running `./configure
215b7d26471Smrg--disable-silent-rules' sets the default to verbose, which can be
216b7d26471Smrgoverridden with `make V=0'.
217b7d26471Smrg
2185ffd6003SmrgParticular systems
2195ffd6003Smrg==================
2205ffd6003Smrg
2215ffd6003Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
2225ffd6003SmrgCC is not installed, it is recommended to use the following options in
2235ffd6003Smrgorder to use an ANSI C compiler:
2245ffd6003Smrg
225b7d26471Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
2265ffd6003Smrg
2275ffd6003Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
2285ffd6003Smrg
229b7d26471Smrg   HP-UX `make' updates targets which have the same time stamps as
230b7d26471Smrgtheir prerequisites, which makes it generally unusable when shipped
231b7d26471Smrggenerated files such as `configure' are involved.  Use GNU `make'
232b7d26471Smrginstead.
233b7d26471Smrg
2345ffd6003Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
2355ffd6003Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
2365ffd6003Smrga workaround.  If GNU CC is not installed, it is therefore recommended
2375ffd6003Smrgto try
2385ffd6003Smrg
2395ffd6003Smrg     ./configure CC="cc"
2405ffd6003Smrg
2415ffd6003Smrgand if that doesn't work, try
2425ffd6003Smrg
2435ffd6003Smrg     ./configure CC="cc -nodtk"
2445ffd6003Smrg
245b7d26471Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
246b7d26471Smrgdirectory contains several dysfunctional programs; working variants of
247b7d26471Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
248b7d26471Smrgin your `PATH', put it _after_ `/usr/bin'.
249b7d26471Smrg
250b7d26471Smrg   On Haiku, software installed for all users goes in `/boot/common',
251b7d26471Smrgnot `/usr/local'.  It is recommended to use the following options:
252b7d26471Smrg
253b7d26471Smrg     ./configure --prefix=/boot/common
254b7d26471Smrg
2555ffd6003SmrgSpecifying the System Type
2565ffd6003Smrg==========================
2575ffd6003Smrg
2585ffd6003Smrg   There may be some features `configure' cannot figure out
2595ffd6003Smrgautomatically, but needs to determine by the type of machine the package
2605ffd6003Smrgwill run on.  Usually, assuming the package is built to be run on the
2615ffd6003Smrg_same_ architectures, `configure' can figure that out, but if it prints
2625ffd6003Smrga message saying it cannot guess the machine type, give it the
2635ffd6003Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
2645ffd6003Smrgtype, such as `sun4', or a canonical name which has the form:
2655ffd6003Smrg
2665ffd6003Smrg     CPU-COMPANY-SYSTEM
2675ffd6003Smrg
2685ffd6003Smrgwhere SYSTEM can have one of these forms:
2695ffd6003Smrg
270b7d26471Smrg     OS
271b7d26471Smrg     KERNEL-OS
2725ffd6003Smrg
2735ffd6003Smrg   See the file `config.sub' for the possible values of each field.  If
2745ffd6003Smrg`config.sub' isn't included in this package, then this package doesn't
2755ffd6003Smrgneed to know the machine type.
2765ffd6003Smrg
2775ffd6003Smrg   If you are _building_ compiler tools for cross-compiling, you should
2785ffd6003Smrguse the option `--target=TYPE' to select the type of system they will
2795ffd6003Smrgproduce code for.
2805ffd6003Smrg
2815ffd6003Smrg   If you want to _use_ a cross compiler, that generates code for a
2825ffd6003Smrgplatform different from the build platform, you should specify the
2835ffd6003Smrg"host" platform (i.e., that on which the generated programs will
2845ffd6003Smrgeventually be run) with `--host=TYPE'.
2855ffd6003Smrg
2865ffd6003SmrgSharing Defaults
2875ffd6003Smrg================
2885ffd6003Smrg
2895ffd6003Smrg   If you want to set default values for `configure' scripts to share,
2905ffd6003Smrgyou can create a site shell script called `config.site' that gives
2915ffd6003Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
2925ffd6003Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2935ffd6003Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2945ffd6003Smrg`CONFIG_SITE' environment variable to the location of the site script.
2955ffd6003SmrgA warning: not all `configure' scripts look for a site script.
2965ffd6003Smrg
2975ffd6003SmrgDefining Variables
2985ffd6003Smrg==================
2995ffd6003Smrg
3005ffd6003Smrg   Variables not defined in a site shell script can be set in the
3015ffd6003Smrgenvironment passed to `configure'.  However, some packages may run
3025ffd6003Smrgconfigure again during the build, and the customized values of these
3035ffd6003Smrgvariables may be lost.  In order to avoid this problem, you should set
3045ffd6003Smrgthem in the `configure' command line, using `VAR=value'.  For example:
3055ffd6003Smrg
3065ffd6003Smrg     ./configure CC=/usr/local2/bin/gcc
3075ffd6003Smrg
3085ffd6003Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
3095ffd6003Smrgoverridden in the site shell script).
3105ffd6003Smrg
3115ffd6003SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
3125ffd6003Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
3135ffd6003Smrg
3145ffd6003Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
3155ffd6003Smrg
3165ffd6003Smrg`configure' Invocation
3175ffd6003Smrg======================
3185ffd6003Smrg
3195ffd6003Smrg   `configure' recognizes the following options to control how it
3205ffd6003Smrgoperates.
3215ffd6003Smrg
3225ffd6003Smrg`--help'
3235ffd6003Smrg`-h'
3245ffd6003Smrg     Print a summary of all of the options to `configure', and exit.
3255ffd6003Smrg
3265ffd6003Smrg`--help=short'
3275ffd6003Smrg`--help=recursive'
3285ffd6003Smrg     Print a summary of the options unique to this package's
3295ffd6003Smrg     `configure', and exit.  The `short' variant lists options used
3305ffd6003Smrg     only in the top level, while the `recursive' variant lists options
3315ffd6003Smrg     also present in any nested packages.
3325ffd6003Smrg
3335ffd6003Smrg`--version'
3345ffd6003Smrg`-V'
3355ffd6003Smrg     Print the version of Autoconf used to generate the `configure'
3365ffd6003Smrg     script, and exit.
3375ffd6003Smrg
3385ffd6003Smrg`--cache-file=FILE'
3395ffd6003Smrg     Enable the cache: use and save the results of the tests in FILE,
3405ffd6003Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
3415ffd6003Smrg     disable caching.
3425ffd6003Smrg
3435ffd6003Smrg`--config-cache'
3445ffd6003Smrg`-C'
3455ffd6003Smrg     Alias for `--cache-file=config.cache'.
3465ffd6003Smrg
3475ffd6003Smrg`--quiet'
3485ffd6003Smrg`--silent'
3495ffd6003Smrg`-q'
3505ffd6003Smrg     Do not print messages saying which checks are being made.  To
3515ffd6003Smrg     suppress all normal output, redirect it to `/dev/null' (any error
3525ffd6003Smrg     messages will still be shown).
3535ffd6003Smrg
3545ffd6003Smrg`--srcdir=DIR'
3555ffd6003Smrg     Look for the package's source code in directory DIR.  Usually
3565ffd6003Smrg     `configure' can determine that directory automatically.
3575ffd6003Smrg
3585ffd6003Smrg`--prefix=DIR'
359b7d26471Smrg     Use DIR as the installation prefix.  *note Installation Names::
3605ffd6003Smrg     for more details, including other options available for fine-tuning
3615ffd6003Smrg     the installation locations.
3625ffd6003Smrg
3635ffd6003Smrg`--no-create'
3645ffd6003Smrg`-n'
3655ffd6003Smrg     Run the configure checks, but stop before creating any output
3665ffd6003Smrg     files.
3675ffd6003Smrg
3685ffd6003Smrg`configure' also accepts some other, not widely useful, options.  Run
3695ffd6003Smrg`configure --help' for more details.
3705ffd6003Smrg
371