1100ae103SmrgInstallation Instructions
2100ae103Smrg*************************
3100ae103Smrg
495cf0c00SmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
595cf0c00SmrgInc.
6100ae103Smrg
795cf0c00Smrg   Copying and distribution of this file, with or without modification,
895cf0c00Smrgare permitted in any medium without royalty provided the copyright
995cf0c00Smrgnotice and this notice are preserved.  This file is offered as-is,
1095cf0c00Smrgwithout warranty of any kind.
11100ae103Smrg
12100ae103SmrgBasic Installation
13100ae103Smrg==================
14100ae103Smrg
15165cb819Smrg   Briefly, the shell commands `./configure; make; make install' should
16165cb819Smrgconfigure, build, and install this package.  The following
17165cb819Smrgmore-detailed instructions are generic; see the `README' file for
1895cf0c00Smrginstructions specific to this package.  Some packages provide this
1995cf0c00Smrg`INSTALL' file but do not implement all of the features documented
2095cf0c00Smrgbelow.  The lack of an optional feature in a given package is not
2195cf0c00Smrgnecessarily a bug.  More recommendations for GNU packages can be found
2295cf0c00Smrgin *note Makefile Conventions: (standards)Makefile Conventions.
23100ae103Smrg
24100ae103Smrg   The `configure' shell script attempts to guess correct values for
25100ae103Smrgvarious system-dependent variables used during compilation.  It uses
26100ae103Smrgthose values to create a `Makefile' in each directory of the package.
27100ae103SmrgIt may also create one or more `.h' files containing system-dependent
28100ae103Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29100ae103Smrgyou can run in the future to recreate the current configuration, and a
30100ae103Smrgfile `config.log' containing compiler output (useful mainly for
31100ae103Smrgdebugging `configure').
32100ae103Smrg
33100ae103Smrg   It can also use an optional file (typically called `config.cache'
34100ae103Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35165cb819Smrgthe results of its tests to speed up reconfiguring.  Caching is
36100ae103Smrgdisabled by default to prevent problems with accidental use of stale
37165cb819Smrgcache files.
38100ae103Smrg
39100ae103Smrg   If you need to do unusual things to compile the package, please try
40100ae103Smrgto figure out how `configure' could check whether to do them, and mail
41100ae103Smrgdiffs or instructions to the address given in the `README' so they can
42100ae103Smrgbe considered for the next release.  If you are using the cache, and at
43100ae103Smrgsome point `config.cache' contains results you don't want to keep, you
44100ae103Smrgmay remove or edit it.
45100ae103Smrg
46100ae103Smrg   The file `configure.ac' (or `configure.in') is used to create
47165cb819Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48165cb819Smrgyou want to change it or regenerate `configure' using a newer version
49165cb819Smrgof `autoconf'.
50100ae103Smrg
5195cf0c00Smrg   The simplest way to compile this package is:
52100ae103Smrg
53100ae103Smrg  1. `cd' to the directory containing the package's source code and type
54165cb819Smrg     `./configure' to configure the package for your system.
55100ae103Smrg
56165cb819Smrg     Running `configure' might take a while.  While running, it prints
57165cb819Smrg     some messages telling which features it is checking for.
58100ae103Smrg
59100ae103Smrg  2. Type `make' to compile the package.
60100ae103Smrg
61100ae103Smrg  3. Optionally, type `make check' to run any self-tests that come with
6295cf0c00Smrg     the package, generally using the just-built uninstalled binaries.
63100ae103Smrg
64100ae103Smrg  4. Type `make install' to install the programs and any data files and
6595cf0c00Smrg     documentation.  When installing into a prefix owned by root, it is
6695cf0c00Smrg     recommended that the package be configured and built as a regular
6795cf0c00Smrg     user, and only the `make install' phase executed with root
6895cf0c00Smrg     privileges.
6995cf0c00Smrg
7095cf0c00Smrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7195cf0c00Smrg     this time using the binaries in their final installed location.
7295cf0c00Smrg     This target does not install anything.  Running this target as a
7395cf0c00Smrg     regular user, particularly if the prior `make install' required
7495cf0c00Smrg     root privileges, verifies that the installation completed
7595cf0c00Smrg     correctly.
7695cf0c00Smrg
7795cf0c00Smrg  6. You can remove the program binaries and object files from the
78100ae103Smrg     source code directory by typing `make clean'.  To also remove the
79100ae103Smrg     files that `configure' created (so you can compile the package for
80100ae103Smrg     a different kind of computer), type `make distclean'.  There is
81100ae103Smrg     also a `make maintainer-clean' target, but that is intended mainly
82100ae103Smrg     for the package's developers.  If you use it, you may have to get
83100ae103Smrg     all sorts of other programs in order to regenerate files that came
84100ae103Smrg     with the distribution.
85100ae103Smrg
8695cf0c00Smrg  7. Often, you can also type `make uninstall' to remove the installed
8795cf0c00Smrg     files again.  In practice, not all packages have tested that
8895cf0c00Smrg     uninstallation works correctly, even though it is required by the
8995cf0c00Smrg     GNU Coding Standards.
9095cf0c00Smrg
9195cf0c00Smrg  8. Some packages, particularly those that use Automake, provide `make
9295cf0c00Smrg     distcheck', which can by used by developers to test that all other
9395cf0c00Smrg     targets like `make install' and `make uninstall' work correctly.
9495cf0c00Smrg     This target is generally not run by end users.
95165cb819Smrg
96100ae103SmrgCompilers and Options
97100ae103Smrg=====================
98100ae103Smrg
99165cb819Smrg   Some systems require unusual options for compilation or linking that
100165cb819Smrgthe `configure' script does not know about.  Run `./configure --help'
101165cb819Smrgfor details on some of the pertinent environment variables.
102100ae103Smrg
103100ae103Smrg   You can give `configure' initial values for configuration parameters
104100ae103Smrgby setting variables in the command line or in the environment.  Here
105100ae103Smrgis an example:
106100ae103Smrg
107165cb819Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108100ae103Smrg
109100ae103Smrg   *Note Defining Variables::, for more details.
110100ae103Smrg
111100ae103SmrgCompiling For Multiple Architectures
112100ae103Smrg====================================
113100ae103Smrg
114165cb819Smrg   You can compile the package for more than one kind of computer at the
115100ae103Smrgsame time, by placing the object files for each architecture in their
116165cb819Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117100ae103Smrgdirectory where you want the object files and executables to go and run
118100ae103Smrgthe `configure' script.  `configure' automatically checks for the
11995cf0c00Smrgsource code in the directory that `configure' is in and in `..'.  This
12095cf0c00Smrgis known as a "VPATH" build.
121100ae103Smrg
122165cb819Smrg   With a non-GNU `make', it is safer to compile the package for one
123165cb819Smrgarchitecture at a time in the source code directory.  After you have
124165cb819Smrginstalled the package for one architecture, use `make distclean' before
125165cb819Smrgreconfiguring for another architecture.
126165cb819Smrg
127165cb819Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128165cb819Smrgexecutables that work on multiple system types--known as "fat" or
129165cb819Smrg"universal" binaries--by specifying multiple `-arch' options to the
130165cb819Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131165cb819Smrgthis:
132165cb819Smrg
133165cb819Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134165cb819Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135165cb819Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136165cb819Smrg
137165cb819Smrg   This is not guaranteed to produce working output in all cases, you
138165cb819Smrgmay have to build one architecture at a time and combine the results
139165cb819Smrgusing the `lipo' tool if you have problems.
140100ae103Smrg
141100ae103SmrgInstallation Names
142100ae103Smrg==================
143100ae103Smrg
144165cb819Smrg   By default, `make install' installs the package's commands under
145100ae103Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146100ae103Smrgcan specify an installation prefix other than `/usr/local' by giving
14795cf0c00Smrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14895cf0c00Smrgabsolute file name.
149100ae103Smrg
150100ae103Smrg   You can specify separate installation prefixes for
151100ae103Smrgarchitecture-specific files and architecture-independent files.  If you
152100ae103Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153100ae103SmrgPREFIX as the prefix for installing programs and libraries.
154100ae103SmrgDocumentation and other data files still use the regular prefix.
155100ae103Smrg
156100ae103Smrg   In addition, if you use an unusual directory layout you can give
157100ae103Smrgoptions like `--bindir=DIR' to specify different values for particular
158100ae103Smrgkinds of files.  Run `configure --help' for a list of the directories
15995cf0c00Smrgyou can set and what kinds of files go in them.  In general, the
16095cf0c00Smrgdefault for these options is expressed in terms of `${prefix}', so that
16195cf0c00Smrgspecifying just `--prefix' will affect all of the other directory
16295cf0c00Smrgspecifications that were not explicitly provided.
16395cf0c00Smrg
16495cf0c00Smrg   The most portable way to affect installation locations is to pass the
16595cf0c00Smrgcorrect locations to `configure'; however, many packages provide one or
16695cf0c00Smrgboth of the following shortcuts of passing variable assignments to the
16795cf0c00Smrg`make install' command line to change installation locations without
16895cf0c00Smrghaving to reconfigure or recompile.
16995cf0c00Smrg
17095cf0c00Smrg   The first method involves providing an override variable for each
17195cf0c00Smrgaffected directory.  For example, `make install
17295cf0c00Smrgprefix=/alternate/directory' will choose an alternate location for all
17395cf0c00Smrgdirectory configuration variables that were expressed in terms of
17495cf0c00Smrg`${prefix}'.  Any directories that were specified during `configure',
17595cf0c00Smrgbut not in terms of `${prefix}', must each be overridden at install
17695cf0c00Smrgtime for the entire installation to be relocated.  The approach of
17795cf0c00Smrgmakefile variable overrides for each directory variable is required by
17895cf0c00Smrgthe GNU Coding Standards, and ideally causes no recompilation.
17995cf0c00SmrgHowever, some platforms have known limitations with the semantics of
18095cf0c00Smrgshared libraries that end up requiring recompilation when using this
18195cf0c00Smrgmethod, particularly noticeable in packages that use GNU Libtool.
18295cf0c00Smrg
18395cf0c00Smrg   The second method involves providing the `DESTDIR' variable.  For
18495cf0c00Smrgexample, `make install DESTDIR=/alternate/directory' will prepend
18595cf0c00Smrg`/alternate/directory' before all installation names.  The approach of
18695cf0c00Smrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18795cf0c00Smrgdoes not work on platforms that have drive letters.  On the other hand,
18895cf0c00Smrgit does better at avoiding recompilation issues, and works well even
18995cf0c00Smrgwhen some directory options were not specified in terms of `${prefix}'
19095cf0c00Smrgat `configure' time.
19195cf0c00Smrg
19295cf0c00SmrgOptional Features
19395cf0c00Smrg=================
194100ae103Smrg
195100ae103Smrg   If the package supports it, you can cause programs to be installed
196100ae103Smrgwith an extra prefix or suffix on their names by giving `configure' the
197100ae103Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198100ae103Smrg
199165cb819Smrg   Some packages pay attention to `--enable-FEATURE' options to
200100ae103Smrg`configure', where FEATURE indicates an optional part of the package.
201100ae103SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202100ae103Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203100ae103Smrg`README' should mention any `--enable-' and `--with-' options that the
204100ae103Smrgpackage recognizes.
205100ae103Smrg
206100ae103Smrg   For packages that use the X Window System, `configure' can usually
207100ae103Smrgfind the X include and library files automatically, but if it doesn't,
208100ae103Smrgyou can use the `configure' options `--x-includes=DIR' and
209100ae103Smrg`--x-libraries=DIR' to specify their locations.
210100ae103Smrg
21195cf0c00Smrg   Some packages offer the ability to configure how verbose the
21295cf0c00Smrgexecution of `make' will be.  For these packages, running `./configure
21395cf0c00Smrg--enable-silent-rules' sets the default to minimal output, which can be
21495cf0c00Smrgoverridden with `make V=1'; while running `./configure
21595cf0c00Smrg--disable-silent-rules' sets the default to verbose, which can be
21695cf0c00Smrgoverridden with `make V=0'.
21795cf0c00Smrg
218165cb819SmrgParticular systems
219165cb819Smrg==================
220165cb819Smrg
221165cb819Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222165cb819SmrgCC is not installed, it is recommended to use the following options in
223165cb819Smrgorder to use an ANSI C compiler:
224165cb819Smrg
22595cf0c00Smrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226165cb819Smrg
227165cb819Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228165cb819Smrg
22995cf0c00Smrg   HP-UX `make' updates targets which have the same time stamps as
23095cf0c00Smrgtheir prerequisites, which makes it generally unusable when shipped
23195cf0c00Smrggenerated files such as `configure' are involved.  Use GNU `make'
23295cf0c00Smrginstead.
23395cf0c00Smrg
234165cb819Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235165cb819Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236165cb819Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237165cb819Smrgto try
238165cb819Smrg
239165cb819Smrg     ./configure CC="cc"
240165cb819Smrg
241165cb819Smrgand if that doesn't work, try
242165cb819Smrg
243165cb819Smrg     ./configure CC="cc -nodtk"
244165cb819Smrg
24595cf0c00Smrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24695cf0c00Smrgdirectory contains several dysfunctional programs; working variants of
24795cf0c00Smrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24895cf0c00Smrgin your `PATH', put it _after_ `/usr/bin'.
24995cf0c00Smrg
25095cf0c00Smrg   On Haiku, software installed for all users goes in `/boot/common',
25195cf0c00Smrgnot `/usr/local'.  It is recommended to use the following options:
25295cf0c00Smrg
25395cf0c00Smrg     ./configure --prefix=/boot/common
25495cf0c00Smrg
255100ae103SmrgSpecifying the System Type
256100ae103Smrg==========================
257100ae103Smrg
258165cb819Smrg   There may be some features `configure' cannot figure out
259165cb819Smrgautomatically, but needs to determine by the type of machine the package
260165cb819Smrgwill run on.  Usually, assuming the package is built to be run on the
261165cb819Smrg_same_ architectures, `configure' can figure that out, but if it prints
262165cb819Smrga message saying it cannot guess the machine type, give it the
263100ae103Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264100ae103Smrgtype, such as `sun4', or a canonical name which has the form:
265100ae103Smrg
266100ae103Smrg     CPU-COMPANY-SYSTEM
267100ae103Smrg
268100ae103Smrgwhere SYSTEM can have one of these forms:
269100ae103Smrg
27095cf0c00Smrg     OS
27195cf0c00Smrg     KERNEL-OS
272100ae103Smrg
273100ae103Smrg   See the file `config.sub' for the possible values of each field.  If
274100ae103Smrg`config.sub' isn't included in this package, then this package doesn't
275100ae103Smrgneed to know the machine type.
276100ae103Smrg
277100ae103Smrg   If you are _building_ compiler tools for cross-compiling, you should
278100ae103Smrguse the option `--target=TYPE' to select the type of system they will
279100ae103Smrgproduce code for.
280100ae103Smrg
281100ae103Smrg   If you want to _use_ a cross compiler, that generates code for a
282100ae103Smrgplatform different from the build platform, you should specify the
283100ae103Smrg"host" platform (i.e., that on which the generated programs will
284100ae103Smrgeventually be run) with `--host=TYPE'.
285100ae103Smrg
286100ae103SmrgSharing Defaults
287100ae103Smrg================
288100ae103Smrg
289165cb819Smrg   If you want to set default values for `configure' scripts to share,
290165cb819Smrgyou can create a site shell script called `config.site' that gives
291165cb819Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292100ae103Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293100ae103Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294100ae103Smrg`CONFIG_SITE' environment variable to the location of the site script.
295100ae103SmrgA warning: not all `configure' scripts look for a site script.
296100ae103Smrg
297100ae103SmrgDefining Variables
298100ae103Smrg==================
299100ae103Smrg
300165cb819Smrg   Variables not defined in a site shell script can be set in the
301100ae103Smrgenvironment passed to `configure'.  However, some packages may run
302100ae103Smrgconfigure again during the build, and the customized values of these
303100ae103Smrgvariables may be lost.  In order to avoid this problem, you should set
304100ae103Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305100ae103Smrg
306100ae103Smrg     ./configure CC=/usr/local2/bin/gcc
307100ae103Smrg
308100ae103Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309165cb819Smrgoverridden in the site shell script).
310100ae103Smrg
311165cb819SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312165cb819Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313100ae103Smrg
314165cb819Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315100ae103Smrg
316100ae103Smrg`configure' Invocation
317100ae103Smrg======================
318100ae103Smrg
319165cb819Smrg   `configure' recognizes the following options to control how it
320165cb819Smrgoperates.
321100ae103Smrg
322100ae103Smrg`--help'
323100ae103Smrg`-h'
324165cb819Smrg     Print a summary of all of the options to `configure', and exit.
325165cb819Smrg
326165cb819Smrg`--help=short'
327165cb819Smrg`--help=recursive'
328165cb819Smrg     Print a summary of the options unique to this package's
329165cb819Smrg     `configure', and exit.  The `short' variant lists options used
330165cb819Smrg     only in the top level, while the `recursive' variant lists options
331165cb819Smrg     also present in any nested packages.
332100ae103Smrg
333100ae103Smrg`--version'
334100ae103Smrg`-V'
335100ae103Smrg     Print the version of Autoconf used to generate the `configure'
336100ae103Smrg     script, and exit.
337100ae103Smrg
338100ae103Smrg`--cache-file=FILE'
339100ae103Smrg     Enable the cache: use and save the results of the tests in FILE,
340100ae103Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341100ae103Smrg     disable caching.
342100ae103Smrg
343100ae103Smrg`--config-cache'
344100ae103Smrg`-C'
345100ae103Smrg     Alias for `--cache-file=config.cache'.
346100ae103Smrg
347100ae103Smrg`--quiet'
348100ae103Smrg`--silent'
349100ae103Smrg`-q'
350100ae103Smrg     Do not print messages saying which checks are being made.  To
351100ae103Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352100ae103Smrg     messages will still be shown).
353100ae103Smrg
354100ae103Smrg`--srcdir=DIR'
355100ae103Smrg     Look for the package's source code in directory DIR.  Usually
356100ae103Smrg     `configure' can determine that directory automatically.
357100ae103Smrg
358165cb819Smrg`--prefix=DIR'
35995cf0c00Smrg     Use DIR as the installation prefix.  *note Installation Names::
360165cb819Smrg     for more details, including other options available for fine-tuning
361165cb819Smrg     the installation locations.
362165cb819Smrg
363165cb819Smrg`--no-create'
364165cb819Smrg`-n'
365165cb819Smrg     Run the configure checks, but stop before creating any output
366165cb819Smrg     files.
367165cb819Smrg
368100ae103Smrg`configure' also accepts some other, not widely useful, options.  Run
369100ae103Smrg`configure --help' for more details.
370100ae103Smrg
371