1169a0819SmrgInstallation Instructions
2169a0819Smrg*************************
3169a0819Smrg
495fdd44cSmrgCopyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
595fdd44cSmrgInc.
6169a0819Smrg
795fdd44cSmrg   Copying and distribution of this file, with or without modification,
895fdd44cSmrgare permitted in any medium without royalty provided the copyright
995fdd44cSmrgnotice and this notice are preserved.  This file is offered as-is,
1095fdd44cSmrgwithout warranty of any kind.
11169a0819Smrg
12169a0819SmrgBasic Installation
13169a0819Smrg==================
14169a0819Smrg
15169a0819Smrg   Briefly, the shell commands `./configure; make; make install' should
16169a0819Smrgconfigure, build, and install this package.  The following
17169a0819Smrgmore-detailed instructions are generic; see the `README' file for
1895fdd44cSmrginstructions specific to this package.  Some packages provide this
1995fdd44cSmrg`INSTALL' file but do not implement all of the features documented
2095fdd44cSmrgbelow.  The lack of an optional feature in a given package is not
2195fdd44cSmrgnecessarily a bug.  More recommendations for GNU packages can be found
2295fdd44cSmrgin *note Makefile Conventions: (standards)Makefile Conventions.
23169a0819Smrg
24169a0819Smrg   The `configure' shell script attempts to guess correct values for
25169a0819Smrgvarious system-dependent variables used during compilation.  It uses
26169a0819Smrgthose values to create a `Makefile' in each directory of the package.
27169a0819SmrgIt may also create one or more `.h' files containing system-dependent
28169a0819Smrgdefinitions.  Finally, it creates a shell script `config.status' that
29169a0819Smrgyou can run in the future to recreate the current configuration, and a
30169a0819Smrgfile `config.log' containing compiler output (useful mainly for
31169a0819Smrgdebugging `configure').
32169a0819Smrg
33169a0819Smrg   It can also use an optional file (typically called `config.cache'
34169a0819Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
35169a0819Smrgthe results of its tests to speed up reconfiguring.  Caching is
36169a0819Smrgdisabled by default to prevent problems with accidental use of stale
37169a0819Smrgcache files.
38169a0819Smrg
39169a0819Smrg   If you need to do unusual things to compile the package, please try
40169a0819Smrgto figure out how `configure' could check whether to do them, and mail
41169a0819Smrgdiffs or instructions to the address given in the `README' so they can
42169a0819Smrgbe considered for the next release.  If you are using the cache, and at
43169a0819Smrgsome point `config.cache' contains results you don't want to keep, you
44169a0819Smrgmay remove or edit it.
45169a0819Smrg
46169a0819Smrg   The file `configure.ac' (or `configure.in') is used to create
47169a0819Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
48169a0819Smrgyou want to change it or regenerate `configure' using a newer version
49169a0819Smrgof `autoconf'.
50169a0819Smrg
5195fdd44cSmrg   The simplest way to compile this package is:
52169a0819Smrg
53169a0819Smrg  1. `cd' to the directory containing the package's source code and type
54169a0819Smrg     `./configure' to configure the package for your system.
55169a0819Smrg
56169a0819Smrg     Running `configure' might take a while.  While running, it prints
57169a0819Smrg     some messages telling which features it is checking for.
58169a0819Smrg
59169a0819Smrg  2. Type `make' to compile the package.
60169a0819Smrg
61169a0819Smrg  3. Optionally, type `make check' to run any self-tests that come with
6295fdd44cSmrg     the package, generally using the just-built uninstalled binaries.
63169a0819Smrg
64169a0819Smrg  4. Type `make install' to install the programs and any data files and
6595fdd44cSmrg     documentation.  When installing into a prefix owned by root, it is
6695fdd44cSmrg     recommended that the package be configured and built as a regular
6795fdd44cSmrg     user, and only the `make install' phase executed with root
6895fdd44cSmrg     privileges.
6995fdd44cSmrg
7095fdd44cSmrg  5. Optionally, type `make installcheck' to repeat any self-tests, but
7195fdd44cSmrg     this time using the binaries in their final installed location.
7295fdd44cSmrg     This target does not install anything.  Running this target as a
7395fdd44cSmrg     regular user, particularly if the prior `make install' required
7495fdd44cSmrg     root privileges, verifies that the installation completed
7595fdd44cSmrg     correctly.
7695fdd44cSmrg
7795fdd44cSmrg  6. You can remove the program binaries and object files from the
78169a0819Smrg     source code directory by typing `make clean'.  To also remove the
79169a0819Smrg     files that `configure' created (so you can compile the package for
80169a0819Smrg     a different kind of computer), type `make distclean'.  There is
81169a0819Smrg     also a `make maintainer-clean' target, but that is intended mainly
82169a0819Smrg     for the package's developers.  If you use it, you may have to get
83169a0819Smrg     all sorts of other programs in order to regenerate files that came
84169a0819Smrg     with the distribution.
85169a0819Smrg
8695fdd44cSmrg  7. Often, you can also type `make uninstall' to remove the installed
8795fdd44cSmrg     files again.  In practice, not all packages have tested that
8895fdd44cSmrg     uninstallation works correctly, even though it is required by the
8995fdd44cSmrg     GNU Coding Standards.
9095fdd44cSmrg
9195fdd44cSmrg  8. Some packages, particularly those that use Automake, provide `make
9295fdd44cSmrg     distcheck', which can by used by developers to test that all other
9395fdd44cSmrg     targets like `make install' and `make uninstall' work correctly.
9495fdd44cSmrg     This target is generally not run by end users.
95169a0819Smrg
96169a0819SmrgCompilers and Options
97169a0819Smrg=====================
98169a0819Smrg
99169a0819Smrg   Some systems require unusual options for compilation or linking that
100169a0819Smrgthe `configure' script does not know about.  Run `./configure --help'
101169a0819Smrgfor details on some of the pertinent environment variables.
102169a0819Smrg
103169a0819Smrg   You can give `configure' initial values for configuration parameters
104169a0819Smrgby setting variables in the command line or in the environment.  Here
105169a0819Smrgis an example:
106169a0819Smrg
107169a0819Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
108169a0819Smrg
109169a0819Smrg   *Note Defining Variables::, for more details.
110169a0819Smrg
111169a0819SmrgCompiling For Multiple Architectures
112169a0819Smrg====================================
113169a0819Smrg
114169a0819Smrg   You can compile the package for more than one kind of computer at the
115169a0819Smrgsame time, by placing the object files for each architecture in their
116169a0819Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
117169a0819Smrgdirectory where you want the object files and executables to go and run
118169a0819Smrgthe `configure' script.  `configure' automatically checks for the
11995fdd44cSmrgsource code in the directory that `configure' is in and in `..'.  This
12095fdd44cSmrgis known as a "VPATH" build.
121169a0819Smrg
122169a0819Smrg   With a non-GNU `make', it is safer to compile the package for one
123169a0819Smrgarchitecture at a time in the source code directory.  After you have
124169a0819Smrginstalled the package for one architecture, use `make distclean' before
125169a0819Smrgreconfiguring for another architecture.
126169a0819Smrg
127169a0819Smrg   On MacOS X 10.5 and later systems, you can create libraries and
128169a0819Smrgexecutables that work on multiple system types--known as "fat" or
129169a0819Smrg"universal" binaries--by specifying multiple `-arch' options to the
130169a0819Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
131169a0819Smrgthis:
132169a0819Smrg
133169a0819Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
134169a0819Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
135169a0819Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
136169a0819Smrg
137169a0819Smrg   This is not guaranteed to produce working output in all cases, you
138169a0819Smrgmay have to build one architecture at a time and combine the results
139169a0819Smrgusing the `lipo' tool if you have problems.
140169a0819Smrg
141169a0819SmrgInstallation Names
142169a0819Smrg==================
143169a0819Smrg
144169a0819Smrg   By default, `make install' installs the package's commands under
145169a0819Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
146169a0819Smrgcan specify an installation prefix other than `/usr/local' by giving
14795fdd44cSmrg`configure' the option `--prefix=PREFIX', where PREFIX must be an
14895fdd44cSmrgabsolute file name.
149169a0819Smrg
150169a0819Smrg   You can specify separate installation prefixes for
151169a0819Smrgarchitecture-specific files and architecture-independent files.  If you
152169a0819Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
153169a0819SmrgPREFIX as the prefix for installing programs and libraries.
154169a0819SmrgDocumentation and other data files still use the regular prefix.
155169a0819Smrg
156169a0819Smrg   In addition, if you use an unusual directory layout you can give
157169a0819Smrgoptions like `--bindir=DIR' to specify different values for particular
158169a0819Smrgkinds of files.  Run `configure --help' for a list of the directories
15995fdd44cSmrgyou can set and what kinds of files go in them.  In general, the
16095fdd44cSmrgdefault for these options is expressed in terms of `${prefix}', so that
16195fdd44cSmrgspecifying just `--prefix' will affect all of the other directory
16295fdd44cSmrgspecifications that were not explicitly provided.
16395fdd44cSmrg
16495fdd44cSmrg   The most portable way to affect installation locations is to pass the
16595fdd44cSmrgcorrect locations to `configure'; however, many packages provide one or
16695fdd44cSmrgboth of the following shortcuts of passing variable assignments to the
16795fdd44cSmrg`make install' command line to change installation locations without
16895fdd44cSmrghaving to reconfigure or recompile.
16995fdd44cSmrg
17095fdd44cSmrg   The first method involves providing an override variable for each
17195fdd44cSmrgaffected directory.  For example, `make install
17295fdd44cSmrgprefix=/alternate/directory' will choose an alternate location for all
17395fdd44cSmrgdirectory configuration variables that were expressed in terms of
17495fdd44cSmrg`${prefix}'.  Any directories that were specified during `configure',
17595fdd44cSmrgbut not in terms of `${prefix}', must each be overridden at install
17695fdd44cSmrgtime for the entire installation to be relocated.  The approach of
17795fdd44cSmrgmakefile variable overrides for each directory variable is required by
17895fdd44cSmrgthe GNU Coding Standards, and ideally causes no recompilation.
17995fdd44cSmrgHowever, some platforms have known limitations with the semantics of
18095fdd44cSmrgshared libraries that end up requiring recompilation when using this
18195fdd44cSmrgmethod, particularly noticeable in packages that use GNU Libtool.
18295fdd44cSmrg
18395fdd44cSmrg   The second method involves providing the `DESTDIR' variable.  For
18495fdd44cSmrgexample, `make install DESTDIR=/alternate/directory' will prepend
18595fdd44cSmrg`/alternate/directory' before all installation names.  The approach of
18695fdd44cSmrg`DESTDIR' overrides is not required by the GNU Coding Standards, and
18795fdd44cSmrgdoes not work on platforms that have drive letters.  On the other hand,
18895fdd44cSmrgit does better at avoiding recompilation issues, and works well even
18995fdd44cSmrgwhen some directory options were not specified in terms of `${prefix}'
19095fdd44cSmrgat `configure' time.
19195fdd44cSmrg
19295fdd44cSmrgOptional Features
19395fdd44cSmrg=================
194169a0819Smrg
195169a0819Smrg   If the package supports it, you can cause programs to be installed
196169a0819Smrgwith an extra prefix or suffix on their names by giving `configure' the
197169a0819Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
198169a0819Smrg
199169a0819Smrg   Some packages pay attention to `--enable-FEATURE' options to
200169a0819Smrg`configure', where FEATURE indicates an optional part of the package.
201169a0819SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
202169a0819Smrgis something like `gnu-as' or `x' (for the X Window System).  The
203169a0819Smrg`README' should mention any `--enable-' and `--with-' options that the
204169a0819Smrgpackage recognizes.
205169a0819Smrg
206169a0819Smrg   For packages that use the X Window System, `configure' can usually
207169a0819Smrgfind the X include and library files automatically, but if it doesn't,
208169a0819Smrgyou can use the `configure' options `--x-includes=DIR' and
209169a0819Smrg`--x-libraries=DIR' to specify their locations.
210169a0819Smrg
21195fdd44cSmrg   Some packages offer the ability to configure how verbose the
21295fdd44cSmrgexecution of `make' will be.  For these packages, running `./configure
21395fdd44cSmrg--enable-silent-rules' sets the default to minimal output, which can be
21495fdd44cSmrgoverridden with `make V=1'; while running `./configure
21595fdd44cSmrg--disable-silent-rules' sets the default to verbose, which can be
21695fdd44cSmrgoverridden with `make V=0'.
21795fdd44cSmrg
218169a0819SmrgParticular systems
219169a0819Smrg==================
220169a0819Smrg
221169a0819Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
222169a0819SmrgCC is not installed, it is recommended to use the following options in
223169a0819Smrgorder to use an ANSI C compiler:
224169a0819Smrg
22595fdd44cSmrg     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
226169a0819Smrg
227169a0819Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
228169a0819Smrg
22995fdd44cSmrg   HP-UX `make' updates targets which have the same time stamps as
23095fdd44cSmrgtheir prerequisites, which makes it generally unusable when shipped
23195fdd44cSmrggenerated files such as `configure' are involved.  Use GNU `make'
23295fdd44cSmrginstead.
23395fdd44cSmrg
234169a0819Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
235169a0819Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
236169a0819Smrga workaround.  If GNU CC is not installed, it is therefore recommended
237169a0819Smrgto try
238169a0819Smrg
239169a0819Smrg     ./configure CC="cc"
240169a0819Smrg
241169a0819Smrgand if that doesn't work, try
242169a0819Smrg
243169a0819Smrg     ./configure CC="cc -nodtk"
244169a0819Smrg
24595fdd44cSmrg   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
24695fdd44cSmrgdirectory contains several dysfunctional programs; working variants of
24795fdd44cSmrgthese programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
24895fdd44cSmrgin your `PATH', put it _after_ `/usr/bin'.
24995fdd44cSmrg
25095fdd44cSmrg   On Haiku, software installed for all users goes in `/boot/common',
25195fdd44cSmrgnot `/usr/local'.  It is recommended to use the following options:
25295fdd44cSmrg
25395fdd44cSmrg     ./configure --prefix=/boot/common
25495fdd44cSmrg
255169a0819SmrgSpecifying the System Type
256169a0819Smrg==========================
257169a0819Smrg
258169a0819Smrg   There may be some features `configure' cannot figure out
259169a0819Smrgautomatically, but needs to determine by the type of machine the package
260169a0819Smrgwill run on.  Usually, assuming the package is built to be run on the
261169a0819Smrg_same_ architectures, `configure' can figure that out, but if it prints
262169a0819Smrga message saying it cannot guess the machine type, give it the
263169a0819Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
264169a0819Smrgtype, such as `sun4', or a canonical name which has the form:
265169a0819Smrg
266169a0819Smrg     CPU-COMPANY-SYSTEM
267169a0819Smrg
268169a0819Smrgwhere SYSTEM can have one of these forms:
269169a0819Smrg
27095fdd44cSmrg     OS
27195fdd44cSmrg     KERNEL-OS
272169a0819Smrg
273169a0819Smrg   See the file `config.sub' for the possible values of each field.  If
274169a0819Smrg`config.sub' isn't included in this package, then this package doesn't
275169a0819Smrgneed to know the machine type.
276169a0819Smrg
277169a0819Smrg   If you are _building_ compiler tools for cross-compiling, you should
278169a0819Smrguse the option `--target=TYPE' to select the type of system they will
279169a0819Smrgproduce code for.
280169a0819Smrg
281169a0819Smrg   If you want to _use_ a cross compiler, that generates code for a
282169a0819Smrgplatform different from the build platform, you should specify the
283169a0819Smrg"host" platform (i.e., that on which the generated programs will
284169a0819Smrgeventually be run) with `--host=TYPE'.
285169a0819Smrg
286169a0819SmrgSharing Defaults
287169a0819Smrg================
288169a0819Smrg
289169a0819Smrg   If you want to set default values for `configure' scripts to share,
290169a0819Smrgyou can create a site shell script called `config.site' that gives
291169a0819Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
292169a0819Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
293169a0819Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
294169a0819Smrg`CONFIG_SITE' environment variable to the location of the site script.
295169a0819SmrgA warning: not all `configure' scripts look for a site script.
296169a0819Smrg
297169a0819SmrgDefining Variables
298169a0819Smrg==================
299169a0819Smrg
300169a0819Smrg   Variables not defined in a site shell script can be set in the
301169a0819Smrgenvironment passed to `configure'.  However, some packages may run
302169a0819Smrgconfigure again during the build, and the customized values of these
303169a0819Smrgvariables may be lost.  In order to avoid this problem, you should set
304169a0819Smrgthem in the `configure' command line, using `VAR=value'.  For example:
305169a0819Smrg
306169a0819Smrg     ./configure CC=/usr/local2/bin/gcc
307169a0819Smrg
308169a0819Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
309169a0819Smrgoverridden in the site shell script).
310169a0819Smrg
311169a0819SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
312169a0819Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
313169a0819Smrg
314169a0819Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
315169a0819Smrg
316169a0819Smrg`configure' Invocation
317169a0819Smrg======================
318169a0819Smrg
319169a0819Smrg   `configure' recognizes the following options to control how it
320169a0819Smrgoperates.
321169a0819Smrg
322169a0819Smrg`--help'
323169a0819Smrg`-h'
324169a0819Smrg     Print a summary of all of the options to `configure', and exit.
325169a0819Smrg
326169a0819Smrg`--help=short'
327169a0819Smrg`--help=recursive'
328169a0819Smrg     Print a summary of the options unique to this package's
329169a0819Smrg     `configure', and exit.  The `short' variant lists options used
330169a0819Smrg     only in the top level, while the `recursive' variant lists options
331169a0819Smrg     also present in any nested packages.
332169a0819Smrg
333169a0819Smrg`--version'
334169a0819Smrg`-V'
335169a0819Smrg     Print the version of Autoconf used to generate the `configure'
336169a0819Smrg     script, and exit.
337169a0819Smrg
338169a0819Smrg`--cache-file=FILE'
339169a0819Smrg     Enable the cache: use and save the results of the tests in FILE,
340169a0819Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
341169a0819Smrg     disable caching.
342169a0819Smrg
343169a0819Smrg`--config-cache'
344169a0819Smrg`-C'
345169a0819Smrg     Alias for `--cache-file=config.cache'.
346169a0819Smrg
347169a0819Smrg`--quiet'
348169a0819Smrg`--silent'
349169a0819Smrg`-q'
350169a0819Smrg     Do not print messages saying which checks are being made.  To
351169a0819Smrg     suppress all normal output, redirect it to `/dev/null' (any error
352169a0819Smrg     messages will still be shown).
353169a0819Smrg
354169a0819Smrg`--srcdir=DIR'
355169a0819Smrg     Look for the package's source code in directory DIR.  Usually
356169a0819Smrg     `configure' can determine that directory automatically.
357169a0819Smrg
358169a0819Smrg`--prefix=DIR'
35995fdd44cSmrg     Use DIR as the installation prefix.  *note Installation Names::
360169a0819Smrg     for more details, including other options available for fine-tuning
361169a0819Smrg     the installation locations.
362169a0819Smrg
363169a0819Smrg`--no-create'
364169a0819Smrg`-n'
365169a0819Smrg     Run the configure checks, but stop before creating any output
366169a0819Smrg     files.
367169a0819Smrg
368169a0819Smrg`configure' also accepts some other, not widely useful, options.  Run
369169a0819Smrg`configure --help' for more details.
370169a0819Smrg
371