• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1These are generic installation instructions.
2
3Prerequisites
4=============
5
6   This package depends on a few other packages.  They are listed in
7the file ‘DEPENDENCIES’.  It is recommended to install the listed
8packages before installing this package.
9
10Basic Installation
11==================
12
13   The ‘configure’ shell script attempts to guess correct values for
14various system-dependent variables used during compilation.  It uses
15those values to create a ‘Makefile’ in each directory of the package.
16It may also create one or more ‘.h’ files containing system-dependent
17definitions.  Finally, it creates a shell script ‘config.status’ that
18you can run in the future to recreate the current configuration, a file
19config.cache’ that saves the results of its tests to speed up
20reconfiguring, and a file ‘config.log’ containing compiler output
21(useful mainly for debugging ‘configure’).
22
23   If you need to do unusual things to compile the package, please try
24to figure out how ‘configure’ could check whether to do them, and mail
25diffs or instructions to the address given in the ‘README’ so they can
26be considered for the next release.  If at some point ‘config.cache27contains results you don't want to keep, you may remove or edit it.
28
29   The file ‘configure.ac’ is used to create ‘configure’ by a program
30called ‘autoconf’.  You only need ‘configure.ac’ if you want to change
31it or regenerate ‘configure’ using a newer version of ‘autoconf’.
32
33The simplest way to compile this package is:
34
35  1. ‘cd’ to the directory containing the package's source code and type
36     ‘./configure’ to configure the package for your system.  If you're
37     using ‘csh’ on an old version of System V, you might need to type
38     ‘sh ./configure’ instead to prevent ‘csh’ from trying to execute
39     ‘configure’ itself.
40
41     Running ‘configure’ takes awhile.  While running, it prints some
42     messages telling which features it is checking for.
43
44  2. Type ‘make’ to compile the package.
45
46  3. Optionally, type ‘make check’ to run any self-tests that come with
47     the package.
48
49  4. Type ‘make install’ to install the programs and any data files and
50     documentation.
51
52  5. You can remove the program binaries and object files from the
53     source code directory by typing ‘make clean’.  To also remove the
54     files that ‘configure’ created (so you can compile the package for
55     a different kind of computer), type ‘make distclean’.  There is
56     also a ‘make maintainer-clean’ target, but that is intended mainly
57     for the package's developers.  If you use it, you may have to get
58     all sorts of other programs in order to regenerate files that came
59     with the distribution.
60
61Compilers and Options
62=====================
63
64   Some systems require unusual options for compilation or linking that
65the ‘configure’ script does not know about.  You can give ‘configure’
66initial values for variables as arguments.  You can do it like this:
67     ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
68
69Compiling For Multiple Architectures
70====================================
71
72   You can compile the package for more than one kind of computer at the
73same time, by placing the object files for each architecture in their
74own directory.  To do this, you must use a version of ‘make’ that
75supports the ‘VPATH’ variable, such as GNU ‘make’.  ‘cd’ to the
76directory where you want the object files and executables to go and run
77the ‘configure’ script.  ‘configure’ automatically checks for the
78source code in the directory that ‘configure’ is in and in ‘..’.
79
80   If you have to use a ‘make’ that does not supports the ‘VPATH’
81variable, you have to compile the package for one architecture at a time
82in the source code directory.  After you have installed the package for
83one architecture, use ‘make distclean’ before reconfiguring for another
84architecture.
85
86   On MacOS X 10.5 and later systems, you can create libraries and
87executables that work on multiple system types--known as "fat" or
88"universal" binaries--by specifying multiple '-arch' options to the
89compiler but only a single '-arch' option to the preprocessor.  Like
90this:
91
92     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
93                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
94                 CPP="gcc -E" CXXCPP="g++ -E"
95
96   This is not guaranteed to produce working output in all cases.  You
97may have to build one architecture at a time and combine the results
98using the 'lipo' tool if you have problems.
99
100Installation Names
101==================
102
103   By default, ‘make install’ will install the package's files in
104/usr/local/bin’, ‘/usr/local/man’, etc.  You can specify an
105installation prefix other than ‘/usr/local’ by giving ‘configure’ the
106option ‘--prefix=PATH’.
107
108   You can specify separate installation prefixes for
109architecture-specific files and architecture-independent files.  If you
110give ‘configure’ the option ‘--exec-prefix=PATH’, the package will use
111PATH as the prefix for installing programs and libraries.
112Documentation and other data files will still use the regular prefix.
113
114   In addition, if you use an unusual directory layout you can give
115options like ‘--bindir=PATH’ to specify different values for particular
116kinds of files.  Run ‘configure --help’ for a list of the directories
117you can set and what kinds of files go in them.
118
119   If the package supports it, you can cause programs to be installed
120with an extra prefix or suffix on their names by giving ‘configure’ the
121option ‘--program-prefix=PREFIX’ or ‘--program-suffix=SUFFIX’.
122
123Enabling Relocatability
124=======================
125
126   It has been a pain for many users of GNU packages for a long time
127that packages are not relocatable.  It means a user cannot copy a
128program, installed by another user on the same machine, to his home
129directory, and have it work correctly (including i18n).  So many users
130need to go through ‘configure; make; make install’ with all its
131dependencies, options, and hurdles.
132
133   Red Hat, Debian, and similar package systems solve the "ease of
134installation" problem, but they hardwire path names, usually to ‘/usr’
135or ‘/usr/local’.  This means that users need root privileges to install
136a binary package, and prevents installing two different versions of the
137same binary package.
138
139   A relocatable program can be moved or copied to a different location
140on the filesystem.  It is possible to make symlinks to the installed
141and moved programs, and invoke them through the symlink. It is possible
142to do the same thing with a hard link _only_ if the hard link file is
143in the same directory as the real program.
144
145   To configure a program to be relocatable, add ‘--enable-relocatable’
146to the ‘configure’ command line.
147
148   On some OSes the executables remember the location of shared
149libraries and prefer them over any other search path.  Therefore, such
150an executable will look for its shared libraries first in the original
151installation directory and only then in the current installation
152directory.  Thus, for reliability, it is best to also give a ‘--prefix’
153option pointing to a directory that does not exist now and which never
154will be created, e.g.  ‘--prefix=/nonexistent’.  You may use
155‘DESTDIR=DEST-DIR’ on the ‘make’ command line to avoid installing into
156that directory.
157
158   We do not recommend using a prefix writable by unprivileged users
159(e.g./tmp/inst$$’) because such a directory can be recreated by an
160unprivileged user after the original directory has been removed.  We
161also do not recommend prefixes that might be behind an automounter
162(e.g. ‘$HOME/inst$$’) because of the performance impact of directory
163searching.
164
165   Here's a sample installation run that takes into account all these
166recommendations:
167
168     ./configure --enable-relocatable --prefix=/nonexistent
169     make
170     make install DESTDIR=/tmp/inst$$
171
172   Installation with ‘--enable-relocatable’ will not work for setuid or
173setgid executables, because such executables search only system library
174paths for security reasons.  Also, installation with
175‘--enable-relocatable’ might not work on OpenBSD, when the package
176contains shared libraries and libtool versions 1.5.xx are used.
177
178   The runtime penalty and size penalty are negligible on GNU/Linux
179(just one system call more when an executable is launched), and small on
180other systems (the wrapper program just sets an environment variable
181and executes the real program).
182
183Optional Features
184=================
185
186   Some packages pay attention to ‘--enable-FEATURE’ options to
187‘configure’, where FEATURE indicates an optional part of the package.
188They may also pay attention to ‘--with-PACKAGE’ options, where PACKAGE
189is something like ‘gnu-as’ or ‘x’ (for the X Window System).  The
190‘README’ should mention any ‘--enable-’ and ‘--with-’ options that the
191package recognizes.
192
193   For packages that use the X Window System, ‘configure’ can usually
194find the X include and library files automatically, but if it doesn't,
195you can use the ‘configure’ options ‘--x-includes=DIR’ and
196‘--x-libraries=DIR’ to specify their locations.
197
198   For packages that use the GNU libiconv library, you can use the
199‘configure’ option ‘--with-libiconv-prefix’ to specify the prefix you
200used while installing GNU libiconv.  This option is not necessary if
201that other prefix is the same as the one now specified through --prefix.
202
203   For packages that use the GNU libintl library, you can use the
204‘configure’ option ‘--with-libintl-prefix’ to specify the prefix you
205used while installing GNU gettext-runtime.  This option is not necessary if
206that other prefix is the same as the one now specified through --prefix.
207
208Particular Systems
209==================
210
211   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU CC
212is not installed, it is recommended to use the following options in order
213to use an ANSI C compiler:
214
215     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
216
217and if that doesn't work, install pre-built binaries of GCC for HP-UX.
218
219   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
220parse its ‘<wchar.h>’ header file.  The option ‘-nodtk’ can be used as
221a workaround.  If GNU CC is not installed, it is therefore recommended
222to try
223
224     ./configure CC="cc"
225
226and if that doesn't work, try
227
228     ./configure CC="cc -nodtk"
229
230   On AIX 3, the C include files by default don't define some necessary
231prototype declarations.  If GNU CC is not installed, it is recommended to
232use the following options:
233
234     ./configure CC="xlc -D_ALL_SOURCE"
235
236   On Haiku, software installed for all users goes in /boot/common, not
237/usr/local.  It is recommended to use the following options:
238
239     ./configure --prefix=/boot/common
240
241   On BeOS, user installed software goes in /boot/home/config, not
242/usr/local.  It is recommended to use the following options:
243
244     ./configure --prefix=/boot/home/config
245
246Specifying the System Type
247==========================
248
249   There may be some features ‘configure’ can not figure out
250automatically, but needs to determine by the type of host the package
251will run on.  Usually ‘configure’ can figure that out, but if it prints
252a message saying it can not guess the host type, give it the
253‘--host=TYPE’ option.  TYPE can either be a short name for the system
254type, such as ‘sun4’, or a canonical name with three fields:
255     CPU-COMPANY-SYSTEM
256
257See the file ‘config.sub’ for the possible values of each field.  If
258config.sub’ isn't included in this package, then this package doesn't
259need to know the host type.
260
261   If you are building compiler tools for cross-compiling, you can also
262use the ‘--target=TYPE’ option to select the type of system they will
263produce code for and the ‘--build=TYPE’ option to select the type of
264system on which you are compiling the package.
265
266Sharing Defaults
267================
268
269   If you want to set default values for ‘configure’ scripts to share,
270you can create a site shell script called ‘config.site’ that gives
271default values for variables like ‘CC’, ‘cache_file’, and ‘prefix’.
272‘configure’ looks for ‘PREFIX/share/config.site’ if it exists, then
273PREFIX/etc/config.site’ if it exists.  Or, you can set the
274‘CONFIG_SITE’ environment variable to the location of the site script.
275A warning: not all ‘configure’ scripts look for a site script.
276
277Operation Controls
278==================
279
280   ‘configure’ recognizes the following options to control how it
281operates.
282
283‘--cache-file=FILE’
284     Use and save the results of the tests in FILE instead of
285     ‘./config.cache’.  Set FILE to ‘/dev/null’ to disable caching, for
286     debugging ‘configure’.
287
288‘--help’
289     Print a summary of the options to ‘configure’, and exit.
290
291‘--quiet’
292‘--silent’
293‘-q’
294     Do not print messages saying which checks are being made.  To
295     suppress all normal output, redirect it to ‘/dev/null’ (any error
296     messages will still be shown).
297
298‘--srcdir=DIR’
299     Look for the package's source code in directory DIR.  Usually
300     ‘configure’ can determine that directory automatically.
301
302‘--version’
303     Print the version of Autoconf used to generate the ‘configure’
304     script, and exit.
305
306‘configure’ also accepts some other, not widely useful, options.
307
308