1 | Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software |
---|
2 | Foundation, Inc. |
---|
3 | |
---|
4 | This file is free documentation; the Free Software Foundation gives |
---|
5 | unlimited permission to copy, distribute and modify it. |
---|
6 | |
---|
7 | |
---|
8 | THE FOLLOWING INFORMATION ARE INTENDED FOR *NIX SYSTEMS. IF YOU WISH |
---|
9 | TO INSTALL ADOL-C ON A WINDOWS PLATFORM PLEASE SKIP THE NEXT PARAGRAPHS |
---|
10 | AND CONTINUE NEAR THE END OF THIS FILE. |
---|
11 | |
---|
12 | |
---|
13 | *********************************************************************** |
---|
14 | * INSTALLING ADOL-C ON *NIX PLATFORMS * |
---|
15 | *********************************************************************** |
---|
16 | |
---|
17 | Basic Installation |
---|
18 | ================== |
---|
19 | |
---|
20 | These are generic installation instructions. |
---|
21 | |
---|
22 | The `configure' shell script attempts to guess correct values for |
---|
23 | various system-dependent variables used during compilation. It uses |
---|
24 | those values to create a `Makefile' in each directory of the package. |
---|
25 | It may also create one or more `.h' files containing system-dependent |
---|
26 | definitions. Finally, it creates a shell script `config.status' that |
---|
27 | you can run in the future to recreate the current configuration, and a |
---|
28 | file `config.log' containing compiler output (useful mainly for |
---|
29 | debugging `configure'). |
---|
30 | |
---|
31 | It can also use an optional file (typically called `config.cache' |
---|
32 | and enabled with `--cache-file=config.cache' or simply `-C') that saves |
---|
33 | the results of its tests to speed up reconfiguring. (Caching is |
---|
34 | disabled by default to prevent problems with accidental use of stale |
---|
35 | cache files.) |
---|
36 | |
---|
37 | If you need to do unusual things to compile the package, please try |
---|
38 | to figure out how `configure' could check whether to do them, and mail |
---|
39 | diffs or instructions to the address given in the `README' so they can |
---|
40 | be considered for the next release. If you are using the cache, and at |
---|
41 | some point `config.cache' contains results you don't want to keep, you |
---|
42 | may remove or edit it. |
---|
43 | |
---|
44 | The file `configure.ac' (or `configure.in') is used to create |
---|
45 | `configure' by a program called `autoconf'. You only need |
---|
46 | `configure.ac' if you want to change it or regenerate `configure' using |
---|
47 | a newer version of `autoconf'. |
---|
48 | |
---|
49 | The simplest way to compile this package is: |
---|
50 | |
---|
51 | 1. Type `./configure' to configure the package for your system. If |
---|
52 | you're using `csh' on an old version of System V, you might need |
---|
53 | to type `sh ./configure' instead to prevent `csh' from trying to |
---|
54 | execute `configure' itself. |
---|
55 | |
---|
56 | Running `configure' takes awhile. While running, it prints some |
---|
57 | messages telling which features it is checking for. |
---|
58 | |
---|
59 | 2. Type `make' to compile the package. |
---|
60 | |
---|
61 | 3. Optionally, type `make check' to run any self-tests that come with |
---|
62 | the package. |
---|
63 | |
---|
64 | 4. Type `make install' to install the programs and any data files and |
---|
65 | documentation. |
---|
66 | |
---|
67 | 5. You can remove the program binaries and object files from the |
---|
68 | source code directory by typing `make clean'. To also remove the |
---|
69 | files that `configure' created (so you can compile the package for |
---|
70 | a different kind of computer), type `make distclean'. There is |
---|
71 | also a `make maintainer-clean' target, but that is intended mainly |
---|
72 | for the package's developers. If you use it, you may have to get |
---|
73 | all sorts of other programs in order to regenerate files that came |
---|
74 | with the distribution. |
---|
75 | |
---|
76 | Compilers and Options |
---|
77 | ===================== |
---|
78 | |
---|
79 | Some systems require unusual options for compilation or linking that |
---|
80 | the `configure' script does not know about. Run `./configure --help' |
---|
81 | for details on some of the pertinent environment variables. |
---|
82 | |
---|
83 | You can give `configure' initial values for configuration parameters |
---|
84 | by setting variables in the command line or in the environment. Here |
---|
85 | is an example: |
---|
86 | |
---|
87 | ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix |
---|
88 | |
---|
89 | *Note Defining Variables::, for more details. |
---|
90 | |
---|
91 | Compiling For Multiple Architectures |
---|
92 | ==================================== |
---|
93 | |
---|
94 | You can compile the package for more than one kind of computer at the |
---|
95 | same time, by placing the object files for each architecture in their |
---|
96 | own directory. To do this, you must use a version of `make' that |
---|
97 | supports the `VPATH' variable, such as GNU `make'. `cd' to the |
---|
98 | directory where you want the object files and executables to go and run |
---|
99 | the `configure' script. `configure' automatically checks for the |
---|
100 | source code in the directory that `configure' is in and in `..'. |
---|
101 | |
---|
102 | If you have to use a `make' that does not support the `VPATH' |
---|
103 | variable, you have to compile the package for one architecture at a |
---|
104 | time in the source code directory. After you have installed the |
---|
105 | package for one architecture, use `make distclean' before reconfiguring |
---|
106 | for another architecture. |
---|
107 | |
---|
108 | Installation Names |
---|
109 | ================== |
---|
110 | |
---|
111 | By default, `make install' will install the package's files in |
---|
112 | `${HOME}/adolc_base/include', `${HOME}/adolc_base/lib'. You can specify an |
---|
113 | installation prefix other than `${HOME}/adolc_base/' by giving `configure' |
---|
114 | the option `--prefix=PATH'. |
---|
115 | |
---|
116 | You can specify separate installation prefixes for |
---|
117 | architecture-specific files and architecture-independent files. If you |
---|
118 | give `configure' the option `--exec-prefix=PATH', the package will use |
---|
119 | PATH as the prefix for installing programs and libraries. |
---|
120 | Documentation and other data files will still use the regular prefix. |
---|
121 | |
---|
122 | In addition, if you use an unusual directory layout you can give |
---|
123 | options like `--bindir=PATH' to specify different values for particular |
---|
124 | kinds of files. Run `configure --help' for a list of the directories |
---|
125 | you can set and what kinds of files go in them. |
---|
126 | |
---|
127 | If the package supports it, you can cause programs to be installed |
---|
128 | with an extra prefix or suffix on their names by giving `configure' the |
---|
129 | option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. |
---|
130 | |
---|
131 | Optional Features |
---|
132 | ================= |
---|
133 | |
---|
134 | Some packages pay attention to `--enable-FEATURE' options to |
---|
135 | `configure', where FEATURE indicates an optional part of the package. |
---|
136 | They may also pay attention to `--with-PACKAGE' options, where PACKAGE |
---|
137 | is something like `gnu-as' or `x' (for the X Window System). The |
---|
138 | `README' should mention any `--enable-' and `--with-' options that the |
---|
139 | package recognizes. |
---|
140 | |
---|
141 | For packages that use the X Window System, `configure' can usually |
---|
142 | find the X include and library files automatically, but if it doesn't, |
---|
143 | you can use the `configure' options `--x-includes=DIR' and |
---|
144 | `--x-libraries=DIR' to specify their locations. |
---|
145 | |
---|
146 | Specifying the System Type |
---|
147 | ========================== |
---|
148 | |
---|
149 | There may be some features `configure' cannot figure out |
---|
150 | automatically, but needs to determine by the type of machine the package |
---|
151 | will run on. Usually, assuming the package is built to be run on the |
---|
152 | _same_ architectures, `configure' can figure that out, but if it prints |
---|
153 | a message saying it cannot guess the machine type, give it the |
---|
154 | `--build=TYPE' option. TYPE can either be a short name for the system |
---|
155 | type, such as `sun4', or a canonical name which has the form: |
---|
156 | |
---|
157 | CPU-COMPANY-SYSTEM |
---|
158 | |
---|
159 | where SYSTEM can have one of these forms: |
---|
160 | |
---|
161 | OS KERNEL-OS |
---|
162 | |
---|
163 | See the file `config.sub' for the possible values of each field. If |
---|
164 | `config.sub' isn't included in this package, then this package doesn't |
---|
165 | need to know the machine type. |
---|
166 | |
---|
167 | If you are _building_ compiler tools for cross-compiling, you should |
---|
168 | use the `--target=TYPE' option to select the type of system they will |
---|
169 | produce code for. |
---|
170 | |
---|
171 | If you want to _use_ a cross compiler, that generates code for a |
---|
172 | platform different from the build platform, you should specify the |
---|
173 | "host" platform (i.e., that on which the generated programs will |
---|
174 | eventually be run) with `--host=TYPE'. |
---|
175 | |
---|
176 | Sharing Defaults |
---|
177 | ================ |
---|
178 | |
---|
179 | If you want to set default values for `configure' scripts to share, |
---|
180 | you can create a site shell script called `config.site' that gives |
---|
181 | default values for variables like `CC', `cache_file', and `prefix'. |
---|
182 | `configure' looks for `PREFIX/share/config.site' if it exists, then |
---|
183 | `PREFIX/etc/config.site' if it exists. Or, you can set the |
---|
184 | `CONFIG_SITE' environment variable to the location of the site script. |
---|
185 | A warning: not all `configure' scripts look for a site script. |
---|
186 | |
---|
187 | Defining Variables |
---|
188 | ================== |
---|
189 | |
---|
190 | Variables not defined in a site shell script can be set in the |
---|
191 | environment passed to `configure'. However, some packages may run |
---|
192 | configure again during the build, and the customized values of these |
---|
193 | variables may be lost. In order to avoid this problem, you should set |
---|
194 | them in the `configure' command line, using `VAR=value'. For example: |
---|
195 | |
---|
196 | ./configure CC=/usr/local2/bin/gcc |
---|
197 | |
---|
198 | will cause the specified gcc to be used as the C compiler (unless it is |
---|
199 | overridden in the site shell script). |
---|
200 | |
---|
201 | `configure' Invocation |
---|
202 | ====================== |
---|
203 | |
---|
204 | `configure' recognizes the following options to control how it |
---|
205 | operates. |
---|
206 | |
---|
207 | `--help' |
---|
208 | `-h' |
---|
209 | Print a summary of the options to `configure', and exit. |
---|
210 | |
---|
211 | `--version' |
---|
212 | `-V' |
---|
213 | Print the version of Autoconf used to generate the `configure' |
---|
214 | script, and exit. |
---|
215 | |
---|
216 | `--cache-file=FILE' |
---|
217 | Enable the cache: use and save the results of the tests in FILE, |
---|
218 | traditionally `config.cache'. FILE defaults to `/dev/null' to |
---|
219 | disable caching. |
---|
220 | |
---|
221 | `--config-cache' |
---|
222 | `-C' |
---|
223 | Alias for `--cache-file=config.cache'. |
---|
224 | |
---|
225 | `--quiet' |
---|
226 | `--silent' |
---|
227 | `-q' |
---|
228 | Do not print messages saying which checks are being made. To |
---|
229 | suppress all normal output, redirect it to `/dev/null' (any error |
---|
230 | messages will still be shown). |
---|
231 | |
---|
232 | `--srcdir=DIR' |
---|
233 | Look for the package's source code in directory DIR. Usually |
---|
234 | `configure' can determine that directory automatically. |
---|
235 | |
---|
236 | `configure' also accepts some other, not widely useful, options. Run |
---|
237 | `configure --help' for more details. |
---|
238 | |
---|
239 | |
---|
240 | |
---|
241 | *********************************************************************** |
---|
242 | * INSTALLING ADOL-C ON WINDOWS PLATFORMS * |
---|
243 | *********************************************************************** |
---|
244 | |
---|
245 | Preperations |
---|
246 | ============ |
---|
247 | |
---|
248 | The provided makefile set is optimized for the GNU-make system. Although |
---|
249 | other make systems may work too we strongly recommened using the GNU |
---|
250 | version. The later can be obtained from the download section of the MinGW |
---|
251 | project page located at |
---|
252 | |
---|
253 | http://www.mingw.org/download.shtml |
---|
254 | |
---|
255 | or from the files section of the SourceForge project page |
---|
256 | |
---|
257 | http://sourceforge.net/projects/mingw/ |
---|
258 | |
---|
259 | Of the "mingw32-make*" package one only needs the executable from the "bin" |
---|
260 | sub-directory ( sub-folder ;-) ). To install it two ways are possible |
---|
261 | basically distinguished by the necessary privileges. |
---|
262 | |
---|
263 | 1) Install with administrator privileges |
---|
264 | Simply copy the ecexutable into a directory covered by the PATH variable |
---|
265 | (e.g. C:\WINDOWS) and rename it to make.exe . |
---|
266 | |
---|
267 | 2) Install without administrator privileges |
---|
268 | Copy the executable into the main directory of the unzipped ADOL-C package |
---|
269 | and rename it to make.exe . Adjust the PATH variable by executing |
---|
270 | "SET PATH=<adolc path>;%PATH%" where <adolc path> has to be replaced by the |
---|
271 | full path to the ADOL-C main directory including device letter. Remember |
---|
272 | that the later is a temporary change. |
---|
273 | |
---|
274 | |
---|
275 | The Windows version of ADOL-C was tested in the following environment: |
---|
276 | - Windows XP |
---|
277 | - Microsoft Visual C++ Toolkit 2003 |
---|
278 | - GNUmake |
---|
279 | All variables within the ADOL-C package are adjusted to fit exactly our |
---|
280 | test environment. If an other compiler should be used one should adjust |
---|
281 | the files "winflags_dll" and "winflags_exa" accordingly. |
---|
282 | |
---|
283 | COMPILING |
---|
284 | ========= |
---|
285 | |
---|
286 | ADOL-C features a Windows compilation script named "comp_win.bat" that |
---|
287 | should be used. It is a simple wrapper that calls the make program with |
---|
288 | appropriate arguments. The script itself accepts a small number of |
---|
289 | switches what results in the following ways of calling it: |
---|
290 | |
---|
291 | 1) "comp_win" or "comp_win library" |
---|
292 | |
---|
293 | Compiles the library only. |
---|
294 | |
---|
295 | 2) "comp_win --with-exa" |
---|
296 | |
---|
297 | Compiles the library and all examples. |
---|
298 | |
---|
299 | 3) "comp_win clean" |
---|
300 | |
---|
301 | Removes all created files including the library. |
---|
302 | |
---|
303 | There is (currently) no automatic way of installing the relevant headers |
---|
304 | and the library in the Windows file hirarchy after completing the compile |
---|
305 | step. We recommend to use the build directory directly when compiling and |
---|
306 | linking against ADOL-C in the following way: |
---|
307 | |
---|
308 | *) Use the "-I" switch or an equivalent with the ADOL-C base directory as |
---|
309 | argument for specifying the include path. Have a look at the documen- |
---|
310 | tation and the included examples to figure out the necessary include |
---|
311 | files. |
---|
312 | |
---|
313 | *) Link your programs against the ADOL-C import library "adolc.lib" that |
---|
314 | can be found in the sub-directory "adolc". |
---|
315 | |
---|
316 | *) IMPORTANT: The new program needs to find the ADOL-C export library |
---|
317 | "adolc.dll" that is also located in the sub-directory "adolc". |
---|
318 | Copy the library in a directory where the runtime system can find it. |
---|
319 | Possible locations are (maybe not complete): |
---|
320 | |
---|
321 | - Windows system directories, e.g. C:\WINDOWS or C:\WINDOWS\SYSTEM |
---|
322 | - directories covered by the PATH variable |
---|
323 | - the current directory (where the applications is started from) |
---|
324 | - the directoy of the executable (if different from the current |
---|
325 | directory) |
---|
326 | |
---|
327 | Hints: |
---|
328 | ====== |
---|
329 | |
---|
330 | * It is possible to create a "static" library, too. Changes to "winflags_dll" |
---|
331 | are required to achieve this behaviour. The fourth line creates a variable |
---|
332 | named "AR" with the default value of "Change_Me". It should be set to the |
---|
333 | command name for building the static library. The value of "ARFLAGS" should |
---|
334 | be set accordingly. |
---|
335 | |
---|
336 | * It should be possible to use ADOL-C from within graphical programming |
---|
337 | environments but we will not provide support for this constellation (due to |
---|
338 | missing test systems :-) ) |
---|
339 | |
---|
340 | |
---|
341 | |
---|
342 | We would appreciate very much if you could give us feedback in case of |
---|
343 | problems and suggestions. |
---|
344 | |
---|