INSTALL revision b9b4fd27
1b9b4fd27SmrgInstallation Instructions
2b9b4fd27Smrg*************************
3b9b4fd27Smrg
4b9b4fd27SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
5b9b4fd27Smrg2006, 2007, 2008 Free Software Foundation, Inc.
6caade7ccSmrg
7caade7ccSmrg   This file is free documentation; the Free Software Foundation gives
8caade7ccSmrgunlimited permission to copy, distribute and modify it.
9caade7ccSmrg
10caade7ccSmrgBasic Installation
11caade7ccSmrg==================
12caade7ccSmrg
13b9b4fd27Smrg   Briefly, the shell commands `./configure; make; make install' should
14b9b4fd27Smrgconfigure, build, and install this package.  The following
15b9b4fd27Smrgmore-detailed instructions are generic; see the `README' file for
16b9b4fd27Smrginstructions specific to this package.
17caade7ccSmrg
18caade7ccSmrg   The `configure' shell script attempts to guess correct values for
19caade7ccSmrgvarious system-dependent variables used during compilation.  It uses
20caade7ccSmrgthose values to create a `Makefile' in each directory of the package.
21caade7ccSmrgIt may also create one or more `.h' files containing system-dependent
22caade7ccSmrgdefinitions.  Finally, it creates a shell script `config.status' that
23caade7ccSmrgyou can run in the future to recreate the current configuration, and a
24caade7ccSmrgfile `config.log' containing compiler output (useful mainly for
25caade7ccSmrgdebugging `configure').
26caade7ccSmrg
27caade7ccSmrg   It can also use an optional file (typically called `config.cache'
28caade7ccSmrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
29b9b4fd27Smrgthe results of its tests to speed up reconfiguring.  Caching is
30caade7ccSmrgdisabled by default to prevent problems with accidental use of stale
31b9b4fd27Smrgcache files.
32caade7ccSmrg
33caade7ccSmrg   If you need to do unusual things to compile the package, please try
34caade7ccSmrgto figure out how `configure' could check whether to do them, and mail
35caade7ccSmrgdiffs or instructions to the address given in the `README' so they can
36caade7ccSmrgbe considered for the next release.  If you are using the cache, and at
37caade7ccSmrgsome point `config.cache' contains results you don't want to keep, you
38caade7ccSmrgmay remove or edit it.
39caade7ccSmrg
40caade7ccSmrg   The file `configure.ac' (or `configure.in') is used to create
41b9b4fd27Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
42b9b4fd27Smrgyou want to change it or regenerate `configure' using a newer version
43b9b4fd27Smrgof `autoconf'.
44caade7ccSmrg
45caade7ccSmrgThe simplest way to compile this package is:
46caade7ccSmrg
47caade7ccSmrg  1. `cd' to the directory containing the package's source code and type
48b9b4fd27Smrg     `./configure' to configure the package for your system.
49caade7ccSmrg
50b9b4fd27Smrg     Running `configure' might take a while.  While running, it prints
51b9b4fd27Smrg     some messages telling which features it is checking for.
52caade7ccSmrg
53caade7ccSmrg  2. Type `make' to compile the package.
54caade7ccSmrg
55caade7ccSmrg  3. Optionally, type `make check' to run any self-tests that come with
56caade7ccSmrg     the package.
57caade7ccSmrg
58caade7ccSmrg  4. Type `make install' to install the programs and any data files and
59caade7ccSmrg     documentation.
60caade7ccSmrg
61caade7ccSmrg  5. You can remove the program binaries and object files from the
62caade7ccSmrg     source code directory by typing `make clean'.  To also remove the
63caade7ccSmrg     files that `configure' created (so you can compile the package for
64caade7ccSmrg     a different kind of computer), type `make distclean'.  There is
65caade7ccSmrg     also a `make maintainer-clean' target, but that is intended mainly
66caade7ccSmrg     for the package's developers.  If you use it, you may have to get
67caade7ccSmrg     all sorts of other programs in order to regenerate files that came
68caade7ccSmrg     with the distribution.
69caade7ccSmrg
70b9b4fd27Smrg  6. Often, you can also type `make uninstall' to remove the installed
71b9b4fd27Smrg     files again.
72b9b4fd27Smrg
73caade7ccSmrgCompilers and Options
74caade7ccSmrg=====================
75caade7ccSmrg
76caade7ccSmrg   Some systems require unusual options for compilation or linking that
77caade7ccSmrgthe `configure' script does not know about.  Run `./configure --help'
78caade7ccSmrgfor details on some of the pertinent environment variables.
79caade7ccSmrg
80caade7ccSmrg   You can give `configure' initial values for configuration parameters
81caade7ccSmrgby setting variables in the command line or in the environment.  Here
82caade7ccSmrgis an example:
83caade7ccSmrg
84b9b4fd27Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
85caade7ccSmrg
86caade7ccSmrg   *Note Defining Variables::, for more details.
87caade7ccSmrg
88caade7ccSmrgCompiling For Multiple Architectures
89caade7ccSmrg====================================
90caade7ccSmrg
91caade7ccSmrg   You can compile the package for more than one kind of computer at the
92caade7ccSmrgsame time, by placing the object files for each architecture in their
93b9b4fd27Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
94caade7ccSmrgdirectory where you want the object files and executables to go and run
95caade7ccSmrgthe `configure' script.  `configure' automatically checks for the
96caade7ccSmrgsource code in the directory that `configure' is in and in `..'.
97caade7ccSmrg
98b9b4fd27Smrg   With a non-GNU `make', it is safer to compile the package for one
99b9b4fd27Smrgarchitecture at a time in the source code directory.  After you have
100b9b4fd27Smrginstalled the package for one architecture, use `make distclean' before
101b9b4fd27Smrgreconfiguring for another architecture.
102b9b4fd27Smrg
103b9b4fd27Smrg   On MacOS X 10.5 and later systems, you can create libraries and
104b9b4fd27Smrgexecutables that work on multiple system types--known as "fat" or
105b9b4fd27Smrg"universal" binaries--by specifying multiple `-arch' options to the
106b9b4fd27Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
107b9b4fd27Smrgthis:
108b9b4fd27Smrg
109b9b4fd27Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
110b9b4fd27Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
111b9b4fd27Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
112b9b4fd27Smrg
113b9b4fd27Smrg   This is not guaranteed to produce working output in all cases, you
114b9b4fd27Smrgmay have to build one architecture at a time and combine the results
115b9b4fd27Smrgusing the `lipo' tool if you have problems.
116caade7ccSmrg
117caade7ccSmrgInstallation Names
118caade7ccSmrg==================
119caade7ccSmrg
120b9b4fd27Smrg   By default, `make install' installs the package's commands under
121b9b4fd27Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
122b9b4fd27Smrgcan specify an installation prefix other than `/usr/local' by giving
123b9b4fd27Smrg`configure' the option `--prefix=PREFIX'.
124caade7ccSmrg
125caade7ccSmrg   You can specify separate installation prefixes for
126caade7ccSmrgarchitecture-specific files and architecture-independent files.  If you
127b9b4fd27Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
128b9b4fd27SmrgPREFIX as the prefix for installing programs and libraries.
129b9b4fd27SmrgDocumentation and other data files still use the regular prefix.
130caade7ccSmrg
131caade7ccSmrg   In addition, if you use an unusual directory layout you can give
132b9b4fd27Smrgoptions like `--bindir=DIR' to specify different values for particular
133caade7ccSmrgkinds of files.  Run `configure --help' for a list of the directories
134caade7ccSmrgyou can set and what kinds of files go in them.
135caade7ccSmrg
136caade7ccSmrg   If the package supports it, you can cause programs to be installed
137caade7ccSmrgwith an extra prefix or suffix on their names by giving `configure' the
138caade7ccSmrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
139caade7ccSmrg
140caade7ccSmrgOptional Features
141caade7ccSmrg=================
142caade7ccSmrg
143caade7ccSmrg   Some packages pay attention to `--enable-FEATURE' options to
144caade7ccSmrg`configure', where FEATURE indicates an optional part of the package.
145caade7ccSmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
146caade7ccSmrgis something like `gnu-as' or `x' (for the X Window System).  The
147caade7ccSmrg`README' should mention any `--enable-' and `--with-' options that the
148caade7ccSmrgpackage recognizes.
149caade7ccSmrg
150caade7ccSmrg   For packages that use the X Window System, `configure' can usually
151caade7ccSmrgfind the X include and library files automatically, but if it doesn't,
152caade7ccSmrgyou can use the `configure' options `--x-includes=DIR' and
153caade7ccSmrg`--x-libraries=DIR' to specify their locations.
154caade7ccSmrg
155b9b4fd27SmrgParticular systems
156b9b4fd27Smrg==================
157b9b4fd27Smrg
158b9b4fd27Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
159b9b4fd27SmrgCC is not installed, it is recommended to use the following options in
160b9b4fd27Smrgorder to use an ANSI C compiler:
161b9b4fd27Smrg
162b9b4fd27Smrg     ./configure CC="cc -Ae"
163b9b4fd27Smrg
164b9b4fd27Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
165b9b4fd27Smrg
166b9b4fd27Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
167b9b4fd27Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
168b9b4fd27Smrga workaround.  If GNU CC is not installed, it is therefore recommended
169b9b4fd27Smrgto try
170b9b4fd27Smrg
171b9b4fd27Smrg     ./configure CC="cc"
172b9b4fd27Smrg
173b9b4fd27Smrgand if that doesn't work, try
174b9b4fd27Smrg
175b9b4fd27Smrg     ./configure CC="cc -nodtk"
176b9b4fd27Smrg
177caade7ccSmrgSpecifying the System Type
178caade7ccSmrg==========================
179caade7ccSmrg
180caade7ccSmrg   There may be some features `configure' cannot figure out
181caade7ccSmrgautomatically, but needs to determine by the type of machine the package
182caade7ccSmrgwill run on.  Usually, assuming the package is built to be run on the
183caade7ccSmrg_same_ architectures, `configure' can figure that out, but if it prints
184caade7ccSmrga message saying it cannot guess the machine type, give it the
185caade7ccSmrg`--build=TYPE' option.  TYPE can either be a short name for the system
186caade7ccSmrgtype, such as `sun4', or a canonical name which has the form:
187caade7ccSmrg
188caade7ccSmrg     CPU-COMPANY-SYSTEM
189caade7ccSmrg
190caade7ccSmrgwhere SYSTEM can have one of these forms:
191caade7ccSmrg
192caade7ccSmrg     OS KERNEL-OS
193caade7ccSmrg
194caade7ccSmrg   See the file `config.sub' for the possible values of each field.  If
195caade7ccSmrg`config.sub' isn't included in this package, then this package doesn't
196caade7ccSmrgneed to know the machine type.
197caade7ccSmrg
198caade7ccSmrg   If you are _building_ compiler tools for cross-compiling, you should
199b9b4fd27Smrguse the option `--target=TYPE' to select the type of system they will
200caade7ccSmrgproduce code for.
201caade7ccSmrg
202caade7ccSmrg   If you want to _use_ a cross compiler, that generates code for a
203caade7ccSmrgplatform different from the build platform, you should specify the
204caade7ccSmrg"host" platform (i.e., that on which the generated programs will
205caade7ccSmrgeventually be run) with `--host=TYPE'.
206caade7ccSmrg
207caade7ccSmrgSharing Defaults
208caade7ccSmrg================
209caade7ccSmrg
210caade7ccSmrg   If you want to set default values for `configure' scripts to share,
211caade7ccSmrgyou can create a site shell script called `config.site' that gives
212caade7ccSmrgdefault values for variables like `CC', `cache_file', and `prefix'.
213caade7ccSmrg`configure' looks for `PREFIX/share/config.site' if it exists, then
214caade7ccSmrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
215caade7ccSmrg`CONFIG_SITE' environment variable to the location of the site script.
216caade7ccSmrgA warning: not all `configure' scripts look for a site script.
217caade7ccSmrg
218caade7ccSmrgDefining Variables
219caade7ccSmrg==================
220caade7ccSmrg
221caade7ccSmrg   Variables not defined in a site shell script can be set in the
222caade7ccSmrgenvironment passed to `configure'.  However, some packages may run
223caade7ccSmrgconfigure again during the build, and the customized values of these
224caade7ccSmrgvariables may be lost.  In order to avoid this problem, you should set
225caade7ccSmrgthem in the `configure' command line, using `VAR=value'.  For example:
226caade7ccSmrg
227caade7ccSmrg     ./configure CC=/usr/local2/bin/gcc
228caade7ccSmrg
229b9b4fd27Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
230caade7ccSmrgoverridden in the site shell script).
231caade7ccSmrg
232b9b4fd27SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
233b9b4fd27Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
234b9b4fd27Smrg
235b9b4fd27Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
236b9b4fd27Smrg
237caade7ccSmrg`configure' Invocation
238caade7ccSmrg======================
239caade7ccSmrg
240caade7ccSmrg   `configure' recognizes the following options to control how it
241caade7ccSmrgoperates.
242caade7ccSmrg
243caade7ccSmrg`--help'
244caade7ccSmrg`-h'
245b9b4fd27Smrg     Print a summary of all of the options to `configure', and exit.
246b9b4fd27Smrg
247b9b4fd27Smrg`--help=short'
248b9b4fd27Smrg`--help=recursive'
249b9b4fd27Smrg     Print a summary of the options unique to this package's
250b9b4fd27Smrg     `configure', and exit.  The `short' variant lists options used
251b9b4fd27Smrg     only in the top level, while the `recursive' variant lists options
252b9b4fd27Smrg     also present in any nested packages.
253caade7ccSmrg
254caade7ccSmrg`--version'
255caade7ccSmrg`-V'
256caade7ccSmrg     Print the version of Autoconf used to generate the `configure'
257caade7ccSmrg     script, and exit.
258caade7ccSmrg
259caade7ccSmrg`--cache-file=FILE'
260caade7ccSmrg     Enable the cache: use and save the results of the tests in FILE,
261caade7ccSmrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
262caade7ccSmrg     disable caching.
263caade7ccSmrg
264caade7ccSmrg`--config-cache'
265caade7ccSmrg`-C'
266caade7ccSmrg     Alias for `--cache-file=config.cache'.
267caade7ccSmrg
268caade7ccSmrg`--quiet'
269caade7ccSmrg`--silent'
270caade7ccSmrg`-q'
271caade7ccSmrg     Do not print messages saying which checks are being made.  To
272caade7ccSmrg     suppress all normal output, redirect it to `/dev/null' (any error
273caade7ccSmrg     messages will still be shown).
274caade7ccSmrg
275caade7ccSmrg`--srcdir=DIR'
276caade7ccSmrg     Look for the package's source code in directory DIR.  Usually
277caade7ccSmrg     `configure' can determine that directory automatically.
278caade7ccSmrg
279b9b4fd27Smrg`--prefix=DIR'
280b9b4fd27Smrg     Use DIR as the installation prefix.  *Note Installation Names::
281b9b4fd27Smrg     for more details, including other options available for fine-tuning
282b9b4fd27Smrg     the installation locations.
283b9b4fd27Smrg
284b9b4fd27Smrg`--no-create'
285b9b4fd27Smrg`-n'
286b9b4fd27Smrg     Run the configure checks, but stop before creating any output
287b9b4fd27Smrg     files.
288b9b4fd27Smrg
289caade7ccSmrg`configure' also accepts some other, not widely useful, options.  Run
290caade7ccSmrg`configure --help' for more details.
291caade7ccSmrg
292