INSTALL revision 165cb819
1100ae103SmrgInstallation Instructions
2100ae103Smrg*************************
3100ae103Smrg
4165cb819SmrgCopyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
5165cb819Smrg2006, 2007, 2008 Free Software Foundation, Inc.
6100ae103Smrg
7165cb819Smrg   This file is free documentation; the Free Software Foundation gives
8100ae103Smrgunlimited permission to copy, distribute and modify it.
9100ae103Smrg
10100ae103SmrgBasic Installation
11100ae103Smrg==================
12100ae103Smrg
13165cb819Smrg   Briefly, the shell commands `./configure; make; make install' should
14165cb819Smrgconfigure, build, and install this package.  The following
15165cb819Smrgmore-detailed instructions are generic; see the `README' file for
16165cb819Smrginstructions specific to this package.
17100ae103Smrg
18100ae103Smrg   The `configure' shell script attempts to guess correct values for
19100ae103Smrgvarious system-dependent variables used during compilation.  It uses
20100ae103Smrgthose values to create a `Makefile' in each directory of the package.
21100ae103SmrgIt may also create one or more `.h' files containing system-dependent
22100ae103Smrgdefinitions.  Finally, it creates a shell script `config.status' that
23100ae103Smrgyou can run in the future to recreate the current configuration, and a
24100ae103Smrgfile `config.log' containing compiler output (useful mainly for
25100ae103Smrgdebugging `configure').
26100ae103Smrg
27100ae103Smrg   It can also use an optional file (typically called `config.cache'
28100ae103Smrgand enabled with `--cache-file=config.cache' or simply `-C') that saves
29165cb819Smrgthe results of its tests to speed up reconfiguring.  Caching is
30100ae103Smrgdisabled by default to prevent problems with accidental use of stale
31165cb819Smrgcache files.
32100ae103Smrg
33100ae103Smrg   If you need to do unusual things to compile the package, please try
34100ae103Smrgto figure out how `configure' could check whether to do them, and mail
35100ae103Smrgdiffs or instructions to the address given in the `README' so they can
36100ae103Smrgbe considered for the next release.  If you are using the cache, and at
37100ae103Smrgsome point `config.cache' contains results you don't want to keep, you
38100ae103Smrgmay remove or edit it.
39100ae103Smrg
40100ae103Smrg   The file `configure.ac' (or `configure.in') is used to create
41165cb819Smrg`configure' by a program called `autoconf'.  You need `configure.ac' if
42165cb819Smrgyou want to change it or regenerate `configure' using a newer version
43165cb819Smrgof `autoconf'.
44100ae103Smrg
45100ae103SmrgThe simplest way to compile this package is:
46100ae103Smrg
47100ae103Smrg  1. `cd' to the directory containing the package's source code and type
48165cb819Smrg     `./configure' to configure the package for your system.
49100ae103Smrg
50165cb819Smrg     Running `configure' might take a while.  While running, it prints
51165cb819Smrg     some messages telling which features it is checking for.
52100ae103Smrg
53100ae103Smrg  2. Type `make' to compile the package.
54100ae103Smrg
55100ae103Smrg  3. Optionally, type `make check' to run any self-tests that come with
56100ae103Smrg     the package.
57100ae103Smrg
58100ae103Smrg  4. Type `make install' to install the programs and any data files and
59100ae103Smrg     documentation.
60100ae103Smrg
61100ae103Smrg  5. You can remove the program binaries and object files from the
62100ae103Smrg     source code directory by typing `make clean'.  To also remove the
63100ae103Smrg     files that `configure' created (so you can compile the package for
64100ae103Smrg     a different kind of computer), type `make distclean'.  There is
65100ae103Smrg     also a `make maintainer-clean' target, but that is intended mainly
66100ae103Smrg     for the package's developers.  If you use it, you may have to get
67100ae103Smrg     all sorts of other programs in order to regenerate files that came
68100ae103Smrg     with the distribution.
69100ae103Smrg
70165cb819Smrg  6. Often, you can also type `make uninstall' to remove the installed
71165cb819Smrg     files again.
72165cb819Smrg
73100ae103SmrgCompilers and Options
74100ae103Smrg=====================
75100ae103Smrg
76165cb819Smrg   Some systems require unusual options for compilation or linking that
77165cb819Smrgthe `configure' script does not know about.  Run `./configure --help'
78165cb819Smrgfor details on some of the pertinent environment variables.
79100ae103Smrg
80100ae103Smrg   You can give `configure' initial values for configuration parameters
81100ae103Smrgby setting variables in the command line or in the environment.  Here
82100ae103Smrgis an example:
83100ae103Smrg
84165cb819Smrg     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
85100ae103Smrg
86100ae103Smrg   *Note Defining Variables::, for more details.
87100ae103Smrg
88100ae103SmrgCompiling For Multiple Architectures
89100ae103Smrg====================================
90100ae103Smrg
91165cb819Smrg   You can compile the package for more than one kind of computer at the
92100ae103Smrgsame time, by placing the object files for each architecture in their
93165cb819Smrgown directory.  To do this, you can use GNU `make'.  `cd' to the
94100ae103Smrgdirectory where you want the object files and executables to go and run
95100ae103Smrgthe `configure' script.  `configure' automatically checks for the
96100ae103Smrgsource code in the directory that `configure' is in and in `..'.
97100ae103Smrg
98165cb819Smrg   With a non-GNU `make', it is safer to compile the package for one
99165cb819Smrgarchitecture at a time in the source code directory.  After you have
100165cb819Smrginstalled the package for one architecture, use `make distclean' before
101165cb819Smrgreconfiguring for another architecture.
102165cb819Smrg
103165cb819Smrg   On MacOS X 10.5 and later systems, you can create libraries and
104165cb819Smrgexecutables that work on multiple system types--known as "fat" or
105165cb819Smrg"universal" binaries--by specifying multiple `-arch' options to the
106165cb819Smrgcompiler but only a single `-arch' option to the preprocessor.  Like
107165cb819Smrgthis:
108165cb819Smrg
109165cb819Smrg     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
110165cb819Smrg                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
111165cb819Smrg                 CPP="gcc -E" CXXCPP="g++ -E"
112165cb819Smrg
113165cb819Smrg   This is not guaranteed to produce working output in all cases, you
114165cb819Smrgmay have to build one architecture at a time and combine the results
115165cb819Smrgusing the `lipo' tool if you have problems.
116100ae103Smrg
117100ae103SmrgInstallation Names
118100ae103Smrg==================
119100ae103Smrg
120165cb819Smrg   By default, `make install' installs the package's commands under
121100ae103Smrg`/usr/local/bin', include files under `/usr/local/include', etc.  You
122100ae103Smrgcan specify an installation prefix other than `/usr/local' by giving
123100ae103Smrg`configure' the option `--prefix=PREFIX'.
124100ae103Smrg
125100ae103Smrg   You can specify separate installation prefixes for
126100ae103Smrgarchitecture-specific files and architecture-independent files.  If you
127100ae103Smrgpass the option `--exec-prefix=PREFIX' to `configure', the package uses
128100ae103SmrgPREFIX as the prefix for installing programs and libraries.
129100ae103SmrgDocumentation and other data files still use the regular prefix.
130100ae103Smrg
131100ae103Smrg   In addition, if you use an unusual directory layout you can give
132100ae103Smrgoptions like `--bindir=DIR' to specify different values for particular
133100ae103Smrgkinds of files.  Run `configure --help' for a list of the directories
134100ae103Smrgyou can set and what kinds of files go in them.
135100ae103Smrg
136100ae103Smrg   If the package supports it, you can cause programs to be installed
137100ae103Smrgwith an extra prefix or suffix on their names by giving `configure' the
138100ae103Smrgoption `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
139100ae103Smrg
140100ae103SmrgOptional Features
141100ae103Smrg=================
142100ae103Smrg
143165cb819Smrg   Some packages pay attention to `--enable-FEATURE' options to
144100ae103Smrg`configure', where FEATURE indicates an optional part of the package.
145100ae103SmrgThey may also pay attention to `--with-PACKAGE' options, where PACKAGE
146100ae103Smrgis something like `gnu-as' or `x' (for the X Window System).  The
147100ae103Smrg`README' should mention any `--enable-' and `--with-' options that the
148100ae103Smrgpackage recognizes.
149100ae103Smrg
150100ae103Smrg   For packages that use the X Window System, `configure' can usually
151100ae103Smrgfind the X include and library files automatically, but if it doesn't,
152100ae103Smrgyou can use the `configure' options `--x-includes=DIR' and
153100ae103Smrg`--x-libraries=DIR' to specify their locations.
154100ae103Smrg
155165cb819SmrgParticular systems
156165cb819Smrg==================
157165cb819Smrg
158165cb819Smrg   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
159165cb819SmrgCC is not installed, it is recommended to use the following options in
160165cb819Smrgorder to use an ANSI C compiler:
161165cb819Smrg
162165cb819Smrg     ./configure CC="cc -Ae"
163165cb819Smrg
164165cb819Smrgand if that doesn't work, install pre-built binaries of GCC for HP-UX.
165165cb819Smrg
166165cb819Smrg   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
167165cb819Smrgparse its `<wchar.h>' header file.  The option `-nodtk' can be used as
168165cb819Smrga workaround.  If GNU CC is not installed, it is therefore recommended
169165cb819Smrgto try
170165cb819Smrg
171165cb819Smrg     ./configure CC="cc"
172165cb819Smrg
173165cb819Smrgand if that doesn't work, try
174165cb819Smrg
175165cb819Smrg     ./configure CC="cc -nodtk"
176165cb819Smrg
177100ae103SmrgSpecifying the System Type
178100ae103Smrg==========================
179100ae103Smrg
180165cb819Smrg   There may be some features `configure' cannot figure out
181165cb819Smrgautomatically, but needs to determine by the type of machine the package
182165cb819Smrgwill run on.  Usually, assuming the package is built to be run on the
183165cb819Smrg_same_ architectures, `configure' can figure that out, but if it prints
184165cb819Smrga message saying it cannot guess the machine type, give it the
185100ae103Smrg`--build=TYPE' option.  TYPE can either be a short name for the system
186100ae103Smrgtype, such as `sun4', or a canonical name which has the form:
187100ae103Smrg
188100ae103Smrg     CPU-COMPANY-SYSTEM
189100ae103Smrg
190100ae103Smrgwhere SYSTEM can have one of these forms:
191100ae103Smrg
192100ae103Smrg     OS KERNEL-OS
193100ae103Smrg
194100ae103Smrg   See the file `config.sub' for the possible values of each field.  If
195100ae103Smrg`config.sub' isn't included in this package, then this package doesn't
196100ae103Smrgneed to know the machine type.
197100ae103Smrg
198100ae103Smrg   If you are _building_ compiler tools for cross-compiling, you should
199100ae103Smrguse the option `--target=TYPE' to select the type of system they will
200100ae103Smrgproduce code for.
201100ae103Smrg
202100ae103Smrg   If you want to _use_ a cross compiler, that generates code for a
203100ae103Smrgplatform different from the build platform, you should specify the
204100ae103Smrg"host" platform (i.e., that on which the generated programs will
205100ae103Smrgeventually be run) with `--host=TYPE'.
206100ae103Smrg
207100ae103SmrgSharing Defaults
208100ae103Smrg================
209100ae103Smrg
210165cb819Smrg   If you want to set default values for `configure' scripts to share,
211165cb819Smrgyou can create a site shell script called `config.site' that gives
212165cb819Smrgdefault values for variables like `CC', `cache_file', and `prefix'.
213100ae103Smrg`configure' looks for `PREFIX/share/config.site' if it exists, then
214100ae103Smrg`PREFIX/etc/config.site' if it exists.  Or, you can set the
215100ae103Smrg`CONFIG_SITE' environment variable to the location of the site script.
216100ae103SmrgA warning: not all `configure' scripts look for a site script.
217100ae103Smrg
218100ae103SmrgDefining Variables
219100ae103Smrg==================
220100ae103Smrg
221165cb819Smrg   Variables not defined in a site shell script can be set in the
222100ae103Smrgenvironment passed to `configure'.  However, some packages may run
223100ae103Smrgconfigure again during the build, and the customized values of these
224100ae103Smrgvariables may be lost.  In order to avoid this problem, you should set
225100ae103Smrgthem in the `configure' command line, using `VAR=value'.  For example:
226100ae103Smrg
227100ae103Smrg     ./configure CC=/usr/local2/bin/gcc
228100ae103Smrg
229100ae103Smrgcauses the specified `gcc' to be used as the C compiler (unless it is
230165cb819Smrgoverridden in the site shell script).
231100ae103Smrg
232165cb819SmrgUnfortunately, this technique does not work for `CONFIG_SHELL' due to
233165cb819Smrgan Autoconf bug.  Until the bug is fixed you can use this workaround:
234100ae103Smrg
235165cb819Smrg     CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
236100ae103Smrg
237100ae103Smrg`configure' Invocation
238100ae103Smrg======================
239100ae103Smrg
240165cb819Smrg   `configure' recognizes the following options to control how it
241165cb819Smrgoperates.
242100ae103Smrg
243100ae103Smrg`--help'
244100ae103Smrg`-h'
245165cb819Smrg     Print a summary of all of the options to `configure', and exit.
246165cb819Smrg
247165cb819Smrg`--help=short'
248165cb819Smrg`--help=recursive'
249165cb819Smrg     Print a summary of the options unique to this package's
250165cb819Smrg     `configure', and exit.  The `short' variant lists options used
251165cb819Smrg     only in the top level, while the `recursive' variant lists options
252165cb819Smrg     also present in any nested packages.
253100ae103Smrg
254100ae103Smrg`--version'
255100ae103Smrg`-V'
256100ae103Smrg     Print the version of Autoconf used to generate the `configure'
257100ae103Smrg     script, and exit.
258100ae103Smrg
259100ae103Smrg`--cache-file=FILE'
260100ae103Smrg     Enable the cache: use and save the results of the tests in FILE,
261100ae103Smrg     traditionally `config.cache'.  FILE defaults to `/dev/null' to
262100ae103Smrg     disable caching.
263100ae103Smrg
264100ae103Smrg`--config-cache'
265100ae103Smrg`-C'
266100ae103Smrg     Alias for `--cache-file=config.cache'.
267100ae103Smrg
268100ae103Smrg`--quiet'
269100ae103Smrg`--silent'
270100ae103Smrg`-q'
271100ae103Smrg     Do not print messages saying which checks are being made.  To
272100ae103Smrg     suppress all normal output, redirect it to `/dev/null' (any error
273100ae103Smrg     messages will still be shown).
274100ae103Smrg
275100ae103Smrg`--srcdir=DIR'
276100ae103Smrg     Look for the package's source code in directory DIR.  Usually
277100ae103Smrg     `configure' can determine that directory automatically.
278100ae103Smrg
279165cb819Smrg`--prefix=DIR'
280165cb819Smrg     Use DIR as the installation prefix.  *Note Installation Names::
281165cb819Smrg     for more details, including other options available for fine-tuning
282165cb819Smrg     the installation locations.
283165cb819Smrg
284165cb819Smrg`--no-create'
285165cb819Smrg`-n'
286165cb819Smrg     Run the configure checks, but stop before creating any output
287165cb819Smrg     files.
288165cb819Smrg
289100ae103Smrg`configure' also accepts some other, not widely useful, options.  Run
290100ae103Smrg`configure --help' for more details.
291100ae103Smrg
292