Debian Codegraph @

INSTALL

raw ◀ ▶
1 Debian patch touch this file
1 Installing MDK
2 **************
3
4 Download the source tarball
5 ===========================
6
•7 GNU MDK is distributed as a source tarball available for download at
8 the following URLs:
9
10 * <ftp://ftp.gnu.org/pub/gnu/mdk> (or one of its mirrors
11 (http://www.gnu.org/prep/ftp.html))
12
13 * `http://sourceforge.net/project/showfiles.php?group_id=13897'
14
15 The above sites contain the latest stable releases of MDK. The
16 development branch is available at:
17
18 * `https://savannah.gnu.org/cvs/?group_id=118'
19
20 After you have downloaded the source tarball, unpack it in a
21 directory of your choice using the command:
22
23 tar xfvz mdk-X.Y.tar.gz
24
25 where X.Y stands for the downloaded version (the current stable release
26 being version 1.2.1).
27
28 Requirements
29 ============
30
31 In order to build and install MDK, you will need the following
32 libraries installed in your system:
33
34 - GLIB 2.4.0 (http://www.gtk.org) (required)
35
36 - GNU Flex 2.5 (http://www.gnu.org/software/flex/flex.html)
37 (required)
38
39 - GTK 2.4.0 (http://www.gtk.org) (optional)
40
41 - Libglade 2.4.0 (http://ftp.gnome.org/pub/GNOME/sources/libglade/2.4/)
42 (optional)
43
44 - GNU Readline
45 (http://cnswww.cns.cwru.edu/php/chet/readline/rltop.html)
46 (optional)
47
48 - GNU Libguile 2.0.x (http://www.gnu.org/software/guile) (optional)
49
50 If present, readline and history are used to provide command
•51 completion and history management to the command-line MIX virtual
52 machine, `mixvm'. GTK+ and libglade are needed if you want to build
53 the graphical interface to the MIX virtual machine, `gmixvm'. Finally,
54 if libguile is found, the MDK utilities will be compiled with Guile
55 support and will be extensible using Scheme.
56
57 *Please note*: you need both the libraries _and_ the headers; this
58 means both the library package and the `-dev' package if you do not
59 compile your libraries yourself (ex: installing `libgtk2.0' and
60 `libgtk2.0-dev' on Debian).
61
62 Basic installation
63 ==================
64
65 MDK uses GNU Autoconf and Automake tools, and, therefore, should be
66 built and installed without hassle using the following commands inside
67 the source directory:
68
69 ./configure
70 make
71 make install
72
73 where the last one must be run as root.
74
75 The first command, `configure', will setup the makefiles for your
76 system. In particular, `configure' will look for GTK+ and libglade,
•77 and, if they are present, will generate the appropriate makefiles for
78 building the `gmixvm' graphical user interface. Upon completion, you
79 should see a message with the configuration results like the following:
80
81 *** GNU MDK 1.2.1 has been successfully configured. ***
82
83 Type 'make' to build the following utilities:
84 - mixasm (MIX assembler)
85 - mixvm (MIX virtual machine, with readline support,
86 with guile support)
87 - gmixvm (mixvm GTK+ GUI, with guile support)
88 - mixguile (the mixvm guile shell)
89
•90 where the last lines may be missing if you lack the above-mentioned
91 libraries.
92
93 The next command, `make', will actually build the MDK programs in
94 the following locations:
95
96 - `mixutils/mixasm'
97
98 - `mixutils/mixvm'
99
100 - `mixgtk/gmixvm'
101
102 - `mixguile/mixguile'
103
104 You can run these programs from within their directories, but I
•105 recommend that you install them in the proper locations using `make install'
106 from a root shell.
107
108 Emacs support
109 =============
110
111 `mixvm' can be run within an Emacs GUD buffer using the elisp
•112 program `misc/mixvm.el', kindly contributed by Philip Ellis King.
113
114 `mixvm.el' provides an interface between MDK's `mixvm' and Emacs,
115 via GUD. Place this file in your load-path, optionally adding the
116 following line to your `.emacs' file:
117
118 (autoload 'mixvm "mixvm" "mixvm/gud interaction" t)
119
120 Special configure flags
121 =======================
122
•123 You can fine-tune the configuration process using the following
124 switches for configure:
125
126 - User Option: -enable-gui[=yes|no]
127 - User Option: -disable-gui
128 Enables/disables the build of the MIX virtual machine GUI
129 (`gmixvm'). If the required libraries are missing (*note
130 Requirements::) the configure script with automatically disable
131 this feature.
132
133 - User Option: -with-guile[=yes|no]
134 - User Option: -without-guile
135 Enables/disables the Guile support for `mixvm' and `gmixvm', and
136 the build of `mixguile'. If the required libraries are missing
137 (*note Requirements::) the configure script with automatically
138 disable this feature.
139
140 - User Option: -with-readline[=yes|no]
141 - User Option: -without-readline
142 Enables/disables the GNU Readline support for `mixvm'. If the
143 required libraries are missing (*note Requirements::) the configure
144 script with automatically disable this feature.
145
146 For additional, boilerplate configure options, see the
147 `Generic configure help' below, or run
148
149 configure --help
150
151 ------------------------------------------------------------------------
152 ------------------------------------------------------------------------
153
154 Generic configure help
155 **********************
156
157
158 Basic Installation
159 ==================
160
161 For more information specific to this package, please read the README
162 file. This source code distribution is autoconfiguring and you should be
163 able to compile it and install it without manual interventions such as
164 editing Makefiles, configuration files, and so on. These are generic
165 instructions for people who are not familiar with installing autoconfiguring
166 software.
167
168 The simplest way to compile this package is to enter the source code
169 main directory and do the following:
170
171 1. Configure the source code by typing:
172 % sh ./configure
173
174 If you're planning to install the package into your home directory
175 or to a location other than `/usr/local' then add the flag
176 `--prefix=PATH' to `configure'. For example, if your home directory
177 is `/home/luser' you can configure the package to install itself there
178 by invoking:
179 % sh ./configure --prefix=/home/luser
180
181 While running, `configure' prints some messages telling which
182 features is it checking for.
183
184 2. Compile the package by typing:
185 % make
186 Running `make' takes a while. If this is a very large package, now
187 is the time to go make some coffee.
188
189 3. Some packages are bundled with self-tests for source-code
190 verification. If this package includes such tests, you can
191 optionally run them after compilation by typing
192 % make check
193
194 4. Type `make install' to install the programs and any data files and
195 documentation. Type `make uninstall' to undo the installation.
196 During installation, the following files go to the following directories:
197 Executables -> /prefix/bin
198 Libraries -> /prefix/lib
199 Public header files -> /prefix/include
200 Man pages -> /prefix/man/man?
201 Info files -> /prefix/info
202 where `prefix' is either `/usr/local' or the PATH that you specified
203 in the `--prefix' flag.
204
205 If any of these directories do not presently exist, they will be
206 created on demand.
207
208 If you are installing in your home directory make sure that
209 `/home/luser/bin' is in your path. If you're using the bash shell
210 add this line at the end of your .cshrc file:
211 PATH="/home/luser/bin:${PATH}"
212 export PATH
213 If you are using csh or tcsh, then use this line instead:
214 setenv PATH /home/luser/bin:${PATH}
215 By prepending your home directory to the rest of the PATH you can
216 override systemwide installed software with your own custom installation.
217
218 5. You can remove the program binaries and object files from the
219 source code directory by typing `make clean'. To also remove the
220 files that `configure' created (so you can compile the package for
221 a different kind of computer), type `make distclean'.
222
223 Compiler configuration
224 ======================
225
226 The `configure' shell script is responsible for choosing and configuring
227 the compiler(s).
228
229 The following options allow you to specify whether you
230 want to enable or disable various debugging mechanisms:
231
232 `--with-warnings'
233 Make the compilers very picky about warnings. Try this whenever you
234 write new code since it may catch a few bugs. This is not active by
235 default because all too often warnings can be too picky and scare
236 the end-user.
237
238 `--disable-assert'
239 Compile without using assertions. This results in faster code,
240 but should not be used during developerment, or to run `make check'
241 which depends on assertions. It should only be used for production
242 runs on code that you believe is bug free.
243
244 All programs are compiled with optimization level 2 by default (-O2).
245 Occasionally that confuses the debugger when code is inlined. To disable
246 optimization and enable debugging, set the shell environment variables
247 CFLAGS, CXXFLAGS, FFLAGS to `-g'. On the bash shell, you can do this
248 like this:
249 $ export CFLAGS="-g"
250 $ export CXXFLAGS="-g"
251 $ export FFLAGS="-g"
252 On the tcsh shell, use the `setenv' command instead:
253 % setenv CFLAGS "-g"
254 ...etc...
255 For other shell, please consult your shell's documentation.
256
257 Similarly, you can increase the optimization level by assigning these
258 variables to "-g -O3".
259
260 The following options allow you to reconsider the `configure' shell script's
261 choice of Fortran compilers.
262
263 `--with-f2c'
264 Compile the Fortran code by translating it to C, even if a native
265 Fortran compiler is available. A copy of the f2c translator should be
266 bundled in the distribution. It will be compiled and then used to
267 compile your Fortran code.
268 `--with-g77'
269 Compile the Fortran code with g77 even if a proprietary Fortran
270 compiler is available
271 `--with-f77=F77'
272 Compile the Fortran code with the specified Fortran compiler.
273
274 Depending on what languages the package uses, some of these options may
275 or may not be available. To see what is available, type:
276 % sh ./configure --help
277
278 About the configure script
279 ==========================
280
281 The `configure' shell script attempts to guess correct values for
282 various system-dependent variables used during compilation. It uses
283 those values to create a `Makefile' in each directory of the package.
284 It may also create one or more `.h' files containing system-dependent
285 definitions. Finally, it creates a shell script `config.status' that
286 you can run in the future to recreate the current configuration, a file
287 `config.cache' that saves the results of its tests to speed up
288 reconfiguring, and a file `config.log' containing compiler output
289 (useful mainly for debugging `configure').
290
291 If you need to do unusual things to compile the package, please try
292 to figure out how `configure' could check whether to do them, and mail
293 diffs or instructions to the address given in the `README' so they can
294 be considered for the next release. If at some point `config.cache'
295 contains results you don't want to keep, you may remove or edit it.
296
297 The file `configure.in' is used to create `configure' by a program
298 called `autoconf'. You only need `configure.in' if you want to change
299 it or regenerate `configure' using a newer version of `autoconf'.
300
301 Advanced installation options.
302 ==============================
303
304 The `configure' script also understands the following more advanced
305 options, to handle situations for which `--prefix' alone is not sufficient.
306
307 You can specify separate installation prefixes for
308 architecture-specific files and architecture-independent files. If you
309 give `configure' the option `--exec-prefix=PATH', the package will use
310 PATH as the prefix for installing programs and libraries.
311 Documentation and other data files will still use the regular prefix.
312
313 In addition, if you use an unusual directory layout you can give
314 options like `--bindir=PATH' to specify different values for particular
315 kinds of files. Run `configure --help' for a list of the directories
316 you can set and what kinds of files go in them.
317
318 If the package supports it, you can cause programs to be installed
319 with an extra prefix or suffix on their names by giving `configure' the
320 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
321
322 Optional Features
323 =================
324
325 Some packages pay attention to `--enable-FEATURE' options to
326 `configure', where FEATURE indicates an optional part of the package.
327 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
328 is something like `gnu-as' or `x' (for the X Window System). The
329 `README' should mention any `--enable-' and `--with-' options that the
330 package recognizes.
331
332 For packages that use the X Window System, `configure' can usually
333 find the X include and library files automatically, but if it doesn't,
334 you can use the `configure' options `--x-includes=DIR' and
335 `--x-libraries=DIR' to specify their locations.