INSTALL revision ec74af46
10fa2845dSmrgInstallation Instructions
20fa2845dSmrg*************************
30fa2845dSmrg
4ec74af46SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
5ec74af46Smrg2006, 2007, 2008 Free Software Foundation, Inc.
60fa2845dSmrg
7ec74af46Smrg   This file is free documentation; the Free Software Foundation gives
80fa2845dSmrgunlimited permission to copy, distribute and modify it.
90fa2845dSmrg
100fa2845dSmrgBasic Installation
110fa2845dSmrg==================
120fa2845dSmrg
13ec74af46Smrg   Briefly, the shell commands `./configure; make; make install' should
14ec74af46Smrgconfigure, build, and install this package.  The following
15ec74af46Smrgmore-detailed instructions are generic; see the `README' file for
16ec74af46Smrginstructions specific to this package.
170fa2845dSmrg
180fa2845dSmrg   The `configure' shell script attempts to guess correct values for
190fa2845dSmrgvarious system-dependent variables used during compilation.  It uses
200fa2845dSmrgthose values to create a `Makefile' in each directory of the package.
210fa2845dSmrgIt may also create one or more `.h' files containing system-dependent
220fa2845dSmrgdefinitions.  Finally, it creates a shell script `config.status' that
230fa2845dSmrgyou can run in the future to recreate the current configuration, and a
240fa2845dSmrgfile `config.log' containing compiler output (useful mainly for
250fa2845dSmrgdebugging `configure').
260fa2845dSmrg
270fa2845dSmrg   It can also use an optional file (typically called `config.cache'
280fa2845dSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
29ec74af46Smrgthe results of its tests to speed up reconfiguring.  Caching is
300fa2845dSmrgdisabled by default to prevent problems with accidental use of stale
31ec74af46Smrgcache files.
320fa2845dSmrg
330fa2845dSmrg   If you need to do unusual things to compile the package, please try
340fa2845dSmrgto figure out how `configure' could check whether to do them, and mail
350fa2845dSmrgdiffs or instructions to the address given in the `README' so they can
360fa2845dSmrgbe considered for the next release.  If you are using the cache, and at
370fa2845dSmrgsome point `config.cache' contains results you don't want to keep, you
380fa2845dSmrgmay remove or edit it.
390fa2845dSmrg
400fa2845dSmrg   The file `configure.ac' (or `configure.in') is used to create
41ec74af46Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
42ec74af46Smrgyou want to change it or regenerate `configure' using a newer version
43ec74af46Smrgof `autoconf'.
440fa2845dSmrg
450fa2845dSmrgThe simplest way to compile this package is:
460fa2845dSmrg
470fa2845dSmrg  1. `cd' to the directory containing the package's source code and type
48ec74af46Smrg     `./configure' to configure the package for your system.
490fa2845dSmrg
50ec74af46Smrg     Running `configure' might take a while.  While running, it prints
51ec74af46Smrg     some messages telling which features it is checking for.
520fa2845dSmrg
530fa2845dSmrg  2. Type `make' to compile the package.
540fa2845dSmrg
550fa2845dSmrg  3. Optionally, type `make check' to run any self-tests that come with
560fa2845dSmrg     the package.
570fa2845dSmrg
580fa2845dSmrg  4. Type `make install' to install the programs and any data files and
590fa2845dSmrg     documentation.
600fa2845dSmrg
610fa2845dSmrg  5. You can remove the program binaries and object files from the
620fa2845dSmrg     source code directory by typing `make clean'.  To also remove the
630fa2845dSmrg     files that `configure' created (so you can compile the package for
640fa2845dSmrg     a different kind of computer), type `make distclean'.  There is
650fa2845dSmrg     also a `make maintainer-clean' target, but that is intended mainly
660fa2845dSmrg     for the package's developers.  If you use it, you may have to get
670fa2845dSmrg     all sorts of other programs in order to regenerate files that came
680fa2845dSmrg     with the distribution.
690fa2845dSmrg
70ec74af46Smrg  6. Often, you can also type `make uninstall' to remove the installed
71ec74af46Smrg     files again.
72ec74af46Smrg
730fa2845dSmrgCompilers and Options
740fa2845dSmrg=====================
750fa2845dSmrg
76ec74af46Smrg   Some systems require unusual options for compilation or linking that
77ec74af46Smrgthe `configure' script does not know about.  Run `./configure --help'
78ec74af46Smrgfor details on some of the pertinent environment variables.
790fa2845dSmrg
800fa2845dSmrg   You can give `configure' initial values for configuration parameters
810fa2845dSmrgby setting variables in the command line or in the environment.  Here
820fa2845dSmrgis an example:
830fa2845dSmrg
84ec74af46Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
850fa2845dSmrg
860fa2845dSmrg   *Note Defining Variables::, for more details.
870fa2845dSmrg
880fa2845dSmrgCompiling For Multiple Architectures
890fa2845dSmrg====================================
900fa2845dSmrg
91ec74af46Smrg   You can compile the package for more than one kind of computer at the
920fa2845dSmrgsame time, by placing the object files for each architecture in their
93ec74af46Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
940fa2845dSmrgdirectory where you want the object files and executables to go and run
950fa2845dSmrgthe `configure' script.  `configure' automatically checks for the
960fa2845dSmrgsource code in the directory that `configure' is in and in `..'.
970fa2845dSmrg
98ec74af46Smrg   With a non-GNU `make', it is safer to compile the package for one
99ec74af46Smrgarchitecture at a time in the source code directory.  After you have
100ec74af46Smrginstalled the package for one architecture, use `make distclean' before
101ec74af46Smrgreconfiguring for another architecture.
102ec74af46Smrg
103ec74af46Smrg   On MacOS X 10.5 and later systems, you can create libraries and
104ec74af46Smrgexecutables that work on multiple system types--known as "fat" or
105ec74af46Smrg"universal" binaries--by specifying multiple `-arch' options to the
106ec74af46Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
107ec74af46Smrgthis:
108ec74af46Smrg
109ec74af46Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
110ec74af46Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
111ec74af46Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
112ec74af46Smrg
113ec74af46Smrg   This is not guaranteed to produce working output in all cases, you
114ec74af46Smrgmay have to build one architecture at a time and combine the results
115ec74af46Smrgusing the `lipo' tool if you have problems.
1160fa2845dSmrg
1170fa2845dSmrgInstallation Names
1180fa2845dSmrg==================
1190fa2845dSmrg
120ec74af46Smrg   By default, `make install' installs the package's commands under
121ec74af46Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
122ec74af46Smrgcan specify an installation prefix other than `/usr/local' by giving
123ec74af46Smrg`configure' the option `--prefix=PREFIX'.
1240fa2845dSmrg
1250fa2845dSmrg   You can specify separate installation prefixes for
1260fa2845dSmrgarchitecture-specific files and architecture-independent files.  If you
127ec74af46Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
128ec74af46SmrgPREFIX as the prefix for installing programs and libraries.
129ec74af46SmrgDocumentation and other data files still use the regular prefix.
1300fa2845dSmrg
1310fa2845dSmrg   In addition, if you use an unusual directory layout you can give
1320fa2845dSmrgoptions like `--bindir=DIR' to specify different values for particular
1330fa2845dSmrgkinds of files.  Run `configure --help' for a list of the directories
1340fa2845dSmrgyou can set and what kinds of files go in them.
1350fa2845dSmrg
1360fa2845dSmrg   If the package supports it, you can cause programs to be installed
1370fa2845dSmrgwith an extra prefix or suffix on their names by giving `configure' the
1380fa2845dSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
1390fa2845dSmrg
1400fa2845dSmrgOptional Features
1410fa2845dSmrg=================
1420fa2845dSmrg
143ec74af46Smrg   Some packages pay attention to `--enable-FEATURE' options to
1440fa2845dSmrg`configure', where FEATURE indicates an optional part of the package.
1450fa2845dSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
1460fa2845dSmrgis something like `gnu-as' or `x' (for the X Window System).  The
1470fa2845dSmrg`README' should mention any `--enable-' and `--with-' options that the
1480fa2845dSmrgpackage recognizes.
1490fa2845dSmrg
1500fa2845dSmrg   For packages that use the X Window System, `configure' can usually
1510fa2845dSmrgfind the X include and library files automatically, but if it doesn't,
1520fa2845dSmrgyou can use the `configure' options `--x-includes=DIR' and
1530fa2845dSmrg`--x-libraries=DIR' to specify their locations.
1540fa2845dSmrg
155ec74af46SmrgParticular systems
156ec74af46Smrg==================
157ec74af46Smrg
158ec74af46Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
159ec74af46SmrgCC is not installed, it is recommended to use the following options in
160ec74af46Smrgorder to use an ANSI C compiler:
161ec74af46Smrg
162ec74af46Smrg     ./configure CC="cc -Ae"
163ec74af46Smrg
164ec74af46Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
165ec74af46Smrg
166ec74af46Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
167ec74af46Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
168ec74af46Smrga workaround.  If GNU CC is not installed, it is therefore recommended
169ec74af46Smrgto try
170ec74af46Smrg
171ec74af46Smrg     ./configure CC="cc"
172ec74af46Smrg
173ec74af46Smrgand if that doesn't work, try
174ec74af46Smrg
175ec74af46Smrg     ./configure CC="cc -nodtk"
176ec74af46Smrg
1770fa2845dSmrgSpecifying the System Type
1780fa2845dSmrg==========================
1790fa2845dSmrg
180ec74af46Smrg   There may be some features `configure' cannot figure out
181ec74af46Smrgautomatically, but needs to determine by the type of machine the package
182ec74af46Smrgwill run on.  Usually, assuming the package is built to be run on the
183ec74af46Smrg_same_ architectures, `configure' can figure that out, but if it prints
184ec74af46Smrga message saying it cannot guess the machine type, give it the
1850fa2845dSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
1860fa2845dSmrgtype, such as `sun4', or a canonical name which has the form:
1870fa2845dSmrg
1880fa2845dSmrg     CPU-COMPANY-SYSTEM
1890fa2845dSmrg
1900fa2845dSmrgwhere SYSTEM can have one of these forms:
1910fa2845dSmrg
1920fa2845dSmrg     OS KERNEL-OS
1930fa2845dSmrg
1940fa2845dSmrg   See the file `config.sub' for the possible values of each field.  If
1950fa2845dSmrg`config.sub' isn't included in this package, then this package doesn't
1960fa2845dSmrgneed to know the machine type.
1970fa2845dSmrg
1980fa2845dSmrg   If you are _building_ compiler tools for cross-compiling, you should
199ec74af46Smrguse the option `--target=TYPE' to select the type of system they will
2000fa2845dSmrgproduce code for.
2010fa2845dSmrg
2020fa2845dSmrg   If you want to _use_ a cross compiler, that generates code for a
2030fa2845dSmrgplatform different from the build platform, you should specify the
2040fa2845dSmrg"host" platform (i.e., that on which the generated programs will
2050fa2845dSmrgeventually be run) with `--host=TYPE'.
2060fa2845dSmrg
2070fa2845dSmrgSharing Defaults
2080fa2845dSmrg================
2090fa2845dSmrg
210ec74af46Smrg   If you want to set default values for `configure' scripts to share,
211ec74af46Smrgyou can create a site shell script called `config.site' that gives
212ec74af46Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
2130fa2845dSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
2140fa2845dSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
2150fa2845dSmrg`CONFIG_SITE' environment variable to the location of the site script.
2160fa2845dSmrgA warning: not all `configure' scripts look for a site script.
2170fa2845dSmrg
2180fa2845dSmrgDefining Variables
2190fa2845dSmrg==================
2200fa2845dSmrg
221ec74af46Smrg   Variables not defined in a site shell script can be set in the
2220fa2845dSmrgenvironment passed to `configure'.  However, some packages may run
2230fa2845dSmrgconfigure again during the build, and the customized values of these
2240fa2845dSmrgvariables may be lost.  In order to avoid this problem, you should set
2250fa2845dSmrgthem in the `configure' command line, using `VAR=value'.  For example:
2260fa2845dSmrg
2270fa2845dSmrg     ./configure CC=/usr/local2/bin/gcc
2280fa2845dSmrg
2290fa2845dSmrgcauses the specified `gcc' to be used as the C compiler (unless it is
230ec74af46Smrgoverridden in the site shell script).
2310fa2845dSmrg
232ec74af46SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
233ec74af46Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
2340fa2845dSmrg
235ec74af46Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
2360fa2845dSmrg
2370fa2845dSmrg`configure' Invocation
2380fa2845dSmrg======================
2390fa2845dSmrg
240ec74af46Smrg   `configure' recognizes the following options to control how it
241ec74af46Smrgoperates.
2420fa2845dSmrg
2430fa2845dSmrg`--help'
2440fa2845dSmrg`-h'
245ec74af46Smrg     Print a summary of all of the options to `configure', and exit.
246ec74af46Smrg
247ec74af46Smrg`--help=short'
248ec74af46Smrg`--help=recursive'
249ec74af46Smrg     Print a summary of the options unique to this package's
250ec74af46Smrg     `configure', and exit.  The `short' variant lists options used
251ec74af46Smrg     only in the top level, while the `recursive' variant lists options
252ec74af46Smrg     also present in any nested packages.
2530fa2845dSmrg
2540fa2845dSmrg`--version'
2550fa2845dSmrg`-V'
2560fa2845dSmrg     Print the version of Autoconf used to generate the `configure'
2570fa2845dSmrg     script, and exit.
2580fa2845dSmrg
2590fa2845dSmrg`--cache-file=FILE'
2600fa2845dSmrg     Enable the cache: use and save the results of the tests in FILE,
2610fa2845dSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
2620fa2845dSmrg     disable caching.
2630fa2845dSmrg
2640fa2845dSmrg`--config-cache'
2650fa2845dSmrg`-C'
2660fa2845dSmrg     Alias for `--cache-file=config.cache'.
2670fa2845dSmrg
2680fa2845dSmrg`--quiet'
2690fa2845dSmrg`--silent'
2700fa2845dSmrg`-q'
2710fa2845dSmrg     Do not print messages saying which checks are being made.  To
2720fa2845dSmrg     suppress all normal output, redirect it to `/dev/null' (any error
2730fa2845dSmrg     messages will still be shown).
2740fa2845dSmrg
2750fa2845dSmrg`--srcdir=DIR'
2760fa2845dSmrg     Look for the package's source code in directory DIR.  Usually
2770fa2845dSmrg     `configure' can determine that directory automatically.
2780fa2845dSmrg
279ec74af46Smrg`--prefix=DIR'
280ec74af46Smrg     Use DIR as the installation prefix.  *Note Installation Names::
281ec74af46Smrg     for more details, including other options available for fine-tuning
282ec74af46Smrg     the installation locations.
283ec74af46Smrg
284ec74af46Smrg`--no-create'
285ec74af46Smrg`-n'
286ec74af46Smrg     Run the configure checks, but stop before creating any output
287ec74af46Smrg     files.
288ec74af46Smrg
2890fa2845dSmrg`configure' also accepts some other, not widely useful, options.  Run
2900fa2845dSmrg`configure --help' for more details.
2910fa2845dSmrg
292