Debian Codegraph @

INSTALL

raw
1 Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Ivano Primi <[email protected]>
2
3 Copying and distribution of this file, with or without modification,
4 are permitted in any medium without royalty provided the copyright
5 notice and this notice are preserved.
6
7 ***********************************************************************************
8
9 How to build and install Numdiff
10 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
11
12 To successfully compile, build and install Numdiff some
13 tools are required. The first one is an ANSI C compiler.
14 This compiler should at least accept the option `-o'
15 to write its output to a specified file,
16 the option `-D' for macros pre-definition,
17 the option `-l' to search for a specified library,
18 and the options `-I' and `-L'
19 to add a given directory to the search path for include and
20 library files respectively.
21
22 In addition, you need a POSIX implementation of the `make' utility
23 (I used both GNU make and smake by Joerg Schilling
24 to compile Numdiff) and a POSIX implementation
25 of the commands `rm' and `find'.
26 At last, you need a proper installation of GNU Texinfo
27 (in order to install the info documentation) and
28 a shell sh-compatible.
29
30 Numdiff has been successfully compiled and tested on:
31
32 - Slackware(R) GNU/Linux 10.2 with the version 3.3.6 of the GNU C Compiler (GCC),
33 - Slackware GNU/Linux 11 with GCC 3.4.6,
34 - Slackware GNU/Linux 12.2 with GCC 4.2.4,
35 - Slackware GNU/Linux 13 with GCC 4.3.3,
36 - Debian(R) GNU/Linux 4.0 with GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21),
37 - Debian GNU/Linux 6.0.3 with GCC 4.4.5 (Debian 4.4.5-8),
38 - Debian GNU/Linux 7.1 with GCC 4.7.2 (Debian 4.7.2-5),
39 - Debian GNU/Linux 8.6 with GCC 4.9.2 (Debian 4.9.2-10),
40 - SunOS(R) 5.8 with GCC 2.95.3, and
41 - SunOS 5.10 (i386) with the version 5.9 of the Sun C compiler.
42
43 Configuration, building and installation of Numdiff can be
44 performed through the standard three steps:
45
46 ./configure
47 make
48 make install
49
50 If you leave enabled the Natural Language Support and you
51 also want to install the localization files (at the moment
52 only the Italian localization is supplied), then after
53 `make' you will have to type and run
54
55 make install-nls
56
57 By default, `make install' will install all the files in
58 `/usr/local/bin', `/usr/local/info' etc. You can specify
59 an installation prefix other than `/usr/local' using the
60 option `--prefix' in the `configure' step,
61 for instance `--prefix=$HOME':
62
63 ./configure --prefix=$HOME
64
65 For better control, you can use the options
66 `--bindir', `--infodir', and so on.
67 Type `./configure --help' to obtain
68 the complete list of all available options.
69
70 The documentation files (including a full User Manual
71 available in HTML, PDF and plain ASCII text format)
72 will always be put in `DOCDIR/numdiff',
73 where `DOCDIR' is the path specified by the option `--docdir'
74 or, if this option has not been given to
75 `configure', `PREFIX/share/doc'. Here `PREFIX' is the
76 installation prefix specified by the
77 option `--prefix' or the default `/usr/local'.
78
79 Once Numdiff has been installed you can remove all
80 files related to Numdiff by a simple `make uninstall'.
81 If you have also installed the localization files trough
82 `make install-nls', use `make uninstall-nls' in place
83 of `make uninstall' to remove them too.
84
85 Between the options accepted by `configure'
86 there are `--enable-debug', `--enable-optimization',
87 `--enable-nls' and `--enable-gmp'.
88
89 The option `--enable-debug' turns on debugging when
90 compiling the source code. This is obtained by passing to the
91 compiler the `-g' option, but you can change this default
92 debugging flag (which could not even be recognized by your compiler)
93 by setting the environment variable `DBGFLAGS' before
94 calling `configure'.
95
96 The option `--enable-optimization' turns on basic optimization when
97 compiling the source code. This is obtained by passing to the
98 compiler the `-O' option, but you can change this default
99 flag (which could not even be recognized by your compiler)
100 by setting the environment variable `OPTFLAGS' before
101 calling `configure'.
102
103 The option `--enable-nls' turns on Natural Language Support.
104 You do not need to use it explicitly since Natural
105 Language Support is enabled by default. To disable it, use `--disable-nls'.
106 Disabling Natural Language Support is suggested whenever
107 you want to install Numdiff on a system where the GNU gettext library
108 is not present. In this case the installation of Numdiff
109 can be accomplished, for example, through
110
111 ./configure --disable-nls
112 make
113 make install
114
115 Since version 5.2.0 Numdiff uses to perform all computations
116 the GNU Multiple Precision Arithmetic Library
117 (also called GNU MP or GMP), if this library is available
118 at build-time.
119 The old internal support for multiple precision arithmetic
120 is a fall-back in case GNU MP is absent.
121 However, it is possible to use the internal support for
122 multiple precision arithmetic even when GNU MP is available:
123 it is sufficient to pass the option `--enable-gmp=no'
124 or `--disable-gmp' to the configure script
125 before building the program, like in
126
127 ./configure --disable-gmp
128 make
129 make install
130
131 Enabling the old internal support for multiple precision arithmetic
132 is deprecated, I suggest to always link Numdiff against GNU MP.
133 The latest version of GNU MP is available at
134 http://ftp.gnu.org/gnu/gmp/. See the GNU MP web page
135 at http://gmplib.org/ for up-to-date information on GNU MP.
136
137 Below, I have attached the generic INSTALL instructions included in the
138 autoconf distribution.
139 ----------------------------------------------------------------------------
140
141 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
142 Foundation, Inc.
143
144 This file is free documentation; the Free Software Foundation gives
145 unlimited permission to copy, distribute and modify it.
146
147 Basic Installation
148 ==================
149
150 These are generic installation instructions.
151
152 The `configure' shell script attempts to guess correct values for
153 various system-dependent variables used during compilation. It uses
154 those values to create a `Makefile' in each directory of the package.
155 It may also create one or more `.h' files containing system-dependent
156 definitions. Finally, it creates a shell script `config.status' that
157 you can run in the future to recreate the current configuration, and a
158 file `config.log' containing compiler output (useful mainly for
159 debugging `configure').
160
161 It can also use an optional file (typically called `config.cache'
162 and enabled with `--cache-file=config.cache' or simply `-C') that saves
163 the results of its tests to speed up reconfiguring. (Caching is
164 disabled by default to prevent problems with accidental use of stale
165 cache files.)
166
167 If you need to do unusual things to compile the package, please try
168 to figure out how `configure' could check whether to do them, and mail
169 diffs or instructions to the address given in the `README' so they can
170 be considered for the next release. If you are using the cache, and at
171 some point `config.cache' contains results you don't want to keep, you
172 may remove or edit it.
173
174 The file `configure.ac' (or `configure.in') is used to create
175 `configure' by a program called `autoconf'. You only need
176 `configure.ac' if you want to change it or regenerate `configure' using
177 a newer version of `autoconf'.
178
179 The simplest way to compile this package is:
180
181 1. `cd' to the directory containing the package's source code and type
182 `./configure' to configure the package for your system. If you're
183 using `csh' on an old version of System V, you might need to type
184 `sh ./configure' instead to prevent `csh' from trying to execute
185 `configure' itself.
186
187 Running `configure' takes awhile. While running, it prints some
188 messages telling which features it is checking for.
189
190 2. Type `make' to compile the package.
191
192 3. Optionally, type `make check' to run any self-tests that come with
193 the package.
194
195 4. Type `make install' to install the programs and any data files and
196 documentation.
197
198 5. You can remove the program binaries and object files from the
199 source code directory by typing `make clean'. To also remove the
200 files that `configure' created (so you can compile the package for
201 a different kind of computer), type `make distclean'. There is
202 also a `make maintainer-clean' target, but that is intended mainly
203 for the package's developers. If you use it, you may have to get
204 all sorts of other programs in order to regenerate files that came
205 with the distribution.
206
207 Compilers and Options
208 =====================
209
210 Some systems require unusual options for compilation or linking that
211 the `configure' script does not know about. Run `./configure --help'
212 for details on some of the pertinent environment variables.
213
214 You can give `configure' initial values for configuration parameters
215 by setting variables in the command line or in the environment. Here
216 is an example:
217
218 ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
219
220 *Note Defining Variables::, for more details.
221
222 Compiling For Multiple Architectures
223 ====================================
224
225 You can compile the package for more than one kind of computer at the
226 same time, by placing the object files for each architecture in their
227 own directory. To do this, you must use a version of `make' that
228 supports the `VPATH' variable, such as GNU `make'. `cd' to the
229 directory where you want the object files and executables to go and run
230 the `configure' script. `configure' automatically checks for the
231 source code in the directory that `configure' is in and in `..'.
232
233 If you have to use a `make' that does not support the `VPATH'
234 variable, you have to compile the package for one architecture at a
235 time in the source code directory. After you have installed the
236 package for one architecture, use `make distclean' before reconfiguring
237 for another architecture.
238
239 Installation Names
240 ==================
241
242 By default, `make install' will install the package's files in
243 `/usr/local/bin', `/usr/local/man', etc. You can specify an
244 installation prefix other than `/usr/local' by giving `configure' the
245 option `--prefix=PATH'.
246
247 You can specify separate installation prefixes for
248 architecture-specific files and architecture-independent files. If you
249 give `configure' the option `--exec-prefix=PATH', the package will use
250 PATH as the prefix for installing programs and libraries.
251 Documentation and other data files will still use the regular prefix.
252
253 In addition, if you use an unusual directory layout you can give
254 options like `--bindir=PATH' to specify different values for particular
255 kinds of files. Run `configure --help' for a list of the directories
256 you can set and what kinds of files go in them.
257
258 If the package supports it, you can cause programs to be installed
259 with an extra prefix or suffix on their names by giving `configure' the
260 option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
261
262 Optional Features
263 =================
264
265 Some packages pay attention to `--enable-FEATURE' options to
266 `configure', where FEATURE indicates an optional part of the package.
267 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
268 is something like `gnu-as' or `x' (for the X Window System). The
269 `README' should mention any `--enable-' and `--with-' options that the
270 package recognizes.
271
272 For packages that use the X Window System, `configure' can usually
273 find the X include and library files automatically, but if it doesn't,
274 you can use the `configure' options `--x-includes=DIR' and
275 `--x-libraries=DIR' to specify their locations.
276
277 Specifying the System Type
278 ==========================
279
280 There may be some features `configure' cannot figure out
281 automatically, but needs to determine by the type of machine the package
282 will run on. Usually, assuming the package is built to be run on the
283 _same_ architectures, `configure' can figure that out, but if it prints
284 a message saying it cannot guess the machine type, give it the
285 `--build=TYPE' option. TYPE can either be a short name for the system
286 type, such as `sun4', or a canonical name which has the form:
287
288 CPU-COMPANY-SYSTEM
289
290 where SYSTEM can have one of these forms:
291
292 OS KERNEL-OS
293
294 See the file `config.sub' for the possible values of each field. If
295 `config.sub' isn't included in this package, then this package doesn't
296 need to know the machine type.
297
298 If you are _building_ compiler tools for cross-compiling, you should
299 use the `--target=TYPE' option to select the type of system they will
300 produce code for.
301
302 If you want to _use_ a cross compiler, that generates code for a
303 platform different from the build platform, you should specify the
304 "host" platform (i.e., that on which the generated programs will
305 eventually be run) with `--host=TYPE'.
306
307 Sharing Defaults
308 ================
309
310 If you want to set default values for `configure' scripts to share,
311 you can create a site shell script called `config.site' that gives
312 default values for variables like `CC', `cache_file', and `prefix'.
313 `configure' looks for `PREFIX/share/config.site' if it exists, then
314 `PREFIX/etc/config.site' if it exists. Or, you can set the
315 `CONFIG_SITE' environment variable to the location of the site script.
316 A warning: not all `configure' scripts look for a site script.
317
318 Defining Variables
319 ==================
320
321 Variables not defined in a site shell script can be set in the
322 environment passed to `configure'. However, some packages may run
323 configure again during the build, and the customized values of these
324 variables may be lost. In order to avoid this problem, you should set
325 them in the `configure' command line, using `VAR=value'. For example:
326
327 ./configure CC=/usr/local2/bin/gcc
328
329 will cause the specified gcc to be used as the C compiler (unless it is
330 overridden in the site shell script).
331
332 `configure' Invocation
333 ======================
334
335 `configure' recognizes the following options to control how it
336 operates.
337
338 `--help'
339 `-h'
340 Print a summary of the options to `configure', and exit.
341
342 `--version'
343 `-V'
344 Print the version of Autoconf used to generate the `configure'
345 script, and exit.
346
347 `--cache-file=FILE'
348 Enable the cache: use and save the results of the tests in FILE,
349 traditionally `config.cache'. FILE defaults to `/dev/null' to
350 disable caching.
351
352 `--config-cache'
353 `-C'
354 Alias for `--cache-file=config.cache'.
355
356 `--quiet'
357 `--silent'
358 `-q'
359 Do not print messages saying which checks are being made. To
360 suppress all normal output, redirect it to `/dev/null' (any error
361 messages will still be shown).
362
363 `--srcdir=DIR'
364 Look for the package's source code in directory DIR. Usually
365 `configure' can determine that directory automatically.
366
367 `configure' also accepts some other, not widely useful, options. Run
368 `configure --help' for more details.
369