Support mkrescue on sparc64.
[grub.git] / INSTALL
1 -*- Text -*-
2
3 This is the GRUB.  Welcome.
4
5 This file contains instructions for compiling and installing the GRUB.
6
7 The Requirements
8 ================
9
10 GRUB depends on some software packages installed into your system. If
11 you don't have any of them, please obtain and install them before
12 configuring the GRUB.
13
14 * GCC 4.1.3 or later
15 * GNU Make
16 * GNU Bison 2.3 or later
17 * GNU gettext 0.17 or later
18 * GNU binutils 2.9.1.0.23 or later
19 * Flex 2.5.35 or later
20 * Other standard GNU/Unix tools
21
22 On GNU/Linux, you also need:
23
24 * libdevmapper 1.02.34 or later (recommended)
25
26 To build grub-emu, you need:
27
28 * ncurses
29 * libusb (recommended)
30 * SDL (recommended)
31
32 To build GRUB's graphical terminal (gfxterm), you need:
33
34 * FreeType 2 or later
35 * GNU Unifont
36
37 If you use a development snapshot or want to hack on GRUB you may
38 need the following.
39
40 * Python 2.5.2 or later
41 * Autoconf 2.60 or later
42 * Automake 1.10.1 or later
43 * Autogen 5.10 or later
44
45 Prerequisites for make-check:
46
47 * qemu, specifically the binary 'qemu-system-i386'
48 * xorriso 1.2.9 or later, for grub-mkrescue and grub-shell
49
50 Configuring the GRUB
51 ====================
52
53 The `configure' shell script attempts to guess correct values for
54 various system-dependent variables used during compilation.  It uses
55 those values to create a `Makefile' in each directory of the package.
56 It may also create one or more `.h' files containing system-dependent
57 definitions.  Finally, it creates a shell script `config.status' that
58 you can run in the future to recreate the current configuration, a
59 file `config.cache' that saves the results of its tests to speed up
60 reconfiguring, and a file `config.log' containing compiler output
61 (useful mainly for debugging `configure').
62
63 If you need to do unusual things to compile the package, please try to
64 figure out how `configure' could check whether to do them, and mail
65 diffs or instructions to the address given in the `README' so they can
66 be considered for the next release.  If at some point `config.cache'
67 contains results you don't want to keep, you may remove or edit it.
68
69 The file `configure.ac' is used to create `configure' by a program
70 called `autoconf'.  You only need `configure.in' if you want to change
71 it or regenerate `configure' using a newer version of `autoconf'.
72
73
74 Building the GRUB
75 =================
76
77 The simplest way to compile this package is:
78
79   1. `cd' to the directory containing the package's source code.  If
80      you don't use a release tarball you have to type `./autogen.sh'.
81      Type `./configure' to configure the package for your system.
82      If you're using `csh' on an old version of System V, you might
83      need to type `sh ./configure' instead to prevent `csh' from trying
84      to execute `configure' itself.
85
86      Running `configure' takes awhile.  While running, it prints some
87      messages telling which features it is checking for.
88
89   2. Type `make' to compile the package.
90
91   3. Optionally, type `make check' to run any self-tests that come with
92      the package.
93
94   4. Type `make install' to install the programs and any data files and
95      documentation.
96
97   5. You can remove the program binaries and object files from the
98      source code directory by typing `make clean'.  To also remove the
99      files that `configure' created (so you can compile the package for
100      a different kind of computer), type `make distclean'.  There is
101      also a `make maintainer-clean' target, but that is intended mainly
102      for the package's developers.  If you use it, you may have to get
103      all sorts of other programs in order to regenerate files that came
104      with the distribution.
105
106
107 Compiling For Multiple Architectures
108 ====================================
109
110 You can compile the package for more than one kind of computer at the
111 same time, by placing the object files for each architecture in their
112 own directory.  `cd' to the directory where you want the object files
113 and executables to go and run the `configure' script.  `configure'
114 automatically checks for the source code in the directory that
115 `configure' is in and in `..'.
116
117
118 Installation Names
119 ==================
120
121 By default, `make install' will install the package's files in
122 `/usr/local/bin', `/usr/local/man', etc.  You can specify an
123 installation prefix by giving `configure' the option `--prefix=PATH'.
124
125 You can specify separate installation prefixes for
126 architecture-specific files and architecture-independent files.  If
127 you give `configure' the option `--exec-prefix=PATH', the package will
128 use PATH as the prefix for installing programs and libraries.
129 Documentation and other data files will still use the regular prefix.
130
131 In addition, if you use an unusual directory layout you can give
132 options like `--bindir=PATH' to specify different values for
133 particular kinds of files.  Run `configure --help' for a list of the
134 directories you can set and what kinds of files go in them.
135
136 If the package supports it, you can cause programs to be installed
137 with an extra prefix or suffix on their names by giving `configure'
138 the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
139
140 Please note, however, that the GRUB knows where it is located in the
141 filesystem.  If you have installed it in an unusual location, the
142 system might not work properly, or at all.  The chief utility of these
143 options for the GRUB is to allow you to "install" in some alternate
144 location, and then copy these to the actual root filesystem later.
145
146
147 Sharing Defaults
148 ================
149
150 If you want to set default values for `configure' scripts to share,
151 you can create a site shell script called `config.site' that gives
152 default values for variables like `CC', `cache_file', and `prefix'.
153 `configure' looks for `PREFIX/share/config.site' if it exists, then
154 `PREFIX/etc/config.site' if it exists.  Or, you can set the
155 `CONFIG_SITE' environment variable to the location of the site script.
156 A warning: not all `configure' scripts look for a site script.
157
158
159 Operation Controls
160 ==================
161
162    `configure' recognizes the following options to control how it
163 operates.
164
165 `--cache-file=FILE'
166      Use and save the results of the tests in FILE instead of
167      `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
168      debugging `configure'.
169
170 `--help'
171      Print a summary of the options to `configure', and exit.
172
173 `--quiet'
174 `--silent'
175 `-q'
176      Do not print messages saying which checks are being made.
177
178 `--srcdir=DIR'
179      Look for the package's source code in directory DIR.  Usually
180      `configure' can determine that directory automatically.
181
182 `--version'
183      Print the version of Autoconf used to generate the `configure'
184      script, and exit.